@antadesign/anta 0.3.29 → 0.3.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/anta_helpers.d.ts +4 -0
- package/dist/anta_helpers.js +11 -1
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +39 -30
- package/dist/components/Breadcrumbs.d.ts +1 -1
- package/dist/components/Button.d.ts +3 -3
- package/dist/components/ButtonCopy.d.ts +1 -1
- package/dist/components/InputDate.js +2 -0
- package/dist/components/MenuItem.d.ts +9 -7
- package/dist/components/MenuItem.js +21 -2
- package/dist/components/Text.js +2 -3
- package/dist/components/Title.d.ts +8 -2
- package/dist/components/Title.js +17 -6
- package/dist/elements/a-box.js +2 -0
- package/dist/elements/a-button.css +1 -1
- package/dist/elements/a-button.d.ts +5 -2
- package/dist/elements/a-calendar.js +3 -1
- package/dist/elements/a-copy.js +23 -3
- package/dist/elements/a-icon.shapes.d.ts +1 -1
- package/dist/elements/a-input-time.js +4 -3
- package/dist/elements/a-input.js +2 -2
- package/dist/elements/a-menu-item.css +1 -1
- package/dist/elements/a-menu.js +3 -0
- package/dist/elements/a-panel.css +1 -1
- package/dist/elements/a-panel.js +1 -1
- package/dist/elements/a-radio-group.js +2 -2
- package/dist/elements/a-slider.js +2 -2
- package/dist/elements/a-tabs.js +2 -2
- package/dist/elements/a-title.css +1 -1
- package/dist/elements/a-tooltip.js +1 -1
- package/dist/elements/shadow-aria.d.ts +1 -1
- package/dist/general_types.d.ts +4 -0
- package/dist/jsx-runtime.d.ts +10 -0
- package/dist/jsx-runtime.js +12 -0
- package/dist/theme-antune.css +1 -1
- package/dist/toaster.d.ts +1 -1
- package/docs/changelog.md +37 -0
- package/docs/comparison.md +1 -1
- package/docs/components/button.md +127 -381
- package/docs/components/menu.md +37 -15
- package/docs/components/panel.md +5 -6
- package/docs/components/title.md +19 -0
- package/docs/credits.md +3 -0
- package/docs/index.md +1 -0
- package/docs/packages/plot.md +3771 -0
- package/package.json +15 -11
package/dist/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ur from"react";var ia=ur.createElement,ve=ur.Fragment,Md=ur.useState,Id=ur.useId,Dd=ur.useMemo,Pd=ur.useSyncExternalStore;function ig(t,e,n){ia=t,e!==void 0&&(ve=e),n?.useState&&(Md=n.useState),n?.useId&&(Id=n.useId),n?.useMemo&&(Dd=n.useMemo),n?.useSyncExternalStore&&(Pd=n.useSyncExternalStore)}function W(t){return Md(t)}function ds(){return Id()}function Ue(t,e){return Dd(t,e)}function Od(t,e,n){return Pd(t,e,n)}function h(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?ia(t,o,r):ia(t,o)}function A(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?ia(t,o,...r):ia(t,o)}function zd(t){return Array.isArray(t)?t.length>0:t!=null}function ct(t,e=!1){let n={};for(let[r,a]of Object.entries(t))(r==="className"||r==="style"||r.startsWith("data-")&&(!e||!r.startsWith("data-menu-")&&r!=="data-anta-menu-item"))&&(n[r]=a);return n}function ao(t,e){return t==null?t:(Array.isArray(t)?t:[t]).map((r,a)=>typeof r=="string"?r.trim()===""?null:h(e,{children:r},a):typeof r=="number"?Number.isNaN(r)?null:h(e,{children:r},a):r==null||typeof r=="boolean"?null:r)}function oe(t){let e="nativeEvent"in t?t.nativeEvent:t;return{event:e,detail:e?.detail,isOwn:!e||e.target===e.currentTarget}}function Bn(t){if(t)return e=>{let{event:n,detail:r}=oe(e);r!=null&&t(n,r)}}function kt(t,e){if(t==null||t==="")return e;let n=Number(t);return Number.isFinite(n)?n:e}var sg=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.userAgent||""),oo=sg?"\u2325+Click to select only this":"Alt+Click to select only this",io=700;function $t(t){return t==="open"?"open":"closed"}function so(t,e,n){t.addEventListener("click",r=>{let a=r.target;if(!(a instanceof Element))return;let o=a.closest(`[${e}]`);o&&o.closest(t.localName)===t&&n()})}var lg=new Set(["brand","neutral","info","success","warning","critical"]);function X(t){return t&&t!=="neutral"?t:void 0}function F(t,e,n){return t!=null&&!lg.has(t)?{...n,[e]:t}:n}function pr(t){return typeof t=="number"?`${t}px`:t||void 0}function at(t,e,n){let r=pr(t);return r?{...n,[e]:r}:n}function ee(t,e,n){return at(typeof t=="number"||typeof t=="string"?t:void 0,e,n)}function K(t){return t||t===0?"":void 0}var cg=2e3;function lo(t,e,n){let[r,a]=W("idle"),o=Ue(()=>({timer:void 0}),[]);return{shownIcon:r==="ok"?"check":r==="fail"?"x":t,shownTone:r==="ok"?"success":r==="fail"?"critical":e,handleCopied:c=>{clearTimeout(o.timer),a(c?"ok":"fail"),o.timer=setTimeout(()=>a("idle"),cg),n?.(c)}}}function Nt(t){let e=t.getAnchorRect;return typeof e=="function"?e.call(t):t.getBoundingClientRect()}var us=null;function Bd(t){us=t}function Ld(){return us?.isOpen()??!1}function Nd(t){return us?.contains(t)??!1}var Gt=Symbol("anta.sync-popup-aria");function hs(t){return t!=null&&typeof t[Gt]=="function"}var dg=typeof HTMLElement<"u"?HTMLElement:class{},z=class extends dg{get view(){return this.ownerDocument?.defaultView??window}get doc(){return this.ownerDocument??document}};function sa(t,e,n){if(t)try{"ariaLabelledByElements"in t&&(t.ariaLabelledByElements=e),"ariaDescribedByElements"in t&&(t.ariaDescribedByElements=n)}catch{}}var hr=class extends z{static observedAttributes=["selected"];ariaProp="ariaChecked";internals=this.attachInternals?.();connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"selected")){let e=this.selected;delete this.selected,this.selected=e}this.hasAttribute("selected")&&this.applyState(!0)}attributeChangedCallback(e){e==="selected"&&this.applyState(this.hasAttribute("selected"))}get selected(){return this.internals?.states?.has("selected")??!1}set selected(e){this.applyState(!!e)}get value(){return this.getAttribute("value")??""}set value(e){this.setAttribute("value",e)}applyState(e){this.internals&&(e?this.internals?.states?.add("selected"):this.internals?.states?.delete("selected"),this.internals[this.ariaProp]=e?"true":"false")}applyAccessibilityRelations(e,n){sa(this.internals,e,n)}};function Fd(t){let e=1779033703^t.length;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),3432918353),e=e<<13|e>>>19;return e=Math.imul(e^e>>>16,2246822507),e=Math.imul(e^e>>>13,3266489909),(e^=e>>>16)>>>0}function Hd(t){let e=t>>>0;return()=>{e=e+1831565813|0;let n=Math.imul(e^e>>>15,1|e);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}var Vd=t=>Hd(Fd(t));function vs(t,e=3){return t?t.trim().split(/\s+/).filter(Boolean).slice(0,e).map(n=>[...n][0].toUpperCase()).join(""):""}var ug=.4;function hg(t,e,n){let r=n*Math.PI/180,a=e*Math.cos(r),o=e*Math.sin(r),i=(t+.3963377774*a+.2158037573*o)**3,s=(t-.1055613458*a-.0638541728*o)**3,l=(t-.0894841775*a-1.291485548*o)**3;return[4.0767416621*i-3.3077115913*s+.2309699292*l,-1.2684380046*i+2.6097574011*s-.3413193965*l,-.0041960863*i-.7034186147*s+1.707614701*l]}function pg(t,e,n){let[r,a,o]=hg(t,e,n),i=8e-4;return r>=-i&&r<=1+i&&a>=-i&&a<=1+i&&o>=-i&&o<=1+i}function qd(t,e){let n=0,r=ug;for(let a=0;a<18;a++){let o=(n+r)/2;pg(t,o,e)?n=o:r=o}return n}var Et=(t,e=3)=>Math.round(t*10**e)/10**e;function co(t,e,n){let r=Math.min(e,qd(t,n));return`oklch(${Et(t)} ${Et(r)} ${Et((n%360+360)%360,1)})`}function fs(t){let e=t.trim(),n=/^oklch\(\s*([\d.]+)/i.exec(e);if(n)return Math.max(0,Math.min(1,parseFloat(n[1])));let r=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e);if(r){let a=r[1];a.length===3&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]);let o=parseInt(a.slice(0,2),16)/255,i=parseInt(a.slice(2,4),16)/255,s=parseInt(a.slice(4,6),16)/255;return .299*o+.587*i+.114*s}return .6}var dn={figureScale:{range:[.76,1.2],off:1},figureAngle:{range:[-15,15],off:0},headAngle:{range:[-20,20],off:0},bodyAngle:{range:[-16,16],off:0},figureGap:{range:[.12,.42],off:.25},headRadiusTop:{range:[.35,1.25],off:1,bias:.6},headRadiusBottom:{range:[.45,1.5],off:1,bias:.6},bodyBorderRadius:{range:[.25,1],off:1}},la={x:[-15,15],y:[-14,4],off:[0,0]},ps={bgColor:{l:[.5,.82],c:[.02,.12],h:[0,360],off:"oklch(0.7 0 0)"},headColor:{l:[.78,.96],c:[.015,.075],h:[0,360],off:"oklch(0.9 0 0)"},bodyColor:{l:[.68,.9],c:[.015,.09],h:[0,360],off:"oklch(0.88 0 0)"}},Nn={bgColor:{mode:"any"},headColor:{mode:"any"},bodyColor:{mode:"any"},figureScale:{mode:"any"},figureTranslate:{mode:"any"},figureAngle:{mode:"any"},headAngle:{mode:"any"},bodyAngle:{mode:"any"},figureGap:{mode:"any"},headRadiusTop:{mode:"any"},headRadiusBottom:{mode:"any"},bodyBorderRadius:{mode:"any"},harmony:!0},Ln=(t,e,n)=>e+(n-e)*t,xs=(t,e)=>e[Math.min(e.length-1,Math.floor(t*e.length))];function un(t,e,n){let r=e?.mode??"any";return r==="off"?n.off:r==="list"&&e?.values?.length?xs(t(),e.values):r==="range"?Ln(t(),e?.min??n.range[0],e?.max??n.range[1]):Ln(n.bias?t()**n.bias:t(),n.range[0],n.range[1])}function mg(t,e){let n=e?.mode??"off";if(n==="off")return la.off;if(n==="list"&&e?.values?.length)return xs(t(),e.values);let r=n==="range"?e?.x??la.x:la.x,a=n==="range"?e?.y??la.y:la.y;return[Ln(t(),r[0],r[1]),Ln(t(),a[0],a[1])]}function ms(t,e,n,r){let a=e?.mode??"any";if(a==="off")return{color:n.off,l:fs(n.off)};if(a==="list"&&e?.values?.length){let u=xs(t(),e.values);return{color:u,l:fs(u)}}let o=a==="range"?e?.l??n.l:n.l,i=a==="range"?e?.c??n.c:n.c,s=a==="range"?e?.h??n.h:n.h,l=Ln(t(),o[0],o[1]),c=Ln(t(),i[0],i[1]),d=r??Ln(t(),s[0],s[1]);return{color:co(l,c,d),l}}var fr=100,bs=fr/2,br=40,gs=74,bg=["headRadiusTop","headRadiusBottom","bodyBorderRadius"];function jd(t){return bg.some(e=>(t[e]?.mode??Nn[e].mode)!=="off")}function ys(t,e){let n={...Nn,...t},r=Vd(e),a=ms(r,n.bgColor,ps.bgColor),o=Zd(a.color),i=ms(r,n.headColor,ps.headColor,n.harmony?o:void 0),s=ms(r,n.bodyColor,ps.bodyColor,n.harmony?o:void 0),l=un(r,n.figureScale,dn.figureScale),c=mg(r,n.figureTranslate),d=un(r,n.figureAngle,dn.figureAngle),u=un(r,n.headAngle,dn.headAngle),p=un(r,n.bodyAngle,dn.bodyAngle),m=un(r,n.figureGap,dn.figureGap),b=un(r,n.headRadiusTop,dn.headRadiusTop),f=un(r,n.headRadiusBottom,dn.headRadiusBottom),g=un(r,n.bodyBorderRadius,dn.bodyBorderRadius),v=br/2,y=gs/2,w=fr/Math.min(1,l),T=b,k=Math.max(b,f),L=Math.min(T,1)*v,N=Math.min(k,1)*v,O=Math.max(0,T-1)*v,M=Math.max(0,k-1)*v;return{figure:jd(t),bg:a.color,bgLightness:a.l,initialsColor:fg(a.color,a.l),scale:l,translate:c,angle:d,gap:m*(br+O+M),head:{color:i.color,radiusTop:L,radiusBottom:N,extendTop:O,extendBottom:M,angle:u},body:{color:s.color,radius:g*y,height:w,angle:p}}}function fg(t,e){let n=/^oklch\(/i.test(t.trim()),r=n?Zd(t):0;return e>.5?co(.35,n?.06:0,r):co(.95,n?.04:0,r)}function Zd(t){let e=/^oklch\(\s*[\d.]+\s+[\d.]+\s+([\d.]+)/i.exec(t.trim());return e?parseFloat(e[1]):0}var mr=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");function ws(t,e={}){let n=mr(t.bg),r=e.title?`<title>${mr(e.title)}</title>`:"",a=`<rect x="0" y="0" width="${fr}" height="${fr}" fill="${n}"/>`;if(!t.figure){let v=e.initials?`<text x="50" y="50" text-anchor="middle" dominant-baseline="central" font-family="var(--avatar-font, system-ui, sans-serif)" font-weight="500" font-size="${gg(e.initials.length)}" fill="var(--avatar-initials-color, ${mr(t.initialsColor)})">${mr(e.initials)}</text>`:"";return _d(r+a+v)}let[o,i]=t.translate,s=`translate(${Et(o,2)} ${Et(i,2)}) rotate(${Et(t.angle,2)} 50 50) translate(50 50) scale(${Et(t.scale,3)}) translate(-50 -50)`,{extendTop:l,extendBottom:c}=t.head,d=bs-br/2-l,u=br+l+c,p=Rd(bs-br/2,d,br,u,t.head.radiusTop,t.head.radiusBottom),m=`<g transform="rotate(${Et(t.head.angle,2)} 50 50)"><path d="${p}" fill="${mr(t.head.color)}"/></g>`,b=d+u+t.gap,f=Rd(bs-gs/2,b,gs,t.body.height,t.body.radius,t.body.radius),g=`<g transform="rotate(${Et(t.body.angle,2)} 50 ${Et(b,2)})"><path d="${f}" fill="${mr(t.body.color)}"/></g>`;return _d(`${r}${a}<g transform="${s}">${g}${m}</g>`)}function Rd(t,e,n,r,a,o){let i=Math.max(0,Math.min(a,n/2)),s=Math.max(0,Math.min(o,n/2)),l=i+s;if(l>r&&l>0){let u=r/l;i*=u,s*=u}let c=u=>Et(u,2),d=(u,p,m)=>`A${c(u)} ${c(u)} 0 0 1 ${c(p)} ${c(m)}`;return[`M${c(t+i)} ${c(e)}`,`H${c(t+n-i)}`,i?d(i,t+n,e+i):"",`V${c(e+r-s)}`,s?d(s,t+n-s,e+r):"",`H${c(t+s)}`,s?d(s,t,e+r-s):"",`V${c(e+i)}`,i?d(i,t+i,e):"","Z"].filter(Boolean).join(" ")}var _d=t=>`<svg viewBox="0 0 ${fr} ${fr}" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" role="presentation">${t}</svg>`,gg=t=>t>=3?30:t===2?38:46;var uo=class extends z{static observedAttributes=["seed","name","src","size","badge","config"];#e;#t;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=vg,this.#e=document.createElement("span"),this.#e.className="badge",this.#e.setAttribute("part","badge"),this.#e.style.display="none",e.append(n,this.#e)}#n(e){this.#t?this.#t.replaceWith(e):this.#e.before(e),this.#t=e}connectedCallback(){this.#r()}attributeChangedCallback(){this.#r()}#a(){let e=this.getAttribute("config");if(!e)return Nn;try{let n=JSON.parse(e);return n&&typeof n=="object"?n:Nn}catch{return Nn}}#r(){let e=this.getAttribute("badge");this.#e.style.display=e&&e!=="none"?"":"none";let n=this.getAttribute("name")??void 0,r=this.getAttribute("src");if(r){let l=document.createElement("img");l.setAttribute("part","frame image"),l.src=r,l.alt=n??"",l.loading="lazy",this.#n(l);return}let a=this.getAttribute("seed")??n??"",o=ys(this.#a(),a),i=document.createElement("template");i.innerHTML=ws(o,{initials:vs(n),title:n});let s=i.content.firstElementChild;s&&(s.setAttribute("part","frame"),this.#n(s))}},vg=`
|
|
1
|
+
import mn from"react";var oa=mn.createElement,ve=mn.Fragment,Ld=mn.useState,Rd=mn.useId,Nd=mn.useMemo,Lg=mn.useRef,Rg=mn.useLayoutEffect,_d=mn.useSyncExternalStore;function Ng(t,e,n){oa=t,e!==void 0&&(ve=e),n?.useState&&(Ld=n.useState),n?.useId&&(Rd=n.useId),n?.useMemo&&(Nd=n.useMemo),n?.useRef&&(Lg=n.useRef),n?.useLayoutEffect&&(Rg=n.useLayoutEffect),n?.useSyncExternalStore&&(_d=n.useSyncExternalStore)}function W(t){return Ld(t)}function xs(){return Rd()}function Ze(t,e){return Nd(t,e)}function Fd(t,e,n){return _d(t,e,n)}function h(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?oa(t,o,r):oa(t,o)}function T(t,e,n){let{children:r,...a}=e??{},o=n!==void 0?{...a,key:n}:a;return r!==void 0?oa(t,o,...r):oa(t,o)}function Hd(t){return Array.isArray(t)?t.length>0:t!=null}function dt(t,e=!1){let n={};for(let[r,a]of Object.entries(t))(r==="className"||r==="style"||r.startsWith("data-")&&(!e||!r.startsWith("data-menu-")&&r!=="data-anta-menu-item"))&&(n[r]=a);return n}function co(t,e){return t==null?t:(Array.isArray(t)?t:[t]).map((r,a)=>typeof r=="string"?r.trim()===""?null:h(e,{children:r},a):typeof r=="number"?Number.isNaN(r)?null:h(e,{children:r},a):r==null||typeof r=="boolean"?null:r)}function ie(t){let e="nativeEvent"in t?t.nativeEvent:t;return{event:e,detail:e?.detail,isOwn:!e||e.target===e.currentTarget}}function _n(t){if(t)return e=>{let{event:n,detail:r}=ie(e);r!=null&&t(n,r)}}function St(t,e){if(t==null||t==="")return e;let n=Number(t);return Number.isFinite(n)?n:e}function uo(t){let e=typeof t=="number"?t:t?1:void 0;return e!=null&&e>=1?e:void 0}var _g=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","Tab"]);function je(t){return _g.has(t.key)&&(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey&&t.key!=="Tab")}var Fg=typeof navigator<"u"&&/Mac|iPhone|iPad/i.test(navigator.userAgent||""),ho=Fg?"\u2325+Click to select only this":"Alt+Click to select only this",po=700;function Xt(t){return t==="open"?"open":"closed"}function mo(t,e,n){t.addEventListener("click",r=>{let a=r.target;if(!(a instanceof Element))return;let o=a.closest(`[${e}]`);o&&o.closest(t.localName)===t&&n()})}var Hg=new Set(["brand","neutral","info","success","warning","critical"]);function Q(t){return t&&t!=="neutral"?t:void 0}function _(t,e,n){return t!=null&&!Hg.has(t)?{...n,[e]:t}:n}function pr(t){return typeof t=="number"?`${t}px`:t||void 0}function tt(t,e,n){let r=pr(t);return r?{...n,[e]:r}:n}function ne(t,e,n){return tt(typeof t=="number"||typeof t=="string"?t:void 0,e,n)}function X(t){return t||t===0?"":void 0}var Vg=2e3;function fo(t,e,n){let[r,a]=W("idle"),o=Ze(()=>({timer:void 0}),[]);return{shownIcon:r==="ok"?"check":r==="fail"?"x":t,shownTone:r==="ok"?"success":r==="fail"?"critical":e,handleCopied:c=>{clearTimeout(o.timer),a(c?"ok":"fail"),o.timer=setTimeout(()=>a("idle"),Vg),n?.(c)}}}function Ft(t){let e=t.getAnchorRect;return typeof e=="function"?e.call(t):t.getBoundingClientRect()}var ys=null;function Vd(t){ys=t}function qd(){return ys?.isOpen()??!1}function jd(t){return ys?.contains(t)??!1}var Jt=Symbol("anta.sync-popup-aria");function ws(t){return t!=null&&typeof t[Jt]=="function"}var qg=typeof HTMLElement<"u"?HTMLElement:class{},B=class extends qg{get view(){return this.ownerDocument?.defaultView??window}get doc(){return this.ownerDocument??document}};function ia(t,e,n){if(t)try{"ariaLabelledByElements"in t&&(t.ariaLabelledByElements=e),"ariaDescribedByElements"in t&&(t.ariaDescribedByElements=n)}catch{}}var hr=class extends B{static observedAttributes=["selected"];ariaProp="ariaChecked";internals=this.attachInternals?.();connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"selected")){let e=this.selected;delete this.selected,this.selected=e}this.hasAttribute("selected")&&this.applyState(!0)}attributeChangedCallback(e){e==="selected"&&this.applyState(this.hasAttribute("selected"))}get selected(){return this.internals?.states?.has("selected")??!1}set selected(e){this.applyState(!!e)}get value(){return this.getAttribute("value")??""}set value(e){this.setAttribute("value",e)}applyState(e){this.internals&&(e?this.internals?.states?.add("selected"):this.internals?.states?.delete("selected"),this.internals[this.ariaProp]=e?"true":"false")}applyAccessibilityRelations(e,n){ia(this.internals,e,n)}};function Yd(t){let e=1779033703^t.length;for(let n=0;n<t.length;n++)e=Math.imul(e^t.charCodeAt(n),3432918353),e=e<<13|e>>>19;return e=Math.imul(e^e>>>16,2246822507),e=Math.imul(e^e>>>13,3266489909),(e^=e>>>16)>>>0}function Zd(t){let e=t>>>0;return()=>{e=e+1831565813|0;let n=Math.imul(e^e>>>15,1|e);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}var $d=t=>Zd(Yd(t));function As(t,e=3){return t?t.trim().split(/\s+/).filter(Boolean).slice(0,e).map(n=>[...n][0].toUpperCase()).join(""):""}var jg=.4;function Ug(t,e,n){let r=n*Math.PI/180,a=e*Math.cos(r),o=e*Math.sin(r),i=(t+.3963377774*a+.2158037573*o)**3,s=(t-.1055613458*a-.0638541728*o)**3,l=(t-.0894841775*a-1.291485548*o)**3;return[4.0767416621*i-3.3077115913*s+.2309699292*l,-1.2684380046*i+2.6097574011*s-.3413193965*l,-.0041960863*i-.7034186147*s+1.707614701*l]}function Wg(t,e,n){let[r,a,o]=Ug(t,e,n),i=8e-4;return r>=-i&&r<=1+i&&a>=-i&&a<=1+i&&o>=-i&&o<=1+i}function Gd(t,e){let n=0,r=jg;for(let a=0;a<18;a++){let o=(n+r)/2;Wg(t,o,e)?n=o:r=o}return n}var Tt=(t,e=3)=>Math.round(t*10**e)/10**e;function bo(t,e,n){let r=Math.min(e,Gd(t,n));return`oklch(${Tt(t)} ${Tt(r)} ${Tt((n%360+360)%360,1)})`}function Ss(t){let e=t.trim(),n=/^oklch\(\s*([\d.]+)/i.exec(e);if(n)return Math.max(0,Math.min(1,parseFloat(n[1])));let r=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e);if(r){let a=r[1];a.length===3&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]);let o=parseInt(a.slice(0,2),16)/255,i=parseInt(a.slice(2,4),16)/255,s=parseInt(a.slice(4,6),16)/255;return .299*o+.587*i+.114*s}return .6}var fn={figureScale:{range:[.76,1.2],off:1},figureAngle:{range:[-15,15],off:0},headAngle:{range:[-20,20],off:0},bodyAngle:{range:[-16,16],off:0},figureGap:{range:[.12,.42],off:.25},headRadiusTop:{range:[.35,1.25],off:1,bias:.6},headRadiusBottom:{range:[.45,1.5],off:1,bias:.6},bodyBorderRadius:{range:[.25,1],off:1}},sa={x:[-15,15],y:[-14,4],off:[0,0]},ks={bgColor:{l:[.5,.82],c:[.02,.12],h:[0,360],off:"oklch(0.7 0 0)"},headColor:{l:[.78,.96],c:[.015,.075],h:[0,360],off:"oklch(0.9 0 0)"},bodyColor:{l:[.68,.9],c:[.015,.09],h:[0,360],off:"oklch(0.88 0 0)"}},Hn={bgColor:{mode:"any"},headColor:{mode:"any"},bodyColor:{mode:"any"},figureScale:{mode:"any"},figureTranslate:{mode:"any"},figureAngle:{mode:"any"},headAngle:{mode:"any"},bodyAngle:{mode:"any"},figureGap:{mode:"any"},headRadiusTop:{mode:"any"},headRadiusBottom:{mode:"any"},bodyBorderRadius:{mode:"any"},harmony:!0},Fn=(t,e,n)=>e+(n-e)*t,Ms=(t,e)=>e[Math.min(e.length-1,Math.floor(t*e.length))];function bn(t,e,n){let r=e?.mode??"any";return r==="off"?n.off:r==="list"&&e?.values?.length?Ms(t(),e.values):r==="range"?Fn(t(),e?.min??n.range[0],e?.max??n.range[1]):Fn(n.bias?t()**n.bias:t(),n.range[0],n.range[1])}function Yg(t,e){let n=e?.mode??"off";if(n==="off")return sa.off;if(n==="list"&&e?.values?.length)return Ms(t(),e.values);let r=n==="range"?e?.x??sa.x:sa.x,a=n==="range"?e?.y??sa.y:sa.y;return[Fn(t(),r[0],r[1]),Fn(t(),a[0],a[1])]}function Es(t,e,n,r){let a=e?.mode??"any";if(a==="off")return{color:n.off,l:Ss(n.off)};if(a==="list"&&e?.values?.length){let u=Ms(t(),e.values);return{color:u,l:Ss(u)}}let o=a==="range"?e?.l??n.l:n.l,i=a==="range"?e?.c??n.c:n.c,s=a==="range"?e?.h??n.h:n.h,l=Fn(t(),o[0],o[1]),c=Fn(t(),i[0],i[1]),d=r??Fn(t(),s[0],s[1]);return{color:bo(l,c,d),l}}var br=100,Cs=br/2,fr=40,Ts=74,Zg=["headRadiusTop","headRadiusBottom","bodyBorderRadius"];function Kd(t){return Zg.some(e=>(t[e]?.mode??Hn[e].mode)!=="off")}function Is(t,e){let n={...Hn,...t},r=$d(e),a=Es(r,n.bgColor,ks.bgColor),o=Xd(a.color),i=Es(r,n.headColor,ks.headColor,n.harmony?o:void 0),s=Es(r,n.bodyColor,ks.bodyColor,n.harmony?o:void 0),l=bn(r,n.figureScale,fn.figureScale),c=Yg(r,n.figureTranslate),d=bn(r,n.figureAngle,fn.figureAngle),u=bn(r,n.headAngle,fn.headAngle),m=bn(r,n.bodyAngle,fn.bodyAngle),p=bn(r,n.figureGap,fn.figureGap),b=bn(r,n.headRadiusTop,fn.headRadiusTop),f=bn(r,n.headRadiusBottom,fn.headRadiusBottom),g=bn(r,n.bodyBorderRadius,fn.bodyBorderRadius),v=fr/2,x=Ts/2,k=br/Math.min(1,l),A=b,C=Math.max(b,f),L=Math.min(A,1)*v,R=Math.min(C,1)*v,z=Math.max(0,A-1)*v,M=Math.max(0,C-1)*v;return{figure:Kd(t),bg:a.color,bgLightness:a.l,initialsColor:$g(a.color,a.l),scale:l,translate:c,angle:d,gap:p*(fr+z+M),head:{color:i.color,radiusTop:L,radiusBottom:R,extendTop:z,extendBottom:M,angle:u},body:{color:s.color,radius:g*x,height:k,angle:m}}}function $g(t,e){let n=/^oklch\(/i.test(t.trim()),r=n?Xd(t):0;return e>.5?bo(.35,n?.06:0,r):bo(.95,n?.04:0,r)}function Xd(t){let e=/^oklch\(\s*[\d.]+\s+[\d.]+\s+([\d.]+)/i.exec(t.trim());return e?parseFloat(e[1]):0}var mr=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");function Ds(t,e={}){let n=mr(t.bg),r=e.title?`<title>${mr(e.title)}</title>`:"",a=`<rect x="0" y="0" width="${br}" height="${br}" fill="${n}"/>`;if(!t.figure){let v=e.initials?`<text x="50" y="50" text-anchor="middle" dominant-baseline="central" font-family="var(--avatar-font, system-ui, sans-serif)" font-weight="500" font-size="${Gg(e.initials.length)}" fill="var(--avatar-initials-color, ${mr(t.initialsColor)})">${mr(e.initials)}</text>`:"";return Wd(r+a+v)}let[o,i]=t.translate,s=`translate(${Tt(o,2)} ${Tt(i,2)}) rotate(${Tt(t.angle,2)} 50 50) translate(50 50) scale(${Tt(t.scale,3)}) translate(-50 -50)`,{extendTop:l,extendBottom:c}=t.head,d=Cs-fr/2-l,u=fr+l+c,m=Ud(Cs-fr/2,d,fr,u,t.head.radiusTop,t.head.radiusBottom),p=`<g transform="rotate(${Tt(t.head.angle,2)} 50 50)"><path d="${m}" fill="${mr(t.head.color)}"/></g>`,b=d+u+t.gap,f=Ud(Cs-Ts/2,b,Ts,t.body.height,t.body.radius,t.body.radius),g=`<g transform="rotate(${Tt(t.body.angle,2)} 50 ${Tt(b,2)})"><path d="${f}" fill="${mr(t.body.color)}"/></g>`;return Wd(`${r}${a}<g transform="${s}">${g}${p}</g>`)}function Ud(t,e,n,r,a,o){let i=Math.max(0,Math.min(a,n/2)),s=Math.max(0,Math.min(o,n/2)),l=i+s;if(l>r&&l>0){let u=r/l;i*=u,s*=u}let c=u=>Tt(u,2),d=(u,m,p)=>`A${c(u)} ${c(u)} 0 0 1 ${c(m)} ${c(p)}`;return[`M${c(t+i)} ${c(e)}`,`H${c(t+n-i)}`,i?d(i,t+n,e+i):"",`V${c(e+r-s)}`,s?d(s,t+n-s,e+r):"",`H${c(t+s)}`,s?d(s,t,e+r-s):"",`V${c(e+i)}`,i?d(i,t+i,e):"","Z"].filter(Boolean).join(" ")}var Wd=t=>`<svg viewBox="0 0 ${br} ${br}" width="100%" height="100%" preserveAspectRatio="xMidYMid slice" xmlns="http://www.w3.org/2000/svg" role="presentation">${t}</svg>`,Gg=t=>t>=3?30:t===2?38:46;var go=class extends B{static observedAttributes=["seed","name","src","size","badge","config"];#e;#t;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Kg,this.#e=document.createElement("span"),this.#e.className="badge",this.#e.setAttribute("part","badge"),this.#e.style.display="none",e.append(n,this.#e)}#n(e){this.#t?this.#t.replaceWith(e):this.#e.before(e),this.#t=e}connectedCallback(){this.#r()}attributeChangedCallback(){this.#r()}#a(){let e=this.getAttribute("config");if(!e)return Hn;try{let n=JSON.parse(e);return n&&typeof n=="object"?n:Hn}catch{return Hn}}#r(){let e=this.getAttribute("badge");this.#e.style.display=e&&e!=="none"?"":"none";let n=this.getAttribute("name")??void 0,r=this.getAttribute("src");if(r){let l=document.createElement("img");l.setAttribute("part","frame image"),l.src=r,l.alt=n??"",l.loading="lazy",this.#n(l);return}let a=this.getAttribute("seed")??n??"",o=Is(this.#a(),a),i=document.createElement("template");i.innerHTML=Ds(o,{initials:As(n),title:n});let s=i.content.firstElementChild;s&&(s.setAttribute("part","frame"),this.#n(s))}},Kg=`
|
|
2
2
|
:host { display: inline-block; position: relative; vertical-align: middle; }
|
|
3
3
|
svg, img {
|
|
4
4
|
display: block;
|
|
@@ -18,7 +18,7 @@ import ur from"react";var ia=ur.createElement,ve=ur.Fragment,Md=ur.useState,Id=u
|
|
|
18
18
|
border-radius: 50%;
|
|
19
19
|
background: var(--avatar-badge-color);
|
|
20
20
|
}
|
|
21
|
-
`;function
|
|
21
|
+
`;function Jd(){typeof customElements>"u"||customElements.get("a-avatar")||customElements.define("a-avatar",go)}Jd();var vo=class extends B{static observedAttributes=["value","max","tone"];indicator;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
|
|
22
22
|
:host {
|
|
23
23
|
display: block;
|
|
24
24
|
position: relative;
|
|
@@ -74,7 +74,7 @@ import ur from"react";var ia=ur.createElement,ve=ur.Fragment,Md=ur.useState,Id=u
|
|
|
74
74
|
display: block;
|
|
75
75
|
position: relative;
|
|
76
76
|
}
|
|
77
|
-
`,this.indicator=document.createElement("div"),this.indicator.className="indicator",this.indicator.setAttribute("part","indicator");let r=document.createElement("slot");e.append(n,this.indicator,r)}connectedCallback(){this.update()}attributeChangedCallback(){this.update()}update(){let e=this.getAttribute("value");if(e==null){this.indicator.style.removeProperty("--_percent");return}let n=Number(e),r=Number(this.getAttribute("max")??100),a=Number.isFinite(n)&&Number.isFinite(r)&&r>0?Math.min(100,Math.max(0,n/r*100)):0;this.indicator.style.setProperty("--_percent",`${a}%`)}};function
|
|
77
|
+
`,this.indicator=document.createElement("div"),this.indicator.className="indicator",this.indicator.setAttribute("part","indicator");let r=document.createElement("slot");e.append(n,this.indicator,r)}connectedCallback(){this.update()}attributeChangedCallback(){this.update()}update(){let e=this.getAttribute("value");if(e==null){this.indicator.style.removeProperty("--_percent");return}let n=Number(e),r=Number(this.getAttribute("max")??100),a=Number.isFinite(n)&&Number.isFinite(r)&&r>0?Math.min(100,Math.max(0,n/r*100)):0;this.indicator.style.setProperty("--_percent",`${a}%`)}};function Qd(){typeof customElements>"u"||customElements.get("a-progress")||customElements.define("a-progress",vo)}Qd();var xo=class extends B{};function eu(){typeof customElements>"u"||customElements.get("a-loader")||customElements.define("a-loader",xo)}eu();var Xg=`
|
|
78
78
|
:host {
|
|
79
79
|
display: block;
|
|
80
80
|
position: relative;
|
|
@@ -172,7 +172,7 @@ import ur from"react";var ia=ur.createElement,ve=ur.Fragment,Md=ur.useState,Id=u
|
|
|
172
172
|
.expand-btn.expanded::before {
|
|
173
173
|
transform: rotate(180deg);
|
|
174
174
|
}
|
|
175
|
-
`,mo=class extends z{static observedAttributes=["expandable","truncate","collapsible"];slotEl;expandBtn;expanded=!1;overflowObserver;contentObserver;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=xg,this.slotEl=document.createElement("slot"),e.append(n,this.slotEl)}connectedCallback(){this.syncExpandButton(),this.#e&&this.startOverflowObserver()}disconnectedCallback(){this.overflowObserver?.disconnect(),this.contentObserver?.disconnect()}attributeChangedCallback(e,n,r){n!==r&&((e==="truncate"||e==="expandable")&&this.setExpanded(!1),this.syncExpandButton(),(e==="truncate"||e==="expandable")&&(this.#e?this.startOverflowObserver():this.stopOverflowObserver()))}get#e(){return this.hasAttribute("truncate")&&this.hasAttribute("expandable")}get#t(){return this.hasAttribute("collapsible")}get isTruncated(){if(!this.hasAttribute("truncate")||this.expanded)return!1;let e=this.slotEl;return e.clientWidth===0&&e.clientHeight===0?!1:e.scrollHeight>e.clientHeight+1||e.scrollWidth>e.clientWidth+1}syncExpandButton(){if(this.#e&&!this.expandBtn){let e=document.createElement("button");e.className="expand-btn",e.type="button",e.addEventListener("click",this.handleToggle),this.shadowRoot.append(e),this.expandBtn=e}else!this.#e&&this.expandBtn&&(this.expandBtn.remove(),this.expandBtn=void 0);this.refreshButton()}handleToggle=()=>{this.setExpanded(!this.expanded)};setExpanded(e){e!==this.expanded&&(this.expanded=e,this.slotEl.classList.toggle("expanded",e),this.refreshButton(),e||this.measureOverflow())}startOverflowObserver(){this.#e&&(this.overflowObserver??=new ResizeObserver(()=>this.measureOverflow()),this.contentObserver??=new MutationObserver(()=>this.measureOverflow()),this.overflowObserver.observe(this.slotEl),this.contentObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}),this.measureOverflow())}stopOverflowObserver(){this.overflowObserver?.disconnect(),this.contentObserver?.disconnect(),this.slotEl.classList.remove("overflowing")}measureOverflow(){!this.#e||this.expanded||this.slotEl.classList.toggle("overflowing",this.isTruncated)}refreshButton(){let e=this.expandBtn;if(e){if(this.expanded&&!this.#t){e.remove(),this.expandBtn=void 0;return}e.setAttribute("aria-expanded",this.expanded?"true":"false"),e.setAttribute("aria-label",this.expanded?"Show less":"Show more"),e.classList.toggle("expanded",this.expanded)}}};function $d(){typeof customElements>"u"||customElements.get("a-text")||customElements.define("a-text",mo)}$d();function ca(t,e,{signal:n,edges:r}={}){let a,o=null,i=r!=null&&r.includes("leading"),s=r==null||r.includes("trailing"),l=()=>{o!==null&&(t.apply(a,o),a=void 0,o=null)},c=()=>{s&&l(),m()},d=null,u=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,c()},e)},p=()=>{d!==null&&(clearTimeout(d),d=null)},m=()=>{p(),a=void 0,o=null},b=()=>{l()},f=function(...g){if(n?.aborted)return;a=this,o=g;let v=d==null;u(),i&&v&&l()};return f.schedule=u,f.cancel=m,f.flush=b,n?.addEventListener("abort",m,{once:!0}),f}function ks(t,e,{signal:n,edges:r=["leading","trailing"]}={}){let a=null,o=ca(function(...s){a=Date.now(),t.apply(this,s)},e,{signal:n,edges:r}),i=function(...s){if(a==null&&(a=Date.now()),Date.now()-a>=e){a=Date.now(),t.apply(this,s),o.cancel(),o.schedule();return}o.apply(this,s)};return i.cancel=o.cancel,i.flush=o.flush,i}var da={width:["width"],height:["height"],size:["width","height"],overflow:["clientWidth","clientHeight","scrollWidth","scrollHeight","overflowX","overflowY","clippedX","clippedY","scrollableX","scrollableY"],edges:["hiddenStartX","hiddenEndX","hiddenStartY","hiddenEndY"],scroll:["scrollLeft","scrollTop"]},yg=new Set(Object.values(da).flat());function bo(t){let e=new Set,n=!1,r=t===""?["all"]:t?.trim().split(/\s+/)??[];for(let i of r)if(i==="all"){for(let s of yg)e.add(s);n=!0}else if(i==="context")n=!0;else if(Object.hasOwn(da,i))for(let s of da[i])e.add(s);let a=[...e].some(i=>i!=="width"&&i!=="height"),o=[...da.scroll,...da.edges].some(i=>e.has(i));return{fields:e,context:n,content:a,scroll:o}}var fo=new WeakMap,wg=/(?:^|\s)(?:dark|light)(?:\s|$)/;function kg(t){return t.classList.contains("dark")||t.classList.contains("light")}var Es=class{constructor(e,n){this.view=e;this.doc=n;this.#n=e.matchMedia("(prefers-color-scheme: dark)"),this.#a=e.matchMedia("(pointer: fine)"),this.#r=e.matchMedia("(pointer: coarse)"),this.#o=e.matchMedia("(hover: hover)"),this.#c=e.matchMedia("(prefers-reduced-motion: reduce)"),this.#m=[this.#n,this.#a,this.#r,this.#o,this.#c],this.#u=Ag(e.navigator)}#e=new Set;#t=new Set;#n;#a;#r;#o;#c;#m;#s;#h;#p;#g=0;#u;subscribeContext(e){this.#e.size===0&&this.#d(),this.#e.add(e)}unsubscribeContext(e){this.#e.delete(e)&&(this.#e.size===0&&this.#v(),this.#l())}observeVisibility(e){if(!this.#t.has(e)){if(typeof this.view.IntersectionObserver>"u"){e.visibilityDidChange(!0);return}this.#h??=new this.view.IntersectionObserver(n=>{for(let r of n){let a=r.target;this.#t.has(a)&&a.visibilityDidChange(r.isIntersecting)}},{root:null,rootMargin:"0px",threshold:0}),this.#t.add(e),this.#h.observe(e)}}unobserveVisibility(e){this.#t.delete(e)&&(this.#h?.unobserve(e),this.#t.size===0&&(this.#h?.disconnect(),this.#h=void 0),this.#l())}snapshot(){return{globalMode:Qd(this.doc.documentElement),systemAppearance:this.#n.matches?"dark":"light",...this.#u,pointer:this.#a.matches?"fine":this.#r.matches?"coarse":"none",hover:this.#o.matches,reducedMotion:this.#c.matches,devicePixelRatio:this.view.devicePixelRatio}}#b(){this.#p?.removeEventListener("change",this.#i),this.#p=this.view.matchMedia(`(resolution: ${this.view.devicePixelRatio}dppx)`),this.#p.addEventListener("change",this.#i,{once:!0}),this.#g=this.view.devicePixelRatio}#i=()=>{this.view.devicePixelRatio!==this.#g&&(this.#b(),this.#x())};#d(){for(let n of this.#m)n.addEventListener("change",this.#x);this.#b(),this.view.addEventListener("resize",this.#i,{passive:!0});let e=this.doc.documentElement;e&&(this.#s=new this.view.MutationObserver(this.#k),this.#s.observe(e,{subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}))}#v(){for(let e of this.#m)e.removeEventListener("change",this.#x);this.#p?.removeEventListener("change",this.#i),this.#p=void 0,this.view.removeEventListener("resize",this.#i),this.#s?.disconnect(),this.#s=void 0}#l(){this.#e.size>0||this.#t.size>0||fo.get(this.view)===this&&fo.delete(this.view)}#k=e=>{let n=new Set;for(let r of e){let a=r.target;if(a instanceof this.view.Element&&!(!kg(a)&&!wg.test(r.oldValue??"")))for(let o of this.#e)(a===o||a.contains(o))&&n.add(o)}for(let r of n)r.contextStoreDidChange()};#x=()=>{for(let e of this.#e)e.contextStoreDidChange()}};function Gd(t,e){let n=fo.get(t);return n||(n=new Es(t,e),fo.set(t,n)),n}function Qd(t){return t?.classList.contains("dark")?"dark":"light"}function Eg(t){for(let e=t;e;e=e.parentElement){if(e.classList.contains("dark"))return"dark";if(e.classList.contains("light"))return"light"}return Qd(t.ownerDocument.documentElement)}var Cg={edge:/edg[ea]?\/(\d+)/,opera:/opr\/(\d+)/,firefox:/(?:firefox|fxios)\/(\d+)/,chrome:/(?:chrome|crios)\/(\d+)/,safari:/version\/(\d+)/,unknown:/(?!)/},Sg={windows:/windows nt ([\d.]+)/,macos:/mac os x (\d+[._]\d+(?:[._]\d+)?)/,ios:/os (\d+[._]\d+(?:[._]\d+)?)/,android:/android (\d+(?:\.\d+)*)/};function Ag(t){let e=t,n=(t.userAgent??"").toLowerCase(),r=`${e.userAgentData?.platform??""} ${t.platform??""} ${n}`.toLowerCase(),a=/android/.test(r)?"android":/iphone|ipad|ipod|ios/.test(r)?"ios":/mac/.test(r)?"macos":/win/.test(r)?"windows":/linux/.test(r)?"linux":"unknown",o=/edg[ea]?\//.test(n)?"edge":/opr\/|opera/.test(n)?"opera":/firefox\/|fxios\//.test(n)?"firefox":/chrome\/|crios\//.test(n)?"chrome":/safari\//.test(n)?"safari":"unknown",s=(e.userAgentData?.brands??[]).filter(l=>!/not.a.brand/i.test(l.brand)).sort((l,c)=>Number(/chromium/i.test(l.brand))-Number(/chromium/i.test(c.brand)))[0];return{os:a,osVersion:parseInt(n.match(Sg[a]??/(?!)/)?.[1]??"",10)||0,browser:o,browserVersion:Number(s?.version??n.match(Cg[o])?.[1])||0,mobile:e.userAgentData?.mobile??/android|mobi|iphone|ipad|ipod/.test(r)}}function eu(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t===null||e===null)return!1;let n=t,r=e,a=Object.keys(n);return a.length===Object.keys(r).length&&a.every(o=>n[o]===r[o])}function Tg(t,e){return t!==void 0&&Object.keys(e).every(n=>eu(t[n],e[n]))}function Kd(t,e){return t?Object.fromEntries(Object.entries(e).filter(([n,r])=>!eu(t[n],r))):{...e}}function hn(t){return parseFloat(t)||0}function Mg(t){return{paddingTop:hn(t.paddingTop),paddingRight:hn(t.paddingRight),paddingBottom:hn(t.paddingBottom),paddingLeft:hn(t.paddingLeft),borderTop:hn(t.borderTopWidth),borderRight:hn(t.borderRightWidth),borderBottom:hn(t.borderBottomWidth),borderLeft:hn(t.borderLeftWidth)}}function Xd(t){return t==="normal"?"0px":t}function Ig(t){let e=parseFloat(t.lineHeight),n=Number.isFinite(e)?e:null,r=t.fontStyle&&t.fontStyle!=="normal"?`${t.fontStyle} `:"",a=t.fontWeight&&t.fontWeight!=="400"?`${t.fontWeight} `:"",o=n!=null?`/${n}px`:"";return{shorthand:`${r}${a}${t.fontSize}${o} ${t.fontFamily}`,family:t.fontFamily,size:parseFloat(t.fontSize)||0,weight:parseFloat(t.fontWeight)||400,style:t.fontStyle,stretch:t.fontStretch,lineHeight:n,letterSpacing:Xd(t.letterSpacing),wordSpacing:Xd(t.wordSpacing),color:t.color,featureSettings:t.fontFeatureSettings,variationSettings:t.fontVariationSettings,kerning:t.fontKerning,variantCaps:t.fontVariantCaps,textRendering:t.textRendering,direction:t.direction}}function Jd(t){return Math.round(t*100)/100}var go=class extends z{static observedAttributes=["fade","observe","throttle"];#e=this.attachInternals?.();#t;#n;#a;#r;#o;#c=!1;#m;#s=new Set;#h=!1;#p=!1;#g;#u;#b;#i=!1;#d=!1;#v=new Set;#l=!1;#k;#x=!1;#E=!1;connectedCallback(){this.#t=Gd(this.view,this.doc),this.#f()}disconnectedCallback(){this.#T(),this.#R(),this.#t?.unobserveVisibility(this),this.#t=void 0,this.#k=void 0}attributeChangedCallback(e,n,r){n!==r&&this.#t&&((e==="fade"||e==="observe")&&this.#f(),e==="throttle"&&this.#N(),(e==="observe"||e==="throttle")&&this.#y())}get measurement(){return this.#B()}get context(){return this.#_()}get isTruncated(){let e=this.#B();return e.clippedX||e.clippedY}contextStoreDidChange(){this.#O(),this.#y()}visibilityDidChange(e){this.#k!==e&&(this.#k=e,this.#f())}#f(){let{fields:e,context:n,content:r,scroll:a}=bo(this.getAttribute("observe"));(e.size!==this.#s.size||[...e].some(s=>!this.#s.has(s)))&&(this.#x=!0,this.#N()),this.#s=e,this.#h=this.hasAttribute("fade")||r,this.#p=this.hasAttribute("fade")||a;let o=this.hasAttribute("fade")||e.size>0;this.isConnected&&o&&(this.#k??this.hasAttribute("fade"))?this.#I():this.#T(),this.#i&&this.#A(),this.isConnected&&o?this.#t?.observeVisibility(this):this.#t?.unobserveVisibility(this),this.isConnected&&n?this.#M():this.#R(),this.#C()}#C(){let e=this.#i||this.#l;e!==!!this.#r&&(e?(this.#r=new this.view.MutationObserver(this.#S),this.#r.observe(this,{attributes:!0})):(this.#r?.disconnect(),this.#r=void 0))}#S=()=>{this.#y(),this.#O()};#I(){this.#i||(this.#i=!0,this.#N(),this.#n=new this.view.ResizeObserver(this.#y),this.#n.observe(this),this.doc.fonts?.addEventListener("loadingdone",this.#y),this.#m=this.#B(),this.#q(this.#m),this.#w(),this.#x=!0,this.#y())}#A(){this.#h&&!this.#a?(this.#a=new this.view.MutationObserver(this.#y),this.#a.observe(this,{subtree:!0,childList:!0,characterData:!0}),this.addEventListener("input",this.#y),this.addEventListener("load",this.#y,!0)):!this.#h&&this.#a&&(this.#a.disconnect(),this.#a=void 0,this.removeEventListener("input",this.#y),this.removeEventListener("load",this.#y,!0)),this.#p?this.addEventListener("scroll",this.#y,{passive:!0}):this.removeEventListener("scroll",this.#y),this.#w()}#w(){if(!this.#h||!this.#d||!this.#i){for(let n of this.#v)this.#n?.unobserve(n);this.#v.clear();return}let e=new Set(this.children);for(let n of this.#v)e.has(n)||(this.#n?.unobserve(n),this.#v.delete(n));for(let n of e)this.#v.has(n)||(this.#n?.observe(n),this.#v.add(n))}#T(){this.#i&&(this.#i=!1,this.#v.clear(),this.#n?.disconnect(),this.#n=void 0,this.#a?.disconnect(),this.#a=void 0,this.#o!=null&&this.view.cancelAnimationFrame(this.#o),this.#o=void 0,this.#u?.cancel(),this.#u=void 0,this.removeEventListener("input",this.#y),this.removeEventListener("scroll",this.#y),this.removeEventListener("load",this.#y,!0),this.doc.fonts?.removeEventListener("loadingdone",this.#y))}#M(){this.#l||(this.#l=!0,this.#t?.subscribeContext(this),this.addEventListener("focusin",this.#O),this.addEventListener("focusout",this.#L),this.doc.fonts?.addEventListener("loadingdone",this.#O),this.#E=!0,this.#O())}#R(){this.#l&&(this.#l=!1,this.#t?.unsubscribeContext(this),this.removeEventListener("focusin",this.#O),this.removeEventListener("focusout",this.#L),this.doc.fonts?.removeEventListener("loadingdone",this.#O))}#L=e=>{let n=e.relatedTarget;n instanceof this.view.Node&&this.contains(n)||this.#O()};#y=()=>{!this.#i||this.#o!=null||(this.#o=this.view.requestAnimationFrame(()=>{this.#o=void 0,this.#i&&this.#F()}))};#O=()=>{!this.#l||this.#c||(this.#c=!0,queueMicrotask(()=>{if(this.#c=!1,!this.#l)return;let e=this.#E;this.#E=!1,this.#W(e)}))};#B(){let e=this.getBoundingClientRect(),n=this.clientWidth,r=this.clientHeight,a=this.scrollWidth,o=this.scrollHeight,i=n>0||r>0,s=i&&a>n+1,l=i&&o>r+1,c=this.view.getComputedStyle(this);this.#d=c.overflowX!=="visible"||c.overflowY!=="visible";let d=s&&c.overflowX!=="visible",u=l&&c.overflowY!=="visible",p=s&&(c.overflowX==="auto"||c.overflowX==="scroll"),m=l&&(c.overflowY==="auto"||c.overflowY==="scroll"),b=Math.round(this.scrollLeft),f=Math.round(this.scrollTop),g=Math.max(0,c.direction==="rtl"?-b:b),v=Math.max(0,f);return{width:Jd(e.width),height:Jd(e.height),clientWidth:n,clientHeight:r,scrollWidth:a,scrollHeight:o,overflowX:s,overflowY:l,clippedX:d,clippedY:u,scrollableX:p,scrollableY:m,scrollLeft:b,scrollTop:f,hiddenStartX:d&&g>1,hiddenEndX:d&&g<a-n-1,hiddenStartY:u&&v>1,hiddenEndY:u&&v<o-r-1}}#_(){let e=(this.#t??Gd(this.view,this.doc)).snapshot(),n=this.view.getComputedStyle(this);return{...e,mode:Eg(this),focusWithin:this.matches(":focus-within"),font:Ig(n),inset:Mg(n),backgroundColor:n.backgroundColor}}#N(){this.#u?.cancel(),this.#u=void 0;let e=Number(this.getAttribute("throttle"));this.#i&&Number.isFinite(e)&&e>0&&(this.#u=ks(this.#V,Math.min(e,2147483647)))}#z(e){if(this.#s.size===0)return!1;let n=this.#g;if(!n||this.#x)return!0;for(let r of this.#s)if(n[r]!==e[r])return!0;return!1}#F(){let e=this.#B();this.#m=e,this.#q(e),this.#w(),this.#z(e)&&(this.#u?this.#u():this.#V())}#V=()=>{let e=this.#m;if(!this.#i||!e||!this.#z(e))return;let n=this.#x,r=this.#g;this.#x=!1,this.#g=e;let a={changed:n?{...e}:Kd(r,e),current:e};this.dispatchEvent(new this.view.CustomEvent("measurechange",{detail:a}))};#W(e){let n=this.#_(),r=this.#b;if(this.#b=n,!e&&Tg(r,n))return;let a={changed:e?{...n}:Kd(r,n),current:n};this.dispatchEvent(new this.view.CustomEvent("contextchange",{detail:a}))}#q(e){this.#D("overflow-x",e.overflowX),this.#D("overflow-y",e.overflowY),this.#D("clipped-x",e.clippedX),this.#D("clipped-y",e.clippedY),this.#D("scrollable-x",e.scrollableX),this.#D("scrollable-y",e.scrollableY),this.#D("hidden-start-x",e.hiddenStartX),this.#D("hidden-end-x",e.hiddenEndX),this.#D("hidden-start-y",e.hiddenStartY),this.#D("hidden-end-y",e.hiddenEndY)}#D(e,n){n?this.#e?.states?.add(e):this.#e?.states?.delete(e)}};function tu(){typeof customElements>"u"||customElements.get("a-box")||customElements.define("a-box",go)}tu();var cu=["wheel-capture","wheel-activation","wheel-modifier","wheel-delay","wheel-tolerance","wheel-reset-on-move","pointer-capture","pointer-buttons","pointer-threshold","pointer-modifier","pointer-include-interactive","pan","pan-pointer-types","pan-threshold","pan-directions","pan-inertia","pan-time-constant","pan-min-velocity"],dt=new WeakMap,ut=new WeakMap,du={up:1,down:2,left:4,right:8},Ms={mouse:1,pen:2,touch:4},Dg='textarea, select, input[type="number"], input[type="range"], a-menu',nu=['input, textarea, select, button, summary, a[href], [contenteditable]:not([contenteditable="false"])',...["button","checkbox","combobox","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","scrollbar","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"].map(t=>`[role~="${t}"]`),"a-input, a-button, a-slider, a-checkbox, a-switch, a-radio, a-menu, a-menu-item, a-tab"].join(", ");function vo(t,e,n){return t===null||t===""?n:t==="all"?Object.values(e).reduce((r,a)=>r|a,0):t.trim().split(/\s+/).reduce((r,a)=>r|(e[a]??0),0)}function gr(t,e,n,r=0){return Math.max(r,kt(t.getAttribute(e)?.trim()??null,n))}function uu(t,e,n){let r=t.getAttribute(e);return r==="any"||r==="none"||r==="alt"||r==="ctrl"||r==="meta"||r==="shift"?r:n}function Pg(t){if(!t.hasAttribute("wheel-capture"))return;let e=vo(t.getAttribute("wheel-capture"),du,15),n=t.getAttribute("wheel-activation");return{directions:e,activation:n==="hover"||n==="focus"||n==="settled-or-focus"?n:"settled",modifier:uu(t,"wheel-modifier","none"),delay:gr(t,"wheel-delay",150),tolerance:gr(t,"wheel-tolerance",5),resetOnMove:t.hasAttribute("wheel-reset-on-move")}}function Og(t){if(!t.hasAttribute("pointer-capture"))return;let e=vo(t.getAttribute("pointer-capture"),Ms,7);if(!e)return;let n=t.getAttribute("pointer-buttons"),r=n===null?1:n.split(/\s+/).reduce((a,o)=>{let i=Number(o);return Number.isInteger(i)&&i>=0&&i<=5?a|1<<i:a},0);if(r)return{types:e,buttons:r,threshold:gr(t,"pointer-threshold",0),modifier:uu(t,"pointer-modifier","any"),interactive:t.hasAttribute("pointer-include-interactive")}}function zg(t){if(!t.hasAttribute("pan"))return;let e=t.getAttribute("pan");if(e!==""&&e!=="both"&&e!=="x"&&e!=="y")return;let n=vo(t.getAttribute("pan-pointer-types"),Ms,4);if(n)return{types:n,axis:e||"both",threshold:gr(t,"pan-threshold",3),directions:vo(t.getAttribute("pan-directions"),du,15),inertia:t.hasAttribute("pan-inertia"),tau:gr(t,"pan-time-constant",325,1),minVelocity:gr(t,"pan-min-velocity",.02,.001)}}function Bg(t){let e=t.ownerDocument,n=ut.get(e);if(n)return n;let r=e.defaultView;return n={doc:e,view:r,states:new Set,dwell:new Map,sessions:new Map,momenta:new Set,tracking:!1,listening:!1},ut.set(e,n),r.addEventListener("blur",Mu),e.addEventListener("visibilitychange",Iu),n}function Is(t,e){if(!t.isConnected||!t.ownerDocument.defaultView)return;let n=dt.get(t);if(!n&&!t.hasAttribute("wheel-capture")&&!t.hasAttribute("pointer-capture")&&!t.hasAttribute("pan"))return;let r=Pg(t),a=Og(t),o=zg(t);if(!r&&!a&&!o){Ds(t,"disabled");return}n||(n={surface:t,store:Bg(t)},dt.set(t,n),n.store.states.add(n));let i=!!n.wheel,s=!!(n.pointer||n.pan);n.wheel=r,n.pointer=a,n.pan=o,i!==!!r&&(r?t.addEventListener("wheel",As,{passive:!1}):t.removeEventListener("wheel",As)),s!==!!(a||o)&&(a||o?(t.addEventListener("pointerdown",fu),t.addEventListener("lostpointercapture",vu),t.addEventListener("click",Su,!0),t.addEventListener("dragstart",Au)):hu(t)),(!r||e?.startsWith("wheel-")&&e!=="wheel-capture")&&n.store.dwell.delete(t),n.session&&e&&(e.startsWith("pointer-")||e==="pan"||e==="pan-pointer-types"||e==="pan-threshold")&&_n(n.session,null,"disabled"),n.momentum&&(!o?.inertia||!o.directions)&&Rn(n.momentum,"disabled"),pu(n.store)}function Ds(t,e="disconnected"){let n=dt.get(t);if(!n)return;dt.delete(t),n.wheel=void 0,n.pointer=void 0,n.pan=void 0,t.removeEventListener("wheel",As),hu(t),n.session&&_n(n.session,null,e),n.momentum&&Rn(n.momentum,e);let r=n.store;r.dwell.delete(t),r.states.delete(n),pu(r),!r.states.size&&(r.view.removeEventListener("blur",Mu),r.doc.removeEventListener("visibilitychange",Iu),ut.get(r.doc)===r&&ut.delete(r.doc))}function hu(t){t.removeEventListener("pointerdown",fu),t.removeEventListener("lostpointercapture",vu),t.removeEventListener("click",Su,!0),t.removeEventListener("dragstart",Au)}function Ps(t){return t?.activation==="settled"||t?.activation==="settled-or-focus"}function pu(t){let e=Array.from(t.states).some(n=>Ps(n.wheel));e!==t.tracking&&(t.tracking=e,e?(t.doc.addEventListener("pointermove",ru,{passive:!0,capture:!0}),t.doc.addEventListener("pointerout",au,{passive:!0,capture:!0}),t.doc.addEventListener("wheel",ou,{passive:!0,capture:!0})):(t.doc.removeEventListener("pointermove",ru,!0),t.doc.removeEventListener("pointerout",au,!0),t.doc.removeEventListener("wheel",ou,!0),t.dwell.clear()))}function ru(t){let e=ut.get(this);if(!e||t.pointerType==="touch")return;let n=t.composedPath();for(let r of e.dwell.keys())(!n.includes(r)||t.buttons&&!ua(r,t.clientX,t.clientY).inside)&&e.dwell.delete(r);for(let r of n){let a=dt.get(r),o=a?.wheel;if(!a||!o||!Ps(o))continue;let i=e.dwell.get(a.surface);if(!i){if(t.buttons)continue;e.dwell.set(a.surface,{x:t.clientX,y:t.clientY,time:t.timeStamp});continue}t.clientX===i.x&&t.clientY===i.y||t.timeStamp-i.time>=o.delay&&!o.resetOnMove||(Math.abs(t.clientX-i.x)>o.tolerance||Math.abs(t.clientY-i.y)>o.tolerance)&&(i={x:t.clientX,y:t.clientY,time:t.timeStamp},e.dwell.set(a.surface,i))}}function au(t){t.pointerType!=="touch"&&t.relatedTarget===null&&ut.get(this)?.dwell.clear()}function ou(t){let e=ut.get(this);if(!e)return;let n=t.composedPath();for(let r of e.dwell.keys())n.includes(r)||e.dwell.delete(r)}function mu(t,e){return e==="any"?!0:e==="none"?!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey:t[`${e}Key`]}function Cs(t,e,n){let r=t.ownerDocument.defaultView;for(let a of e.composedPath()){if(a===t)break;if(a instanceof r.Element&&(a.hasAttribute("data-capture-ignore")||n&&a.matches(n)))return!0}return t.hasAttribute("data-capture-ignore")}function Ss(t,e,n){return e!==0&&!!(t&(n?e<0?4:8:e<0?1:2))}function ua(t,e,n){let r=t.getBoundingClientRect();return{localX:e-r.left,localY:n-r.top,boxWidth:r.width,boxHeight:r.height,inside:e>=r.left&&e<=r.right&&n>=r.top&&n<=r.bottom,focusWithin:t.matches(":focus-within")}}function bu(t){return{type:t.type,timeStamp:t.timeStamp,isTrusted:t.isTrusted,cancelable:t.cancelable,defaultPrevented:t.defaultPrevented,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,offsetX:t.offsetX,offsetY:t.offsetY}}function Os(t){return{...bu(t),pointerId:t.pointerId,pointerType:t.pointerType,isPrimary:t.isPrimary,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist}}function zs(t,e,n){t.surface.dispatchEvent(new t.store.view.CustomEvent(e,{detail:n}))}function As(t){let e=dt.get(this),n=e?.wheel;if(!e||!n||!n.directions||t.defaultPrevented||!t.cancelable||!mu(t,n.modifier))return;let r=t.deltaMode,a=t.deltaX,o=t.deltaY,i=Math.abs(a)>Math.abs(o);if(!Ss(n.directions,i?a:o,i))return;let s;if((n.activation==="focus"||n.activation==="settled-or-focus")&&this.matches(":focus-within"))s="focus";else if(n.activation==="hover")s="immediate";else{let d=e.store.dwell.get(this);if(!Ps(n)||!d||t.timeStamp-d.time<n.delay)return;s="settled"}if(Cs(this,t,Dg))return;let l=ua(this,t.clientX,t.clientY);if(!l.inside||(t.preventDefault(),!t.defaultPrevented))return;t.stopPropagation();let c={...bu(t),deltaMode:r,deltaX:a,deltaY:o,deltaZ:t.deltaZ};e.momentum&&Rn(e.momentum,"interrupted"),zs(e,"wheelinput",{wheelEvent:c,...l,activationReason:s})}function xo(t){return{x:t.clientX,y:t.clientY,time:t.timeStamp}}function fu(t){let e=dt.get(this);if(!e||(e.suppressClickUntil=void 0,e.momentum&&Rn(e.momentum,"interrupted"),t.defaultPrevented||!t.isPrimary||e.session||e.store.sessions.has(t.pointerId)))return;let n=Ms[t.pointerType]??0,r=e.pointer,a=!!r&&!!(r.types&n)&&!!(r.buttons&1<<t.button)&&mu(t,r.modifier)&&!Cs(this,t,r.interactive?"":nu),o=!!e.pan&&!!(e.pan.types&n)&&t.button===0&&e.pan.directions!==0&&!Cs(this,t,nu);if(!a&&!o)return;let i=Os(t),s=xo(i),l={state:e,id:t.pointerId,start:{pointerEvent:i,...ua(this,t.clientX,t.clientY)},current:i,pointer:a,pan:o,pointerStarted:!1,panStarted:!1,captured:!1,pointerReason:r?.threshold?"drag-threshold":"pointer-down",panReason:e.pan?.threshold?"drag-threshold":"pointer-down",pointerLast:s,panLast:s,samples:o?[s]:[],lastMoveTime:t.timeStamp};e.session=l,e.store.sessions.set(l.id,l),gu(e.store),ku(l,t,!0)}function gu(t){let e=t.sessions.size>0;e!==t.listening&&(t.listening=e,e?(t.doc.addEventListener("pointermove",iu,{capture:!0,passive:!1}),t.doc.addEventListener("pointerup",su,{capture:!0,passive:!1}),t.doc.addEventListener("pointercancel",lu,!0)):(t.doc.removeEventListener("pointermove",iu,!0),t.doc.removeEventListener("pointerup",su,!0),t.doc.removeEventListener("pointercancel",lu,!0)))}function iu(t){let e=ut.get(this)?.sessions.get(t.pointerId);e&&ku(e,t)}function su(t){let e=ut.get(this)?.sessions.get(t.pointerId);e&&_n(e,t)}function lu(t){let e=ut.get(this)?.sessions.get(t.pointerId);e&&_n(e,t,"pointer-cancel")}function vu(t){let e=dt.get(this)?.session;e?.id===t.pointerId&&e.captured&&_n(e,t,"lost-capture")}function xu(t){t.cancelable&&t.preventDefault()}function yu(t,e){if(!t.pan)return;let n=t.samples.at(-1);for((!n||n.x!==e.clientX||n.y!==e.clientY)&&(t.lastMoveTime=e.timeStamp),t.samples.push(xo(e));t.samples.length>8||t.samples.length>2&&e.timeStamp-t.samples[0].time>100;)t.samples.shift()}function wu(t,e){if(e-t.lastMoveTime>80)return{x:0,y:0};let n=t.samples.at(-1),r=t.samples.find(o=>n&&n.time-o.time<=100),a=n&&r?n.time-r.time:0;return a>0&&r&&n?{x:(r.x-n.x)/a,y:(r.y-n.y)/a}:{x:0,y:0}}function vr(t,e,n){return{x:t.axis!=="y"&&Ss(t.directions,e,!0)?e:0,y:t.axis!=="x"&&Ss(t.directions,n,!1)?n:0}}function ku(t,e,n=!1){let r=t.state,a=e.clientX-t.start.pointerEvent.clientX,o=e.clientY-t.start.pointerEvent.clientY,i=Math.hypot(a,o),s=t.pointer&&!t.pointerStarted&&!!r.pointer&&i>=r.pointer.threshold,l=r.pan?.axis==="x"?Math.abs(a):r.pan?.axis==="y"?Math.abs(o):i,c=t.pan&&!t.panStarted&&!!r.pan&&l>=r.pan.threshold;if(s||c||t.captured){if(!t.captured){try{r.surface.setPointerCapture(t.id)}catch{_n(t,e,"lost-capture");return}t.captured=!0}xu(e)}if(t.current=Os(e),n&&(t.start.pointerEvent=t.current),n||yu(t,e),!(s&&(t.pointerStarted=!0,Ts(t,"start",t.start.pointerEvent),r.session!==t))&&!(c&&(t.panStarted=!0,pn(t,"start",t.start.pointerEvent),r.session!==t))&&!n&&!(t.pointerStarted&&(Ts(t,"move",t.current),r.session!==t))&&t.panStarted&&r.pan){let d=vr(r.pan,t.panLast.x-e.clientX,t.panLast.y-e.clientY),u=wu(t,e.timeStamp),p=vr(r.pan,u.x,u.y);t.panLast=xo(e),pn(t,"move",t.current,{deltaX:d.x,deltaY:d.y,velocityX:p.x,velocityY:p.y})}}function Ts(t,e,n,r){let a=n??t.current,o=t.start.pointerEvent,i=e==="start",s=i?0:a.clientX-t.pointerLast.x,l=i?0:a.clientY-t.pointerLast.y;t.pointerLast=xo(a),zs(t.state,"pointerinput",{phase:e,pointerEvent:n?{...n}:null,start:Eu(t),...ua(t.state.surface,a.clientX,a.clientY),deltaX:s,deltaY:l,movementX:a.clientX-o.clientX,movementY:a.clientY-o.clientY,activationReason:t.pointerReason,...r?{cancelReason:r}:{}})}function pn(t,e,n,r){let a=n??t.current;zs(t.state,"paninput",{phase:e,pointerEvent:n?{...n}:null,start:Eu(t),...ua(t.state.surface,a.clientX,a.clientY),deltaX:0,deltaY:0,velocityX:0,velocityY:0,activationReason:t.panReason,...r})}function Eu(t){return{...t.start,pointerEvent:{...t.start.pointerEvent}}}function _n(t,e,n){let r=t.state;if(r.session!==t||(r.session=void 0,r.store.sessions.delete(t.id),gu(r.store),e&&(t.captured&&!n&&xu(e),yu(t,e),t.current=Os(e)),r.surface.hasPointerCapture(t.id)&&r.surface.releasePointerCapture(t.id),t.captured&&(r.suppressClickUntil=r.store.view.performance.now()+400),t.pointerStarted&&Ts(t,n?"cancel":"end",e?t.current:null,n),!t.panStarted))return;if(n||dt.get(r.surface)!==r||!r.pan){pn(t,"cancel",e?t.current:null,{cancelReason:n??"disabled"});return}let a=vr(r.pan,t.panLast.x-t.current.clientX,t.panLast.y-t.current.clientY),o=wu(t,t.current.timeStamp),i=vr(r.pan,o.x,o.y);pn(t,"release",t.current,{deltaX:a.x,deltaY:a.y,velocityX:i.x,velocityY:i.y});let s=r.pan;if(dt.get(r.surface)!==r||!s||r.session){pn(t,"cancel",null,{cancelReason:"disabled"});return}if(s.inertia&&(Math.abs(i.x)>=s.minVelocity||Math.abs(i.y)>=s.minVelocity)){let l={state:r,session:t,vx:i.x,vy:i.y,time:r.store.view.performance.now()};r.momentum=l,r.store.momenta.add(l),Cu(r.store)}else pn(t,"end",t.current)}function Cu(t){t.frame!==void 0||!t.momenta.size||(t.animate??=e=>Lg(t,e),t.frame=t.view.requestAnimationFrame(t.animate))}function Lg(t,e){t.frame=void 0;for(let n of Array.from(t.momenta)){let r=n.state.pan;if(!r?.inertia||!n.state.surface.isConnected){Rn(n,"disabled");continue}let a=Math.min(50,Math.max(0,e-n.time));n.time=e;let o=Math.exp(-a/r.tau),i=vr(r,n.vx*r.tau*(1-o),n.vy*r.tau*(1-o)),s=vr(r,n.vx*o,n.vy*o);n.vx=s.x,n.vy=s.y,(i.x||i.y)&&pn(n.session,"inertia",null,{deltaX:i.x,deltaY:i.y,velocityX:s.x,velocityY:s.y}),t.momenta.has(n)&&Math.abs(s.x)<r.minVelocity&&Math.abs(s.y)<r.minVelocity&&Rn(n)}Cu(t)}function Rn(t,e){let n=t.state;n.momentum===t&&(n.momentum=void 0,n.store.momenta.delete(t),!n.store.momenta.size&&n.store.frame!==void 0&&(n.store.view.cancelAnimationFrame(n.store.frame),n.store.frame=void 0),pn(t.session,e?"cancel":"end",null,e?{cancelReason:e}:void 0))}function Su(t){let e=dt.get(this);!e?.suppressClickUntil||t.detail===0||e.store.view.performance.now()>e.suppressClickUntil||(e.suppressClickUntil=void 0,t.preventDefault(),t.stopPropagation())}function Au(t){dt.get(this)?.session&&t.preventDefault()}function Tu(t){t.dwell.clear();for(let e of Array.from(t.sessions.values()))_n(e,null,"blur");for(let e of Array.from(t.momenta))Rn(e,"blur")}function Mu(){let t=ut.get(this.document);t&&Tu(t)}function Iu(){let t=ut.get(this);t&&this.hidden&&Tu(t)}var yo=class extends z{static observedAttributes=cu;connectedCallback(){Is(this)}disconnectedCallback(){Ds(this)}attributeChangedCallback(e){Is(this,e)}};function Du(){typeof customElements>"u"||customElements.get("a-capture")||customElements.define("a-capture",yo)}Du();var zu=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Bs=zu.join(","),Bu=typeof Element>"u",xr=Bu?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wo=!Bu&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},ko=function(e,n){var r;n===void 0&&(n=!0);var a=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),o=a===""||a==="true",i=o||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ko(e.parentNode));return i},Ng=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},Rg=function(e,n,r){if(ko(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(Bs));return n&&xr.call(e,Bs)&&a.unshift(e),a=a.filter(r),a},Ls=function(e,n,r){for(var a=[],o=Array.from(e);o.length;){var i=o.shift();if(!ko(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),l=s.length?s:i.children,c=Ls(l,!0,r);r.flatten?a.push.apply(a,c):a.push({scopeParent:i,candidates:c})}else{var d=xr.call(i,Bs);d&&r.filter(i)&&(n||!e.includes(i))&&a.push(i);var u=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),p=!ko(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(u&&p){var m=Ls(u===!0?i.children:u.children,!0,r);r.flatten?a.push.apply(a,m):a.push({scopeParent:i,candidates:m})}else o.unshift.apply(o,i.children)}}return a},Lu=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Nu=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ng(e))&&!Lu(e)?0:e.tabIndex},_g=function(e,n){var r=Nu(e);return r<0&&n&&!Lu(e)?0:r},Fg=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Ru=function(e){return e.tagName==="INPUT"},Hg=function(e){return Ru(e)&&e.type==="hidden"},Vg=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},qg=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},jg=function(e){if(!e.name)return!0;var n=e.form||wo(e),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=r(window.CSS.escape(e.name));else try{a=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=qg(a,e.form);return!o||o===e},Zg=function(e){return Ru(e)&&e.type==="radio"},Wg=function(e){return Zg(e)&&!jg(e)},Yg=function(e){var n,r=e&&wo(e),a=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==e){var i,s,l;for(o=!!((i=a)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(a)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&a;){var c,d,u;r=wo(a),a=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=a)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(a))}}return o},Pu=function(e){var n=e.getBoundingClientRect(),r=n.width,a=n.height;return r===0&&a===0},Ug=function(e,n){var r=n.displayCheck,a=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var o=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}var i=getComputedStyle(e),s=i.visibility;if(s==="hidden"||s==="collapse")return!0;var l=xr.call(e,"details>summary:first-of-type"),c=l?e.parentElement:e;if(xr.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof a=="function"){for(var d=e;e;){var u=e.parentElement,p=wo(e);if(u&&!u.shadowRoot&&a(u)===!0)return Pu(e);e.assignedSlot?e=e.assignedSlot:!u&&p!==e.ownerDocument?e=p.host:e=u}e=d}if(Yg(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Pu(e);return!1},$g=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var a=n.children.item(r);if(a.tagName==="LEGEND")return xr.call(n,"fieldset[disabled] *")?!0:!a.contains(e)}return!0}n=n.parentElement}return!1},_u=function(e,n){return!(n.disabled||Hg(n)||Ug(n,e)||Vg(n)||$g(n))},Ou=function(e,n){return!(Wg(n)||Nu(n)<0||!_u(e,n))},Gg=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Fu=function(e){var n=[],r=[];return e.forEach(function(a,o){var i=!!a.scopeParent,s=i?a.scopeParent:a,l=_g(s,i),c=i?Fu(a.candidates):s;l===0?i?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:a,isScope:i,content:c})}),r.sort(Fg).reduce(function(a,o){return o.isScope?a.push.apply(a,o.content):a.push(o.content),a},[]).concat(n)},Hu=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Ls([e],n.includeContainer,{filter:Ou.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Gg}):r=Rg(e,n.includeContainer,Ou.bind(null,n)),Fu(r)};var Kg=zu.concat("iframe:not([inert]):not([inert] *)").join(","),Vu=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return xr.call(e,Kg)===!1?!1:_u(n,e)};var qu={getShadowRoot:!0};function Kt(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}function Ns(t){if(t.nodeType===1&&t.assignedSlot)return t.assignedSlot;let e=t.parentNode;return e?.nodeType===11&&"host"in e?e.host:e}function ha(t,e){for(;e;){if(e===t)return!0;e=Ns(e)}return!1}function pa(t){return!!t&&"focus"in t&&Vu(t,qu)}function ma(t){return Hu(t,qu)}function Eo(t,e,n,r){let a=t.indexOf(e),o=a<0?n?t.length-1:0:(a+(n?-1:1)+t.length)%t.length,i=t[o]??r;return i?(i.focus(),!0):!1}var ju=new WeakMap,Co=class{#e;#t;#n;#a=null;#r=null;#o=!1;#c=!1;constructor(e){this.#n=e,this.#t=e.ownerDocument,this.#e=ju.get(this.#t)??[],ju.set(this.#t,this.#e)}get#m(){return this.#e.at(-1)===this&&this.#n.matches(":popover-open")}activate(e){this.#o||(this.#o=!0,this.#a=e,this.#r=ha(this.#n,e)?e:null,this.#e.push(this),this.#t.addEventListener("focusin",this.#h,!0),this.#t.addEventListener("keydown",this.#p))}focusInside(e=this.#r){if(!this.#m)return;(ha(this.#n,e)&&pa(e)?e:ma(this.#n)[0]??this.#n).focus({preventScroll:!0})}deactivate(){if(!this.#o)return()=>{};let e=Kt(this.#t),n=this.#e.at(-1)===this&&ha(this.#n,e),r=this.#a,a=r&&!ha(this.#n,r)?r:e;this.#o=!1;let o=this.#e.indexOf(this);return o>=0&&this.#e.splice(o,1),this.#t.removeEventListener("focusin",this.#h,!0),this.#t.removeEventListener("keydown",this.#p),this.#a=this.#r=null,()=>{n&&(pa(a)?a.focus({preventScroll:!0}):pa(e)?e.focus({preventScroll:!0}):pa(r)?r.focus({preventScroll:!0}):this.#e.at(-1)?.focusInside())}}#s(e){for(let n of e){if(n===this.#n)return!1;if(n instanceof Element&&n.matches(":modal"))return!0}return!1}#h=e=>{if(!this.#m||this.#c)return;let n=e.composedPath();if(!this.#s(n)){if(n.includes(this.#n)){this.#r=Kt(this.#t);return}this.#c=!0,this.focusInside(),this.#c=!1}};#p=e=>{!this.#m||e.defaultPrevented||e.key!=="Tab"||e.altKey||e.ctrlKey||e.metaKey||this.#s(e.composedPath())||(e.preventDefault(),Eo(ma(this.#n),Kt(this.#t),e.shiftKey,this.#n))}};var Xg=`
|
|
175
|
+
`,yo=class extends B{static observedAttributes=["expandable","truncate","collapsible"];slotEl;expandBtn;expanded=!1;overflowObserver;contentObserver;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Xg,this.slotEl=document.createElement("slot"),e.append(n,this.slotEl)}connectedCallback(){this.syncExpandButton(),this.#e&&this.startOverflowObserver()}disconnectedCallback(){this.overflowObserver?.disconnect(),this.contentObserver?.disconnect()}attributeChangedCallback(e,n,r){n!==r&&((e==="truncate"||e==="expandable")&&this.setExpanded(!1),this.syncExpandButton(),(e==="truncate"||e==="expandable")&&(this.#e?this.startOverflowObserver():this.stopOverflowObserver()))}get#e(){return this.hasAttribute("truncate")&&this.hasAttribute("expandable")}get#t(){return this.hasAttribute("collapsible")}get isTruncated(){if(!this.hasAttribute("truncate")||this.expanded)return!1;let e=this.slotEl;return e.clientWidth===0&&e.clientHeight===0?!1:e.scrollHeight>e.clientHeight+1||e.scrollWidth>e.clientWidth+1}syncExpandButton(){if(this.#e&&!this.expandBtn){let e=document.createElement("button");e.className="expand-btn",e.type="button",e.addEventListener("click",this.handleToggle),this.shadowRoot.append(e),this.expandBtn=e}else!this.#e&&this.expandBtn&&(this.expandBtn.remove(),this.expandBtn=void 0);this.refreshButton()}handleToggle=()=>{this.setExpanded(!this.expanded)};setExpanded(e){e!==this.expanded&&(this.expanded=e,this.slotEl.classList.toggle("expanded",e),this.refreshButton(),e||this.measureOverflow())}startOverflowObserver(){this.#e&&(this.overflowObserver??=new ResizeObserver(()=>this.measureOverflow()),this.contentObserver??=new MutationObserver(()=>this.measureOverflow()),this.overflowObserver.observe(this.slotEl),this.contentObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}),this.measureOverflow())}stopOverflowObserver(){this.overflowObserver?.disconnect(),this.contentObserver?.disconnect(),this.slotEl.classList.remove("overflowing")}measureOverflow(){!this.#e||this.expanded||this.slotEl.classList.toggle("overflowing",this.isTruncated)}refreshButton(){let e=this.expandBtn;if(e){if(this.expanded&&!this.#t){e.remove(),this.expandBtn=void 0;return}e.setAttribute("aria-expanded",this.expanded?"true":"false"),e.setAttribute("aria-label",this.expanded?"Show less":"Show more"),e.classList.toggle("expanded",this.expanded)}}};function tu(){typeof customElements>"u"||customElements.get("a-text")||customElements.define("a-text",yo)}tu();function la(t,e,{signal:n,edges:r}={}){let a,o=null,i=r!=null&&r.includes("leading"),s=r==null||r.includes("trailing"),l=()=>{o!==null&&(t.apply(a,o),a=void 0,o=null)},c=()=>{s&&l(),p()},d=null,u=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,c()},e)},m=()=>{d!==null&&(clearTimeout(d),d=null)},p=()=>{m(),a=void 0,o=null},b=()=>{l()},f=function(...g){if(n?.aborted)return;a=this,o=g;let v=d==null;u(),i&&v&&l()};return f.schedule=u,f.cancel=p,f.flush=b,n?.addEventListener("abort",p,{once:!0}),f}function Os(t,e,{signal:n,edges:r=["leading","trailing"]}={}){let a=null,o=la(function(...s){a=Date.now(),t.apply(this,s)},e,{signal:n,edges:r}),i=function(...s){if(a==null&&(a=Date.now()),Date.now()-a>=e){a=Date.now(),t.apply(this,s),o.cancel(),o.schedule();return}o.apply(this,s)};return i.cancel=o.cancel,i.flush=o.flush,i}var ca={width:["width"],height:["height"],size:["width","height"],overflow:["clientWidth","clientHeight","scrollWidth","scrollHeight","overflowX","overflowY","clippedX","clippedY","scrollableX","scrollableY"],edges:["hiddenStartX","hiddenEndX","hiddenStartY","hiddenEndY"],scroll:["scrollLeft","scrollTop"]},Jg=new Set(Object.values(ca).flat());function wo(t){let e=new Set,n=!1,r=t===""?["all"]:t?.trim().split(/\s+/)??[];for(let i of r)if(i==="all"){for(let s of Jg)e.add(s);n=!0}else if(i==="context")n=!0;else if(Object.hasOwn(ca,i))for(let s of ca[i])e.add(s);let a=[...e].some(i=>i!=="width"&&i!=="height"),o=[...ca.scroll,...ca.edges].some(i=>e.has(i));return{fields:e,context:n,content:a,scroll:o}}var ko=new WeakMap,Qg=/(?:^|\s)(?:dark|light)(?:\s|$)/;function ev(t){return t.classList.contains("dark")||t.classList.contains("light")}var Ps=class{constructor(e,n){this.view=e;this.doc=n;this.#n=e.matchMedia("(prefers-color-scheme: dark)"),this.#a=e.matchMedia("(pointer: fine)"),this.#r=e.matchMedia("(pointer: coarse)"),this.#o=e.matchMedia("(hover: hover)"),this.#c=e.matchMedia("(prefers-reduced-motion: reduce)"),this.#m=[this.#n,this.#a,this.#r,this.#o,this.#c],this.#u=av(e.navigator)}view;doc;#e=new Set;#t=new Set;#n;#a;#r;#o;#c;#m;#s;#h;#p;#g=0;#u;subscribeContext(e){this.#e.size===0&&this.#d(),this.#e.add(e)}unsubscribeContext(e){this.#e.delete(e)&&(this.#e.size===0&&this.#v(),this.#l())}observeVisibility(e){if(!this.#t.has(e)){if(typeof this.view.IntersectionObserver>"u"){e.visibilityDidChange(!0);return}this.#h??=new this.view.IntersectionObserver(n=>{for(let r of n){let a=r.target;this.#t.has(a)&&a.visibilityDidChange(r.isIntersecting)}},{root:null,rootMargin:"0px",threshold:0}),this.#t.add(e),this.#h.observe(e)}}unobserveVisibility(e){this.#t.delete(e)&&(this.#h?.unobserve(e),this.#t.size===0&&(this.#h?.disconnect(),this.#h=void 0),this.#l())}snapshot(){return{globalMode:iu(this.doc.documentElement),systemAppearance:this.#n.matches?"dark":"light",...this.#u,pointer:this.#a.matches?"fine":this.#r.matches?"coarse":"none",hover:this.#o.matches,reducedMotion:this.#c.matches,devicePixelRatio:this.view.devicePixelRatio}}#f(){this.#p?.removeEventListener("change",this.#i),this.#p=this.view.matchMedia(`(resolution: ${this.view.devicePixelRatio}dppx)`),this.#p.addEventListener("change",this.#i,{once:!0}),this.#g=this.view.devicePixelRatio}#i=()=>{this.view.devicePixelRatio!==this.#g&&(this.#f(),this.#x())};#d(){for(let n of this.#m)n.addEventListener("change",this.#x);this.#f(),this.view.addEventListener("resize",this.#i,{passive:!0});let e=this.doc.documentElement;e&&(this.#s=new this.view.MutationObserver(this.#k),this.#s.observe(e,{subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}))}#v(){for(let e of this.#m)e.removeEventListener("change",this.#x);this.#p?.removeEventListener("change",this.#i),this.#p=void 0,this.view.removeEventListener("resize",this.#i),this.#s?.disconnect(),this.#s=void 0}#l(){this.#e.size>0||this.#t.size>0||ko.get(this.view)===this&&ko.delete(this.view)}#k=e=>{let n=new Set;for(let r of e){let a=r.target;if(a instanceof this.view.Element&&!(!ev(a)&&!Qg.test(r.oldValue??"")))for(let o of this.#e)(a===o||a.contains(o))&&n.add(o)}for(let r of n)r.contextStoreDidChange()};#x=()=>{for(let e of this.#e)e.contextStoreDidChange()}};function nu(t,e){let n=ko.get(t);return n||(n=new Ps(t,e),ko.set(t,n)),n}function iu(t){return t?.classList.contains("dark")?"dark":"light"}function tv(t){for(let e=t;e;e=e.parentElement){if(e.classList.contains("dark"))return"dark";if(e.classList.contains("light"))return"light"}return iu(t.ownerDocument.documentElement)}var nv={edge:/edg[ea]?\/(\d+)/,opera:/opr\/(\d+)/,firefox:/(?:firefox|fxios)\/(\d+)/,chrome:/(?:chrome|crios)\/(\d+)/,safari:/version\/(\d+)/,unknown:/(?!)/},rv={windows:/windows nt ([\d.]+)/,macos:/mac os x (\d+[._]\d+(?:[._]\d+)?)/,ios:/os (\d+[._]\d+(?:[._]\d+)?)/,android:/android (\d+(?:\.\d+)*)/};function av(t){let e=t,n=(t.userAgent??"").toLowerCase(),r=`${e.userAgentData?.platform??""} ${t.platform??""} ${n}`.toLowerCase(),a=/android/.test(r)?"android":/iphone|ipad|ipod|ios/.test(r)?"ios":/mac/.test(r)?"macos":/win/.test(r)?"windows":/linux/.test(r)?"linux":"unknown",o=/edg[ea]?\//.test(n)?"edge":/opr\/|opera/.test(n)?"opera":/firefox\/|fxios\//.test(n)?"firefox":/chrome\/|crios\//.test(n)?"chrome":/safari\//.test(n)?"safari":"unknown",s=(e.userAgentData?.brands??[]).filter(l=>!/not.a.brand/i.test(l.brand)).sort((l,c)=>Number(/chromium/i.test(l.brand))-Number(/chromium/i.test(c.brand)))[0];return{os:a,osVersion:parseInt(n.match(rv[a]??/(?!)/)?.[1]??"",10)||0,browser:o,browserVersion:Number(s?.version??n.match(nv[o])?.[1])||0,mobile:e.userAgentData?.mobile??/android|mobi|iphone|ipad|ipod/.test(r)}}function su(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t===null||e===null)return!1;let n=t,r=e,a=Object.keys(n);return a.length===Object.keys(r).length&&a.every(o=>n[o]===r[o])}function ov(t,e){return t!==void 0&&Object.keys(e).every(n=>su(t[n],e[n]))}function ru(t,e){return t?Object.fromEntries(Object.entries(e).filter(([n,r])=>!su(t[n],r))):{...e}}function gn(t){return parseFloat(t)||0}function iv(t){return{paddingTop:gn(t.paddingTop),paddingRight:gn(t.paddingRight),paddingBottom:gn(t.paddingBottom),paddingLeft:gn(t.paddingLeft),borderTop:gn(t.borderTopWidth),borderRight:gn(t.borderRightWidth),borderBottom:gn(t.borderBottomWidth),borderLeft:gn(t.borderLeftWidth)}}function au(t){return t==="normal"?"0px":t}function sv(t){let e=parseFloat(t.lineHeight),n=Number.isFinite(e)?e:null,r=t.fontStyle&&t.fontStyle!=="normal"?`${t.fontStyle} `:"",a=t.fontWeight&&t.fontWeight!=="400"?`${t.fontWeight} `:"",o=n!=null?`/${n}px`:"";return{shorthand:`${r}${a}${t.fontSize}${o} ${t.fontFamily}`,family:t.fontFamily,size:parseFloat(t.fontSize)||0,weight:parseFloat(t.fontWeight)||400,style:t.fontStyle,stretch:t.fontStretch,lineHeight:n,letterSpacing:au(t.letterSpacing),wordSpacing:au(t.wordSpacing),color:t.color,featureSettings:t.fontFeatureSettings,variationSettings:t.fontVariationSettings,kerning:t.fontKerning,variantCaps:t.fontVariantCaps,textRendering:t.textRendering,direction:t.direction}}function ou(t){return Math.round(t*100)/100}var Eo=class extends B{static observedAttributes=["fade","observe","throttle"];#e=this.attachInternals?.();#t;#n;#a;#r;#o;#c=!1;#m;#s=new Set;#h=!1;#p=!1;#g;#u;#f;#i=!1;#d=!1;#v=new Set;#l=!1;#k;#x=!1;#E=!1;connectedCallback(){this.#t=nu(this.view,this.doc),this.#b()}disconnectedCallback(){this.#A(),this.#N(),this.#t?.unobserveVisibility(this),this.#t=void 0,this.#k=void 0}attributeChangedCallback(e,n,r){n!==r&&this.#t&&((e==="fade"||e==="observe")&&this.#b(),e==="throttle"&&this.#R(),(e==="observe"||e==="throttle")&&this.#y())}get measurement(){return this.#B()}get context(){return this.#_()}get isTruncated(){let e=this.#B();return e.clippedX||e.clippedY}contextStoreDidChange(){this.#P(),this.#y()}visibilityDidChange(e){this.#k!==e&&(this.#k=e,this.#b())}#b(){let{fields:e,context:n,content:r,scroll:a}=wo(this.getAttribute("observe"));(e.size!==this.#s.size||[...e].some(s=>!this.#s.has(s)))&&(this.#x=!0,this.#R()),this.#s=e,this.#h=this.hasAttribute("fade")||r,this.#p=this.hasAttribute("fade")||a;let o=this.hasAttribute("fade")||e.size>0;this.isConnected&&o&&(this.#k??this.hasAttribute("fade"))?this.#I():this.#A(),this.#i&&this.#T(),this.isConnected&&o?this.#t?.observeVisibility(this):this.#t?.unobserveVisibility(this),this.isConnected&&n?this.#M():this.#N(),this.#C()}#C(){let e=this.#i||this.#l;e!==!!this.#r&&(e?(this.#r=new this.view.MutationObserver(this.#S),this.#r.observe(this,{attributes:!0})):(this.#r?.disconnect(),this.#r=void 0))}#S=()=>{this.#y(),this.#P()};#I(){this.#i||(this.#i=!0,this.#R(),this.#n=new this.view.ResizeObserver(this.#y),this.#n.observe(this),this.doc.fonts?.addEventListener("loadingdone",this.#y),this.#m=this.#B(),this.#q(this.#m),this.#w(),this.#x=!0,this.#y())}#T(){this.#h&&!this.#a?(this.#a=new this.view.MutationObserver(this.#y),this.#a.observe(this,{subtree:!0,childList:!0,characterData:!0}),this.addEventListener("input",this.#y),this.addEventListener("load",this.#y,!0)):!this.#h&&this.#a&&(this.#a.disconnect(),this.#a=void 0,this.removeEventListener("input",this.#y),this.removeEventListener("load",this.#y,!0)),this.#p?this.addEventListener("scroll",this.#y,{passive:!0}):this.removeEventListener("scroll",this.#y),this.#w()}#w(){if(!this.#h||!this.#d||!this.#i){for(let n of this.#v)this.#n?.unobserve(n);this.#v.clear();return}let e=new Set(this.children);for(let n of this.#v)e.has(n)||(this.#n?.unobserve(n),this.#v.delete(n));for(let n of e)this.#v.has(n)||(this.#n?.observe(n),this.#v.add(n))}#A(){this.#i&&(this.#i=!1,this.#v.clear(),this.#n?.disconnect(),this.#n=void 0,this.#a?.disconnect(),this.#a=void 0,this.#o!=null&&this.view.cancelAnimationFrame(this.#o),this.#o=void 0,this.#u?.cancel(),this.#u=void 0,this.removeEventListener("input",this.#y),this.removeEventListener("scroll",this.#y),this.removeEventListener("load",this.#y,!0),this.doc.fonts?.removeEventListener("loadingdone",this.#y))}#M(){this.#l||(this.#l=!0,this.#t?.subscribeContext(this),this.addEventListener("focusin",this.#P),this.addEventListener("focusout",this.#L),this.doc.fonts?.addEventListener("loadingdone",this.#P),this.#E=!0,this.#P())}#N(){this.#l&&(this.#l=!1,this.#t?.unsubscribeContext(this),this.removeEventListener("focusin",this.#P),this.removeEventListener("focusout",this.#L),this.doc.fonts?.removeEventListener("loadingdone",this.#P))}#L=e=>{let n=e.relatedTarget;n instanceof this.view.Node&&this.contains(n)||this.#P()};#y=()=>{!this.#i||this.#o!=null||(this.#o=this.view.requestAnimationFrame(()=>{this.#o=void 0,this.#i&&this.#F()}))};#P=()=>{!this.#l||this.#c||(this.#c=!0,queueMicrotask(()=>{if(this.#c=!1,!this.#l)return;let e=this.#E;this.#E=!1,this.#W(e)}))};#B(){let e=this.getBoundingClientRect(),n=this.clientWidth,r=this.clientHeight,a=this.scrollWidth,o=this.scrollHeight,i=n>0||r>0,s=i&&a>n+1,l=i&&o>r+1,c=this.view.getComputedStyle(this);this.#d=c.overflowX!=="visible"||c.overflowY!=="visible";let d=s&&c.overflowX!=="visible",u=l&&c.overflowY!=="visible",m=s&&(c.overflowX==="auto"||c.overflowX==="scroll"),p=l&&(c.overflowY==="auto"||c.overflowY==="scroll"),b=Math.round(this.scrollLeft),f=Math.round(this.scrollTop),g=Math.max(0,c.direction==="rtl"?-b:b),v=Math.max(0,f);return{width:ou(e.width),height:ou(e.height),clientWidth:n,clientHeight:r,scrollWidth:a,scrollHeight:o,overflowX:s,overflowY:l,clippedX:d,clippedY:u,scrollableX:m,scrollableY:p,scrollLeft:b,scrollTop:f,hiddenStartX:d&&g>1,hiddenEndX:d&&g<a-n-1,hiddenStartY:u&&v>1,hiddenEndY:u&&v<o-r-1}}#_(){let e=(this.#t??nu(this.view,this.doc)).snapshot(),n=this.view.getComputedStyle(this);return{...e,mode:tv(this),focusWithin:this.matches(":focus-within"),font:sv(n),inset:iv(n),backgroundColor:n.backgroundColor}}#R(){this.#u?.cancel(),this.#u=void 0;let e=Number(this.getAttribute("throttle"));this.#i&&Number.isFinite(e)&&e>0&&(this.#u=Os(this.#V,Math.min(e,2147483647)))}#z(e){if(this.#s.size===0)return!1;let n=this.#g;if(!n||this.#x)return!0;for(let r of this.#s)if(n[r]!==e[r])return!0;return!1}#F(){let e=this.#B();this.#m=e,this.#q(e),this.#w(),this.#z(e)&&(this.#u?this.#u():this.#V())}#V=()=>{let e=this.#m;if(!this.#i||!e||!this.#z(e))return;let n=this.#x,r=this.#g;this.#x=!1,this.#g=e;let a={changed:n?{...e}:ru(r,e),current:e};this.dispatchEvent(new this.view.CustomEvent("measurechange",{detail:a}))};#W(e){let n=this.#_(),r=this.#f;if(this.#f=n,!e&&ov(r,n))return;let a={changed:e?{...n}:ru(r,n),current:n};this.dispatchEvent(new this.view.CustomEvent("contextchange",{detail:a}))}#q(e){this.#D("overflow-x",e.overflowX),this.#D("overflow-y",e.overflowY),this.#D("clipped-x",e.clippedX),this.#D("clipped-y",e.clippedY),this.#D("scrollable-x",e.scrollableX),this.#D("scrollable-y",e.scrollableY),this.#D("hidden-start-x",e.hiddenStartX),this.#D("hidden-end-x",e.hiddenEndX),this.#D("hidden-start-y",e.hiddenStartY),this.#D("hidden-end-y",e.hiddenEndY)}#D(e,n){n?this.#e?.states?.add(e):this.#e?.states?.delete(e)}};function lu(){typeof customElements>"u"||customElements.get("a-box")||customElements.define("a-box",Eo)}lu();var bu=["wheel-capture","wheel-activation","wheel-modifier","wheel-delay","wheel-tolerance","wheel-reset-on-move","pointer-capture","pointer-buttons","pointer-threshold","pointer-modifier","pointer-include-interactive","pan","pan-pointer-types","pan-threshold","pan-directions","pan-inertia","pan-time-constant","pan-min-velocity"],ut=new WeakMap,ht=new WeakMap,gu={up:1,down:2,left:4,right:8},Ns={mouse:1,pen:2,touch:4},lv='textarea, select, input[type="number"], input[type="range"], a-menu',cu=['input, textarea, select, button, summary, a[href], [contenteditable]:not([contenteditable="false"])',...["button","checkbox","combobox","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","scrollbar","searchbox","slider","spinbutton","switch","tab","textbox","treeitem"].map(t=>`[role~="${t}"]`),"a-input, a-button, a-slider, a-checkbox, a-switch, a-radio, a-menu, a-menu-item, a-tab"].join(", ");function Co(t,e,n){return t===null||t===""?n:t==="all"?Object.values(e).reduce((r,a)=>r|a,0):t.trim().split(/\s+/).reduce((r,a)=>r|(e[a]??0),0)}function gr(t,e,n,r=0){return Math.max(r,St(t.getAttribute(e)?.trim()??null,n))}function vu(t,e,n){let r=t.getAttribute(e);return r==="any"||r==="none"||r==="alt"||r==="ctrl"||r==="meta"||r==="shift"?r:n}function cv(t){if(!t.hasAttribute("wheel-capture"))return;let e=Co(t.getAttribute("wheel-capture"),gu,15),n=t.getAttribute("wheel-activation");return{directions:e,activation:n==="hover"||n==="focus"||n==="settled-or-focus"?n:"settled",modifier:vu(t,"wheel-modifier","none"),delay:gr(t,"wheel-delay",150),tolerance:gr(t,"wheel-tolerance",5),resetOnMove:t.hasAttribute("wheel-reset-on-move")}}function dv(t){if(!t.hasAttribute("pointer-capture"))return;let e=Co(t.getAttribute("pointer-capture"),Ns,7);if(!e)return;let n=t.getAttribute("pointer-buttons"),r=n===null?1:n.split(/\s+/).reduce((a,o)=>{let i=Number(o);return Number.isInteger(i)&&i>=0&&i<=5?a|1<<i:a},0);if(r)return{types:e,buttons:r,threshold:gr(t,"pointer-threshold",0),modifier:vu(t,"pointer-modifier","any"),interactive:t.hasAttribute("pointer-include-interactive")}}function uv(t){if(!t.hasAttribute("pan"))return;let e=t.getAttribute("pan");if(e!==""&&e!=="both"&&e!=="x"&&e!=="y")return;let n=Co(t.getAttribute("pan-pointer-types"),Ns,4);if(n)return{types:n,axis:e||"both",threshold:gr(t,"pan-threshold",3),directions:Co(t.getAttribute("pan-directions"),gu,15),inertia:t.hasAttribute("pan-inertia"),tau:gr(t,"pan-time-constant",325,1),minVelocity:gr(t,"pan-min-velocity",.02,.001)}}function hv(t){let e=t.ownerDocument,n=ht.get(e);if(n)return n;let r=e.defaultView;return n={doc:e,view:r,states:new Set,dwell:new Map,sessions:new Map,momenta:new Set,tracking:!1,listening:!1},ht.set(e,n),r.addEventListener("blur",Lu),e.addEventListener("visibilitychange",Ru),n}function _s(t,e){if(!t.isConnected||!t.ownerDocument.defaultView)return;let n=ut.get(t);if(!n&&!t.hasAttribute("wheel-capture")&&!t.hasAttribute("pointer-capture")&&!t.hasAttribute("pan"))return;let r=cv(t),a=dv(t),o=uv(t);if(!r&&!a&&!o){Fs(t,"disabled");return}n||(n={surface:t,store:hv(t)},ut.set(t,n),n.store.states.add(n));let i=!!n.wheel,s=!!(n.pointer||n.pan);n.wheel=r,n.pointer=a,n.pan=o,i!==!!r&&(r?t.addEventListener("wheel",Ls,{passive:!1}):t.removeEventListener("wheel",Ls)),s!==!!(a||o)&&(a||o?(t.addEventListener("pointerdown",Eu),t.addEventListener("lostpointercapture",Su),t.addEventListener("click",Pu,!0),t.addEventListener("dragstart",zu)):xu(t)),(!r||e?.startsWith("wheel-")&&e!=="wheel-capture")&&n.store.dwell.delete(t),n.session&&e&&(e.startsWith("pointer-")||e==="pan"||e==="pan-pointer-types"||e==="pan-threshold")&&qn(n.session,null,"disabled"),n.momentum&&(!o?.inertia||!o.directions)&&Vn(n.momentum,"disabled"),yu(n.store)}function Fs(t,e="disconnected"){let n=ut.get(t);if(!n)return;ut.delete(t),n.wheel=void 0,n.pointer=void 0,n.pan=void 0,t.removeEventListener("wheel",Ls),xu(t),n.session&&qn(n.session,null,e),n.momentum&&Vn(n.momentum,e);let r=n.store;r.dwell.delete(t),r.states.delete(n),yu(r),!r.states.size&&(r.view.removeEventListener("blur",Lu),r.doc.removeEventListener("visibilitychange",Ru),ht.get(r.doc)===r&&ht.delete(r.doc))}function xu(t){t.removeEventListener("pointerdown",Eu),t.removeEventListener("lostpointercapture",Su),t.removeEventListener("click",Pu,!0),t.removeEventListener("dragstart",zu)}function Hs(t){return t?.activation==="settled"||t?.activation==="settled-or-focus"}function yu(t){let e=Array.from(t.states).some(n=>Hs(n.wheel));e!==t.tracking&&(t.tracking=e,e?(t.doc.addEventListener("pointermove",du,{passive:!0,capture:!0}),t.doc.addEventListener("pointerout",uu,{passive:!0,capture:!0}),t.doc.addEventListener("wheel",hu,{passive:!0,capture:!0})):(t.doc.removeEventListener("pointermove",du,!0),t.doc.removeEventListener("pointerout",uu,!0),t.doc.removeEventListener("wheel",hu,!0),t.dwell.clear()))}function du(t){let e=ht.get(this);if(!e||t.pointerType==="touch")return;let n=t.composedPath();for(let r of e.dwell.keys())(!n.includes(r)||t.buttons&&!da(r,t.clientX,t.clientY).inside)&&e.dwell.delete(r);for(let r of n){let a=ut.get(r),o=a?.wheel;if(!a||!o||!Hs(o))continue;let i=e.dwell.get(a.surface);if(!i){if(t.buttons)continue;e.dwell.set(a.surface,{x:t.clientX,y:t.clientY,time:t.timeStamp});continue}t.clientX===i.x&&t.clientY===i.y||t.timeStamp-i.time>=o.delay&&!o.resetOnMove||(Math.abs(t.clientX-i.x)>o.tolerance||Math.abs(t.clientY-i.y)>o.tolerance)&&(i={x:t.clientX,y:t.clientY,time:t.timeStamp},e.dwell.set(a.surface,i))}}function uu(t){t.pointerType!=="touch"&&t.relatedTarget===null&&ht.get(this)?.dwell.clear()}function hu(t){let e=ht.get(this);if(!e)return;let n=t.composedPath();for(let r of e.dwell.keys())n.includes(r)||e.dwell.delete(r)}function wu(t,e){return e==="any"?!0:e==="none"?!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey:t[`${e}Key`]}function zs(t,e,n){let r=t.ownerDocument.defaultView;for(let a of e.composedPath()){if(a===t)break;if(a instanceof r.Element&&(a.hasAttribute("data-capture-ignore")||n&&a.matches(n)))return!0}return t.hasAttribute("data-capture-ignore")}function Bs(t,e,n){return e!==0&&!!(t&(n?e<0?4:8:e<0?1:2))}function da(t,e,n){let r=t.getBoundingClientRect();return{localX:e-r.left,localY:n-r.top,boxWidth:r.width,boxHeight:r.height,inside:e>=r.left&&e<=r.right&&n>=r.top&&n<=r.bottom,focusWithin:t.matches(":focus-within")}}function ku(t){return{type:t.type,timeStamp:t.timeStamp,isTrusted:t.isTrusted,cancelable:t.cancelable,defaultPrevented:t.defaultPrevented,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,offsetX:t.offsetX,offsetY:t.offsetY}}function Vs(t){return{...ku(t),pointerId:t.pointerId,pointerType:t.pointerType,isPrimary:t.isPrimary,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist}}function qs(t,e,n){t.surface.dispatchEvent(new t.store.view.CustomEvent(e,{detail:n}))}function Ls(t){let e=ut.get(this),n=e?.wheel;if(!e||!n||!n.directions||t.defaultPrevented||!t.cancelable||!wu(t,n.modifier))return;let r=t.deltaMode,a=t.deltaX,o=t.deltaY,i=Math.abs(a)>Math.abs(o);if(!Bs(n.directions,i?a:o,i))return;let s;if((n.activation==="focus"||n.activation==="settled-or-focus")&&this.matches(":focus-within"))s="focus";else if(n.activation==="hover")s="immediate";else{let d=e.store.dwell.get(this);if(!Hs(n)||!d||t.timeStamp-d.time<n.delay)return;s="settled"}if(zs(this,t,lv))return;let l=da(this,t.clientX,t.clientY);if(!l.inside||(t.preventDefault(),!t.defaultPrevented))return;t.stopPropagation();let c={...ku(t),deltaMode:r,deltaX:a,deltaY:o,deltaZ:t.deltaZ};e.momentum&&Vn(e.momentum,"interrupted"),qs(e,"wheelinput",{wheelEvent:c,...l,activationReason:s})}function So(t){return{x:t.clientX,y:t.clientY,time:t.timeStamp}}function Eu(t){let e=ut.get(this);if(!e||(e.suppressClickUntil=void 0,e.momentum&&Vn(e.momentum,"interrupted"),t.defaultPrevented||!t.isPrimary||e.session||e.store.sessions.has(t.pointerId)))return;let n=Ns[t.pointerType]??0,r=e.pointer,a=!!r&&!!(r.types&n)&&!!(r.buttons&1<<t.button)&&wu(t,r.modifier)&&!zs(this,t,r.interactive?"":cu),o=!!e.pan&&!!(e.pan.types&n)&&t.button===0&&e.pan.directions!==0&&!zs(this,t,cu);if(!a&&!o)return;let i=Vs(t),s=So(i),l={state:e,id:t.pointerId,start:{pointerEvent:i,...da(this,t.clientX,t.clientY)},current:i,pointer:a,pan:o,pointerStarted:!1,panStarted:!1,captured:!1,pointerReason:r?.threshold?"drag-threshold":"pointer-down",panReason:e.pan?.threshold?"drag-threshold":"pointer-down",pointerLast:s,panLast:s,samples:o?[s]:[],lastMoveTime:t.timeStamp};e.session=l,e.store.sessions.set(l.id,l),Cu(e.store),Iu(l,t,!0)}function Cu(t){let e=t.sessions.size>0;e!==t.listening&&(t.listening=e,e?(t.doc.addEventListener("pointermove",pu,{capture:!0,passive:!1}),t.doc.addEventListener("pointerup",mu,{capture:!0,passive:!1}),t.doc.addEventListener("pointercancel",fu,!0)):(t.doc.removeEventListener("pointermove",pu,!0),t.doc.removeEventListener("pointerup",mu,!0),t.doc.removeEventListener("pointercancel",fu,!0)))}function pu(t){let e=ht.get(this)?.sessions.get(t.pointerId);e&&Iu(e,t)}function mu(t){let e=ht.get(this)?.sessions.get(t.pointerId);e&&qn(e,t)}function fu(t){let e=ht.get(this)?.sessions.get(t.pointerId);e&&qn(e,t,"pointer-cancel")}function Su(t){let e=ut.get(this)?.session;e?.id===t.pointerId&&e.captured&&qn(e,t,"lost-capture")}function Tu(t){t.cancelable&&t.preventDefault()}function Au(t,e){if(!t.pan)return;let n=t.samples.at(-1);for((!n||n.x!==e.clientX||n.y!==e.clientY)&&(t.lastMoveTime=e.timeStamp),t.samples.push(So(e));t.samples.length>8||t.samples.length>2&&e.timeStamp-t.samples[0].time>100;)t.samples.shift()}function Mu(t,e){if(e-t.lastMoveTime>80)return{x:0,y:0};let n=t.samples.at(-1),r=t.samples.find(o=>n&&n.time-o.time<=100),a=n&&r?n.time-r.time:0;return a>0&&r&&n?{x:(r.x-n.x)/a,y:(r.y-n.y)/a}:{x:0,y:0}}function vr(t,e,n){return{x:t.axis!=="y"&&Bs(t.directions,e,!0)?e:0,y:t.axis!=="x"&&Bs(t.directions,n,!1)?n:0}}function Iu(t,e,n=!1){let r=t.state,a=e.clientX-t.start.pointerEvent.clientX,o=e.clientY-t.start.pointerEvent.clientY,i=Math.hypot(a,o),s=t.pointer&&!t.pointerStarted&&!!r.pointer&&i>=r.pointer.threshold,l=r.pan?.axis==="x"?Math.abs(a):r.pan?.axis==="y"?Math.abs(o):i,c=t.pan&&!t.panStarted&&!!r.pan&&l>=r.pan.threshold;if(s||c||t.captured){if(!t.captured){try{r.surface.setPointerCapture(t.id)}catch{qn(t,e,"lost-capture");return}t.captured=!0}Tu(e)}if(t.current=Vs(e),n&&(t.start.pointerEvent=t.current),n||Au(t,e),!(s&&(t.pointerStarted=!0,Rs(t,"start",t.start.pointerEvent),r.session!==t))&&!(c&&(t.panStarted=!0,vn(t,"start",t.start.pointerEvent),r.session!==t))&&!n&&!(t.pointerStarted&&(Rs(t,"move",t.current),r.session!==t))&&t.panStarted&&r.pan){let d=vr(r.pan,t.panLast.x-e.clientX,t.panLast.y-e.clientY),u=Mu(t,e.timeStamp),m=vr(r.pan,u.x,u.y);t.panLast=So(e),vn(t,"move",t.current,{deltaX:d.x,deltaY:d.y,velocityX:m.x,velocityY:m.y})}}function Rs(t,e,n,r){let a=n??t.current,o=t.start.pointerEvent,i=e==="start",s=i?0:a.clientX-t.pointerLast.x,l=i?0:a.clientY-t.pointerLast.y;t.pointerLast=So(a),qs(t.state,"pointerinput",{phase:e,pointerEvent:n?{...n}:null,start:Du(t),...da(t.state.surface,a.clientX,a.clientY),deltaX:s,deltaY:l,movementX:a.clientX-o.clientX,movementY:a.clientY-o.clientY,activationReason:t.pointerReason,...r?{cancelReason:r}:{}})}function vn(t,e,n,r){let a=n??t.current;qs(t.state,"paninput",{phase:e,pointerEvent:n?{...n}:null,start:Du(t),...da(t.state.surface,a.clientX,a.clientY),deltaX:0,deltaY:0,velocityX:0,velocityY:0,activationReason:t.panReason,...r})}function Du(t){return{...t.start,pointerEvent:{...t.start.pointerEvent}}}function qn(t,e,n){let r=t.state;if(r.session!==t||(r.session=void 0,r.store.sessions.delete(t.id),Cu(r.store),e&&(t.captured&&!n&&Tu(e),Au(t,e),t.current=Vs(e)),r.surface.hasPointerCapture(t.id)&&r.surface.releasePointerCapture(t.id),t.captured&&(r.suppressClickUntil=r.store.view.performance.now()+400),t.pointerStarted&&Rs(t,n?"cancel":"end",e?t.current:null,n),!t.panStarted))return;if(n||ut.get(r.surface)!==r||!r.pan){vn(t,"cancel",e?t.current:null,{cancelReason:n??"disabled"});return}let a=vr(r.pan,t.panLast.x-t.current.clientX,t.panLast.y-t.current.clientY),o=Mu(t,t.current.timeStamp),i=vr(r.pan,o.x,o.y);vn(t,"release",t.current,{deltaX:a.x,deltaY:a.y,velocityX:i.x,velocityY:i.y});let s=r.pan;if(ut.get(r.surface)!==r||!s||r.session){vn(t,"cancel",null,{cancelReason:"disabled"});return}if(s.inertia&&(Math.abs(i.x)>=s.minVelocity||Math.abs(i.y)>=s.minVelocity)){let l={state:r,session:t,vx:i.x,vy:i.y,time:r.store.view.performance.now()};r.momentum=l,r.store.momenta.add(l),Ou(r.store)}else vn(t,"end",t.current)}function Ou(t){t.frame!==void 0||!t.momenta.size||(t.animate??=e=>pv(t,e),t.frame=t.view.requestAnimationFrame(t.animate))}function pv(t,e){t.frame=void 0;for(let n of Array.from(t.momenta)){let r=n.state.pan;if(!r?.inertia||!n.state.surface.isConnected){Vn(n,"disabled");continue}let a=Math.min(50,Math.max(0,e-n.time));n.time=e;let o=Math.exp(-a/r.tau),i=vr(r,n.vx*r.tau*(1-o),n.vy*r.tau*(1-o)),s=vr(r,n.vx*o,n.vy*o);n.vx=s.x,n.vy=s.y,(i.x||i.y)&&vn(n.session,"inertia",null,{deltaX:i.x,deltaY:i.y,velocityX:s.x,velocityY:s.y}),t.momenta.has(n)&&Math.abs(s.x)<r.minVelocity&&Math.abs(s.y)<r.minVelocity&&Vn(n)}Ou(t)}function Vn(t,e){let n=t.state;n.momentum===t&&(n.momentum=void 0,n.store.momenta.delete(t),!n.store.momenta.size&&n.store.frame!==void 0&&(n.store.view.cancelAnimationFrame(n.store.frame),n.store.frame=void 0),vn(t.session,e?"cancel":"end",null,e?{cancelReason:e}:void 0))}function Pu(t){let e=ut.get(this);!e?.suppressClickUntil||t.detail===0||e.store.view.performance.now()>e.suppressClickUntil||(e.suppressClickUntil=void 0,t.preventDefault(),t.stopPropagation())}function zu(t){ut.get(this)?.session&&t.preventDefault()}function Bu(t){t.dwell.clear();for(let e of Array.from(t.sessions.values()))qn(e,null,"blur");for(let e of Array.from(t.momenta))Vn(e,"blur")}function Lu(){let t=ht.get(this.document);t&&Bu(t)}function Ru(){let t=ht.get(this);t&&this.hidden&&Bu(t)}var To=class extends B{static observedAttributes=bu;connectedCallback(){_s(this)}disconnectedCallback(){Fs(this)}attributeChangedCallback(e){_s(this,e)}};function Nu(){typeof customElements>"u"||customElements.get("a-capture")||customElements.define("a-capture",To)}Nu();var Hu=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],js=Hu.join(","),Vu=typeof Element>"u",xr=Vu?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ao=!Vu&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},Mo=function(e,n){var r;n===void 0&&(n=!0);var a=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),o=a===""||a==="true",i=o||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Mo(e.parentNode));return i},mv=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},fv=function(e,n,r){if(Mo(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(js));return n&&xr.call(e,js)&&a.unshift(e),a=a.filter(r),a},Us=function(e,n,r){for(var a=[],o=Array.from(e);o.length;){var i=o.shift();if(!Mo(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),l=s.length?s:i.children,c=Us(l,!0,r);r.flatten?a.push.apply(a,c):a.push({scopeParent:i,candidates:c})}else{var d=xr.call(i,js);d&&r.filter(i)&&(n||!e.includes(i))&&a.push(i);var u=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),m=!Mo(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(u&&m){var p=Us(u===!0?i.children:u.children,!0,r);r.flatten?a.push.apply(a,p):a.push({scopeParent:i,candidates:p})}else o.unshift.apply(o,i.children)}}return a},qu=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ju=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||mv(e))&&!qu(e)?0:e.tabIndex},bv=function(e,n){var r=ju(e);return r<0&&n&&!qu(e)?0:r},gv=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Uu=function(e){return e.tagName==="INPUT"},vv=function(e){return Uu(e)&&e.type==="hidden"},xv=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},yv=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},wv=function(e){if(!e.name)return!0;var n=e.form||Ao(e),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=r(window.CSS.escape(e.name));else try{a=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=yv(a,e.form);return!o||o===e},kv=function(e){return Uu(e)&&e.type==="radio"},Ev=function(e){return kv(e)&&!wv(e)},Cv=function(e){var n,r=e&&Ao(e),a=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==e){var i,s,l;for(o=!!((i=a)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(a)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!o&&a;){var c,d,u;r=Ao(a),a=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=a)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(a))}}return o},_u=function(e){var n=e.getBoundingClientRect(),r=n.width,a=n.height;return r===0&&a===0},Sv=function(e,n){var r=n.displayCheck,a=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var o=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}var i=getComputedStyle(e),s=i.visibility;if(s==="hidden"||s==="collapse")return!0;var l=xr.call(e,"details>summary:first-of-type"),c=l?e.parentElement:e;if(xr.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof a=="function"){for(var d=e;e;){var u=e.parentElement,m=Ao(e);if(u&&!u.shadowRoot&&a(u)===!0)return _u(e);e.assignedSlot?e=e.assignedSlot:!u&&m!==e.ownerDocument?e=m.host:e=u}e=d}if(Cv(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return _u(e);return!1},Tv=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var a=n.children.item(r);if(a.tagName==="LEGEND")return xr.call(n,"fieldset[disabled] *")?!0:!a.contains(e)}return!0}n=n.parentElement}return!1},Wu=function(e,n){return!(n.disabled||vv(n)||Sv(n,e)||xv(n)||Tv(n))},Fu=function(e,n){return!(Ev(n)||ju(n)<0||!Wu(e,n))},Av=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Yu=function(e){var n=[],r=[];return e.forEach(function(a,o){var i=!!a.scopeParent,s=i?a.scopeParent:a,l=bv(s,i),c=i?Yu(a.candidates):s;l===0?i?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:a,isScope:i,content:c})}),r.sort(gv).reduce(function(a,o){return o.isScope?a.push.apply(a,o.content):a.push(o.content),a},[]).concat(n)},Zu=function(e,n){n=n||{};var r;return n.getShadowRoot?r=Us([e],n.includeContainer,{filter:Fu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Av}):r=fv(e,n.includeContainer,Fu.bind(null,n)),Yu(r)};var Mv=Hu.concat("iframe:not([inert]):not([inert] *)").join(","),$u=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return xr.call(e,Mv)===!1?!1:Wu(n,e)};var Gu={getShadowRoot:!0};function Qt(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}function Ws(t){if(t.nodeType===1&&t.assignedSlot)return t.assignedSlot;let e=t.parentNode;return e?.nodeType===11&&"host"in e?e.host:e}function ua(t,e){for(;e;){if(e===t)return!0;e=Ws(e)}return!1}function ha(t){return!!t&&"focus"in t&&$u(t,Gu)}function pa(t){return Zu(t,Gu)}function Io(t,e,n,r){let a=t.indexOf(e),o=a<0?n?t.length-1:0:(a+(n?-1:1)+t.length)%t.length,i=t[o]??r;return i?(i.focus(),!0):!1}var Ku=new WeakMap,Do=class{#e;#t;#n;#a=null;#r=null;#o=!1;#c=!1;constructor(e){this.#n=e,this.#t=e.ownerDocument,this.#e=Ku.get(this.#t)??[],Ku.set(this.#t,this.#e)}get#m(){return this.#e.at(-1)===this&&this.#n.matches(":popover-open")}activate(e){this.#o||(this.#o=!0,this.#a=e,this.#r=ua(this.#n,e)?e:null,this.#e.push(this),this.#t.addEventListener("focusin",this.#h,!0),this.#t.addEventListener("keydown",this.#p))}focusInside(e=this.#r){if(!this.#m)return;(ua(this.#n,e)&&ha(e)?e:pa(this.#n)[0]??this.#n).focus({preventScroll:!0})}deactivate(){if(!this.#o)return()=>{};let e=Qt(this.#t),n=this.#e.at(-1)===this&&ua(this.#n,e),r=this.#a,a=r&&!ua(this.#n,r)?r:e;this.#o=!1;let o=this.#e.indexOf(this);return o>=0&&this.#e.splice(o,1),this.#t.removeEventListener("focusin",this.#h,!0),this.#t.removeEventListener("keydown",this.#p),this.#a=this.#r=null,()=>{n&&(ha(a)?a.focus({preventScroll:!0}):ha(e)?e.focus({preventScroll:!0}):ha(r)?r.focus({preventScroll:!0}):this.#e.at(-1)?.focusInside())}}#s(e){for(let n of e){if(n===this.#n)return!1;if(n instanceof Element&&n.matches(":modal"))return!0}return!1}#h=e=>{if(!this.#m||this.#c)return;let n=e.composedPath();if(!this.#s(n)){if(n.includes(this.#n)){this.#r=Qt(this.#t);return}this.#c=!0,this.focusInside(),this.#c=!1}};#p=e=>{!this.#m||e.defaultPrevented||e.key!=="Tab"||e.altKey||e.ctrlKey||e.metaKey||this.#s(e.composedPath())||(e.preventDefault(),Io(pa(this.#n),Qt(this.#t),e.shiftKey,this.#n))}};var Iv=`
|
|
176
176
|
slot:not([popover]) { display: contents; }
|
|
177
177
|
slot:popover-open {
|
|
178
178
|
display: block;
|
|
@@ -186,7 +186,7 @@ import ur from"react";var ia=ur.createElement,ve=ur.Fragment,Md=ur.useState,Id=u
|
|
|
186
186
|
padding: 0;
|
|
187
187
|
border: 0;
|
|
188
188
|
box-sizing: border-box;
|
|
189
|
-
overflow:
|
|
189
|
+
overflow: auto;
|
|
190
190
|
overscroll-behavior: contain;
|
|
191
191
|
color: inherit;
|
|
192
192
|
background: inherit;
|
|
@@ -199,8 +199,8 @@ import ur from"react";var ia=ur.createElement,ve=ur.Fragment,Md=ur.useState,Id=u
|
|
|
199
199
|
max-width: 100%;
|
|
200
200
|
pointer-events: none;
|
|
201
201
|
}
|
|
202
|
-
`,
|
|
203
|
-
${e}`:e}function
|
|
202
|
+
`,Ys=t=>t==="maximized"?"maximized":"normal",Oo=class extends B{static observedAttributes=["state"];#e;#t;#n;#a="normal";#r=!1;#o=!1;#c;constructor(){super(),this.#n=this.attachInternals();let e=this.attachShadow({mode:"open"}),n=this.ownerDocument,r=n.createElement("style");r.textContent=Iv,this.#e=n.createElement("slot"),this.#e.setAttribute("part","content"),this.#c=new Do(this.#e),this.#t=n.createElement("div"),this.#t.className="placeholder",this.#t.setAttribute("aria-hidden","true"),e.append(r,this.#t,this.#e),this.#e.addEventListener("toggle",()=>{this.#o&&this.isConnected&&this.#p()}),this.addEventListener("panelmaximizerequest",this.#s),this.addEventListener("panelrestorerequest",this.#s),this.addEventListener("paneltoggle",this.#s)}get#m(){return typeof this.#e.showPopover=="function"&&this.#e.matches(":popover-open")?"maximized":"normal"}connectedCallback(){this.hasAttribute("state")?this.#a=Ys(this.getAttribute("state")):this.#r||(this.#a=Ys(this.getAttribute("default-state"))),this.#r=!0,queueMicrotask(()=>{this.isConnected&&(this.#o=!0,this.#p())})}disconnectedCallback(){this.#o=!1,this.#g(!1)}attributeChangedCallback(){this.hasAttribute("state")&&(this.#a=Ys(this.getAttribute("state")),this.#o&&this.isConnected&&this.#p())}requestMaximize(){this.#h("maximized")}requestRestore(){this.#h("normal")}#s=e=>{e.composedPath().find(r=>r instanceof Element&&r.localName==="a-panel")!==this||e.defaultPrevented||this.#h(e.type==="paneltoggle"?this.#m==="maximized"?"normal":"maximized":e.type==="panelmaximizerequest"?"maximized":"normal")};#h(e){let n=this.#m;e===n||!this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:n}}))||this.hasAttribute("state")||(this.#a=e,this.#o&&this.isConnected&&this.#p())}#p(){if(!(this.#m===this.#a&&(this.#a==="maximized"||!this.#e.hasAttribute("popover"))))if(this.#a==="maximized"){if(typeof this.#e.showPopover!="function")return;let e=Qt(this.ownerDocument),n=this.ownerDocument.defaultView.getComputedStyle(this),r=n.boxSizing==="border-box",a=parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),o=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),i=Math.max(0,this.offsetWidth-this.clientWidth-Math.round(a)),s=Math.max(0,this.offsetHeight-this.clientHeight-Math.round(o)),l=parseFloat(n.width)-(r?parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+a:0)-i,c=parseFloat(n.height)-(r?parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+o:0)-s;this.#t.style.width=`${Math.max(0,l||0)}px`,this.#t.style.height=`${Math.max(0,c||0)}px`,this.#t.classList.add("active"),this.#e.tabIndex=-1,this.#e.setAttribute("popover","manual"),this.#c.activate(e),this.#e.showPopover(),this.#n.states?.add("maximized"),this.#c.focusInside(e)}else this.#g()}#g(e=!0){let n=this.#c.deactivate();this.#m==="maximized"&&this.#e.hidePopover(),this.#e.removeAttribute("popover"),this.#e.removeAttribute("tabindex"),this.#t.classList.remove("active"),this.#n.states?.delete("maximized"),e&&n()}};function Xu(){typeof customElements>"u"||customElements.get("a-panel")||customElements.define("a-panel",Oo)}Xu();var Po=class extends B{};function Ju(){typeof customElements>"u"||customElements.get("a-icon")||customElements.define("a-icon",Po)}Ju();function zo(t,e){let n=null;t.addEventListener("keydown",r=>{if(r.repeat||!e.keys.includes(r.key))return;let a=e.resolve(r.target);a&&(r.preventDefault(),n=e.blocked?.(a)?null:a)},!0),t.addEventListener("keyup",r=>{if(!e.keys.includes(r.key))return;let a=e.resolve(r.target);if(!a||a!==n){n=null;return}n=null,!e.blocked?.(a)&&e.activate(a)},!0)}function Qu(t){!t||t.hasKeyListenerForAButton||(zo(t,{keys:["Enter"," "],resolve:e=>e?.closest?.("a-button"),blocked:e=>e.hasAttribute("disabled")||e.hasAttribute("loading"),activate:e=>e.click()}),t.addEventListener("click",Ov,!0),t.hasKeyListenerForAButton=!0)}var Bo=class extends B{static observedAttributes=["aria-label","aria-labelledby","aria-describedby"];internals;popupAriaSource;#e;#t;constructor(){super();try{this.internals=this.attachInternals?.()}catch{}}connectedCallback(){Qu(this.doc),this.parentElement?.localName==="a-select-field"&&(this.#t=this.parentElement,this.#e=new MutationObserver(()=>this.#n()),this.#e.observe(this.#t,{childList:!0,subtree:!0}),this.#t.addEventListener("click",this.#a),this.#n())}disconnectedCallback(){this.#t&&(this.#e?.disconnect(),this.#t?.removeEventListener("click",this.#a),this.#t=void 0,this.#n())}attributeChangedCallback(){this.#t&&this.#n()}#n(){if(!this.internals)return;let e=this.#t?.querySelector(":scope > a-select-label"),n=this.#t?.querySelector(":scope > a-select-hint"),a=[this.#t?this.querySelector(":scope > a-button-label"):null,n].filter(o=>!!o);try{this.internals.ariaLabelledByElements=e&&!this.hasAttribute("aria-label")&&!this.hasAttribute("aria-labelledby")?[e]:null,this.internals.ariaDescribedByElements=a.length&&!this.hasAttribute("aria-describedby")?a:null}catch{}}#a=e=>{this.hasAttribute("disabled")||this.hasAttribute("loading")||e.composedPath().some(n=>n instanceof Element&&n.localName==="a-select-label")&&this.focus()};[Jt](e){if(!(!this.internals||!("ariaControlsElements"in this.internals))){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0;try{this.internals.ariaControlsElements=null}catch{}return}if("controls"in e){this.popupAriaSource=e.source;try{this.internals.ariaControlsElements=e.controls?[e.controls]:null}catch{}}}}};function Dv(t){let e=t.getAttribute("form");return e?t.ownerDocument.getElementById(e):t.closest("form")}function Ov(t){let e=t.target.closest("a-button");if(!e||e.hasAttribute("disabled")||e.hasAttribute("loading"))return;let n=e.getAttribute("data-custom-event");n&&e.dispatchEvent(new CustomEvent(n,{bubbles:!0,cancelable:!0}));let r=e.getAttribute("type")||"button",a=Dv(e);if(a)if(r==="submit"){a.requestSubmit();let o=new FormData(a);a.dispatchEvent(new CustomEvent("submitdetailed",{bubbles:!0,cancelable:!0,detail:{formData:Object.fromEntries(o.entries()),submitter:{tag:e.tagName.toLowerCase(),attrs:Object.fromEntries(Array.from(e.attributes).map(i=>[i.name,i.value]))}}}))}else r==="reset"&&a.reset()}function eh(){typeof customElements>"u"||(Qu(typeof document<"u"?document:void 0),customElements.get("a-button")||customElements.define("a-button",Bo))}eh();async function Pv(t){try{return await navigator.clipboard.writeText(t),!0}catch{return!1}}async function zv(t){let e=t.cloneNode(!0);e.querySelectorAll("[data-copy-node-button]").forEach(a=>a.remove());let n=e.outerHTML,r=e.textContent??"";try{return typeof ClipboardItem<"u"&&navigator.clipboard?.write?(await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([n],{type:"text/html"}),"text/plain":new Blob([r],{type:"text/plain"})})]),!0):(await navigator.clipboard.writeText(r),!0)}catch{return!1}}function Bv(t){let e=t.getAttribute("copy-node");return e==null?null:t.closest(e===""?"[data-copy-source]":e)}function th(t,e){e.then(n=>{t.dispatchEvent(new CustomEvent("copydone",{bubbles:!1,detail:{ok:n}}))})}function nh(){return typeof location<"u"?location.href:""}function Lv(t){if(t.hasAttribute("copy-url"))return nh();let e=t.getAttribute("copy")??"";return t.hasAttribute("copy-with-url")?`// URL: ${nh()}
|
|
203
|
+
${e}`:e}function Rv(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")}function Lo(t){t.hasAttribute("copy")&&t.dispatchEvent(new CustomEvent("copyrequest",{bubbles:!1}))}function rh(t){if(t.hasAttribute("copy-node")){let e=Bv(t);return th(t,e?zv(e):Promise.resolve(!1)),!0}return Rv(t)?(th(t,Pv(Lv(t))),!0):!1}var oh="a-button, button, [role=button]",ih="a-menu-item, [role=menuitem]",sh=`${oh}, ${ih}`,jn=new WeakMap;function Zs(t){return t?.querySelector(":scope > a-copy")??null}function $s(t){return t.hasAttribute("disabled")||t.hasAttribute("loading")||t.getAttribute("aria-disabled")==="true"}function Nv(t){if(!t||t.hasCopyDelegation)return;let e=(n,r)=>{let a=n?.closest?.(sh);if(!a||$s(a))return;let o=Zs(a);o&&(r?jn.set(o,r):jn.delete(o),Lo(o))};t.addEventListener("pointerdown",n=>e(n.target,{x:n.clientX,y:n.clientY}),!0),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&e(n.target)},!0),t.addEventListener("click",n=>{let r=n.target?.closest?.(oh);if(!r||$s(r))return;let a=Zs(r);a&&(n.detail?jn.set(a,{x:n.clientX,y:n.clientY}):jn.delete(a),a.activate())},!0),t.addEventListener("menuselect",n=>{let r=n.target?.closest?.(ih);!r||$s(r)||Zs(r)?.activate()},!0),t.hasCopyDelegation=!0}var lh=900,ah=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=`
|
|
204
204
|
.feedback {
|
|
205
205
|
position: fixed;
|
|
206
206
|
margin: 0;
|
|
@@ -220,15 +220,24 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
220
220
|
line-height: 16px;
|
|
221
221
|
font-weight: 500;
|
|
222
222
|
white-space: nowrap;
|
|
223
|
-
|
|
223
|
+
--_feedback-y-from: calc(-100% - 10px);
|
|
224
|
+
--_feedback-y-to: calc(-100% - 1.5em);
|
|
225
|
+
transform: translate(var(--_feedback-x), var(--_feedback-y-from));
|
|
226
|
+
}
|
|
227
|
+
.feedback[data-placement="below"] {
|
|
228
|
+
--_feedback-y-from: 10px;
|
|
229
|
+
--_feedback-y-to: 1.5em;
|
|
230
|
+
}
|
|
231
|
+
.feedback[data-measure-end] {
|
|
232
|
+
transform: translate(var(--_feedback-x), var(--_feedback-y-to));
|
|
224
233
|
}
|
|
225
234
|
.feedback:not(:popover-open) { display: none; }
|
|
226
|
-
.feedback[data-show] { animation: a-copy-feedback-rise ${
|
|
235
|
+
.feedback[data-show] { animation: a-copy-feedback-rise ${lh}ms ease-out forwards; }
|
|
227
236
|
@keyframes a-copy-feedback-rise {
|
|
228
|
-
from { opacity: 1; transform: translate(var(--_feedback-x),
|
|
229
|
-
to { opacity: 0; transform: translate(var(--_feedback-x),
|
|
237
|
+
from { opacity: 1; transform: translate(var(--_feedback-x), var(--_feedback-y-from)); }
|
|
238
|
+
to { opacity: 0; transform: translate(var(--_feedback-x), var(--_feedback-y-to)); }
|
|
230
239
|
}
|
|
231
|
-
`;let n=document.createElement("div");n.className="feedback",n.part.add("feedback"),n.setAttribute("popover","manual"),n.setAttribute("role","status");let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.textContent="\u2713";let a=document.createElement("span");return a.className="label",n.append(r,a),t.content.append(e,n),t})(),
|
|
240
|
+
`;let n=document.createElement("div");n.className="feedback",n.part.add("feedback"),n.setAttribute("popover","manual"),n.setAttribute("role","status");let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.textContent="\u2713";let a=document.createElement("span");return a.className="label",n.append(r,a),t.content.append(e,n),t})(),Ro=class extends B{#e;#t;#n;connectedCallback(){Nv(this.doc),this.addEventListener("copydone",this.#a)}activate(){rh(this)}#a=e=>{let n=jn.get(this);if(jn.delete(this),!this.hasAttribute("toast")||!e.detail?.ok)return;let r=this.closest(sh);r&&this.#o(r,n)};#r(){if(!ah)return;let e=this.attachShadow({mode:"open"});e.append(ah.content.cloneNode(!0)),this.#e=e.querySelector(".feedback"),this.#t=e.querySelector(".label")}#o(e,n){this.#e||this.#r();let r=this.#e,a=this.#t;if(!r||!a)return;a.textContent=this.getAttribute("copied-label")??"Copied";let o;if(n)r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.setProperty("--_feedback-x","8px"),o=n.y;else{let s=e.getBoundingClientRect(),l=this.view.getComputedStyle(e).direction==="rtl";r.style.left=`${l?s.right-12:s.left+12}px`,r.style.top=`${s.top}px`,r.style.setProperty("--_feedback-x",l?"-100%":"0"),o=s.bottom}clearTimeout(this.#n),r.removeAttribute("data-show"),r.removeAttribute("data-placement"),r.matches(":popover-open")&&r.hidePopover(),r.showPopover(),r.setAttribute("data-measure-end","");let i=r.getBoundingClientRect().top<0;r.removeAttribute("data-measure-end"),i&&(r.setAttribute("data-placement","below"),r.style.top=`${o}px`),r.offsetWidth,r.setAttribute("data-show",""),this.#n=setTimeout(()=>{r.removeAttribute("data-show"),r.matches(":popover-open")&&r.hidePopover()},lh)}disconnectedCallback(){clearTimeout(this.#n),jn.delete(this),this.removeEventListener("copydone",this.#a)}};function ch(){typeof customElements>"u"||customElements.get("a-copy")||customElements.define("a-copy",Ro)}ch();var Gs=t=>t==="checked"||t==="indeterminate"?t:"unchecked",No=class extends B{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;accessibilityObserver;get checked(){return this.currentState==="checked"}get indeterminate(){return this.currentState==="indeterminate"}constructor(){super(),this.internals=this.attachInternals?.(),this.addEventListener("click",e=>this.toggle(e)),this.addEventListener("keydown",e=>{e.key===" "&&(e.preventDefault(),this.click())})}connectedCallback(){this.seeded||(this.seed(),this.seeded=!0),this.paint(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0}),this.alive=!0}disconnectedCallback(){this.accessibilityObserver?.disconnect()}attributeChangedCallback(e){if(e==="state"){let n=Gs(this.getAttribute("state")),r=n!==this.currentState;this.currentState=n,this.paint(),r&&this.alive&&this.emitChange();return}e==="default-state"&&!this.#t&&!this.dirty&&this.seed(),this.paint()}get#e(){return this.matches(":disabled")}get#t(){return this.hasAttribute("state")}seed(){this.currentState=Gs(this.getAttribute("state")??this.getAttribute("default-state"))}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}toggle(e){if(this.#e)return;let n=this.currentState,r=n==="checked"?"unchecked":"checked",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#t||a&&(this.currentState=r,this.dirty=!0,this.paint(),this.emitChange())}paint(){let e=this.internals;e&&(e.states?.delete("checked"),e.states?.delete("indeterminate"),this.currentState==="indeterminate"?e.states?.add("indeterminate"):this.currentState==="checked"&&e.states?.add("checked"),e.ariaChecked=this.currentState==="indeterminate"?"mixed":this.currentState==="checked"?"true":"false",e.setFormValue?.(this.currentState==="checked"?this.getAttribute("value")??"on":null,this.currentState))}syncAccessibilityRelations(){ia(this.internals,Array.from(this.querySelectorAll(":scope > a-checkbox-label")),Array.from(this.querySelectorAll(":scope > a-checkbox-hint")))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=Gs(e),this.paint()}formDisabledCallback(){this.paint()}};function dh(){typeof customElements>"u"||customElements.get("a-checkbox")||customElements.define("a-checkbox",No)}dh();var Ks=t=>t==="checked"?"checked":"unchecked",_o=class extends B{static formAssociated=!0;static observedAttributes=["state","default-state","value"];internals;currentState="unchecked";seeded=!1;dirty=!1;alive=!1;accessibilityObserver;get checked(){return this.currentState==="checked"}constructor(){super(),this.internals=this.attachInternals?.(),this.addEventListener("click",e=>this.toggle(e)),this.addEventListener("keydown",e=>{e.key===" "&&(e.preventDefault(),this.click())})}connectedCallback(){this.seeded||(this.seed(),this.seeded=!0),this.paint(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0}),this.alive=!0}disconnectedCallback(){this.accessibilityObserver?.disconnect()}attributeChangedCallback(e){if(e==="state"){let n=Ks(this.getAttribute("state")),r=n!==this.currentState;this.currentState=n,this.paint(),r&&this.alive&&this.emitChange();return}e==="default-state"&&!this.#t&&!this.dirty&&this.seed(),this.paint()}get#e(){return this.matches(":disabled")}get#t(){return this.hasAttribute("state")}seed(){this.currentState=Ks(this.getAttribute("state")??this.getAttribute("default-state"))}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}toggle(e){if(this.#e)return;let n=this.currentState,r=n==="checked"?"unchecked":"checked",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#t||a&&(this.currentState=r,this.dirty=!0,this.paint(),this.emitChange())}paint(){let e=this.internals;e&&(e?.states?.delete("checked"),this.currentState==="checked"&&e?.states?.add("checked"),e.ariaChecked=this.currentState==="checked"?"true":"false",e.setFormValue?.(this.currentState==="checked"?this.getAttribute("value")??"on":null,this.currentState))}syncAccessibilityRelations(){ia(this.internals,Array.from(this.querySelectorAll(":scope > a-switch-label")),Array.from(this.querySelectorAll(":scope > a-switch-hint")))}formResetCallback(){this.seed(),this.paint()}formStateRestoreCallback(e){this.currentState=Ks(e),this.paint()}formDisabledCallback(){this.paint()}};function uh(){typeof customElements>"u"||customElements.get("a-switch")||customElements.define("a-switch",_o)}uh();var hh=200,_v='a-button,a-checkbox,a-radio,a-radio-group,a-input,a-input-time,a-calendar,a-menu-item,a-tab,[data-anta][role="button"],button,a[href],input,select,textarea,label,[contenteditable=""],[contenteditable="true"]',Fv=':disabled,[disabled],[aria-disabled="true"]';function Hv(t){return t.matches("[data-expander-ignore]")?!0:t.matches(_v)&&!t.matches(Fv)}var Vv=`
|
|
232
241
|
:host { display: block; }
|
|
233
242
|
|
|
234
243
|
.header {
|
|
@@ -340,20 +349,20 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
340
349
|
margin-inline-start: -1px;
|
|
341
350
|
}
|
|
342
351
|
@media (prefers-reduced-motion: no-preference) {
|
|
343
|
-
.region { transition: grid-template-rows ${
|
|
352
|
+
.region { transition: grid-template-rows ${hh}ms ease; }
|
|
344
353
|
}
|
|
345
354
|
|
|
346
355
|
[part="content"] { display: block; min-height: 0; overflow: clip; }
|
|
347
356
|
.header:has(button[aria-expanded="true"]) + .region [part="content"] {
|
|
348
357
|
overflow: visible;
|
|
349
|
-
transition: overflow 0s ${
|
|
358
|
+
transition: overflow 0s ${hh}ms;
|
|
350
359
|
transition-behavior: allow-discrete;
|
|
351
360
|
}
|
|
352
|
-
`,
|
|
361
|
+
`,ph=Xt,Fo=class extends B{static observedAttributes=["state","disabled","round"];summary;titleSlot;region;header;roundStyle;roundObserver;internals;constructor(){super(),this.internals=typeof this.attachInternals=="function"?this.attachInternals():void 0;let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Vv,this.summary=document.createElement("button"),this.summary.type="button",this.summary.setAttribute("aria-expanded","false"),this.summary.setAttribute("part","summary");let r=document.createElement("slot");r.name="title",this.titleSlot=r,this.summary.append(r),this.summary.addEventListener("click",this.onSummaryClick);let a=document.createElement("div");a.className="header",this.header=a;let o=document.createElement("slot");o.name="actions",o.setAttribute("part","actions"),o.addEventListener("slotchange",()=>{a.classList.toggle("has-actions",o.assignedElements().length>0)}),a.append(this.summary,o),this.region=document.createElement("div"),this.region.className="region";let i=document.createElement("slot");i.setAttribute("part","content"),this.region.append(i),this.roundStyle=document.createElement("style"),typeof ResizeObserver<"u"&&(this.roundObserver=new ResizeObserver(()=>this.measureRoundRadius())),e.append(n,this.roundStyle,a,this.region)}hasFixedRound(){let e=this.getAttribute("round");return e!=null&&e.trim()!==""}measureRoundRadius(){if(!this.hasAttribute("round")||this.hasFixedRound())return;let e=this.header.getBoundingClientRect().height;if(e<=0)return;let n=getComputedStyle(this),r=(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0),a=(e+r)/2;this.roundStyle.textContent=`:host{--_expander-round-radius:${a}px}`}startRoundObserver(){!this.roundObserver||this.hasFixedRound()||(this.roundObserver.observe(this.header),this.measureRoundRadius())}stopRoundObserver(){this.roundObserver?.disconnect(),this.roundStyle.textContent=""}get#e(){return this.hasAttribute("state")}get#t(){return this.summary.getAttribute("aria-expanded")==="true"?"open":"closed"}connectedCallback(){this.syncDisabled(),this.applyState(ph(this.getAttribute(this.#e?"state":"default-state"))),this.hasAttribute("round")&&this.startRoundObserver()}disconnectedCallback(){this.roundObserver?.disconnect()}attributeChangedCallback(e){e==="disabled"?this.syncDisabled():e==="state"&&this.#e?this.applyState(ph(this.getAttribute("state"))):e==="round"&&(this.hasAttribute("round")?this.startRoundObserver():this.stopRoundObserver())}syncDisabled(){this.summary.disabled=this.hasAttribute("disabled")}applyState(e){let n=e==="open";this.summary.setAttribute("aria-expanded",n?"true":"false"),this.region.inert=!n;try{n?this.internals?.states?.add("open"):this.internals?.states?.delete("open")}catch{}}#n(e){let n=e.composedPath(),r=n.indexOf(this.summary);return(r===-1?n:n.slice(0,r)).some(o=>o instanceof Element&&Hv(o))}#a(){let e=this.ownerDocument.getSelection();if(!e||e.isCollapsed||e.rangeCount===0)return!1;let n=e.getRangeAt(0);return this.titleSlot.assignedNodes().some(r=>n.intersectsNode(r))}onSummaryClick=e=>{if(this.#n(e)||e.detail!==0&&this.#a())return;let n=this.#t,r=n==="open"?"closed":"open",a=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:r,prev:n}}));this.#e||a&&this.applyState(r)}};function mh(){typeof customElements>"u"||customElements.get("a-expander")||customElements.define("a-expander",Fo)}mh();var nt=4,fh=16,qv=8,bh=300,gh=150,jv=300,Uv=120,Xs=10,vh=100,Wv=60,Yv=500,Zv="a-tab-label, a-button-label, a-step-hint";function xh(t){return typeof t.isTruncated=="boolean"}var Js="data-anta-text-tooltip",$v=1500,Gv=10,rt=null,wr,Ho=!1;function Kv(){return wr!==void 0}function Xv(t){return t.hasAttribute("follow")?rt?rt.hasAttribute("follow"):Kv()&&Ho:!1}function Eh(){wr!==void 0&&(clearTimeout(wr),wr=void 0),Ho=!1}function Jv(t){rt&&rt!==t&&(rt.isConnected?rt.hide():rt.cleanup()),rt=t,Eh()}function yh(t){rt===t&&(rt=null,Eh(),Ho=t.hasAttribute("follow"),wr=setTimeout(()=>{wr=void 0,Ho=!1},jv))}var yr=new WeakMap;function wh(t){let e,n;for(let r of t.tooltips)r.hasAttribute(Js)?e=r:n=r;return n??e}function Qs(t,e){let n=wh(e);for(let r of e.tooltips)r!==n&&r.teardownListeners();if(!n||!e.intersecting){n?.teardownListeners();return}requestAnimationFrame(()=>{let r=yr.get(t);r!==e||!r.intersecting||wh(r)!==n||n.setupListeners()})}function Qv(t){for(let e of t){let n=yr.get(e.target);n&&(n.intersecting=e.isIntersecting,Qs(e.target,n))}}var kh=typeof IntersectionObserver<"u"?new IntersectionObserver(Qv,{root:null,rootMargin:"0px",threshold:0}):null,Vo=class extends B{static observedAttributes=["delay"];container;bubble;anchor=null;listening=!1;shown=!1;touchOpen=!1;lastMouse;debouncedShow;teardown;closeTimer;fading=!1;fadeTimer;docMoveBound=!1;contentObserver;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
|
|
353
362
|
:host { display: contents; }
|
|
354
363
|
|
|
355
364
|
.container {
|
|
356
|
-
--_dur: ${
|
|
365
|
+
--_dur: ${gh}ms;
|
|
357
366
|
position: fixed;
|
|
358
367
|
left: 0;
|
|
359
368
|
top: 0;
|
|
@@ -409,11 +418,11 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
409
418
|
word-break: break-word;
|
|
410
419
|
overflow-wrap: break-word;
|
|
411
420
|
opacity: 1;
|
|
412
|
-
transition: opacity ${
|
|
421
|
+
transition: opacity ${Wv}ms linear;
|
|
413
422
|
}
|
|
414
423
|
|
|
415
424
|
:host([interactive]) .container { pointer-events: auto; }
|
|
416
|
-
`,this.container=document.createElement("div"),this.container.className="container",this.container.setAttribute("popover","manual"),this.container.setAttribute("role","tooltip"),this.bubble=document.createElement("slot"),this.bubble.className="bubble",this.bubble.setAttribute("part","bubble"),this.container.append(this.bubble),this.container.addEventListener("mouseenter",()=>{this.#e&&this.cancelHide()}),this.container.addEventListener("mouseleave",()=>{this.#e&&this.shown&&this.scheduleHide()}),e.append(n,this.container)}connectedCallback(){let e=this.parentElement;if(!e)return;this.anchor=e;let n=yr.get(e);n||(n={tooltips:new Set,intersecting:!1},yr.set(e,n),bh?.observe(e)),n.tooltips.add(this),Zs(e,n)}disconnectedCallback(){if(this.cleanup(),this.anchor){let e=this.anchor,n=yr.get(e);n?.tooltips.delete(this),n&&n.tooltips.size===0?(yr.delete(e),bh?.unobserve(this.anchor)):n&&Zs(e,n),this.anchor=null}}attributeChangedCallback(e){e==="delay"&&this.listening&&this.makeDebouncedShow()}makeDebouncedShow(){this.debouncedShow?.cancel(),this.debouncedShow=ca(e=>this.show(e),this.#r)}get#e(){return this.hasAttribute("interactive")}get#t(){return this.#e||this.touchOpen?!0:!this.hasAttribute("follow")}get#n(){return this.getAttribute("placement")==="top"}get#a(){return this.getAttribute("placement")==="left"}get#r(){let e=this.getAttribute("delay");if(e==null)return ch;let n=parseInt(e,10);return Number.isFinite(n)?n:ch}get#o(){return this.hasAttribute("truncated-only")}get#c(){return this.hasAttribute(js)}hasExplicitTextTooltip(){let e=this.anchor;return!this.#c||!e?!1:Array.from(e.children).some(n=>n!==this&&n.localName==="a-tooltip"&&!n.hasAttribute(js))}anchorText(){let e=n=>n.nodeType===3?n.textContent??"":n.nodeType===1&&n.localName==="a-tooltip"?"":Array.from(n.childNodes).map(e).join("");return this.anchor?Array.from(this.anchor.childNodes).map(e).join("").trim():""}syncAutomaticTextContent(){this.#c&&(this.bubble.textContent=this.anchorText())}resolveTruncationTargets(){let e=this.anchor;if(!e)return[];let n=this.getAttribute("truncated-selector");if(n)try{let a=Array.from(e.querySelectorAll(n));if(a.length)return a}catch{}if(hh(e))return[e];let r=Array.from(e.querySelectorAll(bv));return r.length?r:[e]}isTargetTruncated(){return this.resolveTruncationTargets().some(e=>hh(e)?e.isTruncated:e.clientWidth===0&&e.clientHeight===0?!1:e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1)}isEmpty(){return this.#c?this.anchorText()==="":this.children.length===0&&(this.textContent??"").trim()===""}observeContent(){typeof MutationObserver>"u"||(this.contentObserver||(this.contentObserver=new MutationObserver(()=>{this.shown&&(this.syncAutomaticTextContent(),this.isEmpty()&&this.hide())})),this.contentObserver.observe(this.#c?this.anchor??this:this,{childList:!0,characterData:!0,subtree:!0}))}positionFrame;pendingPosition;schedulePosition(e){this.pendingPosition=e,this.positionFrame==null&&(this.positionFrame=this.view.requestAnimationFrame(()=>{this.positionFrame=void 0;let n=this.pendingPosition;this.pendingPosition=void 0,n?.()}))}flipVertical(e,n,r,a,o){return o?e<ot?n:e:n+r>a?e:n}place(e,n,r,a,o,i){e+r>o&&(e=o-r-ot),e=Math.max(ot,e),n+a>i&&(n=i-a-ot),n=Math.max(ot,n),this.container.style.transform=`translate(${Math.round(e)}px, ${Math.round(n)}px)`}positionToTarget=()=>{this.schedulePosition(()=>{if(!this.anchor||!this.shown)return;let e=Nt(this.anchor),n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#a){let i=e.left-n.width-ot,s=i>=ot?i:e.right+ot,l=e.top+(e.height-n.height)/2;this.place(s,l,n.width,n.height,r,a);return}let o=this.flipVertical(e.top-n.height-ot,e.bottom+ot,n.height,a,this.#n||this.touchOpen);this.place(e.left,o,n.width,n.height,r,a)})};positionToMouse=e=>{this.schedulePosition(()=>{if(!this.shown&&!this.fading)return;let n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#a){let i=e.clientX-n.width-ot,s=i>=ot?i:e.clientX+lh;this.place(s,e.clientY-n.height/2,n.width,n.height,r,a);return}let o=this.flipVertical(e.clientY-n.height-ot*2,e.clientY+lh,n.height,a,this.#n);this.place(e.clientX-dv,o,n.width,n.height,r,a)})};position(e){!this.#t&&e?this.positionToMouse(e):this.positionToTarget()}proximityOpacity(e){if(!this.anchor)return 1;let n=Nt(this.anchor),r=Math.max(n.left-e.clientX,0,e.clientX-n.right),a=Math.max(n.top-e.clientY,0,e.clientY-n.bottom),o=Math.hypot(r,a);return o<=qs?1:o>=uh?0:1-(o-qs)/(uh-qs)}show=e=>{this.anchor&&(Ld()&&!Nd(this.anchor)||this.hasExplicitTextTooltip()||this.isEmpty()||this.#o&&!this.isTargetTruncated()||(this.syncAutomaticTextContent(),this.cancelHide(),!(it&&it!==this&&this.anchor.contains(it.anchor))&&(yv(this),this.shown||(this.shown=!0,this.fading=!1,this.bubble.style.opacity="1",this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.container.showPopover(),this.view.addEventListener("scroll",this.hide,{capture:!0,passive:!0}),this.doc.addEventListener("keydown",this.onKeyDown,!0),this.docMoveBound||(this.doc.addEventListener("mousemove",this.onDocMove),this.docMoveBound=!0),this.observeContent()),this.position(e))))};hide=()=>{this.cancelHide(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.contentObserver?.disconnect(),this.container.hidePopover(),this.fading=!0,this.fadeTimer!==void 0&&clearTimeout(this.fadeTimer),this.fadeTimer=setTimeout(()=>this.detachGlobals(),dh),ph(this))};detachGlobals(){this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.fading=!1,this.view.removeEventListener("scroll",this.hide,{capture:!0}),this.doc.removeEventListener("keydown",this.onKeyDown,!0),this.docMoveBound&&(this.doc.removeEventListener("mousemove",this.onDocMove),this.docMoveBound=!1)}cleanup(){this.cancelHide(),this.contentObserver?.disconnect(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.container.matches(":popover-open")&&this.container.hidePopover()),this.detachGlobals(),this.teardownListeners(),ph(this),this.bubble.style.opacity=""}onDocMove=e=>{if(!this.isConnected){this.cleanup();return}if(!(this.shown||this.fading)||this.#t)return;this.lastMouse=e;let n=this.proximityOpacity(e);if(n===0){this.bubble.style.transition="none",this.bubble.style.opacity="0",this.shown&&this.hide();return}this.positionToMouse(e),this.bubble.style.transition="",this.bubble.style.opacity=String(n)};scheduleHide=(e=hv)=>{this.cancelHide(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.hide()},e)};cancelHide(){this.closeTimer!==void 0&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}onKeyDown=e=>{e.key==="Escape"&&this.hide()};trigger(e){this.hasExplicitTextTooltip()||this.isEmpty()||this.#o&&!this.isTargetTruncated()||(xv(this)?(this.debouncedShow?.cancel(),this.show(e)):this.debouncedShow?.(e))}setupListeners(){if(this.listening||!this.anchor){this.listening=!0;return}let e=this.anchor,n=this.view,r=this.doc;this.makeDebouncedShow();let a=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,this.shown?this.#t||this.positionToMouse(g):this.trigger(g))},o=()=>{this.debouncedShow?.cancel(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerleave",o),e.removeEventListener("blur",o),n.removeEventListener("pagehide",o),r.removeEventListener("visibilitychange",o),this.scheduleHide()},i=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,e.addEventListener("pointermove",a),e.addEventListener("pointerleave",o),n.addEventListener("pagehide",o),r.addEventListener("visibilitychange",o),this.trigger(g))},s=()=>{e.matches(":focus-visible")&&(e.addEventListener("blur",o),n.addEventListener("pagehide",o),r.addEventListener("visibilitychange",o),this.trigger())},l,c,d=g=>g.preventDefault(),u=()=>{l!==void 0&&(clearTimeout(l),l=void 0),c=void 0},p=g=>{c&&Math.hypot(g.clientX-c.x,g.clientY-c.y)>gv&&u()},m=()=>{u(),b(),this.shown&&this.touchOpen&&this.scheduleHide(fv)},b=()=>{e.removeEventListener("pointermove",p),e.removeEventListener("pointerup",m),e.removeEventListener("pointercancel",m),e.removeEventListener("contextmenu",d)},f=g=>{g.pointerType!=="mouse"&&(u(),c={x:g.clientX,y:g.clientY},e.addEventListener("pointermove",p),e.addEventListener("pointerup",m),e.addEventListener("pointercancel",m),e.addEventListener("contextmenu",d),l=setTimeout(()=>{l=void 0,this.touchOpen=!0,this.show()},mv))};e.addEventListener("pointerenter",i),e.addEventListener("focus",s),e.addEventListener("pointerdown",f),this.teardown=()=>{this.debouncedShow?.cancel(),u(),b(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",o),e.removeEventListener("focus",s),e.removeEventListener("blur",o),e.removeEventListener("pointerdown",f),n.removeEventListener("pagehide",o),r.removeEventListener("visibilitychange",o),this.listening=!1},this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}};function gh(){typeof customElements>"u"||customElements.get("a-tooltip")||customElements.define("a-tooltip",Lo)}gh();var No=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],Ro=new Set(No),kv={role:"role","aria-activedescendant":"ariaActiveDescendant","aria-atomic":"ariaAtomic","aria-autocomplete":"ariaAutoComplete","aria-braillelabel":"ariaBrailleLabel","aria-brailleroledescription":"ariaBrailleRoleDescription","aria-busy":"ariaBusy","aria-checked":"ariaChecked","aria-colcount":"ariaColCount","aria-colindex":"ariaColIndex","aria-colspan":"ariaColSpan","aria-controls":"ariaControls","aria-current":"ariaCurrent","aria-description":"ariaDescription","aria-describedby":"ariaDescribedBy","aria-details":"ariaDetails","aria-disabled":"ariaDisabled","aria-dropeffect":"ariaDropEffect","aria-errormessage":"ariaErrorMessage","aria-expanded":"ariaExpanded","aria-flowto":"ariaFlowTo","aria-grabbed":"ariaGrabbed","aria-haspopup":"ariaHasPopup","aria-hidden":"ariaHidden","aria-invalid":"ariaInvalid","aria-keyshortcuts":"ariaKeyShortcuts","aria-label":"ariaLabel","aria-labelledby":"ariaLabelledBy","aria-level":"ariaLevel","aria-live":"ariaLive","aria-modal":"ariaModal","aria-multiline":"ariaMultiLine","aria-multiselectable":"ariaMultiSelectable","aria-orientation":"ariaOrientation","aria-owns":"ariaOwns","aria-placeholder":"ariaPlaceholder","aria-posinset":"ariaPosInSet","aria-pressed":"ariaPressed","aria-readonly":"ariaReadOnly","aria-relevant":"ariaRelevant","aria-required":"ariaRequired","aria-roledescription":"ariaRoleDescription","aria-rowcount":"ariaRowCount","aria-rowindex":"ariaRowIndex","aria-rowspan":"ariaRowSpan","aria-selected":"ariaSelected","aria-setsize":"ariaSetSize","aria-sort":"ariaSort","aria-valuemax":"ariaValueMax","aria-valuemin":"ariaValueMin","aria-valuenow":"ariaValueNow","aria-valuetext":"ariaValueText"};function _o(t){return kv[t]}var Ev={"aria-activedescendant":"ariaActiveDescendantElement","aria-controls":"ariaControlsElements","aria-describedby":"ariaDescribedByElements","aria-details":"ariaDetailsElements","aria-errormessage":"ariaErrorMessageElements","aria-flowto":"ariaFlowToElements","aria-labelledby":"ariaLabelledByElements","aria-owns":"ariaOwnsElements"};function Cv(t,e){let n=t.getRootNode();return"getElementById"in n?e.trim().split(/\s+/).filter(Boolean).map(r=>n.getElementById(r)).filter(r=>r!=null):[]}function Hn(t,e,n,r){let a=Ev[n];if(!a){r==null?e.removeAttribute(n):e.setAttribute(n,r);return}let o=e,i=r==null?[]:Cv(t,r);try{if(!(a in o))throw new Error("ARIA element reflection is unavailable");n==="aria-activedescendant"?o.ariaActiveDescendantElement=i[0]??null:o[a]=i}catch{r==null?e.removeAttribute(n):e.setAttribute(n,r)}}var vh=["placeholder","type","name","autocomplete","inputmode","maxlength","minlength","pattern","spellcheck","readonly","required","min","max","step"],Sv=new Set(["readonly","required"]),Ws=!1,xh=new WeakSet;function Av(t){xh.has(t)||(xh.add(t),t.addEventListener("keydown",()=>{Ws=!0},!0),t.addEventListener("pointerdown",()=>{Ws=!1},!0))}var Tv="clearrequest",Mv="clearclick",Iv="clearinput",yh=typeof CSS<"u"&&!!CSS.supports?.("field-sizing","content"),Dv=`
|
|
425
|
+
`,this.container=document.createElement("div"),this.container.className="container",this.container.setAttribute("popover","manual"),this.container.setAttribute("role","tooltip"),this.bubble=document.createElement("slot"),this.bubble.className="bubble",this.bubble.setAttribute("part","bubble"),this.container.append(this.bubble),this.container.addEventListener("mouseenter",()=>{this.#e&&this.cancelHide()}),this.container.addEventListener("mouseleave",()=>{this.#e&&this.shown&&this.scheduleHide()}),e.append(n,this.container)}connectedCallback(){let e=this.parentElement;if(!e)return;this.anchor=e;let n=yr.get(e);n||(n={tooltips:new Set,intersecting:!1},yr.set(e,n),kh?.observe(e)),n.tooltips.add(this),Qs(e,n)}disconnectedCallback(){if(this.cleanup(),this.anchor){let e=this.anchor,n=yr.get(e);n?.tooltips.delete(this),n&&n.tooltips.size===0?(yr.delete(e),kh?.unobserve(this.anchor)):n&&Qs(e,n),this.anchor=null}}attributeChangedCallback(e){e==="delay"&&this.listening&&this.makeDebouncedShow()}makeDebouncedShow(){this.debouncedShow?.cancel(),this.debouncedShow=la(e=>this.show(e),this.#r)}get#e(){return this.hasAttribute("interactive")}get#t(){return this.#e||this.touchOpen?!0:!this.hasAttribute("follow")}get#n(){return this.getAttribute("placement")==="top"}get#a(){return this.getAttribute("placement")==="left"}get#r(){let e=this.getAttribute("delay");if(e==null)return bh;let n=parseInt(e,10);return Number.isFinite(n)?n:bh}get#o(){return this.hasAttribute("truncated-only")}get#c(){return this.hasAttribute(Js)}hasExplicitTextTooltip(){let e=this.anchor;return!this.#c||!e?!1:Array.from(e.children).some(n=>n!==this&&n.localName==="a-tooltip"&&!n.hasAttribute(Js))}anchorText(){let e=n=>n.nodeType===3?n.textContent??"":n.nodeType===1&&n.localName==="a-tooltip"?"":Array.from(n.childNodes).map(e).join("");return this.anchor?Array.from(this.anchor.childNodes).map(e).join("").trim():""}syncAutomaticTextContent(){this.#c&&(this.bubble.textContent=this.anchorText())}resolveTruncationTargets(){let e=this.anchor;if(!e)return[];let n=this.getAttribute("truncated-selector");if(n)try{let a=Array.from(e.querySelectorAll(n));if(a.length)return a}catch{}if(xh(e))return[e];let r=Array.from(e.querySelectorAll(Zv));return r.length?r:[e]}isTargetTruncated(){return this.resolveTruncationTargets().some(e=>xh(e)?e.isTruncated:e.clientWidth===0&&e.clientHeight===0?!1:e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1)}isEmpty(){return this.#c?this.anchorText()==="":this.children.length===0&&(this.textContent??"").trim()===""}observeContent(){typeof MutationObserver>"u"||(this.contentObserver||(this.contentObserver=new MutationObserver(()=>{this.shown&&(this.syncAutomaticTextContent(),this.isEmpty()&&this.hide())})),this.contentObserver.observe(this.#c?this.anchor??this:this,{childList:!0,characterData:!0,subtree:!0}))}positionFrame;pendingPosition;schedulePosition(e){this.pendingPosition=e,this.positionFrame==null&&(this.positionFrame=this.view.requestAnimationFrame(()=>{this.positionFrame=void 0;let n=this.pendingPosition;this.pendingPosition=void 0,n?.()}))}flipVertical(e,n,r,a,o){return o?e<nt?n:e:n+r>a?e:n}place(e,n,r,a,o,i){e+r>o&&(e=o-r-nt),e=Math.max(nt,e),n+a>i&&(n=i-a-nt),n=Math.max(nt,n),this.container.style.transform=`translate(${Math.round(e)}px, ${Math.round(n)}px)`}positionToTarget=()=>{this.schedulePosition(()=>{if(!this.anchor||!this.shown)return;let e=Ft(this.anchor),n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#a){let i=e.left-n.width-nt,s=i>=nt?i:e.right+nt,l=e.top+(e.height-n.height)/2;this.place(s,l,n.width,n.height,r,a);return}let o=this.flipVertical(e.top-n.height-nt,e.bottom+nt,n.height,a,this.#n||this.touchOpen);this.place(e.left,o,n.width,n.height,r,a)})};positionToMouse=e=>{this.schedulePosition(()=>{if(!this.shown&&!this.fading)return;let n=this.container.getBoundingClientRect(),{innerWidth:r,innerHeight:a}=this.view;if(this.#a){let i=e.clientX-n.width-nt,s=i>=nt?i:e.clientX+fh;this.place(s,e.clientY-n.height/2,n.width,n.height,r,a);return}let o=this.flipVertical(e.clientY-n.height-nt*2,e.clientY+fh,n.height,a,this.#n);this.place(e.clientX-qv,o,n.width,n.height,r,a)})};position(e){!this.#t&&e?this.positionToMouse(e):this.positionToTarget()}proximityOpacity(e){if(!this.anchor)return 1;let n=Ft(this.anchor),r=Math.max(n.left-e.clientX,0,e.clientX-n.right),a=Math.max(n.top-e.clientY,0,e.clientY-n.bottom),o=Math.hypot(r,a);return o<=Xs?1:o>=vh?0:1-(o-Xs)/(vh-Xs)}show=e=>{this.anchor&&(qd()&&!jd(this.anchor)||this.hasExplicitTextTooltip()||this.isEmpty()||this.#o&&!this.isTargetTruncated()||(this.syncAutomaticTextContent(),this.cancelHide(),!(rt&&rt!==this&&this.anchor.contains(rt.anchor))&&(Jv(this),this.shown||(this.shown=!0,this.fading=!1,this.bubble.style.opacity="1",this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.container.showPopover(),this.view.addEventListener("scroll",this.hide,{capture:!0,passive:!0}),this.doc.addEventListener("keydown",this.onKeyDown,!0),this.docMoveBound||(this.doc.addEventListener("mousemove",this.onDocMove),this.docMoveBound=!0),this.observeContent()),this.position(e))))};hide=()=>{this.cancelHide(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.contentObserver?.disconnect(),this.container.hidePopover(),this.fading=!0,this.fadeTimer!==void 0&&clearTimeout(this.fadeTimer),this.fadeTimer=setTimeout(()=>this.detachGlobals(),gh),yh(this))};detachGlobals(){this.fadeTimer!==void 0&&(clearTimeout(this.fadeTimer),this.fadeTimer=void 0),this.fading=!1,this.view.removeEventListener("scroll",this.hide,{capture:!0}),this.doc.removeEventListener("keydown",this.onKeyDown,!0),this.docMoveBound&&(this.doc.removeEventListener("mousemove",this.onDocMove),this.docMoveBound=!1)}cleanup(){this.cancelHide(),this.contentObserver?.disconnect(),this.shown&&(this.shown=!1,this.touchOpen=!1,this.container.matches(":popover-open")&&this.container.hidePopover()),this.detachGlobals(),this.teardownListeners(),yh(this),this.bubble.style.opacity=""}onDocMove=e=>{if(!this.isConnected){this.cleanup();return}if(!(this.shown||this.fading)||this.#t)return;this.lastMouse=e;let n=this.proximityOpacity(e);if(n===0){this.bubble.style.transition="none",this.bubble.style.opacity="0",this.shown&&this.hide();return}this.positionToMouse(e),this.bubble.style.transition="",this.bubble.style.opacity=String(n)};scheduleHide=(e=Uv)=>{this.cancelHide(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.hide()},e)};cancelHide(){this.closeTimer!==void 0&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}onKeyDown=e=>{e.key==="Escape"&&this.hide()};trigger(e){this.hasExplicitTextTooltip()||this.isEmpty()||this.#o&&!this.isTargetTruncated()||(Xv(this)?(this.debouncedShow?.cancel(),this.show(e)):this.debouncedShow?.(e))}setupListeners(){if(this.listening||!this.anchor){this.listening=!0;return}let e=this.anchor,n=this.view,r=this.doc;this.makeDebouncedShow();let a=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,this.shown?this.#t||this.positionToMouse(g):this.trigger(g))},o=()=>{this.debouncedShow?.cancel(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerleave",o),e.removeEventListener("blur",o),n.removeEventListener("pagehide",o),r.removeEventListener("visibilitychange",o),this.scheduleHide()},i=g=>{g.pointerType==="mouse"&&(this.lastMouse=g,e.addEventListener("pointermove",a),e.addEventListener("pointerleave",o),n.addEventListener("pagehide",o),r.addEventListener("visibilitychange",o),this.trigger(g))},s=()=>{e.matches(":focus-visible")&&(e.addEventListener("blur",o),n.addEventListener("pagehide",o),r.addEventListener("visibilitychange",o),this.trigger())},l,c,d=g=>g.preventDefault(),u=()=>{l!==void 0&&(clearTimeout(l),l=void 0),c=void 0},m=g=>{c&&Math.hypot(g.clientX-c.x,g.clientY-c.y)>Gv&&u()},p=()=>{u(),b(),this.shown&&this.touchOpen&&this.scheduleHide($v)},b=()=>{e.removeEventListener("pointermove",m),e.removeEventListener("pointerup",p),e.removeEventListener("pointercancel",p),e.removeEventListener("contextmenu",d)},f=g=>{g.pointerType!=="mouse"&&(u(),c={x:g.clientX,y:g.clientY},e.addEventListener("pointermove",m),e.addEventListener("pointerup",p),e.addEventListener("pointercancel",p),e.addEventListener("contextmenu",d),l=setTimeout(()=>{l=void 0,this.touchOpen=!0,this.show()},Yv))};e.addEventListener("pointerenter",i),e.addEventListener("focus",s),e.addEventListener("pointerdown",f),this.teardown=()=>{this.debouncedShow?.cancel(),u(),b(),e.removeEventListener("pointermove",a),e.removeEventListener("pointerenter",i),e.removeEventListener("pointerleave",o),e.removeEventListener("focus",s),e.removeEventListener("blur",o),e.removeEventListener("pointerdown",f),n.removeEventListener("pagehide",o),r.removeEventListener("visibilitychange",o),this.listening=!1},this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}};function Ch(){typeof customElements>"u"||customElements.get("a-tooltip")||customElements.define("a-tooltip",Vo)}Ch();var qo=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-description","aria-describedby","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],jo=new Set(qo),e0={role:"role","aria-activedescendant":"ariaActiveDescendant","aria-atomic":"ariaAtomic","aria-autocomplete":"ariaAutoComplete","aria-braillelabel":"ariaBrailleLabel","aria-brailleroledescription":"ariaBrailleRoleDescription","aria-busy":"ariaBusy","aria-checked":"ariaChecked","aria-colcount":"ariaColCount","aria-colindex":"ariaColIndex","aria-colspan":"ariaColSpan","aria-controls":"ariaControls","aria-current":"ariaCurrent","aria-description":"ariaDescription","aria-describedby":"ariaDescribedBy","aria-details":"ariaDetails","aria-disabled":"ariaDisabled","aria-dropeffect":"ariaDropEffect","aria-errormessage":"ariaErrorMessage","aria-expanded":"ariaExpanded","aria-flowto":"ariaFlowTo","aria-grabbed":"ariaGrabbed","aria-haspopup":"ariaHasPopup","aria-hidden":"ariaHidden","aria-invalid":"ariaInvalid","aria-keyshortcuts":"ariaKeyShortcuts","aria-label":"ariaLabel","aria-labelledby":"ariaLabelledBy","aria-level":"ariaLevel","aria-live":"ariaLive","aria-modal":"ariaModal","aria-multiline":"ariaMultiLine","aria-multiselectable":"ariaMultiSelectable","aria-orientation":"ariaOrientation","aria-owns":"ariaOwns","aria-placeholder":"ariaPlaceholder","aria-posinset":"ariaPosInSet","aria-pressed":"ariaPressed","aria-readonly":"ariaReadOnly","aria-relevant":"ariaRelevant","aria-required":"ariaRequired","aria-roledescription":"ariaRoleDescription","aria-rowcount":"ariaRowCount","aria-rowindex":"ariaRowIndex","aria-rowspan":"ariaRowSpan","aria-selected":"ariaSelected","aria-setsize":"ariaSetSize","aria-sort":"ariaSort","aria-valuemax":"ariaValueMax","aria-valuemin":"ariaValueMin","aria-valuenow":"ariaValueNow","aria-valuetext":"ariaValueText"};function Uo(t){return e0[t]}var t0={"aria-activedescendant":"ariaActiveDescendantElement","aria-controls":"ariaControlsElements","aria-describedby":"ariaDescribedByElements","aria-details":"ariaDetailsElements","aria-errormessage":"ariaErrorMessageElements","aria-flowto":"ariaFlowToElements","aria-labelledby":"ariaLabelledByElements","aria-owns":"ariaOwnsElements"};function n0(t,e){let n=t.getRootNode();return"getElementById"in n?e.trim().split(/\s+/).filter(Boolean).map(r=>n.getElementById(r)).filter(r=>r!=null):[]}function Un(t,e,n,r){let a=t0[n];if(!a){r==null?e.removeAttribute(n):e.setAttribute(n,r);return}let o=e,i=r==null?[]:n0(t,r);try{if(!(a in o))throw new Error("ARIA element reflection is unavailable");n==="aria-activedescendant"?o.ariaActiveDescendantElement=i[0]??null:o[a]=i}catch{r==null?e.removeAttribute(n):e.setAttribute(n,r)}}var Sh=["placeholder","type","name","autocomplete","inputmode","maxlength","minlength","pattern","spellcheck","readonly","required","min","max","step"],r0=new Set(["readonly","required"]),el=!1,Th=new WeakSet;function a0(t){Th.has(t)||(Th.add(t),t.addEventListener("keydown",()=>{el=!0},!0),t.addEventListener("pointerdown",()=>{el=!1},!0))}var o0="clearrequest",i0="clearclick",s0="clearinput",Ah=typeof CSS<"u"&&!!CSS.supports?.("field-sizing","content"),l0=`
|
|
417
426
|
:host {
|
|
418
427
|
--_fs: 15px;
|
|
419
428
|
--_lh: 20px;
|
|
@@ -557,7 +566,7 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
557
566
|
font-size: calc(var(--_fs) - 1px);
|
|
558
567
|
line-height: calc(var(--_lh) - 2px);
|
|
559
568
|
}
|
|
560
|
-
`,wh=Symbol("readDelegatedAria"),kh=Symbol("writeDelegatedAria"),ba=class extends z{static formAssociated=!0;static observedAttributes=[...vh,...No,"value","defaultvalue","multiline","button","rows","maxrows","status","disabled"];internals;field;labelSlot;hintSlot;leadingSlot;control;pendingValue;ready=!1;formDisabled=!1;delegatedAria=new Map;consumingAria=new Set;ariaApplyQueued=!1;popupAriaSource;popupControls=null;popupActiveDescendant=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch(i){console.warn("a-input: ElementInternals unavailable \u2014 form association disabled.",i)}let e=this.attachShadow({mode:"open",delegatesFocus:!0}),n=document.createElement("style");n.textContent=Dv,this.labelSlot=document.createElement("slot"),this.labelSlot.className="label",this.labelSlot.setAttribute("part","label"),this.labelSlot.name="label",this.labelSlot.addEventListener("click",()=>this.control?.focus()),this.labelSlot.addEventListener("slotchange",this.onLabelSlotChange),this.field=document.createElement("div"),this.field.className="field",this.field.setAttribute("part","field"),this.leadingSlot=document.createElement("slot"),this.leadingSlot.name="leading",this.leadingSlot.setAttribute("part","leading");let r=document.createElement("slot");r.name="trailing",r.setAttribute("part","trailing");let a=document.createElement("slot");a.name="clear",a.setAttribute("part","clear"),this.field.append(this.leadingSlot,a,r),this.addEventListener(Tv,()=>{this.dispatchEvent(new CustomEvent(Mv,{bubbles:!0,cancelable:!0}))&&this.clear()}),this.hintSlot=document.createElement("slot"),this.hintSlot.className="hint",this.hintSlot.setAttribute("part","hint"),this.hintSlot.name="hint",this.hintSlot.addEventListener("slotchange",this.onHintSlotChange);let o=document.createElement("slot");e.append(n,this.labelSlot,this.field,o,this.hintSlot)}getAnchorRect(){return this.field.getBoundingClientRect()}connectedCallback(){if(Av(this.doc),Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}this.control||this.buildControl(),this.ready=!0}[Gt](e){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0,this.popupControls=null,this.popupActiveDescendant=null}else this.popupAriaSource=e.source,"controls"in e&&(this.popupControls=e.controls??null),"activeDescendant"in e&&(this.popupActiveDescendant=e.activeDescendant??null);this.applyPopupAria()}attributeChangedCallback(e,n,r){if(Ro.has(e)){if(this.consumingAria.has(e))return;this.consumeAria(e,r);return}if(!(!this.ready&&e!=="value"&&e!=="defaultvalue")){if(e==="multiline"||e==="button"||e==="rows"||e==="maxrows"){if(!this.control)return;let a=this.hasAttribute("multiline")||this.hasAttribute("rows"),o=this.control instanceof HTMLTextAreaElement,i=!a&&this.hasAttribute("button"),s=this.control instanceof HTMLButtonElement;a!==o||i!==s?this.buildControl(this.value):this.control instanceof HTMLTextAreaElement&&this.configureTextarea(this.control);return}if(e==="status"){this.syncStatus(),this.updateValidity();return}if(e==="disabled"){this.syncDisabled();return}if(e==="value"){r!==null&&(this.value=r);return}e!=="defaultvalue"&&this.control&&(this.forward(e,r),this.syncButtonPresentation(),this.updateValidity())}}consumeAria(e,n){n==null?this.delegatedAria.delete(e):this.delegatedAria.set(e,n),this.hasAttribute(e)&&(this.consumingAria.add(e),super.removeAttribute(e),this.consumingAria.delete(e)),this.applyDelegatedAria(e),this.queueDelegatedAria()}removeAttribute(e){if(Ro.has(e)&&!this.consumingAria.has(e)&&!this.hasAttribute(e)){let n=e;this.delegatedAria.delete(n)&&(this.applyDelegatedAria(n),this.queueDelegatedAria());return}super.removeAttribute(e)}toggleAttribute(e,n){if(Ro.has(e)){let r=e,a=n??!this.delegatedAria.has(r);return this.consumeAria(r,a?"":null),a}return super.toggleAttribute(e,n)}[wh](e){return this.delegatedAria.get(e)??null}[kh](e,n){this.consumeAria(e,n==null?null:String(n))}applyDelegatedAria(e){let n=this.control;n&&(Hn(this,n,e,this.delegatedAria.get(e)??null),(e==="aria-label"||e==="aria-labelledby")&&this.applyLabelAria(),(e==="aria-description"||e==="aria-describedby")&&this.applyDescriptionAria(),e==="aria-invalid"&&!this.delegatedAria.has(e)&&this.syncStatus(),(e==="aria-controls"||e==="aria-activedescendant")&&this.applyPopupAria())}queueDelegatedAria(){this.ariaApplyQueued||(this.ariaApplyQueued=!0,queueMicrotask(()=>{this.ariaApplyQueued=!1;let e=this.control;if(e)for(let[n,r]of this.delegatedAria)Hn(this,e,n,r)}))}buildControl(e){let n=this.control,r=n!=null&&this.shadowRoot?.activeElement===n,a=null,o=null;if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)try{a=n.selectionStart,o=n.selectionEnd}catch{}let i=this.hasAttribute("multiline")||this.hasAttribute("rows"),s=!i&&this.hasAttribute("button"),l=document.createElement(s?"button":i?"textarea":"input");l instanceof HTMLButtonElement&&(l.type="button"),l.setAttribute("part","input"),this.control?this.control.replaceWith(l):this.leadingSlot.after(l),this.control=l;for(let d of vh)l instanceof HTMLTextAreaElement&&d==="type"||this.forward(d,this.getAttribute(d));this.syncDisabled(),this.syncStatus();for(let[d,u]of this.delegatedAria)Hn(this,l,d,u);this.queueDelegatedAria(),this.applyLabelAria(),this.applyDescriptionAria(),this.applyPopupAria(),i&&this.configureTextarea(l);let c=e??this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??"";if(l.value=c,this.syncButtonPresentation(),l.addEventListener("input",this.onInput),l.addEventListener("change",this.onChange),l.addEventListener("focus",this.onFocus),l.addEventListener("blur",this.onBlur),r&&(l.focus(),a!=null&&(l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)))try{l.setSelectionRange(a,o??a)}catch{}this.syncFormValue(c),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}configureTextarea(e){let n=this.getAttribute("rows"),r=this.getAttribute("maxrows");n!=null?(e.rows=Math.max(1,parseInt(n,10)||1),e.style.setProperty("field-sizing","fixed"),e.style.removeProperty("--_maxrows"),e.style.removeProperty("height")):(e.rows=1,yh?e.style.setProperty("field-sizing","content"):e.style.removeProperty("field-sizing"),r!=null?e.style.setProperty("--_maxrows",String(parseInt(r,10)||1)):e.style.removeProperty("--_maxrows"),this.syncAutoHeight())}syncAutoHeight=()=>{if(yh)return;let e=this.control;!(e instanceof HTMLTextAreaElement)||this.getAttribute("rows")!=null||(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)};forward(e,n){let r=this.control;r&&(r instanceof HTMLButtonElement||r instanceof HTMLTextAreaElement&&e==="type"||(Sv.has(e)?r.toggleAttribute(e,n!=null):n==null?r.removeAttribute(e):r.setAttribute(e,n)))}syncDisabled(){this.control&&(this.control.disabled=this.hasAttribute("disabled")||this.formDisabled)}syncButtonPresentation(){let e=this.control;if(!(e instanceof HTMLButtonElement))return;let n=e.value;e.textContent=n||this.getAttribute("placeholder")||"",e.classList.toggle("placeholder",!n)}syncFormValue(e){this.internals?.setFormValue(this.control instanceof HTMLButtonElement?null:e)}syncStatus(){let e=this.getAttribute("status")==="critical",n=this.delegatedAria.get("aria-invalid");this.control?.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.internals?.states?.add("invalid"):this.internals?.states?.delete("invalid")}catch{}}onInput=e=>{let n=this.control?.value??"";this.syncFormValue(n),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),e.composed||this.dispatchEvent(new Event("input",{bubbles:!0}))};onChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))};onFocus=()=>{try{Ws?this.internals?.states?.add("kb-focus"):this.internals?.states?.delete("kb-focus")}catch{}};onBlur=()=>{try{this.internals?.states?.delete("kb-focus")}catch{}};onLabelSlotChange=()=>{this.applyLabelAria()};applyLabelAria(){let e=this.control;if(!e||this.delegatedAria.has("aria-label")||this.delegatedAria.has("aria-labelledby"))return;let n=this.labelSlot.assignedNodes().map(r=>r.textContent??"").join(" ").trim();n?e.setAttribute("aria-label",n):e.removeAttribute("aria-label")}onHintSlotChange=()=>{this.applyDescriptionAria()};applyDescriptionAria(){let e=this.control;if(!e||this.delegatedAria.has("aria-description")||this.delegatedAria.has("aria-describedby"))return;let n=this.hintSlot.assignedNodes().map(r=>r.textContent??"").join(" ").trim();n?e.setAttribute("aria-description",n):e.removeAttribute("aria-description")}applyPopupAria(){let e=this.control;if(e)try{!this.delegatedAria.has("aria-controls")&&"ariaControlsElements"in e&&(e.ariaControlsElements=this.popupControls?[this.popupControls]:null),!this.delegatedAria.has("aria-activedescendant")&&"ariaActiveDescendantElement"in e&&(e.ariaActiveDescendantElement=this.popupActiveDescendant)}catch{}}updateFilled(){this.value?this.internals?.states?.add("filled"):this.internals?.states?.delete("filled")}updateValidity(){let e=this.control;!this.internals||!e||(this.getAttribute("status")==="critical"&&e.validity.valid?this.internals.setValidity({customError:!0},"Invalid value.",e):this.internals.setValidity(e.validity,e.validationMessage,e))}get value(){return this.control?this.control.value:this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??""}set value(e){this.pendingValue=e,this.control&&this.control.value!==e&&(this.control.value=e),this.syncButtonPresentation(),this.syncFormValue(e),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}focus(e){this.control?.focus(e)}clear(){this.control&&(this.control.value="",this.syncButtonPresentation(),this.syncFormValue(""),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent(Iv,{bubbles:!0})),this.control.focus())}get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}formResetCallback(){this.value=this.getAttribute("defaultvalue")??"",this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}formDisabledCallback(e){this.formDisabled=e,this.syncDisabled()}formStateRestoreCallback(e){this.value=e??""}};for(let t of No)Object.defineProperty(ba.prototype,_o(t),{configurable:!0,enumerable:!0,get(){return this[wh](t)},set(e){this[kh](t,e)}});function Eh(){typeof customElements>"u"||customElements.get("a-input")||customElements.define("a-input",ba)}Eh();var Ys=t=>{let e=t.toString().match(/(?:\.(\d+))?(?:e([+-]?\d+))?$/i);return Math.max(0,(e?.[1]?.length??0)-Number(e?.[2]??0))},Fo=class extends z{static formAssociated=!0;static observedAttributes=["value","defaultvalue","min","max","step","disabled","track-click","value-display","value-prefix","value-suffix"];internals;#e;#t;#n;#a;#r;#o;#c;#m;#s;#h;#p;#g;#u;#b;#i;#d;#v;#l=0;#k=!1;#x=!1;#E;get value(){return this.#l}set value(e){this.setAttribute("value",String(e))}get defaultValue(){return kt(this.getAttribute("defaultvalue"),this.#f)}set defaultValue(e){this.setAttribute("defaultvalue",String(e))}constructor(){super(),this.internals=this.attachInternals?.();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
|
|
569
|
+
`,Mh=Symbol("readDelegatedAria"),Ih=Symbol("writeDelegatedAria"),ma=class extends B{static formAssociated=!0;static observedAttributes=[...Sh,...qo,"value","defaultvalue","multiline","button","rows","maxrows","status","disabled"];internals;field;labelSlot;hintSlot;leadingSlot;control;pendingValue;ready=!1;formDisabled=!1;delegatedAria=new Map;consumingAria=new Set;ariaApplyQueued=!1;popupAriaSource;popupControls=null;popupActiveDescendant=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch(i){console.warn("a-input: ElementInternals unavailable \u2014 form association disabled.",i)}let e=this.attachShadow({mode:"open",delegatesFocus:!0}),n=document.createElement("style");n.textContent=l0,this.labelSlot=document.createElement("slot"),this.labelSlot.className="label",this.labelSlot.setAttribute("part","label"),this.labelSlot.name="label",this.labelSlot.addEventListener("click",()=>this.control?.focus()),this.labelSlot.addEventListener("slotchange",this.onLabelSlotChange),this.field=document.createElement("div"),this.field.className="field",this.field.setAttribute("part","field"),this.leadingSlot=document.createElement("slot"),this.leadingSlot.name="leading",this.leadingSlot.setAttribute("part","leading");let r=document.createElement("slot");r.name="trailing",r.setAttribute("part","trailing");let a=document.createElement("slot");a.name="clear",a.setAttribute("part","clear"),this.field.append(this.leadingSlot,a,r),this.addEventListener(o0,()=>{this.dispatchEvent(new CustomEvent(i0,{bubbles:!0,cancelable:!0}))&&this.clear()}),this.hintSlot=document.createElement("slot"),this.hintSlot.className="hint",this.hintSlot.setAttribute("part","hint"),this.hintSlot.name="hint",this.hintSlot.addEventListener("slotchange",this.onHintSlotChange);let o=document.createElement("slot");e.append(n,this.labelSlot,this.field,o,this.hintSlot)}getAnchorRect(){return this.field.getBoundingClientRect()}connectedCallback(){if(a0(this.doc),Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}this.control||this.buildControl(),this.ready=!0}[Jt](e){if(e.clear){if(this.popupAriaSource!==e.source)return;this.popupAriaSource=void 0,this.popupControls=null,this.popupActiveDescendant=null}else this.popupAriaSource=e.source,"controls"in e&&(this.popupControls=e.controls??null),"activeDescendant"in e&&(this.popupActiveDescendant=e.activeDescendant??null);this.applyPopupAria()}attributeChangedCallback(e,n,r){if(jo.has(e)){if(this.consumingAria.has(e))return;this.consumeAria(e,r);return}if(!(!this.ready&&e!=="value"&&e!=="defaultvalue")){if(e==="multiline"||e==="button"||e==="rows"||e==="maxrows"){if(!this.control)return;let a=this.hasAttribute("multiline")||this.hasAttribute("rows"),o=this.control instanceof HTMLTextAreaElement,i=!a&&this.hasAttribute("button"),s=this.control instanceof HTMLButtonElement;a!==o||i!==s?this.buildControl(this.value):this.control instanceof HTMLTextAreaElement&&this.configureTextarea(this.control);return}if(e==="status"){this.syncStatus(),this.updateValidity();return}if(e==="disabled"){this.syncDisabled();return}if(e==="value"){r!==null&&(this.value=r);return}e!=="defaultvalue"&&this.control&&(this.forward(e,r),this.syncButtonPresentation(),this.updateValidity())}}consumeAria(e,n){n==null?this.delegatedAria.delete(e):this.delegatedAria.set(e,n),this.hasAttribute(e)&&(this.consumingAria.add(e),super.removeAttribute(e),this.consumingAria.delete(e)),this.applyDelegatedAria(e),this.queueDelegatedAria()}removeAttribute(e){if(jo.has(e)&&!this.consumingAria.has(e)&&!this.hasAttribute(e)){let n=e;this.delegatedAria.delete(n)&&(this.applyDelegatedAria(n),this.queueDelegatedAria());return}super.removeAttribute(e)}toggleAttribute(e,n){if(jo.has(e)){let r=e,a=n??!this.delegatedAria.has(r);return this.consumeAria(r,a?"":null),a}return super.toggleAttribute(e,n)}[Mh](e){return this.delegatedAria.get(e)??null}[Ih](e,n){this.consumeAria(e,n==null?null:String(n))}applyDelegatedAria(e){let n=this.control;n&&(Un(this,n,e,this.delegatedAria.get(e)??null),(e==="aria-label"||e==="aria-labelledby")&&this.applyLabelAria(),(e==="aria-description"||e==="aria-describedby")&&this.applyDescriptionAria(),e==="aria-invalid"&&!this.delegatedAria.has(e)&&this.syncStatus(),(e==="aria-controls"||e==="aria-activedescendant")&&this.applyPopupAria())}queueDelegatedAria(){this.ariaApplyQueued||(this.ariaApplyQueued=!0,queueMicrotask(()=>{this.ariaApplyQueued=!1;let e=this.control;if(e)for(let[n,r]of this.delegatedAria)Un(this,e,n,r)}))}buildControl(e){let n=this.control,r=n!=null&&this.shadowRoot?.activeElement===n,a=null,o=null;if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)try{a=n.selectionStart,o=n.selectionEnd}catch{}let i=this.hasAttribute("multiline")||this.hasAttribute("rows"),s=!i&&this.hasAttribute("button"),l=document.createElement(s?"button":i?"textarea":"input");l instanceof HTMLButtonElement&&(l.type="button"),l.setAttribute("part","input"),this.control?this.control.replaceWith(l):this.leadingSlot.after(l),this.control=l;for(let d of Sh)l instanceof HTMLTextAreaElement&&d==="type"||this.forward(d,this.getAttribute(d));this.syncDisabled(),this.syncStatus();for(let[d,u]of this.delegatedAria)Un(this,l,d,u);this.queueDelegatedAria(),this.applyLabelAria(),this.applyDescriptionAria(),this.applyPopupAria(),i&&this.configureTextarea(l);let c=e??this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??"";if(l.value=c,this.syncButtonPresentation(),l.addEventListener("input",this.onInput),l.addEventListener("change",this.onChange),l.addEventListener("focus",this.onFocus),l.addEventListener("blur",this.onBlur),r&&(l.focus(),a!=null&&(l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)))try{l.setSelectionRange(a,o??a)}catch{}this.syncFormValue(c),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}configureTextarea(e){let n=this.getAttribute("rows"),r=this.getAttribute("maxrows");n!=null?(e.rows=Math.max(1,parseInt(n,10)||1),e.style.setProperty("field-sizing","fixed"),e.style.removeProperty("--_maxrows"),e.style.removeProperty("height")):(e.rows=1,Ah?e.style.setProperty("field-sizing","content"):e.style.removeProperty("field-sizing"),r!=null?e.style.setProperty("--_maxrows",String(parseInt(r,10)||1)):e.style.removeProperty("--_maxrows"),this.syncAutoHeight())}syncAutoHeight=()=>{if(Ah)return;let e=this.control;!(e instanceof HTMLTextAreaElement)||this.getAttribute("rows")!=null||(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)};forward(e,n){let r=this.control;r&&(r instanceof HTMLButtonElement||r instanceof HTMLTextAreaElement&&e==="type"||(r0.has(e)?r.toggleAttribute(e,n!=null):n==null?r.removeAttribute(e):r.setAttribute(e,n)))}syncDisabled(){this.control&&(this.control.disabled=this.hasAttribute("disabled")||this.formDisabled)}syncButtonPresentation(){let e=this.control;if(!(e instanceof HTMLButtonElement))return;let n=e.value;e.textContent=n||this.getAttribute("placeholder")||"",e.classList.toggle("placeholder",!n)}syncFormValue(e){this.internals?.setFormValue(this.control instanceof HTMLButtonElement?null:e)}syncStatus(){let e=this.getAttribute("status")==="critical",n=this.delegatedAria.get("aria-invalid");this.control?.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.internals?.states?.add("invalid"):this.internals?.states?.delete("invalid")}catch{}}onInput=e=>{let n=this.control?.value??"";this.syncFormValue(n),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),e.composed||this.dispatchEvent(new Event("input",{bubbles:!0}))};onChange=()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))};onFocus=()=>{try{el?this.internals?.states?.add("kb-focus"):this.internals?.states?.delete("kb-focus")}catch{}};onBlur=()=>{try{this.internals?.states?.delete("kb-focus")}catch{}};onLabelSlotChange=()=>{this.applyLabelAria()};applyLabelAria(){let e=this.control;if(!e||this.delegatedAria.has("aria-label")||this.delegatedAria.has("aria-labelledby"))return;let n=this.labelSlot.assignedNodes().map(r=>r.textContent??"").join(" ").trim();n?e.setAttribute("aria-label",n):e.removeAttribute("aria-label")}onHintSlotChange=()=>{this.applyDescriptionAria()};applyDescriptionAria(){let e=this.control;if(!e||this.delegatedAria.has("aria-description")||this.delegatedAria.has("aria-describedby"))return;let n=this.hintSlot.assignedNodes().map(r=>r.textContent??"").join(" ").trim();n?e.setAttribute("aria-description",n):e.removeAttribute("aria-description")}applyPopupAria(){let e=this.control;if(e)try{!this.delegatedAria.has("aria-controls")&&"ariaControlsElements"in e&&(e.ariaControlsElements=this.popupControls?[this.popupControls]:null),!this.delegatedAria.has("aria-activedescendant")&&"ariaActiveDescendantElement"in e&&(e.ariaActiveDescendantElement=this.popupActiveDescendant)}catch{}}updateFilled(){this.value?this.internals?.states?.add("filled"):this.internals?.states?.delete("filled")}updateValidity(){let e=this.control;!this.internals||!e||(this.getAttribute("status")==="critical"&&e.validity.valid?this.internals.setValidity({customError:!0},"Invalid value.",e):this.internals.setValidity(e.validity,e.validationMessage,e))}get value(){return this.control?this.control.value:this.pendingValue??this.getAttribute("value")??this.getAttribute("defaultvalue")??""}set value(e){this.pendingValue=e,this.control&&this.control.value!==e&&(this.control.value=e),this.syncButtonPresentation(),this.syncFormValue(e),this.updateValidity(),this.updateFilled(),this.syncAutoHeight()}focus(e){this.control?.focus(e)}clear(){this.control&&(this.control.value="",this.syncButtonPresentation(),this.syncFormValue(""),this.updateValidity(),this.updateFilled(),this.syncAutoHeight(),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent(s0,{bubbles:!0})),this.control.focus())}get validity(){return this.internals?.validity}get validationMessage(){return this.internals?.validationMessage??""}get willValidate(){return this.internals?.willValidate??!1}checkValidity(){return this.internals?.checkValidity()??!0}reportValidity(){return this.internals?.reportValidity()??!0}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}formResetCallback(){this.value=this.getAttribute("defaultvalue")??"",this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}formDisabledCallback(e){this.formDisabled=e,this.syncDisabled()}formStateRestoreCallback(e){this.value=e??""}};for(let t of qo)Object.defineProperty(ma.prototype,Uo(t),{configurable:!0,enumerable:!0,get(){return this[Mh](t)},set(e){this[Ih](t,e)}});function Dh(){typeof customElements>"u"||customElements.get("a-input")||customElements.define("a-input",ma)}Dh();var tl=t=>{let e=t.toString().match(/(?:\.(\d+))?(?:e([+-]?\d+))?$/i);return Math.max(0,(e?.[1]?.length??0)-Number(e?.[2]??0))},Wo=class extends B{static formAssociated=!0;static observedAttributes=["value","defaultvalue","min","max","step","disabled","track-click","value-display","value-prefix","value-suffix"];internals;#e;#t;#n;#a;#r;#o;#c;#m;#s;#h;#p;#g;#u;#f;#i;#d;#v;#l=0;#k=!1;#x=!1;#E;get value(){return this.#l}set value(e){this.setAttribute("value",String(e))}get defaultValue(){return St(this.getAttribute("defaultvalue"),this.#b)}set defaultValue(e){this.setAttribute("defaultvalue",String(e))}constructor(){super(),this.internals=this.attachInternals?.();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
|
|
561
570
|
:host {
|
|
562
571
|
display: grid;
|
|
563
572
|
grid-template-columns: minmax(0, 1fr);
|
|
@@ -710,7 +719,7 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
710
719
|
.fill,
|
|
711
720
|
.thumb { transition: none; }
|
|
712
721
|
}
|
|
713
|
-
`,this.#r=document.createElement("div"),this.#r.className="header",this.#r.part.add("header"),this.#o=document.createElement("slot"),this.#o.name="label",this.#o.part.add("label");let r=document.createElement("span");r.className="inline-separator",r.textContent=":",this.#c=document.createElement("span"),this.#c.className="inline-value",this.#c.part.add("value"),this.#m=document.createElement("span"),this.#m.className="value-affix",this.#s=document.createElement("span"),this.#s.className="value-affix",this.#c.append(this.#m,this.#s),this.#h=document.createElement("span"),this.#h.className="end-value",this.#h.part.add("value"),this.#p=document.createElement("span"),this.#p.className="value-affix",this.#g=document.createElement("span"),this.#g.className="value-affix",this.#h.append(this.#p,this.#g),this.#r.append(this.#o,r,this.#c,this.#h),this.#e=document.createElement("div"),this.#e.className="control",this.#e.part.add("control"),this.#t=document.createElement("div"),this.#t.className="rail-area";let a=document.createElement("div");a.className="rail",a.part.add("track"),this.#n=document.createElement("div"),this.#n.className="fill",this.#n.part.add("fill"),this.#a=document.createElement("div"),this.#a.className="thumb",this.#a.part.add("thumb"),this.#u=document.createElement("span"),this.#u.className="thumb-value",this.#u.part.add("thumb-value"),this.#
|
|
722
|
+
`,this.#r=document.createElement("div"),this.#r.className="header",this.#r.part.add("header"),this.#o=document.createElement("slot"),this.#o.name="label",this.#o.part.add("label");let r=document.createElement("span");r.className="inline-separator",r.textContent=":",this.#c=document.createElement("span"),this.#c.className="inline-value",this.#c.part.add("value"),this.#m=document.createElement("span"),this.#m.className="value-affix",this.#s=document.createElement("span"),this.#s.className="value-affix",this.#c.append(this.#m,this.#s),this.#h=document.createElement("span"),this.#h.className="end-value",this.#h.part.add("value"),this.#p=document.createElement("span"),this.#p.className="value-affix",this.#g=document.createElement("span"),this.#g.className="value-affix",this.#h.append(this.#p,this.#g),this.#r.append(this.#o,r,this.#c,this.#h),this.#e=document.createElement("div"),this.#e.className="control",this.#e.part.add("control"),this.#t=document.createElement("div"),this.#t.className="rail-area";let a=document.createElement("div");a.className="rail",a.part.add("track"),this.#n=document.createElement("div"),this.#n.className="fill",this.#n.part.add("fill"),this.#a=document.createElement("div"),this.#a.className="thumb",this.#a.part.add("thumb"),this.#u=document.createElement("span"),this.#u.className="thumb-value",this.#u.part.add("thumb-value"),this.#f=document.createElement("span"),this.#f.className="value-affix",this.#i=document.createElement("span"),this.#i.className="value-affix",this.#u.append(this.#f,this.#i),this.#t.append(a,this.#n,this.#a,this.#u),this.#e.append(this.#t),this.#d=document.createElement("slot"),this.#d.name="markers",this.#d.part.add("markers"),this.#v=document.createElement("slot"),this.#v.part.add("extras");for(let o of[this.#o,this.#d,this.#v])o.addEventListener("slotchange",()=>this.#L());this.#e.addEventListener("pointerdown",o=>this.#_(o)),this.#e.addEventListener("pointermove",o=>this.#R(o)),this.#e.addEventListener("pointerup",o=>this.#z(o)),this.#e.addEventListener("pointercancel",o=>this.#z(o)),this.#e.addEventListener("lostpointercapture",o=>this.#z(o)),this.addEventListener("keydown",o=>this.#F(o)),this.addEventListener("blur",()=>delete this.#e.dataset.pointerFocus),e.append(n,this.#r,this.#e,this.#d,this.#v)}connectedCallback(){this.#k||(this.#l=this.#T(),this.#k=!0),this.#M(),this.#L()}attributeChangedCallback(e){this.#k&&(e==="value"?this.hasAttribute("value")?(this.#l=this.#w(St(this.getAttribute("value"),this.#b)),this.#x=!1):this.#x||(this.#l=this.#T()):e==="defaultvalue"&&!this.hasAttribute("value")&&!this.#x?this.#l=this.#T():(e==="min"||e==="max"||e==="step")&&(this.#l=this.#w(this.#l)),this.#M(),e==="value-display"&&this.#L())}formResetCallback(){let e=this.#l;this.#l=this.#w(St(this.getAttribute("defaultvalue"),this.#b)),this.#x=!1,this.#M(),this.#l!==e&&this.#P()}formStateRestoreCallback(e){typeof e=="string"&&(this.#l=this.#w(St(e,this.#b)),this.#x=!0,this.#M())}formDisabledCallback(){this.#M()}get#b(){return St(this.getAttribute("min"),0)}get#C(){return Math.max(this.#b,St(this.getAttribute("max"),100))}get#S(){let e=St(this.getAttribute("step"),1);return e>0?e:1}get#I(){return this.hasAttribute("disabled")||this.matches(":disabled")}#T(){let e=this.getAttribute("value")??this.getAttribute("defaultvalue");return this.#w(St(e,this.#b))}#w(e){let n=this.#b,r=this.#C,a=this.#S,o=n+Math.round((Math.min(r,Math.max(n,e))-n)/a)*a,i=Math.min(12,Math.max(tl(n),tl(r),tl(a)));return Number(Math.min(r,Math.max(n,o)).toFixed(i))}#A(e=this.#l){let n=this.#C-this.#b;return n>0?(e-this.#b)/n*100:0}#M(){let e=`${this.#A()}%`;this.#t.style.setProperty("--_percent",e);let n=this.#N(),r=String(this.#l),a=this.getAttribute("value-prefix")??"",o=this.getAttribute("value-suffix")??"";for(let[s,l,c]of[[this.#c,this.#m,this.#s],[this.#h,this.#p,this.#g],[this.#u,this.#f,this.#i]])s.textContent=r,l.textContent=a,c.textContent=o,s.prepend(l),s.append(c);let i=this.internals;i&&(i.ariaValueMin=String(this.#b),i.ariaValueMax=String(this.#C),i.ariaValueNow=String(this.#l),i.ariaValueText=n,i.setFormValue(this.#I?null:String(this.#l),String(this.#l)))}#N(){return`${this.getAttribute("value-prefix")??""}${this.#l}${this.getAttribute("value-suffix")??""}`}#L(){let e=n=>n.assignedNodes({flatten:!0}).length>0;this.#r.hidden=!e(this.#o)&&this.getAttribute("value-display")==="none",this.#d.hidden=!e(this.#d),this.#v.hidden=!e(this.#v)}#y(e){let n=this.#w(e);return n===this.#l?!1:(this.#l=n,this.#x=!0,this.#M(),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),!0)}#P(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}#B(e){let n=this.#t.getBoundingClientRect();return n.width<=0?this.#l:this.#b+(e-n.left)/n.width*(this.#C-this.#b)}#_(e){this.#I||e.button!==0||this.#t.getBoundingClientRect().width<=0||(this.#E={pointerId:e.pointerId,startX:e.clientX,startValue:this.#l},this.#e.setPointerCapture(e.pointerId),this.#e.dataset.dragging="",this.#e.dataset.pointerFocus="",this.focus({preventScroll:!0}),this.getAttribute("track-click")==="jump"&&this.#y(this.#B(e.clientX)),e.preventDefault())}#R(e){let n=this.#E;if(!n||n.pointerId!==e.pointerId)return;if(!(e.buttons&1)){this.#z(e);return}let r=this.getAttribute("track-click")==="jump"?this.#B(e.clientX):n.startValue+(e.clientX-n.startX)/this.#t.getBoundingClientRect().width*(this.#C-this.#b);this.#y(r),e.preventDefault()}#z(e){let n=this.#E;!n||n.pointerId!==e.pointerId||(this.#E=void 0,delete this.#e.dataset.dragging,this.#e.hasPointerCapture(e.pointerId)&&this.#e.releasePointerCapture(e.pointerId),this.#l!==n.startValue&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}#F(e){if(e.target!==this||this.#I||je(e))return;delete this.#e.dataset.pointerFocus;let n=Math.max(this.#S,(this.#C-this.#b)/10),r;switch(e.key){case"ArrowRight":case"ArrowUp":r=this.#l+this.#S;break;case"ArrowLeft":case"ArrowDown":r=this.#l-this.#S;break;case"PageUp":r=this.#l+n;break;case"PageDown":r=this.#l-n;break;case"Home":r=this.#b;break;case"End":r=this.#C;break;default:return}e.preventDefault(),this.#y(r)&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}};function Oh(){typeof customElements>"u"||customElements.get("a-slider")||customElements.define("a-slider",Wo)}Oh();var rl=["aria-label","aria-labelledby","aria-description","aria-describedby","aria-invalid","aria-errormessage"],nl=new Set(rl),Lh=Symbol("readDelegatedAria"),Rh=Symbol("writeDelegatedAria"),c0="clearrequest",d0="clearinput",fa=t=>String(t).padStart(2,"0"),Ph=t=>Array.from(t).reduce((e,n)=>e+(/[ᄀ-ᅟ⺀-가-힣豈-︐-!-⦆¢-₩]/u.test(n)?2:1),0),u0=(t,e)=>e==="pm"?t%12+12:t%12,zh=t=>{let e=/^(\d{1,2}):(\d{2})$/.exec((t??"").trim());return e?{h:Math.min(23,Number(e[1])),min:Math.min(59,Number(e[2]))}:null},h0=`
|
|
714
723
|
:host {
|
|
715
724
|
display: grid;
|
|
716
725
|
grid-template-columns: minmax(0, 1fr);
|
|
@@ -848,7 +857,7 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
848
857
|
font-size: calc(var(--input-time-font-size) - 1px);
|
|
849
858
|
line-height: calc(var(--input-time-line-height) - 2px);
|
|
850
859
|
}
|
|
851
|
-
`,Th=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=Bv;let n=document.createElement("slot");n.className="label",n.part.add("label"),n.name="label";let r=document.createElement("div");r.className="field",r.part.add("field");let a=document.createElement("slot");a.name="leading",a.part.add("leading");let o=document.createElement("div");o.className="segments",o.part.add("segments"),o.setAttribute("role","group");let i=document.createElement("slot");i.name="clear",i.part.add("clear");let s=document.createElement("slot");s.name="trailing",s.part.add("trailing"),r.append(a,o,i,s);let l=document.createElement("slot");return l.className="hint",l.part.add("hint"),l.name="hint",t.content.append(e,n,r,document.createElement("slot"),l),t})(),ga=class extends z{static formAssociated=!0;static observedAttributes=["value","defaultvalue","locale","hour12","status","disabled","min","max","required",...$s];#e;#t;#n;#a;#r;#o=!1;#c=!1;#m=!1;#s=new Map;#h=new Set;#p=!1;#g="";#u=null;#b=null;#i=null;#d=[];#v=[];#l;constructor(){super();try{this.#e=this.attachInternals?.()}catch(n){console.warn("a-input-time: ElementInternals unavailable \u2014 form association disabled.",n)}let e=this.attachShadow({mode:"open",delegatesFocus:!0});if(!Th)throw new Error("a-input-time requires a DOM document");e.append(Th.content.cloneNode(!0)),this.#n=e.querySelector(".label"),this.#n.addEventListener("click",()=>this.#d[0]?.el.focus()),this.#n.addEventListener("slotchange",this.#re),this.#a=e.querySelector(".hint"),this.#a.addEventListener("slotchange",this.#ae),this.#t=e.querySelector(".field"),this.#r=e.querySelector(".segments"),this.#t.addEventListener("mousedown",this.#M),this.#r.addEventListener("input",this.#B),this.#r.addEventListener("keydown",this.#y),this.#r.addEventListener("focusin",this.#R),this.#r.addEventListener("focusout",this.#L),this.#r.addEventListener("paste",this.#O),this.addEventListener(Pv,()=>this.clear())}getAnchorRect(){return this.#t.getBoundingClientRect()}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.#k(e)}else this.#m||this.#k(this.getAttribute("value")??this.getAttribute("defaultvalue")??"");this.#I(),this.#o=!0}#k(e){this.#H(e),this.#g=this.value}attributeChangedCallback(e,n,r){if(Us.has(e)){if(this.#h.has(e))return;this.#x(e,r);return}if(this.#o){if(e==="value"){r!==null&&(this.value=r);return}if(e!=="defaultvalue"){if(e==="locale"||e==="hour12"){this.#I();return}if(e==="status"){this.#X();return}if(e==="disabled"){this.#K();return}if(e==="min"||e==="max"){this.#J();return}if(e==="required"){this.#te(),this.#J();return}}}}#x(e,n){n==null?this.#s.delete(e):this.#s.set(e,n),this.hasAttribute(e)&&(this.#h.add(e),super.removeAttribute(e),this.#h.delete(e)),this.#E(e),this.#f()}removeAttribute(e){if(Us.has(e)&&!this.#h.has(e)&&!this.hasAttribute(e)){let n=e;this.#s.delete(n)&&(this.#E(n),this.#f());return}super.removeAttribute(e)}toggleAttribute(e,n){if(Us.has(e)){let r=e,a=n??!this.#s.has(r);return this.#x(r,a?"":null),a}return super.toggleAttribute(e,n)}[Mh](e){return this.#s.get(e)??null}[Ih](e,n){this.#x(e,n==null?null:String(n))}#E(e){let n=this.#s.get(e)??null;if(e==="aria-invalid"||e==="aria-errormessage"){for(let r of this.#d)Hn(this,r.el,e,n);e==="aria-invalid"&&n==null&&this.#X();return}Hn(this,this.#r,e,n),(e==="aria-label"||e==="aria-labelledby")&&this.#$(),(e==="aria-description"||e==="aria-describedby")&&this.#G()}#f(){this.#p||(this.#p=!0,queueMicrotask(()=>{this.#p=!1;for(let e of this.#s.keys())this.#E(e)}))}get#C(){return this.getAttribute("locale")||(typeof navigator<"u"?navigator.language:"en-US")}get#S(){let e=this.getAttribute("hour12");if(e==="true")return!0;if(e==="false")return!1;try{let n=new Intl.DateTimeFormat(this.#C,{hour:"numeric"}).resolvedOptions().hourCycle;return n==="h11"||n==="h12"}catch{return!1}}#I(){let e=this.#S,n=this.#C,r=this.#g,a=[],o="AM",i="PM";try{let s=new Intl.DateTimeFormat(n,{hour:"numeric",minute:"numeric",hour12:e});a=s.formatToParts(new Date(2e3,0,1,13,5));let l=s.formatToParts(new Date(2e3,0,1,1,5)).find(d=>d.type==="dayPeriod"),c=a.find(d=>d.type==="dayPeriod");l?.value&&(o=l.value),c?.value&&(i=c.value)}catch{a=[{type:"hour",value:"13"},{type:"literal",value:":"},{type:"minute",value:"05"}]}this.#A=o,this.#w=i,this.#r.replaceChildren(),this.#d=[],this.#v=[];for(let s of a)if(s.type==="hour"||s.type==="minute"||s.type==="dayPeriod"){let l=document.createElement("input"),c=s.type==="dayPeriod"?"period":s.type;if(l.className=`seg seg--${c}`,l.type="text",l.spellcheck=!1,l.part.add("segment",c),l.autocomplete="off",l.autocorrect=!1,l.autocapitalize="off",l.setAttribute("aria-label",c==="hour"?"Hour":c==="minute"?"Minute":"AM/PM"),l.inputMode=c==="period"?"text":"numeric",c==="period"){let u=Math.max(2,Sh(this.#A),Sh(this.#w));l.maxLength=u,l.size=u}else l.maxLength=2,l.size=2;let d=c==="hour"?{kind:c,el:l,min:e?1:0,max:e?12:23}:c==="minute"?{kind:c,el:l,min:0,max:59}:{kind:c,el:l,min:0,max:1};this.#r.append(l),this.#d.push(d)}else{if(!s.value.trim())continue;let l=document.createElement("span");l.className="lit",l.part.add("literal"),l.setAttribute("aria-hidden","true"),l.textContent=s.value,this.#r.append(l),this.#v.push(s.value)}this.#H(r);for(let s of this.#s.keys())this.#E(s);this.#f(),this.#$(),this.#G(),this.#te(),this.#X(),this.#K(),this.#P({dispatch:!1})}#A="AM";#w="PM";#T(e){if(e instanceof HTMLInputElement)return this.#d.find(n=>n.el===e)}#M=e=>{let n=this.#T(e.target);if(n){this.#l=n.el;return}(e.target===this.#t||e.target===this.#r)&&(e.preventDefault(),this.#Q(this.#d[0]))};#R=e=>{let n=this.#T(e.target);if(!n)return;let r=this.#l===n.el;this.#l=void 0,r||queueMicrotask(()=>{this.shadowRoot?.activeElement===n.el&&n.el.select()})};#L=e=>{queueMicrotask(()=>{let n=this.shadowRoot?.activeElement;this.#d.some(r=>r.el===n)||(this.#Y()&&this.#P(),this.#Z("change"))})};#y=e=>{let n=this.#T(e.target);if(!n)return;let{el:r}=n,a=e.key;if(a==="ArrowUp"||a==="ArrowDown"){e.preventDefault(),this.#z(n,a==="ArrowUp"?1:-1);return}if(a==="PageUp"||a==="PageDown"){e.preventDefault(),this.#z(n,(a==="PageUp"?1:-1)*(n.kind==="minute"?5:1));return}if(a==="ArrowLeft"||a==="ArrowRight"){let o=r.selectionStart??0,i=r.selectionEnd??o;(a==="ArrowLeft"?o===0&&i===0:o===r.value.length&&i===r.value.length)&&(e.preventDefault(),this.#U(),this.#j(n,a==="ArrowRight"?1:-1));return}if(a==="Backspace"&&r.value===""){e.preventDefault(),this.#j(n,-1);return}n.kind!=="period"&&this.#v.some(o=>o.includes(a))&&(e.preventDefault(),this.#U(),this.#j(n,1,{numeric:!0}))};#O=e=>{let n=e.clipboardData?.getData("text/plain").trim()??"";/^(?:[01]?\d|2[0-3]):[0-5]\d$/.test(n)&&(e.preventDefault(),this.#H(n),this.#P(),this.#Z("change"))};#B=e=>{let n=this.#T(e.target);!n||e.isComposing||(n.kind==="period"?this.#N(e,n):this.#_(n))};#_(e){let{el:n}=e,r=n.value.replace(/\D/g,"");r!==n.value&&(n.value=r);let a=e.kind==="hour"&&this.#S,o=a?23:e.max;if(r===""){e.kind==="hour"?this.#u=null:this.#b=null,this.#P({dispatch:!1,preserve:n});return}let i=r.slice(0,2),s=Number(i),l=!1;s>o&&(i=i.at(-1),s=Number(i),l=!0);let c=i.length===2||+`${s}0`>o;a?s===0&&i.length===1?this.#u=null:s===0?(this.#u=12,this.#i="am"):s>12?(this.#u=s-12,this.#i="pm"):(this.#u=s,this.#i==null&&(this.#i="am")):this.#F(e,Math.max(e.min,s)),this.#P({dispatch:!1,preserve:l||c?void 0:n}),c&&this.#j(e,1)}#N(e,n){let{el:r}=n,a=r.value.trim();if(!a){this.#i=null,this.#P({dispatch:!1,preserve:r});return}let o=a.toLowerCase(),i=this.#A.toLowerCase(),s=this.#w.toLowerCase(),l=o==="a"||o==="am"||o===i?"am":o==="p"||o==="pm"||o===s?"pm":null;if(l){this.#i=l,this.#P({dispatch:!1}),this.#j(n,1);return}if(i.startsWith(o)||s.startsWith(o)){this.#i=null,this.#P({dispatch:!1,preserve:r});return}e.stopPropagation(),r.value=this.#i==="pm"?this.#w:this.#i==="am"?this.#A:""}#z(e,n){if(e.kind==="period"){this.#i=this.#i==null?"am":this.#i==="am"?"pm":"am",this.#Y(),this.#P();return}let r=e.kind==="hour"?this.#u:this.#b,a=e.max-e.min+1,o;r==null?o=n>0?e.min:e.max:o=((r-e.min+n)%a+a)%a+e.min,this.#F(e,o),this.#Y(),this.#P()}#F(e,n){e.kind==="hour"?this.#u=n:this.#b=n,e.kind==="hour"&&this.#S&&this.#i==null&&(this.#i="am")}#V(e){let n=Ah(e);return n?n.h*60+n.min:null}get#W(){return this.#V(this.getAttribute("min"))}get#q(){return this.#V(this.getAttribute("max"))}#D(){let e=this.#ee;return e==null||this.#b==null?null:e*60+this.#b}#Y(){let e=this.#D();if(e==null)return!1;let n=this.#W,r=this.#q,a=e;return n!=null&&a<n&&(a=n),r!=null&&a>r&&(a=r),a===e?!1:(this.#H(`${fa(Math.floor(a/60))}:${fa(a%60)}`),!0)}#Q(e){e&&(e.el.focus(),e.el.select())}#j(e,n,r={}){let a=this.#d.indexOf(e);for(let o=a+n;o>=0&&o<this.#d.length;o+=n){let i=this.#d[o];if(!r.numeric||i.kind!=="period"){this.#Q(i);return}}}get#ee(){return this.#u==null?null:this.#S?this.#i==null?null:zv(this.#u,this.#i):this.#u}#P({dispatch:e=!0,preserve:n}={}){this.#U(n),this.#g=this.value,this.#e?.setFormValue(this.value),this.#oe(),this.#J(),e&&this.#Z("input")}#U(e){for(let n of this.#d)this.#ne(n,e===n.el)}#ne(e,n){let r=e.el;if(e.kind==="period"){let o=this.#i==="pm"?this.#w:this.#i==="am"?this.#A:"";n||(r.value=o),r.placeholder=this.#A;return}let a=e.kind==="hour"?this.#u:this.#b;n||(r.value=a==null?"":fa(a)),r.placeholder="\u2013\u2013"}#H(e){let n=Ah(e);if(!n){this.#u=null,this.#b=null,this.#i=null;return}this.#b=n.min,this.#S?(this.#u=(n.h+11)%12+1,this.#i=n.h<12?"am":"pm"):(this.#u=n.h,this.#i=null)}#Z(e){this.dispatchEvent(new Event(e,{bubbles:!0,composed:e==="input"}))}#$(){if(this.#s.has("aria-label")||this.#s.has("aria-labelledby"))return;let e=this.#n.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#r.setAttribute("aria-label",e):this.#r.removeAttribute("aria-label")}#re=()=>{this.#$()};#G(){if(this.#s.has("aria-description")||this.#s.has("aria-describedby"))return;let e=this.#a.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#r.setAttribute("aria-description",e):this.#r.removeAttribute("aria-description")}#ae=()=>{this.#G()};#K(){let e=this.hasAttribute("disabled")||this.#c;for(let n of this.#d)n.el.disabled=e}#X(){let e=this.getAttribute("status")==="critical",n=this.#s.get("aria-invalid");for(let r of this.#d)r.el.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.#e?.states?.add("invalid"):this.#e?.states?.delete("invalid")}catch{}}#te(){let e=this.hasAttribute("required");for(let n of this.#d)n.el.setAttribute("aria-required",e?"true":"false")}#oe(){this.value?this.#e?.states?.add("filled"):this.#e?.states?.delete("filled")}#J(){if(!this.#e)return;let e=this.#d[0]?.el??this,n=this.hasAttribute("required"),r=this.#D(),a=this.#W,o=this.#q;n&&!this.value?this.#e.setValidity({valueMissing:!0},"Please enter a time.",e):r!=null&&a!=null&&r<a?this.#e.setValidity({rangeUnderflow:!0},`Time must be ${this.getAttribute("min")} or later.`,e):r!=null&&o!=null&&r>o?this.#e.setValidity({rangeOverflow:!0},`Time must be ${this.getAttribute("max")} or earlier.`,e):this.getAttribute("status")==="critical"?this.#e.setValidity({customError:!0},"Invalid value.",e):this.#e.setValidity({})}get value(){let e=this.#ee;return e==null||this.#b==null?"":`${fa(e)}:${fa(this.#b)}`}set value(e){this.#m=!0;let n=e??"";n!==this.value&&(this.#H(n),this.#o?this.#P({dispatch:!1}):this.#g=this.value)}clear(){this.#u=null,this.#b=null,this.#i=null,this.#P(),this.#Z("change"),this.dispatchEvent(new CustomEvent(Ov,{bubbles:!0})),this.#d[0]?.el.focus()}focus(e){this.#d[0]?.el.focus(e)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get validity(){return this.#e?.validity}get validationMessage(){return this.#e?.validationMessage??""}get willValidate(){return this.#e?.willValidate??!1}checkValidity(){return this.#e?.checkValidity()??!0}reportValidity(){return this.#e?.reportValidity()??!0}formResetCallback(){this.#H(this.getAttribute("defaultvalue")??""),this.#P(),this.#Z("change")}formDisabledCallback(e){this.#c=e,this.#K()}formStateRestoreCallback(e){this.value=e??""}};for(let t of $s)Object.defineProperty(ga.prototype,_o(t),{configurable:!0,enumerable:!0,get(){return this[Mh](t)},set(e){this[Ih](t,e)}});function Dh(){typeof customElements>"u"||customElements.get("a-input-time")||customElements.define("a-input-time",ga)}Dh();var Gs=globalThis.Temporal;var Ph=(t,e)=>`Non-positive ${t}: ${e}`,Oh=(t,e)=>`Non-finite ${t}: ${e}`,zh=t=>`Cannot convert bigint to ${t}`,Bh="Invalid object",va=(t,e,n,r)=>Vn(t,e)+`; must be between ${n}-${r}`,Vn=(t,e)=>`Invalid ${t}: ${e}`;var Ks=1e3,Xs=1e6,Js=1e9,Qs=6e10,el=36e11;function ht(t){return t===void 0?Object.create(null):qn(t)}function Ho(t,e="number"){if(typeof t=="bigint")throw new TypeError(zh(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Oh(e,t));return t}function Re(t,e){return Math.trunc(Ho(t,e))||0}function Vo(t,e){return Lh(Re(t,e),e)}function Lh(t,e="number"){if(t<=0)throw new RangeError(Ph(e,t));return t}function tl(t,e,n){return Math.min(Math.max(t,e),n)}function kr(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function qn(t){if(!kr(t))throw new TypeError(Bh);return t}var Ko=Vn;var Ca=t=>`Missing ${t}`,Wh=t=>"No valid fields: "+t.join(),Yh="Invalid bag",Uh=(t,e,n)=>Vn(t,e)+"; must be "+Object.keys(n).join(),$h="Cannot use valueOf",Gh="Invalid calling context",Xo=t=>"Missing year"+(t?"/era/eraYear":""),Zn="Invalid leap month",Kh=t=>Vn("Calendar",t),Xh=(t,e)=>`Unknown calendar ${t}; might need ${e}`,gl=t=>Vn("TimeZone",t),mn="Out-of-bounds date";var Jh=t=>`Cannot parse: ${t}`,Xt=t=>`Invalid substring: ${t}`;var vl=tl,Ke=kr;function P(t){throw new RangeError(t)}function he(t){throw new TypeError(t)}function ol(t,e,n,r,a){return _t(e,((o,i)=>{let s=o[i];return s===void 0&&he(Ca(i)),s})(t,e),n,r,a)}function _t(t,e,n,r,a,o){let i=vl(e,n,r);return a&&e!==i&&P(((s,l,c,d,u)=>u?va(s,u[l],u[c],u[d]):va(s,l,c,d))(t,e,n,r,o)),i}function Sr(t,e=Map){let n=new e;return(r,...a)=>{if(n.has(r))return n.get(r);let o=t(r,...a);return n.set(r,o),o}}var Qh=t=>Jo({name:t},1),Jo=(t,e)=>xn(n=>({value:n,configurable:1,writable:!e}),t),Sa=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function xn(t,e){let n={};for(let r in e)n[r]=t(e[r],r);return n}function Aa(t,e){let n={};for(let r of t)n[r]=e;return n}function Qo(t){let e={};for(let n of t)e[n]=r=>r[n];return e}function Ft(t,e,n=Object.create(null)){for(let r of t)n[r]=e[r];return n}function ep(t,e,n){for(let r of t)if(e[r]!==n[r])return 0;return 1}function Fv(t,e,n){let r={...n};for(let a=0;a<e;a++)r[t[a]]=0;return r}function Xe(t,...e){return(...n)=>t(...e,...n)}function xl(){}function Nh(t){return t[0].toUpperCase()+t.substring(1)}function Le(...t){return[].concat(...t).sort()}function Ir(t){return new RegExp(`^${t}$`,"i")}function yl(t){return parseInt(t.padEnd(9,"0"))}function wl(t){return t&&t!=="+"?-1:1}function Er(t){return t===void 0?0:parseInt(t)}function Wo(t,e){return String(e).padStart(t,"0")}var Ct=Xe(Wo,2);function Jt(t,e){return Math.sign(t-e)}function Me(t,e){return t<e?-1:t>e?1:0}function tp(t,e){let n=t/e;return t%e<0n?n-1n:n}function kl(t,e){let n=tp(t,e);return[n,t-n*e]}function Rt(t,e){return[Math.floor(t/e),ei(t,e)]}function ei(t,e){return(t%e+e)%e}function Dr(t,e){return Math.trunc(t/e)||0}function El(t,e){return t%e||0}function np(t,e=1){return e*(.5+t/5)}function qo(t){return Math.abs(t%1)===.5}var Cl="iso8601",rp="gregory",Hv={bce:-1,ce:0};function ap(t){let e=t.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,"");return e==="bc"||e==="b"?"bce":e==="ad"||e==="a"?"ce":e}var pt=void 0,op=0;function At(t){return t===pt?"iso8601":t===0?"gregory":t.id}var Vv=/^M(\d{2})(L?)$/;function ip(t){let e=Vv.exec(t);return e||P((n=>`Invalid monthCode: ${n}`)(t)),[parseInt(e[1]),!!e[2]]}function sp(t,e){return"M"+Ct(t)+(e?"L":"")}function il(t,e,n){return t+(e||n&&t>=n?1:0)}var sl={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},Sl=Object.keys(sl);var Ta=Ks,Ma=Xs,yn=Js,Ia=Qs,Da=el,tn=864e11,Tt=[1,Ta,Ma,yn,Ia,Da,tn],qv=BigInt(Ta),Pr=BigInt(Ma),Wn=BigInt(yn),jv=BigInt(Ia),Zv=BigInt(Da),ke=BigInt(tn);function lp(t,e){let n=Number(t/ke),r=Number(t%ke);return n*(tn/e)+(Math.trunc(r/e)+r%e/e)}var Ze=Sl.slice(0,6),Pa=Qo(Ze),ti=["year"],Xn=["day"],Al=["day","month","year"],ni=["offset"],Tl=["timeZone"],Or=["era","eraYear"],Wv=["era","eraYear","year"],cp=["month","monthCode"],Yv=["day","month","monthCode"],ll=Le(Ze),Uv=Le(Or,ti),Oa=Le(cp,ti),dp=Le(Or,Oa),za=Le(["monthCode"],ti),up=Le(Or,za),hp=Le(Xn,["monthCode"]),Jn=Le(Xn,Oa),Qn=Le(Xn,Or,Oa),pp=Le(Jn,Ze),mp=Le(Qn,Ze),$v=Le(Jn,Ze,ni),Gv=Le(Qn,Ze,ni),bp=Le(Jn,Ze,ni,Tl),fp=Le(Qn,Ze,ni,Tl),Kv=Le(Xn,za),Xv=Le(Xn,Or,za),$e=Aa(Ze,0);function Ba(t){return ri(t,1),t}var Jv={hour:23,minute:59,second:59};function ri(t,e){let n={};for(let r of Ze)n[r]=_t(r,t[r],0,Jv[r]||999,e);return n}function st(t){return Il(t)*yn+gp(t)}function Ml(t){return 1e3*Il(t)+t.millisecond}function Il(t){return 3600*t.hour+60*t.minute+t.second}function gp(t){return t.millisecond*Ma+t.microsecond*Ta+t.nanosecond}function Dl(t){let[e,n]=Rt(t,tn);return[vp(n),e]}function vp(t){let[e,n]=Rt(t,Ma),[r,a]=Rt(n,Ta);return Qv(e,r,a)}function Qv(t,e=0,n=0){let[r,a]=Rt(t,36e5),[o,i]=Rt(a,6e4),[s,l]=Rt(i,1e3);return{hour:r,minute:o,second:s,millisecond:l,microsecond:e,nanosecond:n}}function Rh(t){let[e,n]=kl(t,Wn);return[Number(e),Number(n)]}function mt(t){return bn(t)+BigInt(st(t))}function xp(t){return La(t)+Ml(t)}function bn(t){return BigInt(Ht(t))*ke}function La(t){return 864e5*Ht(t)}function Ht(t){return xa(t.year,t.month,t.day)}function xa(t,e=1,n=1){let r=e-1;return t+=Math.floor(r/12),e=ei(r,12),Date.UTC(t%400-400,e,0)/864e5+146097*(Dr(t,400)+1)+n}function Na(t){let[e,n]=kl(t,ke);return{...yp(Number(e)),...vp(Number(n))}}function yp(t){let e=new Date(864e5*ei(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}var wp=1972;function e0(t){return[t,0]}function cl(t,e){if(!e)return{year:1972,month:t}}function t0(t,e,n){return{year:t,month:e,day:n}}function kp(t,e){switch(e){case 2:return ai(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function n0(t){return ai(t)?366:365}function ai(t){return t%4==0&&(t%100!=0||t%400==0)}function Ep(t,e,n){return t+=Dr(n,12),(e+=El(n,12))<1?(t--,e+=12):e>12&&(t++,e-=12),{year:t,month:e}}function r0(t,e,n,r){return 12*(n-t)+r-e}function oi(t){return ei(xa(t.year,t.month,t.day)+4,7)||7}function Cp(t){return xa(t.year,t.month,t.day)-xa(t.year)+1}function Sp(t){let e=t.year,n=Math.floor((Cp(t)-oi(t)+10)/7),r=nl(e);return n<1?n=r=nl(--e):n>r&&(n=1,r=nl(++e)),{weekOfYear:n,yearOfWeek:e,Be:r}}function nl(t){let e=oi({year:t,month:1,day:1});return e===4||e===3&&ai(t)?53:52}function a0({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function Ra(t){return nn(t),Ba(t)}function nn(t){return Ap(t,1),t}function _h(t){return ep(Al,t,Ap(t))}function Ap(t,e){let{year:n}=t,r=ol(t,"month",1,12,e);return{year:n,month:r,day:ol(t,"day",1,kp(n,r),e)}}function xe(t,e){return t?t.ae(e):e}function Yn(t,e,n){return t?t.L(e,n):e0(n)}function _a(t,e){return t===0?a0(e):t&&t.h?.(e)||{}}function Un(t,e,n,r){return t?t.de(e,n,r):t0(e,n,r)}function ya(t,e){return t?t.j(e):12}function wa(t,e,n){return t?t.o(e,n):kp(e,n)}function ii(t,e){let{year:n,month:r}=xe(t,e),[a,o]=Yn(t,n,r);return sp(a,o)}function Pl(t,e){let{year:n}=xe(t,e);return t?t.q(n):ai(n)}function Ol(t,e){let{year:n}=xe(t,e);return ya(t,n)}function zl(t,e){let{year:n,month:r}=xe(t,e);return wa(t,n,r)}function Bl(t,e){let{year:n}=xe(t,e);return t?t.i(n):n0(n)}function Tp(t,e){if(!t)return Cp(e);let{year:n}=xe(t,e),r=Un(t,n,1,1);return Ht(e)-Ht(r)+1}function Mp(t,e){return t===pt?Sp(e).weekOfYear:void 0}function Ip(t,e){return t===pt?Sp(e).yearOfWeek:void 0}var Ee=Sl.map(t=>t+"s"),Ll=Qo(Ee),Dp=Le(Ee),o0=Ee.slice(0,6),Pp=Ee.slice(6),i0=Pp.slice(1),Ie=Aa(Ee,0),Nl=Aa(o0,0),Rl=Xe(Fv,Ee);function Op(t,e){return e==null&&P(Ca(t)),e}var He=Xe(s0,"string");function s0(t,e,n=t){return typeof e!==t&&he(Ko(n,e)),e}function _l(t,e="number"){return Number.isInteger(t)||P(((n,r)=>`Non-integer ${n}: ${r}`)(e,t)),t||0}function Fl(t){return typeof t=="symbol"&&he("Cannot convert Symbol to string"),String(t)}function Hl(t,e){return kr(t)?String(t):He(t,e)}function si(t){return typeof t=="boolean"?BigInt(t?1:0):typeof t=="string"?BigInt(t):(typeof t!="bigint"&&he(`Invalid bigint: ${t}`),t)}function li(t,e){return _l(Ho(t,e),e)}function ci(t,e){return typeof t=="string"?((n,r)=>{let a=Object.create(null);return a[n]=r,a})(e,t):qn(t)}var Qt="smallestUnit";var l0={constrain:0,reject:1},c0={compatible:0,reject:1,earlier:2,later:3},d0={reject:0,use:1,prefer:2,ignore:3},u0={auto:0,never:1,critical:2,always:3},h0={auto:0,never:1,critical:2},p0={auto:0,never:1},m0={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},b0=[Math.floor,t=>qo(t)?Math.floor(t):Math.round(t),Math.ceil,t=>qo(t)?Math.ceil(t):Math.round(t),Math.trunc,t=>qo(t)?Math.trunc(t)||0:Math.round(t),t=>t<0?Math.floor(t):Math.ceil(t),t=>Math.sign(t)*Math.round(Math.abs(t))||0,t=>qo(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)],f0={previous:-1,next:1};function Vl(t){let e=t.roundingIncrement;return e===void 0?1:Re(e,"roundingIncrement")}function ql(t){let e=t.fractionalSecondDigits;if(e!==void 0){if(typeof e!="number"){if(Fl(e)==="auto")return;P(Ko("fractionalSecondDigits",e))}e=_t("fractionalSecondDigits",Math.floor(e),0,9,1)}return e}function jl(t,e,n=0,r){let a=e[t];if(a===void 0)return r?n:void 0;if(a=Fl(a),a==="auto")return r?n:null;let o=sl[a];return o===void 0&&(o=Ee.indexOf(a)),o<0&&P(Uh(t,a,sl)),o}function wn(t,e,n,r=0){let a=n[t];if(a===void 0)return r;let o=Fl(a),i=e[o];return i===void 0&&P(Uh(t,o,e)),i}var zr=Xe(jl,Qt),zp=Xe(jl,"largestUnit"),g0=Xe(jl,"unit"),Bp=Xe(wn,"overflow",l0),Lp=Xe(wn,"disambiguation",c0),v0=Xe(wn,"offset",d0),Zl=Xe(wn,"calendarName",u0),x0=Xe(wn,"timeZoneName",h0),y0=Xe(wn,"offset",p0),Br=Xe(wn,"roundingMode",m0),w0=Xe(wn,"direction",f0);function Wl(t,e,n,r){let a=r?tn:Tt[e+1];if(a){let o=Tt[e];a%((t=_t("roundingIncrement",t,1,a/o-(r?0:1),1))*o)&&P(Ko("roundingIncrement",t))}else t=_t("roundingIncrement",t,1,n?10**9:1,1);return t}function Ar(t,e,n,r){return e!=null&&_t(t,e,n,r,1,Sl),e}function Np(t,e){e>t&&P("smallestUnit > largestUnit")}function Lr(t,e,n,r=9,a=0,o=4){e=ht(e);let i=zp(e,a),s=Vl(e),l=Br(e,o),c=zr(e,a,1);return i=Ar("largestUnit",i,a,r),c=Ar(Qt,c,a,r),i==null?i=Math.max(n,c):Np(i,c),s=Wl(s,c,1),t&&(l=(d=>d<4?(d+2)%4:d)(l)),[i,c,s,l]}function Fa(t,e=6,n){let r=Vl(t=ci(t,Qt)),a=Br(t,7),o=zr(t);return o=Op(Qt,o),o=Ar(Qt,o,0,e),r=Wl(r,o,void 0,n),[o,r,a]}function pe(t,e){return Ft(Al,t,Ft(Ze,e))}function se(t){return t===void 0?0:Bp(qn(t))}function Tr(t,e=0){t=ht(t);let n=Lp(t),r=v0(t,e);return[Bp(t),r,n]}var Rp=BigInt(1e8)*ke,Yl=BigInt(-1e8)*ke,_p=Yl-ke,Fp=-3261848;function di(t){let e=12*t.year+t.month;return(e<Fp||e>3309129)&&P(mn),t}function Ge(t,e=1){return Hp(bn(t),e),t}function er(t){let e=bn(t);return Hp(e),e!==_p||st(t)||P(mn),t}function Hp(t,e=1){(t<(e?_p:Yl)||t>Rp)&&P(mn)}function Mt(t){return(t<Yl||t>Rp)&&P(mn),t}function Ul(t,e){return Mt(bn(t)+BigInt(st(t)-e))}function bt(t){return{epochNanoseconds:t}}function It(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function Vt(t,e){return Ft(Ze,t,ye(t,e))}function ye(t,e){return Ft(Al,t,{calendar:e})}function tr(t){return Ft(Ze,t)}function Be(t){return Ft(Ee,t,{sign:vi(t)})}function Ha(t){return e=t.epochNanoseconds,Number(tp(e,Pr));var e}function $l(t){return t.epochNanoseconds}function Vp(t,e,n){let r=vn(e),[a,o]=((u,p)=>{let m=p((u=ci(u,"unit")).relativeTo),b=g0(u);return b=Op("unit",b),[b,m]})(n,t),i=Math.max(a,r),s=o&&Kn(o);if(!o&&Cr(i,s))return Fh(e,a);if(o||P("Missing relativeTo"),!e.sign&&Cr(a,s))return 0;let[l,c,d]=nm(o,e,a);return Cr(a,s)?Fh(l,a):k0(l,c,a,d)}function k0(t,e,n,r){let a=vi(t)||1,o=Gl(Rl(n,t),n,a,r,e),i=o.ee,s=o.te,l=Number(s-i),c=Number(e-i);return o.pe[Ee[n]]+c/l*a}function Fh(t,e){return lp(en(t),Tt[e])}function Gl(t,e,n,r,a){let o=Ee[e],i=t,s=0,l=Hh(i,o,n,r);return a&&!((c,d,u,p)=>p>0?Me(d,c)<=0&&Me(c,u)<=0:Me(u,c)<=0&&Me(c,d)<=0)(a,l.ee,l.te,Math.sign(n))&&(i={...t,[o]:t[o]+n},s=1,l=Hh(i,o,n,r)),{...l,pe:i,Ae:s}}function Hh(t,e,n,r){let a={...t,[e]:t[e]+n};return{ee:hl(r,t),te:hl(r,a),se:a}}function qp(t,e,n){let r=n-e,a=t-e;if(!a)return 0;let o=a<0n?-a:a,i=r<0n?-r:r,s=Me(a,0n)===Me(r,0n)?1:-1;return Me(o,i)<=0?o===i?s:np(Me(2n*o,i),s):Number(a)/Number(r)}function jp(t,e,n,r){let{epochNanoseconds:a}=t,{timeZone:o,calendar:i}=t;if(e===0&&n===1)return{epochNanoseconds:a,timeZone:o,calendar:i};if(e===6){let s=pe(De(t),$e),l=pe(kn(s,1),$e),c=fn(o,s),d=fn(o,l);a=Kl(E0(a,c,d),r)?d:c}else{let s=De(t),l=s.offsetNanoseconds;a=Rr(o,ui(s,Nr(e,n),r),l,2,0,1)}return{epochNanoseconds:a,timeZone:o,calendar:i}}function Zp(t){let{timeZone:e}=t,n=pe(De(t),$e),r=pe(kn(n,1),$e),a=fn(e,n);return lp(fn(e,r)-a,Da)}function Wp(t){let{timeZone:e,calendar:n}=t;return It(fn(e,pe(De(t),$e)),e,n)}function E0(t,e,n){return qp(t<n?t:n-1n,e,n)}function ui(t,e,n){let[r,a]=hi(t,e,n),o=pe(kn(t,a),r);return er(o),o}function hi(t,e,n){return Dl(Mr(st(t),e,n))}function Yo(t){return Mr(t,Ia,7)}function Nr(t,e){return Tt[t]*e}function Va(t,e){return BigInt(Tt[t])*BigInt(e)}function C0(t,e,n){let r=Math.min(vn(t),6);return gn(mi(en(t),BigInt(e),n),r)}function pi(t,e,n,r,a,o,i,s){if(r===0&&a===1)return t;let l=vi(t)||1,c=Cr(r,s)?s&&r<6&&n>=6?A0:S0:T0,[d,u,p]=c(l,t,e,n,r,a,o,i);return p&&r!==7&&(d=((m,b,f,g,v,y)=>{for(let w=g+1;w<=f;w++){if(w===7&&f!==7)continue;let T=Rl(w,m);T[Ee[w]]+=v;let k=Me(b,hl(y,T));if(k&&k!==v)break;m=T}return m})(d,u,n,Math.max(6,r),l,i)),d}function mi(t,e,n){return Yp(t,e,n,t/e%2n)}function bi(t,e,n){let[r,a]=kl(t,ke),o=r*ke;return o+Yp(a,e,n,(o/e+a/e)%2n)}function Yp(t,e,n,r){let a=t/e,o=t%e,i=0;o&&(i=np(Me(2n*(o<0n?-o:o),e),Math.sign(Number(o))));let s=Kl(Number(r)+i,n);return(a-r+BigInt(s))*e}function Mr(t,e,n){return Kl(t/e,n)*e}function Kl(t,e){return b0[e](t)}function S0(t,e,n,r,a,o,i){let s=en(e),l=mi(s,Va(a,o),i),c=l-s,d=Math.sign(Number(l/ke)-Number(s/ke))===t,u=gn(l,Math.min(r,6));return[{...e,...u},n+c,d]}function A0(t,e,n,r,a,o,i,s){let l=Number(nr(e)),c=Nr(a,o),d=Mr(l,c,i),u=Gl({...e,...Nl},6,t,s,n),p=u.ee,m=u.te,b=d-Number(m-p),f=0;b&&Math.sign(b)!==t?n=p+BigInt(d):(f+=t,d=Mr(b,c,i),n=m+BigInt(d));let g=xi(d);return[{...e,...g,days:e.days+f},n,!!f]}function T0(t,e,n,r,a,o,i,s){let l=Ee[a],c=Rl(a,e);a===7&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});let d=Dr(e[l],o)*o;c[l]=d;let u=Gl(c,a,o*t,s,n),p=u.ee,m=u.te,b=qp(n,p,m),f=u.pe[l],g=u.se[l],v=Mr(f+b*t*o,o,i),y=v===g;return c[l]=v,[c,y?m:p,u.Ae||y]}function Up(t,e){return t.timeZone.O(t.epochNanoseconds,(n=>{let r=ci(n,"direction"),a=w0(r,0);return a||P(Ko("direction",a)),a})(e))}var De=Sr(M0,WeakMap);function M0(t){let{epochNanoseconds:e,timeZone:n}=t,r=n.B(e);return{...Na(e+BigInt(r)),offsetNanoseconds:r}}function Rr(t,e,n,r=0,a=0,o,i){if(n!==void 0&&r===1&&(r===1||i))return Ul(e,n);r!==2&&r!==0||Ge(e,0);let s=t.N(e);if(n!==void 0&&r!==3){let l=((c,d,u,p)=>{let m=mt(d);p&&(u=Yo(u));for(let b of c){let f=Number(m-b);if(p&&(f=Yo(f)),f===u)return b}})(s,e,n,o);if(l!==void 0)return l;r===0&&P("Invalid TimeZone offset")}return i?mt(e):_r(t,e,a,s)}function _r(t,e,n=0,r=t.N(e)){if(r.length===1)return r[0];if(n===1&&P("Ambiguous offset"),r.length)return r[n===3?1:0];let a=mt(e),o=((s,l)=>{let c=s.B(l-ke);return(d=>(d>tn&&P("Out-of-bounds TimeZone gap"),d))(s.B(l+ke)-c)})(t,a),i=Na(a+BigInt(o*(n===2?-1:1)));return(r=t.N(i))[n===2?0:r.length-1]}function fn(t,e){let n=t.N(e);if(n.length)return n[0];let r=mt(e)-ke;return t.O(r,1)}function Xl(t,e,n,r,a){let o=se(a);r.sign&&vn(r)<8&&P("Cannot use small units");let i=Ge(ka(e,n));return ka(e,$p(e,i,t?Ve(r):r,o))}function Jl(t,e){return Mt(t+(dc(n=e)&&P("Cannot use large units"),nr(n)));var n}function $n(t,e,n){let{calendar:r,epochNanoseconds:a,timeZone:o}=t,i=nr(e),s=a;if(dc(e)){let l=De(t);s=_r(o,pe(Fr(r,l,{...e,...Nl},n),l))+i}else s+=i,se(n);return{...t,epochNanoseconds:Mt(s)}}function Gn(t,e,n,r){let[a,o]=fi(e,n);return er(pe(Fr(t,e,{...n,...Nl,days:n.days+o},r),a))}function Fr(t,e,n,r){if(n.years||n.months||n.weeks)return $p(t,e,n,se(r));se(r);let a=n.days+Number(nr(n)/ke);return a?Ge(kn(e,a)):e}function ka(t,e){return kn(e,1-xe(t,e).day)}function fi(t,e){let n=nr(e),r=Number(n/ke),a=Number(n%ke),[o,i]=Dl(st(t)+a);return[o,r+i]}function kn(t,e){return e?yp(Ht(t)+e):t}function $p(t,e,n,r){let{years:a,months:o,weeks:i,days:s}=n,l;if(s+=Number(nr(n)/ke),a||o)l=dl(t,e,a,o,r);else{if(!i&&!s)return e;l=e}return(i||s)&&(l=kn(l,7*i+s)),Ge(l)}function dl(t,e,n,r,a){let o=xe(t,e),{year:i,month:s,day:l}=o;if(n){let[c,d]=Yn(t,i,s);i+=n,s=ul(t,c,d,t?t.p(i):void 0,a),s=_t("month",s,1,ya(t,i),a)}return r&&({year:i,month:s}=t?t.K(i,s,r):Ep(i,s,r)),l=_t("day",l,1,wa(t,i,s),a),Un(t,i,s,l)}function ul(t,e,n,r,a){if(n){let o=t?t.l:void 0;return r!==void 0&&(o<0||r===e+1)?r:(a===1&&P(Zn),o<0?-o:e)}return il(e,0,r)}function rn(t,e){return At(t)!==At(e)&&P("Mismatching Calendars"),t}function I0(t,e){return t.m!==e.m&&P("Mismatching TimeZones"),t}function Gp(t){return t.timeZone.id}function Ql(t,e,n,r){let[a,o,i,s]=Lr(t,r,3,5),l=gi(e.epochNanoseconds,n.epochNanoseconds,a,o,i,s);return Be(t?Ve(l):l)}function ec(t,e,n,r,a){let[o,i,s,l]=Lr(t,a,5),c=n.epochNanoseconds,d=r.epochNanoseconds,u;if(Me(d,c))if(o<6)u=gi(c,d,o,i,s,l);else{let p=I0(n.timeZone,r.timeZone);u=oc(p,e,n,r,o),u=pi(u,d,o,i,s,l,tm(e,p,n),1)}else u=Ie;return Be(t?Ve(u):u)}function tc(t,e,n,r,a){let[o,i,s,l]=Lr(t,a,6),c=mt(n),d=mt(r),u=Me(d,c),p;return u?o<=6?p=gi(c,d,o,i,s,l):(p=Jp(e,n,r,u,o),p=pi(p,d,o,i,s,l,P0(e,n))):p=Ie,Be(t?Ve(p):p)}function nc(t,e,n,r,a){let[o,i,s,l]=Lr(t,a,6,9,6);return Kp(t,e,n,r,o,i,s,l)}function rc(t,e,n,r,a){let[o,i,s,l]=Lr(t,a,9,9,8),c=ka(e,n),d=ka(e,r);return Qp(c,d)?Kp(t,e,Ge(c),Ge(d),o,i,s,l,8):Be(Ie)}function Kp(t,e,n,r,a,o,i,s,l=6){let c=bn(n),d=bn(r),u;return Me(d,c)?a===6?u=gi(c,d,a,o,i,s):(u=ic(e,n,r,a),o===l&&i===1||(u=pi(u,d,a,o,i,s,em(e,n)))):u=Ie,Be(t?Ve(u):u)}function ac(t,e,n,r){let[a,o,i,s]=Lr(t,r,5,5),l=Mr(st(n)-st(e),Nr(o,i),s),c={...Ie,...xi(l,a)};return Be(t?Ve(c):c)}function oc(t,e,n,r,a){let o=Me(r.epochNanoseconds,n.epochNanoseconds);if(!o)return Ie;if(a<6)return{...Ie,...gn(r.epochNanoseconds-n.epochNanoseconds,a)};if(!Qp(De(n),De(r)))return{...Ie,...gn(r.epochNanoseconds-n.epochNanoseconds,5)};let[i,s,l]=D0(t,n,r,o);return{...a===6?{...Ie,days:Zo(i,s)}:ic(e,i,s,a),...xi(l)}}function Xp(t,e,n,r){let a=mt(e),o=mt(n),i=Me(o,a);return i?r<=6?{...Ie,...gn(o-a,r)}:Jp(t,e,n,i,r):Ie}function Jp(t,e,n,r,a){let o=n,i=st(n)-st(e);return Math.sign(i)===-r&&(o=kn(n,-r),i+=tn*r),{...ic(t,e,o,a),...xi(i)}}function ic(t,e,n,r){if(r<=7){let f=Zo(e,n);return r===7?{...Ie,weeks:Dr(f,7),days:El(f,7)}:{...Ie,days:f}}let a=xe(t,e),o=xe(t,n);if(r===8){let{year:f,month:g,day:v}=a,{year:y,month:w,day:T}=o,k=Math.sign(Jt(y,f)||Jt(w,g)||Zo(e,n)),L=0,N=0;if(k){L=t?t._(f,g,y,w):r0(f,g,y,w);let O=dl(t,e,0,L,0);k*Jt(v,T)>0&&(L-=k,O=dl(t,e,0,L,0)),N=Zo(O,n)}return{...Ie,months:L,days:N}}let{year:i,month:s,day:l}=a,{year:c,month:d,day:u}=o,p=c-i,m=d-s,b=u-l;if(p||m){let f=Math.sign(p||m),g=wa(t,c,d),v=0;if(Math.sign(u-l)===-f){let y=g;({year:c,month:d}=t?t.K(c,d,-f):Ep(c,d,-f)),p=c-i,m=d-s,g=wa(t,c,d),v=f<0?-y:g}if(b=u-Math.min(l,g)+v,p){let[y,w]=Yn(t,i,s),[T,k]=Yn(t,c,d),L=t?t.l:void 0;if(m=L!==void 0&&w&&!k&&(L<0?f>0&&T===-L:f<0&&T===y)?0:T-y||Number(k)-Number(w),Math.sign(m)===-f){let N=f<0&&-ya(t,c);c-=f,p=c-i,m=d-ul(t,y,w,t?t.p(c):void 0,0)+(N||ya(t,c))}else if(t){let N=ul(t,y,w,t.p(c),0);m=t._(c,N,c,d)}}}return{...Ie,years:p,months:m,days:b}}function Qp(t,e){return Jt(t.year,e.year)||Jt(t.month,e.month)||Jt(t.day,e.day)}function D0(t,e,n,r){let a=De(e),o=De(n),i=n.epochNanoseconds,s=0,l=st(o)-st(a);Math.sign(l)===-r&&s++;let c=s+(r>0?1:0);for(;s<=c;s++){let d=kn(o,s*-r),u=_r(t,pe(d,a));if(Me(i,u)!==-r)return[a,d,Number(i-u)]}}function gi(t,e,n,r,a,o){return{...Ie,...gn(mi(e-t,Va(r,a),o),n)}}function Zo(t,e){return Ht(e)-Ht(t)}function em(t,e){return{origin:e,ie:bn(e),calendar:t,he:bn}}function P0(t,e){return{origin:e,ie:mt(e),calendar:t,he:n=>mt(pe(n,e))}}function tm(t,e,n){let r=De(n);return{origin:r,ie:n.epochNanoseconds,calendar:t,he:a=>_r(e,pe(a,r))}}function hl(t,e){return dc(e)?t.he(Fr(t.calendar,t.origin,e)):t.ie}function nm(t,e,n){let{calendar:r}=t;if(Kn(t)){let{timeZone:i}=t,s=$n(t,e);return[oc(i,r,t,s,n),s.epochNanoseconds,tm(r,i,t)]}let a=er(pe(t,$e)),o=Gn(r,a,e);return[Xp(r,a,o,n),mt(o),em(r,t)]}function Vh(t,e){return Kn(t)?$n(t,e).epochNanoseconds:mt(Gn(t.calendar,pe(t,$e),e))}function Kn(t){return"timeZone"in t}function Cr(t,e){return t<=6-(e?1:0)}function sc(t,e,n){let r={};for(let a=e;a>=0;a--){let o=Tt[a];r[n[a]]=Dr(t,o),t=El(t,o)}return r}var O0=2**53;function lc(t,e,n,r,a){let o=t(ht(a).relativeTo),i=Math.max(vn(n),vn(r));return Cr(i,o&&Kn(o))?z0(e,n,r,i):(o||P("Missing relativeTo"),e&&(r=Ve(r)),Be(((s,l,c,d)=>{let{calendar:u}=s;if(Kn(s)){let{timeZone:b}=s,f=$n(s,l);return oc(b,u,s,$n(f,c),d)}let p=pe(s,$e),m=Gn(u,p,l);return Xp(u,p,Gn(u,m,c),d)})(o,n,r,i)))}function z0(t,e,n,r){return Be(En(((a,o,i,s)=>{let l=en(a)+en(o)*BigInt(s?-1:1);return Number.isFinite(Number(l/ke))||P(mn),{...Ie,...gn(l,i)}})(e,n,r,t)))}function rm(t,e,n){let r=vn(e),[a,o,i,s,l]=((b,f,g)=>{b=ci(b,Qt);let v=zp(b),y=g(b.relativeTo),w=Vl(b),T=Br(b,7),k=zr(b);return v===void 0&&k===void 0&&P("Required smallestUnit or largestUnit"),k==null&&(k=0),v==null&&(v=Math.max(k,f)),Np(v,k),w=Wl(w,k,1),w>1&&k>5&&v!==k&&P("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit"),[v,k,w,T,y]})(n,r,t);if(!l&&Math.max(r,a)<=6)return Be(En(((b,f,g,v,y)=>{let w=mi(en(b),Va(g,v),y);return{...Ie,...gn(w,f)}})(e,a,o,i,s)));let c=l&&Kn(l),d=c&&a>=6&&o<6;if(!e.sign&&!d)return e;l||P("Missing relativeTo");let[u,p,m]=nm(l,e,a);return Be(pi(u,p,a,o,i,s,m,c))}function am(t){return t.sign===-1?cc(t):t}function cc(t){return Be(Ve(t))}function Ve(t){let e={};for(let n of Ee)e[n]=-1*t[n]||0;return e}function vi(t,e=Ee){let n=0;for(let r of e){let a=Math.sign(t[r]);a&&(n&&n!==a&&P("Cannot mix duration signs"),n=a)}return n}function En(t){for(let n of i0)_t(n,t[n],-4294967295,4294967295,1);let e=en(t);return om(Number(e/Wn)),t}function om(t){Number.isSafeInteger(t)||P("Out-of-bounds duration")}function en(t){return BigInt(t.days)*ke+nr(t)}function nr(t){return BigInt(t.hours)*Zv+BigInt(t.minutes)*jv+im(t)}function im(t){return BigInt(t.seconds)*Wn+BigInt(t.milliseconds)*Pr+BigInt(t.microseconds)*qv+BigInt(t.nanoseconds)}function gn(t,e=6){let n=Number(t/ke),r=Number(t%ke),a=Tt[e],o=e<=3?Number(t/BigInt(a)):n*(tn/a)+Dr(r,a);Number.isFinite(o)||P(mn),e<=3&&Math.abs(o)/(yn/Tt[e])>=O0&&P(mn);let i=sc(r,e,Ee);return i[Ee[e]]=o,i}function xi(t,e=5){return sc(t,e,Ee)}function dc(t){return!!vi(t,Pp)}function vn(t){let e=9;for(;e>0&&!t[Ee[e]];e--);return e}function qa(t,e){return Me(t.epochNanoseconds,e.epochNanoseconds)}function sm(t,e,n,r){let a=t(ht(r).relativeTo),o=Math.max(vn(e),vn(n));return ep(Ee,e,n)?0:Cr(o,a&&Kn(a))?Me(en(e),en(n)):(a||P("Missing relativeTo"),Me(Vh(a,e),Vh(a,n)))}function uc(t,e){return rr(t,e)||yi(t,e)}function rr(t,e){return Jt(Ht(t),Ht(e))}function yi(t,e){return Jt(st(t),st(e))}function lm(t,e){return!qa(t,e)}function cm(t,e){return!qa(t,e)&&t.timeZone.m===e.timeZone.m&&t.calendar===e.calendar}function dm(t,e){return!uc(t,e)&&t.calendar===e.calendar}function um(t,e){return!rr(t,e)&&t.calendar===e.calendar}function hm(t,e){return!rr(t,e)&&t.calendar===e.calendar}function pm(t,e){return!rr(t,e)&&t.calendar===e.calendar}function mm(t,e){return!yi(t,e)}function Hr(t){return t===0?Hv:t?t.k:void 0}function We(t,e,n=e){return Hr(t)?n:e}function hc(t,e){let n=t||void 0,r=Hr(t),{era:a,eraYear:o,year:i}=e;if(i!==void 0&&(i=Re(i,"year")),o!==void 0&&(o=Re(o,"eraYear")),a!==void 0||o!==void 0){a!==void 0&&o!==void 0||he("Mismatching era/eraYear"),r||P("Forbidden era/eraYear");let s=ap(a),l=r[s];l===void 0&&P((d=>`Invalid era: ${d}`)(a));let c=n?.$?n.$(o,s,l):B0(o,l);i!==void 0&&i!==c&&P("Mismatching year/eraYear"),i=c}else i===void 0&&he(Xo(r));return i}function Uo(t,e,n,r,a){let{month:o,monthCode:i}=e;if(i!==void 0){let s=((l,c,d,u,p=ip(c))=>{let m=l?l.p(d):void 0,[b,f]=p,g=il(b,f,m);if(f){let v=l?l.l:void 0;v===void 0&&P(Zn),v>0?(g>v&&P(Zn),m!==g&&(u===1&&P(Zn),g=il(b,0,m))):(g!==-v&&P(Zn),m===void 0&&u===1&&P(Zn))}return g})(t,i,n,r,a);o!==void 0&&o!==s&&P("Mismatching month/monthCode"),o=s,r=1}else o===void 0&&he("Missing month/monthCode");return _t("month",o,1,ya(t,n),r)}function pl(t,e,n,r,a){return ol(e,"day",1,wa(t,r,n),a)}function B0(t,e){return(e+t)*(Math.sign(e)||1)||0}function ja(t,e){return ri(Ft(Ze,{...$e,...t}),e)}var L0=Ir("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function wi(t){let e=pc(t);return e===void 0&&P(Jh(t)),e}function pc(t,e){let n=L0.exec(t);if(n&&(r=>(a=>{a[0]!=="T"&&a[0]!=="t"||(a=a.slice(1));let o=a.search(/[.,]/),i=o<0?a:a.slice(0,o),s=i.split(":");return s.length===1?/^(?:\d{2}|\d{4}|\d{6})$/i.test(i):(s.length===2||s.length===3)&&s.every(l=>l.length===2&&/^\d{2}$/i.test(l))})(r.slice(1)))(n[0]))return((r,a)=>{let o=r[4]||r[5];return a&&o&&P(Xt(o)),s=(Er(r[2])*Da+Er(r[3])*Ia+Er(r[4])*yn+yl(r[5]||""))*wl(r[1]),Math.abs(s)>=tn&&P("Out-of-bounds offset"),s;var s})(n,e)}var ft={era:Hl,month:Vo,monthCode(t,e){if(typeof t=="string")return t;if(t&&typeof t=="object"){let n=t.toString;if(typeof n=="function")return He(n.call(t),e)}return He(t,e)},day:Vo},mc=Aa(Ze,Re),bm=Aa(Ee,li),bc=Object.assign({},ft,mc),fc={offset(t){return wi(Hl(t))},...bc};function Ae(t,e,n,r,a=!r){let o={},i=0;for(let s of e){let l=t[s];if(l!==void 0){i=1;let c=n[s];c&&(l=c(l,s)),o[s]=l}else r&&r.includes(s)&&he(Ca(s))}return a&&!i&&he(Wh(e)),o}function Za(t,e=$e,n){let r=pe(t,e);return er(r),Vt(r,n)}function Ea(t,e,n){return fm(t,e,gm(t,e),se(n))}function ki(t,e,n){let r=gm(t,e),a=n();return[fm(t,e,r,a[0]),...a]}function fm(t,e,n,r){let a=n[1],o=Uo(t,e,a,r,n[0]);return ye(Ge(Un(t,a,o,pl(t,e,o,a,r))),t)}function gc(t){if(t.monthCode!==void 0)return ip(t.monthCode)}function gm(t,e){let n=Hr(t);return e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||he(Xo(n)),e.monthCode===void 0&&e.month===void 0&&he("Missing month/monthCode"),e.day===void 0&&he(Ca("day")),[gc(e),hc(t,e)]}function vc(t,e,n){let r=Hr(t);e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||he(Xo(r)),e.monthCode===void 0&&e.month===void 0&&he("Missing month/monthCode");let a=gc(e),o=hc(t,e);return ye(di(Un(t,o,Uo(t,e,o,se(n),a),1)),t)}function xc(t,e,n){let r=t===pt,a=Hr(t);e.day===void 0&&he(Ca("day")),r||e.month===void 0||e.year!==void 0||e.era!==void 0&&e.eraYear!==void 0||he(Xo(a));let o=gc(e),i=e.eraYear!==void 0||e.year!==void 0?hc(t,e):void 0,s=se(n),l,c,d;if(i===void 0&&r&&(i=1972),i!==void 0){r||Ge(Un(t,i,1,1));let b=Uo(t,e,i,s,o);l=pl(t,e,b,i,s),[c,d]=Yn(t,i,b)}else{e.monthCode===void 0&&he("Missing month/monthCode"),[c,d]=o;let b=t?t.ne:1972;if(b!==void 0)l=pl(t,e,Uo(t,e,b,s,o),b,s);else{let f=s===0&&t?t.fe?.(c,d,e.day):void 0;l=f!==void 0?f:e.day}}d&&((t&&t.U?.[c])??1/0)<e.day&&(s===1&&P(Zn),d=0,l=vl(e.day,1,(t&&t.R)??1/0));let u=t?t.u(c,!!d,l):cl(c,!!d);for(;!u&&s===0&&l>1;)l--,u=t?t.u(c,!!d,l):cl(c,!!d);u||P("Cannot guess year");let{year:p,month:m}=u;return ye(Ge(Un(t,p,m,l)),t)}var qt=Intl.DateTimeFormat;function N0(t,e){e<-864e13&&P(mn);let n=t.formatToParts(e),r={};for(let a of n)r[a.type]=a.value;return r}var R0={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},rl=-388152e4;function vm(t,e=4){let n=ql(t),r=Br(t,4),a=zr(t);return[r,...wc(Ar(Qt,a,0,e),n)]}function yc(t){return Zl(ht(t))}function xm(t,e){return vm(ht(t),e)}function wc(t,e){return t!=null?[Tt[t],t<4?9-3*t:-1]:[e===void 0?1:10**(9-e),e]}function kc(t,e,n){let[r,a,o,i]=(l=>{let c=ql(l=ht(l)),d=Br(l,4),u=zr(l);return[l.timeZone,d,...wc(Ar(Qt,u,0,4),c)]})(n),s=r!==void 0;return((l,c,d,u,p,m)=>{d=bi(d,BigInt(p),u);let b=c.B(d);return Ic(Na(d+BigInt(b)),m)+(l?Wa(Yo(b)):"Z")})(s,Je(s?t(r):"UTC"),e.epochNanoseconds,a,o,i)}function Ec(t,e){let n=(r=>{r=ht(r);let a=Zl(r),o=ql(r),i=y0(r),s=Br(r,4),l=zr(r);return[a,x0(r),i,s,...wc(Ar(Qt,l,0,4),o)]})(e);return((r,a,o,i,s,l,c,d,u,p)=>{i=bi(i,BigInt(u),d);let m=o.B(i);return Ic(Na(i+BigInt(m)),p)+Wa(Yo(m),c)+H0(a,l)+Dc(r,s)})(t.calendar,t.timeZone.id,t.timeZone,t.epochNanoseconds,...n)}function Cc(t,e){let n=(r=>(r=ht(r),[Zl(r),...vm(r)]))(e);return((r,a,o,i,s,l)=>Ic(ui(a,s,i),l)+Dc(r,o))(t.calendar,t,...n)}function Sc(t,e){return n=t.calendar,r=t,a=yc(e),$o(r)+Dc(n,a);var n,r,a}function Ac(t,e){return ym(t.calendar,wm,t,yc(e))}function Tc(t,e){return ym(t.calendar,F0,t,yc(e))}function ym(t,e,n,r){let a=r>1||r===0&&t!==pt;return r===1?t===pt?e(n):$o(n):a?$o(n)+Em(At(t),r===2):e(n)}function Mc(t,e){return((n,r,a,o)=>km(hi(n,a,r)[0],o))(t,...xm(e))}function Ei(t,e){let[n,r,a]=xm(e,3);return r>1&&En(t={...t,...C0(t,r,n)}),_0(t,a)}function _0(t,e){let{sign:n}=t,r=n===-1?Ve(t):t,{hours:a,minutes:o}=r,i=im(r),s=Number(i/Wn),l=Number(i%Wn);om(s);let c=Pc(l,e),d=e>=0||!n||c;return(n<0?"-":"")+"P"+qh({Y:jn(r.years),M:jn(r.months),W:jn(r.weeks),D:jn(r.days)})+(a||o||s||d?"T"+qh({H:jn(a),M:jn(o),S:jn(s,d)+c}):"")}function qh(t){let e=[];for(let n in t){let r=t[n];r&&e.push(r,n)}return e.join("")}function jn(t,e){if(!t&&!e)return"";let n=Object.create(null);return n.useGrouping=0,t.toLocaleString("fullwide",n)}function Ic(t,e){return $o(t)+"T"+km(t,e)}function $o(t){return wm(t)+"-"+Ct(t.day)}function wm(t){let{year:e}=t;return(e<0||e>9999?Cm(e)+Wo(6,Math.abs(e)):Wo(4,e))+"-"+Ct(t.month)}function F0(t){return Ct(t.month)+"-"+Ct(t.day)}function km(t,e){let n=[Ct(t.hour),Ct(t.minute)];return e!==-1&&n.push(Ct(t.second)+((r,a,o,i)=>Pc(r*Ma+a*Ta+o,i))(t.millisecond,t.microsecond,t.nanosecond,e)),n.join(":")}function Wa(t,e=0){if(e===1)return"";let[n,r]=Rt(Math.abs(t),Da),[a,o]=Rt(r,Ia),[i,s]=Rt(o,yn);return Cm(t)+Ct(n)+":"+Ct(a)+(i||s?":"+Ct(i)+Pc(s):"")}function H0(t,e){return e!==1?"["+(e===2?"!":"")+t+"]":""}function Dc(t,e){return e>1||e===0&&t!==pt?Em(At(t),e===2):""}function Em(t,e){return"["+(e?"!":"")+"u-ca="+t+"]"}var V0=/0+$/;function Pc(t,e){let n=Wo(9,t);return n=e===void 0?n.replace(V0,""):n.slice(0,e),n?"."+n:""}function Cm(t){return t<0?"-":"+"}var q0=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,j0=/[^\w\/:+-]+/;function Sm(t){return Ci(He(t))}function Ci(t){return Am(t).id}function Am(t){let e=t.toUpperCase(),n=(a=>{let o=pc(a,1);if(o!==void 0)return{id:Wa(o),X:o,m:o}})(e);if(n)return{kind:"fixed",...n};let r=e==="UTC"?"UTC":(a=>(j0.test(a)&&P(gl(a)),q0.test(a)&&P("Forbidden ICU TimeZone"),a.toLowerCase().split("/").map((o,i)=>(o.length<=3||/\d/.test(o))&&!/etc|yap/.test(o)?o.toUpperCase():o.replace(/baja|dumont|[a-z]+/g,(s,l)=>s.length<=2&&!i||s==="in"||s==="chat"?s.toUpperCase():s.length>2||!l?Nh(s).replace(/island|noronha|murdo|rivadavia|urville/,Nh):s)).join("/")))(t);return Z0(r)}var Z0=Sr(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};let e=t.toUpperCase(),n=W0(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),W0=Sr(t=>new qt("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Je(t){let e=Am(t);return Y0(e.id,e)}var Y0=Sr((t,e)=>e.kind==="named"?new bl(t,e.m,e.format):new ml(t,e.m,e.kind==="fixed"?e.X:0)),ml=class{constructor(e,n,r){this.id=e,this.m=n,this.X=r}B(){return this.X}N(e){return[Ul(e,this.X)]}O(){}},bl=class{constructor(e,n,r){this.id=e,this.m=n,this.ke=((a,o)=>{let i=Sr(a),s=Sr(U0),l=86400*o;function c(u){let[p,m]=Zh(u,l),b=jo(p),f=jo(m),g=i(b),v=i(f);return g===v?g:d(s(b,f),g,v,u)}function d(u,p,m,b){let f,g;for(;(b===void 0||(f=b<u[0]?p:b>=u[1]?m:void 0)===void 0)&&(g=u[1]-u[0]);){let v=u[0]+Math.floor(g/2);a(v)===m?u[1]=v:u[0]=v+1}return f}return{xe(u){let p=c(u-86400),m=c(u+86400),b=u-p,f=u-m;if(p===m)return[b];let g=c(b);return g===c(f)?[u-g]:p>m?[b,f]:[]},we:c,O:function u(p,m){if(m>0&&p>=864e10)return;if(m<0){if(p<=rl)return;let T=jh()+94867200;if(p>T)return u(T,-1)}let b=m>0?Math.max(p,rl):p,[f,g]=Zh(b,l),v=l*m,y=m>0?Math.max(p,jh())+94867200:rl,w=()=>m<0?g>y:f<y;for(;w();){let T=jo(f),k=jo(g),L=i(T),N=i(k);if(L!==N){let O=s(T,k);d(O,L,N);let M=O[0];if((Jt(M,p)||1)===m)return M}f+=v,g+=v}}}})((a=>o=>{let i=N0(a,1e3*o);return 86400*xa((s=>{let l=s.relatedYear;if(l!==void 0)return parseInt(l);let c=parseInt(s.year);return s.era!==void 0&&ap(s.era)==="bce"?1-c:c})(i),parseInt(i.month),parseInt(i.day))+3600*parseInt(i.hour)+60*parseInt(i.minute)+parseInt(i.second)-o})(r),(a=>{let o=a.split("/").pop();return R0[o]||60})(e))}B(e){return this.ke.we((n=>Rh(n)[0])(e))*yn}N(e){let n=86400*Ht(e)+Il(e),r=gp(e);return this.ke.xe(n).map(a=>Mt(BigInt(a)*Wn+BigInt(r)))}O(e,n){let[r,a]=Rh(e),o=this.ke.O(r+(n>0||a?1:0),n);if(o!==void 0)return BigInt(o)*Wn}};function jh(){return Math.floor(Date.now()/1e3)}function U0(t,e){return[t,e]}function Zh(t,e){let n=Math.floor(t/e)*e;return[n,n+e]}function jo(t){return vl(t,-1e10,864e10)}function Tm(t,e,n){let r=Ae(n,We(e,bp,fp),fc,[],0);if(r.timeZone!==void 0){let a=Ea(e,r),o=ja(r),i=Je(t(r.timeZone));return{epochNanoseconds:Rr(i,pe(a,o),r.offset),timeZone:i,calendar:e}}return Ea(e,r)}function Mm(t,e,n,r){let a=Ae(n,We(e,bp,fp),fc,Tl,0),o=t(a.timeZone),[i,s,l,c]=ki(e,a,()=>Tr(r)),d=ja(a,s),u=Je(o);return It(Rr(u,pe(i,d),a.offset,l,c),u,e)}function Im(t,e,n){let r=Ae(e,We(t,pp,mp),bc,[],0),[a,o]=ki(t,r,()=>[se(n)]);return Za(a,ja(r,o),t)}function Dm(t,e,n,r=[]){return Ea(t,Ae(e,We(t,Jn,Qn),ft,r),n)}function Pm(t,e,n,r){return vc(t,Ae(e,We(t,Oa,dp),ft,r),n)}function Om(t,e,n,r){let a=Ae(n,We(t,Jn,Qn),ft,Xn,0);return e&&a.month!==void 0&&a.monthCode===void 0&&a.year===void 0&&(a.year=1972),xc(t,a,r)}function zm(t,e){return ja(Ae(t,ll,mc,[],1),se(e))}function Bm(t){let e=Ae(t,Dp,bm);return Be(En({...Ie,...e}))}function St(t){P(Jh(t))}function Lm(t){let e=Cn(t=Hl(t)),n;return e||St(t),e.C?n=0:e.offset?n=wi(e.offset):St(t),e.timeZoneId&&pc(e.timeZoneId,1),Ra(e),bt(Ul(e,n))}function Nm(t,e){let n=Cn(He(t));return n||St(t),n.timeZoneId?Ym(n,e,void 0):(n.C&&St(t),fl(n,e))}function Rm(t,e,n){let r=Cn(He(t));return r&&r.timeZoneId||St(t),Ym(r,e,n)}function _m(t,e){let n=Cn(He(t));return n&&!n.C||St(t),Um(n,e)}function Fm(t,e){let n=Bc(zc(He(t)),void 0,e);return ye(n,n.calendar)}function Hm(t,e){let n=Lc(He(t));if(n)return Oc(n),ye(di(nn(n)),e(n.calendarId));let r=Bc(zc(t),$0,e),{calendar:a}=r;return ye(ka(a,r),a)}function Oc(t){t.calendarId!=="iso8601"&&P(Xt(t.calendarId))}function Vm(t,e){let n=Nc(He(t));if(n)return Oc(n),ye(nn(n),e(n.calendarId));let r=Bc(zc(t),G0,e),{calendar:a}=r,{year:o,month:i,day:s}=xe(a,r),[l,c]=Yn(a,o,i),{year:d,month:u}=((p,m,b,f)=>{let g=p?p.u(m,b,f):cl(m,b);return g||P("Cannot guess year"),g})(a,l,c,s);return ye(Ge(Un(a,d,u,s)),a)}function qm(t){let e=(r=>{let a=$m(r);return a?(Ya(a[13]),Gm(a,1)):void 0})(t=He(t));if(!e){let r=Cn(t);r&&r.re||St(t),r.C&&P(Xt("Z")),Oc(r),e=r}let n;return(n=Lc(t))&&_h(n)&&St(t),(n=Nc(t))&&_h(n)&&St(t),tr(Ba(e))}function jm(t){let e=nx.exec(He(t));return e||St(t),Be(En((n=>{let r=0,a=0,o=0,i={years:s(n[2]),months:s(n[3]),weeks:s(n[4]),days:s(n[5]),hours:s(n[6],n[7],5),minutes:s(n[8],n[9],4),seconds:s(n[10],n[11],3),...sc(o,2,Ee)};return r||P(Wh(Ee)),wl(n[1])<0&&(i=Ve(i)),i;function s(l,c,d){let u=0,p=0;return d&&([u,o]=Rt(o,Tt[d])),l!==void 0&&(a&&P(Xt(l)),p=(m=>{let b=parseInt(m);return Number.isFinite(b)||P(Xt(m)),b})(l),r=1,c&&(o=yl(c)*(Tt[d]/yn),a=1)),u+p}})(e)))}function Zm(t){let e=Cn(t)||Lc(t)||Nc(t);if(e)return e.calendarId;let n=$m(t);return n?Ya(n[13]).calendarId:t}function Wm(t){let e=Cn(t);return e&&(e.timeZoneId||e.C&&"UTC"||e.offset)||t}function zc(t){let e=Cn(t);return e&&!e.C||St(t),e}function Bc(t,e,n){return e&&t.calendarId==="iso8601"?(nn(t),t.re&&Ba(t),fl(e(t),n)):t.re?Um(t,n):fl(t,n)}function $0(t){let e=12*t.year+t.month===Fp?20:1;return{...t,day:e}}function G0(t){return{...t,year:1972}}function Ym(t,e,n){let r=Je(Ci(t.timeZoneId)),a;if(Ra(t),t.re){let i=t.offset?wi(t.offset):void 0,[,s,l]=Tr(n);a=Rr(r,t,i,s,l,!(r.X||t.offset===void 0||(o=t.offset,o.replace(/\D/g,"").length>4)),t.C)}else Tr(n),a=fn(r,t);var o;return Mt(a),It(a,r,e(t.calendarId))}function Um(t,e){return Ra(t),er(t),{...pe(t,t),calendar:e(t.calendarId)}}function fl(t,e){return nn(t),Ge(t),{calendar:e(t.calendarId),year:t.year,month:t.month,day:t.day}}function Go(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}var K0="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+Go(8)+"(Z|([+-])"+Go(15)+")?)?",X0=Ir("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),J0=Ir("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),Q0=Ir(K0+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),ex=Ir("T?"+Go(2)+`(([+-])${Go(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`),tx=new RegExp("\\[(!?)([^\\]]*)\\]","g"),nx=Ir("([+-])?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?!$)(?:(\\d+)(?:[.,](\\d{1,9}))?H)?(?:(\\d+)(?:[.,](\\d{1,9}))?M)?(?:(\\d+)(?:[.,](\\d{1,9}))?S)?)?");function Cn(t){let e=Q0.exec(t);return e?(n=>{let r=n[12],a=(r||"").toUpperCase()==="Z";return{year:Km(n),month:parseInt(n[5]),day:parseInt(n[6]),...Gm(n,7),...Ya(n[19]),re:!!n[7],C:a,offset:a?void 0:r}})(e):void 0}function Lc(t){let e=X0.exec(t);if(e)return(n=>({year:Km(n),month:parseInt(n[4]),day:1,...Ya(n[5])}))(e)}function Nc(t){let e=J0.exec(t);return e?(n=>({year:1972,month:parseInt(n[1]),day:parseInt(n[2]),...Ya(n[3])}))(e):void 0}function $m(t){let e=ex.exec(t);if(e)return e[6]&&wi(e[6]),e}function Gm(t,e){let n=Er(t[e+3]);return{...Dl(yl(t[e+4]||""))[0],hour:Er(t[e]),minute:Er(t[e+2]),second:n===60?59:n}}function Km(t){let e=wl(t[1]),n=parseInt(t[2]||t[3]);return e<0&&!n&&P(Xt(-0)),e*n}function Ya(t){let e,n,r=[];return t.replace(tx,(a,o,i)=>{let s=!!o,[l,c]=i.split("=").reverse();return c?c==="u-ca"?(r.push(l.toLowerCase()),e||(e=s)):(s||/[A-Z]/.test(c))&&P(Xt(a)):(n&&P(Xt(a)),n=l),""}),r.length>1&&e&&P(Xt(t)),{timeZoneId:n,calendarId:r[0]||"iso8601"}}function Vr(t,e,n){let r=Object.assign(Object.create(null),e);return al(r,n,cp),Hr(t)&&(al(r,n,Wv),t&&t.ge&&al(r,n,Yv,Or)),r}function al(t,e,n,r){let a=0,o=[];for(let i of n)e[i]!==void 0?a=1:o.push(i);if(Object.assign(t,e),a)for(let i of r||o)delete t[i]}function Xm(t,e,n){let{calendar:r,timeZone:a}=t,o=We(r,$v,Gv),i=De(t),{year:s,month:l,day:c}=xe(r,i),d={year:s,monthCode:Ua(r,s,l),day:c,hour:i.hour,minute:i.minute,second:i.second,millisecond:i.millisecond,microsecond:i.microsecond,nanosecond:i.nanosecond,offset:i.offsetNanoseconds},u=Ae(e,o,fc),p=Vr(r,d,u),m={...d,...u},[b,f,g,v]=ki(r,p,()=>Tr(n,2));return It(Rr(a,pe(b,ri(m,f)),m.offset,g,v),a,r)}function Jm(t,e,n){let{calendar:r}=t,a=We(r,pp,mp),{year:o,month:i,day:s}=xe(r,t),l={year:o,monthCode:Ua(r,o,i),day:s,hour:t.hour,minute:t.minute,second:t.second,millisecond:t.millisecond,microsecond:t.microsecond,nanosecond:t.nanosecond},c=Ae(e,a,bc),d=Vr(r,l,c),u={...l,...c},[p,m]=ki(r,d,()=>[se(n)]);return Za(p,ri(u,m),r)}function Qm(t,e,n){let{calendar:r}=t,a=We(r,Jn,Qn),{year:o,month:i,day:s}=xe(r,t);return Ea(r,Vr(r,{year:o,monthCode:Ua(r,o,i),day:s},Ae(e,a,ft)),n)}function eb(t,e,n){let{calendar:r}=t,a=We(r,Oa,dp),{year:o,month:i}=xe(r,t);return vc(r,Vr(r,{year:o,monthCode:Ua(r,o,i)},Ae(e,a,ft)),n)}function tb(t,e,n){let{calendar:r}=t,a=We(r,Jn,Qn),{year:o,month:i,day:s}=xe(r,t);return xc(r,Vr(r,{monthCode:Ua(r,o,i),day:s},Ae(e,a,ft)),n)}function nb(t,e,n){return((r,a,o)=>ja({...Ft(ll,r),...Ae(a,ll,mc)},se(o)))(t,e,n)}function rb(t,e){return Be((n=t,r=e,En({...n,...Ae(r,Dp,bm)})));var n,r}function Ua(t,e,n){let[r,a]=Yn(t,e,n);return sp(r,a)}function ab(t,e,n){return It(t.epochNanoseconds,e,n)}function ob(t){return bt(t.epochNanoseconds)}function Rc(t){return Vt(De(t),t.calendar)}function _c(t){return ye(De(t),t.calendar)}function Fc(t){return tr(De(t))}function ib(t,e,n){let r=_r(e,t,(a=>Lp(ht(a)))(n));return It(Mt(r),e,t.calendar)}function sb(t,e,n,r){let a=t(r.timeZone),o=r.plainTime,i=o!==void 0?e(o):void 0,s=Je(a),l;return l=i?_r(s,pe(n,i)):fn(s,pe(n,$e)),It(l,s,n.calendar)}function lb(t,e,n){return hb(t,Ft(We(t,za,up),e),Ae(qn(n),Xn,ft,[]))}function cb(t,e,n){let r=We(t,ti,Uv);return hb(t,Ft(hp,e),Ae(qn(n),r,ft,[]))}function db(t,e){return xc(t,Ae(e,hp,ft))}function ub(t,e,n){return vc(t,Ae(e,We(t,za,up),ft),n)}function hb(t,e,n){let r=We(t,Kv,Xv),a=Vr(t,e,n);return a=Ae(a,r,ft,[]),Ea(t,a)}function pb(t){return bt(Mt(BigInt(li(t))*Pr))}function mb(t){return bt(Mt(si(t)))}function qr(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}function bb(t,e){return t.timeZone!==void 0&&he("Cannot specify TimeZone"),t.timeZone=e,t}function jr(t,e,n){let r=t.resolvedOptions().calendar;!n&&e.calendar===pt||At(e.calendar)===r||P("Mismatching Calendars")}function ar(t,e,n,r,a){let o=new Set(t),i=new Set(e),s=new Set(n);return(l,c)=>{let d,u,p={},m={},b={},f=0,g=0;for(let M of Object.keys(l)){let R=l[M];R===void 0||s.has(M)||(o.has(M)?M==="dateStyle"?d=R:M==="timeStyle"?u=R:p[M]=R:M==="era"?m[M]=R:i.has(M)?M==="dateStyle"||M==="timeStyle"?g=1:f=1:b[M]=R)}let v=d!==void 0,y=u!==void 0,w=v||y,T=Object.keys(p).length>0,k=f||g,L=T||v||y,N=Object.keys(m).length>0;(!c&&k||c&&k&&!L||w&&(T||N||f))&&he("Invalid formatting options");let O={};return w||L||Object.assign(O,r),Object.assign(O,p,m,b),v&&(a?Object.assign(O,a[d]):O.dateStyle=d),y&&(O.timeStyle=u),O}}var fb={year:"numeric",month:"numeric",day:"numeric"},gb={hour:"numeric",minute:"numeric",second:"numeric"},Hc=Object.assign({},fb,gb),Vc=["weekday","year","month","day","dateStyle"],$a=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],qc=Vc.concat($a),rx=["weekday","day"].concat($a),ax=["weekday","year"].concat($a),vb=ar(qc,[],[],Hc),xb=ar(qc,[],[],{...Hc,timeZoneName:"short"}),yb=ar(qc,[],["timeZoneName"],Hc),wb=ar(Vc,$a,["timeZoneName"],fb),kb=ar($a,Vc,["timeZoneName","era"],gb),Eb=ar(["year","month","dateStyle"],rx,["timeZoneName"],{year:"numeric",month:"numeric"},{full:{year:"numeric",month:"long"},long:{year:"numeric",month:"long"},medium:{year:"numeric",month:"short"},short:{year:"2-digit",month:"numeric"}}),Cb=ar(["month","day","dateStyle"],ax,["timeZoneName","era"],{month:"numeric",day:"numeric"},{full:{month:"long",day:"numeric"},long:{month:"long",day:"numeric"},medium:{month:"short",day:"numeric"},short:{month:"numeric",day:"numeric"}});function Sb(t,e){let{timeZone:n}=t,r=De(t),{offsetNanoseconds:a}=r,o=e||$e,i;return i=e?Rr(n,pe(r,o),a,2):fn(n,pe(r,o)),It(i,n,t.calendar)}function Si(t){let e=Ai(),n=t.B(e);return Na(e+BigInt(n))}function Ai(){return BigInt(Date.now())*Pr}function Zr(){return new qt().resolvedOptions().timeZone}var jc="PlainYearMonth",Zc="PlainMonthDay",Wc="PlainDate",Yc="PlainDateTime",Uc="PlainTime",$c="ZonedDateTime",Gc="Instant",Kc="Duration";function an(t,e,n,...r){return Object.defineProperties(e,Qh(t)),Object.defineProperties(e.prototype,Sa("Temporal."+t)),Object.defineProperties(e.prototype,xn(a=>({get(){return a(n(this))},configurable:1}),Object.assign({},...r))),e}var on=xl.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:xl;function sn(){he(Gh)}function ln(){he($h)}var Tb={era(t){return _a(t.calendar,t).era},eraYear(t){return _a(t.calendar,t).eraYear},year(t){return xe(t.calendar,t).year},month(t){return xe(t.calendar,t).month},monthCode(t){return ii(t.calendar,t)}},Ti={era(t){return _a(t.calendar,t).era},eraYear(t){return _a(t.calendar,t).eraYear},year(t){return xe(t.calendar,t).year},month(t){return xe(t.calendar,t).month},monthCode(t){return ii(t.calendar,t)},day(t){return xe(t.calendar,t).day}},Mb={monthCode(t){return ii(t.calendar,t)},day(t){return xe(t.calendar,t).day}},Xc={daysInMonth(t){return zl(t.calendar,t)},daysInYear(t){return Bl(t.calendar,t)},monthsInYear(t){return Ol(t.calendar,t)},inLeapYear(t){return Pl(t.calendar,t)}},Ga={dayOfWeek(t){return oi(t)},dayOfYear(t){return Tp(t.calendar,t)},weekOfYear(t){return Mp(t.calendar,t)},yearOfWeek(t){return Ip(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return zl(t.calendar,t)},daysInYear(t){return Bl(t.calendar,t)},monthsInYear(t){return Ol(t.calendar,t)},inLeapYear(t){return Pl(t.calendar,t)}};function Ab(t){return Qo(Object.keys(t))}Ab(Xc),Ab(Ga);function Mn(t){let e=He(t).toLowerCase();return e===Cl?pt:e===rp?op:void P(Xh(t,"temporal-polyfill/full"))}function Ja(t=Cl){return Mn(t)}var Db=new WeakMap,Pb=an($c,class{constructor(t,e,n=void 0){let r=Mt(si(t)),a=Je(Sm(e)),o=Ja(n);Ob(this,It(r,a,o))}static from(t,e=void 0){return Qe(Wr(t,e))}static compare(t,e){return qa(Wr(t),Wr(e))}get calendarId(){return At(ue(this).calendar)}get timeZoneId(){return ue(this).timeZone.id}get epochMilliseconds(){return Ha(ue(this))}get epochNanoseconds(){return $l(ue(this))}get offset(){return Wa(De(ue(this)).offsetNanoseconds)}get offsetNanoseconds(){return De(ue(this)).offsetNanoseconds}get hoursInDay(){return Zp(ue(this))}with(t,e=void 0){return Qe(Xm(ue(this),Kr(t),e))}withCalendar(t){return Qe({...ue(this),calendar:Di(t)})}withTimeZone(t){return Qe({...ue(this),timeZone:Je(xt(t))})}withPlainTime(t=void 0){return Qe(Sb(ue(this),td(t)))}add(t,e=void 0){let n=ue(this);return Qe($n(n,Fe(t),e))}subtract(t,e=void 0){let n=ue(this);return Qe($n(n,Ve(Fe(t)),e))}until(t,e=void 0){let n=ue(this),r=Wr(t),a=rn(n.calendar,r.calendar);return Pe(Be(ec(0,a,n,r,e)))}since(t,e=void 0){let n=ue(this),r=Wr(t),a=rn(n.calendar,r.calendar);return Pe(Be(ec(1,a,n,r,e)))}round(t){let e=ue(this),[n,r,a]=Fa(t);return Qe(jp(e,n,r,a))}startOfDay(){return Qe(Wp(ue(this)))}equals(t){return cm(ue(this),Wr(t))}toInstant(){return cn(ob(ue(this)))}toPlainDateTime(){return jt(Rc(ue(this)))}toPlainDate(){return Zt(_c(ue(this)))}toPlainTime(){return Tn(Fc(ue(this)))}toLocaleString(t=void 0,e={}){let n=ue(this),r=new qt(t,bb(xb(e),Gp(n)));return jr(r,n),r.format(Ha(n))}toString(t=void 0){return Ec(ue(this),t)}toJSON(){return Ec(ue(this))}getTimeZoneTransition(t){let e=ue(this),n=Up(e,t);return n?Qe({...e,epochNanoseconds:n}):null}valueOf(){return ln()}},ox,Ti,Ga,Pa);function Qe(t){return Ob(Object.create(Pb.prototype),t)}function ue(t){return Wt(t)||sn()}function ox(t){let e=ue(t);return{...De(e),calendar:e.calendar}}function Wt(t){return Db.get(t)}function Wr(t,e){if(Ke(t)){let n=Wt(t);if(n)return Tr(e),n;let r=Qa(t);return Mm(xt,r,t,e)}return Rm(t,Mn,e)}function Ob(t,e){return Db.set(t,e),on(t),t}function xt(t){if(Ke(t)){let e=Wt(t);return e||he(gl(t)),e.timeZone.id}return(e=>Ci(Wm(He(e))))(t)}var zb=new WeakMap,Bb=an(Gc,class{constructor(t){let e=Mt(si(t));Nb(this,bt(e))}static from(t){return cn(Yr(t))}static fromEpochMilliseconds(t){return cn(pb(t))}static fromEpochNanoseconds(t){return cn(mb(t))}static compare(t,e){return qa(Yr(t),Yr(e))}get epochMilliseconds(){return Ha(gt(this))}get epochNanoseconds(){return $l(gt(this))}add(t){let e=gt(this);return cn(bt(Jl(e.epochNanoseconds,Fe(t))))}subtract(t){let e=gt(this);return cn(bt(Jl(e.epochNanoseconds,Ve(Fe(t)))))}until(t,e=void 0){return Pe(Ql(0,gt(this),Yr(t),e))}since(t,e=void 0){return Pe(Ql(1,gt(this),Yr(t),e))}round(t){let e=gt(this),[n,r,a]=Fa(t,5,1);return cn(bt(bi(e.epochNanoseconds,Va(n,r),a)))}equals(t){return lm(gt(this),Yr(t))}toZonedDateTimeISO(t){return Qe(ab(gt(this),Je(xt(t))))}toLocaleString(t=void 0,e={}){let n=gt(this);return new qt(t,vb(e)).format(Ha(n))}toString(t=void 0){return kc(xt,gt(this),t)}toJSON(){return kc(xt,gt(this))}valueOf(){return ln()}});function cn(t){return Nb(Object.create(Bb.prototype),t)}function gt(t){return Qc(t)||sn()}function Qc(t){return zb.get(t)}function Yr(t){if(Ke(t)){let e=Qc(t);if(e)return e;let n=Wt(t);if(n)return bt(n.epochNanoseconds)}return Lm(t)}var{toTemporalInstant:Lb}={toTemporalInstant(){let t=Date.prototype.valueOf.call(this);return cn(bt(BigInt(_l(t))*Pr))}};function Nb(t,e){return zb.set(t,e),on(t),t}var Rb=new WeakMap,_b=an(Zc,class{constructor(t,e,n=void 0,r){let a=Re(t),o=Re(e),i=Ja(n),s=Re(r??wp),l=Ge(nn({year:s,month:a,day:o}));Fb(this,ye(l,i))}static from(t,e=void 0){return Jc(Ib(t,e))}get calendarId(){return At(Sn(this).calendar)}with(t,e=void 0){return Jc(tb(Sn(this),Kr(t),e))}equals(t){return pm(Sn(this),Ib(t))}toPlainDate(t){let e=Sn(this);return Zt(cb(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=Sn(this),r=new qt(t,qr(Cb(e)));return jr(r,n,1),r.format(La(n))}toString(t=void 0){return Tc(Sn(this),t)}toJSON(){return Tc(Sn(this))}valueOf(){return ln()}},Sn,Mb);function Jc(t){return Fb(Object.create(_b.prototype),t)}function Sn(t){return Mi(t)||sn()}function Mi(t){return Rb.get(t)}function Ib(t,e){if(Ke(t)){let r=Mi(t);if(r)return se(e),r;let a=Jb(t);return Om(a===void 0?pt:a,a===void 0,t,e)}let n=Vm(t,Mn);return se(e),n}function Fb(t,e){return Rb.set(t,e),on(t),t}var Hb=new WeakMap,Vb=an(jc,class{constructor(t,e,n=void 0,r){let a=Re(t),o=Re(e),i=Ja(n),s=Re(r??1),l=di(nn({year:a,month:o,day:s}));qb(this,ye(l,i))}static from(t,e=void 0){return Xa(Ur(t,e))}static compare(t,e){return rr(Ur(t),Ur(e))}get calendarId(){return At(vt(this).calendar)}with(t,e=void 0){return Xa(eb(vt(this),Kr(t),e))}add(t,e=void 0){let n=vt(this);return Xa(ye(Xl(0,n.calendar,n,Fe(t),e),n.calendar))}subtract(t,e=void 0){let n=vt(this);return Xa(ye(Xl(1,n.calendar,n,Fe(t),e),n.calendar))}until(t,e=void 0){let n=vt(this),r=Ur(t),a=rn(n.calendar,r.calendar);return Pe(rc(0,a,n,r,e))}since(t,e=void 0){let n=vt(this),r=Ur(t),a=rn(n.calendar,r.calendar);return Pe(rc(1,a,n,r,e))}equals(t){return hm(vt(this),Ur(t))}toPlainDate(t){let e=vt(this);return Zt(lb(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=vt(this),r=new qt(t,qr(Eb(e)));return jr(r,n,1),r.format(La(n))}toString(t=void 0){return Ac(vt(this),t)}toJSON(){return Ac(vt(this))}valueOf(){return ln()}},vt,Tb,Xc);function Xa(t){return qb(Object.create(Vb.prototype),t)}function vt(t){return Ii(t)||sn()}function Ii(t){return Hb.get(t)}function Ur(t,e){if(Ke(t)){let r=Ii(t);if(r)return se(e),r;let a=Qa(t);return Pm(a,t,e)}let n=Hm(t,Mn);return se(e),n}function qb(t,e){return Hb.set(t,e),on(t),t}function ix(t){if(!Ke(t))return;let e=Qc(t);return e?[Gc,e]:(e=Wt(t),e?[$c,e]:(e=or(t),e?[Yc,e]:(e=Xr(t),e?[Wc,e]:(e=ed(t),e?[Uc,e]:(e=Ii(t),e?[jc,e]:(e=Mi(t),e?[Zc,e]:(e=nd(t),e?[Kc,e]:void 0)))))))}function Kr(t){return(ix(t)||t.calendar!==void 0||t.timeZone!==void 0)&&he(Yh),t}var jb=new WeakMap,Zb=an(Uc,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0){let i=Ba(xn(Re,{hour:t,minute:e,second:n,millisecond:r,microsecond:a,nanosecond:o}));Wb(this,tr(i))}static from(t,e=void 0){return Tn(An(t,e))}static compare(t,e){return yi(An(t),An(e))}with(t,e=void 0){return Tn(nb(Dt(this),Kr(t),e))}add(t){let e=Dt(this);return Tn(fi(e,Fe(t))[0])}subtract(t){let e=Dt(this);return Tn(fi(e,Ve(Fe(t)))[0])}until(t,e=void 0){return Pe(ac(0,Dt(this),An(t),e))}since(t,e=void 0){return Pe(ac(1,Dt(this),An(t),e))}round(t){let e=Dt(this),[n,r,a]=Fa(t,5);return Tn(hi(e,Nr(n,r),a)[0])}equals(t){return mm(Dt(this),An(t))}toLocaleString(t=void 0,e={}){let n=Dt(this);return new qt(t,qr(kb(e))).format(Ml(n))}toString(t=void 0){return Mc(Dt(this),t)}toJSON(){return Mc(Dt(this))}valueOf(){return ln()}},Dt,Pa);function Tn(t){return Wb(Object.create(Zb.prototype),t)}function Dt(t){return ed(t)||sn()}function ed(t){return jb.get(t)}function An(t,e){if(Ke(t)){let r=ed(t);if(r)return se(e),r;let a=or(t);if(a)return se(e),tr(a);let o=Wt(t);return o?(se(e),Fc(o)):zm(t,e)}let n=qm(t);return se(e),n}function td(t){return t===void 0?void 0:An(t)}function Wb(t,e){return jb.set(t,e),on(t),t}var Yb=new WeakMap,Ub=an(Yc,class{constructor(t,e,n,r=0,a=0,o=0,i=0,s=0,l=0,c=void 0){let d=er(Ra(xn(Re,{year:t,month:e,day:n,hour:r,minute:a,second:o,millisecond:i,microsecond:s,nanosecond:l}))),u=Ja(c);$b(this,Vt(d,u))}static from(t,e=void 0){return jt($r(t,e))}static compare(t,e){let n=$r(t),r=$r(e);return uc(n,r)}get calendarId(){return At(_e(this).calendar)}with(t,e=void 0){return jt(Jm(_e(this),Kr(t),e))}withCalendar(t){let e=_e(this);return jt(Vt(e,Di(t)))}withPlainTime(t=void 0){let e=_e(this);return jt(Za(e,td(t),e.calendar))}add(t,e=void 0){let n=_e(this);return jt(Vt(Gn(n.calendar,n,Fe(t),e),n.calendar))}subtract(t,e=void 0){let n=_e(this);return jt(Vt(Gn(n.calendar,n,Ve(Fe(t)),e),n.calendar))}until(t,e=void 0){let n=_e(this),r=$r(t),a=rn(n.calendar,r.calendar);return Pe(tc(0,a,n,r,e))}since(t,e=void 0){let n=_e(this),r=$r(t),a=rn(n.calendar,r.calendar);return Pe(tc(1,a,n,r,e))}round(t){let e=_e(this),[n,r,a]=Fa(t);return jt(Vt(ui(e,Nr(n,r),a),e.calendar))}equals(t){return dm(_e(this),$r(t))}toZonedDateTime(t,e=void 0){return Qe(ib(_e(this),Je(xt(t)),e))}toPlainDate(){let t=_e(this);return Zt(ye(t,t.calendar))}toPlainTime(){return Tn(tr(_e(this)))}toLocaleString(t=void 0,e={}){let n=_e(this),r=new qt(t,qr(yb(e)));return jr(r,n),r.format(xp(n))}toString(t=void 0){return Cc(_e(this),t)}toJSON(){return Cc(_e(this))}valueOf(){return ln()}},_e,Ti,Ga,Pa);function jt(t){return $b(Object.create(Ub.prototype),t)}function _e(t){return or(t)||sn()}function or(t){return Yb.get(t)}function $r(t,e){if(Ke(t)){let r=or(t);if(r)return se(e),r;let a=Xr(t);if(a)return se(e),Vt(pe(a,$e),a.calendar);let o=Wt(t);if(o)return se(e),Rc(o);let i=Qa(t);return Im(i,t,e)}let n=_m(t,Mn);return se(e),n}function $b(t,e){return Yb.set(t,e),on(t),t}var Gb=new WeakMap,Kb=an(Wc,class{constructor(t,e,n,r=void 0){let a=Ge(nn(xn(Re,{year:t,month:e,day:n}))),o=Ja(r);Xb(this,ye(a,o))}static from(t,e=void 0){return Zt(Gr(t,e))}static compare(t,e){return rr(Gr(t),Gr(e))}get calendarId(){return At(qe(this).calendar)}with(t,e=void 0){let n=qe(this);return Zt(Qm(n,Kr(t),e))}withCalendar(t){let e=qe(this);return Zt(ye(e,Di(t)))}add(t,e=void 0){let n=qe(this);return Zt(ye(Fr(n.calendar,n,Fe(t),e),n.calendar))}subtract(t,e=void 0){let n=qe(this);return Zt(ye(Fr(n.calendar,n,Ve(Fe(t)),e),n.calendar))}until(t,e=void 0){let n=qe(this),r=Gr(t),a=rn(n.calendar,r.calendar);return Pe(nc(0,a,n,r,e))}since(t,e=void 0){let n=qe(this),r=Gr(t),a=rn(n.calendar,r.calendar);return Pe(nc(1,a,n,r,e))}equals(t){return um(qe(this),Gr(t))}toZonedDateTime(t){let e=Ke(t)?{timeZone:t.timeZone,plainTime:t.plainTime}:{timeZone:t};return Qe(sb(xt,An,qe(this),e))}toPlainDateTime(t=void 0){let e=qe(this);return jt(Za(e,td(t),e.calendar))}toPlainYearMonth(){let t=qe(this);return Xa(ub(t.calendar,this))}toPlainMonthDay(){let t=qe(this);return Jc(db(t.calendar,this))}toLocaleString(t=void 0,e={}){let n=qe(this),r=new qt(t,qr(wb(e)));return jr(r,n),r.format(La(n))}toString(t=void 0){return Sc(qe(this),t)}toJSON(){return Sc(qe(this))}valueOf(){return ln()}},qe,Ti,Ga);function Zt(t){return Xb(Object.create(Kb.prototype),t)}function qe(t){return Xr(t)||sn()}function Xr(t){return Gb.get(t)}function Gr(t,e){if(Ke(t)){let r=Xr(t);if(r)return se(e),r;let a=or(t);if(a)return se(e),ye(a,a.calendar);let o=Wt(t);if(o)return se(e),_c(o);let i=Qa(t);return Dm(i,t,e)}let n=Fm(t,Mn);return se(e),n}function Xb(t,e){return Gb.set(t,e),on(t),t}function Qa(t){let e=Jb(t);return e===void 0?pt:e}function Jb(t){let{calendar:e}=t;if(e!==void 0)return Di(e)}function Di(t){if(Ke(t)){let e=Xr(t)||or(t)||Wt(t)||Mi(t)||Ii(t);return e||he(Kh(t)),e.calendar}return(e=>Mn(Zm(He(e))))(t)}var Qb=new WeakMap,ef=an(Kc,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0,i=0,s=0,l=0,c=0){let d=En(xn(li,{years:t,months:e,weeks:n,days:r,hours:a,minutes:o,seconds:i,milliseconds:s,microseconds:l,nanoseconds:c}));tf(this,Be(d))}static from(t){return Pe(Fe(t))}static compare(t,e,n=void 0){return sm(Ka,Fe(t),Fe(e),n)}get sign(){return lt(this).sign}get blank(){return!lt(this).sign}with(t){return Pe(rb(lt(this),t))}negated(){return Pe(cc(lt(this)))}abs(){return Pe(am(lt(this)))}add(t,e=void 0){return Pe(lc(Ka,0,lt(this),Fe(t),e))}subtract(t,e=void 0){return Pe(lc(Ka,1,lt(this),Fe(t),e))}round(t){return Pe(rm(Ka,lt(this),t))}total(t){return Vp(Ka,lt(this),t)}toLocaleString(t=void 0,e){let n=lt(this);return Intl.DurationFormat?new Intl.DurationFormat(t,e).format(n):Ei(n,e)}toString(t=void 0){return Ei(lt(this),t)}toJSON(){return Ei(lt(this))}valueOf(){return ln()}},lt,Ll);function Pe(t){return tf(Object.create(ef.prototype),t)}function lt(t){return nd(t)||sn()}function nd(t){return Qb.get(t)}function Fe(t){return Ke(t)?nd(t)||Bm(t):jm(t)}function Ka(t){if(t!==void 0){if(Ke(t)){let e=Wt(t);if(e)return e;let n=Xr(t);if(n)return n;let r=or(t);if(r)return ye(r,r.calendar);let a=Qa(t);return Tm(xt,a,t)}return Nm(t,Mn)}}function tf(t,e){return Qb.set(t,e),on(t),t}var sx=Object.defineProperties({},{...Sa("Temporal.Now"),...Jo({timeZoneId(){return Zr()},instant(){return cn(bt(Ai()))},zonedDateTimeISO(t=Zr()){let e=Je(xt(t));return Qe(It(Ai(),e))},plainDateTimeISO(t=Zr()){let e=Si(Je(xt(t)));return jt(Vt(e))},plainDateISO(t=Zr()){let e=Si(Je(xt(t)));return Zt(ye(e))},plainTimeISO(t=Zr()){let e=Si(Je(xt(t)));return Tn(tr(e))}})}),nf=Object.defineProperties({},{...Sa("Temporal"),...Jo({PlainYearMonth:Vb,PlainMonthDay:_b,PlainDate:Kb,PlainTime:Zb,PlainDateTime:Ub,ZonedDateTime:Pb,Instant:Bb,Duration:ef,Now:sx})});var Te=Gs||nf;var yk=Gs?Date.prototype.toTemporalInstant:Lb;var Pi=class extends z{static formAssociated=!0;static observedAttributes=["value","data-focus"];internals;selectedIso=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch(e){console.warn("a-calendar: ElementInternals unavailable \u2014 form association disabled.",e)}this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeydown)}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}this.selectedIso=this.getAttribute("value")||this.getAttribute("defaultvalue")||null,this.applyFormValue(this.currentIso())}attributeChangedCallback(e,n,r){if(e==="value"){this.applyFormValue(r);return}e==="data-focus"&&this.focusCell(r)}get#e(){return this.hasAttribute("value")}currentIso(){return this.#e?this.getAttribute("value")||null:this.selectedIso}applyFormValue(e){this.internals?.setFormValue(e||null);try{e?this.internals?.states?.add("filled"):this.internals?.states?.delete("filled")}catch{}}onClick=e=>{if(this.hasAttribute("disabled"))return;let n=e.target?.closest('[data-part="day-cell"]');if(!n||n.hasAttribute("disabled"))return;let r=n.dataset.date;r&&this.requestSelect(r)};requestSelect(e){let n=this.currentIso();if(e===n)return;let r=this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!0,detail:{next:e,prev:n,reason:"user"}}));this.#e||!r||(this.selectedIso=e,this.applyFormValue(e),this.dispatchEvent(new Event("change",{bubbles:!0})))}get#t(){return Array.from(this.querySelectorAll('[data-part="day-cell"]'))}onKeydown=e=>{if(this.hasAttribute("disabled"))return;let n=this.#t;if(n.length===0)return;let r=e.target?.closest('[data-part="day-cell"]')??n.find(i=>i.tabIndex===0)??null;if(!r?.dataset.date)return;let a=null;switch(e.key){case"Home":case"End":{let i=n.indexOf(r);if(i<0)return;let s=i-i%7;a=n[e.key==="Home"?s:s+6]?.dataset.date??null;break}default:{let i=Te.PlainDate.from(r.dataset.date),s;switch(e.key){case"ArrowLeft":s=i.subtract({days:1});break;case"ArrowRight":s=i.add({days:1});break;case"ArrowUp":s=i.subtract({days:7});break;case"ArrowDown":s=i.add({days:7});break;case"PageUp":s=i.add({[e.shiftKey?"years":"months"]:-1});break;case"PageDown":s=i.add({[e.shiftKey?"years":"months"]:1});break;default:return}a=s.toString()}}if(!a)return;e.preventDefault();let o=n.find(i=>i.dataset.date===a);o&&!o.hasAttribute("disabled")&&o.focus(),this.dispatchEvent(new CustomEvent("navigate",{bubbles:!0,detail:{date:a}}))};focusCell(e){if(!e)return;let n=e.split("#")[0];queueMicrotask(()=>{this.querySelector(`[data-date="${n}"]`)?.focus()})}emitState(e,n,r){this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,detail:{next:e,prev:n,reason:r}})),this.dispatchEvent(new Event("change",{bubbles:!0}))}get value(){return this.currentIso()??""}set value(e){this.selectedIso=e||null,this.applyFormValue(e||null)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}formResetCallback(){let e=this.getAttribute("defaultvalue")||null,n=this.currentIso();this.selectedIso=e,this.applyFormValue(e),this.emitState(e,n,"reset")}formStateRestoreCallback(e){let n=this.currentIso();this.selectedIso=e||null,this.applyFormValue(e||null),this.emitState(e||null,n,"restore")}};function rf(){typeof customElements>"u"||customElements.get("a-calendar")||customElements.define("a-calendar",Pi)}rf();var Oi=class extends hr{ariaProp="ariaChecked";accessibilityObserver;connectedCallback(){super.connectedCallback(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0})}disconnectedCallback(){this.accessibilityObserver?.disconnect()}syncAccessibilityRelations(){this.applyAccessibilityRelations(Array.from(this.querySelectorAll(":scope > a-radio-label")),Array.from(this.querySelectorAll(":scope > a-radio-hint")))}};function af(){typeof customElements>"u"||customElements.get("a-radio")||customElements.define("a-radio",Oi)}af();var zi=class extends z{static formAssociated=!0;static observedAttributes=["state","disabled"];internals;uncontrolledValue=null;seeded=!1;observer;alive=!1;childrenReady=!1;get value(){return this.#e}constructor(){super(),this.internals=this.attachInternals?.()}connectedCallback(){this.seeded||(this.uncontrolledValue=this.getAttribute("default-state"),this.seeded=!0),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown),this.observer??=new this.view.MutationObserver(e=>{e.some(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-RADIO"||a.querySelector?.("a-radio")!=null))&&this.sync()}),this.observer.observe(this,{childList:!0,subtree:!0}),queueMicrotask(()=>{this.isConnected&&(this.childrenReady=!0,this.sync(),this.alive=!0)})}disconnectedCallback(){this.observer?.disconnect()}attributeChangedCallback(e,n,r){this.sync(),e==="state"&&this.alive&&r!==n&&this.emitChange()}formDisabledCallback(e){e?this.internals?.states?.add("disabled"):this.internals?.states?.delete("disabled"),this.sync()}formResetCallback(){let e=this.getAttribute("default-state");this.emitStateChange(e,this.#e,"reset",!1),this.uncontrolledValue=e,this.sync()}formStateRestoreCallback(e){this.emitStateChange(e,this.#e,"restore",!1),this.uncontrolledValue=e,this.sync()}get#e(){return this.hasAttribute("state")?this.getAttribute("state"):this.uncontrolledValue}get#t(){return this.hasAttribute("disabled")||(this.internals?.states?.has("disabled")??!1)}get#n(){return Array.from(this.querySelectorAll("a-radio"))}sync=()=>{if(!this.childrenReady)return;let e=this.#e,n=this.#n,r=n.find(o=>o.value===e&&e!=null)??null,a=r?r.value:null;this.internals?.setFormValue(a,a);for(let o of n)o.selected=o===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r)};requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n,"user",!0);this.hasAttribute("state")||r&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n,r,a){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:a,detail:{next:e,prev:n,reason:r}}))}onClick=e=>{if(this.#t)return;let n=e.target?.closest("a-radio");!n||n.hasAttribute("disabled")||(n.focus(),this.requestSelect(n.value))};onKeyDown=e=>{if(this.#t)return;let n=this.#n.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-radio");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.value));return}let a=e.key==="ArrowDown"||e.key==="ArrowRight",o=e.key==="ArrowUp"||e.key==="ArrowLeft";if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus(),this.requestSelect(s.value)}};function of(){typeof customElements>"u"||customElements.get("a-radio-group")||customElements.define("a-radio-group",zi)}of();var Pt=class extends z{internals;constructor(){super(),this.internals=this.attachInternals?.()}set active(e){this.internals&&(e?this.internals?.states?.add("active"):this.internals?.states?.delete("active"),this.internals.ariaSelected=this.getAttribute("role")==="option"?e?"true":"false":null)}get active(){return this.internals?.states?.has("active")??!1}connectedCallback(){rd(this.doc)}},Bi="a-menu-item, a[data-anta-menu-item]";function Li(t){return t instanceof Pt||t instanceof HTMLElement&&t.matches("a[data-anta-menu-item]")}function rd(t){t.hasKeyListenerForAMenuItem||(To(t,{keys:["Enter"," "],resolve:e=>{let n=e;return n?.closest?.('input, textarea, select, a-input, a-input-time, [contenteditable]:not([contenteditable="false"])')?null:n?.closest?.(Bi)},blocked:e=>e.hasAttribute("disabled"),activate:e=>e.click()}),t.hasKeyListenerForAMenuItem=!0)}function sf(){typeof customElements>"u"||customElements.get("a-menu-item")||customElements.define("a-menu-item",Pt)}sf();var J=4,Ni=96,lx=130,cx=130,dx=500,ux='a-button, a-input[button], button, a[href], input[type="button"], input[type="submit"], input[type="reset"], [role="button"]',hx="input:not([readonly]), textarea:not([readonly]), a-input:not([readonly]), a-input-time:not([readonly])",px="[data-dialog-open], [data-dialog-close], [data-toast-dismiss], [data-banner-dismiss]",j=[],_i=!1,Jr=null,ad=null;function mx(t,e){_i||(t.addEventListener("pointerdown",uf,!0),t.addEventListener("keydown",mf,!0),t.addEventListener("keyup",bf,!0),t.addEventListener("contextmenu",hf,!0),e.addEventListener("resize",pf),Jr=t,ad=e,_i=!0)}function cf(){_i&&(Jr?.removeEventListener("pointerdown",uf,!0),Jr?.removeEventListener("keydown",mf,!0),Jr?.removeEventListener("keyup",bf,!0),Jr?.removeEventListener("contextmenu",hf,!0),ad?.removeEventListener("resize",pf),Jr=null,ad=null,_i=!1)}function df(t,e=!1){let n=t.composedPath();for(let r=j.length-1;r>=0;r--){let a=j[r];if(n.includes(a.surface))return r;let o=a.triggerAnchor;if(o&&!(e&&a.hasAttribute("context"))&&n.includes(o))return r}return-1}function bx(t,e){for(let n of t.composedPath()){if(n===e)return!1;if(n instanceof HTMLDialogElement&&n.matches(":modal")||n instanceof HTMLElement&&n.matches(":popover-open"))return!0}return!1}function fx(t){for(let e of j)if(e.contains(t)||e.surface.contains(t))return!0;return!1}Bd({isOpen:()=>j.length>0,contains:fx});function uf(t){if(!j.length)return;let e=df(t,t.button===0);j[e+1]?.requestClose(t)}function hf(t){j.length&&df(t)===-1&&ff(t)}function pf(){j.length&&ff()}function mf(t){let e=j[j.length-1];e&&e.handleKey(t)}function bf(t){let e=j[j.length-1];e&&e.handleKeyUp(t)}function ff(t){j[0]?.requestClose(t)}function gx(){for(let t=j.length-1;t>=0;t--){let e=j[t];e.isOpen&&!e._dismissNotified&&e.emitChange("closed"),e._doHide()}j.length=0,cf()}var Ri=new WeakMap;function vx(t){for(let e of t){let n=Ri.get(e.target);n&&(!n.listening&&e.isIntersecting?requestAnimationFrame(()=>n.setupListeners()):n.listening&&!e.isIntersecting&&requestAnimationFrame(()=>{n.teardownListeners(),n.isOpen&&n.close()}))}}var lf=typeof IntersectionObserver<"u"?new IntersectionObserver(vx,{root:null,rootMargin:"0px",threshold:0}):null,Fi=class extends z{static observedAttributes=["placement","context","coord","offset","nohover","state","stop-propagation","role"];surface;scrollEl;listening=!1;_shown=!1;teardown;_dismissNotified=!1;internals;openTimer;closeTimer;typeBuffer="";typeTimer;activeItem=null;comboObserver;accessibilityObserver;#e=new Set;#t;#n;#a;#r;#o=new Set;#c=e=>e.stopPropagation();_flippedTop=null;_flippedSide=null;constructor(){super();try{this.internals=this.attachInternals?.(),this.internals&&(this.internals.ariaHidden="true")}catch{}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
|
|
860
|
+
`,Bh=typeof document>"u"?void 0:(()=>{let t=document.createElement("template"),e=document.createElement("style");e.textContent=h0;let n=document.createElement("slot");n.className="label",n.part.add("label"),n.name="label";let r=document.createElement("div");r.className="field",r.part.add("field");let a=document.createElement("slot");a.name="leading",a.part.add("leading");let o=document.createElement("div");o.className="segments",o.part.add("segments"),o.setAttribute("role","group");let i=document.createElement("slot");i.name="clear",i.part.add("clear");let s=document.createElement("slot");s.name="trailing",s.part.add("trailing"),r.append(a,o,i,s);let l=document.createElement("slot");return l.className="hint",l.part.add("hint"),l.name="hint",t.content.append(e,n,r,document.createElement("slot"),l),t})(),ba=class extends B{static formAssociated=!0;static observedAttributes=["value","defaultvalue","locale","hour12","status","disabled","min","max","required",...rl];#e;#t;#n;#a;#r;#o=!1;#c=!1;#m=!1;#s=new Map;#h=new Set;#p=!1;#g="";#u=null;#f=null;#i=null;#d=[];#v=[];#l;constructor(){super();try{this.#e=this.attachInternals?.()}catch(n){console.warn("a-input-time: ElementInternals unavailable \u2014 form association disabled.",n)}let e=this.attachShadow({mode:"open",delegatesFocus:!0});if(!Bh)throw new Error("a-input-time requires a DOM document");e.append(Bh.content.cloneNode(!0)),this.#n=e.querySelector(".label"),this.#n.addEventListener("click",()=>this.#d[0]?.el.focus()),this.#n.addEventListener("slotchange",this.#re),this.#a=e.querySelector(".hint"),this.#a.addEventListener("slotchange",this.#ae),this.#t=e.querySelector(".field"),this.#r=e.querySelector(".segments"),this.#t.addEventListener("mousedown",this.#M),this.#r.addEventListener("input",this.#B),this.#r.addEventListener("keydown",this.#y),this.#r.addEventListener("focusin",this.#N),this.#r.addEventListener("focusout",this.#L),this.#r.addEventListener("paste",this.#P),this.addEventListener(c0,()=>this.clear())}getAnchorRect(){return this.#t.getBoundingClientRect()}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.#k(e)}else this.#m||this.#k(this.getAttribute("value")??this.getAttribute("defaultvalue")??"");this.#I(),this.#o=!0}#k(e){this.#H(e),this.#g=this.value}attributeChangedCallback(e,n,r){if(nl.has(e)){if(this.#h.has(e))return;this.#x(e,r);return}if(this.#o){if(e==="value"){r!==null&&(this.value=r);return}if(e!=="defaultvalue"){if(e==="locale"||e==="hour12"){this.#I();return}if(e==="status"){this.#X();return}if(e==="disabled"){this.#K();return}if(e==="min"||e==="max"){this.#J();return}if(e==="required"){this.#te(),this.#J();return}}}}#x(e,n){n==null?this.#s.delete(e):this.#s.set(e,n),this.hasAttribute(e)&&(this.#h.add(e),super.removeAttribute(e),this.#h.delete(e)),this.#E(e),this.#b()}removeAttribute(e){if(nl.has(e)&&!this.#h.has(e)&&!this.hasAttribute(e)){let n=e;this.#s.delete(n)&&(this.#E(n),this.#b());return}super.removeAttribute(e)}toggleAttribute(e,n){if(nl.has(e)){let r=e,a=n??!this.#s.has(r);return this.#x(r,a?"":null),a}return super.toggleAttribute(e,n)}[Lh](e){return this.#s.get(e)??null}[Rh](e,n){this.#x(e,n==null?null:String(n))}#E(e){let n=this.#s.get(e)??null;if(e==="aria-invalid"||e==="aria-errormessage"){for(let r of this.#d)Un(this,r.el,e,n);e==="aria-invalid"&&n==null&&this.#X();return}Un(this,this.#r,e,n),(e==="aria-label"||e==="aria-labelledby")&&this.#$(),(e==="aria-description"||e==="aria-describedby")&&this.#G()}#b(){this.#p||(this.#p=!0,queueMicrotask(()=>{this.#p=!1;for(let e of this.#s.keys())this.#E(e)}))}get#C(){return this.getAttribute("locale")||(typeof navigator<"u"?navigator.language:"en-US")}get#S(){let e=this.getAttribute("hour12");if(e==="true")return!0;if(e==="false")return!1;try{let n=new Intl.DateTimeFormat(this.#C,{hour:"numeric"}).resolvedOptions().hourCycle;return n==="h11"||n==="h12"}catch{return!1}}#I(){let e=this.#S,n=this.#C,r=this.#g,a=[],o="AM",i="PM";try{let s=new Intl.DateTimeFormat(n,{hour:"numeric",minute:"numeric",hour12:e});a=s.formatToParts(new Date(2e3,0,1,13,5));let l=s.formatToParts(new Date(2e3,0,1,1,5)).find(d=>d.type==="dayPeriod"),c=a.find(d=>d.type==="dayPeriod");l?.value&&(o=l.value),c?.value&&(i=c.value)}catch{a=[{type:"hour",value:"13"},{type:"literal",value:":"},{type:"minute",value:"05"}]}this.#T=o,this.#w=i,this.#r.replaceChildren(),this.#d=[],this.#v=[];for(let s of a)if(s.type==="hour"||s.type==="minute"||s.type==="dayPeriod"){let l=document.createElement("input"),c=s.type==="dayPeriod"?"period":s.type;if(l.className=`seg seg--${c}`,l.type="text",l.spellcheck=!1,l.part.add("segment",c),l.autocomplete="off",l.autocorrect=!1,l.autocapitalize="off",l.setAttribute("aria-label",c==="hour"?"Hour":c==="minute"?"Minute":"AM/PM"),l.inputMode=c==="period"?"text":"numeric",c==="period"){let u=Math.max(2,Ph(this.#T),Ph(this.#w));l.maxLength=u,l.size=u}else l.maxLength=2,l.size=2;let d=c==="hour"?{kind:c,el:l,min:e?1:0,max:e?12:23}:c==="minute"?{kind:c,el:l,min:0,max:59}:{kind:c,el:l,min:0,max:1};this.#r.append(l),this.#d.push(d)}else{if(!s.value.trim())continue;let l=document.createElement("span");l.className="lit",l.part.add("literal"),l.setAttribute("aria-hidden","true"),l.textContent=s.value,this.#r.append(l),this.#v.push(s.value)}this.#H(r);for(let s of this.#s.keys())this.#E(s);this.#b(),this.#$(),this.#G(),this.#te(),this.#X(),this.#K(),this.#O({dispatch:!1})}#T="AM";#w="PM";#A(e){if(e instanceof HTMLInputElement)return this.#d.find(n=>n.el===e)}#M=e=>{let n=this.#A(e.target);if(n){this.#l=n.el;return}(e.target===this.#t||e.target===this.#r)&&(e.preventDefault(),this.#Q(this.#d[0]))};#N=e=>{let n=this.#A(e.target);if(!n)return;let r=this.#l===n.el;this.#l=void 0,r||queueMicrotask(()=>{this.shadowRoot?.activeElement===n.el&&n.el.select()})};#L=e=>{queueMicrotask(()=>{let n=this.shadowRoot?.activeElement;this.#d.some(r=>r.el===n)||(this.#Y()&&this.#O(),this.#U("change"))})};#y=e=>{if(je(e))return;let n=this.#A(e.target);if(!n)return;let{el:r}=n,a=e.key;if(a==="ArrowUp"||a==="ArrowDown"){e.preventDefault(),this.#z(n,a==="ArrowUp"?1:-1);return}if(a==="PageUp"||a==="PageDown"){e.preventDefault(),this.#z(n,(a==="PageUp"?1:-1)*(n.kind==="minute"?5:1));return}if(a==="ArrowLeft"||a==="ArrowRight"){let o=r.selectionStart??0,i=r.selectionEnd??o;(a==="ArrowLeft"?o===0&&i===0:o===r.value.length&&i===r.value.length)&&(e.preventDefault(),this.#Z(),this.#j(n,a==="ArrowRight"?1:-1));return}if(a==="Backspace"&&r.value===""){e.preventDefault(),this.#j(n,-1);return}n.kind!=="period"&&this.#v.some(o=>o.includes(a))&&(e.preventDefault(),this.#Z(),this.#j(n,1,{numeric:!0}))};#P=e=>{let n=e.clipboardData?.getData("text/plain").trim()??"";/^(?:[01]?\d|2[0-3]):[0-5]\d$/.test(n)&&(e.preventDefault(),this.#H(n),this.#O(),this.#U("change"))};#B=e=>{let n=this.#A(e.target);!n||e.isComposing||(n.kind==="period"?this.#R(e,n):this.#_(n))};#_(e){let{el:n}=e,r=n.value.replace(/\D/g,"");r!==n.value&&(n.value=r);let a=e.kind==="hour"&&this.#S,o=a?23:e.max;if(r===""){e.kind==="hour"?this.#u=null:this.#f=null,this.#O({dispatch:!1,preserve:n});return}let i=r.slice(0,2),s=Number(i),l=!1;s>o&&(i=i.at(-1),s=Number(i),l=!0);let c=i.length===2||+`${s}0`>o;a?s===0&&i.length===1?this.#u=null:s===0?(this.#u=12,this.#i="am"):s>12?(this.#u=s-12,this.#i="pm"):(this.#u=s,this.#i==null&&(this.#i="am")):this.#F(e,Math.max(e.min,s)),this.#O({dispatch:!1,preserve:l||c?void 0:n}),c&&this.#j(e,1)}#R(e,n){let{el:r}=n,a=r.value.trim();if(!a){this.#i=null,this.#O({dispatch:!1,preserve:r});return}let o=a.toLowerCase(),i=this.#T.toLowerCase(),s=this.#w.toLowerCase(),l=o==="a"||o==="am"||o===i?"am":o==="p"||o==="pm"||o===s?"pm":null;if(l){this.#i=l,this.#O({dispatch:!1}),this.#j(n,1);return}if(i.startsWith(o)||s.startsWith(o)){this.#i=null,this.#O({dispatch:!1,preserve:r});return}e.stopPropagation(),r.value=this.#i==="pm"?this.#w:this.#i==="am"?this.#T:""}#z(e,n){if(e.kind==="period"){this.#i=this.#i==null?"am":this.#i==="am"?"pm":"am",this.#Y(),this.#O();return}let r=e.kind==="hour"?this.#u:this.#f,a=e.max-e.min+1,o;r==null?o=n>0?e.min:e.max:o=((r-e.min+n)%a+a)%a+e.min,this.#F(e,o),this.#Y(),this.#O()}#F(e,n){e.kind==="hour"?this.#u=n:this.#f=n,e.kind==="hour"&&this.#S&&this.#i==null&&(this.#i="am")}#V(e){let n=zh(e);return n?n.h*60+n.min:null}get#W(){return this.#V(this.getAttribute("min"))}get#q(){return this.#V(this.getAttribute("max"))}#D(){let e=this.#ee;return e==null||this.#f==null?null:e*60+this.#f}#Y(){let e=this.#D();if(e==null)return!1;let n=this.#W,r=this.#q,a=e;return n!=null&&a<n&&(a=n),r!=null&&a>r&&(a=r),a===e?!1:(this.#H(`${fa(Math.floor(a/60))}:${fa(a%60)}`),!0)}#Q(e){e&&(e.el.focus(),e.el.select())}#j(e,n,r={}){let a=this.#d.indexOf(e);for(let o=a+n;o>=0&&o<this.#d.length;o+=n){let i=this.#d[o];if(!r.numeric||i.kind!=="period"){this.#Q(i);return}}}get#ee(){return this.#u==null?null:this.#S?this.#i==null?null:u0(this.#u,this.#i):this.#u}#O({dispatch:e=!0,preserve:n}={}){this.#Z(n),this.#g=this.value,this.#e?.setFormValue(this.value),this.#oe(),this.#J(),e&&this.#U("input")}#Z(e){for(let n of this.#d)this.#ne(n,e===n.el)}#ne(e,n){let r=e.el;if(e.kind==="period"){let o=this.#i==="pm"?this.#w:this.#i==="am"?this.#T:"";n||(r.value=o),r.placeholder=this.#T;return}let a=e.kind==="hour"?this.#u:this.#f;n||(r.value=a==null?"":fa(a)),r.placeholder="\u2013\u2013"}#H(e){let n=zh(e);if(!n){this.#u=null,this.#f=null,this.#i=null;return}this.#f=n.min,this.#S?(this.#u=(n.h+11)%12+1,this.#i=n.h<12?"am":"pm"):(this.#u=n.h,this.#i=null)}#U(e){this.dispatchEvent(new Event(e,{bubbles:!0,composed:e==="input"}))}#$(){if(this.#s.has("aria-label")||this.#s.has("aria-labelledby"))return;let e=this.#n.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#r.setAttribute("aria-label",e):this.#r.removeAttribute("aria-label")}#re=()=>{this.#$()};#G(){if(this.#s.has("aria-description")||this.#s.has("aria-describedby"))return;let e=this.#a.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.#r.setAttribute("aria-description",e):this.#r.removeAttribute("aria-description")}#ae=()=>{this.#G()};#K(){let e=this.hasAttribute("disabled")||this.#c;for(let n of this.#d)n.el.disabled=e}#X(){let e=this.getAttribute("status")==="critical",n=this.#s.get("aria-invalid");for(let r of this.#d)r.el.setAttribute("aria-invalid",n??(e?"true":"false"));try{e?this.#e?.states?.add("invalid"):this.#e?.states?.delete("invalid")}catch{}}#te(){let e=this.hasAttribute("required");for(let n of this.#d)n.el.setAttribute("aria-required",e?"true":"false")}#oe(){this.value?this.#e?.states?.add("filled"):this.#e?.states?.delete("filled")}#J(){if(!this.#e)return;let e=this.#d[0]?.el??this,n=this.hasAttribute("required"),r=this.#D(),a=this.#W,o=this.#q;n&&!this.value?this.#e.setValidity({valueMissing:!0},"Please enter a time.",e):r!=null&&a!=null&&r<a?this.#e.setValidity({rangeUnderflow:!0},`Time must be ${this.getAttribute("min")} or later.`,e):r!=null&&o!=null&&r>o?this.#e.setValidity({rangeOverflow:!0},`Time must be ${this.getAttribute("max")} or earlier.`,e):this.getAttribute("status")==="critical"?this.#e.setValidity({customError:!0},"Invalid value.",e):this.#e.setValidity({})}get value(){let e=this.#ee;return e==null||this.#f==null?"":`${fa(e)}:${fa(this.#f)}`}set value(e){this.#m=!0;let n=e??"";n!==this.value&&(this.#H(n),this.#o?this.#O({dispatch:!1}):this.#g=this.value)}clear(){this.#u=null,this.#f=null,this.#i=null,this.#O(),this.#U("change"),this.dispatchEvent(new CustomEvent(d0,{bubbles:!0})),this.#d[0]?.el.focus()}focus(e){this.#d[0]?.el.focus(e)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get validity(){return this.#e?.validity}get validationMessage(){return this.#e?.validationMessage??""}get willValidate(){return this.#e?.willValidate??!1}checkValidity(){return this.#e?.checkValidity()??!0}reportValidity(){return this.#e?.reportValidity()??!0}formResetCallback(){this.#H(this.getAttribute("defaultvalue")??""),this.#O(),this.#U("change")}formDisabledCallback(e){this.#c=e,this.#K()}formStateRestoreCallback(e){this.value=e??""}};for(let t of rl)Object.defineProperty(ba.prototype,Uo(t),{configurable:!0,enumerable:!0,get(){return this[Lh](t)},set(e){this[Rh](t,e)}});function Nh(){typeof customElements>"u"||customElements.get("a-input-time")||customElements.define("a-input-time",ba)}Nh();var al=globalThis.Temporal;var _h=(t,e)=>`Non-positive ${t}: ${e}`,Fh=(t,e)=>`Non-finite ${t}: ${e}`,Hh=t=>`Cannot convert bigint to ${t}`,Vh="Invalid object",ga=(t,e,n,r)=>Wn(t,e)+`; must be between ${n}-${r}`,Wn=(t,e)=>`Invalid ${t}: ${e}`;var ol=1e3,il=1e6,sl=1e9,ll=6e10,cl=36e11;function pt(t){return t===void 0?Object.create(null):xn(t)}function Yo(t,e="number"){if(typeof t=="bigint")throw new TypeError(Hh(e));if(t=Number(t),!Number.isFinite(t))throw new RangeError(Fh(e,t));return t}function Me(t,e){return Math.trunc(Yo(t,e))||0}function Zo(t,e){return qh(Me(t,e),e)}function qh(t,e="number"){if(t<=0)throw new RangeError(_h(e,t));return t}function dl(t,e,n){return Math.min(Math.max(t,e),n)}function Yn(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function xn(t){if(!Yn(t))throw new TypeError(Vh);return t}function Go(t,e){return typeof t=="string"?((n,r)=>{let a=Object.create(null);return a[n]=r,a})(e,t):xn(t)}var en="smallestUnit",g0={constrain:0,reject:1},v0={compatible:0,reject:1,earlier:2,later:3},x0={reject:0,use:1,prefer:2,ignore:3},y0={auto:0,never:1,critical:2,always:3},w0={auto:0,never:1,critical:2},k0={auto:0,never:1},E0={floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8},jh=[Math.floor,ip,Math.ceil,sp,Math.trunc,lp,ap,op,cp],C0={previous:-1,next:1};function ul(t){let e=t.roundingIncrement;return e===void 0?1:Me(e,"roundingIncrement")}function hl(t){let e=t.fractionalSecondDigits;if(e!==void 0){if(typeof e!="number"){if(ya(e)==="auto")return;O(xa("fractionalSecondDigits",e))}e=At("fractionalSecondDigits",Math.floor(e),0,9,1)}return e}function pl(t,e,n=0,r){let a=e[t];if(a===void 0)return r?n:void 0;if(a=ya(a),a==="auto")return r?n:null;let o=$o[a];return o===void 0&&(o=ke.indexOf(a)),o<0&&O(vl(t,a,$o)),o}function yn(t,e,n,r=0){let a=n[t];if(a===void 0)return r;let o=ya(a),i=e[o];return i===void 0&&O(vl(t,o,e)),i}var Er=_e(pl,en),Uh=_e(pl,"largestUnit"),S0=_e(pl,"unit"),Wh=_e(yn,"overflow",g0),Yh=_e(yn,"disambiguation",v0),T0=_e(yn,"offset",x0),ml=_e(yn,"calendarName",y0),A0=_e(yn,"timeZoneName",w0),M0=_e(yn,"offset",k0),Cr=_e(yn,"roundingMode",E0),I0=_e(yn,"direction",C0);function fl(t,e,n,r){let a=r?Ht:mt[e+1];if(a){let o=mt[e];a%((t=At("roundingIncrement",t,1,a/o-(r?0:1),1))*o)&&O(xa("roundingIncrement",t))}else t=At("roundingIncrement",t,1,n?10**9:1,1);return t}function kr(t,e,n,r){return e!=null&&At(t,e,n,r,1,Xo),e}function Zh(t,e){e>t&&O(rp)}function Zn(t,e,n,r=9,a=0,o=4){e=pt(e);let i=Uh(e,a),s=ul(e),l=Cr(e,o),c=Er(e,a,1);return i=kr("largestUnit",i,a,r),c=kr(en,c,a,r),i==null?i=Math.max(n,c):Zh(i,c),s=fl(s,c,1),t&&(l=(d=>d<4?(d+2)%4:d)(l)),[i,c,s,l]}function $h(t,e,n){t=Go(t,en);let r=Uh(t),a=n(t.relativeTo),o=ul(t),i=Cr(t,7),s=Er(t);return r===void 0&&s===void 0&&O(np),s==null&&(s=0),r==null&&(r=Math.max(s,e)),Zh(r,s),o=fl(o,s,1),o>1&&s>5&&r!==s&&O("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit"),[r,s,o,i,a]}function va(t,e=6,n){let r=ul(t=Go(t,en)),a=Cr(t,7),o=Er(t);return o=xl(en,o),o=kr(en,o,0,e),r=fl(r,o,void 0,n),[o,r,a]}function Gh(t,e){let n=e((t=Go(t,"unit")).relativeTo),r=S0(t);return r=xl("unit",r),[r,n]}function Y(t){return t===void 0?0:Wh(xn(t))}function wn(t,e=0){t=pt(t);let n=Yh(t),r=T0(t,e);return[Wh(t),r,n]}function Kh(t){return Yh(pt(t))}function Xh(t,e=4){let n=hl(t),r=Cr(t,4),a=Er(t);return[r,...gl(kr(en,a,0,e),n)]}function Jh(t){return t=pt(t),[ml(t),...Xh(t)]}function Ko(t){return ml(pt(t))}function bl(t,e){return Xh(pt(t),e)}function Qh(t){t=pt(t);let e=ml(t),n=hl(t),r=M0(t),a=Cr(t,4),o=Er(t);return[e,A0(t),r,a,...gl(kr(en,o,0,4),n)]}function ep(t){let e=hl(t=pt(t)),n=Cr(t,4),r=Er(t);return[t.timeZone,n,...gl(kr(en,r,0,4),e)]}function gl(t,e){return t!=null?[mt[t],t<4?9-3*t:-1]:[e===void 0?1:10**(9-e),e]}function tp(t){let e=Go(t,"direction"),n=I0(e,0);return n||O(xa("direction",n)),n}var xa=Wn;var Sa=t=>`Missing ${t}`,xp=t=>"No valid fields: "+t.join(),yp="Invalid bag",vl=(t,e,n)=>Wn(t,e)+"; must be "+Object.keys(n).join(),wp="Cannot use valueOf",kp="Invalid calling context",zl=t=>"Missing year"+(t?"/era/eraYear":""),Gn="Invalid leap month",Ep=t=>Wn("Calendar",t),Cp=(t,e)=>`Unknown calendar ${t}; might need ${e}`,Bl=t=>Wn("TimeZone",t),kn="Out-of-bounds date";var np="Required smallestUnit or largestUnit",rp="smallestUnit > largestUnit",Sp=t=>`Cannot parse: ${t}`,tn=t=>`Invalid substring: ${t}`;var Ll=dl,$e=Yn;function O(t){throw new RangeError(t)}function ue(t){throw new TypeError(t)}function Cl(t,e,n,r,a){return At(e,((o,i)=>{let s=o[i];return s===void 0&&ue(Sa(i)),s})(t,e),n,r,a)}function At(t,e,n,r,a,o){let i=Ll(e,n,r);return a&&e!==i&&O(((s,l,c,d,u)=>u?ga(s,u[l],u[c],u[d]):ga(s,l,c,d))(t,e,n,r,o)),i}function Tr(t,e=Map){let n=new e;return(r,...a)=>{if(n.has(r))return n.get(r);let o=t(r,...a);return n.set(r,o),o}}var Tp=t=>ii({name:t},1),ii=(t,e)=>Sn(n=>({value:n,configurable:1,writable:!e}),t),Ta=t=>({[Symbol.toStringTag]:{value:t,configurable:1}});function Sn(t,e){let n={};for(let r in e)n[r]=t(e[r],r);return n}function Aa(t,e){let n={};for(let r of t)n[r]=e;return n}function Rl(t){let e={};for(let n of t)e[n]=r=>r[n];return e}function qt(t,e,n=Object.create(null)){for(let r of t)n[r]=e[r];return n}function Ap(t,e,n){for(let r of t)if(e[r]!==n[r])return 0;return 1}function D0(t,e,n){let r={...n};for(let a=0;a<e;a++)r[t[a]]=0;return r}function _e(t,...e){return(...n)=>t(...e,...n)}function Nl(){}function dp(t){return t[0].toUpperCase()+t.substring(1)}function Be(...t){return[].concat(...t).sort()}function Ir(t){return new RegExp(`^${t}$`,"i")}function _l(t){return parseInt(t.padEnd(9,"0"))}function Fl(t){return t&&t!=="+"?-1:1}function Sr(t){return t===void 0?0:parseInt(t)}function Qo(t,e){return String(e).padStart(t,"0")}var Mt=_e(Qo,2);function nn(t,e){return Math.sign(t-e)}function at(t,e){return t<e?-1:t>e?1:0}function Mp(t,e){let n=t/e;return t%e<0n?n-1n:n}function Hl(t,e){let n=Mp(t,e);return[n,t-n*e]}function Vt(t,e){return[Math.floor(t/e),si(t,e)]}function si(t,e){return(t%e+e)%e}function Dr(t,e){return Math.trunc(t/e)||0}function Vl(t,e){return t%e||0}function ap(t){return t<0?Math.floor(t):Math.ceil(t)}function Ip(t,e=1){return e*(.5+t/5)}function op(t){return Math.sign(t)*Math.round(Math.abs(t))||0}function ip(t){return li(t)?Math.floor(t):Math.round(t)}function sp(t){return li(t)?Math.ceil(t):Math.round(t)}function lp(t){return li(t)?Math.trunc(t)||0:Math.round(t)}function cp(t){return li(t)?(t=Math.trunc(t)||0)+t%2:Math.round(t)}function li(t){return Math.abs(t%1)===.5}var ql="iso8601",Dp="gregory",O0={bce:-1,ce:0};function Op(t){let e=t.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,"");return e==="bc"||e==="b"?"bce":e==="ad"||e==="a"?"ce":e}var ot=void 0,Pp=0;function Dt(t){return t===ot?"iso8601":t===0?"gregory":t.id}var P0=/^M(\d{2})(L?)$/;function zp(t){let e=P0.exec(t);return e||O((n=>`Invalid monthCode: ${n}`)(t)),[parseInt(e[1]),!!e[2]]}function Bp(t,e){return"M"+Mt(t)+(e?"L":"")}function Sl(t,e,n){return t+(e||n&&t>=n?1:0)}var $o={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},Xo=Object.keys($o);var Ma=ol,Ia=il,Tn=sl,Da=ll,Oa=cl,Ht=864e11,mt=[1,Ma,Ia,Tn,Da,Oa,Ht],z0=BigInt(Ma),Or=BigInt(Ia),Kn=BigInt(Tn),B0=BigInt(Da),L0=BigInt(Oa),Ee=BigInt(Ht);function Lp(t,e){let n=Number(t/Ee),r=Number(t%Ee);return n*(Ht/e)+(Math.trunc(r/e)+r%e/e)}var Ue=Xo.slice(0,6),Pa=Rl(Ue),ci=["year"],Jn=["day"],jl=["day","month","year"],di=["offset"],Ul=["timeZone"],Pr=["era","eraYear"],R0=["era","eraYear","year"],Rp=["month","monthCode"],N0=["day","month","monthCode"],Tl=Be(Ue),_0=Be(Pr,ci),za=Be(Rp,ci),Np=Be(Pr,za),Ba=Be(["monthCode"],ci),_p=Be(Pr,Ba),Fp=Be(Jn,["monthCode"]),Qn=Be(Jn,za),er=Be(Jn,Pr,za),Hp=Be(Qn,Ue),Vp=Be(er,Ue),F0=Be(Qn,Ue,di),H0=Be(er,Ue,di),qp=Be(Qn,Ue,di,Ul),jp=Be(er,Ue,di,Ul),V0=Be(Jn,Ba),q0=Be(Jn,Pr,Ba),Ot=Aa(Ue,0);function La(t){return ui(t,1),t}var j0={hour:23,minute:59,second:59};function ui(t,e){let n={};for(let r of Ue)n[r]=At(r,t[r],0,j0[r]||999,e);return n}function it(t){return Yl(t)*Tn+Up(t)}function Wl(t){return 1e3*Yl(t)+t.millisecond}function Yl(t){return 3600*t.hour+60*t.minute+t.second}function Up(t){return t.millisecond*Ia+t.microsecond*Ma+t.nanosecond}function Zl(t){let[e,n]=Vt(t,Ht);return[Wp(n),e]}function Wp(t){let[e,n]=Vt(t,Ia),[r,a]=Vt(n,Ma);return U0(e,r,a)}function U0(t,e=0,n=0){let[r,a]=Vt(t,36e5),[o,i]=Vt(a,6e4),[s,l]=Vt(i,1e3);return{hour:r,minute:o,second:s,millisecond:l,microsecond:e,nanosecond:n}}function up(t){let[e,n]=Hl(t,Kn);return[Number(e),Number(n)]}function Ra(t){return Number(Mp(t,Or))}function Fe(t){return rn(t)+BigInt(it(t))}function Yp(t){return Na(t)+Wl(t)}function rn(t){return BigInt(jt(t))*Ee}function Na(t){return 864e5*jt(t)}function jt(t){return wa(t.year,t.month,t.day)}function wa(t,e=1,n=1){let r=e-1;return t+=Math.floor(r/12),e=si(r,12),Date.UTC(t%400-400,e,0)/864e5+146097*(Dr(t,400)+1)+n}function _a(t){let[e,n]=Hl(t,Ee);return{...Zp(Number(e)),...Wp(Number(n))}}function Zp(t){let e=new Date(864e5*si(t,146097));return{year:e.getUTCFullYear()+400*Math.floor(t/146097),month:e.getUTCMonth()+1,day:e.getUTCDate()}}var $p=1972;function W0(t){return[t,0]}function Al(t,e){if(!e)return{year:1972,month:t}}function Y0(t,e,n){return{year:t,month:e,day:n}}function Gp(t,e){switch(e){case 2:return hi(t)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Z0(t){return hi(t)?366:365}function hi(t){return t%4==0&&(t%100!=0||t%400==0)}function $0(t,e,n){return t+=Dr(n,12),(e+=Vl(n,12))<1?(t--,e+=12):e>12&&(t++,e-=12),{year:t,month:e}}function G0(t,e,n,r){return 12*(n-t)+r-e}function pi(t){return si(wa(t.year,t.month,t.day)+4,7)||7}function Kp(t){return wa(t.year,t.month,t.day)-wa(t.year)+1}function Xp(t){let e=t.year,n=Math.floor((Kp(t)-pi(t)+10)/7),r=yl(e);return n<1?n=r=yl(--e):n>r&&(n=1,r=yl(++e)),{weekOfYear:n,yearOfWeek:e,De:r}}function yl(t){let e=pi({year:t,month:1,day:1});return e===4||e===3&&hi(t)?53:52}function K0({year:t}){return t<1?{era:"bce",eraYear:1-t}:{era:"ce",eraYear:t}}function Fa(t){return on(t),La(t)}function on(t){return Jp(t,1),t}function hp(t){return Ap(jl,t,Jp(t))}function Jp(t,e){let{year:n}=t,r=Cl(t,"month",1,12,e);return{year:n,month:r,day:Cl(t,"day",1,Gp(n,r),e)}}function xe(t,e){return t?t.de(e):e}function Xn(t,e,n){return t?t.N(e,n):W0(n)}function Ha(t,e){return t===0?K0(e):t&&t.h?.(e)||{}}function tr(t,e,n,r){return t?t.fe(e,n,r):Y0(e,n,r)}function ka(t,e){return t?t.j(e):12}function Ea(t,e,n){return t?t.o(e,n):Gp(e,n)}function mi(t,e){let{year:n,month:r}=xe(t,e),[a,o]=Xn(t,n,r);return Bp(a,o)}function $l(t,e){let{year:n}=xe(t,e);return t?t.q(n):hi(n)}function Gl(t,e){let{year:n}=xe(t,e);return ka(t,n)}function Kl(t,e){let{year:n,month:r}=xe(t,e);return Ea(t,n,r)}function Xl(t,e){let{year:n}=xe(t,e);return t?t.i(n):Z0(n)}function Qp(t,e){if(!t)return Kp(e);let{year:n}=xe(t,e),r=tr(t,n,1,1);return jt(e)-jt(r)+1}function em(t,e){return t===ot?Xp(e).weekOfYear:void 0}function tm(t,e){return t===ot?Xp(e).yearOfWeek:void 0}var ke=Xo.map(t=>t+"s"),Jl=Rl(ke),nm=Be(ke),X0=ke.slice(0,6),rm=ke.slice(6),J0=rm.slice(1),Pe=Aa(ke,0),Ql=Aa(X0,0),ec=_e(D0,ke);function xl(t,e){return e==null&&O(Sa(t)),e}var He=_e(Q0,"string");function Q0(t,e,n=t){return typeof e!==t&&ue(xa(n,e)),e}function tc(t,e="number"){return Number.isInteger(t)||O(((n,r)=>`Non-integer ${n}: ${r}`)(e,t)),t||0}function ya(t){return typeof t=="symbol"&&ue("Cannot convert Symbol to string"),String(t)}function nc(t){if(!Yn(t))return t;let e=t[Symbol.toPrimitive];if(e!=null){typeof e!="function"&&ue();let n=Reflect.apply(e,t,["string"]);return Yn(n)&&ue(),n}return Date.prototype[Symbol.toPrimitive].call(t,"string")}function fi(t){return typeof t=="boolean"?BigInt(t?1:0):typeof t=="string"?BigInt(t):(typeof t!="bigint"&&ue(`Invalid bigint: ${t}`),t)}function Va(t,e){return tc(Yo(t,e),e)}function Ce(t,e){return qt(jl,t,qt(Ue,e))}var rc=BigInt(1e8)*Ee,ac=BigInt(-1e8)*Ee,am=ac-Ee,om=-3261848;function bi(t){let e=12*t.year+t.month;return(e<om||e>3309129)&&O(kn),t}function st(t,e=1){let n=rn(t);return(n<(e?am:ac)||n>rc)&&O(kn),t}function nr(t){return ex(Fe(t)),t}function ex(t){return(t<=am||t>=rc+Ee)&&O(kn),t}function zt(t){return(t<ac||t>rc)&&O(kn),t}function oc(t,e){return zt(rn(t)+BigInt(it(t)-e))}function Ar(t,e,n){return ic(t/e,n)*e}function ic(t,e){return jh[e](t)}function tx(t,e,n,r){let a=sc(t,e,r,n);return im(a,Number(n-a.I)/Number(a.O-a.I))}function nx(t,e,n,r){return Ar(im(t,sm(e,t.I,t.O)),n,r)}function sc(t,e,n,r){let a=pp(t,e,n);return((o,i,s,l)=>l>0?i<=o&&o<=s:s<=o&&o<=i)(r,a.I,a.O,Math.sign(e))||(a=pp(t+e,e,n)),a}function pp(t,e,n){let r=t+e;return{ve:t,qe:r,I:n(t),O:n(r)}}function im(t,e){return t.ve+e*(t.qe-t.ve)}function sm(t,e,n){let r=n-e,a=t-e;if(!a)return 0;let o=a<0n?-a:a,i=r<0n?-r:r,s=at(a,0n)===at(r,0n)?1:-1;return at(o,i)<=0?o===i?s:Ip(at(2n*o,i),s):Number(a)/Number(r)}function ft(t){return{epochNanoseconds:t}}function bt(t,e,n){return{calendar:n,timeZone:e,epochNanoseconds:t}}function Ut(t,e){return qt(Ue,t,ye(t,e))}function ye(t,e){return qt(jl,t,{calendar:e})}function rr(t){return qt(Ue,t)}function Pt(t){return qt(ke,t,{sign:$a(t)})}function lm(t,e,n,r){return bt(e===6?ax(t,r):ox(t,e,n,r),t.timeZone,t.calendar)}function cm(t){let[e,n]=um(t);return Lp(n-e,Oa)}function dm(t){let{timeZone:e,calendar:n}=t;return bt(Mr(e,Ce(ze(t),Ot)),e,n)}function gi(t,e,n,r,a,o,i,s){if(r===0&&a===1)return t;let l=$a(t)||1,c=ni(r,s)?s&&r<6&&n>=6?sx:lx:ix,[d,u,m]=c(l,t,e,n,r,a,o,i);return m&&r!==7&&(d=((p,b,f,g,v,x)=>{for(let k=g+1;k<=f;k++){if(k===7&&f!==7)continue;let A=ec(k,p);A[ke[k]]+=v;let C=at(b,Ci(x,A));if(C&&C!==v)break;p=A}return p})(d,u,n,Math.max(6,r),l,i)),d}function rx(t,e,n){let r=Math.min(Cn(t),6);return En(yi(an(t),BigInt(e),n),r)}function ax(t,e){let[n,r]=um(t);return cx(t.epochNanoseconds,n,r,e)}function ox(t,e,n,r){if(e===0&&n===1)return t.epochNanoseconds;let a=ze(t);return Br(t.timeZone,vi(a,zr(e,n),r),a.offsetNanoseconds,2,0,1)}function vi(t,e,n){let[r,a]=xi(t,e,n),o=Ce(Rr(t,a),r);return nr(o),o}function xi(t,e,n){return Zl(Ar(it(t),e,n))}function ix(t,e,n,r,a,o,i,s){let l=ke[a],c=ec(a,e);a===7&&(e={...e,weeks:e.weeks+Math.trunc(e.days/7)});let d=Dr(e[l],o)*o,u=sc(d,o*t,p=>(c[l]=p,Ci(s,c)),n),m=nx(u,n,o,i);return c[l]=m,[c,m===u.qe?u.O:u.I,m!==d]}function sx(t,e,n,r,a,o,i,s){let l=Number(Nr(e)),c=zr(a,o),d=Ar(l,c,i),u={...e,...Ql},m=sc(u.days,t,x=>(u.days=x,Ci(s,u)),n),p=m.I,b=m.O,f=d-Number(b-p),g=0;f&&Math.sign(f)!==t?n=p+BigInt(d):(g+=t,d=Ar(f,c,i),n=b+BigInt(d));let v=Si(d);return[{...e,...v,days:e.days+g},n,!!g]}function lx(t,e,n,r,a,o,i){let s=an(e),l=yi(s,qa(a,o),i),c=l-s,d=Math.sign(Number(l/Ee)-Number(s/Ee))===t,u=En(l,Math.min(r,6));return[{...e,...u},n+c,d]}function um(t){let{timeZone:e}=t,n=Ce(ze(t),Ot),r=Ce(Rr(n,1),Ot);return[Mr(e,n),Mr(e,r)]}function cx(t,e,n,r){return ic(sm(t<n?t:n-1n,e,n),r)?n:e}function ei(t){return Ar(t,Da,7)}function yi(t,e,n){return hm(t,e,n,t/e%2n)}function wi(t,e,n){let[r,a]=Hl(t,Ee),o=r*Ee;return o+hm(a,e,n,(o/e+a/e)%2n)}function hm(t,e,n,r){let a=t/e,o=t%e,i=0;o&&(i=Ip(at(2n*(o<0n?-o:o),e),Math.sign(Number(o))));let s=ic(Number(r)+i,n);return(a-r+BigInt(s))*e}function zr(t,e){return mt[t]*e}function qa(t,e){return BigInt(mt[t])*BigInt(e)}var ze=Tr(dx,WeakMap);function dx(t){let{epochNanoseconds:e,timeZone:n}=t,r=n.B(e);return{..._a(e+BigInt(r)),offsetNanoseconds:r}}function Br(t,e,n,r=0,a=0,o,i){if(n!==void 0&&r===1&&(r===1||i))return oc(e,n);r!==2&&r!==0||st(e,0);let s=t.R(e);if(n!==void 0&&r!==3){let l=((c,d,u,m)=>{let p=Fe(d);m&&(u=ei(u));for(let b of c){let f=Number(p-b);if(m&&(f=ei(f)),f===u)return b}})(s,e,n,o);if(l!==void 0)return l;r===0&&O("Invalid TimeZone offset")}return i?Fe(e):Lr(t,e,a,s)}function Lr(t,e,n=0,r=t.R(e)){if(r.length===1)return r[0];if(n===1&&O("Ambiguous offset"),r.length)return r[n===3?1:0];let a=Fe(e),o=((s,l)=>{let c=s.B(l-Ee);return(d=>(d>Ht&&O("Out-of-bounds TimeZone gap"),d))(s.B(l+Ee)-c)})(t,a),i=_a(a+BigInt(o*(n===2?-1:1)));return(r=t.R(i))[n===2?0:r.length-1]}function Mr(t,e){let n=t.R(e);if(n.length)return n[0];let r=Fe(e)-Ee;return t.C(r,1)}function lc(t,e,n,r=0){$a(n)&&Cn(n)<8&&O("Cannot use small units");let a=st(Ca(t,e));return Ca(t,sn(t,a,n,r))}function ja(t,e,n=0){let{calendar:r,epochNanoseconds:a,timeZone:o}=t,i=Nr(e),s=a;if(gc(e)){let l=ze(t);s=Lr(o,Ce(sn(r,l,{...e,...Ql},n),l))+i}else s+=i;return{...t,epochNanoseconds:zt(s)}}function Ua(t,e,n,r=0){let[a,o]=ki(e,n);return nr(Ce(sn(t,e,{...n,...Ql,days:n.days+o},r),a))}function ki(t,e){return ux(t,Nr(e))}function cc(t,e){return hx(t,(gc(n=e)&&O("Cannot use large units"),Nr(n)));var n}function sn(t,e,n,r=0){let{years:a,months:o,weeks:i,days:s}=n,l;if(s+=Number(Nr(n)/Ee),a||o)l=ti(t,e,a,o,r);else{if(!i&&!s)return e;l=e}return(i||s)&&(l=Rr(l,7*i+s)),st(l)}function Ca(t,e){return Rr(e,1-xe(t,e).day)}function ti(t,e,n,r,a){let o=xe(t,e),{year:i,month:s,day:l}=o;if(n){let[c,d]=Xn(t,i,s);i+=n,s=Ml(t,c,d,t?t.p(i):void 0,a),s=At("month",s,1,ka(t,i),a)}return r&&({year:i,month:s}=pm(t,i,s,r)),l=At("day",l,1,Ea(t,i,s),a),tr(t,i,s,l)}function pm(t,e,n,r){return t?t.ae(e,n,r):$0(e,n,r)}function Ml(t,e,n,r,a){if(n){let o=t?t.l:void 0;return r!==void 0&&(o<0||r===e+1)?r:(a===1&&O(Gn),o<0?-o:e)}return Sl(e,0,r)}function ux(t,e){let n=Number(e/Ee),r=Number(e%Ee),[a,o]=Zl(it(t)+r);return[a,n+o]}function hx(t,e){return zt(t+e)}function Rr(t,e){return e?Zp(jt(t)+e):t}function Wa(t,e){return Dt(t)!==Dt(e)&&O("Mismatching Calendars"),t}function mm(t,e){return t.m!==e.m&&O("Mismatching TimeZones"),t}function fm(t){return t.timeZone.id}function bm(t,e,n,r,a,o,i){return r<6?Ya(e.epochNanoseconds,n.epochNanoseconds,r,a,o,i):((s,l,c,d,u,m,p)=>{let b=c.epochNanoseconds;if(b===l.epochNanoseconds)return Pe;let f,g=mm(l.timeZone,c.timeZone);return f=dc(g,s,l,c,d),f=gi(f,b,d,u,m,p,hc(s,g,l),1),f})(t,e,n,r,a,o,i)}function gm(t,e,n,r,a,o,i){return r<=6?Ya(Fe(e),Fe(n),r,a,o,i):((s,l,c,d,u,m,p)=>{let b=Fe(c),f=at(b,Fe(l));if(!f)return Pe;let g;return g=Em(s,l,c,f,d),g=gi(g,b,d,u,m,p,((v,x)=>({ne:Fe(x),ke:k=>Fe(Ce(sn(v,x,k),x))}))(s,l)),g})(t,e,n,r,a,o,i)}function vm(t,e,n,r,a,o,i){let s=Ca(t,e),l=Ca(t,n);return uc(s,l)?wm(t,st(s),st(l),r,a,o,i,8):Pe}function xm(t,e,n,r,a,o,i,s=6){return r===6?Ya(rn(e),rn(n),r,a,o,i):wm(t,e,n,r,a,o,i,s)}function ym(t,e,n,r,a,o){let i=Ar(it(e)-it(t),zr(r,a),o);return{...Pe,...Si(i,n)}}function wm(t,e,n,r,a,o,i,s=6){let l=rn(n);if(!uc(e,n))return Pe;let c;return c=Ei(t,e,n,r),a===s&&o===1||(c=gi(c,l,r,a,o,i,pc(t,e))),c}function Ya(t,e,n,r,a,o){return{...Pe,...En(yi(e-t,qa(r,a),o),n)}}function dc(t,e,n,r,a){return a<6?{...Pe,...En(r.epochNanoseconds-n.epochNanoseconds,a)}:((o,i,s)=>{let l=at(s.epochNanoseconds,i.epochNanoseconds);if(!l)return Pe;if(!uc(ze(i),ze(s)))return{...Pe,...En(s.epochNanoseconds-i.epochNanoseconds,5)};let[c,d,u]=px(o,i,s,l);return{...(m=c,p=d,Ei(e,m,p,a)),...Si(u)};var m,p})(t,n,r)}function km(t,e,n,r){let a=Fe(e),o=Fe(n),i=at(o,a);return i?r<=6?{...Pe,...En(o-a,r)}:Em(t,e,n,i,r):Pe}function Em(t,e,n,r,a){let o=n,i=it(n)-it(e);return Math.sign(i)===-r&&(o=Rr(n,-r),i+=Ht*r),{...Ei(t,e,o,a),...Si(i)}}function px(t,e,n,r){let a=ze(e),o=ze(n),i=n.epochNanoseconds,s=0,l=it(o)-it(a);Math.sign(l)===-r&&s++;let c=s+(r>0?1:0);for(;;s++){let d=Rr(o,s*-r),u=Lr(t,Ce(d,a));if(s===c||at(i,u)!==-r)return[a,d,Number(i-u)]}}function Ei(t,e,n,r){if(r<=7)return((f,g,v)=>{let x=wl(g,v);return f?{...Pe,weeks:Dr(x,7),days:Vl(x,7)}:{...Pe,days:x}})(r===7,e,n);let a=xe(t,e),o=xe(t,n);if(r===8){let{year:f,month:g,day:v}=a,{year:x,month:k,day:A}=o,C=Math.sign(nn(x,f)||nn(k,g)||wl(e,n)),L=0,R=0;if(C){L=t?t.ee(f,g,x,k):G0(f,g,x,k);let z=ti(t,e,0,L,0);C*nn(v,A)>0&&(L-=C,z=ti(t,e,0,L,0)),R=wl(z,n)}return{...Pe,months:L,days:R}}let{year:i,month:s,day:l}=a,{year:c,month:d,day:u}=o,m=c-i,p=d-s,b=u-l;if(m||p){let f=Math.sign(m||p),g=Ea(t,c,d),v=0;if(Math.sign(u-l)===-f){let x=g;({year:c,month:d}=pm(t,c,d,-f)),m=c-i,p=d-s,g=Ea(t,c,d),v=f<0?-x:g}if(b=u-Math.min(l,g)+v,m){let[x,k]=Xn(t,i,s),[A,C]=Xn(t,c,d),L=t?t.l:void 0;if(p=L!==void 0&&k&&!C&&(L<0?f>0&&A===-L:f<0&&A===x)?0:A-x||Number(C)-Number(k),Math.sign(p)===-f){let R=f<0&&-ka(t,c);c-=f,m=c-i,p=d-Ml(t,x,k,t?t.p(c):void 0,0)+(R||ka(t,c))}else if(t){let R=Ml(t,x,k,t.p(c),0);p=t.ee(c,R,c,d)}}}return{...Pe,years:m,months:p,days:b}}function uc(t,e){return nn(t.year,e.year)||nn(t.month,e.month)||nn(t.day,e.day)}function wl(t,e){return jt(e)-jt(t)}function Cm(t,e,n){return Za(t)?((r,a,o)=>{let{calendar:i,timeZone:s}=r,l=ja(r,a);return[dc(s,i,r,l,o),l.epochNanoseconds,hc(i,s,r)]})(t,e,n):((r,a,o)=>{let{calendar:i}=r,s=nr(Ce(r,Ot)),l=Ua(i,s,a);return[km(i,s,l,o),Fe(l),pc(i,r)]})(t,e,n)}function mp(t,e){return Za(t)?ja(t,e).epochNanoseconds:Fe(Ua(t.calendar,Ce(t,Ot),e))}function Ci(t,e){return gc(e)?t.ke(e):t.ne}function hc(t,e,n){let r=ze(n);return{ne:n.epochNanoseconds,ke:a=>Lr(e,Ce(sn(t,r,a),r))}}function pc(t,e){return{ne:rn(e),ke:n=>rn(sn(t,e,n))}}function Za(t){return"timeZone"in t}function ni(t,e){return t<=6-(e?1:0)}function mc(t,e,n){let r={};for(let a=e;a>=0;a--){let o=mt[a];r[n[a]]=Dr(t,o),t=Vl(t,o)}return r}var mx=2**53;function fc(t,e,n){let r=Math.max(Cn(e),Cn(n));return r>6&&O("Cannot use large units"),((a,o,i,s)=>Pt(An(((l,c,d,u)=>{let m=an(l)+an(c)*BigInt(u?-1:1);return Number.isFinite(Number(m/Ee))||O(kn),{...Pe,...En(m,d)}})(o,i,s,a))))(t,e,n,r)}function Sm(t,e,n){let r=Cn(e),[a,o,i,s,l]=$h(n,r,t);if(!l&&Math.max(r,a)<=6)return Pt(An(((p,b,f,g,v)=>{let x=yi(an(p),qa(f,g),v);return{...Pe,...En(x,b)}})(e,a,o,i,s)));l||O("Missing relativeTo");let c=Za(l);if(!e.sign&&(!c||a<6))return e;let[d,u,m]=Cm(l,e,a);return Pt(gi(d,u,a,o,i,s,m,c))}function Tm(t){return t.sign===-1?bc(t):t}function bc(t){return Pt(gt(t))}function gt(t){let e={};for(let n of ke)e[n]=-1*t[n]||0;return e}function $a(t,e=ke){let n=0;for(let r of e){let a=Math.sign(t[r]);a&&(n&&n!==a&&O("Cannot mix duration signs"),n=a)}return n}function An(t){for(let n of J0)fx(n,t[n]);let e=an(t);return Am(Number(e/Kn)),t}function fx(t,e){return At(t,e,-4294967295,4294967295,1)}function Am(t){Number.isSafeInteger(t)||O("Out-of-bounds duration")}function an(t){return BigInt(t.days)*Ee+Nr(t)}function Nr(t){return BigInt(t.hours)*L0+BigInt(t.minutes)*B0+Mm(t)}function Mm(t){return BigInt(t.seconds)*Kn+BigInt(t.milliseconds)*Or+BigInt(t.microseconds)*z0+BigInt(t.nanoseconds)}function En(t,e=6){let n=Number(t/Ee),r=Number(t%Ee),a=mt[e],o=e<=3?Number(t/BigInt(a)):n*(Ht/a)+Dr(r,a);Number.isFinite(o)||O(kn),e<=3&&Math.abs(o)/(Tn/mt[e])>=mx&&O(kn);let i=mc(r,e,ke);return i[ke[e]]=o,i}function Si(t,e=5){return mc(t,e,ke)}function gc(t){return!!$a(t,rm)}function Cn(t){let e=9;for(;e>0&&!t[ke[e]];e--);return e}function Ga(t,e){return at(t.epochNanoseconds,e.epochNanoseconds)}function Im(t,e,n,r){let a=t(pt(r).relativeTo),o=Math.max(Cn(e),Cn(n));return Ap(ke,e,n)?0:ni(o,a&&Za(a))?at(an(e),an(n)):(a||O("Missing relativeTo"),at(mp(a,e),mp(a,n)))}function vc(t,e){return ar(t,e)||Ti(t,e)}function ar(t,e){return nn(jt(t),jt(e))}function Ti(t,e){return nn(it(t),it(e))}function Dm(t,e){return!Ga(t,e)}function Om(t,e){return!Ga(t,e)&&t.timeZone.m===e.timeZone.m&&t.calendar===e.calendar}function Pm(t,e){return!vc(t,e)&&t.calendar===e.calendar}function zm(t,e){return!ar(t,e)&&t.calendar===e.calendar}function Bm(t,e){return!ar(t,e)&&t.calendar===e.calendar}function Lm(t,e){return!ar(t,e)&&t.calendar===e.calendar}function Rm(t,e){return!Ti(t,e)}function Ka(t){return t===0?O0:t?t.k:void 0}function We(t,e,n=e){return Ka(t)?n:e}function Nm(t,e){let n=e||void 0,r=Ka(e),{era:a,eraYear:o,year:i}=t;if(i!==void 0&&(i=Me(i,"year")),o!==void 0&&(o=Me(o,"eraYear")),a!==void 0||o!==void 0){a!==void 0&&o!==void 0||ue("Mismatching era/eraYear"),r||O("Forbidden era/eraYear");let s=Op(a),l=r[s];l===void 0&&O((d=>`Invalid era: ${d}`)(a));let c=n?._?n._(o,s,l):bx(o,l);i!==void 0&&i!==c&&O("Mismatching year/eraYear"),i=c}else i===void 0&&ue(zl(r));return i}function ri(t,e,n,r,a){let{month:o,monthCode:i}=t;if(i!==void 0){let s=((l,c,d,u,m=zp(c))=>{let p=l?l.p(d):void 0,[b,f]=m,g=Sl(b,f,p);if(f){let v=l?l.l:void 0;v===void 0&&O(Gn),v>0?(g>v&&O(Gn),p!==g&&(u===1&&O(Gn),g=Sl(b,0,p))):(g!==-v&&O(Gn),p===void 0&&u===1&&O(Gn))}return g})(e,i,n,a,r);o!==void 0&&o!==s&&O("Mismatching month/monthCode"),o=s,a=1}else o===void 0&&ue("Missing month/monthCode");return At("month",o,1,ka(e,n),a)}function Il(t,e,n,r,a){return Cl(t,"day",1,Ea(e,n,r),a)}function bx(t,e){return(e+t)*(Math.sign(e)||1)||0}function _r(t,e){return ui(qt(Ue,{...Ot,...t}),e)}var gx=Ir("([+-])(\\d{2})(?::?(\\d{2})(?::?(\\d{2})(?:[.,](\\d{1,9}))?)?)?");function Ai(t){let e=xc(t);return e===void 0&&O(Sp(t)),e}function xc(t,e){let n=gx.exec(t);if(n&&(r=>(a=>{a[0]!=="T"&&a[0]!=="t"||(a=a.slice(1));let o=a.search(/[.,]/),i=o<0?a:a.slice(0,o),s=i.split(":");return s.length===1?/^(?:\d{2}|\d{4}|\d{6})$/i.test(i):(s.length===2||s.length===3)&&s.every(l=>l.length===2&&/^\d{2}$/i.test(l))})(r.slice(1)))(n[0]))return((r,a)=>{let o=r[4]||r[5];return a&&o&&O(tn(o)),s=(Sr(r[2])*Oa+Sr(r[3])*Da+Sr(r[4])*Tn+_l(r[5]||""))*Fl(r[1]),Math.abs(s)>=Ht&&O("Out-of-bounds offset"),s;var s})(n,e)}var vt={era:ya,month:Zo,monthCode(t,e){return He(nc(t),e)},day:Zo},yc=Aa(Ue,Me),_m=Aa(ke,Va),wc=Object.assign({},vt,yc),kc={offset(t){return Ai(He(nc(t)))},...wc};function Te(t,e,n,r,a=!r){let o={},i=0;for(let s of e){let l=t[s];if(l!==void 0){i=1;let c=n[s];c&&(l=c(l,s)),o[s]=l}else r&&r.includes(s)&&ue(Sa(s))}return a&&!i&&ue(xp(e)),o}function xt(t,e,n){let r=Ka(e);t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||ue(zl(r)),t.monthCode===void 0&&t.month===void 0&&ue("Missing month/monthCode"),n||t.day!==void 0||ue(Sa("day"));let a=Fm(t);return[Nm(t,e),a]}function Mi(t,e){let n=e===ot,r=Ka(e);t.day===void 0&&ue(Sa("day")),n||t.month===void 0||t.year!==void 0||t.era!==void 0&&t.eraYear!==void 0||ue(zl(r));let a=Fm(t);return[t.eraYear!==void 0||t.year!==void 0?Nm(t,e):void 0,a]}function Xa(t,e=Ot,n){let r=Ce(t,e);return nr(r),Ut(r,n)}function ln(t,e,n,r,a){let o=ri(t,e,n,r,a);return ye(st(tr(e,n,o,Il(t,e,n,o,a))),e)}function Ii(t,e,n,r,a){return vx(e,n,ri(t,e,n,r,a))}function Di(t,e,n,r,a){let o=e===ot,i=n,s,l,c;if(i===void 0&&o&&(i=1972),i!==void 0){o||st(tr(e,i,1,1));let d=ri(t,e,i,r,a);s=Il(t,e,i,d,a),[l,c]=Xn(e,i,d)}else{t.monthCode===void 0&&ue("Missing month/monthCode"),[l,c]=r;let d=e?e.re:1972;if(d!==void 0)s=Il(t,e,d,ri(t,e,d,r,a),a);else{let u=a===0&&e?e.ge?.(l,c,t.day):void 0;s=u!==void 0?u:t.day}}return xx(e,l,c,s,t.day,a)}function vx(t,e,n){return ye(bi(tr(t,e,n,1)),t)}function xx(t,e,n,r,a,o){let i=n;i&&((t&&t.V?.[e])??1/0)<a&&(o===1&&O(Gn),i=0,r=Ll(a,1,(t&&t.U)??1/0));let s=t?t.u(e,!!i,r):Al(e,!!i);for(;!s&&o===0&&r>1;)r--,s=t?t.u(e,!!i,r):Al(e,!!i);s||O("Cannot guess year");let{year:l,month:c}=s;return ye(st(tr(t,l,c,r)),t)}function Fm(t){if(t.monthCode!==void 0)return zp(t.monthCode)}var Wt=Intl.DateTimeFormat;function yx(t,e){e<-864e13&&O(kn);let n=t.formatToParts(e),r={};for(let a of n)r[a.type]=a.value;return r}var wx={El_Aaiun:17,Tucuman:12,Tirane:11,Riga:10,Simferopol:9,Vienna:9,Tunis:8,Boa_Vista:6,Fortaleza:6,Maceio:6,Noronha:6,Recife:6,Gaza:6,Hebron:6,DeNoronha:6},kl=-388152e4;function Ec(t,e,n){let[r,a,o,i]=ep(n),s=r!==void 0;return((l,c,d,u,m,p)=>{d=wi(d,BigInt(m),u);let b=c.B(d);return Dc(_a(d+BigInt(b)),p)+(l?Ja(ei(b)):"Z")})(s,Ge(s?t(r):"UTC"),e.epochNanoseconds,a,o,i)}function Cc(t,e){let n=Qh(e);return((r,a,o,i,s,l,c,d,u,m)=>{i=wi(i,BigInt(u),d);let p=o.B(i);return Dc(_a(i+BigInt(p)),m)+Ja(ei(p),c)+Cx(a,l)+Oc(r,s)})(t.calendar,t.timeZone.id,t.timeZone,t.epochNanoseconds,...n)}function Sc(t,e){let n=Jh(e);return((r,a,o,i,s,l)=>Dc(vi(a,s,i),l)+Oc(r,o))(t.calendar,t,...n)}function Tc(t,e){return n=t.calendar,r=t,a=Ko(e),ai(r)+Oc(n,a);var n,r,a}function Ac(t,e){return Hm(t.calendar,Vm,t,Ko(e))}function Mc(t,e){return Hm(t.calendar,Ex,t,Ko(e))}function Hm(t,e,n,r){let a=r>1||r===0&&t!==ot;return r===1?t===ot?e(n):ai(n):a?ai(n)+jm(Dt(t),r===2):e(n)}function Ic(t,e){return((n,r,a,o)=>qm(xi(n,a,r)[0],o))(t,...bl(e))}function Oi(t,e){let[n,r,a]=bl(e,3);return r>1&&An(t={...t,...rx(t,r,n)}),kx(t,a)}function kx(t,e){let{sign:n}=t,r=n===-1?gt(t):t,{hours:a,minutes:o}=r,i=Mm(r),s=Number(i/Kn),l=Number(i%Kn);Am(s);let c=Pc(l,e),d=e>=0||!n||c;return(n<0?"-":"")+"P"+fp({Y:$n(r.years),M:$n(r.months),W:$n(r.weeks),D:$n(r.days)})+(a||o||s||d?"T"+fp({H:$n(a),M:$n(o),S:$n(s,d)+c}):"")}function fp(t){let e=[];for(let n in t){let r=t[n];r&&e.push(r,n)}return e.join("")}function $n(t,e){if(!t&&!e)return"";let n=Object.create(null);return n.useGrouping=0,t.toLocaleString("fullwide",n)}function Dc(t,e){return ai(t)+"T"+qm(t,e)}function ai(t){return Vm(t)+"-"+Mt(t.day)}function Vm(t){let{year:e}=t;return(e<0||e>9999?Um(e)+Qo(6,Math.abs(e)):Qo(4,e))+"-"+Mt(t.month)}function Ex(t){return Mt(t.month)+"-"+Mt(t.day)}function qm(t,e){let n=[Mt(t.hour),Mt(t.minute)];return e!==-1&&n.push(Mt(t.second)+((r,a,o,i)=>Pc(r*Ia+a*Ma+o,i))(t.millisecond,t.microsecond,t.nanosecond,e)),n.join(":")}function Ja(t,e=0){if(e===1)return"";let[n,r]=Vt(Math.abs(t),Oa),[a,o]=Vt(r,Da),[i,s]=Vt(o,Tn);return Um(t)+Mt(n)+":"+Mt(a)+(i||s?":"+Mt(i)+Pc(s):"")}function Cx(t,e){return e!==1?"["+(e===2?"!":"")+t+"]":""}function Oc(t,e){return e>1||e===0&&t!==ot?jm(Dt(t),e===2):""}function jm(t,e){return"["+(e?"!":"")+"u-ca="+t+"]"}var Sx=/0+$/;function Pc(t,e){let n=Qo(9,t);return n=e===void 0?n.replace(Sx,""):n.slice(0,e),n?"."+n:""}function Um(t){return t<0?"-":"+"}var Tx=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,Ax=/[^\w\/:+-]+/;function Wm(t){return Pi(He(t))}function Pi(t){return Ym(t).id}function Ym(t){let e=t.toUpperCase(),n=(a=>{let o=xc(a,1);if(o!==void 0)return{id:Ja(o),Z:o,m:o}})(e);if(n)return{kind:"fixed",...n};let r=e==="UTC"?"UTC":(a=>(Ax.test(a)&&O(Bl(a)),Tx.test(a)&&O("Forbidden ICU TimeZone"),a.toLowerCase().split("/").map((o,i)=>(o.length<=3||/\d/.test(o))&&!/etc|yap/.test(o)?o.toUpperCase():o.replace(/baja|dumont|[a-z]+/g,(s,l)=>s.length<=2&&!i||s==="in"||s==="chat"?s.toUpperCase():s.length>2||!l?dp(s).replace(/island|noronha|murdo|rivadavia|urville/,dp):s)).join("/")))(t);return Mx(r)}var Mx=Tr(t=>{if(t==="UTC")return{kind:"utc",id:t,m:t};let e=t.toUpperCase(),n=Ix(e);return{kind:"named",id:t,format:n,m:n.resolvedOptions().timeZone}}),Ix=Tr(t=>new Wt("en-u-hc-h23",{calendar:"iso8601",timeZone:t,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}));function Ge(t){let e=Ym(t);return Dx(e.id,e)}var Dx=Tr((t,e)=>e.kind==="named"?new Ol(t,e.m,e.format):new Dl(t,e.m,e.kind==="fixed"?e.Z:0)),Dl=class{constructor(e,n,r){this.id=e,this.m=n,this.Z=r}B(){return this.Z}R(e){return[oc(e,this.Z)]}C(){}},Ol=class{constructor(e,n,r){this.id=e,this.m=n,this.oe=((a,o)=>{let i=Tr(a),s=Tr(Ox),l=86400*o;function c(u){let[m,p]=gp(u,l),b=Jo(m),f=Jo(p),g=i(b),v=i(f);return g===v?g:d(s(b,f),g,v,u)}function d(u,m,p,b){let f,g;for(;(b===void 0||(f=b<u[0]?m:b>=u[1]?p:void 0)===void 0)&&(g=u[1]-u[0]);){let v=u[0]+Math.floor(g/2);a(v)===p?u[1]=v:u[0]=v+1}return f}return{Ae(u){let m=c(u-86400),p=c(u+86400),b=u-m,f=u-p;if(m===p)return[b];let g=c(b);return g===c(f)?[u-g]:m>p?[b,f]:[]},ze:c,C:function u(m,p){if(p>0&&m>=864e10)return;if(p<0){if(m<=kl)return;let A=bp()+94867200;if(m>A)return u(A,-1)}let b=p>0?Math.max(m,kl):m,[f,g]=gp(b,l),v=l*p,x=p>0?Math.max(m,bp())+94867200:kl,k=()=>p<0?g>x:f<x;for(;k();){let A=Jo(f),C=Jo(g),L=i(A),R=i(C);if(L!==R){let z=s(A,C);d(z,L,R);let M=z[0];if((nn(M,m)||1)===p)return M}f+=v,g+=v}}}})((a=>o=>{let i=yx(a,1e3*o);return 86400*wa((s=>{let l=s.relatedYear;if(l!==void 0)return parseInt(l);let c=parseInt(s.year);return s.era!==void 0&&Op(s.era)==="bce"?1-c:c})(i),parseInt(i.month),parseInt(i.day))+3600*parseInt(i.hour)+60*parseInt(i.minute)+parseInt(i.second)-o})(r),(a=>{let o=a.split("/").pop();return wx[o]||60})(e))}B(e){return this.oe.ze((n=>up(n)[0])(e))*Tn}R(e){let n=86400*jt(e)+Yl(e),r=Up(e);return this.oe.Ae(n).map(a=>zt(BigInt(a)*Kn+BigInt(r)))}C(e,n){let[r,a]=up(e),o=this.oe.C(r+(n>0||a?1:0),n);if(o!==void 0)return BigInt(o)*Kn}};function bp(){return Math.floor(Date.now()/1e3)}function Ox(t,e){return[t,e]}function gp(t,e){let n=Math.floor(t/e)*e;return[n,n+e]}function Jo(t){return Ll(t,-1e10,864e10)}function Zm(t,e,n){let r=Te(n,We(e,qp,jp),kc,[],0),a=r.timeZone!==void 0,[o,i]=xt(r,e),s=ln(r,e,o,i,0);if(a){let l=_r(r),c=Ge(t(r.timeZone));return{epochNanoseconds:Br(c,Ce(s,l),r.offset),timeZone:c,calendar:e}}return s}function $m(t,e,n,r){let a=Te(n,We(e,qp,jp),kc,Ul,0),o=t(a.timeZone),[i,s]=xt(a,e),[l,c,d]=wn(r),u=ln(a,e,i,s,l),m=_r(a,l),p=Ge(o);return bt(Br(p,Ce(u,m),a.offset,c,d),p,e)}function Gm(t,e,n){let r=Te(e,We(t,Hp,Vp),wc,[],0),[a,o]=xt(r,t),i=Y(n);return Xa(ln(r,t,a,o,i),_r(r,i),t)}function Km(t,e,n,r=[]){let a=Te(e,We(t,Qn,er),vt,r),[o,i]=xt(a,t);return ln(a,t,o,i,Y(n))}function Xm(t,e,n,r){let a=Te(e,We(t,za,Np),vt,r),[o,i]=xt(a,t,1);return Ii(a,t,o,i,Y(n))}function Jm(t,e,n,r){let a=Te(n,We(t,Qn,er),vt,Jn,0);e&&a.month!==void 0&&a.monthCode===void 0&&a.year===void 0&&(a.year=1972);let[o,i]=Mi(a,t);return Di(a,t,o,i,Y(r))}function Qm(t,e){return _r(Te(t,Tl,yc,[],1),Y(e))}function ef(t){let e=Te(t,nm,_m);return Pt(An({...Pe,...e}))}function It(t){O(Sp(t))}function tf(t){let e=Mn(t=He(nc(t))),n;return e||It(t),e.F?n=0:e.offset?n=Ai(e.offset):It(t),e.timeZoneId&&xc(e.timeZoneId,1),Fa(e),ft(oc(e,n))}function nf(t,e){let n=Mn(He(t));return n||It(t),n.timeZoneId?pf(n,e,void 0):(n.F&&It(t),Pl(n,e))}function rf(t,e,n){let r=Mn(He(t));return r&&r.timeZoneId||It(t),pf(r,e,n)}function af(t,e){let n=Mn(He(t));return n&&!n.F||It(t),mf(n,e)}function of(t,e){let n=Lc(Bc(He(t)),void 0,e);return ye(n,n.calendar)}function sf(t,e){let n=Rc(He(t));if(n)return zc(n),ye(bi(on(n)),e(n.calendarId));let r=Lc(Bc(t),Px,e),{calendar:a}=r;return ye(Ca(a,r),a)}function zc(t){t.calendarId!=="iso8601"&&O(tn(t.calendarId))}function lf(t,e){let n=Nc(He(t));if(n)return zc(n),ye(on(n),e(n.calendarId));let r=Lc(Bc(t),zx,e),{calendar:a}=r,{year:o,month:i,day:s}=xe(a,r),[l,c]=Xn(a,o,i),{year:d,month:u}=((m,p,b,f)=>{let g=m?m.u(p,b,f):Al(p,b);return g||O("Cannot guess year"),g})(a,l,c,s);return ye(st(tr(a,d,u,s)),a)}function cf(t){let e=(r=>{let a=ff(r);return a?(Qa(a[13]),bf(a,1)):void 0})(t=He(t));if(!e){let r=Mn(t);r&&r.te||It(t),r.F&&O(tn("Z")),zc(r),e=r}let n;return(n=Rc(t))&&hp(n)&&It(t),(n=Nc(t))&&hp(n)&&It(t),rr(La(e))}function df(t){let e=Hx.exec(He(t));return e||It(t),Pt(An((n=>{let r=0,a=0,o=0,i={years:s(n[2]),months:s(n[3]),weeks:s(n[4]),days:s(n[5]),hours:s(n[6],n[7],5),minutes:s(n[8],n[9],4),seconds:s(n[10],n[11],3),...mc(o,2,ke)};return r||O(xp(ke)),Fl(n[1])<0&&(i=gt(i)),i;function s(l,c,d){let u=0,m=0;return d&&([u,o]=Vt(o,mt[d])),l!==void 0&&(a&&O(tn(l)),m=(p=>{let b=parseInt(p);return Number.isFinite(b)||O(tn(p)),b})(l),r=1,c&&(o=_l(c)*(mt[d]/Tn),a=1)),u+m}})(e)))}function uf(t){let e=Mn(t)||Rc(t)||Nc(t);if(e)return e.calendarId;let n=ff(t);return n?Qa(n[13]).calendarId:t}function hf(t){let e=Mn(t);return e&&(e.timeZoneId||e.F&&"UTC"||e.offset)||t}function Bc(t){let e=Mn(t);return e&&!e.F||It(t),e}function Lc(t,e,n){return e&&t.calendarId==="iso8601"?(on(t),t.te&&La(t),Pl(e(t),n)):t.te?mf(t,n):Pl(t,n)}function Px(t){let e=12*t.year+t.month===om?20:1;return{...t,day:e}}function zx(t){return{...t,year:1972}}function pf(t,e,n){let r=Ge(Pi(t.timeZoneId)),a;if(Fa(t),t.te){let i=t.offset?Ai(t.offset):void 0,[,s,l]=wn(n);a=Br(r,t,i,s,l,!(r.Z||t.offset===void 0||(o=t.offset,o.replace(/\D/g,"").length>4)),t.F)}else wn(n),a=Mr(r,t);var o;return zt(a),bt(a,r,e(t.calendarId))}function mf(t,e){return Fa(t),nr(t),{...Ce(t,t),calendar:e(t.calendarId)}}function Pl(t,e){return on(t),st(t),{calendar:e(t.calendarId),year:t.year,month:t.month,day:t.day}}function oi(t){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${t}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}var Bx="(?:(?:([+-])(\\d{6}))|(\\d{4}))(-?)(\\d{2})\\4(\\d{2})(?:[T ]"+oi(8)+"(Z|([+-])"+oi(15)+")?)?",Lx=Ir("(?:(?:([+-])(\\d{6}))|(\\d{4}))-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),Rx=Ir("(?:--)?(\\d{2})-?(\\d{2})((?:\\[(!?)([^\\]]*)\\]){0,9})"),Nx=Ir(Bx+"((?:\\[(!?)([^\\]]*)\\]){0,9})"),_x=Ir("T?"+oi(2)+`(([+-])${oi(9)})?((?:\\[(!?)([^\\]]*)\\]){0,9})`),Fx=new RegExp("\\[(!?)([^\\]]*)\\]","g"),Hx=Ir("([+-])?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?!$)(?:(\\d+)(?:[.,](\\d{1,9}))?H)?(?:(\\d+)(?:[.,](\\d{1,9}))?M)?(?:(\\d+)(?:[.,](\\d{1,9}))?S)?)?");function Mn(t){let e=Nx.exec(t);return e?(n=>{let r=n[12],a=(r||"").toUpperCase()==="Z";return{year:gf(n),month:parseInt(n[5]),day:parseInt(n[6]),...bf(n,7),...Qa(n[19]),te:!!n[7],F:a,offset:a?void 0:r}})(e):void 0}function Rc(t){let e=Lx.exec(t);if(e)return(n=>({year:gf(n),month:parseInt(n[4]),day:1,...Qa(n[5])}))(e)}function Nc(t){let e=Rx.exec(t);return e?(n=>({year:1972,month:parseInt(n[1]),day:parseInt(n[2]),...Qa(n[3])}))(e):void 0}function ff(t){let e=_x.exec(t);if(e)return e[6]&&Ai(e[6]),e}function bf(t,e){let n=Sr(t[e+3]);return{...Zl(_l(t[e+4]||""))[0],hour:Sr(t[e]),minute:Sr(t[e+2]),second:n===60?59:n}}function gf(t){let e=Fl(t[1]),n=parseInt(t[2]||t[3]);return e<0&&!n&&O(tn(-0)),e*n}function Qa(t){let e,n,r=[];return t.replace(Fx,(a,o,i)=>{let s=!!o,[l,c]=i.split("=").reverse();return c?c==="u-ca"?(r.push(l.toLowerCase()),e||(e=s)):(s||/[A-Z]/.test(c))&&O(tn(a)):(n&&O(tn(a)),n=l),""}),r.length>1&&e&&O(tn(t)),{timeZoneId:n,calendarId:r[0]||"iso8601"}}function Fr(t,e,n){let r=Object.assign(Object.create(null),e);return El(r,n,Rp),Ka(t)&&(El(r,n,R0),t&&t.je&&El(r,n,N0,Pr)),r}function El(t,e,n,r){let a=0,o=[];for(let i of n)e[i]!==void 0?a=1:o.push(i);if(Object.assign(t,e),a)for(let i of r||o)delete t[i]}function vf(t,e,n){let r=We(t,F0,H0),a=ze(e),{year:o,month:i,day:s}=xe(t,a),l={year:o,monthCode:eo(t,o,i),day:s,hour:a.hour,minute:a.minute,second:a.second,millisecond:a.millisecond,microsecond:a.microsecond,nanosecond:a.nanosecond,offset:a.offsetNanoseconds},c=Te(n,r,kc),d=Fr(t,l,c);return[{...l,...c},d]}function xf(t,e,n){let r=We(t,Hp,Vp),{year:a,month:o,day:i}=xe(t,e),s={year:a,monthCode:eo(t,a,o),day:i,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond,microsecond:e.microsecond,nanosecond:e.nanosecond},l=Te(n,r,wc),c=Fr(t,s,l);return[{...s,...l},c]}function yf(t,e,n){let r=We(t,Qn,er),{year:a,month:o,day:i}=xe(t,e);return Fr(t,{year:a,monthCode:eo(t,a,o),day:i},Te(n,r,vt))}function wf(t,e,n){let r=We(t,za,Np),{year:a,month:o}=xe(t,e);return Fr(t,{year:a,monthCode:eo(t,a,o)},Te(n,r,vt))}function kf(t,e,n){let r=We(t,Qn,er),{year:a,month:o,day:i}=xe(t,e);return Fr(t,{monthCode:eo(t,a,o),day:i},Te(n,r,vt))}function Ef(t,e,n,r,a,o,i,s){let{calendar:l,timeZone:c}=t;return bt(Br(c,Ce(ln(n,l,r,a,o),ui(e,o)),e.offset,i,s),c,l)}function Cf(t,e,n,r,a,o){return Xa(ln(e,n,r,a,o),ui(t,o),n)}function Sf(t,e){return{...qt(Tl,t),...Te(e,Tl,yc)}}function Tf(t,e){return Pt((n=t,r=e,An({...n,...Te(r,nm,_m)})));var n,r}function eo(t,e,n){let[r,a]=Xn(t,e,n);return Bp(r,a)}function Af(t,e,n){let[r,a]=Gh(n,t),o=Cn(e),i=Math.max(r,o),s=a&&Za(a);if(!a&&ni(i,s))return vp(e,r);if(a||O("Missing relativeTo"),!e.sign&&(!s||r<6))return 0;let[l,c,d]=Cm(a,e,r);return ni(r,s)?vp(l,r):((u,m,p,b)=>{let f=ke[p],g=ec(p,u);return tx(u[f],$a(u)||1,m,v=>(g[f]=v,Ci(b,g)))})(l,c,r,d)}function vp(t,e){return Lp(an(t),mt[e])}function Mf(t,e,n){return bt(t.epochNanoseconds,e,n)}function If(t){return ft(t.epochNanoseconds)}function _c(t){return Ut(ze(t),t.calendar)}function Fc(t){return ye(ze(t),t.calendar)}function Hc(t){return rr(ze(t))}function Df(t,e,n){return bt(zt(Lr(e,t,n)),e,t.calendar)}function Of(t,e,n){let r;return r=n?Lr(e,Ce(t,n)):Mr(e,Ce(t,Ot)),bt(r,e,t.calendar)}function Pf(t,e,n){return Rf(t,qt(We(t,Ba,_p),e),Te(xn(n),Jn,vt,[]))}function zf(t,e,n){let r=We(t,ci,_0);return Rf(t,qt(Fp,e),Te(xn(n),r,vt,[]))}function Bf(t,e){let n=Te(e,Fp,vt),[r,a]=Mi(n,t);return Di(n,t,r,a,0)}function Lf(t,e){let n=Te(e,We(t,Ba,_p),vt),[r,a]=xt(n,t,1);return Ii(n,t,r,a,0)}function Rf(t,e,n){let r=We(t,V0,q0),a=Fr(t,e,n);a=Te(a,r,vt,[]);let[o,i]=xt(a,t);return ln(a,t,o,i,0)}function Nf(t){return ft(zt(BigInt(Va(t))*Or))}function _f(t){return ft(zt(fi(t)))}function Hr(t){return t.timeZone="UTC",["full","long"].includes(t.timeStyle)&&(t.timeStyle="medium"),t}function Ff(t,e){return t.timeZone!==void 0&&ue("Cannot specify TimeZone"),t.timeZone=e,t}function Vr(t,e,n){let r=t.resolvedOptions().calendar;!n&&e.calendar===ot||Dt(e.calendar)===r||O("Mismatching Calendars")}function or(t,e,n,r,a){let o=new Set(t),i=new Set(e),s=new Set(n);return(l,c)=>{let d,u,m={},p={},b={},f=0,g=0;for(let M of Object.keys(l)){let N=l[M];N===void 0||s.has(M)||(o.has(M)?M==="dateStyle"?d=N:M==="timeStyle"?u=N:m[M]=N:M==="era"?p[M]=N:i.has(M)?M==="dateStyle"||M==="timeStyle"?g=1:f=1:b[M]=N)}let v=d!==void 0,x=u!==void 0,k=v||x,A=Object.keys(m).length>0,C=f||g,L=A||v||x,R=Object.keys(p).length>0;(!c&&C||c&&C&&!L||k&&(A||R||f))&&ue("Invalid formatting options");let z={};return k||L||Object.assign(z,r),Object.assign(z,m,p,b),v&&(a?Object.assign(z,a[d]):z.dateStyle=d),x&&(z.timeStyle=u),z}}var Hf={year:"numeric",month:"numeric",day:"numeric"},Vf={hour:"numeric",minute:"numeric",second:"numeric"},Vc=Object.assign({},Hf,Vf),qc=["weekday","year","month","day","dateStyle"],to=["dayPeriod","hour","minute","second","fractionalSecondDigits","timeStyle"],jc=qc.concat(to),Vx=["weekday","day"].concat(to),qx=["weekday","year"].concat(to),qf=or(jc,[],[],Vc),jf=or(jc,[],[],{...Vc,timeZoneName:"short"}),Uf=or(jc,[],["timeZoneName"],Vc),Wf=or(qc,to,["timeZoneName"],Hf),Yf=or(to,qc,["timeZoneName","era"],Vf),Zf=or(["year","month","dateStyle"],Vx,["timeZoneName"],{year:"numeric",month:"numeric"},{full:{year:"numeric",month:"long"},long:{year:"numeric",month:"long"},medium:{year:"numeric",month:"short"},short:{year:"2-digit",month:"numeric"}}),$f=or(["month","day","dateStyle"],qx,["timeZoneName","era"],{month:"numeric",day:"numeric"},{full:{month:"long",day:"numeric"},long:{month:"long",day:"numeric"},medium:{month:"short",day:"numeric"},short:{month:"numeric",day:"numeric"}});function Gf(t,e){let{timeZone:n}=t,r=ze(t),{offsetNanoseconds:a}=r,o=e||Ot,i;return i=e?Br(n,Ce(r,o),a,2):Mr(n,Ce(r,o)),bt(i,n,t.calendar)}function zi(t){let e=Bi(),n=t.B(e);return _a(e+BigInt(n))}function Bi(){return BigInt(Date.now())*Or}function qr(){return new Wt().resolvedOptions().timeZone}var Uc="PlainYearMonth",Wc="PlainMonthDay",Yc="PlainDate",Zc="PlainDateTime",$c="PlainTime",Gc="ZonedDateTime",Kc="Instant",Xc="Duration";function cn(t,e,n,...r){return Object.defineProperties(e,Tp(t)),Object.defineProperties(e.prototype,Ta("Temporal."+t)),Object.defineProperties(e.prototype,Sn(a=>({get(){return a(n(this))},configurable:1}),Object.assign({},...r))),e}var dn=Nl.name==="noop"?t=>{Object.defineProperty(t,"_str_",{value:t.toJSON()})}:Nl;function un(){ue(kp)}function hn(){ue(wp)}var Kf={era(t){return Ha(t.calendar,t).era},eraYear(t){return Ha(t.calendar,t).eraYear},year(t){return xe(t.calendar,t).year},month(t){return xe(t.calendar,t).month},monthCode(t){return mi(t.calendar,t)}},Li={era(t){return Ha(t.calendar,t).era},eraYear(t){return Ha(t.calendar,t).eraYear},year(t){return xe(t.calendar,t).year},month(t){return xe(t.calendar,t).month},monthCode(t){return mi(t.calendar,t)},day(t){return xe(t.calendar,t).day}},Xf={monthCode(t){return mi(t.calendar,t)},day(t){return xe(t.calendar,t).day}},Jf={daysInMonth(t){return Kl(t.calendar,t)},daysInYear(t){return Xl(t.calendar,t)},monthsInYear(t){return Gl(t.calendar,t)},inLeapYear(t){return $l(t.calendar,t)}},Ri={dayOfWeek(t){return pi(t)},dayOfYear(t){return Qp(t.calendar,t)},weekOfYear(t){return em(t.calendar,t)},yearOfWeek(t){return tm(t.calendar,t)},daysInWeek(){return 7},daysInMonth(t){return Kl(t.calendar,t)},daysInYear(t){return Xl(t.calendar,t)},monthsInYear(t){return Gl(t.calendar,t)},inLeapYear(t){return $l(t.calendar,t)}};function Jc(t,e,n,r){let[a,o,i,s]=Zn(t,r,3,5);return jr(t,Ya(e.epochNanoseconds,n.epochNanoseconds,a,o,i,s))}function Qc(t,e,n,r){let a=Wa(e.calendar,n.calendar),[o,i,s,l]=Zn(t,r,5);return jr(t,bm(a,e,n,o,i,s,l))}function ed(t,e,n,r){let a=Wa(e.calendar,n.calendar),[o,i,s,l]=Zn(t,r,6);return jr(t,gm(a,e,n,o,i,s,l))}function td(t,e,n,r){let a=Wa(e.calendar,n.calendar),[o,i,s,l]=Zn(t,r,6,9,6);return jr(t,xm(a,e,n,o,i,s,l))}function nd(t,e,n,r){let a=Wa(e.calendar,n.calendar),[o,i,s,l]=Zn(t,r,9,9,8);return jr(t,vm(a,e,n,o,i,s,l))}function rd(t,e,n,r){let[a,o,i,s]=Zn(t,r,5,5);return jr(t,ym(e,n,a,o,i,s))}function jr(t,e){return Pt(t?gt(e):e)}function Qf(t,e,n){let{calendar:r}=t,a=yf(r,t,e),[o,i]=xt(a,r),s=Y(n);return ln(a,r,o,i,s)}function eb(t,e,n){let{calendar:r}=t,[a,o]=xf(r,t,e),[i,s]=xt(o,r),l=Y(n);return Cf(a,o,r,i,s,l)}function tb(t,e,n){let{calendar:r}=t,a=wf(r,t,e),[o,i]=xt(a,r,1),s=Y(n);return Ii(a,r,o,i,s)}function nb(t,e,n){let{calendar:r}=t,a=kf(r,t,e),[o,i]=Mi(a,r),s=Y(n);return Di(a,r,o,i,s)}function rb(t,e,n){let r=Sf(t,e),a=Y(n);return _r(r,a)}function ab(t,e,n){let{calendar:r}=t,[a,o]=vf(r,t,e),[i,s]=xt(o,r),[l,c,d]=wn(n,2);return Ef(t,a,o,i,s,l,c,d)}function Pn(t){let e=He(t).toLowerCase();return e===ql?ot:e===Dp?Pp:void O(Cp(t,"temporal-polyfill/full"))}function ro(t=ql){return Pn(t)}var ib=new WeakMap,sb=cn(Gc,class{constructor(t,e,n=void 0){let r=zt(fi(t)),a=Ge(Wm(e)),o=ro(n);lb(this,bt(r,a,o))}static from(t,e=void 0){return Ke(Ur(t,e))}static compare(t,e){return Ga(Ur(t),Ur(e))}get calendarId(){return Dt(de(this).calendar)}get timeZoneId(){return de(this).timeZone.id}get epochMilliseconds(){return Ra(de(this).epochNanoseconds)}get epochNanoseconds(){return de(this).epochNanoseconds}get offset(){return Ja(ze(de(this)).offsetNanoseconds)}get offsetNanoseconds(){return ze(de(this)).offsetNanoseconds}get hoursInDay(){return cm(de(this))}with(t,e=void 0){return Ke(ab(de(this),Gr(t),e))}withCalendar(t){return Ke({...de(this),calendar:Fi(t)})}withTimeZone(t){return Ke({...de(this),timeZone:Ge(kt(t))})}withPlainTime(t=void 0){return Ke(Gf(de(this),ld(t)))}add(t,e=void 0){let n=de(this);return Ke(ja(n,Ne(t),Y(e)))}subtract(t,e=void 0){let n=de(this);return Ke(ja(n,gt(Ne(t)),Y(e)))}until(t,e=void 0){let n=de(this),r=Ur(t);return Ie(Qc(0,n,r,e))}since(t,e=void 0){let n=de(this),r=Ur(t);return Ie(Qc(1,n,r,e))}round(t){let e=de(this),[n,r,a]=va(t);return Ke(lm(e,n,r,a))}startOfDay(){return Ke(dm(de(this)))}equals(t){return Om(de(this),Ur(t))}toInstant(){return pn(If(de(this)))}toPlainDateTime(){return Yt(_c(de(this)))}toPlainDate(){return Zt(Fc(de(this)))}toPlainTime(){return On(Hc(de(this)))}toLocaleString(t=void 0,e={}){let n=de(this),r=new Wt(t,Ff(jf(e),fm(n)));return Vr(r,n),r.format(Ra(n.epochNanoseconds))}toString(t=void 0){return Cc(de(this),t)}toJSON(){return Cc(de(this))}getTimeZoneTransition(t){let e=de(this),n=e.timeZone.C(e.epochNanoseconds,tp(t));return n!==void 0?Ke({...e,epochNanoseconds:n}):null}valueOf(){return hn()}},jx,Li,Ri,Pa);function Ke(t){return lb(Object.create(sb.prototype),t)}function de(t){return $t(t)||un()}function jx(t){let e=de(t);return{...ze(e),calendar:e.calendar}}function $t(t){return ib.get(t)}function Ur(t,e){if($e(t)){let n=$t(t);if(n)return wn(e),n;let r=ao(t);return $m(kt,r,t,e)}return rf(t,Pn,e)}function lb(t,e){return ib.set(t,e),dn(t),t}function kt(t){if($e(t)){let e=$t(t);return e||ue(Bl(t)),e.timeZone.id}return(e=>Pi(hf(He(e))))(t)}var cb=new WeakMap,db=cn(Kc,class{constructor(t){let e=zt(fi(t));hb(this,ft(e))}static from(t){return pn(Wr(t))}static fromEpochMilliseconds(t){return pn(Nf(t))}static fromEpochNanoseconds(t){return pn(_f(t))}static compare(t,e){return Ga(Wr(t),Wr(e))}get epochMilliseconds(){return Ra(yt(this).epochNanoseconds)}get epochNanoseconds(){return yt(this).epochNanoseconds}add(t){let e=yt(this);return pn(ft(cc(e.epochNanoseconds,Ne(t))))}subtract(t){let e=yt(this);return pn(ft(cc(e.epochNanoseconds,gt(Ne(t)))))}until(t,e=void 0){return Ie(Jc(0,yt(this),Wr(t),e))}since(t,e=void 0){return Ie(Jc(1,yt(this),Wr(t),e))}round(t){let e=yt(this),[n,r,a]=va(t,5,1);return pn(ft(wi(e.epochNanoseconds,qa(n,r),a)))}equals(t){return Dm(yt(this),Wr(t))}toZonedDateTimeISO(t){return Ke(Mf(yt(this),Ge(kt(t))))}toLocaleString(t=void 0,e={}){let n=yt(this);return new Wt(t,qf(e)).format(Ra(n.epochNanoseconds))}toString(t=void 0){return Ec(kt,yt(this),t)}toJSON(){return Ec(kt,yt(this))}valueOf(){return hn()}});function pn(t){return hb(Object.create(db.prototype),t)}function yt(t){return id(t)||un()}function id(t){return cb.get(t)}function Wr(t){if($e(t)){let e=id(t);if(e)return e;let n=$t(t);if(n)return ft(n.epochNanoseconds)}return tf(t)}var{toTemporalInstant:ub}={toTemporalInstant(){let t=Date.prototype.valueOf.call(this);return pn(ft(BigInt(tc(t))*Or))}};function hb(t,e){return cb.set(t,e),dn(t),t}var pb=new WeakMap,mb=cn(Wc,class{constructor(t,e,n=void 0,r){let a=Me(t),o=Me(e),i=ro(n),s=Me(r??$p),l=st(on({year:s,month:a,day:o}));fb(this,ye(l,i))}static from(t,e=void 0){return od(ob(t,e))}get calendarId(){return Dt(In(this).calendar)}with(t,e=void 0){return od(nb(In(this),Gr(t),e))}equals(t){return Lm(In(this),ob(t))}toPlainDate(t){let e=In(this);return Zt(zf(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=In(this),r=new Wt(t,Hr($f(e)));return Vr(r,n,1),r.format(Na(n))}toString(t=void 0){return Mc(In(this),t)}toJSON(){return Mc(In(this))}valueOf(){return hn()}},In,Xf);function od(t){return fb(Object.create(mb.prototype),t)}function In(t){return Ni(t)||un()}function Ni(t){return pb.get(t)}function ob(t,e){if($e(t)){let r=Ni(t);if(r)return Y(e),r;let a=Mb(t);return Jm(a===void 0?ot:a,a===void 0,t,e)}let n=lf(t,Pn);return Y(e),n}function fb(t,e){return pb.set(t,e),dn(t),t}var bb=new WeakMap,gb=cn(Uc,class{constructor(t,e,n=void 0,r){let a=Me(t),o=Me(e),i=ro(n),s=Me(r??1),l=bi(on({year:a,month:o,day:s}));vb(this,ye(l,i))}static from(t,e=void 0){return no(Yr(t,e))}static compare(t,e){return ar(Yr(t),Yr(e))}get calendarId(){return Dt(wt(this).calendar)}with(t,e=void 0){return no(tb(wt(this),Gr(t),e))}add(t,e=void 0){let n=wt(this);return no(ye(lc(n.calendar,n,Ne(t),Y(e)),n.calendar))}subtract(t,e=void 0){let n=wt(this);return no(ye(lc(n.calendar,n,gt(Ne(t)),Y(e)),n.calendar))}until(t,e=void 0){let n=wt(this),r=Yr(t);return Ie(nd(0,n,r,e))}since(t,e=void 0){let n=wt(this),r=Yr(t);return Ie(nd(1,n,r,e))}equals(t){return Bm(wt(this),Yr(t))}toPlainDate(t){let e=wt(this);return Zt(Pf(e.calendar,this,t))}toLocaleString(t=void 0,e={}){let n=wt(this),r=new Wt(t,Hr(Zf(e)));return Vr(r,n,1),r.format(Na(n))}toString(t=void 0){return Ac(wt(this),t)}toJSON(){return Ac(wt(this))}valueOf(){return hn()}},wt,Kf,Jf);function no(t){return vb(Object.create(gb.prototype),t)}function wt(t){return _i(t)||un()}function _i(t){return bb.get(t)}function Yr(t,e){if($e(t)){let r=_i(t);if(r)return Y(e),r;let a=ao(t);return Xm(a,t,e)}let n=sf(t,Pn);return Y(e),n}function vb(t,e){return bb.set(t,e),dn(t),t}function Ux(t){if(!$e(t))return;let e=id(t);return e?[Kc,e]:(e=$t(t),e?[Gc,e]:(e=ir(t),e?[Zc,e]:(e=Kr(t),e?[Yc,e]:(e=sd(t),e?[$c,e]:(e=_i(t),e?[Uc,e]:(e=Ni(t),e?[Wc,e]:(e=cd(t),e?[Xc,e]:void 0)))))))}function Gr(t){return(Ux(t)||t.calendar!==void 0||t.timeZone!==void 0)&&ue(yp),t}var xb=new WeakMap,yb=cn($c,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0){let i=La(Sn(Me,{hour:t,minute:e,second:n,millisecond:r,microsecond:a,nanosecond:o}));wb(this,rr(i))}static from(t,e=void 0){return On(Dn(t,e))}static compare(t,e){return Ti(Dn(t),Dn(e))}with(t,e=void 0){return On(rb(Bt(this),Gr(t),e))}add(t){let e=Bt(this);return On(ki(e,Ne(t))[0])}subtract(t){let e=Bt(this);return On(ki(e,gt(Ne(t)))[0])}until(t,e=void 0){return Ie(rd(0,Bt(this),Dn(t),e))}since(t,e=void 0){return Ie(rd(1,Bt(this),Dn(t),e))}round(t){let e=Bt(this),[n,r,a]=va(t,5);return On(xi(e,zr(n,r),a)[0])}equals(t){return Rm(Bt(this),Dn(t))}toLocaleString(t=void 0,e={}){let n=Bt(this);return new Wt(t,Hr(Yf(e))).format(Wl(n))}toString(t=void 0){return Ic(Bt(this),t)}toJSON(){return Ic(Bt(this))}valueOf(){return hn()}},Bt,Pa);function On(t){return wb(Object.create(yb.prototype),t)}function Bt(t){return sd(t)||un()}function sd(t){return xb.get(t)}function Dn(t,e){if($e(t)){let r=sd(t);if(r)return Y(e),r;let a=ir(t);if(a)return Y(e),rr(a);let o=$t(t);return o?(Y(e),Hc(o)):Qm(t,e)}let n=cf(t);return Y(e),n}function ld(t){return t===void 0?void 0:Dn(t)}function wb(t,e){return xb.set(t,e),dn(t),t}var kb=new WeakMap,Eb=cn(Zc,class{constructor(t,e,n,r=0,a=0,o=0,i=0,s=0,l=0,c=void 0){let d=nr(Fa(Sn(Me,{year:t,month:e,day:n,hour:r,minute:a,second:o,millisecond:i,microsecond:s,nanosecond:l}))),u=ro(c);Cb(this,Ut(d,u))}static from(t,e=void 0){return Yt(Zr(t,e))}static compare(t,e){let n=Zr(t),r=Zr(e);return vc(n,r)}get calendarId(){return Dt(Re(this).calendar)}with(t,e=void 0){return Yt(eb(Re(this),Gr(t),e))}withCalendar(t){let e=Re(this);return Yt(Ut(e,Fi(t)))}withPlainTime(t=void 0){let e=Re(this);return Yt(Xa(e,ld(t),e.calendar))}add(t,e=void 0){let n=Re(this);return Yt(Ut(Ua(n.calendar,n,Ne(t),Y(e)),n.calendar))}subtract(t,e=void 0){let n=Re(this);return Yt(Ut(Ua(n.calendar,n,gt(Ne(t)),Y(e)),n.calendar))}until(t,e=void 0){let n=Re(this),r=Zr(t);return Ie(ed(0,n,r,e))}since(t,e=void 0){let n=Re(this),r=Zr(t);return Ie(ed(1,n,r,e))}round(t){let e=Re(this),[n,r,a]=va(t);return Yt(Ut(vi(e,zr(n,r),a),e.calendar))}equals(t){return Pm(Re(this),Zr(t))}toZonedDateTime(t,e=void 0){return Ke(Df(Re(this),Ge(kt(t)),Kh(e)))}toPlainDate(){let t=Re(this);return Zt(ye(t,t.calendar))}toPlainTime(){return On(rr(Re(this)))}toLocaleString(t=void 0,e={}){let n=Re(this),r=new Wt(t,Hr(Uf(e)));return Vr(r,n),r.format(Yp(n))}toString(t=void 0){return Sc(Re(this),t)}toJSON(){return Sc(Re(this))}valueOf(){return hn()}},Re,Li,Ri,Pa);function Yt(t){return Cb(Object.create(Eb.prototype),t)}function Re(t){return ir(t)||un()}function ir(t){return kb.get(t)}function Zr(t,e){if($e(t)){let r=ir(t);if(r)return Y(e),r;let a=Kr(t);if(a)return Y(e),Ut(Ce(a,Ot),a.calendar);let o=$t(t);if(o)return Y(e),_c(o);let i=ao(t);return Gm(i,t,e)}let n=af(t,Pn);return Y(e),n}function Cb(t,e){return kb.set(t,e),dn(t),t}var Sb=new WeakMap,Tb=cn(Yc,class{constructor(t,e,n,r=void 0){let a=st(on(Sn(Me,{year:t,month:e,day:n}))),o=ro(r);Ab(this,ye(a,o))}static from(t,e=void 0){return Zt($r(t,e))}static compare(t,e){return ar($r(t),$r(e))}get calendarId(){return Dt(Ve(this).calendar)}with(t,e=void 0){return Zt(Qf(Ve(this),Gr(t),e))}withCalendar(t){let e=Ve(this);return Zt(ye(e,Fi(t)))}add(t,e=void 0){let n=Ve(this);return Zt(ye(sn(n.calendar,n,Ne(t),Y(e)),n.calendar))}subtract(t,e=void 0){let n=Ve(this);return Zt(ye(sn(n.calendar,n,gt(Ne(t)),Y(e)),n.calendar))}until(t,e=void 0){let n=Ve(this),r=$r(t);return Ie(td(0,n,r,e))}since(t,e=void 0){let n=Ve(this),r=$r(t);return Ie(td(1,n,r,e))}equals(t){return zm(Ve(this),$r(t))}toZonedDateTime(t){let e=$e(t)?{timeZone:t.timeZone,plainTime:t.plainTime}:{timeZone:t},n=Ve(this),r=kt(e.timeZone),a=e.plainTime,o=a!==void 0?Dn(a):void 0;return Ke(Of(n,Ge(r),o))}toPlainDateTime(t=void 0){let e=Ve(this);return Yt(Xa(e,ld(t),e.calendar))}toPlainYearMonth(){let t=Ve(this);return no(Lf(t.calendar,this))}toPlainMonthDay(){let t=Ve(this);return od(Bf(t.calendar,this))}toLocaleString(t=void 0,e={}){let n=Ve(this),r=new Wt(t,Hr(Wf(e)));return Vr(r,n),r.format(Na(n))}toString(t=void 0){return Tc(Ve(this),t)}toJSON(){return Tc(Ve(this))}valueOf(){return hn()}},Ve,Li,Ri);function Zt(t){return Ab(Object.create(Tb.prototype),t)}function Ve(t){return Kr(t)||un()}function Kr(t){return Sb.get(t)}function $r(t,e){if($e(t)){let r=Kr(t);if(r)return Y(e),r;let a=ir(t);if(a)return Y(e),ye(a,a.calendar);let o=$t(t);if(o)return Y(e),Fc(o);let i=ao(t);return Km(i,t,e)}let n=of(t,Pn);return Y(e),n}function Ab(t,e){return Sb.set(t,e),dn(t),t}function ao(t){let e=Mb(t);return e===void 0?ot:e}function Mb(t){let{calendar:e}=t;if(e!==void 0)return Fi(e)}function Fi(t){if($e(t)){let e=Kr(t)||ir(t)||$t(t)||Ni(t)||_i(t);return e||ue(Ep(t)),e.calendar}return(e=>Pn(uf(He(e))))(t)}var Ib=new WeakMap,Db=cn(Xc,class{constructor(t=0,e=0,n=0,r=0,a=0,o=0,i=0,s=0,l=0,c=0){let d=An(Sn(Va,{years:t,months:e,weeks:n,days:r,hours:a,minutes:o,seconds:i,milliseconds:s,microseconds:l,nanoseconds:c}));Ob(this,Pt(d))}static from(t){return Ie(Ne(t))}static compare(t,e,n=void 0){return Im(ad,Ne(t),Ne(e),n)}get sign(){return lt(this).sign}get blank(){return!lt(this).sign}with(t){return Ie(Tf(lt(this),t))}negated(){return Ie(bc(lt(this)))}abs(){return Ie(Tm(lt(this)))}add(t){return Ie(fc(0,lt(this),Ne(t)))}subtract(t){return Ie(fc(1,lt(this),Ne(t)))}round(t){return Ie(Sm(ad,lt(this),t))}total(t){return Af(ad,lt(this),t)}toLocaleString(t=void 0,e){let n=lt(this);return Intl.DurationFormat?new Intl.DurationFormat(t,e).format(n):Oi(n,e)}toString(t=void 0){return Oi(lt(this),t)}toJSON(){return Oi(lt(this))}valueOf(){return hn()}},lt,Jl);function Ie(t){return Ob(Object.create(Db.prototype),t)}function lt(t){return cd(t)||un()}function cd(t){return Ib.get(t)}function Ne(t){return $e(t)?cd(t)||ef(t):df(t)}function ad(t){if(t!==void 0){if($e(t)){let e=$t(t);if(e)return e;let n=Kr(t);if(n)return n;let r=ir(t);if(r)return ye(r,r.calendar);let a=ao(t);return Zm(kt,a,t)}return nf(t,Pn)}}function Ob(t,e){return Ib.set(t,e),dn(t),t}var Wx=Object.defineProperties({},{...Ta("Temporal.Now"),...ii({timeZoneId(){return qr()},instant(){return pn(ft(Bi()))},zonedDateTimeISO(t=qr()){let e=Ge(kt(t));return Ke(bt(Bi(),e))},plainDateTimeISO(t=qr()){let e=zi(Ge(kt(t)));return Yt(Ut(e))},plainDateISO(t=qr()){let e=zi(Ge(kt(t)));return Zt(ye(e))},plainTimeISO(t=qr()){let e=zi(Ge(kt(t)));return On(rr(e))}})}),Pb=Object.defineProperties({},{...Ta("Temporal"),...ii({PlainYearMonth:gb,PlainMonthDay:mb,PlainDate:Tb,PlainTime:yb,PlainDateTime:Eb,ZonedDateTime:sb,Instant:db,Duration:Db,Now:Wx})});var Ae=al||Pb;var T3=al?Date.prototype.toTemporalInstant:ub;var Hi=class extends B{static formAssociated=!0;static observedAttributes=["value","data-focus"];internals;selectedIso=null;constructor(){super();try{this.internals=this.attachInternals?.()}catch(e){console.warn("a-calendar: ElementInternals unavailable \u2014 form association disabled.",e)}this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeydown)}connectedCallback(){if(Object.prototype.hasOwnProperty.call(this,"value")){let e=this.value;delete this.value,this.value=e}this.selectedIso=this.getAttribute("value")||this.getAttribute("defaultvalue")||null,this.applyFormValue(this.currentIso())}attributeChangedCallback(e,n,r){if(e==="value"){this.applyFormValue(r);return}e==="data-focus"&&this.focusCell(r)}get#e(){return this.hasAttribute("value")}currentIso(){return this.#e?this.getAttribute("value")||null:this.selectedIso}applyFormValue(e){this.internals?.setFormValue(e||null);try{e?this.internals?.states?.add("filled"):this.internals?.states?.delete("filled")}catch{}}onClick=e=>{if(this.hasAttribute("disabled"))return;let n=e.target?.closest('[data-part="day-cell"]');if(!n||n.hasAttribute("disabled"))return;let r=n.dataset.date;r&&this.requestSelect(r)};requestSelect(e){let n=this.currentIso();if(e===n)return;let r=this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!0,detail:{next:e,prev:n,reason:"user"}}));this.#e||!r||(this.selectedIso=e,this.applyFormValue(e),this.dispatchEvent(new Event("change",{bubbles:!0})))}get#t(){return Array.from(this.querySelectorAll('[data-part="day-cell"]'))}onKeydown=e=>{if(this.hasAttribute("disabled"))return;let n=e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&(e.key==="PageUp"||e.key==="PageDown");if(je(e)&&!n)return;let r=this.#t;if(r.length===0)return;let a=e.target?.closest('[data-part="day-cell"]')??r.find(s=>s.tabIndex===0)??null;if(!a?.dataset.date)return;let o=null;switch(e.key){case"Home":case"End":{let s=r.indexOf(a);if(s<0)return;let l=s-s%7;o=r[e.key==="Home"?l:l+6]?.dataset.date??null;break}default:{let s=Ae.PlainDate.from(a.dataset.date),l;switch(e.key){case"ArrowLeft":l=s.subtract({days:1});break;case"ArrowRight":l=s.add({days:1});break;case"ArrowUp":l=s.subtract({days:7});break;case"ArrowDown":l=s.add({days:7});break;case"PageUp":l=s.add({[e.shiftKey?"years":"months"]:-1});break;case"PageDown":l=s.add({[e.shiftKey?"years":"months"]:1});break;default:return}o=l.toString()}}if(!o)return;e.preventDefault();let i=r.find(s=>s.dataset.date===o);i&&!i.hasAttribute("disabled")&&i.focus(),this.dispatchEvent(new CustomEvent("navigate",{bubbles:!0,detail:{date:o}}))};focusCell(e){if(!e)return;let n=e.split("#")[0];queueMicrotask(()=>{this.querySelector(`[data-date="${n}"]`)?.focus()})}emitState(e,n,r){this.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,detail:{next:e,prev:n,reason:r}})),this.dispatchEvent(new Event("change",{bubbles:!0}))}get value(){return this.currentIso()??""}set value(e){this.selectedIso=e||null,this.applyFormValue(e||null)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}formResetCallback(){let e=this.getAttribute("defaultvalue")||null,n=this.currentIso();this.selectedIso=e,this.applyFormValue(e),this.emitState(e,n,"reset")}formStateRestoreCallback(e){let n=this.currentIso();this.selectedIso=e||null,this.applyFormValue(e||null),this.emitState(e||null,n,"restore")}};function zb(){typeof customElements>"u"||customElements.get("a-calendar")||customElements.define("a-calendar",Hi)}zb();var Vi=class extends hr{ariaProp="ariaChecked";accessibilityObserver;connectedCallback(){super.connectedCallback(),this.syncAccessibilityRelations(),this.accessibilityObserver??=new this.view.MutationObserver(()=>this.syncAccessibilityRelations()),this.accessibilityObserver.observe(this,{childList:!0})}disconnectedCallback(){this.accessibilityObserver?.disconnect()}syncAccessibilityRelations(){this.applyAccessibilityRelations(Array.from(this.querySelectorAll(":scope > a-radio-label")),Array.from(this.querySelectorAll(":scope > a-radio-hint")))}};function Bb(){typeof customElements>"u"||customElements.get("a-radio")||customElements.define("a-radio",Vi)}Bb();var qi=class extends B{static formAssociated=!0;static observedAttributes=["state","disabled"];internals;uncontrolledValue=null;seeded=!1;observer;alive=!1;childrenReady=!1;get value(){return this.#e}constructor(){super(),this.internals=this.attachInternals?.()}connectedCallback(){this.seeded||(this.uncontrolledValue=this.getAttribute("default-state"),this.seeded=!0),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown),this.observer??=new this.view.MutationObserver(e=>{e.some(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-RADIO"||a.querySelector?.("a-radio")!=null))&&this.sync()}),this.observer.observe(this,{childList:!0,subtree:!0}),queueMicrotask(()=>{this.isConnected&&(this.childrenReady=!0,this.sync(),this.alive=!0)})}disconnectedCallback(){this.observer?.disconnect()}attributeChangedCallback(e,n,r){this.sync(),e==="state"&&this.alive&&r!==n&&this.emitChange()}formDisabledCallback(e){e?this.internals?.states?.add("disabled"):this.internals?.states?.delete("disabled"),this.sync()}formResetCallback(){let e=this.getAttribute("default-state");this.emitStateChange(e,this.#e,"reset",!1),this.uncontrolledValue=e,this.sync()}formStateRestoreCallback(e){this.emitStateChange(e,this.#e,"restore",!1),this.uncontrolledValue=e,this.sync()}get#e(){return this.hasAttribute("state")?this.getAttribute("state"):this.uncontrolledValue}get#t(){return this.hasAttribute("disabled")||(this.internals?.states?.has("disabled")??!1)}get#n(){return Array.from(this.querySelectorAll("a-radio"))}sync=()=>{if(!this.childrenReady)return;let e=this.#e,n=this.#n,r=n.find(o=>o.value===e&&e!=null)??null,a=r?r.value:null;this.internals?.setFormValue(a,a);for(let o of n)o.selected=o===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r)};requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n,"user",!0);this.hasAttribute("state")||r&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n,r,a){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:a,detail:{next:e,prev:n,reason:r}}))}onClick=e=>{if(this.#t)return;let n=e.target?.closest("a-radio");!n||n.hasAttribute("disabled")||(n.focus(),this.requestSelect(n.value))};onKeyDown=e=>{if(this.#t||je(e))return;let n=this.#n.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-radio");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.value));return}let a=e.key==="ArrowDown"||e.key==="ArrowRight",o=e.key==="ArrowUp"||e.key==="ArrowLeft";if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus(),this.requestSelect(s.value)}};function Lb(){typeof customElements>"u"||customElements.get("a-radio-group")||customElements.define("a-radio-group",qi)}Lb();var Lt=class extends B{internals;constructor(){super(),this.internals=this.attachInternals?.()}set active(e){this.internals&&(e?this.internals?.states?.add("active"):this.internals?.states?.delete("active"),this.internals.ariaSelected=this.getAttribute("role")==="option"?e?"true":"false":null)}get active(){return this.internals?.states?.has("active")??!1}connectedCallback(){dd(this.doc)}},ji="a-menu-item, a[data-anta-menu-item]";function Ui(t){return t instanceof Lt||t instanceof HTMLElement&&t.matches("a[data-anta-menu-item]")}function dd(t){t.hasKeyListenerForAMenuItem||(zo(t,{keys:["Enter"," "],resolve:e=>{let n=e;return n?.closest?.('input, textarea, select, a-input, a-input-time, [contenteditable]:not([contenteditable="false"])')?null:n?.closest?.(ji)},blocked:e=>e.hasAttribute("disabled"),activate:e=>e.click()}),t.hasKeyListenerForAMenuItem=!0)}function Rb(){typeof customElements>"u"||customElements.get("a-menu-item")||customElements.define("a-menu-item",Lt)}Rb();var ee=4,Wi=96,Yx=130,Zx=130,$x=500,Gx='a-button, a-input[button], button, a[href], input[type="button"], input[type="submit"], input[type="reset"], [role="button"]',Kx="input:not([readonly]), textarea:not([readonly]), a-input:not([readonly]), a-input-time:not([readonly])",Xx="[data-dialog-open], [data-dialog-close], [data-toast-dismiss], [data-banner-dismiss]",j=[],Zi=!1,Xr=null,ud=null;function Jx(t,e){Zi||(t.addEventListener("pointerdown",Hb,!0),t.addEventListener("keydown",jb,!0),t.addEventListener("keyup",Ub,!0),t.addEventListener("contextmenu",Vb,!0),e.addEventListener("resize",qb),Xr=t,ud=e,Zi=!0)}function _b(){Zi&&(Xr?.removeEventListener("pointerdown",Hb,!0),Xr?.removeEventListener("keydown",jb,!0),Xr?.removeEventListener("keyup",Ub,!0),Xr?.removeEventListener("contextmenu",Vb,!0),ud?.removeEventListener("resize",qb),Xr=null,ud=null,Zi=!1)}function Fb(t,e=!1){let n=t.composedPath();for(let r=j.length-1;r>=0;r--){let a=j[r];if(n.includes(a.surface))return r;let o=a.triggerAnchor;if(o&&!(e&&a.hasAttribute("context"))&&n.includes(o))return r}return-1}function Qx(t,e){for(let n of t.composedPath()){if(n===e)return!1;if(n instanceof HTMLDialogElement&&n.matches(":modal")||n instanceof HTMLElement&&n.matches(":popover-open"))return!0}return!1}function ey(t){for(let e of j)if(e.contains(t)||e.surface.contains(t))return!0;return!1}Vd({isOpen:()=>j.length>0,contains:ey});function Hb(t){if(!j.length)return;let e=Fb(t,t.button===0);j[e+1]?.requestClose(t)}function Vb(t){j.length&&Fb(t)===-1&&Wb(t)}function qb(){j.length&&Wb()}function jb(t){let e=j[j.length-1];e&&e.handleKey(t)}function Ub(t){let e=j[j.length-1];e&&e.handleKeyUp(t)}function Wb(t){j[0]?.requestClose(t)}function ty(){for(let t=j.length-1;t>=0;t--){let e=j[t];e.isOpen&&!e._dismissNotified&&e.emitChange("closed"),e._doHide()}j.length=0,_b()}var Yi=new WeakMap;function ny(t){for(let e of t){let n=Yi.get(e.target);n&&(!n.listening&&e.isIntersecting?requestAnimationFrame(()=>n.setupListeners()):n.listening&&!e.isIntersecting&&requestAnimationFrame(()=>{n.teardownListeners(),n.isOpen&&n.close()}))}}var Nb=typeof IntersectionObserver<"u"?new IntersectionObserver(ny,{root:null,rootMargin:"0px",threshold:0}):null,$i=class extends B{static observedAttributes=["placement","context","coord","offset","nohover","state","stop-propagation","role"];surface;scrollEl;listening=!1;_shown=!1;teardown;_dismissNotified=!1;internals;openTimer;closeTimer;typeBuffer="";typeTimer;activeItem=null;comboObserver;accessibilityObserver;#e=new Set;#t;#n;#a;#r;#o=new Set;#c=e=>e.stopPropagation();_flippedTop=null;_flippedSide=null;constructor(){super();try{this.internals=this.attachInternals?.(),this.internals&&(this.internals.ariaHidden="true")}catch{}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
|
|
852
861
|
:host { display: contents; }
|
|
853
862
|
|
|
854
863
|
.container {
|
|
@@ -860,8 +869,8 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
860
869
|
box-sizing: border-box;
|
|
861
870
|
flex-direction: column;
|
|
862
871
|
min-width: max(var(--menu-min-width, 88px), var(--_anchor-width, 0px));
|
|
863
|
-
max-width: calc(100vw - ${2*
|
|
864
|
-
max-height: calc(100dvh - ${2*
|
|
872
|
+
max-width: calc(100vw - ${2*ee}px);
|
|
873
|
+
max-height: calc(100dvh - ${2*ee}px);
|
|
865
874
|
overflow: hidden;
|
|
866
875
|
background: var(--menu-bg, Canvas);
|
|
867
876
|
color: var(--text-2, CanvasText);
|
|
@@ -944,11 +953,11 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
944
953
|
-webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent var(--gap-top), #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
|
|
945
954
|
mask-image: linear-gradient(to bottom, transparent 0, transparent var(--gap-top), #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent 100%);
|
|
946
955
|
}
|
|
947
|
-
`,this.surface=document.createElement("div"),this.surface.className="container",this.surface.setAttribute("part","menu"),this.surface.setAttribute("popover","manual");let r=document.createElement("slot");r.setAttribute("name","header");let a=document.createElement("div");a.className="scroll",a.setAttribute("part","scroll"),a.append(document.createElement("slot")),a.addEventListener("scroll",()=>this.updateScrollFade(),{passive:!0}),this.scrollEl=a;let o=document.createElement("slot");o.setAttribute("name","footer"),this.surface.append(r,a,o),this.surface.addEventListener("pointerenter",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.cancelCloseTimer()}),this.surface.addEventListener("pointerleave",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.#h&&this.scheduleClose()}),this.surface.addEventListener("click",this.onSurfaceClick),e.append(n,this.surface)}connectedCallback(){rd(this.doc),this.#w(),this.#v();let e=this.triggerAnchor;e&&(Ri.set(e,this),lf?.observe(e)),this.#l(),queueMicrotask(()=>{this.isConnected&&this.#l()}),this.hasAttribute("state")&&requestAnimationFrame(()=>this.syncState())}disconnectedCallback(){this.hide(!1),this.teardownListeners(),this.cancelOpenTimer(),this.cancelCloseTimer(),this.accessibilityObserver?.disconnect(),this.accessibilityObserver=void 0,this.#k();let e=this.triggerAnchor;e&&Ri.get(e)===this&&(Ri.delete(e),lf?.unobserve(e))}attributeChangedCallback(e){if(e==="state"){this.syncState();return}if(e==="stop-propagation"){this.#w();return}if(e==="role"){this.#v();return}this.listening&&(this.teardownListeners(),this.setupListeners())}syncState(){if(!this.isConnected)return;let e=this.getAttribute("state");e==="open"&&!this._shown?this.show():e==="closed"&&this._shown&&this.hide()}get isControlled(){return this.hasAttribute("state")}get isSubmenu(){return!!this.parentElement&&Li(this.parentElement)}get#m(){return this.hasAttribute("context")}get#s(){return this.hasAttribute("coord")}get#h(){return!this.hasAttribute("nohover")}get#p(){let e=parseInt(this.getAttribute("offset")??"",10);return Number.isFinite(e)?e:J}get#g(){let e=this.getAttribute("placement");return e==="bottom-end"||e==="top-start"||e==="top-end"||e==="bottom"||e==="top"||e==="right-start"||e==="right-end"||e==="left-start"||e==="left-end"||e==="right"||e==="left"?e:"bottom-start"}get triggerAnchor(){let e=this.parentElement;return e&&Li(e)?e:this.previousElementSibling}get#u(){let e=this.triggerAnchor;if(!e)return null;let n='a-input, a-button, button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])';return e.matches(n)?e:e.querySelector(n)}focusTrigger(){let e=this.#u;e?e.focus():this.triggerAnchor&&console.warn("[a-menu] trigger has no focusable element \u2014 a menu trigger (or `Select` renderTrigger) must be a single focusable element.")}get#b(){return this.isSubmenu?this.triggerAnchor?.closest("a-menu")??null:null}get isOpen(){return this._shown}isVisible(e){let n=e.checkVisibility;return typeof n=="function"?n.call(e,{visibilityProperty:!0,contentVisibilityAuto:!0}):e.getClientRects().length>0}focusableItems(){return this.navigableItems().filter(e=>e instanceof Pt)}navigableItems(){return[...this.querySelectorAll(Bi)].filter(e=>e.closest("a-menu")===this&&!e.hasAttribute("disabled")&&this.isVisible(e))}focusables(){return ma(this.surface).filter(e=>{if(e.hasAttribute("disabled"))return!1;let n=e;for(;n;){if(n.nodeType===1&&n.localName==="a-menu")return n===this;n=Ns(n)}return!1})}seatInitialFocus(e){let n=this.navigableItems(),r=n.find(a=>a.hasAttribute("selected")||a.getAttribute("aria-checked")==="true"||a.getAttribute("aria-selected")==="true");r&&this.scrollItemIntoView(r),e&&(r??n[0])?.focus({preventScroll:!0})}scrollItemIntoView(e){let n=this.scrollEl;if(!n)return;let r=4,a=n.getBoundingClientRect(),o=e.getBoundingClientRect();o.top<a.top+r?n.scrollTop-=a.top+r-o.top:o.bottom>a.bottom-r&&(n.scrollTop+=o.bottom-a.bottom+r)}updateScrollFade(){let e=this.scrollEl;if(!e)return;let n=e.scrollTop>1,r=e.scrollTop+e.clientHeight<e.scrollHeight-1;e.style.setProperty("--fade-top",n?"16px":"0px"),e.style.setProperty("--gap-top",n?"3px":"0px"),e.style.setProperty("--fade-bottom",r?"14px":"0px")}get#i(){let e=this.triggerAnchor;return e?.matches("[data-menu-search]")?e:null}get#d(){let e=this.querySelector("[data-menu-search]");return e&&e.closest("a-menu")===this?e:this.#i}#v(){if(!this.scrollEl)return;let e=this.getAttribute("role")==="dialog";e&&this.isConnected&&!this.accessibilityObserver?(this.accessibilityObserver=new this.view.MutationObserver(()=>this.#v()),this.accessibilityObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-menu-search","slot"]})):!e&&this.accessibilityObserver&&(this.accessibilityObserver.disconnect(),this.accessibilityObserver=void 0),e&&[...this.querySelectorAll(Bi)].some(r=>{if(r.closest("a-menu")!==this)return!1;let a=r;for(;a.parentElement&&a.parentElement!==this;)a=a.parentElement;let o=a.getAttribute("slot");return o!=="header"&&o!=="footer"})?(this.scrollEl.setAttribute("role","menu"),this.scrollEl.setAttribute("aria-label","Options"),this.scrollEl.setAttribute("aria-orientation","vertical")):(this.scrollEl.removeAttribute("role"),this.scrollEl.removeAttribute("aria-label"),this.scrollEl.removeAttribute("aria-orientation")),this.#l()}#l(){if(!this.isConnected)return;let e=new Map,n=this.triggerAnchor,r=this.#d;hs(n)&&e.set(n,{controls:this,activeDescendant:r===n?this.activeItem:null}),r!==n&&hs(r)&&e.set(r,{controls:this,activeDescendant:this.activeItem});for(let a of this.#e)e.has(a)||a[Gt]({source:this,clear:!0});for(let[a,o]of e)a[Gt]({source:this,...o});this.#e=new Set(e.keys())}#k(){for(let e of this.#e)e[Gt]({source:this,clear:!0});this.#e.clear()}setActive(e){this.activeItem&&this.activeItem!==e&&(this.activeItem.active=!1),this.activeItem=e,e&&(e.active=!0,e.scrollIntoView?.({block:"nearest"})),this.#l(),this.dispatchEvent(new CustomEvent("activedescendant",{detail:{id:e?.id??null}}))}resetActive(){let e=this.#d?.value;if(!e||!e.trim())return this.setActive(null);if(this.#i)return this.setActive(null);let n=this.focusableItems();this.setActive(n.find(r=>!r.hasAttribute("data-menu-skip-active"))??n[0]??null)}handleComboKey(e){let n=this.focusableItems(),r=this.activeItem?n.indexOf(this.activeItem):-1;switch(e.key){case"ArrowDown":return e.preventDefault(),this.setActive(n[r<0?0:(r+1)%n.length]??null),!0;case"ArrowUp":return e.preventDefault(),this.setActive(n[r<=0?n.length-1:r-1]??null),!0;case"PageUp":return e.preventDefault(),this.setActive(n[0]??null),!0;case"PageDown":return e.preventDefault(),this.setActive(n[n.length-1]??null),!0;case"Enter":if(this.activeItem){e.preventDefault();let a=this.activeItem.querySelector(":scope > a-copy");a&&Io(a),this.#x=this.activeItem}return!0;default:return!1}}#x=null;handleKeyUp(e){if(e.key!=="Enter")return;let n=this.#x;this.#x=null,n?.click()}open(e){this.requestOpen(e)}close(e){this.requestClose(e)}toggle(e){this._shown?this.requestClose(e?.originEvent):this.requestOpen(e)}emitChange(e,n){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this._shown?"open":"closed",coord:n?.coord,originEvent:n?.originEvent}}))}requestOpen(e){if(this._shown){this.show(e?.coord,e?.viaKeyboard,e?.originEvent);return}let n=this.emitChange("open",e);this.isControlled||n&&this.show(e?.coord,e?.viaKeyboard,e?.originEvent)}requestClose(e){if(!this._shown)return;let n=j.indexOf(this);if(n!==-1){for(let a=j.length-1;a>n;a--){let o=j[a];o.isOpen&&!o._dismissNotified&&o.emitChange("closed"),o._doHide()}j.length=n+1}let r=this.emitChange("closed",{originEvent:e});if(this.isControlled){this._dismissNotified=!0;return}r&&this.hide()}show(e,n=!1,r){if(this.isSubmenu){let i=this.#b;if(i){let s=j.indexOf(i);if(s!==-1){for(let l=j.length-1;l>s;l--)j[l]._doHide();j.length=s+1}}}else if(!j.includes(this)){let i=this.triggerAnchor,s;if(i){for(let l=j.length-1;l>=0;l--)if(j[l]!==this&&j[l].contains(i)){s=j[l];break}}if(s){let l=j.indexOf(s);for(let c=j.length-1;c>l;c--){let d=j[c];d.isOpen&&!d._dismissNotified&&d.emitChange("closed"),d._doHide()}j.length=l+1}else gx()}if(j.includes(this)){this.position(e);return}let a=j.length===0;this._doShow(e,!a),j.push(this),a&&mx(this.doc,this.view);let o=this.#d;o?(o.focus({preventScroll:!0}),this.resetActive(),this.startComboObserver()):this.seatInitialFocus(n)}startComboObserver(){this.comboObserver?.disconnect(),this.comboObserver=new this.view.MutationObserver(()=>{!this._shown||!this.#d||(this.resetActive(),this.position(void 0,!1,!0))}),this.comboObserver.observe(this,{childList:!0})}hide(e=!0){this.comboObserver?.disconnect(),this.comboObserver=void 0,this.setActive(null),this._flippedTop=null,this._flippedSide=null;let n=j.indexOf(this);if(n===-1){this._shown&&this._doHide();return}for(let r=j.length-1;r>=n;r--){let a=j[r];e&&r>n&&a.isOpen&&!a._dismissNotified&&a.emitChange("closed"),a._doHide()}j.length=n,j.length===0&&cf()}_doShow(e,n=!1){this.surface.isConnected&&!this._shown&&this.surface.showPopover(),this._shown=!0,this._dismissNotified=!1,this.reflectOpen(!0),this.hideAnchorTooltip(),this.position(e,n),this.#E(e)}hideAnchorTooltip(){this.triggerAnchor?.querySelectorAll("a-tooltip").forEach(e=>e.hide?.())}_doHide(){this.#C(),this.surface.isConnected&&this._shown&&this.surface.hidePopover(),this._shown=!1,this.reflectOpen(!1),this.cancelOpenTimer(),this.cancelCloseTimer()}reflectOpen(e){try{e?this.internals?.states?.add("open"):this.internals?.states?.delete("open"),this.internals&&(this.internals.ariaHidden=e?"false":"true")}catch{}}#E(e){if(this.#C(),e||this.#s)return;let n=this.triggerAnchor;if(!n)return;this.#n=this.#S(n);let r=()=>{if(!this._shown){this.#t=void 0;return}let a=this.triggerAnchor;if(!a){this.#t=void 0;return}let o=this.#S(a);this.#I(o)||(this.#n=o,this.#f(a)),this.#t=this.view.requestAnimationFrame(r)};this.#t=this.view.requestAnimationFrame(r)}#f(e){if(this.#r===void 0||this.#a===void 0)return;let n=this.surface.getBoundingClientRect(),r=Nt(e).top+this.#r;r=Math.min(r,this.view.innerHeight-n.height-J),r=Math.max(J,r),this.surface.style.transform=`translate(${this.#a}px, ${Math.round(r)}px)`,this.updateScrollFade()}#C(){this.#t!==void 0&&(this.view.cancelAnimationFrame(this.#t),this.#t=void 0),this.#n=void 0,this.#a=void 0,this.#r=void 0}#S(e){let{left:n,top:r,right:a,bottom:o,width:i,height:s}=Nt(e);return[n,r,a,o,i,s]}#I(e){let n=this.#n;return!!n&&n.length===e.length&&n.every((r,a)=>r===e[a])}position(e,n=!1,r=!1){let a=()=>{if(!this._shown)return;let o=this.view,i=o.innerWidth,s=o.innerHeight,l=this.surface,c=J,d=J;if(e){l.style.maxHeight=`${Math.max(Ni,s-2*J)}px`;let m=l.getBoundingClientRect();c=e[0],c+m.width>i-J&&(c=i-m.width-J),c=Math.max(J,c),d=e[1],d+m.height>s-J&&(d=d-m.height),d=Math.max(J,d)}else if(this.isSubmenu){let m=this.triggerAnchor?Nt(this.triggerAnchor):null;if(!m)return;l.style.maxHeight=`${Math.max(Ni,s-2*J)}px`;let b=l.getBoundingClientRect();c=m.right+this.#p,c+b.width>i-J&&(c=m.left-b.width-this.#p),c=Math.max(J,c);let f=o.getComputedStyle(l),g=o.getComputedStyle(this.scrollEl),v=parseFloat(f.borderTopWidth)+parseFloat(f.paddingTop)+parseFloat(g.paddingTop);d=m.top-v,d+b.height>s-J&&(d=s-b.height-J),d=Math.max(J,d)}else{let m=this.triggerAnchor?Nt(this.triggerAnchor):null;if(!m)return;this.hasAttribute("autowidth")?l.style.removeProperty("--_anchor-width"):l.style.setProperty("--_anchor-width",`${Math.ceil(m.width)}px`);let b=this.#g;if(b.startsWith("right")||b.startsWith("left")){l.style.removeProperty("--_anchor-width"),l.style.maxHeight=`${Math.max(Ni,s-2*J)}px`;let f=l.getBoundingClientRect(),g=i-m.right-2*J,v=m.left-2*J,y=b.startsWith("left");r&&this._flippedSide!==null?y=this._flippedSide:y&&v<f.width&&g>v?y=!1:!y&&g<f.width&&v>g&&(y=!0),this._flippedSide=y,c=y?m.left-f.width-this.#p:m.right+this.#p,c=Math.max(J,Math.min(c,i-f.width-J));let w=b.endsWith("end")?"end":b.endsWith("start")?"start":"center";d=w==="center"?m.top+m.height/2-f.height/2:w==="end"?m.bottom-f.height:m.top,d+f.height>s-J&&(d=s-f.height-J),d=Math.max(J,d)}else{let f=s-m.bottom-2*J,g=m.top-2*J,v=b.startsWith("top");l.style.maxHeight="";let y=l.scrollHeight;r&&this._flippedTop!==null?v=this._flippedTop:v&&g<y&&f>g?v=!1:!v&&f<y&&g>f&&(v=!0),this._flippedTop=v;let w=v?g:f;l.style.maxHeight=`${Math.max(Ni,Math.floor(w))}px`;let T=l.getBoundingClientRect(),k=b.endsWith("end")?"end":b.endsWith("start")?"start":"center";c=k==="center"?m.left+m.width/2-T.width/2:k==="end"?m.right-T.width:m.left,c+T.width>i-J&&(c=i-T.width-J),c=Math.max(J,c),d=v?m.top-T.height-this.#p:m.bottom+this.#p,d=Math.max(J,d)}}let u=Math.round(c),p=Math.round(d);l.style.transform=`translate(${u}px, ${p}px)`,this.updateScrollFade(),!e&&!this.#s&&this.triggerAnchor&&(this.#a=u,this.#r=p-Nt(this.triggerAnchor).top)};n?a():requestAnimationFrame(a)}onSurfaceClick=e=>{let n=!1,r=!1;for(let a of e.composedPath()){if(a===this.surface)break;a instanceof Element&&(a.matches(px)&&(r=!0),(a instanceof Pt||a.hasAttribute("data-menu-close"))&&(n=!0))}n&&!r&&e.stopPropagation();for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof Pt){!a.hasAttribute("disabled")&&!a.querySelector(":scope > a-menu")&&a.closest("a-menu")===this&&a.dispatchEvent(new MouseEvent("menuselect",{bubbles:!1,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}));break}}for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof Element){if(a.hasAttribute("data-menu-open"))return;if(a instanceof Pt){if(a.hasAttribute("disabled")){e.preventDefault();return}return a.querySelector(":scope > a-menu")?void 0:this.closeSystem(e)}if(a.matches("a[data-anta-menu-item]"))return this.closeSystem(e);if(a.hasAttribute("data-menu-close"))return this.closeSystem(e)}}};closeSystem(e){(j[0]??this).requestClose(e)}#A(){if(!this.hasAttribute("stop-propagation"))return new Set;let e=(this.getAttribute("stop-propagation")??"").trim();return new Set(e?e.split(/[\s,]+/):["click"])}#w(){let e=this.#A();for(let n of this.#o)e.has(n)||this.surface.removeEventListener(n,this.#c);for(let n of e)this.#o.has(n)||this.surface.addEventListener(n,this.#c);this.#o=e}handleKey(e){let n=this.doc.activeElement;if(e.key==="Escape"){e.preventDefault(),e.stopPropagation(),this.requestClose(e),this.focusTrigger();return}if(e.key==="Tab"){if(this.#i){this.requestClose(e);return}let s=this.focusables();if(!s.length)return;e.preventDefault(),Eo(s,Kt(this.doc),e.shiftKey);return}let r=this.#d;if(r&&(n===r||r.contains(n))){this.handleComboKey(e);return}if(n?.closest("a-menu")===this&&!Li(n))return;let o=this.navigableItems(),i=n?o.indexOf(n):-1;switch(e.key){case"ArrowDown":e.preventDefault(),o[i<0?0:(i+1)%o.length]?.focus({preventScroll:!0});break;case"ArrowUp":e.preventDefault(),o[i<=0?o.length-1:i-1]?.focus({preventScroll:!0});break;case"Home":e.preventDefault(),o[0]?.focus({preventScroll:!0});break;case"End":e.preventDefault(),o[o.length-1]?.focus({preventScroll:!0});break;case"ArrowRight":{let s=this.submenuOf(n);s&&(e.preventDefault(),s.requestOpen({viaKeyboard:!0}));break}case"ArrowLeft":if(this.isSubmenu){e.preventDefault();let s=this.triggerAnchor;this.requestClose(e),s?.focus()}break;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeahead(e.key,o)}}submenuOf(e){return!e||!(e instanceof Pt)?null:e.querySelector(":scope > a-menu")}typeahead(e,n){this.typeBuffer+=e.toLowerCase(),clearTimeout(this.typeTimer),this.typeTimer=setTimeout(()=>this.typeBuffer="",dx),n.find(a=>this.itemLabel(a).startsWith(this.typeBuffer))?.focus()}itemLabel(e){return((e.querySelector("a-menu-item-label")??e).textContent??"").trim().toLowerCase()}#T(e){let n=Nt(e);return[n.left,n.bottom]}setupListeners(){if(this.listening)return;let e=this.triggerAnchor;if(!e){this.listening=!0;return}if(this.isSubmenu){let n=o=>{o.composedPath().includes(this.surface)||this.requestOpen({originEvent:o})};e.addEventListener("click",n);let r,a;this.#h&&(r=o=>{o.pointerType==="mouse"&&this.scheduleOpen()},a=o=>{o.pointerType==="mouse"&&this.scheduleClose()},e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",a)),this.teardown=()=>{e.removeEventListener("click",n),r&&e.removeEventListener("pointerenter",r),a&&e.removeEventListener("pointerleave",a),this.listening=!1}}else if(this.#m){let n=r=>{bx(r,e)||(r.preventDefault(),this.requestOpen({coord:[r.clientX,r.clientY],originEvent:r}))};e.addEventListener("contextmenu",n),this.teardown=()=>{e.removeEventListener("contextmenu",n),this.listening=!1}}else if(this.#i){this.teardown=()=>{this.listening=!1},this.listening=!0;return}else{let n=a=>{let o=a.detail===0,i=this.#s?o?this.#T(e):[a.clientX,a.clientY]:void 0;this._shown?this.requestClose(a):this.requestOpen({coord:i,viaKeyboard:o,originEvent:a})},r=a=>{if(this._shown||e.hasAttribute("disabled")||e.hasAttribute("loading")||!(a.key==="ArrowDown"||a.key==="ArrowUp")&&e.matches(ux))return;let i=e.matches(hx);if(!(a.key==="ArrowDown"||a.key==="ArrowUp"||!i&&(a.key==="Enter"||a.key===" ")))return;a.preventDefault();let l=this.#s?this.#T(e):void 0;this.requestOpen({coord:l,viaKeyboard:!0,originEvent:a})};e.addEventListener("click",n),e.addEventListener("keydown",r),this.teardown=()=>{e.removeEventListener("click",n),e.removeEventListener("keydown",r),this.listening=!1}}this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}scheduleOpen(){this.cancelCloseTimer(),!this._shown&&(this.cancelOpenTimer(),this.openTimer=setTimeout(()=>{this.openTimer=void 0,this.requestOpen()},lx))}scheduleClose(){this.cancelOpenTimer(),this._shown&&(this.#M||j.some(e=>e!==this&&(this.contains(e)||e.triggerAnchor!=null&&this.contains(e.triggerAnchor)))||(this.cancelCloseTimer(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.requestClose()},cx)))}get#M(){let e=this.doc.activeElement;return!!e&&this.contains(e)&&e.matches(":focus-visible")}cancelOpenTimer(){this.openTimer!==void 0&&(clearTimeout(this.openTimer),this.openTimer=void 0)}cancelCloseTimer(){this.closeTimer!==void 0&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}};function gf(){typeof customElements>"u"||customElements.get("a-menu")||customElements.define("a-menu",Fi)}gf();var Hi=class extends z{};function vf(){typeof customElements>"u"||customElements.get("a-menu-separator")||customElements.define("a-menu-separator",Hi)}vf();var Vi=class extends z{};function xf(){typeof customElements>"u"||customElements.get("a-menu-group")||customElements.define("a-menu-group",Vi)}xf();var qi=class extends hr{ariaProp="ariaSelected"};function yf(){typeof customElements>"u"||customElements.get("a-tab")||customElements.define("a-tab",qi)}yf();var ji=class extends z{static observedAttributes=["state","disabled","orientation","noslide"];internals;uncontrolledValue=null;seeded=!1;observer;resizeObserver;resizeTimer;resizeFrame;lastSelected=null;alive=!1;childrenReady=!1;get value(){return this.#e}constructor(){super(),this.internals=this.attachInternals?.()}connectedCallback(){this.seeded||(this.uncontrolledValue=this.getAttribute("default-state"),this.seeded=!0),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown),this.observer??=new this.view.MutationObserver(e=>{e.some(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-TAB"||a.querySelector?.("a-tab")!=null))&&this.sync()}),this.observer.observe(this,{childList:!0,subtree:!0}),this.#r(),queueMicrotask(()=>{this.isConnected&&(this.childrenReady=!0,this.sync(),this.alive=!0)})}disconnectedCallback(){this.observer?.disconnect(),this.resizeObserver?.disconnect(),this.#c()}attributeChangedCallback(e,n,r){e==="noslide"&&this.isConnected&&this.#r(),this.sync(),e==="state"&&this.alive&&r!==n&&this.emitChange()}formDisabledCallback(e){e?this.internals?.states?.add("disabled"):this.internals?.states?.delete("disabled"),this.sync()}get#e(){return this.hasAttribute("state")?this.getAttribute("state"):this.uncontrolledValue}get#t(){return this.hasAttribute("disabled")||(this.internals?.states?.has("disabled")??!1)}get#n(){return this.getAttribute("orientation")==="vertical"}get#a(){return Array.from(this.querySelectorAll("a-tab"))}#r(){if(!(!this.hasAttribute("noslide")&&typeof this.view.ResizeObserver=="function"&&this.view.CSS.supports("anchor-scope: all"))){this.resizeObserver?.disconnect(),this.#c();return}this.resizeObserver??=new this.view.ResizeObserver(this.#o),this.resizeObserver.observe(this)}#o=()=>{this.internals?.states?.add("resizing"),this.resizeTimer!=null&&this.view.clearTimeout(this.resizeTimer),this.resizeFrame!=null&&this.view.cancelAnimationFrame(this.resizeFrame),this.resizeFrame=void 0,this.resizeTimer=this.view.setTimeout(()=>{this.resizeTimer=void 0,this.resizeFrame=this.view.requestAnimationFrame(()=>{this.resizeFrame=void 0,this.internals?.states?.delete("resizing")})},120)};#c(){this.resizeTimer!=null&&this.view.clearTimeout(this.resizeTimer),this.resizeFrame!=null&&this.view.cancelAnimationFrame(this.resizeFrame),this.resizeTimer=void 0,this.resizeFrame=void 0,this.internals?.states?.delete("resizing")}sync=()=>{if(!this.childrenReady)return;let e=this.#e,n=this.#a,r=n.find(a=>a.value===e&&e!=null)??null;for(let a of n)a.selected=a===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r),this.alive&&r&&r!==this.lastSelected&&this.#m(r),this.lastSelected=r};#m(e){let n=this.getBoundingClientRect(),r=e.getBoundingClientRect();this.#n?r.top<n.top?this.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(this.scrollTop+=r.bottom-n.bottom):r.left<n.left?this.scrollLeft-=n.left-r.left:r.right>n.right&&(this.scrollLeft+=r.right-n.right)}requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n);this.hasAttribute("state")||r&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:n}}))}onClick=e=>{if(this.#t)return;let n=e.target?.closest("a-tab");!n||n.hasAttribute("disabled")||(n.focus({preventScroll:!0}),this.requestSelect(n.value))};onKeyDown=e=>{if(this.#t)return;let n=this.#a.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-tab");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.value));return}if(e.key==="Home"||e.key==="End"){e.preventDefault();let l=e.key==="Home"?n[0]:n[n.length-1];l.focus({preventScroll:!0}),this.requestSelect(l.value);return}let a=e.key===(this.#n?"ArrowDown":"ArrowRight"),o=e.key===(this.#n?"ArrowUp":"ArrowLeft");if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus({preventScroll:!0}),this.requestSelect(s.value)}};function wf(){typeof customElements>"u"||customElements.get("a-tabs")||customElements.define("a-tabs",ji)}wf();var Zi=class extends z{static observedAttributes=["value"];internals;tabs=null;onTabsChange=()=>this.sync();constructor(){super();try{this.internals=this.attachInternals?.()}catch{}}connectedCallback(){this.bindTabs(),this.sync(),requestAnimationFrame(()=>{this.tabs||this.bindTabs(),this.sync()})}disconnectedCallback(){this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=null}attributeChangedCallback(){this.sync()}bindTabs(){let e=this.parentElement?.querySelector(":scope > a-tabs")??null;e!==this.tabs&&(this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=e,this.tabs?.addEventListener("change",this.onTabsChange))}sync(){let e=this.getAttribute("value"),n=!!this.tabs&&e===(this.tabs.value??null);try{n?this.internals?.states?.add("active"):this.internals?.states?.delete("active")}catch{}if(this.internals&&"ariaLabelledByElements"in this.internals){let r=e!=null?this.tabs?.querySelector(`a-tab[value="${xx(e)}"]`):null;this.internals.ariaLabelledByElements=r?[r]:[]}}};function xx(t){return typeof CSS<"u"&&CSS.escape?CSS.escape(t):t}function kf(){typeof customElements>"u"||customElements.get("a-tabpanel")||customElements.define("a-tabpanel",Zi)}kf();var yx="closerequest",wx=200,kx=`
|
|
956
|
+
`,this.surface=document.createElement("div"),this.surface.className="container",this.surface.setAttribute("part","menu"),this.surface.setAttribute("popover","manual");let r=document.createElement("slot");r.setAttribute("name","header");let a=document.createElement("div");a.className="scroll",a.setAttribute("part","scroll"),a.append(document.createElement("slot")),a.addEventListener("scroll",()=>this.updateScrollFade(),{passive:!0}),this.scrollEl=a;let o=document.createElement("slot");o.setAttribute("name","footer"),this.surface.append(r,a,o),this.surface.addEventListener("pointerenter",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.cancelCloseTimer()}),this.surface.addEventListener("pointerleave",i=>{i.pointerType==="mouse"&&this.isSubmenu&&this.#h&&this.scheduleClose()}),this.surface.addEventListener("click",this.onSurfaceClick),e.append(n,this.surface)}connectedCallback(){dd(this.doc),this.#w(),this.#v();let e=this.triggerAnchor;e&&(Yi.set(e,this),Nb?.observe(e)),this.#l(),queueMicrotask(()=>{this.isConnected&&this.#l()}),this.hasAttribute("state")&&requestAnimationFrame(()=>this.syncState())}disconnectedCallback(){this.hide(!1),this.teardownListeners(),this.cancelOpenTimer(),this.cancelCloseTimer(),this.accessibilityObserver?.disconnect(),this.accessibilityObserver=void 0,this.#k();let e=this.triggerAnchor;e&&Yi.get(e)===this&&(Yi.delete(e),Nb?.unobserve(e))}attributeChangedCallback(e){if(e==="state"){this.syncState();return}if(e==="stop-propagation"){this.#w();return}if(e==="role"){this.#v();return}this.listening&&(this.teardownListeners(),this.setupListeners())}syncState(){if(!this.isConnected)return;let e=this.getAttribute("state");e==="open"&&!this._shown?this.show():e==="closed"&&this._shown&&this.hide()}get isControlled(){return this.hasAttribute("state")}get isSubmenu(){return!!this.parentElement&&Ui(this.parentElement)}get#m(){return this.hasAttribute("context")}get#s(){return this.hasAttribute("coord")}get#h(){return!this.hasAttribute("nohover")}get#p(){let e=parseInt(this.getAttribute("offset")??"",10);return Number.isFinite(e)?e:ee}get#g(){let e=this.getAttribute("placement");return e==="bottom-end"||e==="top-start"||e==="top-end"||e==="bottom"||e==="top"||e==="right-start"||e==="right-end"||e==="left-start"||e==="left-end"||e==="right"||e==="left"?e:"bottom-start"}get triggerAnchor(){let e=this.parentElement;return e&&Ui(e)?e:this.previousElementSibling}get#u(){let e=this.triggerAnchor;if(!e)return null;let n='a-input, a-button, button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])';return e.matches(n)?e:e.querySelector(n)}focusTrigger(){let e=this.#u;e?e.focus():this.triggerAnchor&&console.warn("[a-menu] trigger has no focusable element \u2014 a menu trigger (or `Select` renderTrigger) must be a single focusable element.")}get#f(){return this.isSubmenu?this.triggerAnchor?.closest("a-menu")??null:null}get isOpen(){return this._shown}isVisible(e){let n=e.checkVisibility;return typeof n=="function"?n.call(e,{visibilityProperty:!0,contentVisibilityAuto:!0}):e.getClientRects().length>0}focusableItems(){return this.navigableItems().filter(e=>e instanceof Lt)}navigableItems(){return[...this.querySelectorAll(ji)].filter(e=>e.closest("a-menu")===this&&!e.hasAttribute("disabled")&&this.isVisible(e))}focusables(){return pa(this.surface).filter(e=>{if(e.hasAttribute("disabled"))return!1;let n=e;for(;n;){if(n.nodeType===1&&n.localName==="a-menu")return n===this;n=Ws(n)}return!1})}seatInitialFocus(e){let n=this.navigableItems(),r=n.find(a=>a.hasAttribute("selected")||a.getAttribute("aria-checked")==="true"||a.getAttribute("aria-selected")==="true");r&&this.scrollItemIntoView(r),e&&(r??n[0])?.focus({preventScroll:!0})}scrollItemIntoView(e){let n=this.scrollEl;if(!n)return;let r=4,a=n.getBoundingClientRect(),o=e.getBoundingClientRect();o.top<a.top+r?n.scrollTop-=a.top+r-o.top:o.bottom>a.bottom-r&&(n.scrollTop+=o.bottom-a.bottom+r)}updateScrollFade(){let e=this.scrollEl;if(!e)return;let n=e.scrollTop>1,r=e.scrollTop+e.clientHeight<e.scrollHeight-1;e.style.setProperty("--fade-top",n?"16px":"0px"),e.style.setProperty("--gap-top",n?"3px":"0px"),e.style.setProperty("--fade-bottom",r?"14px":"0px")}get#i(){let e=this.triggerAnchor;return e?.matches("[data-menu-search]")?e:null}get#d(){let e=this.querySelector("[data-menu-search]");return e&&e.closest("a-menu")===this?e:this.#i}#v(){if(!this.scrollEl)return;let e=this.getAttribute("role")==="dialog";e&&this.isConnected&&!this.accessibilityObserver?(this.accessibilityObserver=new this.view.MutationObserver(()=>this.#v()),this.accessibilityObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-menu-search","slot"]})):!e&&this.accessibilityObserver&&(this.accessibilityObserver.disconnect(),this.accessibilityObserver=void 0),e&&[...this.querySelectorAll(ji)].some(r=>{if(r.closest("a-menu")!==this)return!1;let a=r;for(;a.parentElement&&a.parentElement!==this;)a=a.parentElement;let o=a.getAttribute("slot");return o!=="header"&&o!=="footer"})?(this.scrollEl.setAttribute("role","menu"),this.scrollEl.setAttribute("aria-label","Options"),this.scrollEl.setAttribute("aria-orientation","vertical")):(this.scrollEl.removeAttribute("role"),this.scrollEl.removeAttribute("aria-label"),this.scrollEl.removeAttribute("aria-orientation")),this.#l()}#l(){if(!this.isConnected)return;let e=new Map,n=this.triggerAnchor,r=this.#d;ws(n)&&e.set(n,{controls:this,activeDescendant:r===n?this.activeItem:null}),r!==n&&ws(r)&&e.set(r,{controls:this,activeDescendant:this.activeItem});for(let a of this.#e)e.has(a)||a[Jt]({source:this,clear:!0});for(let[a,o]of e)a[Jt]({source:this,...o});this.#e=new Set(e.keys())}#k(){for(let e of this.#e)e[Jt]({source:this,clear:!0});this.#e.clear()}setActive(e){this.activeItem&&this.activeItem!==e&&(this.activeItem.active=!1),this.activeItem=e,e&&(e.active=!0,e.scrollIntoView?.({block:"nearest"})),this.#l(),this.dispatchEvent(new CustomEvent("activedescendant",{detail:{id:e?.id??null}}))}resetActive(){let e=this.#d?.value;if(!e||!e.trim())return this.setActive(null);if(this.#i)return this.setActive(null);let n=this.focusableItems();this.setActive(n.find(r=>!r.hasAttribute("data-menu-skip-active"))??n[0]??null)}handleComboKey(e){let n=this.focusableItems(),r=this.activeItem?n.indexOf(this.activeItem):-1;switch(e.key){case"ArrowDown":return e.preventDefault(),this.setActive(n[r<0?0:(r+1)%n.length]??null),!0;case"ArrowUp":return e.preventDefault(),this.setActive(n[r<=0?n.length-1:r-1]??null),!0;case"PageUp":return e.preventDefault(),this.setActive(n[0]??null),!0;case"PageDown":return e.preventDefault(),this.setActive(n[n.length-1]??null),!0;case"Enter":if(this.activeItem){e.preventDefault();let a=this.activeItem.querySelector(":scope > a-copy");a&&Lo(a),this.#x=this.activeItem}return!0;default:return!1}}#x=null;handleKeyUp(e){if(e.key!=="Enter")return;let n=this.#x;this.#x=null,n?.click()}open(e){this.requestOpen(e)}close(e){this.requestClose(e)}toggle(e){this._shown?this.requestClose(e?.originEvent):this.requestOpen(e)}emitChange(e,n){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this._shown?"open":"closed",coord:n?.coord,originEvent:n?.originEvent}}))}requestOpen(e){if(this._shown){this.show(e?.coord,e?.viaKeyboard,e?.originEvent);return}let n=this.emitChange("open",e);this.isControlled||n&&this.show(e?.coord,e?.viaKeyboard,e?.originEvent)}requestClose(e){if(!this._shown)return;let n=j.indexOf(this);if(n!==-1){for(let a=j.length-1;a>n;a--){let o=j[a];o.isOpen&&!o._dismissNotified&&o.emitChange("closed"),o._doHide()}j.length=n+1}let r=this.emitChange("closed",{originEvent:e});if(this.isControlled){this._dismissNotified=!0;return}r&&this.hide()}show(e,n=!1,r){if(this.isSubmenu){let i=this.#f;if(i){let s=j.indexOf(i);if(s!==-1){for(let l=j.length-1;l>s;l--)j[l]._doHide();j.length=s+1}}}else if(!j.includes(this)){let i=this.triggerAnchor,s;if(i){for(let l=j.length-1;l>=0;l--)if(j[l]!==this&&j[l].contains(i)){s=j[l];break}}if(s){let l=j.indexOf(s);for(let c=j.length-1;c>l;c--){let d=j[c];d.isOpen&&!d._dismissNotified&&d.emitChange("closed"),d._doHide()}j.length=l+1}else ty()}if(j.includes(this)){this.position(e);return}let a=j.length===0;this._doShow(e,!a),j.push(this),a&&Jx(this.doc,this.view);let o=this.#d;o?(o.focus({preventScroll:!0}),this.resetActive(),this.startComboObserver()):this.seatInitialFocus(n)}startComboObserver(){this.comboObserver?.disconnect(),this.comboObserver=new this.view.MutationObserver(()=>{!this._shown||!this.#d||(this.resetActive(),this.position(void 0,!1,!0))}),this.comboObserver.observe(this,{childList:!0})}hide(e=!0){this.comboObserver?.disconnect(),this.comboObserver=void 0,this.setActive(null),this._flippedTop=null,this._flippedSide=null;let n=j.indexOf(this);if(n===-1){this._shown&&this._doHide();return}for(let r=j.length-1;r>=n;r--){let a=j[r];e&&r>n&&a.isOpen&&!a._dismissNotified&&a.emitChange("closed"),a._doHide()}j.length=n,j.length===0&&_b()}_doShow(e,n=!1){this.surface.isConnected&&!this._shown&&this.surface.showPopover(),this._shown=!0,this._dismissNotified=!1,this.reflectOpen(!0),this.hideAnchorTooltip(),this.position(e,n),this.#E(e)}hideAnchorTooltip(){this.triggerAnchor?.querySelectorAll("a-tooltip").forEach(e=>e.hide?.())}_doHide(){this.#C(),this.surface.isConnected&&this._shown&&this.surface.hidePopover(),this._shown=!1,this.reflectOpen(!1),this.cancelOpenTimer(),this.cancelCloseTimer()}reflectOpen(e){try{e?this.internals?.states?.add("open"):this.internals?.states?.delete("open"),this.internals&&(this.internals.ariaHidden=e?"false":"true")}catch{}}#E(e){if(this.#C(),e||this.#s)return;let n=this.triggerAnchor;if(!n)return;this.#n=this.#S(n);let r=()=>{if(!this._shown){this.#t=void 0;return}let a=this.triggerAnchor;if(!a){this.#t=void 0;return}let o=this.#S(a);this.#I(o)||(this.#n=o,this.#b(a)),this.#t=this.view.requestAnimationFrame(r)};this.#t=this.view.requestAnimationFrame(r)}#b(e){if(this.#r===void 0||this.#a===void 0)return;let n=this.surface.getBoundingClientRect(),r=Ft(e).top+this.#r;r=Math.min(r,this.view.innerHeight-n.height-ee),r=Math.max(ee,r),this.surface.style.transform=`translate(${this.#a}px, ${Math.round(r)}px)`,this.updateScrollFade()}#C(){this.#t!==void 0&&(this.view.cancelAnimationFrame(this.#t),this.#t=void 0),this.#n=void 0,this.#a=void 0,this.#r=void 0}#S(e){let{left:n,top:r,right:a,bottom:o,width:i,height:s}=Ft(e);return[n,r,a,o,i,s]}#I(e){let n=this.#n;return!!n&&n.length===e.length&&n.every((r,a)=>r===e[a])}position(e,n=!1,r=!1){let a=()=>{if(!this._shown)return;let o=this.view,i=o.innerWidth,s=o.innerHeight,l=this.surface,c=ee,d=ee;if(e){l.style.maxHeight=`${Math.max(Wi,s-2*ee)}px`;let p=l.getBoundingClientRect();c=e[0],c+p.width>i-ee&&(c=i-p.width-ee),c=Math.max(ee,c),d=e[1],d+p.height>s-ee&&(d=d-p.height),d=Math.max(ee,d)}else if(this.isSubmenu){let p=this.triggerAnchor?Ft(this.triggerAnchor):null;if(!p)return;l.style.maxHeight=`${Math.max(Wi,s-2*ee)}px`;let b=l.getBoundingClientRect();c=p.right+this.#p,c+b.width>i-ee&&(c=p.left-b.width-this.#p),c=Math.max(ee,c);let f=o.getComputedStyle(l),g=o.getComputedStyle(this.scrollEl),v=parseFloat(f.borderTopWidth)+parseFloat(f.paddingTop)+parseFloat(g.paddingTop);d=p.top-v,d+b.height>s-ee&&(d=s-b.height-ee),d=Math.max(ee,d)}else{let p=this.triggerAnchor?Ft(this.triggerAnchor):null;if(!p)return;this.hasAttribute("autowidth")?l.style.removeProperty("--_anchor-width"):l.style.setProperty("--_anchor-width",`${Math.ceil(p.width)}px`);let b=this.#g;if(b.startsWith("right")||b.startsWith("left")){l.style.removeProperty("--_anchor-width"),l.style.maxHeight=`${Math.max(Wi,s-2*ee)}px`;let f=l.getBoundingClientRect(),g=i-p.right-2*ee,v=p.left-2*ee,x=b.startsWith("left");r&&this._flippedSide!==null?x=this._flippedSide:x&&v<f.width&&g>v?x=!1:!x&&g<f.width&&v>g&&(x=!0),this._flippedSide=x,c=x?p.left-f.width-this.#p:p.right+this.#p,c=Math.max(ee,Math.min(c,i-f.width-ee));let k=b.endsWith("end")?"end":b.endsWith("start")?"start":"center";d=k==="center"?p.top+p.height/2-f.height/2:k==="end"?p.bottom-f.height:p.top,d+f.height>s-ee&&(d=s-f.height-ee),d=Math.max(ee,d)}else{let f=s-p.bottom-2*ee,g=p.top-2*ee,v=b.startsWith("top");l.style.maxHeight="";let x=l.scrollHeight;r&&this._flippedTop!==null?v=this._flippedTop:v&&g<x&&f>g?v=!1:!v&&f<x&&g>f&&(v=!0),this._flippedTop=v;let k=v?g:f;l.style.maxHeight=`${Math.max(Wi,Math.floor(k))}px`;let A=l.getBoundingClientRect(),C=b.endsWith("end")?"end":b.endsWith("start")?"start":"center";c=C==="center"?p.left+p.width/2-A.width/2:C==="end"?p.right-A.width:p.left,c+A.width>i-ee&&(c=i-A.width-ee),c=Math.max(ee,c),d=v?p.top-A.height-this.#p:p.bottom+this.#p,d=Math.max(ee,d)}}let u=Math.round(c),m=Math.round(d);l.style.transform=`translate(${u}px, ${m}px)`,this.updateScrollFade(),!e&&!this.#s&&this.triggerAnchor&&(this.#a=u,this.#r=m-Ft(this.triggerAnchor).top)};n?a():requestAnimationFrame(a)}onSurfaceClick=e=>{let n=!1,r=!1;for(let a of e.composedPath()){if(a===this.surface)break;a instanceof Element&&(a.matches(Xx)&&(r=!0),(a instanceof Lt||a.hasAttribute("data-menu-close"))&&(n=!0))}n&&!r&&e.stopPropagation();for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof Lt){!a.hasAttribute("disabled")&&!a.querySelector(":scope > a-menu")&&a.closest("a-menu")===this&&a.dispatchEvent(new MouseEvent("menuselect",{bubbles:!1,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}));break}}for(let a of e.composedPath()){if(a===this.surface)break;if(a instanceof Element){if(a.hasAttribute("data-menu-open"))return;if(a instanceof Lt){if(a.hasAttribute("disabled")){e.preventDefault();return}return a.querySelector(":scope > a-menu")?void 0:this.closeSystem(e)}if(a.matches("a[data-anta-menu-item]"))return this.closeSystem(e);if(a.hasAttribute("data-menu-close"))return this.closeSystem(e)}}};closeSystem(e){(j[0]??this).requestClose(e)}#T(){if(!this.hasAttribute("stop-propagation"))return new Set;let e=(this.getAttribute("stop-propagation")??"").trim();return new Set(e?e.split(/[\s,]+/):["click"])}#w(){let e=this.#T();for(let n of this.#o)e.has(n)||this.surface.removeEventListener(n,this.#c);for(let n of e)this.#o.has(n)||this.surface.addEventListener(n,this.#c);this.#o=e}handleKey(e){if(je(e))return;let n=this.doc.activeElement;if(e.key==="Escape"){e.preventDefault(),e.stopPropagation(),this.requestClose(e),this.focusTrigger();return}if(e.key==="Tab"){if(this.#i){this.requestClose(e);return}let s=this.focusables();if(!s.length)return;e.preventDefault(),Io(s,Qt(this.doc),e.shiftKey);return}let r=this.#d;if(r&&(n===r||r.contains(n))){this.handleComboKey(e);return}if(n?.closest("a-menu")===this&&!Ui(n))return;let o=this.navigableItems(),i=n?o.indexOf(n):-1;switch(e.key){case"ArrowDown":e.preventDefault(),o[i<0?0:(i+1)%o.length]?.focus({preventScroll:!0});break;case"ArrowUp":e.preventDefault(),o[i<=0?o.length-1:i-1]?.focus({preventScroll:!0});break;case"Home":e.preventDefault(),o[0]?.focus({preventScroll:!0});break;case"End":e.preventDefault(),o[o.length-1]?.focus({preventScroll:!0});break;case"ArrowRight":{let s=this.submenuOf(n);s&&(e.preventDefault(),s.requestOpen({viaKeyboard:!0}));break}case"ArrowLeft":if(this.isSubmenu){e.preventDefault();let s=this.triggerAnchor;this.requestClose(e),s?.focus()}break;default:e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&this.typeahead(e.key,o)}}submenuOf(e){return!e||!(e instanceof Lt)?null:e.querySelector(":scope > a-menu")}typeahead(e,n){this.typeBuffer+=e.toLowerCase(),clearTimeout(this.typeTimer),this.typeTimer=setTimeout(()=>this.typeBuffer="",$x),n.find(a=>this.itemLabel(a).startsWith(this.typeBuffer))?.focus()}itemLabel(e){return((e.querySelector("a-menu-item-label")??e).textContent??"").trim().toLowerCase()}#A(e){let n=Ft(e);return[n.left,n.bottom]}setupListeners(){if(this.listening)return;let e=this.triggerAnchor;if(!e){this.listening=!0;return}if(this.isSubmenu){let n=o=>{o.composedPath().includes(this.surface)||this.requestOpen({originEvent:o})};e.addEventListener("click",n);let r,a;this.#h&&(r=o=>{o.pointerType==="mouse"&&this.scheduleOpen()},a=o=>{o.pointerType==="mouse"&&this.scheduleClose()},e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",a)),this.teardown=()=>{e.removeEventListener("click",n),r&&e.removeEventListener("pointerenter",r),a&&e.removeEventListener("pointerleave",a),this.listening=!1}}else if(this.#m){let n=r=>{Qx(r,e)||(r.preventDefault(),this.requestOpen({coord:[r.clientX,r.clientY],originEvent:r}))};e.addEventListener("contextmenu",n),this.teardown=()=>{e.removeEventListener("contextmenu",n),this.listening=!1}}else if(this.#i){this.teardown=()=>{this.listening=!1},this.listening=!0;return}else{let n=a=>{let o=a.detail===0,i=this.#s?o?this.#A(e):[a.clientX,a.clientY]:void 0;this._shown?this.requestClose(a):this.requestOpen({coord:i,viaKeyboard:o,originEvent:a})},r=a=>{if(je(a)||this._shown||e.hasAttribute("disabled")||e.hasAttribute("loading")||!(a.key==="ArrowDown"||a.key==="ArrowUp")&&e.matches(Gx))return;let i=e.matches(Kx);if(!(a.key==="ArrowDown"||a.key==="ArrowUp"||!i&&(a.key==="Enter"||a.key===" ")))return;a.preventDefault();let l=this.#s?this.#A(e):void 0;this.requestOpen({coord:l,viaKeyboard:!0,originEvent:a})};e.addEventListener("click",n),e.addEventListener("keydown",r),this.teardown=()=>{e.removeEventListener("click",n),e.removeEventListener("keydown",r),this.listening=!1}}this.listening=!0}teardownListeners(){this.teardown?.(),this.teardown=void 0}scheduleOpen(){this.cancelCloseTimer(),!this._shown&&(this.cancelOpenTimer(),this.openTimer=setTimeout(()=>{this.openTimer=void 0,this.requestOpen()},Yx))}scheduleClose(){this.cancelOpenTimer(),this._shown&&(this.#M||j.some(e=>e!==this&&(this.contains(e)||e.triggerAnchor!=null&&this.contains(e.triggerAnchor)))||(this.cancelCloseTimer(),this.closeTimer=setTimeout(()=>{this.closeTimer=void 0,this.requestClose()},Zx)))}get#M(){let e=this.doc.activeElement;return!!e&&this.contains(e)&&e.matches(":focus-visible")}cancelOpenTimer(){this.openTimer!==void 0&&(clearTimeout(this.openTimer),this.openTimer=void 0)}cancelCloseTimer(){this.closeTimer!==void 0&&(clearTimeout(this.closeTimer),this.closeTimer=void 0)}};function Yb(){typeof customElements>"u"||customElements.get("a-menu")||customElements.define("a-menu",$i)}Yb();var Gi=class extends B{};function Zb(){typeof customElements>"u"||customElements.get("a-menu-separator")||customElements.define("a-menu-separator",Gi)}Zb();var Ki=class extends B{};function $b(){typeof customElements>"u"||customElements.get("a-menu-group")||customElements.define("a-menu-group",Ki)}$b();var Xi=class extends hr{ariaProp="ariaSelected"};function Gb(){typeof customElements>"u"||customElements.get("a-tab")||customElements.define("a-tab",Xi)}Gb();var Ji=class extends B{static observedAttributes=["state","disabled","orientation","noslide"];internals;uncontrolledValue=null;seeded=!1;observer;resizeObserver;resizeTimer;resizeFrame;lastSelected=null;alive=!1;childrenReady=!1;get value(){return this.#e}constructor(){super(),this.internals=this.attachInternals?.()}connectedCallback(){this.seeded||(this.uncontrolledValue=this.getAttribute("default-state"),this.seeded=!0),this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown),this.observer??=new this.view.MutationObserver(e=>{e.some(r=>[...r.addedNodes,...r.removedNodes].some(a=>a.nodeName==="A-TAB"||a.querySelector?.("a-tab")!=null))&&this.sync()}),this.observer.observe(this,{childList:!0,subtree:!0}),this.#r(),queueMicrotask(()=>{this.isConnected&&(this.childrenReady=!0,this.sync(),this.alive=!0)})}disconnectedCallback(){this.observer?.disconnect(),this.resizeObserver?.disconnect(),this.#c()}attributeChangedCallback(e,n,r){e==="noslide"&&this.isConnected&&this.#r(),this.sync(),e==="state"&&this.alive&&r!==n&&this.emitChange()}formDisabledCallback(e){e?this.internals?.states?.add("disabled"):this.internals?.states?.delete("disabled"),this.sync()}get#e(){return this.hasAttribute("state")?this.getAttribute("state"):this.uncontrolledValue}get#t(){return this.hasAttribute("disabled")||(this.internals?.states?.has("disabled")??!1)}get#n(){return this.getAttribute("orientation")==="vertical"}get#a(){return Array.from(this.querySelectorAll("a-tab"))}#r(){if(!(!this.hasAttribute("noslide")&&typeof this.view.ResizeObserver=="function"&&this.view.CSS.supports("anchor-scope: all"))){this.resizeObserver?.disconnect(),this.#c();return}this.resizeObserver??=new this.view.ResizeObserver(this.#o),this.resizeObserver.observe(this)}#o=()=>{this.internals?.states?.add("resizing"),this.resizeTimer!=null&&this.view.clearTimeout(this.resizeTimer),this.resizeFrame!=null&&this.view.cancelAnimationFrame(this.resizeFrame),this.resizeFrame=void 0,this.resizeTimer=this.view.setTimeout(()=>{this.resizeTimer=void 0,this.resizeFrame=this.view.requestAnimationFrame(()=>{this.resizeFrame=void 0,this.internals?.states?.delete("resizing")})},120)};#c(){this.resizeTimer!=null&&this.view.clearTimeout(this.resizeTimer),this.resizeFrame!=null&&this.view.cancelAnimationFrame(this.resizeFrame),this.resizeTimer=void 0,this.resizeFrame=void 0,this.internals?.states?.delete("resizing")}sync=()=>{if(!this.childrenReady)return;let e=this.#e,n=this.#a,r=n.find(a=>a.value===e&&e!=null)??null;for(let a of n)a.selected=a===r;this.internals&&"ariaActiveDescendantElement"in this.internals&&(this.internals.ariaActiveDescendantElement=r),this.alive&&r&&r!==this.lastSelected&&this.#m(r),this.lastSelected=r};#m(e){let n=this.getBoundingClientRect(),r=e.getBoundingClientRect();this.#n?r.top<n.top?this.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(this.scrollTop+=r.bottom-n.bottom):r.left<n.left?this.scrollLeft-=n.left-r.left:r.right>n.right&&(this.scrollLeft+=r.right-n.right)}requestSelect(e){let n=this.#e;if(e===n)return;let r=this.emitStateChange(e,n);this.hasAttribute("state")||r&&(this.uncontrolledValue=e,this.sync(),this.emitChange())}emitChange(){this.dispatchEvent(new Event("change",{bubbles:!0}))}emitStateChange(e,n){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:n}}))}onClick=e=>{if(this.#t)return;let n=e.target?.closest("a-tab");!n||n.hasAttribute("disabled")||(n.focus({preventScroll:!0}),this.requestSelect(n.value))};onKeyDown=e=>{if(this.#t||je(e))return;let n=this.#a.filter(l=>!l.hasAttribute("disabled"));if(n.length===0)return;let r=e.target?.closest("a-tab");if(e.key===" "||e.key==="Enter"){r&&n.includes(r)&&(e.preventDefault(),this.requestSelect(r.value));return}if(e.key==="Home"||e.key==="End"){e.preventDefault();let l=e.key==="Home"?n[0]:n[n.length-1];l.focus({preventScroll:!0}),this.requestSelect(l.value);return}let a=e.key===(this.#n?"ArrowDown":"ArrowRight"),o=e.key===(this.#n?"ArrowUp":"ArrowLeft");if(!a&&!o)return;e.preventDefault();let i=r?n.indexOf(r):-1;i===-1&&(i=n.findIndex(l=>l.value===this.#e)),i===-1&&(i=0);let s=n[(i+(a?1:-1)+n.length)%n.length];s.focus({preventScroll:!0}),this.requestSelect(s.value)}};function Kb(){typeof customElements>"u"||customElements.get("a-tabs")||customElements.define("a-tabs",Ji)}Kb();var Qi=class extends B{static observedAttributes=["value"];internals;tabs=null;onTabsChange=()=>this.sync();constructor(){super();try{this.internals=this.attachInternals?.()}catch{}}connectedCallback(){this.bindTabs(),this.sync(),requestAnimationFrame(()=>{this.tabs||this.bindTabs(),this.sync()})}disconnectedCallback(){this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=null}attributeChangedCallback(){this.sync()}bindTabs(){let e=this.parentElement?.querySelector(":scope > a-tabs")??null;e!==this.tabs&&(this.tabs?.removeEventListener("change",this.onTabsChange),this.tabs=e,this.tabs?.addEventListener("change",this.onTabsChange))}sync(){let e=this.getAttribute("value"),n=!!this.tabs&&e===(this.tabs.value??null);try{n?this.internals?.states?.add("active"):this.internals?.states?.delete("active")}catch{}if(this.internals&&"ariaLabelledByElements"in this.internals){let r=e!=null?this.tabs?.querySelector(`a-tab[value="${ry(e)}"]`):null;this.internals.ariaLabelledByElements=r?[r]:[]}}};function ry(t){return typeof CSS<"u"&&CSS.escape?CSS.escape(t):t}function Xb(){typeof customElements>"u"||customElements.get("a-tabpanel")||customElements.define("a-tabpanel",Qi)}Xb();var ay="closerequest",oy=200,iy=`
|
|
948
957
|
:host { display: contents; }
|
|
949
958
|
|
|
950
959
|
dialog {
|
|
951
|
-
--_dur: ${
|
|
960
|
+
--_dur: ${oy}ms;
|
|
952
961
|
--_r: var(--dialog-round, var(--dialog-radius, 10px));
|
|
953
962
|
|
|
954
963
|
position: fixed;
|
|
@@ -1097,7 +1106,7 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
1097
1106
|
inset-inline-end: 10px;
|
|
1098
1107
|
z-index: 1;
|
|
1099
1108
|
}
|
|
1100
|
-
`,
|
|
1109
|
+
`,es=class extends B{static observedAttributes=["state","name"];dialog;headerSlot;footerSlot;closeSlot;#e=0;#t=!1;#n=!1;#a=!1;#r;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=iy,this.dialog=document.createElement("dialog"),this.dialog.setAttribute("part","dialog"),this.dialog.tabIndex=-1,this.closeSlot=document.createElement("slot"),this.closeSlot.name="close",this.closeSlot.setAttribute("part","close"),this.headerSlot=document.createElement("slot"),this.headerSlot.name="header",this.headerSlot.setAttribute("part","header");let r=document.createElement("slot");r.setAttribute("part","body"),this.footerSlot=document.createElement("slot"),this.footerSlot.name="footer",this.footerSlot.setAttribute("part","footer");for(let a of[this.headerSlot,this.footerSlot,this.closeSlot])a.addEventListener("slotchange",()=>{let o=a.assignedNodes().length>0;a.classList.toggle("has-content",o),a===this.closeSlot&&this.dialog.classList.toggle("has-close",o)});this.headerSlot.addEventListener("slotchange",()=>this.#u()),this.dialog.append(this.headerSlot,r,this.footerSlot,this.closeSlot),e.append(n,this.dialog),this.dialog.addEventListener("cancel",a=>{a.preventDefault(),this.#c||this.requestClose()}),this.dialog.addEventListener("pointerdown",a=>{this.#a=a.target===this.dialog}),this.dialog.addEventListener("click",a=>{this.#c||this.#a&&a.target===this.dialog&&this.requestClose()}),this.dialog.addEventListener("close",()=>{if(this.#e>0){this.#e--;return}this.#o?this.#h(Xt(this.getAttribute("state"))):this.#t=!1}),this.addEventListener(ay,()=>this.requestClose())}connectedCallback(){this.#o?this.#h(Xt(this.getAttribute("state"))):(this.#n||(Xt(this.getAttribute("default-state"))==="open"&&(this.#t=!0),this.#n=!0),this.#t&&this.#p()),this.#f(),this.#u()}disconnectedCallback(){this.#d(),this.dialog.open&&(this.#e++,this.dialog.close())}attributeChangedCallback(e){e==="state"?(this.#o&&this.#h(Xt(this.getAttribute("state"))),this.#f()):e==="name"&&this.#f()}get#o(){return this.hasAttribute("state")}get#c(){return this.hasAttribute("persistent")}get#m(){return this.dialog.open?"open":"closed"}show(){this.requestOpen()}close(){this.requestClose()}get open(){return this.dialog.open}requestOpen(){if(this.#m==="open")return;let e=this.#s("open");this.#o||e&&this.#p()}requestClose(){if(this.#m==="closed")return;let e=this.#s("closed");this.#o||e&&this.#g()}#s(e){return this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:e,prev:this.#m}}))}#h(e){e==="open"?this.#p():this.#g()}#p(){if(this.#t=!0,this.dialog.open||!this.isConnected)return;this.dialog.showModal();let e=this.querySelector("[autofocus]");e?e.focus({preventScroll:!0}):this.dialog.focus()}#g(){this.#t=!1,this.dialog.open&&(this.#e++,this.dialog.close())}#u(){let e=this.headerSlot.assignedNodes().map(n=>n.textContent??"").join(" ").trim();e?this.dialog.setAttribute("aria-label",e):this.dialog.removeAttribute("aria-label")}#f(){let e=!this.#o&&!!this.getAttribute("name");e&&!this.#r?this.#i():!e&&this.#r&&this.#d()}#i(){this.#r=e=>{let n=this.getAttribute("name");if(!n)return;let r=e.target;r instanceof Element&&(r.closest(`[data-dialog-open="${CSS.escape(n)}"]`)?this.requestOpen():r.closest(`[data-dialog-close="${CSS.escape(n)}"]`)&&this.requestClose())},this.doc.addEventListener("click",this.#r)}#d(){this.#r&&(this.doc.removeEventListener("click",this.#r),this.#r=void 0)}};function Jb(){typeof customElements>"u"||customElements.get("a-dialog")||customElements.define("a-dialog",es)}Jb();var sy=`
|
|
1101
1110
|
.container {
|
|
1102
1111
|
display: flex;
|
|
1103
1112
|
flex-direction: column;
|
|
@@ -1186,7 +1195,7 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
1186
1195
|
:host([loading]) [part="content"] { animation: card-pulse 1.4s ease-in-out infinite; }
|
|
1187
1196
|
}
|
|
1188
1197
|
@keyframes card-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
|
|
1189
|
-
`,
|
|
1198
|
+
`,ts=class extends B{static observedAttributes=["href","target","rel","ping","loading","aria-label"];#e;#t;#n;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=sy,this.#e=document.createElement("a"),this.#e.className="container",this.#e.setAttribute("part","container");let r=document.createElement("slot");r.name="media",r.setAttribute("part","media");let a=document.createElement("div");a.className="content",a.setAttribute("part","content");let o=document.createElement("div");o.className="header",o.setAttribute("part","header");let i=document.createElement("slot");i.name="icon",i.setAttribute("part","icon"),this.#t=document.createElement("slot"),this.#t.name="header",this.#t.setAttribute("part","title"),o.append(i,this.#t),this.#n=document.createElement("slot"),this.#n.setAttribute("part","body");let s=document.createElement("slot");s.name="footer",s.setAttribute("part","footer"),a.append(o,this.#n,s),this.#e.append(r,a),e.append(n,this.#e),this.#t.addEventListener("slotchange",()=>this.#r()),this.#n.addEventListener("slotchange",()=>this.#r())}connectedCallback(){this.#a()}attributeChangedCallback(){this.#a()}#a(){let e=this.getAttribute("href"),n=this.hasAttribute("loading");if(e!=null&&!n){this.#e.setAttribute("href",e);for(let r of["target","rel","ping"]){let a=this.getAttribute(r);a!=null?this.#e.setAttribute(r,a):this.#e.removeAttribute(r)}}else for(let r of["href","target","rel","ping"])this.#e.removeAttribute(r);n?this.#e.setAttribute("aria-busy","true"):this.#e.removeAttribute("aria-busy"),this.#r()}#r(){if(!this.#e.hasAttribute("href")){this.#e.removeAttribute("aria-label");return}let n=this.getAttribute("aria-label")?.trim()||this.#o(this.#t)||this.#o(this.#n)||this.getAttribute("href")||"";n?this.#e.setAttribute("aria-label",n):this.#e.removeAttribute("aria-label")}#o(e){return e.assignedNodes().map(n=>n.textContent??"").join(" ").replace(/\s+/g," ").trim()}};function Qb(){typeof customElements>"u"||customElements.get("a-card")||customElements.define("a-card",ts)}Qb();var ly="dismissrequest",cy="data-banner-dismiss",dy=`
|
|
1190
1199
|
slot[name="message"], slot:not([name]) { display: contents; }
|
|
1191
1200
|
|
|
1192
1201
|
slot[name="actions"] {
|
|
@@ -1210,7 +1219,7 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
1210
1219
|
slot[name="close"]:focus-within {
|
|
1211
1220
|
opacity: 1;
|
|
1212
1221
|
}
|
|
1213
|
-
`,
|
|
1222
|
+
`,eg=Xt,ns=class extends B{static observedAttributes=["state"];#e;#t=!1;constructor(){super(),this.#e=typeof this.attachInternals=="function"?this.attachInternals():void 0;let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=dy;let r=document.createElement("slot");r.name="message",r.setAttribute("part","message");let a=document.createElement("slot");a.setAttribute("part","content");let o=document.createElement("slot");o.name="actions",o.setAttribute("part","actions");let i=()=>{o.hidden=!o.assignedNodes({flatten:!0}).some(l=>{if(l.nodeType===Node.TEXT_NODE)return l.textContent?.trim()!=="";if(l.nodeType!==Node.ELEMENT_NODE)return!1;let c=l;return!c.hasAttribute("data-anta-banner-actions-wrapper")||!c.matches(":empty")})};o.hidden=!0,o.addEventListener("slotchange",i);let s=document.createElement("slot");s.name="close",s.setAttribute("part","close"),e.append(n,r,a,o,s),i(),this.addEventListener(ly,l=>{l.stopPropagation(),this.#c()}),mo(this,cy,()=>this.#c())}get#n(){return this.hasAttribute("state")}get#a(){return this.#e?.states?.has("closed")?"closed":"open"}connectedCallback(){this.#n?this.#o(eg(this.getAttribute("state"))):this.#t||(this.#o(this.#r()),this.#t=!0)}#r(){return this.getAttribute("default-state")==="closed"?"closed":"open"}attributeChangedCallback(e){e==="state"&&this.#n&&this.#o(eg(this.getAttribute("state")))}#o(e){if(this.#e)try{e==="closed"?(this.#e?.states?.add("closed"),this.#e?.states?.delete("open")):(this.#e?.states?.add("open"),this.#e?.states?.delete("closed"))}catch{}}#c(){if(this.#a==="closed")return;let e=this.dispatchEvent(new CustomEvent("statechange",{cancelable:!0,detail:{next:"closed",prev:"open"}}));this.#n||e&&this.#o("closed")}};function tg(){typeof customElements>"u"||customElements.get("a-banner")||customElements.define("a-banner",ns)}tg();var rg=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],uy="bottom-right",ng=Object.freeze([]),hy=0;function rs(){let t=ng,e=new Set,n=()=>e.forEach(l=>l());function r(l,c={}){let d=c.id??`t${++hy}`,u=t.findIndex(b=>b.id===d),m=u===-1?void 0:t[u],p={id:d,render:l,placement:c.placement??m?.placement??uy,duration:"duration"in c?c.duration:m?.duration,politeness:c.politeness??m?.politeness,leaving:!1,rev:m?m.rev+1:0};return t=m?t.map((b,f)=>f===u?p:b):[...t,p],n(),d}function a(l){let c=!1;t=t.map(d=>d.id===l&&!d.leaving?(c=!0,{...d,leaving:!0}):d),c&&n()}function o(l,c){let d=!1;t=t.map(u=>u.id===l&&!u.leaving?(d=!0,{...u,render:c,rev:u.rev+1}):u),d&&n()}function i(l){let c=t.filter(d=>d.id!==l);c.length!==t.length&&(t=c,n())}function s(){let l=!1;t=t.map(c=>c.leaving?c:(l=!0,{...c,leaving:!0})),l&&n()}return{add:r,dismiss:a,update:o,remove:i,clear:s,subscribe(l){return e.add(l),()=>{e.delete(l)}},getSnapshot(){return t},getServerSnapshot(){return ng}}}var py=rg,as=class extends B{#e;#t=!1;constructor(){super();let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=my,this.#e=document.createElement("div"),this.#e.className="region",this.#e.setAttribute("part","region"),this.#e.setAttribute("popover","manual");for(let r of py){let a=document.createElement("slot");a.name=r,this.#e.append(a)}this.#e.addEventListener("slotchange",this.#n),e.append(n,this.#e)}connectedCallback(){this.#n()}disconnectedCallback(){this.#t=!1}#n=()=>{let e=this.#e;if(typeof e.showPopover!="function")return;let n=this.childElementCount>0;if(n&&!this.#t){if(!this.isConnected)return;try{e.showPopover(),this.#t=!0}catch{}}else if(!n&&this.#t){try{e.matches(":popover-open")&&e.hidePopover()}catch{}this.#t=!1}}},my=`
|
|
1214
1223
|
:host { display: contents; }
|
|
1215
1224
|
|
|
1216
1225
|
.region {
|
|
@@ -1244,7 +1253,7 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
1244
1253
|
slot[name$="-left"] { left: var(--toaster-inset, 16px); }
|
|
1245
1254
|
slot[name$="-right"] { right: var(--toaster-inset, 16px); }
|
|
1246
1255
|
slot[name$="-center"] { left: 50%; transform: translateX(-50%); }
|
|
1247
|
-
`;function
|
|
1256
|
+
`;function ag(){typeof customElements>"u"||customElements.get("a-toaster")||customElements.define("a-toaster",as)}ag();var fy=220,og=5e3,by="data-toast-dismiss",os=class extends B{static observedAttributes=["leaving","rev"];#e;#t;#n;#a;#r;#o;#c=0;#m=0;#s=!1;#h=!1;#p=!1;constructor(){super();try{this.#e=this.attachInternals?.()}catch(r){console.warn("a-toast: ElementInternals unavailable \u2014 exit fade disabled.",r)}let e=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=gy,this.#t=document.createElement("slot"),e.append(n,this.#t),mo(this,by,()=>this.dismiss())}connectedCallback(){if(this.#u(),this.addEventListener("pointerenter",this.#S),this.addEventListener("pointerleave",this.#I),this.addEventListener("focusin",this.#T),this.addEventListener("focusout",this.#w),this.hasAttribute("leaving")){this.dismiss();return}this.#d()}disconnectedCallback(){this.#b(),this.#o!=null&&(this.view.clearTimeout(this.#o),this.#o=void 0),this.removeEventListener("pointerenter",this.#S),this.removeEventListener("pointerleave",this.#I),this.removeEventListener("focusin",this.#T),this.removeEventListener("focusout",this.#w)}attributeChangedCallback(e){e==="leaving"?this.hasAttribute("leaving")?this.isConnected&&this.dismiss():this.#s&&this.#g():e==="rev"&&this.isConnected&&this.restart()}#g(){this.#o!=null&&(this.view.clearTimeout(this.#o),this.#o=void 0),this.#s=!1,this.#e?.states?.delete("leaving"),this.#d()}get content(){return this.#n??null}set content(e){this.#n=e??void 0,this.#u()}#u(){this.#n!==this.#a&&(this.#a?.parentNode===this&&this.removeChild(this.#a),this.#a=this.#n,this.#n&&this.append(this.#n))}get#f(){let e=this.getAttribute("duration");if(e==null)return og;let n=Number(e);return n===1/0?1/0:Number.isFinite(n)&&n>0?n:og}get#i(){return this.#h||this.#p}#d(){this.#c=this.#f,this.#v(),this.#E()}#v(){Number.isFinite(this.#f)?(this.#t.style.animation=`toast-remaining ${this.#f}ms linear forwards`,this.#l(e=>{e.currentTime=0}),(this.#i||this.#s)&&this.#k()):this.#t.style.animation=""}#l(e){try{for(let n of this.#t.getAnimations?.()??[])n.animationName==="toast-remaining"&&e(n)}catch{}}#k(){this.#l(e=>e.pause())}#x(){this.#l(e=>e.play())}#E(){if(!(this.#r!=null||this.#s||this.#i||!Number.isFinite(this.#f))){if(this.#c<=0){this.dismiss();return}this.#m=Date.now(),this.#r=this.view.setTimeout(()=>{this.#r=void 0,this.dismiss()},this.#c),this.#x()}}#b(){this.#r!=null&&(this.view.clearTimeout(this.#r),this.#r=void 0)}#C(){this.#r!=null&&(this.#c-=Date.now()-this.#m,this.#b(),this.#k())}#S=()=>{this.#h=!0,this.#C()};#I=()=>{this.#h=!1,this.#E()};#T=()=>{this.#p=!0,this.#C()};#w=()=>{this.#p=!1,this.#E()};#A(){return this.view.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}#M(){if(this.#A())return 0;let e=this.view.getComputedStyle?.(this).getPropertyValue("--toast-dur").trim();if(e){let n=parseFloat(e);if(Number.isFinite(n))return e.endsWith("ms")?n:n*1e3}return fy}restart(){this.#s||(this.#b(),this.#d())}dismiss(){if(this.#s)return;this.#s=!0,this.#b(),this.#k(),this.#e?.states?.add("leaving");let e=this.#M();this.#o=this.view.setTimeout(()=>{this.#o=void 0,this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))},e)}},gy=`
|
|
1248
1257
|
:host { display: block; opacity: 1; translate: 0 0; }
|
|
1249
1258
|
:host(:state(leaving)) { opacity: 0; }
|
|
1250
1259
|
|
|
@@ -1266,7 +1275,7 @@ ${e}`:e}function av(t){return t.hasAttribute("copy")||t.hasAttribute("copy-url")
|
|
|
1266
1275
|
from { --toast-remaining: 1; }
|
|
1267
1276
|
to { --toast-remaining: 0; }
|
|
1268
1277
|
}
|
|
1269
|
-
`;function Pf(){typeof customElements>"u"||customElements.get("a-toast")||customElements.define("a-toast",Ki)}Pf();var Bx=({seed:t,name:e,src:n,size:r,badge:a,round:o,generator:i,className:s,style:l,...c})=>{let d=typeof r=="number",u=d?at(r,"--avatar-size",l):l,p=ee(o,"--avatar-radius",u),m=F(a,"--avatar-badge-tone-source",p);return h("a-avatar",{seed:t,name:e,src:n,size:!d&&r&&r!=="medium"?r:void 0,badge:a,round:K(o),config:i?JSON.stringify(i):void 0,role:e?"img":void 0,"aria-label":e||void 0,"aria-hidden":e?void 0:"true",class:s,style:m,...c})};var Lx=({value:t,max:e=100,tone:n,size:r,round:a,label:o,hint:i,className:s,style:l,children:c,...d})=>{let u=t==null||t===!1,p=typeof t=="number"?t:0,m=e>0?Math.round(Math.min(100,Math.max(0,p/e*100))):0,b=e>0?Math.min(e,Math.max(0,p)):0,f=[o,!u&&`${m}%`,i].filter(Boolean).join(" \xB7 ")||(u?"Loading":void 0);return h("a-progress",{value:u?!1:p,max:e,tone:X(n),size:r&&r!=="medium"?r:void 0,round:K(a),role:"progressbar","aria-valuenow":u?void 0:b,"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:e,"aria-label":f,class:s,style:ee(a,"--progress-round",F(n,"--progress-tone-source",l)),...d,children:zd(c)?c:A("a-progress-label",{children:[!u&&A("a-progress-number",{children:[m,"%"]}),o!=null&&h("a-progress-text",{children:o}),i!=null&&h("a-progress-hint",{children:i})]})})};var od=({tone:t,value:e,max:n=100,size:r,speed:a,label:o,className:i,style:s,...l})=>{let c=typeof e=="number"&&Number.isFinite(e),d=Number.isFinite(n)&&n>0?n:100,u=c?Math.min(d,Math.max(0,e)):void 0,p=u!=null?u/d*100:void 0,m={...s,...r!=null?{"--loader-size":`${r}px`}:{},...!c&&a!=null&&Number.isFinite(a)&&a>0?{"--loader-speed":`${a}s`}:{},...p!=null?{"--loader-value":`${p}%`}:{}},b=o!=null?{role:"progressbar","aria-label":o,"aria-valuenow":c?u:void 0,"aria-valuemin":c?0:void 0,"aria-valuemax":c?d:void 0}:{"aria-hidden":"true"};return h("a-loader",{tone:X(t),...c?{value:u}:{},class:i,style:m,...b,...l})};var Ot=({delay:t,placement:e,round:n,follow:r,interactive:a,truncatedOnly:o,truncatedSelector:i,className:s,style:l,children:c,...d})=>h("a-tooltip",{delay:t!=null?String(t):void 0,placement:e==="top"||e==="left"?e:void 0,round:K(n),follow:r?"":void 0,interactive:a?"":void 0,"truncated-only":o?"":void 0,"truncated-selector":i||void 0,class:s,style:ee(n,"--tooltip-round",l),...d,children:c});var Xi=({priority:t,tone:e,size:n,inline:r,truncate:a,expandable:o,collapsible:i,className:s,style:l,children:c,...d})=>{let u=typeof a=="number"?a:a?1:null,p=u!=null&&u>=1?u:null,m=X(e),b=F(m,"--text-tone-source",p!=null?{...l,"--line-clamp":p}:l),f=o&&p!=null;return A("a-text",{priority:t,tone:m,size:n,inline:r?"":void 0,truncate:p!=null?String(p):void 0,expandable:f?"":void 0,collapsible:f&&i?"":void 0,class:s,style:b,...d,children:[c,p!=null&&!f&&h(Ot,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};function Nx(t,e,n){let r=[...new Set(t==null?[]:typeof t=="string"?[t]:t)],{fields:a,context:o}=bo(r.join(" ")||null);return e!=null&&a.size===0&&r.push("size"),n!=null&&!o&&r.push("context"),r.join(" ")||void 0}var Rx=({display:t,round:e,gap:n,padding:r,margin:a,observe:o,throttle:i,fade:s,fadeSize:l,onMeasureChange:c,onContextChange:d,className:u,style:p,children:m,...b})=>{let f=ee(e,"--box-round",p);return f=at(n,"--box-gap",f),f=at(r,"--box-padding",f),f=at(a,"--box-margin",f),f=at(s?l:void 0,"--box-fade-size",f),h("a-box",{display:t==="block"?void 0:t,round:K(e),gap:n!=null?"":void 0,padding:r!=null?"":void 0,margin:a!=null?"":void 0,observe:Nx(o,c,d),throttle:i,fade:s?"":void 0,"fade-size":s&&l!=null?pr(l):void 0,onmeasurechange:Bn(c),oncontextchange:Bn(d),class:u,style:f,...b,children:m})};function id(t){if(!(t===void 0||t===!1))return t===!0?"":["up","down","left","right"].filter(e=>t[e]).join(" ")||"none"}function Of(t){if(t)return{"wheel-delay":t.delay,"wheel-tolerance":t.tolerance,"wheel-reset-on-move":t.resetOnMove?"":void 0}}function zf(t){if(t)return t===!0?{"pointer-capture":""}:{"pointer-capture":t.pointerTypes?.join(" ")||(t.pointerTypes?"none":""),"pointer-buttons":t.buttons?.join(" ")||(t.buttons?"none":void 0),"pointer-threshold":t.threshold,"pointer-modifier":t.modifier,"pointer-include-interactive":t.includeInteractive?"":void 0}}function Bf(t){if(!t)return;let e=t===!0?{}:t,n=typeof e.inertia=="object"?e.inertia:void 0;return{pan:e.axis??"both","pan-pointer-types":e.pointerTypes?.join(" ")||(e.pointerTypes?"none":void 0),"pan-threshold":e.threshold,"pan-directions":e.directions===!1?"none":id(e.directions),"pan-inertia":e.inertia?"":void 0,"pan-time-constant":n?.timeConstant,"pan-min-velocity":n?.minVelocity}}var _x=({wheelCapture:t,wheelActivation:e,wheelModifier:n,wheelSettle:r,onWheelInput:a,pointerCapture:o,onPointerInput:i,pan:s,onPanInput:l,className:c,children:d,...u})=>h("a-capture",{"wheel-capture":id(t),"wheel-activation":t?e:void 0,"wheel-modifier":t?n:void 0,...Of(t?r:void 0),...zf(o),...Bf(s),onwheelinput:Bn(a),onpointerinput:Bn(i),onpaninput:Bn(l),class:c,...u,children:d});var Fx=({maximized:t,defaultMaximized:e,onStateChange:n,className:r,children:a,...o})=>h("a-panel",{state:t===void 0?void 0:t?"maximized":"normal","default-state":t===void 0&&e?"maximized":void 0,onstatechange:n?i=>{let{event:s,detail:l,isOwn:c}=oe(i);c&&l&&n(s,{next:l.next==="maximized",prev:l.prev==="maximized"})}:void 0,class:r,...o,children:a});var sd=({level:t=2,priority:e,tone:n,className:r,style:a,children:o,...i})=>{let s=X(n);return h("a-title",{level:String(t),priority:e,tone:s,role:"heading","aria-level":t,class:r,style:F(s,"--title-tone-source",a),...i,children:o})};var fe=({shape:t,size:e,label:n,className:r,style:a,...o})=>{let i=e!=null?{...a,"--icon-size":`${e}px`}:a,s=n!=null?{role:"img","aria-label":n}:{"aria-hidden":"true"};return h("a-icon",{shape:t,class:r,style:i,...s,...o})};var Ji=({icon:t,iconTrailing:e,label:n,value:r,tone:a,priority:o,size:i,allcaps:s,className:l,style:c,children:d,...u})=>{let p=X(a),m=F(p,"--tag-tone-source",c),b=r!=null,f=t!=null&&n==null&&r==null&&d==null&&e==null;return A("a-tag",{tone:p,"aria-label":f?`${t} tag`:void 0,priority:o&&o!=="secondary"?o:void 0,size:i&&i!=="medium"?i:void 0,allcaps:s?"":void 0,class:l,style:m,...u,children:[t&&h(fe,{shape:t}),n!=null&&(b?h("a-tag-label",{children:n}):h("a-tag-value",{children:n})),b&&h("a-tag-value",{children:r}),d,e&&h(fe,{shape:e})]})};var me=({priority:t,tone:e,underline:n,underlineOnHover:r,icon:a,iconTrailing:o,paddingless:i,label:s,size:l,loading:c,disabled:d,selected:u,round:p,onClick:m,href:b,target:f,rel:g,download:v,ping:y,type:w,form:T,className:k,style:L,children:N,...O})=>{let M=X(e),R=d||c,Y=ee(p,"--button-round",F(M,"--button-tone-source",L)),Z=a!=null&&s==null&&N==null&&o==null,$={role:"button",priority:t,tone:M,underline:n,"underline-on-hover":r?"":void 0,size:l&&l!=="medium"?l:void 0,paddingless:i?"":void 0,round:K(p),loading:c?"":void 0,disabled:d?"":void 0,selected:u?"":void 0,tabIndex:R?-1:0,"aria-disabled":R?"true":void 0,"aria-busy":c?"true":void 0,"aria-pressed":u?"true":void 0,"aria-label":Z?a:void 0,class:k,style:Y,onClick:R?void 0:m},B=A(ve,{children:[a&&h("a-icon",{shape:a,"aria-hidden":"true"}),s!=null&&h("a-button-label",{children:s}),ao(N,"a-button-label"),o&&h("a-icon",{shape:o,"aria-hidden":"true"})]});if(b!=null){let le={...$,disabled:R||void 0};return h("a",{href:R?void 0:b,"data-anta":"",target:f,rel:g,download:v,ping:y,...le,...O,children:B})}return h("a-button",{type:w,form:T,...$,...O,children:B})};function Qi(t){let{copy:e,copyNode:n,copyUrl:r,copyWithUrl:a,onCopyRequest:o,onCopied:i,toast:s,copiedLabel:l}=t;return{copy:e??void 0,"copy-node":n===!0?"":typeof n=="string"?n:void 0,"copy-url":r?"":void 0,"copy-with-url":a?"":void 0,toast:s?"":void 0,"copied-label":l,oncopydone:i?c=>i(oe(c).detail?.ok??!1):void 0,oncopyrequest:o?()=>o():void 0}}function es(t){return t.copyNode!=null&&t.copyNode!==!1}var ld=({icon:t,iconPlacement:e="leading",copiedLabel:n,tone:r,onCopied:a,onCopyRequest:o,copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,label:d,children:u,"aria-label":p,...m})=>{let b=e==="none"?void 0:t??"copy",{shownIcon:f,shownTone:g,handleCopied:v}=lo(b,r,a),y=e==="trailing"?{iconTrailing:f}:e==="none"?{}:{icon:f},w=d!=null||u!=null,T=Qi({copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,onCopyRequest:o,onCopied:v,toast:e==="none",copiedLabel:n});return A(me,{...y,label:d,tone:e==="none"?r:g,"aria-label":p??(w?void 0:"Copy"),"data-copy-node-button":es({copyNode:s})?"":void 0,...m,children:[u,h("a-copy",{...T})]})};var je=({placement:t,context:e,coord:n,nohover:r,offset:a,autoWidth:o,inset:i,open:s,onStateChange:l,round:c,stopPropagation:d,role:u="menu",className:p,style:m,children:b,...f})=>h("a-menu",{placement:t&&t!=="bottom-start"?t:void 0,context:e?"":void 0,coord:n?"":void 0,nohover:r?"":void 0,offset:a!=null?String(a):void 0,autowidth:o?"":void 0,state:s===void 0?void 0:s?"open":"closed",onstatechange:l?g=>{let{event:v,detail:y,isOwn:w}=oe(g);w&&y&&l(v,{next:y.next==="open",prev:y.prev==="open"})}:void 0,round:K(c),"stop-propagation":d===void 0||d===!1?void 0:d===!0?"":Array.isArray(d)?d.join(" "):d,role:u,"aria-orientation":u==="menu"||u==="listbox"?"vertical":void 0,class:p,style:at(i,"--menu-padding",ee(c,"--menu-round",m)),...f,children:b});var cd={"\u2318":"Meta",cmd:"Meta",command:"Meta",win:"Meta",super:"Meta","\u2303":"Control",ctrl:"Control",control:"Control","\u2325":"Alt",alt:"Alt",opt:"Alt",option:"Alt","\u21E7":"Shift",shift:"Shift","\u21B5":"Enter","\u23CE":"Enter",enter:"Enter",return:"Enter","\u232B":"Backspace",backspace:"Backspace","\u2326":"Delete",del:"Delete",delete:"Delete","\u238B":"Escape",esc:"Escape",escape:"Escape","\u21E5":"Tab",tab:"Tab","\u2423":"Space",space:"Space","\u2191":"ArrowUp","\u2193":"ArrowDown","\u2190":"ArrowLeft","\u2192":"ArrowRight","\u21DE":"PageUp","\u21DF":"PageDown","\u2196":"Home","\u2198":"End"};function Hx(t){let e=[],n="",r=()=>{n&&(e.push(cd[n.toLowerCase()]??(n.length===1?n.toUpperCase():n)),n="")};for(let a of t)cd[a]?(r(),e.push(cd[a])):a==="+"?r():n+=a;return r(),e.length?e.join("+"):void 0}function Vx(t){let e=t.trim().replace(/\s*\+\s*/g,"+").split(/\s+/).map(Hx).filter(n=>n!==void 0);return e.length?e.join(" "):void 0}var Ce=({icon:t,label:e,hint:n,kbd:r,iconTrailing:a,disabled:o,selected:i,selectionIndicator:s,indeterminate:l,indicator:c,tone:d,toneScope:u,submenu:p,value:m,onSelect:b,href:f,target:g,rel:v,download:y,ping:w,role:T,className:k,style:L,children:N,...O})=>{let M=t,R=s==="checkbox"||s==="radio"||s==="check",Y=s==="checkbox"?"menuitemcheckbox":s==="radio"||s==="check"?"menuitemradio":"menuitem",Z=R?s==="checkbox"&&l?"mixed":i?"true":"false":void 0,$=i&&(s===void 0||s==="check"),B=u==="selected"&&!i?void 0:d,le=X(B),te=O["aria-keyshortcuts"],C=r?Vx(r):void 0,G=r?h("kbd",{"aria-hidden":te??C?"true":void 0,children:r}):null,U=e!=null&&(n!=null?A("a-menu-item-text",{children:[h("a-menu-item-label",{children:e}),h("a-menu-item-hint",{children:n})]}):h("a-menu-item-label",{children:e}));if(f!=null){let re={"data-anta-menu-item":"",role:T??"menuitem",href:o?void 0:f,target:g,rel:v,download:y===!0?"":y||void 0,ping:w,tabIndex:o?-1:0,"aria-disabled":o?"true":void 0,"aria-current":i?"true":void 0,"aria-keyshortcuts":C,tone:le,style:F(B,"--menu-item-tone-source",L),onClick:b&&!o?ce=>b(ce,{value:m,label:e}):void 0,class:k};return A("a",{...re,...O,children:[t&&h("a-icon",{shape:t,"aria-hidden":"true"}),U,N,G,a&&h("a-icon",{shape:a,"aria-hidden":"true"})]})}return A("a-menu-item",{role:T??Y,tabIndex:0,disabled:o?"":void 0,selected:$?"":void 0,"aria-checked":Z,tone:le,style:F(B,"--menu-item-tone-source",L),submenu:p?"":void 0,"aria-haspopup":p?"menu":void 0,"aria-disabled":o?"true":void 0,"aria-keyshortcuts":C,onmenuselect:b?re=>b(re,{value:m,label:e}):void 0,class:k,...O,children:[c!=null?h("span",{"aria-hidden":"true","data-indicator":"",style:{flex:"none",display:"inline-flex",alignItems:"center",minHeight:"1lh",pointerEvents:"none"},children:c}):s==="checkbox"?h("a-checkbox",{"aria-hidden":"true",state:l?"indeterminate":i?"checked":"unchecked",tone:le,style:F(B,"--checkbox-tone-source")}):s==="radio"?h("a-radio",{"aria-hidden":"true",selected:!!i,tone:le,style:F(B,"--radio-tone-source")}):null,M&&h("a-icon",{shape:M,"aria-hidden":"true"}),U,N,G,(()=>{let re=p?a??"chevron-right":a;return!p&&!a&&s==="check"&&c==null&&(re=i?"check":"blank"),re?h("a-icon",{shape:re,"aria-hidden":"true"}):null})()]})};var dd=({label:t="Copy",icon:e="copy",iconPlacement:n="leading",copiedLabel:r,tone:a,onCopied:o,onCopyRequest:i,copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,children:u,...p})=>{let m=n==="none"?void 0:e,{shownIcon:b,shownTone:f,handleCopied:g}=lo(m,a,o),v=n==="trailing"?{iconTrailing:b}:n==="none"?{}:{icon:b},y=Qi({copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,onCopyRequest:i,onCopied:g,toast:n==="none",copiedLabel:r});return A(Ce,{label:t,tone:f,...v,"data-menu-open":"","data-copy-node-button":es({copyNode:l})?"":void 0,...p,children:[u,h("a-copy",{...y})]})};var qx=new Set(["\u2192","/","\u2022","\u25B8"]);function Lf(t){return"copy"in t||"copyNode"in t||"copyUrl"in t}function jx(t,e,n){if(e==null||!Number.isFinite(e))return t.map(s=>({kind:"item",item:s}));let r=Math.max(1,Math.floor(e));if(t.length<=r)return t.map(s=>({kind:"item",item:s}));let a=Math.min(Math.max(0,Number.isFinite(n)?Math.floor(n):0),r-1),o=r-a,i=t.slice(a,t.length-o);return[...t.slice(0,a).map(s=>({kind:"item",item:s})),{kind:"overflow",items:i},...t.slice(t.length-o).map(s=>({kind:"item",item:s}))]}function Nf(t){return t.current?{"aria-current":"page"}:{}}function Zx(t,e,n,r,a,o,i){let{label:s,current:l,...c}=t,d=Nf(t);if(Lf(t)){let p={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return h(ld,{...p,children:s},i)}let u={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return h(me,{...u,children:s},i)}function Wx(t,e){let{label:n,current:r,onClick:a,...o}=t,i=Nf(t);return Lf(t)?h(dd,{...o,label:n,onSelect:a,...i},e):h(Ce,{...o,label:n,onSelect:a,...i},e)}var Yx=({items:t,priority:e="quaternary",size:n="medium",separator:r="chevron-right",maxItems:a,itemsBeforeCollapse:o=0,moreLabel:i="Show more breadcrumbs",underline:s,underlineOnHover:l,paddingless:c,className:d,style:u,"aria-label":p,...m})=>{let b=jx(t,a,o),f=qx.has(r),g=f?r:h(fe,{shape:r});return h("a-breadcrumbs",{role:"navigation","aria-label":p??"Breadcrumb","data-size":n==="medium"?void 0:n,"data-paddingless":c?"":void 0,"data-separator-icon":f?void 0:"",class:d,style:u,...m,children:b.flatMap((v,y)=>{let w=v.kind==="overflow"?[h(me,{priority:e,size:n,paddingless:c,icon:"more","aria-label":i,"aria-haspopup":"menu"},`more-${y}`),h(je,{autoWidth:!0,children:v.items.map((T,k)=>Wx(T,k))},`menu-${y}`)]:[Zx(v.item,e,n,s,l,c,y)];return y<b.length-1&&w.push(h("a-breadcrumb-separator",{"aria-hidden":"true",children:g},`separator-${y}`)),w})})};var Ux=["arrow-left-to-line","arrow-left","arrow-narrow-down","arrow-narrow-up-down","arrow-narrow-up","arrow-right","arrow-top-right","asterisk","blank","book-open","braces","bug","calendar-days","calendar","case-sensitive","chat","check","chevron-down","chevron-left","chevron-right","chevron-up","chevrons-right","circle-check","circle-dot","circle-large","circle-small-solid","circle-user","circle","click","clock","cloud-upload","columns-3-cog","copy","corner-down-right","cube","dollar-sign","dots-vertical","download","edit","external-link","eye-closed","eye","file-down","file","filter-x","filter","folder-close","folder-open","folder-tree","hat-glasses","heart-handshake","heart","history-tree","history","home","hourglass","info","link","list-collapse","maximize","megaphone","menu","minimize","minus","moon","more","move-horizontal","not-equal","play","plus","pointer","presentation","refresh-ccw-dot","refresh","regex","repeat","rotate-ccw","rss","runs-history","scroll-text","search-check","search","send","settings","share","sparkles","square-check-big","square-menu","sun","swatch-book","table-2","tag","text-cursor-input","text-initial","timer","toggle-right","trash","view","warning-diamond","warning-triangle","webhook","workflow","x"],$x={"columns-3-cog":["columns","table","settings","configure","fields","visibility"],blank:["spacer","empty","placeholder","space","none"],"warning-diamond":["error","invalid","alert","danger"],"swatch-book":["palette","color","swatch","paint","design"],"hat-glasses":["accessibility","vision","disguise","person"],"heart-handshake":["credits","thanks","agreement","deal","partnership"],heart:["like","favorite","love","wishlist"],hourglass:["progress","time","wait","loading","timer"],"text-initial":["text","typography","letter","a"],"chevron-down":["arrow","expand","open","down"],"chevron-up":["arrow","collapse","close","up"],"chevron-left":["arrow","back","previous"],"chevron-right":["arrow","forward","next"],"chevrons-right":["skip","fast forward"],"arrow-narrow-down":["download","fall","down"],"arrow-narrow-up":["upload","rise","up"],"arrow-left":["back","previous","prev"],"arrow-right":["forward","next"],"arrow-narrow-up-down":["sort","swap","transfer","reorder"],"arrow-top-right":["external","open","leave"],"arrow-left-to-line":["dock","snap","align"],"move-horizontal":["resize","swap","horizontal"],"external-link":["open","link","share","outbound"],check:["tick","ok","done","confirm","approve"],"dollar-sign":["currency","money","payment"],"circle-check":["success","ok","done"],"circle-user":["avatar","person","account","contact","profile"],x:["close","cancel","dismiss","remove","no"],plus:["add","new","create"],minus:["remove","subtract"],menu:["hamburger","list","more"],"dots-vertical":["more","kebab","options"],search:["find","magnify","lookup"],"search-check":["found","validated"],copy:["duplicate","clone"],trash:["delete","remove","bin"],edit:["pencil","modify","rename"],view:["show","display","preview"],click:["tap","press","touch"],send:["submit","share","deliver"],play:["start","run","execute"],refresh:["reload","sync","update"],regex:["pattern","match"],repeat:["loop","retry","rerun"],info:["information","about","i"],"warning-triangle":["alert","danger","caution"],bug:["defect","issue","error"],asterisk:["star","wildcard"],braces:["code","brackets","json"],"case-sensitive":["aA","capitalize","case"],"list-collapse":["list","collapse","expand","items"],"table-2":["table","grid","data","spreadsheet","rows","columns"],"folder-open":["directory","browse"],"folder-close":["directory"],"folder-tree":["hierarchy","structure","tree"],file:["document","page"],"file-down":["download","save"],calendar:["date","schedule"],clock:["time"],timer:["stopwatch","countdown","time"],"toggle-right":["toggle","switch","on","off","boolean"],history:["log","past"],"history-tree":["log","past"],"runs-history":["log","past"],chat:["message","comment","discuss"],presentation:["slides","deck"],"book-open":["read","docs","documentation"],sparkles:["ai","magic","generate"],cube:["box","package"],circle:["dot","point"],"circle-large":["dot","marker"],"not-equal":["neq","different"],"corner-down-right":["branch","indent","return"],rss:["feed","subscribe"],"scroll-text":["log","output","console"],workflow:["pipeline","process","flow"],webhook:["integration","hook"],megaphone:["announcement","broadcast"],maximize:["fullscreen","expand"],minimize:["collapse","shrink"],filter:["sort","narrow"],"filter-x":["clear filter","reset filter","remove filter"],download:["save","import"],"cloud-upload":["save","sync","upload","send","export"],link:["url","href","anchor"],more:["options","extra"],tag:["label","badge","chip"]};var Rf=t=>t==="indeterminate"?"indeterminate":t?"checked":"unchecked",_f=t=>t==="indeterminate"?"indeterminate":t==="checked",Gx=t=>({checked:!!t?.checked,indeterminate:!!t?.indeterminate,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),Kx=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,onStateChange:s,onChange:l,onValueChange:c,label:d,hint:u,className:p,style:m,children:b,tabIndex:f,...g})=>{let v=ee(i,"--checkbox-round",F(r,"--checkbox-tone-source",F(r,"--checkbox-off-tone-source",m))),y=g["aria-label"],w=(typeof y=="string"?y:void 0)??d??(typeof b=="string"?b:void 0),T=s?M=>{let{event:R,detail:Y}=oe(M);Y&&s(R,{next:_f(Y.next),prev:_f(Y.prev)})}:void 0,k=l||c?M=>{l?.(M),c?.(M,Gx(M.currentTarget))}:void 0,L=t!==void 0?Rf(t):void 0,N=t===void 0&&e!==void 0?Rf(e):void 0,O=d!=null||b!=null;return A("a-checkbox",{role:"checkbox","aria-disabled":n?"true":void 0,"aria-label":w,...g,state:L,"default-state":N,disabled:n?"":void 0,tone:X(r),"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:K(i),tabIndex:n?-1:f??0,onstatechange:T,onchange:k,class:p,style:v,children:[O&&A("a-checkbox-label",{children:[d,b]}),u!=null&&h("a-checkbox-hint",{children:u})]})};var Xx=t=>({checked:!!t?.checked,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),Jx=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,labelPosition:s,onStateChange:l,onChange:c,onValueChange:d,label:u,hint:p,className:m,style:b,children:f,tabIndex:g,...v})=>{let y=ee(i,"--switch-round",F(r,"--switch-tone-source",F(r,"--switch-off-tone-source",b))),w=v["aria-label"],T=(typeof w=="string"?w:void 0)??u??(typeof f=="string"?f:void 0),k=l?R=>{let{event:Y,detail:Z}=oe(R);Z&&l(Y,{next:Z.next==="checked",prev:Z.prev==="checked"})}:void 0,L=c||d?R=>{c?.(R),d?.(R,Xx(R.currentTarget))}:void 0,N=t===void 0?void 0:t?"checked":"unchecked",O=t===void 0&&e!==void 0?e?"checked":"unchecked":void 0,M=u!=null||f!=null;return A("a-switch",{role:"switch","aria-disabled":n?"true":void 0,"aria-label":T,...v,state:N,"default-state":O,disabled:n?"":void 0,tone:r,"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:K(i),"label-position":s&&s!=="end"?s:void 0,tabIndex:n?-1:g??0,onstatechange:k,onchange:L,class:m,style:y,children:[M&&A("a-switch-label",{children:[u,f]}),p!=null&&h("a-switch-hint",{children:p})]})};var In=({className:t,children:e,...n})=>{let r=!!e&&!(typeof e=="string"&&e.trim()==="");return h("a-menu-separator",{role:r?"status":"separator","aria-live":r?"polite":void 0,class:t,...n,children:r?e:null})};var Qr=({label:t,className:e,children:n,...r})=>A("a-menu-group",{role:"group","aria-label":t,class:e,...r,children:[t!=null&&h("a-menu-group-label",{"aria-hidden":"true",children:t}),n]});var Qx=({title:t,level:e,tone:n,priority:r,outdent:a,actions:o,disabled:i,round:s,open:l,defaultOpen:c,onStateChange:d,className:u,style:p,children:m,...b})=>{let f=l!==void 0,g=ee(s,"--expander-round",F(n,"--expander-tone-source",p)),v=typeof t=="object"&&t!==null?h("span",{slot:"title",style:{display:"contents"},children:t}):h("a-expander-summary",{slot:"title",children:t});return A("a-expander",{state:f?l?"open":"closed":void 0,"default-state":!f&&c?"open":void 0,level:e!=null?String(e):void 0,tone:X(n),priority:r&&r!=="secondary"?r:void 0,outdent:a?"":void 0,round:K(s),disabled:i?"":void 0,onstatechange:d?y=>{let{event:w,detail:T,isOwn:k}=oe(y);k&&T&&d(w,{next:T.next==="open",prev:T.prev==="open"})}:void 0,class:u,style:g,...b,children:[v,o!=null&&h("span",{slot:"actions",children:o}),h("a-expander-details",{children:m})]})};var ir=t=>t?"":void 0,ey=t=>typeof t=="string"||typeof t=="number",Ff=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.getAttribute?.("name")??void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},ty={email:"email",tel:"tel",url:"url"},ny={email:"email",tel:"tel",url:"url",number:"numeric",search:"search"},ry={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},zt=({label:t,hint:e,status:n,statusIcon:r,tone:a,size:o,round:i,value:s,defaultValue:l,multiline:c,rows:d,maxRows:u,clearable:p,leading:m,trailing:b,type:f,autoComplete:g,inputMode:v,autoFocus:y,name:w,placeholder:T,truncate:k=!0,disabled:L,readOnly:N,button:O,required:M,dimActions:R,spellCheck:Y,maxLength:Z,minLength:$,pattern:B,min:le,max:te,step:C,role:G,onInput:U,onChange:re,onValueChange:ce,onClearClick:Se,onClearInput:Q,children:we,className:Ne,style:Oe,...H})=>{let ge=n&&n!=="neutral"?n:void 0,et=r===void 0?ge?ry[ge]:void 0:r,tt=f==="search",Bt=tt?void 0:f,nt=m??(tt?h(fe,{shape:"search"}):void 0),yt=tt?p??!0:p;return A("a-input",{size:o&&o!=="medium"?o:void 0,round:K(i),value:s,defaultvalue:l,multiline:ir(c||d!=null),rows:d!=null?String(d):void 0,maxrows:u!=null?String(u):void 0,status:ge,tone:X(a),type:!c&&d==null?Bt:void 0,name:w,placeholder:T,truncate:ir(k),disabled:ir(L),readonly:ir(N),button:ir(O),required:ir(M),"dim-actions":ir(R),autocomplete:g??(!c&&d==null&&f?ty[f]:void 0),inputmode:v??(!c&&d==null&&f?ny[f]:void 0),autofocus:y?!0:void 0,spellcheck:Y!=null?Y?"true":"false":void 0,maxlength:Z!=null?String(Z):void 0,minlength:$!=null?String($):void 0,pattern:B,min:le,max:te,step:C,"aria-invalid":n==="critical"?"true":void 0,role:G??(tt?"searchbox":void 0),oninput:U||ce?D=>{U?.(D),ce?.(D,Ff(D))}:void 0,onchange:re||ce?D=>{re?.(D),ce?.(D,Ff(D))}:void 0,onclearclick:Se?D=>Se(oe(D).event):void 0,onclearinput:Q?D=>Q(oe(D).event):void 0,class:Ne,style:ee(i,"--input-round",F(a,"--input-tone-source",Oe)),...H,children:[t!=null&&(ey(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),nt!=null&&h("span",{slot:"leading",style:{display:"contents"},children:nt}),yt&&h("span",{slot:"clear",style:{display:"contents"},children:h(me,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),b!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:b}),e!=null&&A("span",{slot:"hint",style:{display:"contents"},children:[et&&h(fe,{shape:et,"aria-hidden":"true"}),h("span",{children:e})]}),we]})};var ts=(t,e)=>Number.isFinite(t)?t:e,ay=t=>typeof t=="string"||typeof t=="number",oy=(t,e)=>{let n=ts(t,0);return{min:n,max:Math.max(n,ts(e,100))}},Hf=t=>{let e=t?.target??{};return{value:Number(e.value??0),min:Number(e.getAttribute?.("min")??0),max:Number(e.getAttribute?.("max")??100),step:Number(e.getAttribute?.("step")??1),name:e.getAttribute?.("name")??void 0}},iy=({label:t,value:e,defaultValue:n,min:r,max:a,step:o,name:i,disabled:s,tone:l,thumbTone:c,size:d,trackSize:u,thumbSize:p,thumbFill:m,round:b,valueDisplay:f="end",valuePrefix:g,valueSuffix:v,markers:y,trackClick:w="drag-only",onInput:T,onChange:k,onValueChange:L,onValueCommit:N,className:O,style:M,children:R,tabIndex:Y,...Z})=>{let $=pr(u),B=pr(p),le=at(p,"--anta-slider-thumb-size",at(u,"--anta-slider-track-size",ee(b,"--slider-round",F(c,"--slider-thumb-tone-source",F(l,"--slider-tone-source",M))))),{min:te,max:C}=oy(r,a),G=ts(o,1)>0?ts(o,1):1,U=Z["aria-label"],re=(typeof U=="string"?U:void 0)??(typeof t=="string"||typeof t=="number"?String(t):void 0),ce=f==="inline"&&t==null?"end":f,Se=H=>H.value<=te?"0%":H.value>=C?"100%":`calc((100% - var(--anta-slider-thumb-size)) * ${(H.value-te)/(C-te)} + var(--anta-slider-thumb-size) / 2)`,Q=H=>H.value<=te?"start":H.value>=C?"end":void 0,we=H=>{let ge={};return Object.assign(ge,{"--slider-marker-position":Se(H)}),ge},Ne=T||L?H=>{let ge=Hf(H);T?.(H),L?.(H,ge)}:void 0,Oe=k||N?H=>{let ge=Hf(H);k?.(H),N?.(H,ge)}:void 0;return A("a-slider",{value:e,defaultvalue:n,min:te,max:C,step:G,name:i,disabled:s?"":void 0,tone:X(l),"thumb-tone":X(c),size:d&&d!=="medium"?d:void 0,"track-size":$,"thumb-size":B,"thumb-fill":m?"":void 0,round:K(b),"track-click":w==="jump"?"jump":void 0,"value-display":ce==="end"?void 0:ce,"value-prefix":g,"value-suffix":v,role:"slider","aria-label":re,tabIndex:s?-1:Y??0,oninput:Ne,onchange:Oe,class:O,style:le,...Z,children:[t!=null&&(ay(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),y?.map((H,ge)=>{let et=Q(H);return h("span",{slot:"markers",style:we(H),"data-slider-marker-start":et==="start"?"":void 0,"data-slider-marker-end":et==="end"?"":void 0,children:H.label},`${H.value}-${ge}`)}),R]})};function Vf(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(n=Vf(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function sy(){for(var t,e,n=0,r="",a=arguments.length;n<a;n++)(t=arguments[n])&&(e=Vf(t))&&(r&&(r+=" "),r+=e);return r}var qf=sy;var ea=Te.PlainDate.compare,jf=new Map;function Yt(t,e){let n=`${t}|${JSON.stringify(e)}`,r=jf.get(n);return r||(r=new Intl.DateTimeFormat(t,e),jf.set(n,r)),r}var eo=t=>new Date(Date.UTC(t.year,t.month-1,t.day));function Ye(t){if(!t)return null;try{return Te.PlainDate.from(t)}catch{return null}}function ud(t){try{let e=new Intl.Locale(t),r=(e.getWeekInfo?.()??e.weekInfo)?.firstDay;if(typeof r=="number"&&r>=1&&r<=7)return r}catch{}return 1}function Dn(t,e,n){return e&&ea(t,e)<0?e:n&&ea(t,n)>0?n:t}function hd(t,e,n){return e!=null&&ea(t,e)<0||n!=null&&ea(t,n)>0}var ly=t=>Array.from(t).slice(0,2).join("");function Zf(t,e=ud(t)){let n=Te.PlainDate.from("2021-02-01"),r=n.add({days:(e-n.dayOfWeek+7)%7}),a=Yt(t,{weekday:"short",timeZone:"UTC"}),o=Yt(t,{weekday:"long",timeZone:"UTC"}),i=[];for(let s=0;s<7;s++){let l=r.add({days:s}),c=a.format(eo(l));i.push({short:c,narrow:ly(c),long:o.format(eo(l)),weekend:l.dayOfWeek===6||l.dayOfWeek===7})}return i}function pd(t){let{anchor:e,locale:n="en-US",min:r=null,max:a=null,selected:o=null,today:i=Te.Now.plainDateISO(),weeks:s=6}=t,l=ud(n),c=e.year,d=e.month,u=e.with({day:1}),p=(u.dayOfWeek-l+7)%7,m=u.subtract({days:p}),b=Yt(n,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),f=[];for(let g=0;g<s;g++){let v=[];for(let y=0;y<7;y++){let w=m.add({days:g*7+y});v.push({date:w,iso:w.toString(),day:w.day,weekday:w.dayOfWeek,outside:w.month!==d||w.year!==c,disabled:hd(w,r,a),today:i!=null&&ea(w,i)===0,selected:o!=null&&ea(w,o)===0,label:b.format(eo(w))})}f.push(v)}return{year:c,month:d,heading:Yt(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(eo(e)),weekdays:Zf(n,l),weeks:f}}var Wf=new Date(Date.UTC(2026,5,15)),md={year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",numberingSystem:"latn"};function cy(t){try{return Yt(t,md).formatToParts(Wf).filter(e=>e.type==="year"||e.type==="month"||e.type==="day").map(e=>e.type)}catch{return["year","month","day"]}}function ns(t){try{return Yt(t,md).formatToParts(Wf).map(e=>e.type==="year"?"YYYY":e.type==="month"?"MM":e.type==="day"?"DD":e.value).join("")}catch{return"YYYY-MM-DD"}}function rs(t,e){return Yt(e,md).format(eo(t))}function dy(t,e){let n=t.toLowerCase().match(/[^\d\s.,/-]+/g);if(!n)return null;let r=Yt(e,{month:"long",timeZone:"UTC"}),a=Yt(e,{month:"short",timeZone:"UTC"});for(let o=1;o<=12;o++){let i=new Date(Date.UTC(2020,o-1,1)),s=r.format(i).toLowerCase(),l=a.format(i).toLowerCase().replace(/\.$/,"");if(n.some(c=>c===s||c===l||c.length>=3&&s.startsWith(c)))return o}return null}function to(t,e,n={}){let r=u=>hd(u,n.min??null,n.max??null)?null:u,a=(t??"").trim();if(!a)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(a)){let u=Ye(a);return u?r(u):null}let o=cy(e),i=dy(a,e),s=(a.match(/\d+/g)??[]).map(Number),l,c,d;if(i!=null)if(c=i,s.length===1)d=s[0],l=Te.Now.plainDateISO().year;else if(s.length>=2){let[u,p]=s;u>31?[l,d]=[u,p]:p>31?[l,d]=[p,u]:[d,l]=[u,p]}else return null;else if(s.length===1){let u=a.replace(/\D/g,"");if(u.length!==8)return null;let p=0,m={};for(let b of o){let f=b==="year"?4:2;m[b]=Number(u.slice(p,p+f)),p+=f}({year:l,month:c,day:d}=m)}else if(s.length===2){let u=o.filter(m=>m!=="year"),p={};u.forEach((m,b)=>p[m]=s[b]),c=p.month,d=p.day,l=Te.Now.plainDateISO().year}else if(s.length>=3){let u={};o.forEach((p,m)=>u[p]=s[m]),l=u.year,c=u.month,d=u.day}else return null;l!=null&&l<100&&(l=l<70?2e3+l:1900+l);try{return r(Te.PlainDate.from({year:l,month:c,day:d},{overflow:"reject"}))}catch{return null}}function Yf(t){let e=(t??"").trim().toLowerCase();if(!e)return null;let n=null,r=e.match(/([ap])\.?m?\.?$/);r&&(n=r[1]==="p"?"pm":"am",e=e.slice(0,r.index).trim());let a,o;if(/[:.]/.test(e)){let[i,s]=e.split(/[:.]/);a=Number(i),o=Number(s??"0")}else{let i=e.replace(/\D/g,"");if(!i)return null;if(i.length<=2)a=Number(i),o=0;else{let s=i.length-2;a=Number(i.slice(0,s)),o=Number(i.slice(s))}}n==="pm"&&a<12&&(a+=12),n==="am"&&a===12&&(a=0);try{return Te.PlainTime.from({hour:a,minute:o},{overflow:"reject"})}catch{return null}}function as(t,e,n={}){let r=(t??"").trim();if(!r)return null;let a=r.match(/\s+(\d{1,2}[:.]\d{1,2}(?:\s*[ap]\.?m?\.?)?|\d{1,2}\s*[ap]\.?m\.?)\s*$/i),o=r,i=null;a&&(i=Yf(a[1]),i&&(o=r.slice(0,a.index).trim()));let s=to(o,e,n);return s?s.toPlainDateTime(i??Te.PlainTime.from("00:00")):null}function no(t){try{let e=Yt(t,{hour:"numeric"}).resolvedOptions().hourCycle;return e==="h11"||e==="h12"}catch{return!1}}function bd(t,e,n=no(e)){let r=rs(t.toPlainDate(),e),a=String(t.minute).padStart(2,"0");if(!n)return`${r} ${String(t.hour).padStart(2,"0")}:${a}`;let o=(t.hour+11)%12+1;return`${r} ${String(o).padStart(2,"0")}:${a} ${t.hour<12?"AM":"PM"}`}function fd(t,e=no(t)){return`${ns(t)} HH:MM${e?" AM":""}`}var gd=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,focusSignal:l,onStateChange:c,onChange:d,onValueChange:u,className:p,style:m,"aria-label":b,...f})=>{let g=t!==void 0,v=a||(typeof navigator<"u"?navigator.language:"en-US"),y=Ye(n),w=Ye(r),T=Te.Now.plainDateISO(),[k,L]=W(()=>Ye(e)),N=g?Ye(t):k,[O,M]=W(()=>Dn(Ye(t??e)??T,y,w)),[R,Y]=W(t),Z=O;if(t!==R){Y(t);let D=Ye(t);D&&(Z=Dn(D,y,w),M(Z))}let[$,B]=W(null),[le,te]=W(!1),C=pd({anchor:Z,locale:v,min:y,max:w,selected:N,today:T}),G=Z.toString(),[U,re]=W(l);l!==U&&(re(l),l!==void 0&&B({iso:G,n:l}));let ce=y?y.year:T.year-3,Se=w?w.year:T.year+3,Q=[];for(let D=ce;D<=Se;D++)Q.push(D);let we=Ue(()=>Array.from({length:12},(D,V)=>Te.PlainDate.from({year:2e3,month:V+1,day:1}).toLocaleString(v,{month:"long"})),[v]),Ne=(D,V)=>y!=null&&(D<y.year||D===y.year&&V<y.month)||w!=null&&(D>w.year||D===w.year&&V>w.month),Oe=D=>{s||M(V=>Dn(V.add({months:D}),y,w))},H=(D,V)=>{s||M(x=>Dn(x.with({year:D,month:V}),y,w))},ge=Ue(()=>{let D=(V,x)=>{let E=x+1,_=V===O.year&&E===O.month;return h(Ce,{label:we[x],selected:_,disabled:Ne(V,E)||void 0,"data-menu-open":"",onSelect:()=>{H(V,E),te(!1)},children:_&&h("span",{className:"jump-dot","aria-hidden":"true"})},`${V}-${E}`)};return Q.length===1?we.map((V,x)=>D(Q[0],x)):Q.map(V=>A(Ce,{submenu:!0,label:String(V),selected:V===O.year,children:[V===O.year&&h("span",{className:"jump-dot","aria-hidden":"true"}),h(je,{children:we.map((x,E)=>D(V,E))})]},V))},[we,O.year,O.month,ce,Se,n,r,s]),et=D=>{let{event:V,detail:x}=oe(D);if(!x||(c?.(V,x),x.reason==="user"&&(g||V.defaultPrevented)))return;let E=Ye(x.next);g||L(E),M(Dn(E??O,y,w))},tt=D=>{let V="nativeEvent"in D?D.nativeEvent:D;d?.(V),u?.(V,{value:V?.target?.value||null,name:o})},Bt=D=>{if(s)return;let{detail:V}=oe(D),x=Ye(V?.date??null);if(!x)return;let E=Dn(x,y,w);M(E),B(_=>({iso:E.toString(),n:(_?.n??0)+1}))},nt=s||y!=null&&Te.PlainDate.compare(O.with({day:1}).subtract({days:1}),y)<0,yt=s||w!=null&&Te.PlainDate.compare(O.with({day:1}).add({months:1}),w)>0;return A("div",{className:qf("anta-calendar",p),"data-size":i&&i!=="medium"?i:void 0,"aria-disabled":s?"true":void 0,style:m,...f,children:[A("div",{"data-part":"header",children:[h(me,{priority:"tertiary",icon:"chevron-left",size:i,"aria-label":"Previous month",disabled:nt,onClick:()=>Oe(-1)}),h(me,{"data-part":"heading",priority:"tertiary",size:i,"aria-live":"polite","aria-label":`${C.heading} \u2014 choose month and year`,disabled:s||nt&&yt,children:C.heading}),h(je,{placement:"bottom",open:le,onStateChange:(D,{next:V})=>te(V),children:ge}),h(me,{priority:"tertiary",icon:"chevron-right",size:i,"aria-label":"Next month",disabled:yt,onClick:()=>Oe(1)})]}),A("a-calendar",{role:"group","aria-label":b??C.heading,name:o,value:g?t:void 0,defaultvalue:g?void 0:e,disabled:s?"":void 0,"data-focus":$?`${$.iso}#${$.n}`:void 0,onstatechange:et,onchange:tt,onnavigate:Bt,children:[C.weekdays.map((D,V)=>h("span",{"data-part":"weekday","data-weekend":D.weekend?"":void 0,"aria-hidden":"true",children:D.narrow},`wd${V}`)),C.weeks.flat().map(D=>{let V=D.today&&!D.selected?{priority:"secondary"}:{priority:"tertiary",selected:D.selected,tone:D.selected?"brand":void 0};return A(me,{...V,size:i,disabled:s||D.disabled,tabIndex:D.iso===G?0:-1,"aria-label":D.label,"aria-hidden":D.outside?"true":void 0,"aria-current":D.today?"date":void 0,"data-part":"day-cell","data-date":D.iso,"data-today":D.today?"":void 0,"data-outside":D.outside?"":void 0,children:[D.day,D.today&&h(Ot,{children:"Today"})]},D.iso)})]})]})};var vd=t=>t?"":void 0,uy=t=>typeof t=="string"||typeof t=="number",Uf=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.getAttribute?.("name")??void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},hy={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},xd=({label:t,hint:e,status:n,statusIcon:r,tone:a,size:o,round:i,value:s,defaultValue:l,locale:c,hour12:d,min:u,max:p,name:m,disabled:b,required:f,icon:g,clearable:v,dimActions:y,trailing:w,autoFocus:T,onValueChange:k,onClearInput:L,children:N,className:O,style:M,...R})=>{let Y=n&&n!=="neutral"?n:void 0,Z=r===void 0?Y?hy[Y]:void 0:r;return A("a-input-time",{size:o&&o!=="medium"?o:void 0,round:K(i),value:s,defaultvalue:l,locale:c,hour12:d===void 0?void 0:d?"true":"false",min:u,max:p,status:Y,tone:X(a),name:m,disabled:vd(b),required:vd(f),"dim-actions":vd(y),autofocus:T?!0:void 0,"aria-invalid":n==="critical"?"true":void 0,oninput:k?$=>k($,Uf($)):void 0,onchange:k?$=>k($,Uf($)):void 0,onclearinput:L?$=>L(oe($).event):void 0,class:O,style:ee(i,"--input-time-round",F(a,"--input-time-tone-source",M)),...R,children:[t!=null&&(uy(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),g!==!1&&h("span",{slot:"leading",style:{display:"contents"},children:h(fe,{shape:g??"clock"})}),v&&h("span",{slot:"clear",style:{display:"contents"},children:h(me,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),w!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:w}),e!=null&&A("span",{slot:"hint",style:{display:"contents"},children:[Z&&h(fe,{shape:Z,"aria-hidden":"true"}),h("span",{children:e})]}),N]})};var py=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,label:l,hint:c,placeholder:d,status:u,round:p,placement:m,offset:b,clearable:f,icon:g,time:v,hour12:y,onValueChange:w,className:T,style:k,...L})=>{let N=a||(typeof navigator<"u"?navigator.language:"en-US"),O=Ye(n),M=Ye(r),R=v?y??no(N):!1,Y=Ue(()=>d??(v?fd(N,R):ns(N)),[d,v,N,R]),Z=I=>{if(!I)return"";let q=Ye(I.slice(0,10));if(!q)return"";if(!v)return rs(q,N);let ze=I.length>=16&&I[10]==="T",ne=q.toPlainDateTime(Te.PlainTime.from(ze?I.slice(11,16):"00:00"));return bd(ne,N,R)},$=I=>!I||!v?I:I.length<=10?`${I}T00:00`:I.slice(0,16),B=t!==void 0,[le,te]=W(()=>$(e)),C=B?t:le,G=C?C.slice(0,10):"",U=!!C&&C.length>=16&&C[10]==="T",re=U&&parseInt(C.slice(11,13),10)||0,ce=U?C.slice(14,16):"00",[Se,Q]=W(()=>Z(C)),[we,Ne]=W(!1),[Oe,H]=W(!1),[ge,et]=W(0),[tt,Bt]=W(C);C!==tt&&(Bt(C),Q(Z(C)),H(!1));let nt=I=>{B||te(I||void 0),w?.(I,{value:I,name:o})},yt=I=>`${I}T${String(re).padStart(2,"0")}:${ce}`,D=I=>{H(!1),I===(C??"")?Q(Z(I)):nt(I)},V=I=>{let q=I.trim();if(!q)return H(!1),C?nt(""):Q(""),!0;let ze=v?as(q,N,{min:O,max:M}):to(q,N,{min:O,max:M});if(!ze)return H(!0),!1;let ne=v?ze.toString({smallestUnit:"minute"}):ze.toString();return D(ne),!0},x=Ue(()=>{let I=Se.trim();if(!I)return G;let q=v?as(I,N,{min:O,max:M}):to(I,N,{min:O,max:M});return q?q.toString().slice(0,10):null},[Se,v,N,G,n,r]),[E,_]=W(G);return x!==null&&x!==E&&_(x),A(ve,{children:[h(zt,{label:l,hint:Oe?`Unrecognized date. Try ${Y}.`:c,status:Oe?"critical":u,size:i,round:p,disabled:s,clearable:f,leading:g===!1?void 0:h(fe,{shape:g??"calendar-days"}),value:Se,placeholder:Y,inputMode:v?"text":"numeric",autoComplete:"off",role:"combobox","aria-haspopup":"dialog","aria-expanded":we?"true":"false",onInput:I=>{Q(I.currentTarget.value),Oe&&H(!1)},onChange:I=>V(I.currentTarget.value),onKeyDown:I=>{(I.key==="ArrowDown"||I.key==="ArrowUp")&&!s&&(I.preventDefault(),et(q=>q+1)),I.key==="Enter"&&!s&&(I.preventDefault(),V(I.currentTarget.value)&&Ne(!1))},truncate:!0,className:T,style:k,...L}),h(je,{role:"dialog","aria-label":v?"Choose date and time":"Choose date",open:we,placement:m??"bottom-start",offset:b,autoWidth:!0,inset:8,onStateChange:(I,{next:q})=>Ne(q),children:A("div",{"data-menu-open":"",children:[h(gd,{value:E,min:n,max:r,locale:a,size:i,disabled:s,focusSignal:ge,onStateChange:(I,{next:q,reason:ze})=>{if(ze!=="user")return;let ne=q??"";D(v&&ne?yt(ne):ne),v||Ne(!1)}}),v&&A("a-input-date-time-container",{children:[h(xd,{size:i,locale:a,hour12:y,disabled:s,"aria-label":"Time",value:U?`${String(re).padStart(2,"0")}:${ce}`:"",onValueChange:(I,{value:q})=>{if(("nativeEvent"in I?I.nativeEvent:I)?.type!=="change")return;let ne=G||Te.Now.plainDateISO().toString();nt(q?`${ne}T${q}`:ne)}}),h(me,{priority:"tertiary",size:i,icon:"check","aria-label":"Done",onClick:()=>Ne(!1)})]})]})}),o?h("input",{type:"hidden",name:o,value:C??""}):null]})};var Pn=t=>typeof t=="string"?{value:t,label:t}:t;function ta(t){let e=t.trim();if(!e)return null;let n=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(e.split(/\s+/).map(n).join("\\s+"),"i")}var na=(t,e)=>!e||[String(t.value),t.label??"",t.hint??""].some(n=>e.test(n)),ra=(t,e)=>{if(!e)return t;let n=new RegExp(e.source,"gi"),r=[],a=0,o;for(;(o=n.exec(t))!==null;)o.index>a&&r.push(t.slice(a,o.index)),r.push(h("b",{children:o[0]},r.length)),a=o.index+o[0].length,o[0].length===0&&n.lastIndex++;return r.length===0?t:(a<t.length&&r.push(t.slice(a)),r)};var my=t=>{let{suggestions:e,value:n,defaultValue:r,onValueChange:a,onSelect:o,filter:i=!0,...s}=t,l=n!==void 0,[c,d]=W(r??""),u=l?n:c,[p,m]=W(!1),b=Ue(()=>e.map(Pn),[e]),f=typeof i=="function",g=i!==!1&&!f?ta(u):null,v=f?b.filter(k=>i(k,u)):b.filter(k=>na(k,g)),y=p&&v.length>0,w=k=>{l||d(k),a?.(k)},T=k=>{w(k.value),o?.(k),m(!1)};return A(ve,{children:[h(zt,{...s,value:u,"data-menu-search":"",role:"combobox","aria-haspopup":"listbox","aria-expanded":y?"true":"false","aria-autocomplete":"list",onFocus:()=>m(!0),onInput:k=>{w(k.currentTarget.value),m(!0)},onKeyDown:k=>{k.key==="Enter"&&!k.defaultPrevented&&m(!1)}}),h(je,{role:"listbox",open:y,onStateChange:(k,{next:L})=>{m(L)},children:v.map((k,L)=>{let{className:N,style:O,...M}=ct(k,!0);return h(Ce,{...M,role:"option",icon:k.icon,label:ra(k.label??k.value,g),hint:k.hint?ra(k.hint,g):k.hint,tone:k.tone,disabled:k.disabled,value:k.value,onMouseDown:R=>R.preventDefault(),onSelect:()=>T(k),className:N,style:O},`${k.value}-${L}`)})})]})};var by=t=>({value:t?.value??null,name:t?.getAttribute?.("name")??void 0}),fy=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,name:l,label:c,hint:d,status:u,tone:p,toneScope:m,size:b,disabled:f,orientation:g,className:v,style:y,...w})=>{let T=e!==void 0,[k,L]=W(n),N=T?e:k,O=new Set;for(let B of t)O.has(B.value)&&console.warn(`[anta] <RadioGroup> duplicate option value ${JSON.stringify(B.value)} \u2014 values must be unique.`),O.add(B.value);let M=ds(),R=ds(),Y=f?void 0:t.find(B=>B.value===N)?.value??t.find(B=>!B.disabled)?.value,Z=B=>{let{event:le,detail:te}=oe(B);te&&(r?.(le,te),!T&&(te.reason==="user"&&le.defaultPrevented||L(te.next??void 0)))},$=a||o?B=>{a?.(B),o?.(B,by(B.currentTarget))}:void 0;return A("a-radio-group",{role:"radiogroup","aria-disabled":f?"true":void 0,"aria-labelledby":c?M:void 0,"aria-describedby":d?R:void 0,...w,state:T?e:void 0,"default-state":T?void 0:n,name:l,status:u&&u!=="neutral"?u:void 0,tone:X(p),"tone-scope":m&&m!=="all"?m:void 0,size:b&&b!=="medium"?b:void 0,disabled:f?"":void 0,orientation:g&&g!=="vertical"?g:void 0,onstatechange:Z,onchange:$,onfocusin:i,onfocusout:s,class:v,style:F(p,"--radio-tone-source",F(p,"--radio-off-tone-source",y)),children:[c&&h("a-radio-group-label",{id:M,children:c}),d&&h("a-radio-group-hint",{id:R,children:d}),h("a-radio-list",{children:t.map(B=>{let le=f||B.disabled,{className:te,style:C,...G}=ct(B);return A("a-radio",{...G,role:"radio",value:B.value,"aria-disabled":le?"true":void 0,tabIndex:B.value===Y?0:-1,tone:B.tone||void 0,"tone-scope":B.toneScope??(B.tone?m:void 0),size:B.size&&B.size!=="medium"?B.size:void 0,disabled:B.disabled?"":void 0,class:te,style:F(B.tone,"--radio-tone-source",F(B.tone,"--radio-off-tone-source",C)),children:[h("a-radio-label",{children:B.label}),B.hint!=null&&h("a-radio-hint",{children:B.hint})]},B.value)})})]})};function gy(t,e){let n=new Set(e==null?[]:Array.isArray(e)?e:[e]),r=(o,i)=>o===0?"none":o===i?"all":"some",a=o=>o.map(i=>{if(typeof i!="string"&&Array.isArray(i.submenu)){let c=i,d=a(c.submenu),u=d.reduce((m,b)=>m+b.on,0),p=d.reduce((m,b)=>m+b.total,0);return{node:{...c,submenu:d.map(m=>m.node),selectionState:r(u,p)},on:u,total:p}}if(typeof i!="string"&&Array.isArray(i.options)){let c=i,d=a(c.options),u=d.reduce((m,b)=>m+b.on,0),p=d.reduce((m,b)=>m+b.total,0);return{node:{...c,options:d.map(m=>m.node),selectionState:r(u,p)},on:u,total:p}}let s=Pn(i),l=n.has(s.value);return{node:{...s,selected:l},on:l?1:0,total:1}});return a(t).map(o=>o.node)}var vy=t=>{let{options:e,placement:n,offset:r,selection:a,indicator:o,value:i,defaultValue:s,onValueChange:l,placeholder:c,icon:d,leading:u,label:p,hint:m,size:b,status:f,statusIcon:g,round:v,disabled:y,tone:w,toneScope:T,filter:k,selectAll:L=!0,selectAllLabel:N="Select all",clearable:O,clearLabel:M="Clear",renderOption:R,renderIndicator:Y,verbose:Z,renderSummary:$,renderTrigger:B,renderEmpty:le,className:te,style:C,...G}=t,U=a==="multiple",re=f&&f!=="neutral"?`var(--text-2-${f})`:void 0,ce=U?"checkbox":o??"none",Se=ce==="none"?void 0:ce,Q=l,we=i!==void 0,[Ne,Oe]=W(s),H=we?i:Ne,[ge,et]=W(!1),[tt,Bt]=W(""),nt=`${p??G["aria-label"]??"Select"} options`,yt=S=>typeof S=="object"&&Array.isArray(S.submenu),D=S=>typeof S=="object"&&Array.isArray(S.options),V=(S,de,ae,ie)=>{for(let be of S)if(typeof be!="string"&&yt(be))V(be.submenu,be.label,ae||!!be.disabled,ie);else if(typeof be!="string"&&D(be))V(be.options,be.label,ae||!!be.disabled,ie);else{let wt=Pn(be);ie.push({opt:wt,disabled:ae||!!wt.disabled,group:de})}},x=[];V(e,void 0,!1,x);let E=new Set;for(let S of x){let de=String(S.opt.value);E.has(de)&&console.warn(`[anta] <Select> duplicate option value=${JSON.stringify(S.opt.value)} \u2014 values must be unique (compared as strings for row keys).`),E.add(de)}let _=new Map(x.map(S=>[S.opt.value,S.opt])),I=k!==void 0&&k!==!1,q=tt.trim(),ze=I&&typeof k!="function"?ta(q):null,ne=S=>typeof k=="function"?k(S,q):na(S,ze),lr=typeof k=="function"||I&&!!q?x.filter(S=>ne(S.opt)):x,aa=I&&!!q,rt=Array.isArray(H)?H:H!=null?[H]:[],cr=S=>rt.includes(S),Lt=rt.map(S=>_.get(S)).filter(Boolean),dr=x.filter(S=>!S.disabled).map(S=>S.opt.value),is=U&&dr.length>1&&dr.every(S=>rt.includes(S)),ss=S=>S.label??String(S.value),On="";if(U){let S=Lt.length>0?$?.(Lt):void 0;if(S!=null&&S!=="")On=S;else if(is)On="All";else if(Lt.length===1)On=ss(Lt[0]);else if(Lt.length>1){let de=`${Lt.length} selected`;On=Z?`${de}: ${Lt.map(ss).join(", ")}`:de}}else if(H!=null){let S=_.get(H);On=S?ss(S):""}let Jf=(S,de)=>{if(U){if(L&&de?.altKey){let be=[S.value];we||Oe(be),Q?.(be,{value:S.value,option:S,selected:!0});return}let ae=rt.includes(S.value),ie=ae?rt.filter(be=>be!==S.value):[...rt,S.value];we||Oe(ie),Q?.(ie,{value:S.value,option:S,selected:!ae})}else we||Oe(S.value),Q?.(S.value,{value:S.value,option:S})},oa=U?lr.filter(S=>!S.disabled).map(S=>S.opt.value):[],Ed=oa.filter(S=>rt.includes(S)),ro=oa.length>0&&Ed.length===oa.length,Qf=Ed.length>0&&!ro,eg=()=>{let S=rt.filter(ae=>!oa.includes(ae)),de=ro?S:[...S,...oa];we||Oe(de),Q?.(de,{all:!0,selected:!ro})},tg=()=>{let S=U?[]:void 0;we||Oe(S),Q?.(S,{all:!0,selected:!1})},ls=(S,de)=>{let{className:ae,style:ie,...be}=ct(S,!0),wt={value:S.value,selected:cr(S.value),disabled:de},Ut=R?.(S,wt),zn=Y?.(wt),rg=!U&&ce==="none"?{role:"menuitemradio","aria-checked":cr(S.value)?"true":"false"}:void 0,Ad=U&&L&&!de?oo:void 0,Td=S.tooltip??Ad,ag=S.tooltip==null&&Ad!=null;return A(Ce,{...be,selectionIndicator:Se,...rg,indicator:zn??void 0,label:Ut?void 0:ra(S.label??String(S.value),ze),hint:Ut?void 0:S.hint?ra(S.hint,ze):S.hint,icon:Ut?void 0:S.icon,tone:S.tone??w,toneScope:S.toneScope??T,selected:cr(S.value),disabled:de||void 0,"data-menu-open":U?"":void 0,onSelect:og=>Jf(S,og),className:ae,style:ie,children:[Ut,Td&&h(Ot,{...ag?{delay:io,placement:"left"}:{follow:!0},children:Td})]},String(S.value))},cs=(S,de)=>{let ae=[];return S.forEach((ie,be)=>{if(typeof ie!="string"&&yt(ie)){let Ut=de||!!ie.disabled,zn=cs(ie.submenu,Ut);zn.length&&ae.push(h(Ce,{submenu:!0,label:ie.label,icon:ie.icon,disabled:Ut||void 0,"data-menu-open":U?"":void 0,children:h(je,{children:zn})},`sub-${be}-${ie.label}`));return}if(typeof ie!="string"&&D(ie)){let Ut=de||!!ie.disabled,zn=cs(ie.options,Ut);zn.length&&ae.push(h(Qr,{label:ie.label,children:zn},`grp-${be}-${ie.label}`));return}let wt=Pn(ie);typeof k=="function"&&!ne(wt)||ae.push(ls(wt,de||!!wt.disabled))}),ae},ng=()=>{let S=x.filter(ae=>ne(ae.opt)),de=[];for(let ae=0;ae<S.length;){let ie=S[ae].group;if(ie===void 0){de.push(ls(S[ae].opt,S[ae].disabled)),ae++;continue}let be=[],wt=ae;for(;ae<S.length&&S[ae].group===ie;)be.push(ls(S[ae].opt,S[ae].disabled)),ae++;de.push(h(Qr,{label:ie,children:be},`flat-${wt}-${ie}`))}return de},Cd=A(ve,{children:[B?B({open:ge,value:H,selected:Lt,disabled:!!y,icon:d}):A(me,{disabled:y,size:b,round:v,"aria-label":typeof p=="string"||typeof p=="number"?String(p):void 0,"aria-invalid":f==="critical"?"true":void 0,"aria-haspopup":I?"dialog":"menu","aria-expanded":ge?"true":"false",...G,children:[(u??d)&&h("a-select-leading",{"aria-hidden":"true",children:u??h(fe,{shape:d})}),h("a-button-label",{"data-placeholder":On?void 0:"",children:On||c}),h("a-select-chevron",{open:ge?"":void 0,"aria-hidden":"true",style:re?{color:re}:void 0,children:h(fe,{shape:"chevron-down"})})]}),A(je,{role:I?"dialog":void 0,"aria-label":I?nt:void 0,placement:n,offset:r,onStateChange:(S,{next:de})=>{et(de),de||Bt("")},children:[I&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(zt,{"data-menu-search":"",size:"small",value:tt,placeholder:"Filter\u2026","aria-label":"Filter options","aria-autocomplete":"list",onInput:S=>Bt(S.currentTarget.value)})}),U&&L&&lr.length>0&&A(ve,{children:[h(Ce,{selectionIndicator:"checkbox",selected:ro,indeterminate:Qf,label:N,"data-menu-open":"","data-menu-skip-active":"",onSelect:eg}),h(In,{})]}),lr.length===0?le?.({query:q}):aa?ng():cs(e,!1),O&&rt.length>0&&A(ve,{children:[h(In,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Ce,{icon:"x",label:M,role:I?"button":void 0,"data-menu-open":"",onSelect:tg})})]})]})]});if(B)return Cd;let Sd=g===void 0?f?{brand:"circle-small-solid",info:"info",success:"circle-check",warning:"warning-triangle",critical:"warning-diamond"}[f]:void 0:g;return A("a-select-field",{size:b,status:f,disabled:y?"":void 0,class:te,style:C,children:[p!=null&&h("a-select-label",{children:p}),Cd,m!=null&&A("a-select-hint",{children:[Sd&&h(fe,{shape:Sd,"aria-hidden":"true"}),m]})]})};var yd=t=>{let e=[];for(let n of t)typeof n!="string"&&Array.isArray(n.submenu)?e.push(...yd(n.submenu)):typeof n!="string"&&Array.isArray(n.options)?e.push(...yd(n.options)):e.push(Pn(n));return e},os=t=>t==null||t===""||Array.isArray(t)&&t.length===0,$f=(t,e)=>na(t,ta(e)),xy=t=>{let{facets:e,placement:n,offset:r,value:a,defaultValue:o,onValueChange:i,label:s="Filter",icon:l="filter",size:c,priority:d="secondary",disabled:u,tone:p,toneScope:m,searchable:b,searchPlaceholder:f="Filter\u2026",clearable:g=!0,clearAllLabel:v="Clear all",renderTrigger:y,className:w,style:T,...k}=t,L=a!==void 0,[N,O]=W(o??{}),M=L?a:N,[R,Y]=W(!1),[Z,$]=W({}),[B,le]=W({});{let x=null,E=Z;for(let _ of e)_.kind==="text"&&B[_.key]!==M[_.key]&&(x={...x??B,[_.key]:M[_.key]},E={...E,[_.key]:M[_.key]??""});x&&(le(x),$(E))}let[te,C]=W({}),[G,U]=W(""),re=e.reduce((x,E)=>x+(os(M[E.key])?0:1),0),ce=Ue(()=>new Map(e.map(x=>[x.key,x.kind==="single"||x.kind==="multiple"?yd(x.options):[]])),[e]),Se=(x,E)=>{L||O(x),i?.(x,E)},Q=(x,E)=>{let _=os(E),I={...M};_?delete I[x.key]:I[x.key]=E,Se(I,{facet:x.key,kind:x.kind,value:_?void 0:E})},we=()=>Se({},{all:!0}),Ne=x=>{let E=ce.get(x.key)??[];if(!x.filter)return E;let _=te[x.key]??"",I=typeof x.filter=="function"?x.filter:$f;return E.filter(q=>I(q,_))},Oe=x=>x.filter?h("a-select-header",{slot:"header","data-menu-open":"",children:h(zt,{"data-menu-search":"",size:"small",value:te[x.key]??"",placeholder:"Filter\u2026","aria-label":`Filter ${x.label}`,"aria-autocomplete":"list",onInput:E=>C(_=>({..._,[x.key]:E.currentTarget.value}))})}):null,H=(x,E,_="")=>{let{className:I,style:q,...ze}=ct(E,!0),ne=x.kind==="single"?M[x.key]===E.value:(M[x.key]??[]).includes(E.value),sr=x.renderOption?.(E,{value:E.value,selected:ne,disabled:!!E.disabled}),lr={...ze,icon:sr?void 0:E.icon,label:sr?void 0:E.label??String(E.value),hint:sr?void 0:E.hint,tone:E.tone??p,toneScope:E.toneScope??m,disabled:E.disabled,className:I,style:q,"data-menu-open":""};if(x.kind==="single"){let dr=M[x.key];return h(Ce,{...lr,selectionIndicator:"check",selected:ne,onSelect:()=>Q(x,dr===E.value?void 0:E.value),children:sr},`${_}${E.value}`)}let aa=M[x.key]??[],rt=x.selectAll!==!1&&!E.disabled,cr=E.tooltip??(rt?oo:void 0),Lt=E.tooltip==null&&rt;return A(Ce,{...lr,selectionIndicator:"checkbox",selected:ne,onSelect:dr=>rt&&dr?.altKey?Q(x,[E.value]):Q(x,aa.includes(E.value)?aa.filter(is=>is!==E.value):[...aa,E.value]),children:[sr,cr&&h(Ot,{...Lt?{delay:io,placement:"left"}:{follow:!0},children:cr})]},`${_}${E.value}`)},ge=x=>Ne(x).map(E=>H(x,E)),et=x=>{let E=M[x.key]??[],_=Ne(x),I=_.filter(ne=>!ne.disabled).map(ne=>ne.value),q=I.length>0&&I.every(ne=>E.includes(ne)),ze=I.some(ne=>E.includes(ne));return A(ve,{children:[x.selectAll!==!1&&_.length>0&&A(ve,{children:[h(Ce,{selectionIndicator:"checkbox",selected:q,indeterminate:ze&&!q,label:x.selectAllLabel??"Select all","data-menu-open":"",onSelect:()=>Q(x,q?E.filter(ne=>!I.includes(ne)):[...new Set([...E,...I])])}),h(In,{})]}),_.map(ne=>H(x,ne))]})},tt=()=>e.filter(E=>E.kind==="single"||E.kind==="multiple").map(E=>{let _=typeof E.filter=="function"?E.filter:$f;return{facet:E,matched:(ce.get(E.key)??[]).filter(I=>_(I,G))}}).filter(E=>E.matched.length>0).map(({facet:E,matched:_})=>h(Qr,{label:E.label,children:_.map(I=>H(E,I,`${E.key}:`))},E.key)),Bt=x=>{let E=M[x.key]??"",_=Z[x.key]??E,I=()=>{let q=_.trim()===""?void 0:_;q!==(E||void 0)&&Q(x,q)};return h("div",{"data-menu-open":"",style:{padding:"4px"},children:h(zt,{size:"small",value:_,placeholder:x.placeholder,"aria-label":x.label,onInput:q=>$(ze=>({...ze,[x.key]:q.currentTarget.value})),onKeyDown:q=>{q.key==="Enter"&&(q.preventDefault(),I())},onBlur:I})})},nt=x=>h("div",{"data-menu-open":"",children:x.render({value:M[x.key],onChange:E=>Q(x,E),close:()=>Y(!1)})}),yt=x=>{let E=x.kind==="single"||x.kind==="multiple",_=!E||!!x.filter,I=x.kind==="single"?ge(x):x.kind==="multiple"?et(x):x.kind==="text"?Bt(x):nt(x),q=!os(M[x.key]);return A(je,{role:_?"dialog":void 0,"aria-label":_?`${x.label} ${E?"options":"editor"}`:void 0,children:[E&&Oe(x),I,g&&q&&A(ve,{children:[h(In,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Ce,{icon:"x",label:"Clear",role:_?"button":void 0,"data-menu-open":"",onSelect:()=>Q(x,void 0)})})]})]})},D=x=>{let E=M[x.key];if(os(E))return null;switch(x.kind){case"single":return(ce.get(x.key)??[]).find(I=>I.value===E)?.label??String(E);case"multiple":return String(E.length);case"text":return String(E);case"custom":return x.summary(E)}};return A(ve,{children:[y?y({open:R,value:M,count:re,disabled:!!u}):h(me,{icon:l,label:s,priority:d,size:c,disabled:u,"aria-haspopup":b?"dialog":"menu","aria-expanded":R?"true":"false",className:w,style:T,...k,children:re>0&&h(Ji,{size:"small",priority:"primary",tone:"brand",children:String(re)})}),A(je,{role:b?"dialog":void 0,"aria-label":b?`${s} options`:void 0,placement:n,offset:r,open:R,onStateChange:(x,{next:E})=>{Y(E),E||U("")},children:[b&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(zt,{"data-menu-search":"",size:"small",value:G,placeholder:f,"aria-label":"Filter all facets","aria-autocomplete":"list",onInput:x=>U(x.currentTarget.value)})}),b&&G.trim()?tt():e.map(x=>A(Ce,{submenu:!0,icon:x.icon,label:x.label,"aria-haspopup":x.kind==="text"||x.kind==="custom"||x.filter?"dialog":"menu",children:[(()=>{let E=D(x);return E!=null?h(Ji,{size:"small",tone:"brand",children:h("a-select-faceted-summary",{children:E})}):null})(),yt(x)]},x.key)),g&&A(ve,{children:[h(In,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Ce,{icon:"filter-x",label:v,role:b?"button":void 0,disabled:re===0,"data-menu-open":"",onSelect:we})})]})]})]})};var wd=({children:t,options:e,value:n,defaultValue:r,onStateChange:a,onChange:o,onValueChange:i,onFocus:s,onBlur:l,label:c,priority:d,tone:u,size:p,orientation:m,fill:b,noslide:f,round:g,disabled:v,className:y,style:w,id:T,...k})=>{let L=n!==void 0,[N,O]=W(r),M=L?n:N,R=e??[],Y=new Set;for(let C of R)Y.has(C.value)&&console.warn(`[anta] <Tabs> duplicate option value=${JSON.stringify(C.value)} \u2014 values must be unique.`),Y.add(C.value);let Z=C=>{let{event:G,detail:U}=oe(C);U&&(a?.(G,U),!L&&(G.defaultPrevented||O(U.next??void 0)))},$=o||i?C=>{o?.(C),i?.(C,{value:C.currentTarget?.value??null})}:void 0,B=m==="vertical",le=M!=null&&R.some(C=>C.value===M)?M:R.find(C=>!v&&!C.disabled)?.value,te=h("a-tabs",{role:"tablist","aria-label":c,"aria-orientation":B?"vertical":void 0,"aria-disabled":v?"true":void 0,state:L?n:void 0,"default-state":L?void 0:r,priority:d&&d!=="primary"?d:void 0,tone:X(u),size:p&&p!=="medium"?p:void 0,orientation:B?"vertical":void 0,fill:b?"":void 0,noslide:f?"":void 0,round:K(g),disabled:v?"":void 0,onstatechange:Z,onchange:$,onfocusin:s,onfocusout:l,class:y,id:T,style:ee(g,"--tabs-round",F(u,"--tabs-tone-source",w)),...k,children:R.map(C=>{let G=v||C.disabled,U=C.value===M,{className:re,style:ce,...Se}=ct(C);return A("a-tab",{...Se,role:"tab",value:C.value,tone:C.tone||void 0,"aria-disabled":G?"true":void 0,tabIndex:C.value===le?0:-1,disabled:G?"":void 0,round:K(g)??K(C.round),class:re,style:F(C.tone,"--tabs-tone-source",ce),children:[C.icon&&h("a-icon",{shape:C.icon,"aria-hidden":"true"}),ao(C.label!=null?C.label:C.children,"a-tab-label"),C.iconTrailing&&h("a-icon",{shape:C.iconTrailing,"aria-hidden":"true"}),C.tooltip!=null&&C.tooltip!==""?h(Ot,{truncatedOnly:!0,children:C.tooltip}):null]},C.value)})});return A(ve,{children:[te,t]})};var Gf={incomplete:"circle-large",completed:"check",error:"x"},yy=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,priority:c="secondary",tone:d,renderMarker:u,size:p,orientation:m,fill:b,disabled:f,children:g,className:v,style:y,id:w,...T})=>{let k=e!==void 0,[L,N]=W(n),O=k?e:L??t[0]?.value,M=(C,G)=>{r?.(C,G),!(k||C.defaultPrevented)&&N(G.next??void 0)},R=t.map(C=>{let{className:G,style:U,...re}=ct(C),ce=C.tone||void 0,Se=C.disabled?"neutral":C.state==="error"?"critical":ce||d||"neutral",Q=u?.(C,{state:C.state,selected:C.value===O,disabled:!!C.disabled}),we=C.disabled?h(fe,{shape:Gf.incomplete}):C.state==="loading"?h(od,{tone:Se}):h(fe,{shape:Gf[C.state]}),Ne=Q!==void 0?Q:C.marker!==void 0?typeof C.marker=="number"?C.marker:h(fe,{shape:C.marker}):we;return{...re,value:C.value,disabled:C.disabled,"data-step-state":C.state,tone:Se,tooltip:A(ve,{children:[C.label,C.hint!=null&&A(ve,{children:[" \u2014 ",C.hint]})]}),className:G,style:U,children:A(ve,{children:[h("a-step-marker",{"aria-hidden":"true",children:Ne}),A("a-step-desc",{children:[h("a-tab-label",{children:C.label}),C.hint!=null&&h("a-step-hint",{children:C.hint})]})]})}}),Y=t.findIndex(C=>C.value===O),Z=m==="vertical",$=g!=null&&g!==!1,B=Z&&$,le=(Y>=0?Y:t.length-1)+2,te=B?{...y,"--steps-panel-row":le}:y;return h("a-steps",{class:v,style:te,id:w,...T,"data-orientation":Z?"vertical":void 0,children:h(wd,{options:R,value:O,onStateChange:M,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,size:p,orientation:m,fill:b,priority:c,noslide:!0,disabled:f,"data-steps":"",children:g})})};var wy=({value:t,children:e,hideMode:n,className:r,style:a,...o})=>h("a-tabpanel",{value:t,role:"tabpanel","hide-mode":n==="visibility"?"visibility":void 0,class:r,style:a,...o,children:e});var ky=new Set(["top","right","bottom","left"]),Ey=({header:t,footer:e,position:n,closable:r,persistent:a,round:o,open:i,defaultOpen:s,name:l,onStateChange:c,className:d,style:u,children:p,...m})=>{let b=i!==void 0,f=typeof o=="string"&&ky.has(o)?o:void 0;return A("a-dialog",{state:b?i?"open":"closed":void 0,"default-state":!b&&s?"open":void 0,position:n&&n!=="center"?n:void 0,persistent:a?"":void 0,round:f??K(o),name:b?void 0:l,onstatechange:c?g=>{let{event:v,detail:y,isOwn:w}=oe(g);w&&y&&c(v,{next:y.next==="open",prev:y.prev==="open"})}:void 0,class:d,style:ee(f?void 0:o,"--dialog-round",u),...m,children:[r!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(me,{priority:"tertiary",size:"large",icon:"x","aria-label":"Close","data-custom-event":"closerequest"})}),t!=null&&h("div",{slot:"header",children:t}),p,e!=null&&h("span",{slot:"footer",style:{display:"contents"},children:e})]})};var Cy=({header:t,subtitle:e,icon:n,footer:r,media:a,mediaPosition:o,tone:i,priority:s,size:l,selected:c,loading:d,round:u,href:p,target:m,rel:b,ping:f,className:g,style:v,children:y,...w})=>{let T=X(i),k=ee(u,"--card-round",F(T,"--card-tone-source",v)),L=l==="small"?5:l==="large"?3:4;return A("a-card",{tone:T,priority:s&&s!=="primary"?s:void 0,size:l&&l!=="medium"?l:void 0,"media-position":o&&o!=="top"?o:void 0,selected:c?"":void 0,loading:d?"":void 0,round:K(u),href:p,target:p?m:void 0,rel:p?b:void 0,ping:p?f:void 0,class:g,style:k,...w,children:[a!=null&&h("div",{slot:"media",children:a}),n!=null&&(typeof n=="string"?h("a-card-icon-chip",{slot:"icon",children:h(fe,{shape:n})}):h("div",{slot:"icon",children:n})),t!=null&&(typeof t=="string"||typeof t=="number"?h(sd,{slot:"header",level:L,tone:T,children:t}):h("div",{slot:"header",children:t})),e!=null&&h(Xi,{slot:"header",size:"small",priority:"tertiary",tone:T,children:e}),typeof y=="string"||typeof y=="number"?h(Xi,{priority:"secondary",tone:T,size:l,children:y}):y,r!=null&&h("span",{slot:"footer",style:{display:"contents"},children:r})]})};var kd=({message:t,actions:e,tone:n,align:r,round:a,closable:o,role:i="status",dismissed:s,defaultDismissed:l,onDismiss:c,className:d,style:u,children:p,...m})=>{let b=s!=null,f=ee(a,"--banner-round",F(n,"--banner-tone-source",u)),g=t==null?null:typeof t=="string"||typeof t=="number"?h("a-banner-message",{slot:"message",children:t}):h("span",{slot:"message",style:{display:"contents"},children:t});return A("a-banner",{state:b?s?"closed":"open":void 0,"default-state":b?void 0:l?"closed":"open",tone:X(n),align:r==="center"?"center":void 0,round:K(a),role:i,onstatechange:c?v=>{let{detail:y,isOwn:w}=oe(v);w&&y?.next==="closed"&&c()}:void 0,class:d,style:f,...m,children:[g,p,e!=null&&h("span",{"data-anta-banner-actions-wrapper":"",slot:"actions",style:{display:"contents"},children:e}),o!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(me,{priority:"quaternary",icon:"x",round:a,tone:n,"aria-label":"Dismiss","data-custom-event":"dismissrequest"})})]})};var Sy=({entry:t,store:e})=>{let n=Ue(()=>t.render(t.id),[t.id,t.rev]),r=typeof Node<"u"&&n instanceof Node,a=typeof n=="string"||typeof n=="number",o={slot:t.placement,duration:t.duration,leaving:t.leaving?"":void 0,rev:t.rev,role:t.politeness==="assertive"?"alert":t.politeness==="polite"?"status":void 0,ondismiss:()=>e.remove(t.id)};return r?h("a-toast",{...o,content:n}):a?h("a-toast",{...o,children:h(kd,{round:!0,message:n,dismissed:!1,onDismiss:()=>e.dismiss(t.id)})}):h("a-toast",{...o,children:n})},Ay=({toaster:t,label:e="Notifications",className:n,style:r,children:a,...o})=>{let i=t??Kf(),s=Od(i.subscribe,i.getSnapshot,i.getServerSnapshot);return h("a-toaster",{role:"region","aria-label":e,class:n,style:r,...o,children:s.map(l=>h(Sy,{entry:l,store:i},l.id))})},Ty,Kf=()=>Ty??=$i(),Xf=Ay;Object.defineProperty(Xf,"manager",{get:Kf,enumerable:!0});export{Bx as Avatar,kd as Banner,Rx as Box,Yx as Breadcrumbs,me as Button,ld as ButtonCopy,gd as Calendar,_x as Capture,Cy as Card,Kx as Checkbox,Nn as DEFAULT_CONFIG,Ey as Dialog,Qx as Expander,Ux as ICON_SHAPES,$x as ICON_SYNONYMS,fe as Icon,zt as Input,my as InputAutocomplete,py as InputDate,xd as InputTime,od as Loader,je as Menu,Qr as MenuGroup,Ce as MenuItem,dd as MenuItemCopy,In as MenuSeparator,Fx as Panel,Lx as Progress,fy as RadioGroup,vy as Select,xy as SelectFaceted,iy as Slider,yy as Steps,Jx as Switch,wy as TabPanel,wd as Tabs,Ji as Tag,Xi as Text,sd as Title,Xf as Toaster,Ot as Tooltip,ws as avatarToSvg,pd as buildMonth,Dn as clampDate,fs as colorLightness,ig as configure,$i as createToaster,ns as dateFormatPattern,fd as dateTimeFormatPattern,ud as firstDayOfWeek,rs as formatDateInput,bd as formatDateTimeInput,vs as getInitials,Zf as getWeekdays,jd as hasFigure,Fd as hashSeed,hd as isOutOfRange,qd as maxChroma,Hd as mulberry32,co as oklchString,gy as optionsWithSelection,to as parseDateInput,as as parseDateTimeInput,Ye as parseISODate,Yf as parseTimeInput,ys as resolveAvatar,Vd as rngFromSeed,no as usesHour12};
|
|
1278
|
+
`;function ig(){typeof customElements>"u"||customElements.get("a-toast")||customElements.define("a-toast",os)}ig();var vy=({seed:t,name:e,src:n,size:r,badge:a,round:o,generator:i,className:s,style:l,...c})=>{let d=typeof r=="number",u=d?tt(r,"--avatar-size",l):l,m=ne(o,"--avatar-radius",u),p=_(a,"--avatar-badge-tone-source",m);return h("a-avatar",{seed:t,name:e,src:n,size:!d&&r&&r!=="medium"?r:void 0,badge:a,round:X(o),config:i?JSON.stringify(i):void 0,role:e?"img":void 0,"aria-label":e||void 0,"aria-hidden":e?void 0:"true",class:s,style:p,...c})};var xy=({value:t,max:e=100,tone:n,size:r,round:a,label:o,hint:i,className:s,style:l,children:c,...d})=>{let u=t==null||t===!1,m=typeof t=="number"?t:0,p=e>0?Math.round(Math.min(100,Math.max(0,m/e*100))):0,b=e>0?Math.min(e,Math.max(0,m)):0,f=[o,!u&&`${p}%`,i].filter(Boolean).join(" \xB7 ")||(u?"Loading":void 0);return h("a-progress",{value:u?!1:m,max:e,tone:Q(n),size:r&&r!=="medium"?r:void 0,round:X(a),role:"progressbar","aria-valuenow":u?void 0:b,"aria-valuemin":u?void 0:0,"aria-valuemax":u?void 0:e,"aria-label":f,class:s,style:ne(a,"--progress-round",_(n,"--progress-tone-source",l)),...d,children:Hd(c)?c:T("a-progress-label",{children:[!u&&T("a-progress-number",{children:[p,"%"]}),o!=null&&h("a-progress-text",{children:o}),i!=null&&h("a-progress-hint",{children:i})]})})};var hd=({tone:t,value:e,max:n=100,size:r,speed:a,label:o,className:i,style:s,...l})=>{let c=typeof e=="number"&&Number.isFinite(e),d=Number.isFinite(n)&&n>0?n:100,u=c?Math.min(d,Math.max(0,e)):void 0,m=u!=null?u/d*100:void 0,p={...s,...r!=null?{"--loader-size":`${r}px`}:{},...!c&&a!=null&&Number.isFinite(a)&&a>0?{"--loader-speed":`${a}s`}:{},...m!=null?{"--loader-value":`${m}%`}:{}},b=o!=null?{role:"progressbar","aria-label":o,"aria-valuenow":c?u:void 0,"aria-valuemin":c?0:void 0,"aria-valuemax":c?d:void 0}:{"aria-hidden":"true"};return h("a-loader",{tone:Q(t),...c?{value:u}:{},class:i,style:p,...b,...l})};var ct=({delay:t,placement:e,round:n,follow:r,interactive:a,truncatedOnly:o,truncatedSelector:i,className:s,style:l,children:c,...d})=>h("a-tooltip",{delay:t!=null?String(t):void 0,placement:e==="top"||e==="left"?e:void 0,round:X(n),follow:r?"":void 0,interactive:a?"":void 0,"truncated-only":o?"":void 0,"truncated-selector":i||void 0,class:s,style:ne(n,"--tooltip-round",l),...d,children:c});var is=({priority:t,tone:e,size:n,inline:r,truncate:a,expandable:o,collapsible:i,className:s,style:l,children:c,...d})=>{let u=uo(a),m=Q(e),p=_(m,"--text-tone-source",u!=null?{...l,"--line-clamp":u}:l),b=o&&u!=null;return T("a-text",{priority:t,tone:m,size:n,inline:r?"":void 0,truncate:u!=null?String(u):void 0,expandable:b?"":void 0,collapsible:b&&i?"":void 0,class:s,style:p,...d,children:[c,u!=null&&!b&&h(ct,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};function yy(t,e,n){let r=[...new Set(t==null?[]:typeof t=="string"?[t]:t)],{fields:a,context:o}=wo(r.join(" ")||null);return e!=null&&a.size===0&&r.push("size"),n!=null&&!o&&r.push("context"),r.join(" ")||void 0}var wy=({display:t,round:e,gap:n,padding:r,margin:a,observe:o,throttle:i,fade:s,fadeSize:l,onMeasureChange:c,onContextChange:d,className:u,style:m,children:p,...b})=>{let f=ne(e,"--box-round",m);return f=tt(n,"--box-gap",f),f=tt(r,"--box-padding",f),f=tt(a,"--box-margin",f),f=tt(s?l:void 0,"--box-fade-size",f),h("a-box",{display:t==="block"?void 0:t,round:X(e),gap:n!=null?"":void 0,padding:r!=null?"":void 0,margin:a!=null?"":void 0,observe:yy(o,c,d),throttle:i,fade:s?"":void 0,"fade-size":s&&l!=null?pr(l):void 0,onmeasurechange:_n(c),oncontextchange:_n(d),class:u,style:f,...b,children:p})};function pd(t){if(!(t===void 0||t===!1))return t===!0?"":["up","down","left","right"].filter(e=>t[e]).join(" ")||"none"}function sg(t){if(t)return{"wheel-delay":t.delay,"wheel-tolerance":t.tolerance,"wheel-reset-on-move":t.resetOnMove?"":void 0}}function lg(t){if(t)return t===!0?{"pointer-capture":""}:{"pointer-capture":t.pointerTypes?.join(" ")||(t.pointerTypes?"none":""),"pointer-buttons":t.buttons?.join(" ")||(t.buttons?"none":void 0),"pointer-threshold":t.threshold,"pointer-modifier":t.modifier,"pointer-include-interactive":t.includeInteractive?"":void 0}}function cg(t){if(!t)return;let e=t===!0?{}:t,n=typeof e.inertia=="object"?e.inertia:void 0;return{pan:e.axis??"both","pan-pointer-types":e.pointerTypes?.join(" ")||(e.pointerTypes?"none":void 0),"pan-threshold":e.threshold,"pan-directions":e.directions===!1?"none":pd(e.directions),"pan-inertia":e.inertia?"":void 0,"pan-time-constant":n?.timeConstant,"pan-min-velocity":n?.minVelocity}}var ky=({wheelCapture:t,wheelActivation:e,wheelModifier:n,wheelSettle:r,onWheelInput:a,pointerCapture:o,onPointerInput:i,pan:s,onPanInput:l,className:c,children:d,...u})=>h("a-capture",{"wheel-capture":pd(t),"wheel-activation":t?e:void 0,"wheel-modifier":t?n:void 0,...sg(t?r:void 0),...lg(o),...cg(s),onwheelinput:_n(a),onpointerinput:_n(i),onpaninput:_n(l),class:c,...u,children:d});var Ey=({maximized:t,defaultMaximized:e,onStateChange:n,className:r,children:a,...o})=>h("a-panel",{state:t===void 0?void 0:t?"maximized":"normal","default-state":t===void 0&&e?"maximized":void 0,onstatechange:n?i=>{let{event:s,detail:l,isOwn:c}=ie(i);c&&l&&n(s,{next:l.next==="maximized",prev:l.prev==="maximized"})}:void 0,class:r,...o,children:a});var md=({level:t=2,priority:e,tone:n,truncate:r,className:a,style:o,children:i,...s})=>{let l=uo(r),c=Q(n),d=_(c,"--title-tone-source",l!=null?{...o,"--line-clamp":l}:o);return T("a-title",{level:String(t),priority:e,tone:c,truncate:l!=null?String(l):void 0,role:"heading","aria-level":t,class:a,style:d,...s,children:[i,l!=null&&h(ct,{truncatedOnly:!0,"data-anta-text-tooltip":""})]})};var fe=({shape:t,size:e,label:n,className:r,style:a,...o})=>{let i=e!=null?{...a,"--icon-size":`${e}px`}:a,s=n!=null?{role:"img","aria-label":n}:{"aria-hidden":"true"};return h("a-icon",{shape:t,class:r,style:i,...s,...o})};var ss=({icon:t,iconTrailing:e,label:n,value:r,tone:a,priority:o,size:i,allcaps:s,className:l,style:c,children:d,...u})=>{let m=Q(a),p=_(m,"--tag-tone-source",c),b=r!=null,f=t!=null&&n==null&&r==null&&d==null&&e==null;return T("a-tag",{tone:m,"aria-label":f?`${t} tag`:void 0,priority:o&&o!=="secondary"?o:void 0,size:i&&i!=="medium"?i:void 0,allcaps:s?"":void 0,class:l,style:p,...u,children:[t&&h(fe,{shape:t}),n!=null&&(b?h("a-tag-label",{children:n}):h("a-tag-value",{children:n})),b&&h("a-tag-value",{children:r}),d,e&&h(fe,{shape:e})]})};var he=({priority:t,tone:e,underline:n,underlineOnHover:r,icon:a,iconTrailing:o,paddingless:i,label:s,size:l,loading:c,disabled:d,selected:u,round:m,onClick:p,href:b,target:f,rel:g,download:v,ping:x,type:k,form:A,className:C,style:L,children:R,...z})=>{let M=Q(e),N=d||c,Z=ne(m,"--button-round",_(M,"--button-tone-source",L)),U=a!=null&&s==null&&R==null&&o==null,K={role:"button",priority:t,tone:M,underline:n,"underline-on-hover":r?"":void 0,size:l&&l!=="medium"?l:void 0,paddingless:i?"":void 0,round:X(m),loading:c?"":void 0,disabled:d?"":void 0,selected:u?"":void 0,tabIndex:N?-1:0,"aria-disabled":N?"true":void 0,"aria-busy":c?"true":void 0,"aria-pressed":u?"true":void 0,"aria-label":U?a:void 0,class:C,style:Z,onClick:N?void 0:p},P=T(ve,{children:[a&&h("a-icon",{shape:a,"aria-hidden":"true"}),s!=null&&h("a-button-label",{children:s}),co(R,"a-button-label"),o&&h("a-icon",{shape:o,"aria-hidden":"true"})]});if(b!=null){let se={...K,disabled:N||void 0};return h("a",{href:N?void 0:b,"data-anta":"",target:f,rel:g,download:v,ping:x,...se,...z,children:P})}return h("a-button",{type:k,form:A,...K,...z,children:P})};function ls(t){let{copy:e,copyNode:n,copyUrl:r,copyWithUrl:a,onCopyRequest:o,onCopied:i,toast:s,copiedLabel:l}=t;return{copy:e??void 0,"copy-node":n===!0?"":typeof n=="string"?n:void 0,"copy-url":r?"":void 0,"copy-with-url":a?"":void 0,toast:s?"":void 0,"copied-label":l,oncopydone:i?c=>i(ie(c).detail?.ok??!1):void 0,oncopyrequest:o?()=>o():void 0}}function cs(t){return t.copyNode!=null&&t.copyNode!==!1}var fd=({icon:t,iconPlacement:e="leading",copiedLabel:n,tone:r,onCopied:a,onCopyRequest:o,copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,label:d,children:u,"aria-label":m,...p})=>{let b=e==="none"?void 0:t??"copy",{shownIcon:f,shownTone:g,handleCopied:v}=fo(b,r,a),x=e==="trailing"?{iconTrailing:f}:e==="none"?{}:{icon:f},k=d!=null||u!=null,A=ls({copy:i,copyNode:s,copyUrl:l,copyWithUrl:c,onCopyRequest:o,onCopied:v,toast:e==="none",copiedLabel:n});return T(he,{...x,label:d,tone:e==="none"?r:g,"aria-label":m??(k?void 0:"Copy"),"data-copy-node-button":cs({copyNode:s})?"":void 0,...p,children:[u,h("a-copy",{...A})]})};var qe=({placement:t,context:e,coord:n,nohover:r,offset:a,autoWidth:o,inset:i,open:s,onStateChange:l,round:c,stopPropagation:d,role:u="menu",className:m,style:p,children:b,...f})=>h("a-menu",{placement:t&&t!=="bottom-start"?t:void 0,context:e?"":void 0,coord:n?"":void 0,nohover:r?"":void 0,offset:a!=null?String(a):void 0,autowidth:o?"":void 0,state:s===void 0?void 0:s?"open":"closed",onstatechange:l?g=>{let{event:v,detail:x,isOwn:k}=ie(g);k&&x&&l(v,{next:x.next==="open",prev:x.prev==="open"})}:void 0,round:X(c),"stop-propagation":d===void 0||d===!1?void 0:d===!0?"":Array.isArray(d)?d.join(" "):d,role:u,"aria-orientation":u==="menu"||u==="listbox"?"vertical":void 0,class:m,style:tt(i,"--menu-padding",ne(c,"--menu-round",p)),...f,children:b});var bd={"\u2318":"Meta",cmd:"Meta",command:"Meta",win:"Meta",super:"Meta","\u2303":"Control",ctrl:"Control",control:"Control","\u2325":"Alt",alt:"Alt",opt:"Alt",option:"Alt","\u21E7":"Shift",shift:"Shift","\u21B5":"Enter","\u23CE":"Enter",enter:"Enter",return:"Enter","\u232B":"Backspace",backspace:"Backspace","\u2326":"Delete",del:"Delete",delete:"Delete","\u238B":"Escape",esc:"Escape",escape:"Escape","\u21E5":"Tab",tab:"Tab","\u2423":"Space",space:"Space","\u2191":"ArrowUp","\u2193":"ArrowDown","\u2190":"ArrowLeft","\u2192":"ArrowRight","\u21DE":"PageUp","\u21DF":"PageDown","\u2196":"Home","\u2198":"End"};function Cy(t){let e=[],n="",r=()=>{n&&(e.push(bd[n.toLowerCase()]??(n.length===1?n.toUpperCase():n)),n="")};for(let a of t)bd[a]?(r(),e.push(bd[a])):a==="+"?r():n+=a;return r(),e.length?e.join("+"):void 0}function Sy(t){let e=t.trim().replace(/\s*\+\s*/g,"+").split(/\s+/).map(Cy).filter(n=>n!==void 0);return e.length?e.join(" "):void 0}var Se=({icon:t,label:e,hint:n,kbd:r,iconTrailing:a,disabled:o,selected:i,selectionIndicator:s,indeterminate:l,indicator:c,tone:d,toneScope:u,submenu:m,value:p,onSelect:b,href:f,target:g,rel:v,download:x,ping:k,role:A,className:C,style:L,children:R,...z})=>{let M=t,N=s==="checkbox"||s==="radio"||s==="check"||s==="switch",Z=s==="checkbox"||s==="switch"?"menuitemcheckbox":s==="radio"||s==="check"?"menuitemradio":"menuitem",U=N?s==="checkbox"&&l?"mixed":i?"true":"false":void 0,K=i&&(s===void 0||s==="check"),P=u==="selected"&&!i?void 0:d,se=Q(P),re=s==="switch"?{"data-menu-open":""}:{},E=z["aria-keyshortcuts"],G=r?Sy(r):void 0,$=r?h("kbd",{"aria-hidden":E??G?"true":void 0,children:r}):null,pe=e!=null&&(n!=null?T("a-menu-item-text",{children:[h("a-menu-item-label",{children:e}),h("a-menu-item-hint",{children:n})]}):h("a-menu-item-label",{children:e}));if(f!=null){let J={"data-anta-menu-item":"",role:A??"menuitem",href:o?void 0:f,target:g,rel:v,download:x===!0?"":x||void 0,ping:k,tabIndex:o?-1:0,"aria-disabled":o?"true":void 0,"aria-current":i?"true":void 0,"aria-keyshortcuts":G,tone:se,style:_(P,"--menu-item-tone-source",L),onClick:b&&!o?be=>b(be,{value:p,label:e}):void 0,class:C};return T("a",{...J,...z,children:[t&&h("a-icon",{shape:t,"aria-hidden":"true"}),pe,R,$,a&&h("a-icon",{shape:a,"aria-hidden":"true"})]})}return T("a-menu-item",{role:A??Z,tabIndex:0,disabled:o?"":void 0,selected:K?"":void 0,"aria-checked":U,tone:se,style:_(P,"--menu-item-tone-source",L),submenu:m?"":void 0,"aria-haspopup":m?"menu":void 0,"aria-disabled":o?"true":void 0,"aria-keyshortcuts":G,onmenuselect:b?J=>b(J,{value:p,label:e}):void 0,class:C,...z,...re,children:[c!=null?h("span",{"aria-hidden":"true","data-indicator":"",style:{flex:"none",display:"inline-flex",alignItems:"center",minHeight:"1lh",pointerEvents:"none"},children:c}):s==="checkbox"?h("a-checkbox",{"aria-hidden":"true",state:l?"indeterminate":i?"checked":"unchecked",tone:se,style:_(P,"--checkbox-tone-source")}):s==="radio"?h("a-radio",{"aria-hidden":"true",selected:!!i,tone:se,style:_(P,"--radio-tone-source")}):null,M&&h("a-icon",{shape:M,"aria-hidden":"true"}),pe,R,$,s==="switch"&&c==null&&h("a-switch",{"data-menu-item-switch":"","aria-hidden":"true",tabIndex:-1,state:i?"checked":"unchecked",disabled:o?"":void 0,size:"small",tone:se,style:_(P,"--switch-tone-source",_(P,"--switch-off-tone-source"))}),(()=>{let J=m?a??"chevron-right":a;return!m&&!a&&s==="check"&&c==null&&(J=i?"check":"blank"),J?h("a-icon",{shape:J,"aria-hidden":"true"}):null})()]})};var gd=({label:t="Copy",icon:e="copy",iconPlacement:n="leading",copiedLabel:r,tone:a,onCopied:o,onCopyRequest:i,copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,children:u,...m})=>{let p=n==="none"?void 0:e,{shownIcon:b,shownTone:f,handleCopied:g}=fo(p,a,o),v=n==="trailing"?{iconTrailing:b}:n==="none"?{}:{icon:b},x=ls({copy:s,copyNode:l,copyUrl:c,copyWithUrl:d,onCopyRequest:i,onCopied:g,toast:n==="none",copiedLabel:r});return T(Se,{label:t,tone:f,...v,"data-menu-open":"","data-copy-node-button":cs({copyNode:l})?"":void 0,...m,children:[u,h("a-copy",{...x})]})};var Ty=new Set(["\u2192","/","\u2022","\u25B8"]);function dg(t){return"copy"in t||"copyNode"in t||"copyUrl"in t}function Ay(t,e,n){if(e==null||!Number.isFinite(e))return t.map(s=>({kind:"item",item:s}));let r=Math.max(1,Math.floor(e));if(t.length<=r)return t.map(s=>({kind:"item",item:s}));let a=Math.min(Math.max(0,Number.isFinite(n)?Math.floor(n):0),r-1),o=r-a,i=t.slice(a,t.length-o);return[...t.slice(0,a).map(s=>({kind:"item",item:s})),{kind:"overflow",items:i},...t.slice(t.length-o).map(s=>({kind:"item",item:s}))]}function ug(t){return t.current?{"aria-current":"page"}:{}}function My(t,e,n,r,a,o,i){let{label:s,current:l,...c}=t,d=ug(t);if(dg(t)){let m={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return h(fd,{...m,children:s},i)}let u={...c,priority:e,size:n,underline:r,underlineOnHover:a,paddingless:o,...d};return h(he,{...u,children:s},i)}function Iy(t,e){let{label:n,current:r,onClick:a,...o}=t,i=ug(t);return dg(t)?h(gd,{...o,label:n,onSelect:a,...i},e):h(Se,{...o,label:n,onSelect:a,...i},e)}var Dy=({items:t,priority:e="quaternary",size:n="medium",separator:r="chevron-right",maxItems:a,itemsBeforeCollapse:o=0,moreLabel:i="Show more breadcrumbs",underline:s,underlineOnHover:l,paddingless:c,className:d,style:u,"aria-label":m,...p})=>{let b=Ay(t,a,o),f=Ty.has(r),g=f?r:h(fe,{shape:r});return h("a-breadcrumbs",{role:"navigation","aria-label":m??"Breadcrumb","data-size":n==="medium"?void 0:n,"data-paddingless":c?"":void 0,"data-separator-icon":f?void 0:"",class:d,style:u,...p,children:b.flatMap((v,x)=>{let k=v.kind==="overflow"?[h(he,{priority:e,size:n,paddingless:c,icon:"more","aria-label":i,"aria-haspopup":"menu"},`more-${x}`),h(qe,{autoWidth:!0,children:v.items.map((A,C)=>Iy(A,C))},`menu-${x}`)]:[My(v.item,e,n,s,l,c,x)];return x<b.length-1&&k.push(h("a-breadcrumb-separator",{"aria-hidden":"true",children:g},`separator-${x}`)),k})})};var Oy=["arrow-left-to-line","arrow-left","arrow-narrow-down","arrow-narrow-up-down","arrow-narrow-up","arrow-right","arrow-top-right","asterisk","blank","book-open","braces","bug","calendar-days","calendar","case-sensitive","chat","check","chevron-down","chevron-left","chevron-right","chevron-up","chevrons-right","circle-check","circle-dot","circle-large","circle-small-solid","circle-user","circle","click","clock","cloud-upload","columns-3-cog","copy","corner-down-right","cube","dollar-sign","dots-vertical","download","edit","external-link","eye-closed","eye","file-down","file","filter-x","filter","folder-close","folder-open","folder-tree","hat-glasses","heart-handshake","heart","history-tree","history","home","hourglass","info","link","list-collapse","maximize","megaphone","menu","minimize","minus","moon","more","move-horizontal","not-equal","play","plus","pointer","presentation","refresh-ccw-dot","refresh","regex","repeat","rotate-ccw","rss","runs-history","scroll-text","search-check","search","send","settings","share","sparkles","square-check-big","square-menu","sun","swatch-book","table-2","tag","text-cursor-input","text-initial","timer","toggle-right","trash","view","warning-diamond","warning-triangle","webhook","workflow","x"],Py={"columns-3-cog":["columns","table","settings","configure","fields","visibility"],blank:["spacer","empty","placeholder","space","none"],"warning-diamond":["error","invalid","alert","danger"],"swatch-book":["palette","color","swatch","paint","design"],"hat-glasses":["accessibility","vision","disguise","person"],"heart-handshake":["credits","thanks","agreement","deal","partnership"],heart:["like","favorite","love","wishlist"],hourglass:["progress","time","wait","loading","timer"],"text-initial":["text","typography","letter","a"],"chevron-down":["arrow","expand","open","down"],"chevron-up":["arrow","collapse","close","up"],"chevron-left":["arrow","back","previous"],"chevron-right":["arrow","forward","next"],"chevrons-right":["skip","fast forward"],"arrow-narrow-down":["download","fall","down"],"arrow-narrow-up":["upload","rise","up"],"arrow-left":["back","previous","prev"],"arrow-right":["forward","next"],"arrow-narrow-up-down":["sort","swap","transfer","reorder"],"arrow-top-right":["external","open","leave"],"arrow-left-to-line":["dock","snap","align"],"move-horizontal":["resize","swap","horizontal"],"external-link":["open","link","share","outbound"],check:["tick","ok","done","confirm","approve"],"dollar-sign":["currency","money","payment"],"circle-check":["success","ok","done"],"circle-user":["avatar","person","account","contact","profile"],x:["close","cancel","dismiss","remove","no"],plus:["add","new","create"],minus:["remove","subtract"],menu:["hamburger","list","more"],"dots-vertical":["more","kebab","options"],search:["find","magnify","lookup"],"search-check":["found","validated"],copy:["duplicate","clone"],trash:["delete","remove","bin"],edit:["pencil","modify","rename"],view:["show","display","preview"],click:["tap","press","touch"],send:["submit","share","deliver"],play:["start","run","execute"],refresh:["reload","sync","update"],regex:["pattern","match"],repeat:["loop","retry","rerun"],info:["information","about","i"],"warning-triangle":["alert","danger","caution"],bug:["defect","issue","error"],asterisk:["star","wildcard"],braces:["code","brackets","json"],"case-sensitive":["aA","capitalize","case"],"list-collapse":["list","collapse","expand","items"],"table-2":["table","grid","data","spreadsheet","rows","columns"],"folder-open":["directory","browse"],"folder-close":["directory"],"folder-tree":["hierarchy","structure","tree"],file:["document","page"],"file-down":["download","save"],calendar:["date","schedule"],clock:["time"],timer:["stopwatch","countdown","time"],"toggle-right":["toggle","switch","on","off","boolean"],history:["log","past"],"history-tree":["log","past"],"runs-history":["log","past"],chat:["message","comment","discuss"],presentation:["slides","deck"],"book-open":["read","docs","documentation"],sparkles:["ai","magic","generate"],cube:["box","package"],circle:["dot","point"],"circle-large":["dot","marker"],"not-equal":["neq","different"],"corner-down-right":["branch","indent","return"],rss:["feed","subscribe"],"scroll-text":["log","output","console"],workflow:["pipeline","process","flow"],webhook:["integration","hook"],megaphone:["announcement","broadcast"],maximize:["fullscreen","expand"],minimize:["collapse","shrink"],filter:["sort","narrow"],"filter-x":["clear filter","reset filter","remove filter"],download:["save","import"],"cloud-upload":["save","sync","upload","send","export"],link:["url","href","anchor"],more:["options","extra"],tag:["label","badge","chip"]};var hg=t=>t==="indeterminate"?"indeterminate":t?"checked":"unchecked",pg=t=>t==="indeterminate"?"indeterminate":t==="checked",zy=t=>({checked:!!t?.checked,indeterminate:!!t?.indeterminate,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),By=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,onStateChange:s,onChange:l,onValueChange:c,label:d,hint:u,className:m,style:p,children:b,tabIndex:f,...g})=>{let v=ne(i,"--checkbox-round",_(r,"--checkbox-tone-source",_(r,"--checkbox-off-tone-source",p))),x=g["aria-label"],k=(typeof x=="string"?x:void 0)??d??(typeof b=="string"?b:void 0),A=s?M=>{let{event:N,detail:Z}=ie(M);Z&&s(N,{next:pg(Z.next),prev:pg(Z.prev)})}:void 0,C=l||c?M=>{l?.(M),c?.(M,zy(M.currentTarget))}:void 0,L=t!==void 0?hg(t):void 0,R=t===void 0&&e!==void 0?hg(e):void 0,z=d!=null||b!=null;return T("a-checkbox",{role:"checkbox","aria-disabled":n?"true":void 0,"aria-label":k,...g,state:L,"default-state":R,disabled:n?"":void 0,tone:Q(r),"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:X(i),tabIndex:n?-1:f??0,onstatechange:A,onchange:C,class:m,style:v,children:[z&&T("a-checkbox-label",{children:[d,b]}),u!=null&&h("a-checkbox-hint",{children:u})]})};var Ly=t=>({checked:!!t?.checked,name:t?.getAttribute?.("name")??void 0,value:t?.getAttribute?.("value")??"on"}),Ry=({checked:t,defaultChecked:e,disabled:n,tone:r,toneScope:a,size:o,round:i,labelPosition:s,onStateChange:l,onChange:c,onValueChange:d,label:u,hint:m,className:p,style:b,children:f,tabIndex:g,...v})=>{let x=ne(i,"--switch-round",_(r,"--switch-tone-source",_(r,"--switch-off-tone-source",b))),k=v["aria-label"],A=(typeof k=="string"?k:void 0)??u??(typeof f=="string"?f:void 0),C=l?N=>{let{event:Z,detail:U}=ie(N);U&&l(Z,{next:U.next==="checked",prev:U.prev==="checked"})}:void 0,L=c||d?N=>{c?.(N),d?.(N,Ly(N.currentTarget))}:void 0,R=t===void 0?void 0:t?"checked":"unchecked",z=t===void 0&&e!==void 0?e?"checked":"unchecked":void 0,M=u!=null||f!=null;return T("a-switch",{role:"switch","aria-disabled":n?"true":void 0,"aria-label":A,...v,state:R,"default-state":z,disabled:n?"":void 0,tone:r,"tone-scope":a&&a!=="all"?a:void 0,size:o&&o!=="medium"?o:void 0,round:X(i),"label-position":s&&s!=="end"?s:void 0,tabIndex:n?-1:g??0,onstatechange:C,onchange:L,class:p,style:x,children:[M&&T("a-switch-label",{children:[u,f]}),m!=null&&h("a-switch-hint",{children:m})]})};var zn=({className:t,children:e,...n})=>{let r=!!e&&!(typeof e=="string"&&e.trim()==="");return h("a-menu-separator",{role:r?"status":"separator","aria-live":r?"polite":void 0,class:t,...n,children:r?e:null})};var Jr=({label:t,className:e,children:n,...r})=>T("a-menu-group",{role:"group","aria-label":t,class:e,...r,children:[t!=null&&h("a-menu-group-label",{"aria-hidden":"true",children:t}),n]});var Ny=({title:t,level:e,tone:n,priority:r,outdent:a,actions:o,disabled:i,round:s,open:l,defaultOpen:c,onStateChange:d,className:u,style:m,children:p,...b})=>{let f=l!==void 0,g=ne(s,"--expander-round",_(n,"--expander-tone-source",m)),v=typeof t=="object"&&t!==null?h("span",{slot:"title",style:{display:"contents"},children:t}):h("a-expander-summary",{slot:"title",children:t});return T("a-expander",{state:f?l?"open":"closed":void 0,"default-state":!f&&c?"open":void 0,level:e!=null?String(e):void 0,tone:Q(n),priority:r&&r!=="secondary"?r:void 0,outdent:a?"":void 0,round:X(s),disabled:i?"":void 0,onstatechange:d?x=>{let{event:k,detail:A,isOwn:C}=ie(x);C&&A&&d(k,{next:A.next==="open",prev:A.prev==="open"})}:void 0,class:u,style:g,...b,children:[v,o!=null&&h("span",{slot:"actions",children:o}),h("a-expander-details",{children:p})]})};var sr=t=>t?"":void 0,_y=t=>typeof t=="string"||typeof t=="number",mg=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.getAttribute?.("name")??void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},Fy={email:"email",tel:"tel",url:"url"},Hy={email:"email",tel:"tel",url:"url",number:"numeric",search:"search"},Vy={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},Rt=({label:t,hint:e,status:n,statusIcon:r,tone:a,size:o,round:i,value:s,defaultValue:l,multiline:c,rows:d,maxRows:u,clearable:m,leading:p,trailing:b,type:f,autoComplete:g,inputMode:v,autoFocus:x,name:k,placeholder:A,truncate:C=!0,disabled:L,readOnly:R,button:z,required:M,dimActions:N,spellCheck:Z,maxLength:U,minLength:K,pattern:P,min:se,max:re,step:E,role:G,onInput:$,onChange:pe,onValueChange:J,onClearClick:be,onClearInput:te,children:we,className:Le,style:De,...H})=>{let ge=n&&n!=="neutral"?n:void 0,Xe=r===void 0?ge?Vy[ge]:void 0:r,Je=f==="search",Nt=Je?void 0:f,Qe=p??(Je?h(fe,{shape:"search"}):void 0),Et=Je?m??!0:m;return T("a-input",{size:o&&o!=="medium"?o:void 0,round:X(i),value:s,defaultvalue:l,multiline:sr(c||d!=null),rows:d!=null?String(d):void 0,maxrows:u!=null?String(u):void 0,status:ge,tone:Q(a),type:!c&&d==null?Nt:void 0,name:k,placeholder:A,truncate:sr(C),disabled:sr(L),readonly:sr(R),button:sr(z),required:sr(M),"dim-actions":sr(N),autocomplete:g??(!c&&d==null&&f?Fy[f]:void 0),inputmode:v??(!c&&d==null&&f?Hy[f]:void 0),autofocus:x?!0:void 0,spellcheck:Z!=null?Z?"true":"false":void 0,maxlength:U!=null?String(U):void 0,minlength:K!=null?String(K):void 0,pattern:P,min:se,max:re,step:E,"aria-invalid":n==="critical"?"true":void 0,role:G??(Je?"searchbox":void 0),oninput:$||J?D=>{$?.(D),J?.(D,mg(D))}:void 0,onchange:pe||J?D=>{pe?.(D),J?.(D,mg(D))}:void 0,onclearclick:be?D=>be(ie(D).event):void 0,onclearinput:te?D=>te(ie(D).event):void 0,class:Le,style:ne(i,"--input-round",_(a,"--input-tone-source",De)),...H,children:[t!=null&&(_y(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),Qe!=null&&h("span",{slot:"leading",style:{display:"contents"},children:Qe}),Et&&h("span",{slot:"clear",style:{display:"contents"},children:h(he,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),b!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:b}),e!=null&&T("span",{slot:"hint",style:{display:"contents"},children:[Xe&&h(fe,{shape:Xe,"aria-hidden":"true"}),h("span",{children:e})]}),we]})};var ds=(t,e)=>Number.isFinite(t)?t:e,qy=t=>typeof t=="string"||typeof t=="number",jy=(t,e)=>{let n=ds(t,0);return{min:n,max:Math.max(n,ds(e,100))}},fg=t=>{let e=t?.target??{};return{value:Number(e.value??0),min:Number(e.getAttribute?.("min")??0),max:Number(e.getAttribute?.("max")??100),step:Number(e.getAttribute?.("step")??1),name:e.getAttribute?.("name")??void 0}},Uy=({label:t,value:e,defaultValue:n,min:r,max:a,step:o,name:i,disabled:s,tone:l,thumbTone:c,size:d,trackSize:u,thumbSize:m,thumbFill:p,round:b,valueDisplay:f="end",valuePrefix:g,valueSuffix:v,markers:x,trackClick:k="drag-only",onInput:A,onChange:C,onValueChange:L,onValueCommit:R,className:z,style:M,children:N,tabIndex:Z,...U})=>{let K=pr(u),P=pr(m),se=tt(m,"--anta-slider-thumb-size",tt(u,"--anta-slider-track-size",ne(b,"--slider-round",_(c,"--slider-thumb-tone-source",_(l,"--slider-tone-source",M))))),{min:re,max:E}=jy(r,a),G=ds(o,1)>0?ds(o,1):1,$=U["aria-label"],pe=(typeof $=="string"?$:void 0)??(typeof t=="string"||typeof t=="number"?String(t):void 0),J=f==="inline"&&t==null?"end":f,be=H=>H.value<=re?"0%":H.value>=E?"100%":`calc((100% - var(--anta-slider-thumb-size)) * ${(H.value-re)/(E-re)} + var(--anta-slider-thumb-size) / 2)`,te=H=>H.value<=re?"start":H.value>=E?"end":void 0,we=H=>{let ge={};return Object.assign(ge,{"--slider-marker-position":be(H)}),ge},Le=A||L?H=>{let ge=fg(H);A?.(H),L?.(H,ge)}:void 0,De=C||R?H=>{let ge=fg(H);C?.(H),R?.(H,ge)}:void 0;return T("a-slider",{value:e,defaultvalue:n,min:re,max:E,step:G,name:i,disabled:s?"":void 0,tone:Q(l),"thumb-tone":Q(c),size:d&&d!=="medium"?d:void 0,"track-size":K,"thumb-size":P,"thumb-fill":p?"":void 0,round:X(b),"track-click":k==="jump"?"jump":void 0,"value-display":J==="end"?void 0:J,"value-prefix":g,"value-suffix":v,role:"slider","aria-label":pe,tabIndex:s?-1:Z??0,oninput:Le,onchange:De,class:z,style:se,...U,children:[t!=null&&(qy(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),x?.map((H,ge)=>{let Xe=te(H);return h("span",{slot:"markers",style:we(H),"data-slider-marker-start":Xe==="start"?"":void 0,"data-slider-marker-end":Xe==="end"?"":void 0,children:H.label},`${H.value}-${ge}`)}),N]})};function bg(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(n=bg(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Wy(){for(var t,e,n=0,r="",a=arguments.length;n<a;n++)(t=arguments[n])&&(e=bg(t))&&(r&&(r+=" "),r+=e);return r}var gg=Wy;var Qr=Ae.PlainDate.compare,vg=new Map;function Gt(t,e){let n=`${t}|${JSON.stringify(e)}`,r=vg.get(n);return r||(r=new Intl.DateTimeFormat(t,e),vg.set(n,r)),r}var oo=t=>new Date(Date.UTC(t.year,t.month-1,t.day));function Ye(t){if(!t)return null;try{return Ae.PlainDate.from(t)}catch{return null}}function vd(t){try{let e=new Intl.Locale(t),r=(e.getWeekInfo?.()??e.weekInfo)?.firstDay;if(typeof r=="number"&&r>=1&&r<=7)return r}catch{}return 1}function Bn(t,e,n){return e&&Qr(t,e)<0?e:n&&Qr(t,n)>0?n:t}function xd(t,e,n){return e!=null&&Qr(t,e)<0||n!=null&&Qr(t,n)>0}var Yy=t=>Array.from(t).slice(0,2).join("");function xg(t,e=vd(t)){let n=Ae.PlainDate.from("2021-02-01"),r=n.add({days:(e-n.dayOfWeek+7)%7}),a=Gt(t,{weekday:"short",timeZone:"UTC"}),o=Gt(t,{weekday:"long",timeZone:"UTC"}),i=[];for(let s=0;s<7;s++){let l=r.add({days:s}),c=a.format(oo(l));i.push({short:c,narrow:Yy(c),long:o.format(oo(l)),weekend:l.dayOfWeek===6||l.dayOfWeek===7})}return i}function yd(t){let{anchor:e,locale:n="en-US",min:r=null,max:a=null,selected:o=null,today:i=Ae.Now.plainDateISO(),weeks:s=6}=t,l=vd(n),c=e.year,d=e.month,u=e.with({day:1}),m=(u.dayOfWeek-l+7)%7,p=u.subtract({days:m}),b=Gt(n,{weekday:"long",year:"numeric",month:"long",day:"numeric",timeZone:"UTC"}),f=[];for(let g=0;g<s;g++){let v=[];for(let x=0;x<7;x++){let k=p.add({days:g*7+x});v.push({date:k,iso:k.toString(),day:k.day,weekday:k.dayOfWeek,outside:k.month!==d||k.year!==c,disabled:xd(k,r,a),today:i!=null&&Qr(k,i)===0,selected:o!=null&&Qr(k,o)===0,label:b.format(oo(k))})}f.push(v)}return{year:c,month:d,heading:Gt(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(oo(e)),weekdays:xg(n,l),weeks:f}}var yg=new Date(Date.UTC(2026,5,15)),wd={year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",numberingSystem:"latn"};function Zy(t){try{return Gt(t,wd).formatToParts(yg).filter(e=>e.type==="year"||e.type==="month"||e.type==="day").map(e=>e.type)}catch{return["year","month","day"]}}function us(t){try{return Gt(t,wd).formatToParts(yg).map(e=>e.type==="year"?"YYYY":e.type==="month"?"MM":e.type==="day"?"DD":e.value).join("")}catch{return"YYYY-MM-DD"}}function hs(t,e){return Gt(e,wd).format(oo(t))}function $y(t,e){let n=t.toLowerCase().match(/[^\d\s.,/-]+/g);if(!n)return null;let r=Gt(e,{month:"long",timeZone:"UTC"}),a=Gt(e,{month:"short",timeZone:"UTC"});for(let o=1;o<=12;o++){let i=new Date(Date.UTC(2020,o-1,1)),s=r.format(i).toLowerCase(),l=a.format(i).toLowerCase().replace(/\.$/,"");if(n.some(c=>c===s||c===l||c.length>=3&&s.startsWith(c)))return o}return null}function io(t,e,n={}){let r=u=>xd(u,n.min??null,n.max??null)?null:u,a=(t??"").trim();if(!a)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(a)){let u=Ye(a);return u?r(u):null}let o=Zy(e),i=$y(a,e),s=(a.match(/\d+/g)??[]).map(Number),l,c,d;if(i!=null)if(c=i,s.length===1)d=s[0],l=Ae.Now.plainDateISO().year;else if(s.length>=2){let[u,m]=s;u>31?[l,d]=[u,m]:m>31?[l,d]=[m,u]:[d,l]=[u,m]}else return null;else if(s.length===1){let u=a.replace(/\D/g,"");if(u.length!==8)return null;let m=0,p={};for(let b of o){let f=b==="year"?4:2;p[b]=Number(u.slice(m,m+f)),m+=f}({year:l,month:c,day:d}=p)}else if(s.length===2){let u=o.filter(p=>p!=="year"),m={};u.forEach((p,b)=>m[p]=s[b]),c=m.month,d=m.day,l=Ae.Now.plainDateISO().year}else if(s.length>=3){let u={};o.forEach((m,p)=>u[m]=s[p]),l=u.year,c=u.month,d=u.day}else return null;l!=null&&l<100&&(l=l<70?2e3+l:1900+l);try{return r(Ae.PlainDate.from({year:l,month:c,day:d},{overflow:"reject"}))}catch{return null}}function wg(t){let e=(t??"").trim().toLowerCase();if(!e)return null;let n=null,r=e.match(/([ap])\.?m?\.?$/);r&&(n=r[1]==="p"?"pm":"am",e=e.slice(0,r.index).trim());let a,o;if(/[:.]/.test(e)){let[i,s]=e.split(/[:.]/);a=Number(i),o=Number(s??"0")}else{let i=e.replace(/\D/g,"");if(!i)return null;if(i.length<=2)a=Number(i),o=0;else{let s=i.length-2;a=Number(i.slice(0,s)),o=Number(i.slice(s))}}n==="pm"&&a<12&&(a+=12),n==="am"&&a===12&&(a=0);try{return Ae.PlainTime.from({hour:a,minute:o},{overflow:"reject"})}catch{return null}}function ps(t,e,n={}){let r=(t??"").trim();if(!r)return null;let a=r.match(/\s+(\d{1,2}[:.]\d{1,2}(?:\s*[ap]\.?m?\.?)?|\d{1,2}\s*[ap]\.?m\.?)\s*$/i),o=r,i=null;a&&(i=wg(a[1]),i&&(o=r.slice(0,a.index).trim()));let s=io(o,e,n);return s?s.toPlainDateTime(i??Ae.PlainTime.from("00:00")):null}function so(t){try{let e=Gt(t,{hour:"numeric"}).resolvedOptions().hourCycle;return e==="h11"||e==="h12"}catch{return!1}}function kd(t,e,n=so(e)){let r=hs(t.toPlainDate(),e),a=String(t.minute).padStart(2,"0");if(!n)return`${r} ${String(t.hour).padStart(2,"0")}:${a}`;let o=(t.hour+11)%12+1;return`${r} ${String(o).padStart(2,"0")}:${a} ${t.hour<12?"AM":"PM"}`}function Ed(t,e=so(t)){return`${us(t)} HH:MM${e?" AM":""}`}var Cd=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,focusSignal:l,onStateChange:c,onChange:d,onValueChange:u,className:m,style:p,"aria-label":b,...f})=>{let g=t!==void 0,v=a||(typeof navigator<"u"?navigator.language:"en-US"),x=Ye(n),k=Ye(r),A=Ae.Now.plainDateISO(),[C,L]=W(()=>Ye(e)),R=g?Ye(t):C,[z,M]=W(()=>Bn(Ye(t??e)??A,x,k)),[N,Z]=W(t),U=z;if(t!==N){Z(t);let D=Ye(t);D&&(U=Bn(D,x,k),M(U))}let[K,P]=W(null),[se,re]=W(!1),E=yd({anchor:U,locale:v,min:x,max:k,selected:R,today:A}),G=U.toString(),[$,pe]=W(l);l!==$&&(pe(l),l!==void 0&&P({iso:G,n:l}));let J=x?x.year:A.year-3,be=k?k.year:A.year+3,te=[];for(let D=J;D<=be;D++)te.push(D);let we=Ze(()=>Array.from({length:12},(D,V)=>Ae.PlainDate.from({year:2e3,month:V+1,day:1}).toLocaleString(v,{month:"long"})),[v]),Le=(D,V)=>x!=null&&(D<x.year||D===x.year&&V<x.month)||k!=null&&(D>k.year||D===k.year&&V>k.month),De=D=>{s||M(V=>Bn(V.add({months:D}),x,k))},H=(D,V)=>{s||M(y=>Bn(y.with({year:D,month:V}),x,k))},ge=Ze(()=>{let D=(V,y)=>{let w=y+1,F=V===z.year&&w===z.month;return h(Se,{label:we[y],selected:F,disabled:Le(V,w)||void 0,"data-menu-open":"",onSelect:()=>{H(V,w),re(!1)},children:F&&h("span",{className:"jump-dot","aria-hidden":"true"})},`${V}-${w}`)};return te.length===1?we.map((V,y)=>D(te[0],y)):te.map(V=>T(Se,{submenu:!0,label:String(V),selected:V===z.year,children:[V===z.year&&h("span",{className:"jump-dot","aria-hidden":"true"}),h(qe,{children:we.map((y,w)=>D(V,w))})]},V))},[we,z.year,z.month,J,be,n,r,s]),Xe=D=>{let{event:V,detail:y}=ie(D);if(!y||(c?.(V,y),y.reason==="user"&&(g||V.defaultPrevented)))return;let w=Ye(y.next);g||L(w),M(Bn(w??z,x,k))},Je=D=>{let V="nativeEvent"in D?D.nativeEvent:D;d?.(V),u?.(V,{value:V?.target?.value||null,name:o})},Nt=D=>{if(s)return;let{detail:V}=ie(D),y=Ye(V?.date??null);if(!y)return;let w=Bn(y,x,k);M(w),P(F=>({iso:w.toString(),n:(F?.n??0)+1}))},Qe=s||x!=null&&Ae.PlainDate.compare(z.with({day:1}).subtract({days:1}),x)<0,Et=s||k!=null&&Ae.PlainDate.compare(z.with({day:1}).add({months:1}),k)>0;return T("div",{className:gg("anta-calendar",m),"data-size":i&&i!=="medium"?i:void 0,"aria-disabled":s?"true":void 0,style:p,...f,children:[T("div",{"data-part":"header",children:[h(he,{priority:"tertiary",icon:"chevron-left",size:i,"aria-label":"Previous month",disabled:Qe,onClick:()=>De(-1)}),h(he,{"data-part":"heading",priority:"tertiary",size:i,"aria-live":"polite","aria-label":`${E.heading} \u2014 choose month and year`,disabled:s||Qe&&Et,children:E.heading}),h(qe,{placement:"bottom",open:se,onStateChange:(D,{next:V})=>re(V),children:ge}),h(he,{priority:"tertiary",icon:"chevron-right",size:i,"aria-label":"Next month",disabled:Et,onClick:()=>De(1)})]}),T("a-calendar",{role:"group","aria-label":b??E.heading,name:o,value:g?t:void 0,defaultvalue:g?void 0:e,disabled:s?"":void 0,"data-focus":K?`${K.iso}#${K.n}`:void 0,onstatechange:Xe,onchange:Je,onnavigate:Nt,children:[E.weekdays.map((D,V)=>h("span",{"data-part":"weekday","data-weekend":D.weekend?"":void 0,"aria-hidden":"true",children:D.narrow},`wd${V}`)),E.weeks.flat().map(D=>{let V=D.today&&!D.selected?{priority:"secondary"}:{priority:"tertiary",selected:D.selected,tone:D.selected?"brand":void 0};return T(he,{...V,size:i,disabled:s||D.disabled,tabIndex:D.iso===G?0:-1,"aria-label":D.label,"aria-hidden":D.outside?"true":void 0,"aria-current":D.today?"date":void 0,"data-part":"day-cell","data-date":D.iso,"data-today":D.today?"":void 0,"data-outside":D.outside?"":void 0,children:[D.day,D.today&&h(ct,{children:"Today"})]},D.iso)})]})]})};var Sd=t=>t?"":void 0,Gy=t=>typeof t=="string"||typeof t=="number",kg=t=>{let e=t?.target??{},n=e.value??"";return{value:n,name:e.getAttribute?.("name")??void 0,empty:!n,valid:e.validity?e.validity.valid:void 0,validationMessage:e.validationMessage??""}},Ky={critical:"warning-diamond",warning:"warning-triangle",success:"circle-check",info:"info",brand:"circle-small-solid"},Td=({label:t,hint:e,status:n,statusIcon:r,tone:a,size:o,round:i,value:s,defaultValue:l,locale:c,hour12:d,min:u,max:m,name:p,disabled:b,required:f,icon:g,clearable:v,dimActions:x,trailing:k,autoFocus:A,onValueChange:C,onClearInput:L,children:R,className:z,style:M,...N})=>{let Z=n&&n!=="neutral"?n:void 0,U=r===void 0?Z?Ky[Z]:void 0:r;return T("a-input-time",{size:o&&o!=="medium"?o:void 0,round:X(i),value:s,defaultvalue:l,locale:c,hour12:d===void 0?void 0:d?"true":"false",min:u,max:m,status:Z,tone:Q(a),name:p,disabled:Sd(b),required:Sd(f),"dim-actions":Sd(x),autofocus:A?!0:void 0,"aria-invalid":n==="critical"?"true":void 0,oninput:C?K=>C(K,kg(K)):void 0,onchange:C?K=>C(K,kg(K)):void 0,onclearinput:L?K=>L(ie(K).event):void 0,class:z,style:ne(i,"--input-time-round",_(a,"--input-time-tone-source",M)),...N,children:[t!=null&&(Gy(t)?h("span",{slot:"label",children:t}):h("span",{slot:"label",style:{display:"contents"},children:t})),g!==!1&&h("span",{slot:"leading",style:{display:"contents"},children:h(fe,{shape:g??"clock"})}),v&&h("span",{slot:"clear",style:{display:"contents"},children:h(he,{priority:"tertiary",size:o,round:!!i,icon:"x","aria-label":"Clear","data-custom-event":"clearrequest"})}),k!=null&&h("span",{slot:"trailing",style:{display:"contents"},children:k}),e!=null&&T("span",{slot:"hint",style:{display:"contents"},children:[U&&h(fe,{shape:U,"aria-hidden":"true"}),h("span",{children:e})]}),R]})};var Xy=({value:t,defaultValue:e,min:n,max:r,locale:a,name:o,size:i,disabled:s,label:l,hint:c,placeholder:d,status:u,round:m,placement:p,offset:b,clearable:f,icon:g,time:v,hour12:x,onValueChange:k,className:A,style:C,...L})=>{let R=a||(typeof navigator<"u"?navigator.language:"en-US"),z=Ye(n),M=Ye(r),N=v?x??so(R):!1,Z=Ze(()=>d??(v?Ed(R,N):us(R)),[d,v,R,N]),U=I=>{if(!I)return"";let q=Ye(I.slice(0,10));if(!q)return"";if(!v)return hs(q,R);let Oe=I.length>=16&&I[10]==="T",ae=q.toPlainDateTime(Ae.PlainTime.from(Oe?I.slice(11,16):"00:00"));return kd(ae,R,N)},K=I=>!I||!v?I:I.length<=10?`${I}T00:00`:I.slice(0,16),P=t!==void 0,[se,re]=W(()=>K(e)),E=P?t:se,G=E?E.slice(0,10):"",$=!!E&&E.length>=16&&E[10]==="T",pe=$&&parseInt(E.slice(11,13),10)||0,J=$?E.slice(14,16):"00",[be,te]=W(()=>U(E)),[we,Le]=W(!1),[De,H]=W(!1),[ge,Xe]=W(0),[Je,Nt]=W(E);E!==Je&&(Nt(E),te(U(E)),H(!1));let Qe=I=>{P||re(I||void 0),k?.(I,{value:I,name:o})},Et=I=>`${I}T${String(pe).padStart(2,"0")}:${J}`,D=I=>{H(!1),I===(E??"")?te(U(I)):Qe(I)},V=I=>{let q=I.trim();if(!q)return H(!1),E?Qe(""):te(""),!0;let Oe=v?ps(q,R,{min:z,max:M}):io(q,R,{min:z,max:M});if(!Oe)return H(!0),!1;let ae=v?Oe.toString({smallestUnit:"minute"}):Oe.toString();return D(ae),!0},y=Ze(()=>{let I=be.trim();if(!I)return G;let q=v?ps(I,R,{min:z,max:M}):io(I,R,{min:z,max:M});return q?q.toString().slice(0,10):null},[be,v,R,G,n,r]),[w,F]=W(G);return y!==null&&y!==w&&F(y),T(ve,{children:[h(Rt,{label:l,hint:De?`Unrecognized date. Try ${Z}.`:c,status:De?"critical":u,size:i,round:m,disabled:s,clearable:f,leading:g===!1?void 0:h(fe,{shape:g??"calendar-days"}),value:be,placeholder:Z,inputMode:v?"text":"numeric",autoComplete:"off",role:"combobox","aria-haspopup":"dialog","aria-expanded":we?"true":"false",onInput:I=>{te(I.currentTarget.value),De&&H(!1)},onChange:I=>V(I.currentTarget.value),onKeyDown:I=>{je(I)||((I.key==="ArrowDown"||I.key==="ArrowUp")&&!s&&(I.preventDefault(),Xe(q=>q+1)),I.key==="Enter"&&!s&&(I.preventDefault(),V(I.currentTarget.value)&&Le(!1)))},truncate:!0,className:A,style:C,...L}),h(qe,{role:"dialog","aria-label":v?"Choose date and time":"Choose date",open:we,placement:p??"bottom-start",offset:b,autoWidth:!0,inset:8,onStateChange:(I,{next:q})=>Le(q),children:T("div",{"data-menu-open":"",children:[h(Cd,{value:w,min:n,max:r,locale:a,size:i,disabled:s,focusSignal:ge,onStateChange:(I,{next:q,reason:Oe})=>{if(Oe!=="user")return;let ae=q??"";D(v&&ae?Et(ae):ae),v||Le(!1)}}),v&&T("a-input-date-time-container",{children:[h(Td,{size:i,locale:a,hour12:x,disabled:s,"aria-label":"Time",value:$?`${String(pe).padStart(2,"0")}:${J}`:"",onValueChange:(I,{value:q})=>{if(("nativeEvent"in I?I.nativeEvent:I)?.type!=="change")return;let ae=G||Ae.Now.plainDateISO().toString();Qe(q?`${ae}T${q}`:ae)}}),h(he,{priority:"tertiary",size:i,icon:"check","aria-label":"Done",onClick:()=>Le(!1)})]})]})}),o?h("input",{type:"hidden",name:o,value:E??""}):null]})};var Ln=t=>typeof t=="string"?{value:t,label:t}:t;function ea(t){let e=t.trim();if(!e)return null;let n=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(e.split(/\s+/).map(n).join("\\s+"),"i")}var ta=(t,e)=>!e||[String(t.value),t.label??"",t.hint??""].some(n=>e.test(n)),na=(t,e)=>{if(!e)return t;let n=new RegExp(e.source,"gi"),r=[],a=0,o;for(;(o=n.exec(t))!==null;)o.index>a&&r.push(t.slice(a,o.index)),r.push(h("b",{children:o[0]},r.length)),a=o.index+o[0].length,o[0].length===0&&n.lastIndex++;return r.length===0?t:(a<t.length&&r.push(t.slice(a)),r)};var Jy=t=>{let{suggestions:e,value:n,defaultValue:r,onValueChange:a,onSelect:o,filter:i=!0,...s}=t,l=n!==void 0,[c,d]=W(r??""),u=l?n:c,[m,p]=W(!1),b=Ze(()=>e.map(Ln),[e]),f=typeof i=="function",g=i!==!1&&!f?ea(u):null,v=f?b.filter(C=>i(C,u)):b.filter(C=>ta(C,g)),x=m&&v.length>0,k=C=>{l||d(C),a?.(C)},A=C=>{k(C.value),o?.(C),p(!1)};return T(ve,{children:[h(Rt,{...s,value:u,"data-menu-search":"",role:"combobox","aria-haspopup":"listbox","aria-expanded":x?"true":"false","aria-autocomplete":"list",onFocus:()=>p(!0),onInput:C=>{k(C.currentTarget.value),p(!0)},onKeyDown:C=>{C.key==="Enter"&&!C.defaultPrevented&&p(!1)}}),h(qe,{role:"listbox",open:x,onStateChange:(C,{next:L})=>{p(L)},children:v.map((C,L)=>{let{className:R,style:z,...M}=dt(C,!0);return h(Se,{...M,role:"option",icon:C.icon,label:na(C.label??C.value,g),hint:C.hint?na(C.hint,g):C.hint,tone:C.tone,disabled:C.disabled,value:C.value,onMouseDown:N=>N.preventDefault(),onSelect:()=>A(C),className:R,style:z},`${C.value}-${L}`)})})]})};var Qy=t=>({value:t?.value??null,name:t?.getAttribute?.("name")??void 0}),e1=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,name:l,label:c,hint:d,status:u,tone:m,toneScope:p,size:b,disabled:f,orientation:g,className:v,style:x,...k})=>{let A=e!==void 0,[C,L]=W(n),R=A?e:C,z=new Set;for(let P of t)z.has(P.value)&&console.warn(`[anta] <RadioGroup> duplicate option value ${JSON.stringify(P.value)} \u2014 values must be unique.`),z.add(P.value);let M=xs(),N=xs(),Z=f?void 0:t.find(P=>P.value===R)?.value??t.find(P=>!P.disabled)?.value,U=P=>{let{event:se,detail:re}=ie(P);re&&(r?.(se,re),!A&&(re.reason==="user"&&se.defaultPrevented||L(re.next??void 0)))},K=a||o?P=>{a?.(P),o?.(P,Qy(P.currentTarget))}:void 0;return T("a-radio-group",{role:"radiogroup","aria-disabled":f?"true":void 0,"aria-labelledby":c?M:void 0,"aria-describedby":d?N:void 0,...k,state:A?e:void 0,"default-state":A?void 0:n,name:l,status:u&&u!=="neutral"?u:void 0,tone:Q(m),"tone-scope":p&&p!=="all"?p:void 0,size:b&&b!=="medium"?b:void 0,disabled:f?"":void 0,orientation:g&&g!=="vertical"?g:void 0,onstatechange:U,onchange:K,onfocusin:i,onfocusout:s,class:v,style:_(m,"--radio-tone-source",_(m,"--radio-off-tone-source",x)),children:[c&&h("a-radio-group-label",{id:M,children:c}),d&&h("a-radio-group-hint",{id:N,children:d}),h("a-radio-list",{children:t.map(P=>{let se=f||P.disabled,{className:re,style:E,...G}=dt(P);return T("a-radio",{...G,role:"radio",value:P.value,"aria-disabled":se?"true":void 0,tabIndex:P.value===Z?0:-1,tone:P.tone||void 0,"tone-scope":P.toneScope??(P.tone?p:void 0),size:P.size&&P.size!=="medium"?P.size:void 0,disabled:P.disabled?"":void 0,class:re,style:_(P.tone,"--radio-tone-source",_(P.tone,"--radio-off-tone-source",E)),children:[h("a-radio-label",{children:P.label}),P.hint!=null&&h("a-radio-hint",{children:P.hint})]},P.value)})})]})};function t1(t,e){let n=new Set(e==null?[]:Array.isArray(e)?e:[e]),r=(o,i)=>o===0?"none":o===i?"all":"some",a=o=>o.map(i=>{if(typeof i!="string"&&Array.isArray(i.submenu)){let c=i,d=a(c.submenu),u=d.reduce((p,b)=>p+b.on,0),m=d.reduce((p,b)=>p+b.total,0);return{node:{...c,submenu:d.map(p=>p.node),selectionState:r(u,m)},on:u,total:m}}if(typeof i!="string"&&Array.isArray(i.options)){let c=i,d=a(c.options),u=d.reduce((p,b)=>p+b.on,0),m=d.reduce((p,b)=>p+b.total,0);return{node:{...c,options:d.map(p=>p.node),selectionState:r(u,m)},on:u,total:m}}let s=Ln(i),l=n.has(s.value);return{node:{...s,selected:l},on:l?1:0,total:1}});return a(t).map(o=>o.node)}var n1=t=>{let{options:e,placement:n,offset:r,selection:a,indicator:o,value:i,defaultValue:s,onValueChange:l,placeholder:c,icon:d,leading:u,label:m,hint:p,size:b,status:f,statusIcon:g,round:v,disabled:x,tone:k,toneScope:A,filter:C,selectAll:L=!0,selectAllLabel:R="Select all",clearable:z,clearLabel:M="Clear",renderOption:N,renderIndicator:Z,verbose:U,renderSummary:K,renderTrigger:P,renderEmpty:se,className:re,style:E,...G}=t,$=a==="multiple",pe=f&&f!=="neutral"?`var(--text-2-${f})`:void 0,J=$?"checkbox":o??"none",be=J==="none"?void 0:J,te=l,we=i!==void 0,[Le,De]=W(s),H=we?i:Le,[ge,Xe]=W(!1),[Je,Nt]=W(""),Qe=`${m??G["aria-label"]??"Select"} options`,Et=S=>typeof S=="object"&&Array.isArray(S.submenu),D=S=>typeof S=="object"&&Array.isArray(S.options),V=(S,ce,oe,le)=>{for(let me of S)if(typeof me!="string"&&Et(me))V(me.submenu,me.label,oe||!!me.disabled,le);else if(typeof me!="string"&&D(me))V(me.options,me.label,oe||!!me.disabled,le);else{let Ct=Ln(me);le.push({opt:Ct,disabled:oe||!!Ct.disabled,group:ce})}},y=[];V(e,void 0,!1,y);let w=new Set;for(let S of y){let ce=String(S.opt.value);w.has(ce)&&console.warn(`[anta] <Select> duplicate option value=${JSON.stringify(S.opt.value)} \u2014 values must be unique (compared as strings for row keys).`),w.add(ce)}let F=new Map(y.map(S=>[S.opt.value,S.opt])),I=C!==void 0&&C!==!1,q=Je.trim(),Oe=I&&typeof C!="function"?ea(q):null,ae=S=>typeof C=="function"?C(S,q):ta(S,Oe),cr=typeof C=="function"||I&&!!q?y.filter(S=>ae(S.opt)):y,ra=I&&!!q,et=Array.isArray(H)?H:H!=null?[H]:[],dr=S=>et.includes(S),_t=et.map(S=>F.get(S)).filter(Boolean),ur=y.filter(S=>!S.disabled).map(S=>S.opt.value),fs=$&&ur.length>1&&ur.every(S=>et.includes(S)),bs=S=>S.label??String(S.value),Rn="";if($){let S=_t.length>0?K?.(_t):void 0;if(S!=null&&S!=="")Rn=S;else if(fs)Rn="All";else if(_t.length===1)Rn=bs(_t[0]);else if(_t.length>1){let ce=`${_t.length} selected`;Rn=U?`${ce}: ${_t.map(bs).join(", ")}`:ce}}else if(H!=null){let S=F.get(H);Rn=S?bs(S):""}let Ag=(S,ce)=>{if($){if(L&&ce?.altKey){let me=[S.value];we||De(me),te?.(me,{value:S.value,option:S,selected:!0});return}let oe=et.includes(S.value),le=oe?et.filter(me=>me!==S.value):[...et,S.value];we||De(le),te?.(le,{value:S.value,option:S,selected:!oe})}else we||De(S.value),te?.(S.value,{value:S.value,option:S})},aa=$?cr.filter(S=>!S.disabled).map(S=>S.opt.value):[],Dd=aa.filter(S=>et.includes(S)),lo=aa.length>0&&Dd.length===aa.length,Mg=Dd.length>0&&!lo,Ig=()=>{let S=et.filter(oe=>!aa.includes(oe)),ce=lo?S:[...S,...aa];we||De(ce),te?.(ce,{all:!0,selected:!lo})},Dg=()=>{let S=$?[]:void 0;we||De(S),te?.(S,{all:!0,selected:!1})},gs=(S,ce)=>{let{className:oe,style:le,...me}=dt(S,!0),Ct={value:S.value,selected:dr(S.value),disabled:ce},Kt=N?.(S,Ct),Nn=Z?.(Ct),Pg=!$&&J==="none"?{role:"menuitemradio","aria-checked":dr(S.value)?"true":"false"}:void 0,zd=$&&L&&!ce?ho:void 0,Bd=S.tooltip??zd,zg=S.tooltip==null&&zd!=null;return T(Se,{...me,selectionIndicator:be,...Pg,indicator:Nn??void 0,label:Kt?void 0:na(S.label??String(S.value),Oe),hint:Kt?void 0:S.hint?na(S.hint,Oe):S.hint,icon:Kt?void 0:S.icon,tone:S.tone??k,toneScope:S.toneScope??A,selected:dr(S.value),disabled:ce||void 0,"data-menu-open":$?"":void 0,onSelect:Bg=>Ag(S,Bg),className:oe,style:le,children:[Kt,Bd&&h(ct,{...zg?{delay:po,placement:"left"}:{follow:!0},children:Bd})]},String(S.value))},vs=(S,ce)=>{let oe=[];return S.forEach((le,me)=>{if(typeof le!="string"&&Et(le)){let Kt=ce||!!le.disabled,Nn=vs(le.submenu,Kt);Nn.length&&oe.push(h(Se,{submenu:!0,label:le.label,icon:le.icon,disabled:Kt||void 0,"data-menu-open":$?"":void 0,children:h(qe,{children:Nn})},`sub-${me}-${le.label}`));return}if(typeof le!="string"&&D(le)){let Kt=ce||!!le.disabled,Nn=vs(le.options,Kt);Nn.length&&oe.push(h(Jr,{label:le.label,children:Nn},`grp-${me}-${le.label}`));return}let Ct=Ln(le);typeof C=="function"&&!ae(Ct)||oe.push(gs(Ct,ce||!!Ct.disabled))}),oe},Og=()=>{let S=y.filter(oe=>ae(oe.opt)),ce=[];for(let oe=0;oe<S.length;){let le=S[oe].group;if(le===void 0){ce.push(gs(S[oe].opt,S[oe].disabled)),oe++;continue}let me=[],Ct=oe;for(;oe<S.length&&S[oe].group===le;)me.push(gs(S[oe].opt,S[oe].disabled)),oe++;ce.push(h(Jr,{label:le,children:me},`flat-${Ct}-${le}`))}return ce},Od=T(ve,{children:[P?P({open:ge,value:H,selected:_t,disabled:!!x,icon:d}):T(he,{disabled:x,size:b,round:v,"aria-label":typeof m=="string"||typeof m=="number"?String(m):void 0,"aria-invalid":f==="critical"?"true":void 0,"aria-haspopup":I?"dialog":"menu","aria-expanded":ge?"true":"false",...G,children:[(u??d)&&h("a-select-leading",{"aria-hidden":"true",children:u??h(fe,{shape:d})}),h("a-button-label",{"data-placeholder":Rn?void 0:"",children:Rn||c}),h("a-select-chevron",{open:ge?"":void 0,"aria-hidden":"true",style:pe?{color:pe}:void 0,children:h(fe,{shape:"chevron-down"})})]}),T(qe,{role:I?"dialog":void 0,"aria-label":I?Qe:void 0,placement:n,offset:r,onStateChange:(S,{next:ce})=>{Xe(ce),ce||Nt("")},children:[I&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(Rt,{"data-menu-search":"",size:"small",value:Je,placeholder:"Filter\u2026","aria-label":"Filter options","aria-autocomplete":"list",onInput:S=>Nt(S.currentTarget.value)})}),$&&L&&cr.length>0&&T(ve,{children:[h(Se,{selectionIndicator:"checkbox",selected:lo,indeterminate:Mg,label:R,"data-menu-open":"","data-menu-skip-active":"",onSelect:Ig}),h(zn,{})]}),cr.length===0?se?.({query:q}):ra?Og():vs(e,!1),z&&et.length>0&&T(ve,{children:[h(zn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Se,{icon:"x",label:M,role:I?"button":void 0,"data-menu-open":"",onSelect:Dg})})]})]})]});if(P)return Od;let Pd=g===void 0?f?{brand:"circle-small-solid",info:"info",success:"circle-check",warning:"warning-triangle",critical:"warning-diamond"}[f]:void 0:g;return T("a-select-field",{size:b,status:f,disabled:x?"":void 0,class:re,style:E,children:[m!=null&&h("a-select-label",{children:m}),Od,p!=null&&T("a-select-hint",{children:[Pd&&h(fe,{shape:Pd,"aria-hidden":"true"}),p]})]})};var Ad=t=>{let e=[];for(let n of t)typeof n!="string"&&Array.isArray(n.submenu)?e.push(...Ad(n.submenu)):typeof n!="string"&&Array.isArray(n.options)?e.push(...Ad(n.options)):e.push(Ln(n));return e},ms=t=>t==null||t===""||Array.isArray(t)&&t.length===0,Eg=(t,e)=>ta(t,ea(e)),r1=t=>{let{facets:e,placement:n,offset:r,value:a,defaultValue:o,onValueChange:i,label:s="Filter",icon:l="filter",size:c,priority:d="secondary",disabled:u,tone:m,toneScope:p,searchable:b,searchPlaceholder:f="Filter\u2026",clearable:g=!0,clearAllLabel:v="Clear all",renderTrigger:x,className:k,style:A,...C}=t,L=a!==void 0,[R,z]=W(o??{}),M=L?a:R,[N,Z]=W(!1),[U,K]=W({}),[P,se]=W({});{let y=null,w=U;for(let F of e)F.kind==="text"&&P[F.key]!==M[F.key]&&(y={...y??P,[F.key]:M[F.key]},w={...w,[F.key]:M[F.key]??""});y&&(se(y),K(w))}let[re,E]=W({}),[G,$]=W(""),pe=e.reduce((y,w)=>y+(ms(M[w.key])?0:1),0),J=Ze(()=>new Map(e.map(y=>[y.key,y.kind==="single"||y.kind==="multiple"?Ad(y.options):[]])),[e]),be=(y,w)=>{L||z(y),i?.(y,w)},te=(y,w)=>{let F=ms(w),I={...M};F?delete I[y.key]:I[y.key]=w,be(I,{facet:y.key,kind:y.kind,value:F?void 0:w})},we=()=>be({},{all:!0}),Le=y=>{let w=J.get(y.key)??[];if(!y.filter)return w;let F=re[y.key]??"",I=typeof y.filter=="function"?y.filter:Eg;return w.filter(q=>I(q,F))},De=y=>y.filter?h("a-select-header",{slot:"header","data-menu-open":"",children:h(Rt,{"data-menu-search":"",size:"small",value:re[y.key]??"",placeholder:"Filter\u2026","aria-label":`Filter ${y.label}`,"aria-autocomplete":"list",onInput:w=>E(F=>({...F,[y.key]:w.currentTarget.value}))})}):null,H=(y,w,F="")=>{let{className:I,style:q,...Oe}=dt(w,!0),ae=y.kind==="single"?M[y.key]===w.value:(M[y.key]??[]).includes(w.value),lr=y.renderOption?.(w,{value:w.value,selected:ae,disabled:!!w.disabled}),cr={...Oe,icon:lr?void 0:w.icon,label:lr?void 0:w.label??String(w.value),hint:lr?void 0:w.hint,tone:w.tone??m,toneScope:w.toneScope??p,disabled:w.disabled,className:I,style:q,"data-menu-open":""};if(y.kind==="single"){let ur=M[y.key];return h(Se,{...cr,selectionIndicator:"check",selected:ae,onSelect:()=>te(y,ur===w.value?void 0:w.value),children:lr},`${F}${w.value}`)}let ra=M[y.key]??[],et=y.selectAll!==!1&&!w.disabled,dr=w.tooltip??(et?ho:void 0),_t=w.tooltip==null&&et;return T(Se,{...cr,selectionIndicator:"checkbox",selected:ae,onSelect:ur=>et&&ur?.altKey?te(y,[w.value]):te(y,ra.includes(w.value)?ra.filter(fs=>fs!==w.value):[...ra,w.value]),children:[lr,dr&&h(ct,{..._t?{delay:po,placement:"left"}:{follow:!0},children:dr})]},`${F}${w.value}`)},ge=y=>Le(y).map(w=>H(y,w)),Xe=y=>{let w=M[y.key]??[],F=Le(y),I=F.filter(ae=>!ae.disabled).map(ae=>ae.value),q=I.length>0&&I.every(ae=>w.includes(ae)),Oe=I.some(ae=>w.includes(ae));return T(ve,{children:[y.selectAll!==!1&&F.length>0&&T(ve,{children:[h(Se,{selectionIndicator:"checkbox",selected:q,indeterminate:Oe&&!q,label:y.selectAllLabel??"Select all","data-menu-open":"",onSelect:()=>te(y,q?w.filter(ae=>!I.includes(ae)):[...new Set([...w,...I])])}),h(zn,{})]}),F.map(ae=>H(y,ae))]})},Je=()=>e.filter(w=>w.kind==="single"||w.kind==="multiple").map(w=>{let F=typeof w.filter=="function"?w.filter:Eg;return{facet:w,matched:(J.get(w.key)??[]).filter(I=>F(I,G))}}).filter(w=>w.matched.length>0).map(({facet:w,matched:F})=>h(Jr,{label:w.label,children:F.map(I=>H(w,I,`${w.key}:`))},w.key)),Nt=y=>{let w=M[y.key]??"",F=U[y.key]??w,I=()=>{let q=F.trim()===""?void 0:F;q!==(w||void 0)&&te(y,q)};return h("div",{"data-menu-open":"",style:{padding:"4px"},children:h(Rt,{size:"small",value:F,placeholder:y.placeholder,"aria-label":y.label,onInput:q=>K(Oe=>({...Oe,[y.key]:q.currentTarget.value})),onKeyDown:q=>{q.key==="Enter"&&(q.preventDefault(),I())},onBlur:I})})},Qe=y=>h("div",{"data-menu-open":"",children:y.render({value:M[y.key],onChange:w=>te(y,w),close:()=>Z(!1)})}),Et=y=>{let w=y.kind==="single"||y.kind==="multiple",F=!w||!!y.filter,I=y.kind==="single"?ge(y):y.kind==="multiple"?Xe(y):y.kind==="text"?Nt(y):Qe(y),q=!ms(M[y.key]);return T(qe,{role:F?"dialog":void 0,"aria-label":F?`${y.label} ${w?"options":"editor"}`:void 0,children:[w&&De(y),I,g&&q&&T(ve,{children:[h(zn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Se,{icon:"x",label:"Clear",role:F?"button":void 0,"data-menu-open":"",onSelect:()=>te(y,void 0)})})]})]})},D=y=>{let w=M[y.key];if(ms(w))return null;switch(y.kind){case"single":return(J.get(y.key)??[]).find(I=>I.value===w)?.label??String(w);case"multiple":return String(w.length);case"text":return String(w);case"custom":return y.summary(w)}};return T(ve,{children:[x?x({open:N,value:M,count:pe,disabled:!!u}):h(he,{icon:l,label:s,priority:d,size:c,disabled:u,"aria-haspopup":b?"dialog":"menu","aria-expanded":N?"true":"false",className:k,style:A,...C,children:pe>0&&h(ss,{size:"small",priority:"primary",tone:"brand",children:String(pe)})}),T(qe,{role:b?"dialog":void 0,"aria-label":b?`${s} options`:void 0,placement:n,offset:r,open:N,onStateChange:(y,{next:w})=>{Z(w),w||$("")},children:[b&&h("a-select-header",{slot:"header","data-menu-open":"",children:h(Rt,{"data-menu-search":"",size:"small",value:G,placeholder:f,"aria-label":"Filter all facets","aria-autocomplete":"list",onInput:y=>$(y.currentTarget.value)})}),b&&G.trim()?Je():e.map(y=>T(Se,{submenu:!0,icon:y.icon,label:y.label,"aria-haspopup":y.kind==="text"||y.kind==="custom"||y.filter?"dialog":"menu",children:[(()=>{let w=D(y);return w!=null?h(ss,{size:"small",tone:"brand",children:h("a-select-faceted-summary",{children:w})}):null})(),Et(y)]},y.key)),g&&T(ve,{children:[h(zn,{slot:"footer"}),h("a-select-footer",{slot:"footer",children:h(Se,{icon:"filter-x",label:v,role:b?"button":void 0,disabled:pe===0,"data-menu-open":"",onSelect:we})})]})]})]})};var Md=({children:t,options:e,value:n,defaultValue:r,onStateChange:a,onChange:o,onValueChange:i,onFocus:s,onBlur:l,label:c,priority:d,tone:u,size:m,orientation:p,fill:b,noslide:f,round:g,disabled:v,className:x,style:k,id:A,...C})=>{let L=n!==void 0,[R,z]=W(r),M=L?n:R,N=e??[],Z=new Set;for(let E of N)Z.has(E.value)&&console.warn(`[anta] <Tabs> duplicate option value=${JSON.stringify(E.value)} \u2014 values must be unique.`),Z.add(E.value);let U=E=>{let{event:G,detail:$}=ie(E);$&&(a?.(G,$),!L&&(G.defaultPrevented||z($.next??void 0)))},K=o||i?E=>{o?.(E),i?.(E,{value:E.currentTarget?.value??null})}:void 0,P=p==="vertical",se=M!=null&&N.some(E=>E.value===M)?M:N.find(E=>!v&&!E.disabled)?.value,re=h("a-tabs",{role:"tablist","aria-label":c,"aria-orientation":P?"vertical":void 0,"aria-disabled":v?"true":void 0,state:L?n:void 0,"default-state":L?void 0:r,priority:d&&d!=="primary"?d:void 0,tone:Q(u),size:m&&m!=="medium"?m:void 0,orientation:P?"vertical":void 0,fill:b?"":void 0,noslide:f?"":void 0,round:X(g),disabled:v?"":void 0,onstatechange:U,onchange:K,onfocusin:s,onfocusout:l,class:x,id:A,style:ne(g,"--tabs-round",_(u,"--tabs-tone-source",k)),...C,children:N.map(E=>{let G=v||E.disabled,$=E.value===M,{className:pe,style:J,...be}=dt(E);return T("a-tab",{...be,role:"tab",value:E.value,tone:E.tone||void 0,"aria-disabled":G?"true":void 0,tabIndex:E.value===se?0:-1,disabled:G?"":void 0,round:X(g)??X(E.round),class:pe,style:_(E.tone,"--tabs-tone-source",J),children:[E.icon&&h("a-icon",{shape:E.icon,"aria-hidden":"true"}),co(E.label!=null?E.label:E.children,"a-tab-label"),E.iconTrailing&&h("a-icon",{shape:E.iconTrailing,"aria-hidden":"true"}),E.tooltip!=null&&E.tooltip!==""?h(ct,{truncatedOnly:!0,children:E.tooltip}):null]},E.value)})});return T(ve,{children:[re,t]})};var Cg={incomplete:"circle-large",completed:"check",error:"x"},a1=({options:t,value:e,defaultValue:n,onStateChange:r,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,priority:c="secondary",tone:d,renderMarker:u,size:m,orientation:p,fill:b,disabled:f,children:g,className:v,style:x,id:k,...A})=>{let C=e!==void 0,[L,R]=W(n),z=C?e:L??t[0]?.value,M=(E,G)=>{r?.(E,G),!(C||E.defaultPrevented)&&R(G.next??void 0)},N=t.map(E=>{let{className:G,style:$,...pe}=dt(E),J=E.tone||void 0,be=E.disabled?"neutral":E.state==="error"?"critical":J||d||"neutral",te=u?.(E,{state:E.state,selected:E.value===z,disabled:!!E.disabled}),we=E.disabled?h(fe,{shape:Cg.incomplete}):E.state==="loading"?h(hd,{tone:be}):h(fe,{shape:Cg[E.state]}),Le=te!==void 0?te:E.marker!==void 0?typeof E.marker=="number"?E.marker:h(fe,{shape:E.marker}):we;return{...pe,value:E.value,disabled:E.disabled,"data-step-state":E.state,tone:be,tooltip:T(ve,{children:[E.label,E.hint!=null&&T(ve,{children:[" \u2014 ",E.hint]})]}),className:G,style:$,children:T(ve,{children:[h("a-step-marker",{"aria-hidden":"true",children:Le}),T("a-step-desc",{children:[h("a-tab-label",{children:E.label}),E.hint!=null&&h("a-step-hint",{children:E.hint})]})]})}}),Z=t.findIndex(E=>E.value===z),U=p==="vertical",K=g!=null&&g!==!1,P=U&&K,se=(Z>=0?Z:t.length-1)+2,re=P?{...x,"--steps-panel-row":se}:x;return h("a-steps",{class:v,style:re,id:k,...A,"data-orientation":U?"vertical":void 0,children:h(Md,{options:N,value:z,onStateChange:M,onChange:a,onValueChange:o,onFocus:i,onBlur:s,label:l,size:m,orientation:p,fill:b,priority:c,noslide:!0,disabled:f,"data-steps":"",children:g})})};var o1=({value:t,children:e,hideMode:n,className:r,style:a,...o})=>h("a-tabpanel",{value:t,role:"tabpanel","hide-mode":n==="visibility"?"visibility":void 0,class:r,style:a,...o,children:e});var i1=new Set(["top","right","bottom","left"]),s1=({header:t,footer:e,position:n,closable:r,persistent:a,round:o,open:i,defaultOpen:s,name:l,onStateChange:c,className:d,style:u,children:m,...p})=>{let b=i!==void 0,f=typeof o=="string"&&i1.has(o)?o:void 0;return T("a-dialog",{state:b?i?"open":"closed":void 0,"default-state":!b&&s?"open":void 0,position:n&&n!=="center"?n:void 0,persistent:a?"":void 0,round:f??X(o),name:b?void 0:l,onstatechange:c?g=>{let{event:v,detail:x,isOwn:k}=ie(g);k&&x&&c(v,{next:x.next==="open",prev:x.prev==="open"})}:void 0,class:d,style:ne(f?void 0:o,"--dialog-round",u),...p,children:[r!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(he,{priority:"tertiary",size:"large",icon:"x","aria-label":"Close","data-custom-event":"closerequest"})}),t!=null&&h("div",{slot:"header",children:t}),m,e!=null&&h("span",{slot:"footer",style:{display:"contents"},children:e})]})};var l1=({header:t,subtitle:e,icon:n,footer:r,media:a,mediaPosition:o,tone:i,priority:s,size:l,selected:c,loading:d,round:u,href:m,target:p,rel:b,ping:f,className:g,style:v,children:x,...k})=>{let A=Q(i),C=ne(u,"--card-round",_(A,"--card-tone-source",v)),L=l==="small"?5:l==="large"?3:4;return T("a-card",{tone:A,priority:s&&s!=="primary"?s:void 0,size:l&&l!=="medium"?l:void 0,"media-position":o&&o!=="top"?o:void 0,selected:c?"":void 0,loading:d?"":void 0,round:X(u),href:m,target:m?p:void 0,rel:m?b:void 0,ping:m?f:void 0,class:g,style:C,...k,children:[a!=null&&h("div",{slot:"media",children:a}),n!=null&&(typeof n=="string"?h("a-card-icon-chip",{slot:"icon",children:h(fe,{shape:n})}):h("div",{slot:"icon",children:n})),t!=null&&(typeof t=="string"||typeof t=="number"?h(md,{slot:"header",level:L,tone:A,children:t}):h("div",{slot:"header",children:t})),e!=null&&h(is,{slot:"header",size:"small",priority:"tertiary",tone:A,children:e}),typeof x=="string"||typeof x=="number"?h(is,{priority:"secondary",tone:A,size:l,children:x}):x,r!=null&&h("span",{slot:"footer",style:{display:"contents"},children:r})]})};var Id=({message:t,actions:e,tone:n,align:r,round:a,closable:o,role:i="status",dismissed:s,defaultDismissed:l,onDismiss:c,className:d,style:u,children:m,...p})=>{let b=s!=null,f=ne(a,"--banner-round",_(n,"--banner-tone-source",u)),g=t==null?null:typeof t=="string"||typeof t=="number"?h("a-banner-message",{slot:"message",children:t}):h("span",{slot:"message",style:{display:"contents"},children:t});return T("a-banner",{state:b?s?"closed":"open":void 0,"default-state":b?void 0:l?"closed":"open",tone:Q(n),align:r==="center"?"center":void 0,round:X(a),role:i,onstatechange:c?v=>{let{detail:x,isOwn:k}=ie(v);k&&x?.next==="closed"&&c()}:void 0,class:d,style:f,...p,children:[g,m,e!=null&&h("span",{"data-anta-banner-actions-wrapper":"",slot:"actions",style:{display:"contents"},children:e}),o!==!1&&h("span",{slot:"close",style:{display:"contents"},children:h(he,{priority:"quaternary",icon:"x",round:a,tone:n,"aria-label":"Dismiss","data-custom-event":"dismissrequest"})})]})};var c1=({entry:t,store:e})=>{let n=Ze(()=>t.render(t.id),[t.id,t.rev]),r=typeof Node<"u"&&n instanceof Node,a=typeof n=="string"||typeof n=="number",o={slot:t.placement,duration:t.duration,leaving:t.leaving?"":void 0,rev:t.rev,role:t.politeness==="assertive"?"alert":t.politeness==="polite"?"status":void 0,ondismiss:()=>e.remove(t.id)};return r?h("a-toast",{...o,content:n}):a?h("a-toast",{...o,children:h(Id,{round:!0,message:n,dismissed:!1,onDismiss:()=>e.dismiss(t.id)})}):h("a-toast",{...o,children:n})},d1=({toaster:t,label:e="Notifications",className:n,style:r,children:a,...o})=>{let i=t??Sg(),s=Fd(i.subscribe,i.getSnapshot,i.getServerSnapshot);return h("a-toaster",{role:"region","aria-label":e,class:n,style:r,...o,children:s.map(l=>h(c1,{entry:l,store:i},l.id))})},u1,Sg=()=>u1??=rs(),Tg=d1;Object.defineProperty(Tg,"manager",{get:Sg,enumerable:!0});export{vy as Avatar,Id as Banner,wy as Box,Dy as Breadcrumbs,he as Button,fd as ButtonCopy,Cd as Calendar,ky as Capture,l1 as Card,By as Checkbox,Hn as DEFAULT_CONFIG,s1 as Dialog,Ny as Expander,Oy as ICON_SHAPES,Py as ICON_SYNONYMS,fe as Icon,Rt as Input,Jy as InputAutocomplete,Xy as InputDate,Td as InputTime,hd as Loader,qe as Menu,Jr as MenuGroup,Se as MenuItem,gd as MenuItemCopy,zn as MenuSeparator,Ey as Panel,xy as Progress,e1 as RadioGroup,n1 as Select,r1 as SelectFaceted,Uy as Slider,a1 as Steps,Ry as Switch,o1 as TabPanel,Md as Tabs,ss as Tag,is as Text,md as Title,Tg as Toaster,ct as Tooltip,Ds as avatarToSvg,yd as buildMonth,Bn as clampDate,Ss as colorLightness,Ng as configure,rs as createToaster,us as dateFormatPattern,Ed as dateTimeFormatPattern,vd as firstDayOfWeek,hs as formatDateInput,kd as formatDateTimeInput,As as getInitials,xg as getWeekdays,Kd as hasFigure,Yd as hashSeed,xd as isOutOfRange,Gd as maxChroma,Zd as mulberry32,bo as oklchString,t1 as optionsWithSelection,io as parseDateInput,ps as parseDateTimeInput,Ye as parseISODate,wg as parseTimeInput,Is as resolveAvatar,$d as rngFromSeed,so as usesHour12};
|
|
1270
1279
|
/*! Bundled license information:
|
|
1271
1280
|
|
|
1272
1281
|
tabbable/dist/index.esm.js:
|