@tylertech/forge 3.6.2 → 3.6.3
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/lib.js +2 -2
- package/dist/lib.js.map +2 -2
- package/esm/dialog/dialog-adapter.js +3 -1
- package/esm/dialog/dialog.d.ts +1 -1
- package/esm/dialog/dialog.js +3 -3
- package/esm/field/field.js +1 -1
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/package.json +1 -1
- package/sass/field/_core.slotted.scss +5 -0
- package/sass/field/field.scss +8 -7
package/dist/lib.js
CHANGED
|
@@ -13,7 +13,7 @@ var m5=Object.defineProperty,K6=Object.defineProperties,q6=Object.getOwnProperty
|
|
|
13
13
|
style=${this._image?dr({backgroundImage:`url(${this._image.src})`}):E2}>
|
|
14
14
|
<slot>${t9(this.text,(e=this.letterCount)!=null?e:Ca.numbers.DEFAULT_LETTER_COUNT)}</slot>
|
|
15
15
|
</div>
|
|
16
|
-
`}async _tryLoadImage(){if(this.imageUrl){let e=new Image;e.onload=()=>this._image=e,e.onerror=()=>this._image=void 0,e.src=this.imageUrl}else this._image=void 0}};Ve.styles=oe(J8),s([S1()],Ve.prototype,"text",2),s([S1({type:Number,attribute:"letter-count"})],Ve.prototype,"letterCount",2),s([S1({type:String,attribute:"image-url"})],Ve.prototype,"imageUrl",2),s([ne()],Ve.prototype,"_image",2),Ve=s([Re(z4)],Ve);function ho(){ue(z4,Ve)}var e9=`${b}toolbar`,ac={INVERTED:"inverted"},a9=w({},ac),oc={TOOLBAR:"forge-toolbar"},o9={TOOLBAR:`.${oc.TOOLBAR}`,BEFORE_START:"slot[name=before-start]",START_SLOT:"slot[name=start]",CENTER_SLOT:"slot[name=center]",END_SLOT:"slot[name=end]",AFTER_END:"slot[name=after-end]"},mr={elementName:e9,observedAttributes:ac,attributes:a9,classes:oc,selectors:o9};var r9='<template><div class="forge-toolbar" part="root"><div class="section" part="before-section-start"><slot name="before-start"></slot></div><div class="inner center" part="inner"><div class="section" part="section-start"><slot name="start"></slot><slot></slot></div><div class="section center" part="section-center"><slot name="center"></slot></div><div class="section end" part="section-end"><slot name="end"></slot></div></div><div class="section end" part="after-section-end"><slot name="after-end"></slot></div></div></template>',n9=":host{display:block}:host([hidden]){display:none}.forge-toolbar{--_toolbar-background:var(--forge-toolbar-background, var(--forge-theme-surface, #ffffff));--_toolbar-height:var(--forge-toolbar-height, 56px);--_toolbar-min-height:var(--forge-toolbar-min-height, var(--_toolbar-height));--_toolbar-divider-width:var(--forge-toolbar-divider-width, var(--forge-border-thin, 1px));--_toolbar-divider-style:var(--forge-toolbar-divider-style, solid);--_toolbar-divider-color:var(--forge-toolbar-divider-color, var(--forge-theme-outline, #e0e0e0));--_toolbar-shape:var(--forge-toolbar-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_toolbar-start-start-shape:var(--forge-toolbar-start-start-shape, var(--_toolbar-shape));--_toolbar-start-end-shape:var(--forge-toolbar-start-end-shape, var(--_toolbar-shape));--_toolbar-end-start-shape:var(--forge-toolbar-end-start-shape, 0);--_toolbar-end-end-shape:var(--forge-toolbar-end-end-shape, 0);--_toolbar-padding:var(--forge-toolbar-padding, var(--forge-spacing-medium, 16px));--_toolbar-padding-block:var(--forge-toolbar-padding-block, 0);--_toolbar-padding-inline:var(--forge-toolbar-padding-inline, var(--_toolbar-padding));--_toolbar-columns:var(--forge-toolbar-columns, auto 1fr auto)}.forge-toolbar{display:grid;grid-template-columns:var(--_toolbar-columns);height:var(--_toolbar-height);min-height:var(--_toolbar-min-height);box-sizing:border-box;padding-inline:0;border-block-end-width:var(--_toolbar-divider-width);border-block-end-style:var(--_toolbar-divider-style);border-block-end-color:var(--_toolbar-divider-color);border-start-start-radius:var(--_toolbar-start-start-shape);border-start-end-radius:var(--_toolbar-start-end-shape);border-end-start-radius:var(--_toolbar-end-start-shape);border-end-end-radius:var(--_toolbar-end-end-shape);background:var(--_toolbar-background)}.inner{display:grid;grid-template-columns:var(--_toolbar-columns);padding-inline:var(--_toolbar-padding-inline);padding-block:var(--_toolbar-padding-block);box-sizing:border-box}.section{display:flex;align-items:center;width:100%;box-sizing:border-box}.section.center{justify-content:center}.section.end{justify-content:end}:host([inverted]) .forge-toolbar{--_toolbar-start-start-shape:var(--forge-toolbar-start-start-shape, 0);--_toolbar-start-end-shape:var(--forge-toolbar-start-end-shape, 0);--_toolbar-end-start-shape:var(--_toolbar-shape);--_toolbar-end-end-shape:var(--_toolbar-shape);border-block-end:none;border-block-start-width:var(--_toolbar-divider-width);border-block-start-style:var(--_toolbar-divider-style);border-block-start-color:var(--_toolbar-divider-color)}:host(:is([no-divider],[no-border])) .forge-toolbar{border:none}:host([no-padding]) .forge-toolbar{--_toolbar-padding:var(--forge-toolbar-padding, 0)}:host([auto-height]) .forge-toolbar{--_toolbar-height:var(--forge-toolbar-height, auto)}::slotted(:is(h1,h2,h3,h4,h5,h6,p)){margin:0}",se=class extends M{constructor(){super();this._inverted=!1;H(this,r9,n9)}static get observedAttributes(){return Object.values(mr.observedAttributes)}attributeChangedCallback(e,a,o){switch(e){case mr.observedAttributes.INVERTED:this.inverted=p(o);break}}get inverted(){return this._inverted}set inverted(e){this._inverted!==e&&(this._inverted=e,this.toggleAttribute(mr.attributes.INVERTED,this._inverted))}};se=s([y({name:mr.elementName})],se);function rc(){x(se)}var i9='<template><div class="forge-profile-card" part="root"><div class="info-container"><div class="avatar"><forge-avatar part="avatar"></forge-avatar></div><div class="info-text"><div class="full-name" part="name"></div><div class="email" part="email"></div></div></div><slot></slot><forge-toolbar inverted id="action-toolbar"><forge-button variant="outlined" slot="end" style="display: none" part="profile-button" id="profile-button">Profile</forge-button><forge-button slot="end" part="sign-out-button" id="sign-out-button">Sign out</forge-button></forge-toolbar></div></template>',s9=':host{display:block}:host([hidden]){display:none}.forge-profile-card{--_profile-card-min-width:var(--forge-profile-card-min-width, 360px);--_profile-card-shape:var(--forge-profile-card-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_profile-card-avatar-size:var(--forge-profile-card-avatar-size, 56px)}.forge-profile-card{min-width:var(--_profile-card-min-width);border-radius:var(--_profile-card-shape)}@media (max-width:399px){.forge-profile-card{width:100vw;min-width:unset;overflow:auto}}.forge-profile-card .info-container{display:flex;align-items:center;padding-block:var(--forge-spacing-xsmall,8px);padding-inline:var(--forge-spacing-medium,16px)}.forge-profile-card .avatar{display:flex;align-items:center;padding:var(--forge-spacing-xsmall,8px);margin-inline-end:var(--forge-spacing-medium,16px);--forge-avatar-size:var(--_profile-card-avatar-size)}.forge-profile-card .text{display:flex;flex-direction:column}.forge-profile-card .full-name{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading2-font-size-scale, 1)));font-weight:var(--forge-typography-heading2-font-weight,500);line-height:var(--forge-typography-heading2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading2-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-heading2-letter-spacing, .0125em);text-transform:var(--forge-typography-heading2-text-transform,inherit);text-decoration:var(--forge-typography-heading2-text-decoration,inherit)}.forge-profile-card .email{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-subheading1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-subheading1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-subheading1-font-size-scale, .875)));font-weight:var(--forge-typography-subheading1-font-weight,400);line-height:var(--forge-typography-subheading1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-subheading1-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-subheading1-letter-spacing, normal);text-transform:var(--forge-typography-subheading1-text-transform,inherit);text-decoration:var(--forge-typography-subheading1-text-decoration,inherit);color:var(--forge-theme-text-medium,rgba(0,0,0,.6))}#action-toolbar{--forge-toolbar-padding:8px}#action-toolbar forge-button:not(:last-of-type){margin-inline-end:8px}',F2=class extends M{static get observedAttributes(){return[Y.attributes.FULL_NAME,Y.attributes.EMAIL,Y.attributes.SIGN_OUT,Y.attributes.PROFILE,Y.attributes.SIGN_OUT_TEXT,Y.attributes.PROFILE_TEXT,Y.attributes.AVATAR_TEXT,Y.attributes.AVATAR_ICON,Y.attributes.AVATAR_IMAGE_URL,Y.attributes.AVATAR_LETTER_COUNT]}constructor(){super(),H(this,i9,s9),this._core=new ui(new wi(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case Y.attributes.FULL_NAME:this.fullName=a;break;case Y.attributes.EMAIL:this.email=a;break;case Y.attributes.SIGN_OUT:this.signOut=p(a);break;case Y.attributes.PROFILE:this.profile=p(a);break;case Y.attributes.SIGN_OUT_TEXT:this.signOutText=a;break;case Y.attributes.PROFILE_TEXT:this.profileText=a;break;case Y.attributes.AVATAR_TEXT:this.avatarText=a;break;case Y.attributes.AVATAR_ICON:this.avatarIcon=a;break;case Y.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=a;break;case Y.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=W(a);break}}focus(t){this._core.focus(t)}};ho(),s([v()],F2.prototype,"fullName",2),s([v()],F2.prototype,"email",2),s([v()],F2.prototype,"signOut",2),s([v()],F2.prototype,"profile",2),s([v()],F2.prototype,"signOutText",2),s([v()],F2.prototype,"profileText",2),s([v()],F2.prototype,"avatarText",2),s([v()],F2.prototype,"avatarIcon",2),s([v()],F2.prototype,"avatarImageUrl",2),s([v()],F2.prototype,"avatarLetterCount",2),F2=s([y({name:Y.elementName,dependencies:[se,V2,X]})],F2);function nc(){x(F2)}var l9=`${b}app-bar-profile-button`,v9={FULL_NAME:"full-name",EMAIL:"email",AVATAR_IMAGE_URL:"avatar-image-url",AVATAR_LETTER_COUNT:"avatar-letter-count",AVATAR_TEXT:"avatar-text",AVATAR_ICON:"avatar-icon",SIGN_OUT_BUTTON:"sign-out-button",PROFILE_BUTTON:"profile-button",SIGN_OUT_BUTTON_TEXT:"sign-out-button-text",PROFILE_BUTTON_TEXT:"profile-button-text",OPEN:"open"},h9=["aria-label","aria-labelledby"],_1={elementName:l9,attributes:v9,forwardedAttributes:h9};var Ci=class extends I{constructor(t){super(t)}get popupElement(){return this._popupElement}initialize(){this._avatarElement=Ft(this._component,Ca.elementName),this._iconButtonElement=Ft(this._component,J.elementName);let t=this._iconButtonElement.getAttribute("aria-labelledby");this._forwardObserver=S0(this._component,_1.forwardedAttributes,(e,a)=>{e==="aria-labelledby"&&!a&&(a=t),K(this._iconButtonElement,!!a,e,a!=null?a:void 0)})}destroy(){var t;(t=this._forwardObserver)==null||t.disconnect(),this._forwardObserver=void 0,this._popupElement&&(this._popupElement.remove(),this._popupElement=void 0,this._profileCardElement=void 0)}setClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}openPopup(t,e,a,o,n){var i;return(i=this._popupElement)!=null&&i.isConnected&&this._popupElement.remove(),this._profileCardElement=document.createElement(Y.elementName),this._profileCardElement.fullName=t.fullName,this._profileCardElement.email=t.email,this._profileCardElement.signOut=t.signOut,this._profileCardElement.profile=t.profile,this._profileCardElement.signOutText=t.signOutButtonText,this._profileCardElement.profileText=t.profileButtonText,this._profileCardElement.avatarText=t.avatarText,this._profileCardElement.avatarIcon=t.avatarIcon,this._profileCardElement.avatarImageUrl=t.avatarImageUrl,this._profileCardElement.avatarLetterCount=t.avatarLetterCount,this._profileCardElement.addEventListener(Y.events.PROFILE,()=>a()),this._profileCardElement.addEventListener(Y.events.SIGN_OUT,()=>o()),n&&this._profileCardElement.appendChild(n),this._popupElement=document.createElement("forge-popover"),this._popupElement.anchorElement=this._iconButtonElement,this._popupElement.placement="bottom-end",this._popupElement.arrow=!0,this._popupElement.persistent=!0,this._popupElement.appendChild(this._profileCardElement),this._component.ownerDocument.body.appendChild(this._popupElement),this._popupElement.open=!0,this._profileCardElement.tabIndex=-1,this._profileCardElement.focus(),_5(this._popupElement,()=>{if(!this._popupElement){e();return}!this._popupElement.matches(":focus-within")&&!this._component.matches(":focus-within")&&e()},!0)}async closePopup(){this._popupElement&&(await this._popupElement.hideAsync(),this._popupElement.remove(),this._popupElement=void 0,this._profileCardElement=void 0)}focusButtonElement(){this._iconButtonElement.focus()}setAvatarText(t){this._avatarElement.text=t,r2(this._avatarElement)}setAvatarIcon(t){if(t){let e=new P0({props:{name:t}});this._avatarElement.replaceChildren(e.element)}else r2(this._avatarElement)}setAvatarLetterCount(t){this._avatarElement.letterCount=t}setAvatarImageUrl(t){this._avatarElement.imageUrl=t}setSignOutButtonText(t){var e;this._profileCardElement&&(this._profileCardElement.signOutText=t,(e=this._popupElement)==null||e.position())}setProfileButtonText(t){var e;this._profileCardElement&&(this._profileCardElement.profileText=t,(e=this._popupElement)==null||e.position())}};var zi=class{constructor(t){this._adapter=t;this._avatarLetterCount=Ca.numbers.DEFAULT_LETTER_COUNT;this._showSignOutButton=Y.defaults.SHOW_SIGN_OUT_BUTTON;this._showProfileButton=Y.defaults.SHOW_PROFILE_BUTTON;this._signOutButtonText=Y.defaults.SIGN_OUT_BUTTON_TEXT;this._profileButtonText=Y.defaults.PROFILE_BUTTON_TEXT;this._open=!1;this._isInitialized=!1;this._clickListener=this._onClick.bind(this);this._dismissListener=this._onDismiss.bind(this);this._keydownListener=this._onKeydown.bind(this);this._profileButtonListener=this._onProfileButtonClick.bind(this);this._signOutButtonListener=this._onSignOutButtonClick.bind(this)}initialize(){this._adapter.initialize(),this._adapter.setClickListener(this._clickListener),this._adapter.setAvatarImageUrl(this._avatarImageUrl),this._adapter.setAvatarLetterCount(this._avatarLetterCount),this._adapter.setAvatarText(this._avatarText),this._adapter.setAvatarIcon(this._avatarIcon),this._isInitialized=!0}destroy(){this._adapter.removeDocumentListener("keydown",this._keydownListener),this._adapter.removeClickListener(this._clickListener),this._adapter.destroy(),this._isInitialized=!1}_onClick(t){this._open?this._closeDropdown():this._openDropdown()}_onKeydown(t){t.key==="Escape"&&(this._closeDropdown(),this._adapter.focusButtonElement())}_onDismiss(){this._closeDropdown()}_onProfileButtonClick(){this._adapter.dispatchHostEvent(new CustomEvent(Y.events.PROFILE,{bubbles:!0,composed:!0})),this._closeDropdown()}_onSignOutButtonClick(){this._adapter.dispatchHostEvent(new CustomEvent(Y.events.SIGN_OUT,{bubbles:!0,composed:!0})),this._closeDropdown()}_openDropdown(){if(this._open)return;let t={fullName:this._fullName,email:this._email,signOut:this._showSignOutButton,profile:this._showProfileButton,signOutButtonText:this._signOutButtonText,profileButtonText:this._profileButtonText,avatarText:this._avatarText,avatarIcon:this._avatarIcon,avatarImageUrl:this._avatarImageUrl,avatarLetterCount:this._avatarLetterCount},e=this._profileCardBuilder?this._profileCardBuilder():void 0;this._cancelDismissListener=this._adapter.openPopup(t,this._dismissListener,this._profileButtonListener,this._signOutButtonListener,e),this._adapter.addDocumentListener("keydown",this._keydownListener),this._open=!0,this._adapter.toggleHostAttribute(_1.attributes.OPEN,this._open)}_closeDropdown(){this._open&&(this._cancelDismissListener&&t0(this._cancelDismissListener)&&(this._cancelDismissListener(),this._cancelDismissListener=void 0),this._open=!1,this._adapter.closePopup(),this._adapter.toggleHostAttribute(_1.attributes.OPEN,this._open))}get fullName(){return this._fullName}set fullName(t){this._fullName!==t&&(this._fullName=t,this.avatarText=this._fullName,this._adapter.setHostAttribute(_1.attributes.FULL_NAME,this._fullName))}get email(){return this._email}set email(t){this._email!==t&&(this._email=t,this._adapter.setHostAttribute(_1.attributes.EMAIL,this._email))}get avatarImageUrl(){return this._avatarImageUrl}set avatarImageUrl(t){this._avatarImageUrl!==t&&(this._avatarImageUrl=t,this._isInitialized&&(this._adapter.setAvatarImageUrl(this._avatarImageUrl),this._adapter.setHostAttribute(_1.attributes.AVATAR_IMAGE_URL,this._avatarImageUrl)))}get avatarLetterCount(){return this._avatarLetterCount}set avatarLetterCount(t){this._avatarLetterCount!==t&&(this._avatarLetterCount=t,this._isInitialized&&(this._adapter.setAvatarLetterCount(this._avatarLetterCount),this._adapter.setHostAttribute(_1.attributes.AVATAR_LETTER_COUNT,String(this._avatarLetterCount))))}get avatarText(){return this._avatarText}set avatarText(t){this._avatarText!==t&&(this._avatarText=t,this._isInitialized&&(this._adapter.setAvatarText(this._avatarText),this._adapter.toggleHostAttribute(_1.attributes.AVATAR_TEXT,!!this._avatarText,this._avatarText)))}get avatarIcon(){return this._avatarIcon}set avatarIcon(t){this._avatarIcon!==t&&(this._avatarIcon=t,this._isInitialized&&(this._adapter.setAvatarIcon(this._avatarIcon),this._adapter.toggleHostAttribute(_1.attributes.AVATAR_ICON,!!this._avatarIcon,this._avatarIcon)))}get signOutButton(){return this._showSignOutButton}set signOutButton(t){t=!!t,this._showSignOutButton!==t&&(this._showSignOutButton=t,this._adapter.toggleHostAttribute(_1.attributes.SIGN_OUT_BUTTON,this._showSignOutButton))}get profileButton(){return this._showProfileButton}set profileButton(t){t=!!t,this._showProfileButton!==t&&(this._showProfileButton=t,this._adapter.toggleHostAttribute(_1.attributes.PROFILE_BUTTON,this._showProfileButton))}get signOutButtonText(){return this._signOutButtonText}set signOutButtonText(t){this._signOutButtonText!==t&&(this._signOutButtonText=t,this._adapter.setSignOutButtonText(t))}get profileButtonText(){return this._profileButtonText}set profileButtonText(t){this._profileButtonText!==t&&(this._profileButtonText=t,this._adapter.setProfileButtonText(t))}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(t?this._openDropdown():this._closeDropdown())}get popupElement(){return this._adapter.popupElement}get profileCardBuilder(){return this._profileCardBuilder}set profileCardBuilder(t){this._profileCardBuilder=t}};var c9='<template><forge-icon-button><forge-avatar aria-hidden="true"></forge-avatar></forge-icon-button><forge-tooltip type="label" placement="bottom">View profile</forge-tooltip></template>',U2=class extends M{static get observedAttributes(){return[_1.attributes.FULL_NAME,_1.attributes.EMAIL,_1.attributes.AVATAR_IMAGE_URL,_1.attributes.AVATAR_LETTER_COUNT,_1.attributes.AVATAR_TEXT,_1.attributes.AVATAR_ICON,_1.attributes.SIGN_OUT_BUTTON,_1.attributes.PROFILE_BUTTON,_1.attributes.SIGN_OUT_BUTTON_TEXT,_1.attributes.PROFILE_BUTTON_TEXT,_1.attributes.OPEN]}constructor(){super(),this._core=new zi(new Ci(this))}initializedCallback(){V0(this,c9)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case _1.attributes.FULL_NAME:this.fullName=a;break;case _1.attributes.EMAIL:this.email=a;break;case _1.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=a;break;case _1.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=W(a);break;case _1.attributes.AVATAR_TEXT:this.avatarText=a;break;case _1.attributes.AVATAR_ICON:this.avatarIcon=a;break;case _1.attributes.SIGN_OUT_BUTTON:this.signOutButton=p(a);break;case _1.attributes.PROFILE_BUTTON:this.profileButton=p(a);break;case _1.attributes.SIGN_OUT_BUTTON_TEXT:this.signOutButtonText=a;break;case _1.attributes.PROFILE_BUTTON_TEXT:this.profileButtonText=a;break;case _1.attributes.OPEN:this.open=p(a);break}}get popupElement(){return this._core.popupElement}};ho(),s([v()],U2.prototype,"fullName",2),s([v()],U2.prototype,"email",2),s([v()],U2.prototype,"avatarImageUrl",2),s([v()],U2.prototype,"avatarLetterCount",2),s([v()],U2.prototype,"avatarText",2),s([v()],U2.prototype,"avatarIcon",2),s([v()],U2.prototype,"signOutButton",2),s([v()],U2.prototype,"profileButton",2),s([v()],U2.prototype,"signOutButtonText",2),s([v()],U2.prototype,"profileButtonText",2),s([v()],U2.prototype,"open",2),s([v()],U2.prototype,"profileCardBuilder",2),U2=s([y({name:_1.elementName,dependencies:[P1,F2,n1,p1]})],U2);function ic(){x(U2)}var p9=`${b}divider`,d9={VERTICAL:"vertical"},co={elementName:p9,attributes:d9};var m9='<template><div class="forge-divider" part="root"></div></template>',g9=":host{--_divider-margin:var(--forge-divider-margin, 0)}:host{display:block;margin:var(--_divider-margin)}:host([hidden]){display:none}.forge-divider{--_divider-color:var(--forge-divider-color, var(--forge-theme-outline, #e0e0e0));--_divider-width:var(--forge-divider-width, var(--forge-border-thin, 1px));--_divider-border-style:var(--forge-divider-border-style, solid)}.forge-divider{border:none;border-bottom-color:var(--_divider-color);border-bottom-width:var(--_divider-width);border-bottom-style:var(--_divider-border-style);height:0}:host([vertical]){display:inline-block;height:100%}:host([vertical]) .forge-divider{border:none;border-right-color:var(--_divider-color);border-right-width:var(--_divider-width);border-right-style:var(--_divider-border-style);height:100%;width:0}",Z0=class extends M{static get observedAttributes(){return[co.attributes.VERTICAL]}constructor(){super(),H(this,m9,g9)}attributeChangedCallback(t,e,a){switch(t){case co.attributes.VERTICAL:this.vertical=p(a);break}}get vertical(){return this.hasAttribute(co.attributes.VERTICAL)}set vertical(t){this.toggleAttribute(co.attributes.VERTICAL,t)}};Z0=s([y({name:co.elementName})],Z0);function sc(){x(Z0)}var lc=r=>typeof r.labelChangedCallback=="function";var A4=Symbol("privateIsFocusable"),Ai=Symbol("externalTabIndex"),Bi=Symbol("isUpdatingTabIndex"),B4=Symbol("updateTabIndex");function Fe(r){var e,a,o;class t extends r{constructor(){super(...arguments);this[o]=!1;this[a]=null;this[e]=!1}get[$1](){return this[A4]}set[$1](l){this[$1]!==l&&(this[A4]=l,this[B4]())}connectedCallback(){var l;this[$1]=!0,(l=super.connectedCallback)==null||l.call(this)}attributeChangedCallback(l,h,c){var d;if((d=super.attributeChangedCallback)==null||d.call(this,l,h,c),!(l!=="tabindex"||this[Bi])){if(!this.hasAttribute("tabindex")){this[Ai]=null,this[B4]();return}this[Ai]=this.tabIndex}}[(o=A4,a=Ai,e=Bi,B4)](){var c;let l=this[$1]?0:-1,h=(c=this[Ai])!=null?c:l;this[Bi]=!0,this.tabIndex=h,this[Bi]=!1}}return t}var Ti=class extends I{constructor(t){super(t),this._focusIndicatorElement=g(t,m1.elementName),this._stateLayerElement=g(t,M1.elementName)}initialize(){this._component[P]({role:"button"},{setAttribute:!this._component.hasAttribute("role")}),this._component[P]({ariaPressed:`${!!this._component.selected}`,ariaDisabled:`${!!this._component.disabled}`}),this._component[$1]=!this._component.disabled}setSelected(t){this._component[P]({ariaPressed:`${!!t}`})}setDisabled(t){this._component[P]({ariaDisabled:`${!!t}`}),this._component[$1]=!t,this._stateLayerElement.disabled=t}forceFocusVisible(){this._focusIndicatorElement.active=!0}};var vc=`${b}button-toggle`,hc={SELECTED:"selected",VALUE:"value",DISABLED:"disabled",READONLY:"readonly",TABINDEX:"tabindex"},w9=w({},hc),u9={SELECT:`${vc}-select`},Z2={elementName:vc,observedAttributes:hc,attributes:w9,events:u9};var Si=class{constructor(t){this._adapter=t;this._selected=!1;this._disabled=!1;this._readonly=!1;this._clickListener=t=>this._onClick(t);this._keydownListener=t=>this._onKeyDown(t)}initialize(){this._adapter.initialize(),!this._disabled&&!this._readonly&&this._applyListeners()}destroy(){this._removeListeners()}focus(t={focusVisible:!0}){this._adapter.focusHost(t),t.focusVisible&&this._adapter.forceFocusVisible()}click(){this._adapter.clickHost()}_applyListeners(){this._adapter.addHostListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keydownListener)}_removeListeners(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeHostListener("keydown",this._keydownListener)}async _onClick(t){let e=this._selected;this._selected=!this._selected;let a={value:this._value,selected:this._selected},o=new CustomEvent(Z2.events.SELECT,{detail:a,bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(o),await Qt(),this._selected=e,!o.defaultPrevented&&(this.selected=!e)}_onKeyDown(t){t.key===" "&&(t.preventDefault(),this.click())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t)}get selected(){return this._selected}set selected(t){t=!!t,this._selected!==t&&(this._selected=t,this._adapter.setSelected(this._selected),this._adapter.toggleHostAttribute(Z2.attributes.SELECTED,this._selected))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._disabled?this._removeListeners():this._applyListeners(),this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(Z2.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){t=!!t,this._readonly!==t&&(this._readonly=t,this._readonly?this._removeListeners():this._applyListeners(),this._adapter.toggleHostAttribute(Z2.attributes.READONLY,this._readonly))}};var _9='<template><div class="forge-button-toggle" part="root"><slot name="start"></slot><slot></slot><slot name="end"></slot><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div></template>',f9=':host{--_button-toggle-display:var(--forge-button-toggle-display, inline-flex)}:host{display:var(--_button-toggle-display);position:relative;outline:0;height:100%;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-button-toggle{--_button-toggle-min-width:var(--forge-button-toggle-min-width, auto);--_button-toggle-spacing:var(--forge-button-toggle-spacing, var(--forge-spacing-xsmall, 8px));--_button-toggle-padding-block:var(--forge-button-toggle-padding-block, 2px);--_button-toggle-padding-inline:var(--forge-button-toggle-padding-inline, 8px);--_button-toggle-icon-size:var(--forge-button-toggle-icon-size, var(--forge-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125)));--_button-toggle-color:var(--forge-button-toggle-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_button-toggle-background:var(--forge-button-toggle-background, transparent);--_button-toggle-hover-background:var(--forge-button-toggle-hover-background, var(--_button-toggle-background));--_button-toggle-active-background:var(--forge-button-toggle-active-background, var(--_button-toggle-background));--_button-toggle-cursor:var(--forge-button-toggle-cursor, pointer);--_button-toggle-border-width:var(--forge-button-toggle-border-width, medium);--_button-toggle-border-style:var(--forge-button-toggle-border-style, none);--_button-toggle-border-color:var(--forge-button-toggle-border-color, var(--forge-theme-outline-medium, #757575));--_button-toggle-shape:var(--forge-button-toggle-shape, calc(var(--forge-shape-small, 2px) * var(--forge-shape-factor, 1)));--_button-toggle-shape-start-start:var(--forge-button-toggle-shape-start-start, var(--_button-toggle-shape));--_button-toggle-shape-start-end:var(--forge-button-toggle-shape-start-end, var(--_button-toggle-shape));--_button-toggle-shape-end-start:var(--forge-button-toggle-shape-end-start, var(--_button-toggle-shape));--_button-toggle-shape-end-end:var(--forge-button-toggle-shape-end-end, var(--_button-toggle-shape));--_button-toggle-selected-background:var(--forge-button-toggle-selected-background, var(--forge-theme-tertiary-container, #d0d7ff));--_button-toggle-selected-color:var(--forge-button-toggle-selected-color, var(--forge-theme-on-tertiary-container, #213189));--_button-toggle-selected-disabled-background:var(--forge-button-toggle-selected-disabled-background, var(--forge-theme-surface-container, #e0e0e0));--_button-toggle-disabled-opacity:var(--forge-button-toggle-disabled-opacity, 0.38);--_button-toggle-disabled-cursor:var(--forge-button-toggle-disabled-cursor, not-allowed);--_button-toggle-disabled-color:var(--forge-button-toggle-disabled-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_button-toggle-disabled-background:var(--forge-button-toggle-disabled-background, transparent);--_button-toggle-transition-duration:var(--forge-button-toggle-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-toggle-transition-timing:var(--forge-button-toggle-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-toggle-focus-indicator-color:var(--forge-button-toggle-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_button-toggle-focus-indicator-offset:var(--forge-button-toggle-focus-indicator-offset, 0px)}.forge-button-toggle{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:var(--_button-toggle-display);align-items:center;justify-content:center;gap:var(--_button-toggle-spacing);z-index:0;box-sizing:border-box;min-inline-size:var(--_button-toggle-min-width);inline-size:100%;border-width:var(--_button-toggle-border-width);border-style:var(--_button-toggle-border-style);border-color:var(--_button-toggle-border-color);border-start-start-radius:var(--_button-toggle-shape-start-start);border-start-end-radius:var(--_button-toggle-shape-start-end);border-end-start-radius:var(--_button-toggle-shape-end-start);border-end-end-radius:var(--_button-toggle-shape-end-end);padding-block:var(--_button-toggle-padding-block);padding-inline:var(--_button-toggle-padding-inline);outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;text-decoration:none;white-space:nowrap;background:var(--_button-toggle-background);color:var(--_button-toggle-color);cursor:var(--_button-toggle-cursor);transition-property:color,background-color,border-color;transition-duration:var(--_button-toggle-transition-duration);transition-timing-function:var(--_button-toggle-transition-timing)}.forge-button-toggle forge-state-layer{--forge-state-layer-color:var(--_button-toggle-color)}.forge-button-toggle forge-focus-indicator{--forge-focus-indicator-outward-offset:var(--_button-toggle-focus-indicator-offset);--forge-focus-indicator-color:var(--_button-toggle-focus-indicator-color);--forge-focus-indicator-shape:var(--_button-toggle-shape);--forge-focus-indicator-shape-start-start:var(--_button-toggle-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_button-toggle-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_button-toggle-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_button-toggle-shape-end-end)}::slotted(:is([slot=start],[slot=end])){font-size:var(--_button-toggle-icon-size)}:host([selected]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-selected-background);--_button-toggle-color:var(--_button-toggle-selected-color);--_button-toggle-border-color:var(--_button-toggle-background)}:host([disabled]){--_button-toggle-cursor:var(--_button-toggle-disabled-cursor);cursor:not-allowed}:host([disabled]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-disabled-background);--_button-toggle-color:var(--_button-toggle-disabled-color);opacity:var(--_button-toggle-disabled-opacity);pointer-events:none}:host([disabled][selected]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-selected-disabled-background)}',le=class extends L1(H1(Fe(M))){static get observedAttributes(){return Object.values(Z2.observedAttributes)}constructor(){super(),H(this,_9,f9),this._core=new Si(new Ti(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case Z2.attributes.VALUE:this.value=a;return;case Z2.attributes.SELECTED:this.selected=p(a);return;case Z2.attributes.DISABLED:this.disabled=p(a);return;case Z2.attributes.READONLY:this.readonly=p(a);return}super.attributeChangedCallback(t,e,a)}focus(t){this._core.focus(t)}click(){this._core.click()}};s([v()],le.prototype,"value",2),s([v()],le.prototype,"selected",2),s([v()],le.prototype,"disabled",2),s([v()],le.prototype,"readonly",2),le=s([y({name:Z2.elementName,dependencies:[Q,r1]})],le);function cc(){x(le)}function Ue(r){class t extends r{get form(){return this[a1].form}get labels(){return this[a1].labels}get name(){var a;return(a=this.getAttribute("name"))!=null?a:""}set name(a){K(this,!!a,"name",a)}[$t](){return this[Lt]()}formDisabledCallback(a){this.disabled=a}set[jt](a){let o=a==="select"?document.createElement("select"):document.createElement("input");o.setAttribute("type",a),o.name="internal",this._inputElement=o}[Xt](a){if(this._inputElement)return this[a1].validity.customError?this[a1].validationMessage:(Object.entries(a).forEach(([o,n])=>this._inputElement[o]=n),this._inputElement.validationMessage)}}return t.formAssociated=!0,t}function pc(r){class t extends r{constructor(){super(...arguments);this._hasCustomValidityError=!1}get validity(){return this[a1].validity}get validationMessage(){return this[a1].validationMessage}get willValidate(){return this[a1].willValidate}checkValidity(){return this[a1].checkValidity()}reportValidity(){return this[a1].reportValidity()}setCustomValidity(o){this._hasCustomValidityError=o!=="",this[a1].setCustomValidity({customError:this._hasCustomValidityError},o)}}return t}var dc=`${b}button-toggle-group`,mc={VALUE:"value",MULTIPLE:"multiple",MANDATORY:"mandatory",VERTICAL:"vertical",STRETCH:"stretch",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",DENSE:"dense",NO_OUTLINE:"no-outline",THEME:"theme"},x9=w({},mc),b9={VERTICAL:"forge-button-toggle-group--vertical",STRETCH:"forge-button-toggle-group--stretch"},y9={ROOT:".forge-button-toggle-group"},M9={CHANGE:`${dc}-change`},N1={elementName:dc,observedAttributes:mc,attributes:x9,classes:b9,selectors:y9,events:M9};var ki=class extends I{constructor(t){super(t),this._rootElement=g(t,N1.selectors.ROOT),this._defaultSlotElement=this._rootElement.querySelector("slot")}addListener(t,e){this._rootElement.addEventListener(t,e)}removeListener(t,e){this._rootElement.removeEventListener(t,e)}addSlotChangeListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}removeSlotChangeListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}deselect(t){this._getButtonToggleElements().filter(a=>a!==t).forEach(a=>a.selected=!1)}setDisabled(t){this._component[$1]=!t,this._getButtonToggleElements().forEach(a=>a.disabled=t)}setReadonly(t){this._getButtonToggleElements().forEach(a=>a.readonly=t)}getSelectedValues(){return this._getButtonToggleElements().filter(e=>e.selected).map(e=>e.value)}applyValues(t){this._getButtonToggleElements().forEach(a=>a.selected=t.indexOf(a.value)>=0)}setFormValue(){if(!this._component.form)return;let t=this._component[Lt](),e=this._component[$t]();this._component[a1].setFormValue(t,e)}setFormValidity(){if(!this._component.form||!this._component.required)return;let t=this._component.multiple?!this._component.value.length:!this._component.value;if(t){let e=this._component[Xt]({required:t});this._component[a1].setValidity({valueMissing:t},e,this._getButtonToggleElements()[0])}else this._component[a1].setValidity({})}_getButtonToggleElements(){return Array.from(this._component.querySelectorAll(Z2.elementName))}};var Oi=class{constructor(t){this._adapter=t;this._values=[];this._outlined=!0;this._multiple=!1;this._mandatory=!1;this._vertical=!1;this._stretch=!1;this._dense=!1;this._disabled=!1;this._readonly=!1;this._required=!1;this._theme="tertiary";this._selectListener=e=>this._onSelect(e),this._slotListener=()=>this._synchronize()}initialize(){this._adapter.setFormValue(),this._adapter.setFormValidity(),this._adapter.addListener(Z2.events.SELECT,this._selectListener),this._adapter.addSlotChangeListener(this._slotListener)}destroy(){this._adapter.removeListener(Z2.events.SELECT,this._selectListener),this._adapter.removeSlotChangeListener(this._slotListener)}_synchronize(){if(this._disabled&&this._adapter.setDisabled(this._disabled),this._readonly&&this._adapter.setReadonly(this._readonly),this._multiple){let t=new Set(this._adapter.getSelectedValues().concat(this._values));this.value=Array.from(t)}else{let t=this._adapter.getSelectedValues().concat(this._values);this.value=t.length?t[t.length-1]:null}}_onSelect(t){if(this._mandatory&&!this._adapter.getSelectedValues().length){t.preventDefault();return}let e;t.detail.selected?e=this._multiple?[...this._values,t.detail.value]:[t.detail.value]:e=this._multiple?this._values.filter(n=>n!==t.detail.value):[];let a=this._multiple?e:e.length?e[0]:null,o=new CustomEvent(N1.events.CHANGE,{detail:a,bubbles:!0,cancelable:!0});if(this._adapter.dispatchHostEvent(o),o.defaultPrevented){t.preventDefault();return}this._values=e,this._adapter.applyValues(this._values),this._adapter.setFormValue(),this._adapter.setFormValidity()}_applyValue(t){let e=Array.isArray(t)?t:t!=null?[t]:[];this._values=e,!this._multiple&&e.length>1&&(e=[e[0]]),this._adapter.applyValues(e),this._adapter.setFormValue(),this._adapter.setFormValidity()}get value(){var e;let t=Array.from(new Set(this._adapter.getSelectedValues().concat(this._values)));return this._multiple?Array.from(t):(e=t[0])!=null?e:null}set value(t){this._applyValue(t)}get multiple(){return this._multiple}set multiple(t){t=!!t,this._multiple!==t&&(this._multiple=t,this._applyValue(this._values),this._adapter.toggleHostAttribute(N1.attributes.MULTIPLE,this._multiple))}get mandatory(){return this._mandatory}set mandatory(t){t=!!t,this._mandatory!==t&&(this._mandatory=t,this._adapter.toggleHostAttribute(N1.attributes.MANDATORY,this._mandatory))}get vertical(){return this._vertical}set vertical(t){t=!!t,this._vertical!==t&&(this._vertical=t,this._adapter.toggleHostAttribute(N1.attributes.VERTICAL,this._vertical))}get stretch(){return this._stretch}set stretch(t){t=!!t,this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(N1.attributes.STRETCH,this._stretch))}get dense(){return this._dense}set dense(t){t=!!t,this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(N1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(N1.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){t=!!t,this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(N1.attributes.READONLY,this._readonly))}get required(){return this._required}set required(t){t=!!t,this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(N1.attributes.REQUIRED,this._required))}get outlined(){return this._outlined}set outlined(t){t=!!t,this._outlined!==t&&(this._outlined=t,this._adapter.toggleHostAttribute(N1.attributes.NO_OUTLINE,!this._outlined))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.toggleHostAttribute(N1.attributes.THEME,this._theme!=="tertiary",this._theme))}};var H9='<template><div class="forge-button-toggle-group" part="root"><slot></slot></div></template>',L9=":host{--_button-toggle-group-display:var(--forge-button-toggle-group-display, inline-flex)}:host{display:var(--_button-toggle-group-display)}:host([hidden]){display:none}.forge-button-toggle-group{--_button-toggle-group-gap:var(--forge-button-toggle-group-gap, 4px);--_button-toggle-group-padding:var(--forge-button-toggle-group-padding, 4px);--_button-toggle-group-padding-block:var(--forge-button-toggle-group-padding-block, var(--_button-toggle-group-padding));--_button-toggle-group-padding-inline:var(--forge-button-toggle-group-padding-inline, var(--_button-toggle-group-padding));--_button-toggle-group-height:var(--forge-button-toggle-group-height, var(--forge-button-height, 36px));--_button-toggle-group-dense-height:var(--forge-button-toggle-group-dense-height, var(--forge-button-dense-height, 24px));--_button-toggle-group-outline-width:var(--forge-button-toggle-group-outline-width, var(--forge-border-thin, 1px));--_button-toggle-group-outline-style:var(--forge-button-toggle-group-outline-style, solid);--_button-toggle-group-outline-color:var(--forge-button-toggle-group-outline-color, var(--forge-theme-outline-low, #9e9e9e));--_button-toggle-group-outline-color-active:var(--forge-button-toggle-group-outline-color-active, var(--forge-theme-outline-medium, #757575));--_button-toggle-group-shape:var(--forge-button-toggle-group-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_button-toggle-group-shape-start-start:var(--forge-button-toggle-group-shape-start-start, var(--_button-toggle-group-shape));--_button-toggle-group-shape-start-end:var(--forge-button-toggle-group-shape-start-end, var(--_button-toggle-group-shape));--_button-toggle-group-shape-end-start:var(--forge-button-toggle-group-shape-end-start, var(--_button-toggle-group-shape));--_button-toggle-group-shape-end-end:var(--forge-button-toggle-group-shape-end-end, var(--_button-toggle-group-shape));--_button-toggle-group-transition-duration:var(--forge-button-toggle-group-transition-duration, var(--forge-button-toggle-transition-duration, var(--forge-animation-duration-short3, 150ms)));--_button-toggle-group-transition-timing:var(--forge-button-toggle-group-transition-timing, var(--forge-button-toggle-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1))))}.forge-button-toggle-group{display:flex;align-items:center;gap:var(--_button-toggle-group-gap);height:var(--_button-toggle-group-height);border-width:var(--_button-toggle-group-outline-width);border-style:var(--_button-toggle-group-outline-style);border-color:var(--_button-toggle-group-outline-color);border-start-start-radius:var(--_button-toggle-group-shape-start-start);border-start-end-radius:var(--_button-toggle-group-shape-start-end);border-end-start-radius:var(--_button-toggle-group-shape-end-start);border-end-end-radius:var(--_button-toggle-group-shape-end-end);padding-block:var(--_button-toggle-group-padding-block);padding-inline:var(--_button-toggle-group-padding-inline);transition-property:border-color;transition-duration:var(--_button-toggle-group-transition-duration);transition-timing-function:var(--_button-toggle-group-transition-timing)}:host(:not([disabled]):not([no-outline])) .forge-button-toggle-group:focus-within,:host(:not([disabled]):not([no-outline])) .forge-button-toggle-group:hover{--_button-toggle-group-outline-color:var(--_button-toggle-group-outline-color-active)}:host([no-outline]) .forge-button-toggle-group{--_button-toggle-group-padding:var(--forge-button-toggle-group-padding, 0);--_button-toggle-group-outline-style:var(--forge-button-toggle-group-outline-style, none)}:host(:is([dense],[density=dense])) .forge-button-toggle-group{--_button-toggle-group-height:var(--_button-toggle-group-dense-height)}:host([vertical]) .forge-button-toggle-group{height:auto;flex-direction:column}:host([vertical]) ::slotted(forge-button-toggle){height:var(--_button-toggle-group-height);width:100%}:host([vertical]) ::slotted(forge-divider:not([vertical])){margin-inline:4px;width:100%}::slotted(forge-divider[vertical]){margin-block:4px}:host([stretch]){display:block}:host([stretch]) .forge-button-toggle-group{width:100%}:host(:not([vertical])[stretch]) ::slotted(forge-button-toggle){flex:1}:host([theme=primary]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-primary-container, #d1d5ed);--forge-button-toggle-selected-color:var(--forge-theme-on-primary-container, #222c62);--forge-button-toggle-focus-indicator-color:var(--forge-theme-primary, #3f51b5)}:host([theme=secondary]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-secondary-container, #fff0c3);--forge-button-toggle-selected-color:var(--forge-theme-on-secondary-container, #8a6804);--forge-button-toggle-focus-indicator-color:var(--forge-theme-secondary, #ffc107)}:host([theme=success]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-success-container, #cde0ce);--forge-button-toggle-selected-color:var(--forge-theme-on-success-container, #19441b);--forge-button-toggle-focus-indicator-color:var(--forge-theme-success, #2e7d32)}:host([theme=error]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-error-container, #ecc2c9);--forge-button-toggle-selected-color:var(--forge-theme-on-error-container, #5f0011);--forge-button-toggle-focus-indicator-color:var(--forge-theme-error, #b00020)}:host([theme=warning]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-warning-container, #f4d3c2);--forge-button-toggle-selected-color:var(--forge-theme-on-warning-container, #712700);--forge-button-toggle-focus-indicator-color:var(--forge-theme-warning, #d14900)}:host([theme=info]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-info-container, #c7daf0);--forge-button-toggle-selected-color:var(--forge-theme-on-info-container, #0b3768);--forge-button-toggle-focus-indicator-color:var(--forge-theme-info, #1565c0)}",Q2=class extends it(Ue(pc(L1(H1(M))))){static get observedAttributes(){return Object.values(N1.observedAttributes)}constructor(){super(),H(this,H9,L9),this._core=new Oi(new ki(this)),this[jt]="radio"}connectedCallback(){super.connectedCallback(),this[P]({role:"group"},{setAttribute:!this.hasAttribute("role")}),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case N1.observedAttributes.VALUE:this.value=a;break;case N1.observedAttributes.NO_OUTLINE:this.outlined=!p(a);break;case N1.observedAttributes.MULTIPLE:this.multiple=p(a);break;case N1.observedAttributes.MANDATORY:this.mandatory=p(a);break;case N1.observedAttributes.VERTICAL:this.vertical=p(a);break;case N1.observedAttributes.STRETCH:this.stretch=p(a);break;case N1.observedAttributes.DENSE:this.dense=p(a);break;case N1.observedAttributes.DISABLED:this.disabled=p(a);break;case N1.observedAttributes.REQUIRED:this.required=p(a);break;case N1.observedAttributes.READONLY:this.readonly=p(a);break;case N1.observedAttributes.THEME:this.theme=a;break}}[Lt](){let t=Array.isArray(this.value)?this.value.length>0:!!this.value,e=null;if(t){let a=Array.isArray(this.value)?this.value:[this.value];a.length&&(e=new FormData,a.forEach(o=>e==null?void 0:e.append(this.name,o)))}return e}[$t](){let t=new FormData,e=Array.isArray(this.value)?this.value:this.value!=null?[this.value]:[];return t.append("multiple",String(this.multiple)),e.forEach(a=>t.append("value",a)),t}formStateRestoreCallback(t,e){var a;if(e==="restore"&&t instanceof FormData){let o=t.get("multiple")==="true",n=t.getAll("value");if(o){this.multiple=o,this.value=n;return}this.value=(a=n[0])!=null?a:null}}formResetCallback(){this.value=this.getAttribute("value")}labelChangedCallback(t){this[P]({ariaLabel:t!=null?t:void 0})}};s([v()],Q2.prototype,"value",2),s([v()],Q2.prototype,"outlined",2),s([v()],Q2.prototype,"multiple",2),s([v()],Q2.prototype,"mandatory",2),s([v()],Q2.prototype,"vertical",2),s([v()],Q2.prototype,"stretch",2),s([v()],Q2.prototype,"dense",2),s([v()],Q2.prototype,"disabled",2),s([v()],Q2.prototype,"required",2),s([v()],Q2.prototype,"readonly",2),s([v()],Q2.prototype,"theme",2),Q2=s([y({name:N1.elementName,dependencies:[le]})],Q2);function gc(){x(Q2)}var I9=`${b}checkbox`,wc={CHECKED:"checked",DEFAULT_CHECKED:"default-checked",INDETERMINATE:"indeterminate",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},V9=w({},wc),E9={ROOT:".forge-checkbox",LABEL:"#label",STATE_LAYER:"forge-state-layer"},z1={elementName:I9,selectors:E9,observedAttributes:wc,attributes:V9};var Di=class extends I{constructor(t){super(t),this._rootElement=g(t,z1.selectors.ROOT),this._labelElement=g(t,z1.selectors.LABEL),this._stateLayerElement=g(t,z1.selectors.STATE_LAYER)}setChecked(t){this._component[wt](),this._component[P]({ariaChecked:t?"true":"false"})}setDisabled(t){this._component[$1]=!t,this._component[P]({ariaDisabled:t?"true":"false"}),this._stateLayerElement.disabled=t}setRequired(t){this._component[wt](),this._component[P]({ariaRequired:t?"true":"false"})}setReadonly(t){this._component[P]({ariaReadOnly:t?"true":"false"}),this._stateLayerElement.disabled=t}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}syncValue(t,e){let a=t?new FormData:null;a&&t&&a.append(this._component.name,t),this._component.setFormValue(a,e)}};var Pi=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._indeterminate=!1;this._value="on";this._dense=!1;this._disabled=!1;this._required=!1;this._readonly=!1;this._labelPosition="end";this._clickListener=t=>this._handleChange();this._keydownListener=t=>this._handleKeydown(t);this._keyupListener=t=>this._handleKeyup(t)}get _submittedValue(){return this._checked?this._value:null}get _formState(){return this._checked?this._indeterminate?"checked-indeterminate":"checked":this._indeterminate?"unchecked-indeterminate":"unchecked"}initialize(){this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.syncValue(this._submittedValue,this._formState)}_handleKeydown(t){t.key===" "&&t.preventDefault()}_handleKeyup(t){t.key===" "&&this._handleChange()}_handleChange(){if(this._readonly)return;let t=this._checked,e=!this._checked;this._checked=e;let a=new Event("change",{cancelable:!0,bubbles:!0});this._adapter.dispatchHostEvent(a),this._checked=t,!a.defaultPrevented&&(this.checked=e,this._indeterminate=!1,this._adapter.toggleHostAttribute(z1.attributes.INDETERMINATE,this._indeterminate))}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked),this._adapter.syncValue(this._submittedValue,this._formState),this._adapter.toggleHostAttribute(z1.attributes.CHECKED,this._checked))}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(z1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get indeterminate(){return this._indeterminate}set indeterminate(t){this._indeterminate!==t&&(this._indeterminate=t,this._adapter.syncValue(this._submittedValue,this._formState),this._adapter.toggleHostAttribute(z1.attributes.INDETERMINATE,this._indeterminate))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.syncValue(this._submittedValue,this._formState),(typeof this._value=="string"||this._value==null)&&this._adapter.setHostAttribute(z1.attributes.VALUE,this._value))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(z1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this.disabled),this._adapter.toggleHostAttribute(z1.attributes.DISABLED,this._disabled))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setRequired(this._required),this._adapter.toggleHostAttribute(z1.attributes.REQUIRED,this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(z1.attributes.READONLY,this._readonly))}get labelPosition(){return this._labelPosition}set labelPosition(t){this.labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(z1.attributes.LABEL_POSITION,this._labelPosition))}};var C9='<template><div class="forge-checkbox" part="root"><div id="container" class="container"><div class="background" part="background"><svg class="icon icon--checked" aria-hidden="true" viewBox="0 0 24 24" part="checkmark"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"></path></svg> <svg class="icon icon--indeterminate" aria-hidden="true" viewBox="0 0 24 24" part="mixedmark"><line x1="2" y1="12" x2="22" y2="12"></line></svg><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator></div><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div><div id="label" class="label" part="label"><slot></slot></div></div></template>',z9=':host{display:inline-block;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-checkbox{--_checkbox-primary-color:var(--forge-checkbox-primary-color, var(--forge-theme-tertiary, #3d5afe));--_checkbox-size:var(--forge-checkbox-size, 16px);--_checkbox-border-width:var(--forge-checkbox-border-width, var(--forge-border-medium, 2px));--_checkbox-icon-color:var(--forge-checkbox-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_checkbox-state-layer-size:var(--forge-checkbox-state-layer-size, 40px);--_checkbox-state-layer-dense-size:var(--forge-checkbox-state-layer-dense-size, 24px);--_checkbox-background:var(--forge-checkbox-background, var(--forge-theme-surface, #ffffff));--_checkbox-width:var(--forge-checkbox-width, var(--_checkbox-size));--_checkbox-height:var(--forge-checkbox-height, var(--_checkbox-size));--_checkbox-unchecked-border-width:var(--forge-checkbox-unchecked-border-width, var(--_checkbox-border-width));--_checkbox-unchecked-border-color:var(--forge-checkbox-unchecked-border-color, var(--forge-theme-surface-container-high, #9e9e9e));--_checkbox-shape:var(--forge-checkbox-shape, calc(var(--forge-shape-small, 2px) * var(--forge-shape-factor, 1)));--_checkbox-elevation:var(--forge-checkbox-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));--_checkbox-checked-background:var(--forge-checkbox-checked-background, var(--_checkbox-primary-color));--_checkbox-checked-border-width:var(--forge-checkbox-checked-border-width, var(--_checkbox-border-width));--_checkbox-checked-border-color:var(--forge-checkbox-checked-border-color, var(--_checkbox-checked-background));--_checkbox-icon-checked-color:var(--forge-checkbox-icon-checked-color, var(--_checkbox-icon-color));--_checkbox-icon-indeterminate-color:var(--forge-checkbox-icon-indeterminate-color, var(--_checkbox-icon-color));--_checkbox-icon-stroke-width:var(--forge-checkbox-icon-stroke-width, 4px);--_checkbox-gap:var(--forge-checkbox-gap, 0);--_checkbox-justify:var(--forge-checkbox-justify, start);--_checkbox-align:var(--forge-checkbox-align, center);--_checkbox-direction:var(--forge-checkbox-direction, initial);--_checkbox-state-layer-width:var(--forge-checkbox-state-layer-width, var(--_checkbox-state-layer-size));--_checkbox-state-layer-height:var(--forge-checkbox-state-layer-height, var(--_checkbox-state-layer-size));--_checkbox-state-layer-checked-color:var(--forge-checkbox-state-layer-checked-color, var(--_checkbox-primary-color));--_checkbox-state-layer-unchecked-color:var(--forge-checkbox-state-layer-unchecked-color, var(--_checkbox-color));--_checkbox-state-layer-shape:var(--forge-checkbox-state-layer-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_checkbox-dense-gap:var(--forge-checkbox-dense-gap, 8px);--_checkbox-state-layer-dense-width:var(--forge-checkbox-state-layer-dense-width, var(--_checkbox-state-layer-dense-size));--_checkbox-state-layer-dense-height:var(--forge-checkbox-state-layer-dense-height, var(--_checkbox-state-layer-dense-size));--_checkbox-disabled-opacity:var(--forge-checkbox-disabled-opacity, 0.38);--_checkbox-animation-duration:var(--forge-checkbox-animation-duration, var(--forge-animation-duration-short2, 100ms));--_checkbox-background-animation-timing:var(--forge-checkbox-background-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_checkbox-icon-animation-timing:var(--forge-checkbox-icon-animation-timing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)))}.forge-checkbox{position:relative;flex-direction:var(--_checkbox-direction);align-items:var(--_checkbox-align);justify-content:var(--_checkbox-justify);gap:var(--_checkbox-gap);display:flex}.forge-checkbox .container{position:relative;align-items:center;justify-content:center;display:flex;flex-shrink:0;border-radius:var(--_checkbox-state-layer-shape);inline-size:var(--_checkbox-state-layer-width);block-size:var(--_checkbox-state-layer-height);cursor:pointer}.forge-checkbox .background{position:relative;align-items:center;justify-content:center;display:flex;transition-property:background,border-width,border-color;transition-duration:var(--_checkbox-animation-duration);transition-timing-function:var(--_checkbox-background-animation-timing);box-shadow:var(--_checkbox-elevation);border-style:solid;border-width:var(--_checkbox-unchecked-border-width);border-color:var(--_checkbox-unchecked-border-color);border-radius:var(--_checkbox-shape);box-sizing:border-box;block-size:var(--_checkbox-height);inline-size:var(--_checkbox-width);background:var(--_checkbox-background)}.forge-checkbox .icon{position:absolute;transition-property:stroke-dashoffset;transition-duration:var(--_checkbox-animation-duration);transition-timing-function:var(--_checkbox-icon-animation-timing);fill:none;stroke-width:var(--_checkbox-icon-stroke-width)}.forge-checkbox .icon--checked{stroke:var(--_checkbox-icon-checked-color);stroke-dasharray:30;transition-delay:0s;stroke-dashoffset:30}.forge-checkbox .icon--indeterminate{stroke:var(--_checkbox-icon-indeterminate-color);stroke-dasharray:20;transition-delay:0s;stroke-dashoffset:20}.forge-checkbox .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);cursor:default}:host([checked]) .background{border-style:solid;border-width:var(--_checkbox-checked-border-width);border-color:var(--_checkbox-checked-border-color);background:var(--_checkbox-checked-background)}:host([checked]) .icon--checked{transition-delay:var(--_checkbox-animation-duration);stroke-dashoffset:0}:host([checked]) .icon--checked:dir(rtl){stroke-dashoffset:60}:host([checked]) .icon--indeterminate{transition-delay:0s;stroke-dashoffset:20}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-checked-color)}:host([indeterminate]) .background{border-style:solid;border-width:var(--_checkbox-checked-border-width);border-color:var(--_checkbox-checked-border-color);background:var(--_checkbox-checked-background)}:host([indeterminate]) .icon--checked{transition-delay:0s;stroke-dashoffset:30}:host([indeterminate]) .icon--indeterminate{transition-delay:var(--_checkbox-animation-duration);stroke-dashoffset:0}:host([indeterminate]) .icon--indeterminate:dir(rtl){stroke-dashoffset:40}:host([indeterminate]) forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-checked-color)}:host([dense]) .forge-checkbox{--_checkbox-gap:var(--_checkbox-dense-gap)}:host([dense]) .forge-checkbox .container{inline-size:var(--_checkbox-state-layer-dense-width);block-size:var(--_checkbox-state-layer-dense-height)}:host([disabled]) .forge-checkbox .container{opacity:var(--_checkbox-disabled-opacity);cursor:not-allowed}:host([readonly]) .forge-checkbox .container{cursor:not-allowed}@media (prefers-reduced-motion){.forge-checkbox{--_checkbox-animation-duration:var(--forge-checkbox-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-unchecked-color)}forge-focus-indicator{--forge-focus-indicator-shape:0px;--forge-focus-indicator-outward-offset:8px}',J2=class extends Ue(it(Fe(L1(H1(M))))){static get observedAttributes(){return Object.values(z1.observedAttributes)}constructor(){super(),H(this,C9,z9),this[jt]="checkbox",this._core=new Pi(new Di(this))}connectedCallback(){super.connectedCallback(),this[P]({role:"checkbox",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"}),this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case z1.observedAttributes.CHECKED:this.checked=p(a);break;case z1.observedAttributes.DEFAULT_CHECKED:this.defaultChecked=p(a);break;case z1.observedAttributes.INDETERMINATE:this.indeterminate=p(a);break;case z1.observedAttributes.VALUE:this.value=a;break;case z1.observedAttributes.DENSE:this.dense=p(a);break;case z1.observedAttributes.DISABLED:this.disabled=p(a);break;case z1.observedAttributes.REQUIRED:this.required=p(a);break;case z1.observedAttributes.READONLY:this.readonly=p(a);break;case z1.observedAttributes.LABEL_POSITION:this.labelPosition=a;break}super.attributeChangedCallback(t,e,a)}[Lt](){return this.checked?this.value:null}[$t](){return this.checked?this.indeterminate?"checked-indeterminate":"checked":this.indeterminate?"unchecked-indeterminate":"unchecked"}[wt](){this[a1].setValidity({valueMissing:this.required&&!this.checked},this[Xt]({checked:this.checked,required:this.required}))}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t){this.checked=t==="checked"||t==="checked-indeterminate",this.indeterminate=t==="unchecked-indeterminate"||t==="checked-indeterminate"}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[P]({ariaLabel:t})}setFormValue(t,e){if(this[a1].setFormValue(t,e),e){let a=Pt(e)?e:e[this.name];this.checked=a==="checked"||a==="checked-indeterminate",this.indeterminate=a==="unchecked-indeterminate"||a==="checked-indeterminate";return}Pt(t)?this.checked=!!t:t!=null&&t[this.name]?this.checked=!!t[this.name]:this.checked=!1}toggle(t){k(t)?this._core.checked=t:this._core.checked=!this._core.checked}};s([v()],J2.prototype,"checked",2),s([v()],J2.prototype,"defaultChecked",2),s([v()],J2.prototype,"indeterminate",2),s([v()],J2.prototype,"value",2),s([v()],J2.prototype,"dense",2),s([v()],J2.prototype,"disabled",2),s([v()],J2.prototype,"required",2),s([v()],J2.prototype,"readonly",2),s([v()],J2.prototype,"labelPosition",2),J2=s([y({name:z1.elementName,dependencies:[Q,r1]})],J2);var uc=class extends a2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get checked(){return this._element.checked}set checked(t){this._element.checked=t}get defaultChecked(){return this._element.defaultChecked}set defaultChecked(t){this._element.defaultChecked=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get indeterminate(){return this._element.indeterminate}set indeterminate(t){this._element.indeterminate=t}get dense(){return this._element.dense}set dense(t){this._element.dense=t}get required(){return this._element.required}set required(t){this._element.required=t}get readonly(){return this._element.readonly}set readonly(t){this._element.readonly=t}get name(){return this._element.name}set name(t){this._element.name=t}get labelPosition(){return this._element.labelPosition}set labelPosition(t){this._element.labelPosition=t}onChange(t){this._element.addEventListener("change",e=>t(e.target.checked))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setLabel(t){this._element.innerText=t!=null?t:""}toggle(t){this._element.toggle(t)}_build(){return document.createElement(z1.elementName)}_configure(){var t,e;(t=this._config.options)!=null&&t.id&&(this._element.id=this._config.options.id),(e=this._config.options)!=null&&e.label&&(this._element.innerText=this._config.options.label)}};function _c(){x(J2)}var At=class At{static getRadioGroup(t,{rootNode:e,form:a}={}){var n;if(!t.name)return[t];if(!t.form&&!a){let l=(e!=null?e:t.getRootNode()).querySelectorAll(`${f1.elementName}[name=${t.name}]`);return Array.from(l).filter(h=>!h.form)}let o=((n=t.form)!=null?n:a).elements.namedItem(t.name);return o&&Object.prototype.isPrototypeOf.call(RadioNodeList.prototype,o)?Array.from(o).filter(i=>i.matches(f1.elementName)):[t]}static setRadioGroupValidity(t){let e=At.getRadioGroup(t),a=At._selectionIsRequired(e);e.forEach(o=>{if(!o.shadowRoot)return;let n=o[Xt]({required:a,checked:o.checked});o[a1].setValidity({valueMissing:a},n)})}static setRadioGroupRequired(t){let e=At.getRadioGroupElement(t);if(!e)return;let a=At.getRadioGroup(t),o=Array.from(a).some(n=>n.required);(e==null?void 0:e.tagName)==="forge-radio-group"?e[P]({ariaRequired:o?"true":"false"}):e.setAttribute("aria-required",o?"true":"false")}static getRadioGroupElement(t){return t.closest(":is(fieldset, [role=radiogroup], forge-radio-group)")}static setSelectedRadioInGroup(t){At.getRadioGroup(t).forEach(a=>a.checked=a===t)}static syncRadioFocusableState(t,{ignoreSelf:e,rootNode:a,form:o}={ignoreSelf:!1}){let n=At.getRadioGroup(t,{rootNode:a,form:o});if(n=n.filter(i=>e&&i!==t||i.shadowRoot),!n.some(i=>i.checked)){n.forEach(i=>i[$1]=!i.disabled);return}n.forEach(i=>i[$1]=i.checked&&!i.disabled)}static focusNextRadioInGroup(t){At._updateRadioGroupFocus(t,1)}static focusPreviousRadioInGroup(t){At._updateRadioGroupFocus(t,-1)}static setUncheckedRadioGroupFocus(t,e){let a=At.getRadioGroup(t);if(e==="focus"){a.forEach(o=>o[$1]=o===t);return}(!t.checked||a[0]===t||a[a.length-1]===t)&&a.forEach(o=>o[$1]=!0)}static async requestRadioGroupReset(t){if(this._radiosRequestingReset.add(t),await Qt(),!this._radiosRequestingReset.has(t))return;let e=At.getRadioGroup(t),a=null;e.forEach(o=>{this._radiosRequestingReset.delete(o),o.defaultChecked&&(a=o)}),e.forEach(o=>{o.checked=o===a,o[$1]=!a||o.checked})}static _updateRadioGroupFocus(t,e){let a=At.getRadioGroup(t),o=a.indexOf(t),n=a[o];do if(o+=e,o<0?o=a.length-1:o>=a.length&&(o=0),n=a[o],n===t)return;while(n.disabled||n.readonly);n[Ni]()&&(n[$1]=!0,n.focus(),a.forEach(i=>{i!==n&&(i[$1]=!1,i.checked=!1)}))}static _selectionIsRequired(t){let e=!1,a=!1;return t.forEach(o=>{o.required&&(e=!0),o.checked&&(a=!0)}),e&&!a}};At._radiosRequestingReset=new WeakSet;var lt=At;var A9=`${b}radio`,fc={CHECKED:"checked",DEFAULT_CHECKED:"default-checked",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},B9=w({},fc),T9={ROOT:".forge-radio",LABEL:"#label",STATE_LAYER:"forge-state-layer"},S9={CHANGE:"change",INPUT:"input"},f1={elementName:A9,observedAttributes:fc,attributes:B9,selectors:T9,events:S9},Ni=Symbol("tryCheck");var Ri=class extends I{constructor(t){super(t),this._rootElement=g(t,f1.selectors.ROOT),this._labelElement=g(t,f1.selectors.LABEL),this._stateLayerElement=g(t,f1.selectors.STATE_LAYER)}setChecked(t,e){this._component[P]({ariaChecked:t?"true":"false"}),t&<.setSelectedRadioInGroup(this._component),lt.syncRadioFocusableState(this._component);let a=t?e:null,o=t?"checked":"unchecked";this._component[a1].setFormValue(a,o),lt.setRadioGroupValidity(this._component)}trySetDisabled(t){let e=this._component.closest("forge-radio-group");return!t&&e&&e.disabled?!1:(this._component[P]({ariaDisabled:`${!!t}`}),lt.syncRadioFocusableState(this._component),!0)}setRequired(){lt.setRadioGroupValidity(this._component),lt.setRadioGroupRequired(this._component)}setReadonly(t){this._component[P]({ariaDisabled:`${!!t}`})}disableStateLayer(t){this._stateLayerElement.disabled=t}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}setUncheckedRadioGroupFocus(t){lt.setUncheckedRadioGroupFocus(this._component,t)}focusNext(){lt.focusNextRadioInGroup(this._component)}focusPrevious(){lt.focusPreviousRadioInGroup(this._component)}};var Fi=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._value="on";this._disabled=!1;this._required=!1;this._readonly=!1;this._dense=!1;this._labelPosition="end";this._focusListener=()=>this._handleFocus(),this._blurListener=()=>this._handleBlur(),this._clickListener=e=>this._handleClick(e),this._keydownListener=e=>this._handleKeydown(e),this._keyupListener=e=>this._handleKeyup(e)}initialize(){this._adapter.addHostListener("focus",this._focusListener),this._adapter.addHostListener("blur",this._blurListener),this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.setChecked(this._checked,this._value)}tryCheck(){return this._checked=!0,this._dispatchEvents()?(this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(f1.attributes.CHECKED,this._checked),!0):(this._checked=!1,!1)}_handleFocus(){this._checked||this._adapter.setUncheckedRadioGroupFocus("focus")}_handleBlur(){this._checked||this._adapter.setUncheckedRadioGroupFocus("blur")}_handleClick(t){this._activate(t)}_handleKeydown(t){switch(t.key){case"ArrowRight":case"ArrowDown":t.preventDefault(),this._adapter.focusNext();break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this._adapter.focusPrevious();break;case" ":t.preventDefault();break}}_handleKeyup(t){t.key===" "&&this._activate(t)}async _activate(t){if(!(this._checked||this._disabled||this._readonly)&&(await Qt(),!t.defaultPrevented)){if(this._checked=!0,!this._dispatchEvents()){this._checked=!1;return}this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(f1.attributes.CHECKED,this._checked)}}_dispatchEvents(){let t=new Event(f1.events.CHANGE,{bubbles:!0,cancelable:!0}),e=new Event(f1.events.INPUT,{bubbles:!0,cancelable:!0,composed:!0});return this._adapter.dispatchHostEvent(t),this._adapter.dispatchHostEvent(e),!(t.defaultPrevented||e.defaultPrevented)}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(f1.attributes.CHECKED,this._checked))}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(f1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,(typeof this._value=="string"||this._value==null)&&this._adapter.setHostAttribute(f1.attributes.VALUE,this._value))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.trySetDisabled(this._disabled)?(this._adapter.disableStateLayer(this._disabled||this._readonly),this._adapter.toggleHostAttribute(f1.attributes.DISABLED,this._disabled)):this._disabled=!this._disabled)}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(f1.attributes.REQUIRED,this._required),this._adapter.setRequired(this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.disableStateLayer(this._disabled||this._readonly),this._adapter.toggleHostAttribute(f1.attributes.READONLY,this._readonly))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(f1.attributes.DENSE,this._dense))}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(f1.attributes.LABEL_POSITION,this._labelPosition))}};var k9='<template><div id="radio" class="forge-radio" part="root"><div id="container" class="container" aria-hidden="true"><div id="background" class="background" part="background"></div><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></div><span id="label" class="label" for="input" part="label"><slot></slot></span></div></template>',O9=':host{display:inline-block;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}:host(:focus){outline:0}.forge-radio{--_radio-primary-color:var(--forge-radio-primary-color, var(--forge-theme-tertiary, #3d5afe));--_radio-inactive-color:var(--forge-radio-inactive-color, var(--forge-theme-surface-container-high, #9e9e9e));--_radio-size:var(--forge-radio-size, 20px);--_radio-mark-size:var(--forge-radio-mark-size, 75%);--_radio-state-layer-size:var(--forge-radio-state-layer-size, 40px);--_radio-state-layer-dense-size:var(--forge-radio-state-layer-dense-size, 24px);--_radio-width:var(--forge-radio-width, var(--_radio-size));--_radio-height:var(--forge-radio-height, var(--_radio-size));--_radio-border-width:var(--forge-radio-border-width, var(--forge-border-medium, 2px));--_radio-unchecked-border-color:var(--forge-radio-unchecked-border-color, var(--_radio-inactive-color));--_radio-checked-border-color:var(--forge-radio-checked-border-color, var(--_radio-primary-color));--_radio-background:var(--forge-radio-background, transparent);--_radio-shape:var(--forge-radio-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_radio-mark-width:var(--forge-radio-mark-width, var(--_radio-mark-size));--_radio-mark-height:var(--forge-radio-mark-height, var(--_radio-mark-size));--_radio-mark-color:var(--forge-radio-mark-color, var(--_radio-primary-color));--_radio-gap:var(--forge-radio-gap, 0);--_radio-justify:var(--forge-radio-justify, start);--_radio-align:var(--forge-radio-align, center);--_radio-direction:var(--forge-radio-direction, initial);--_radio-state-layer-width:var(--forge-radio-state-layer-width, var(--_radio-state-layer-size));--_radio-state-layer-height:var(--forge-radio-state-layer-height, var(--_radio-state-layer-size));--_radio-state-layer-unchecked-color:var(--forge-radio-state-layer-unchecked-color, var(--_radio-color));--_radio-state-layer-checked-color:var(--forge-radio-state-layer-checked-color, var(--_radio-primary-color));--_radio-state-layer-shape:var(--forge-radio-state-layer-shape, var(--_radio-shape));--_radio-state-layer-dense-width:var(--forge-radio-state-layer-dense-width, var(--_radio-state-layer-dense-size));--_radio-state-layer-dense-height:var(--forge-radio-state-layer-dense-height, var(--_radio-state-layer-dense-size));--_radio-disabled-opacity:var(--forge-radio-disabled-opacity, 0.38);--_radio-animation-duration:var(--forge-radio-animation-duration, var(--forge-animation-duration-short4, 200ms));--_radio-animation-timing-function:var(--forge-radio-animation-timing-function, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_radio-animation-delay:var(--forge-radio-animation-delay, 0ms)}.forge-radio{position:relative;flex-direction:var(--_radio-direction);align-items:var(--_radio-align);justify-content:var(--_radio-justify);gap:var(--_radio-gap);display:flex}.forge-radio .container{position:relative;align-items:center;justify-content:center;display:flex;flex-shrink:0;border-radius:var(--_radio-shape);inline-size:var(--_radio-state-layer-width);block-size:var(--_radio-state-layer-height);cursor:pointer}.forge-radio .background{position:relative;display:inline block;overflow:hidden;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:border-color;box-sizing:border-box;border-radius:var(--_radio-shape);border-width:var(--_radio-border-width);border-style:solid;border-color:var(--_radio-unchecked-border-color);inline-size:var(--_radio-width);block-size:var(--_radio-height);background:var(--_radio-background)}.forge-radio .background::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:top left;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:opacity,scale;border-radius:var(--_radio-shape);inline-size:var(--_radio-mark-width);block-size:var(--_radio-mark-height);background:var(--_radio-mark-color);scale:0.5;opacity:0}.forge-radio .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);cursor:default}.forge-radio .label:empty{display:none}:host([checked]) .forge-radio .background{border-color:var(--_radio-checked-border-color)}:host([checked]) .forge-radio .background::after{scale:1;opacity:1}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-checked-color)}:host([dense]) .forge-radio .container{inline-size:var(--_radio-state-layer-dense-width);block-size:var(--_radio-state-layer-dense-height)}:host([disabled]) .forge-radio .container{opacity:var(--_radio-disabled-opacity);cursor:not-allowed}:host([readonly]) .forge-radio .container{cursor:not-allowed}forge-focus-indicator{--forge-focus-indicator-color:var(--_radio-primary-color);--forge-focus-indicator-outward-offset:0px;--forge-focus-indicator-shape:var(--_radio-state-layer-shape)}forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-unchecked-color)}',vt=class extends Ue(it(Fe(L1(H1(M))))){static get observedAttributes(){return Object.values(f1.observedAttributes)}constructor(){super(),H(this,k9,O9),this[jt]="radio",this._core=new Fi(new Ri(this))}connectedCallback(){super.connectedCallback(),this[P]({role:"radio",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false"}),lt.syncRadioFocusableState(this),this._core.initialize(),this._rootNode=this.getRootNode()}disconnectedCallback(){lt.syncRadioFocusableState(this,{ignoreSelf:!0,rootNode:this._rootNode,form:this._latestAssociatedForm})}attributeChangedCallback(t,e,a){switch(t){case f1.attributes.CHECKED:this._core.checked=p(a);break;case f1.attributes.DEFAULT_CHECKED:this._core.defaultChecked=p(a);break;case f1.attributes.VALUE:this.value=a;break;case f1.attributes.DENSE:this.dense=p(a);break;case f1.attributes.DISABLED:this.disabled=p(a);break;case f1.attributes.REQUIRED:this.required=p(a);break;case f1.attributes.READONLY:this.readonly=p(a);break;case f1.attributes.LABEL_POSITION:this.labelPosition=a;break}super.attributeChangedCallback(t,e,a)}[Lt](){return this.checked?this.value:null}[$t](){return this.checked?"checked":"unchecked"}formAssociatedCallback(t){t&&(this._latestAssociatedForm=t)}formResetCallback(){lt.requestRadioGroupReset(this)}formStateRestoreCallback(t){this.checked=t==="checked"}labelClickedCallback(){this.click()}labelChangedCallback(t){this[P]({ariaLabel:t})}[Ni](){return this._core.tryCheck()}};s([v()],vt.prototype,"checked",2),s([v()],vt.prototype,"defaultChecked",2),s([v()],vt.prototype,"value",2),s([v()],vt.prototype,"dense",2),s([v()],vt.prototype,"disabled",2),s([v()],vt.prototype,"required",2),s([v()],vt.prototype,"readonly",2),s([v()],vt.prototype,"labelPosition",2),vt=s([y({name:f1.elementName,dependencies:[Q,r1]})],vt);function xc(){x(vt)}var Ui=class extends I{constructor(t){super(t)}attachLabel(t){t.nonInteractive=!0,t.forElement=this._component}setDisabled(t){this._component[P]({ariaDisabled:t?"true":null}),this._disableRadios(t)}trySetRequired(){let t=Array.from(this._component.querySelectorAll(f1.elementName)).some(e=>e.required);this._component[P]({ariaRequired:t?"true":null})}_disableRadios(t){this._component.querySelectorAll(f1.elementName).forEach(e=>{e.disabled=t})}};var D9=`${b}radio-group`,bc={DISABLED:"disabled"},P9=w({},bc),po={elementName:D9,observedAttributes:bc,attributes:P9};var Wi=class{constructor(t){this._adapter=t;this._disabled=!1;this._labelConnectedListener=e=>this._handleLabelConnected(e)}initialize(){this._adapter.addHostListener(o2.events.CONNECTED,this._labelConnectedListener),this._adapter.trySetRequired()}_handleLabelConnected(t){t.stopPropagation(),this._adapter.attachLabel(t.target)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(po.attributes.DISABLED,t))}};var N9="<template><slot></slot></template>",Q0=class extends it(L1(H1(M))){get form(){return this[a1].form}get labels(){return this[a1].labels}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}set name(t){K(this,!!t,"name",t)}static get observedAttributes(){return Object.values(po.observedAttributes)}constructor(){super(),H(this,N9),this._core=new Wi(new Ui(this))}connectedCallback(){super.connectedCallback(),this[P]({role:"radiogroup",ariaDisabled:this.disabled?"true":null}),this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case po.attributes.DISABLED:this.disabled=p(a);break}}formDisabledCallback(t){this.disabled=t}labelChangedCallback(t){this[P]({ariaLabel:t!=null?t:null})}};Q0.formAssociated=!0,s([v()],Q0.prototype,"disabled",2),Q0=s([y({name:po.elementName,dependencies:[vt]})],Q0);function yc(){x(Q0)}var Mc=`${b}switch`,Hc={CHECKED:"checked",ON:"on",SELECTED:"selected",DEFAULT_CHECKED:"default-checked",DEFAULT_ON:"default-on",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",ICON:"icon",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},R9=w({},Hc),F9={HIDDEN:"hidden"},U9={ROOT:".forge-switch",LABEL:"#label",ICON_ON:"#icon-on",ICON_OFF:"#icon-off",STATE_LAYER:"forge-state-layer"},W9={CHANGE:`${Mc}-change`},G9={ON:"on",OFF:"off"},i1={attributes:R9,observedAttributes:Hc,classes:F9,selectors:U9,elementName:Mc,events:W9,state:G9};var Gi=class extends I{constructor(t){super(t),this._rootElement=g(t,i1.selectors.ROOT),this._labelElement=g(t,i1.selectors.LABEL),this._iconCheckedElement=g(t,i1.selectors.ICON_ON),this._iconUncheckedElement=g(t,i1.selectors.ICON_OFF),this._stateLayerElement=g(t,i1.selectors.STATE_LAYER)}setChecked(t){this._component[wt](),this._component[P]({ariaChecked:t?"true":"false"})}setDisabled(t){this._component[$1]=!t,this._component[P]({ariaDisabled:t?"true":"false"}),this._stateLayerElement.disabled=t}setRequired(t){this._component[wt](),this._component[P]({ariaRequired:t?"true":"false"})}setReadonly(t){this._component[P]({ariaReadOnly:t?"true":"false"}),this._stateLayerElement.disabled=t}setIconVisibility(t){let e=t==="none"||t==="off",a=t==="none"||t==="on";_2(this._iconCheckedElement,e,i1.classes.HIDDEN),_2(this._iconUncheckedElement,a,i1.classes.HIDDEN)}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}syncValue(t){let e=t?new FormData:null,a=t?i1.state.ON:i1.state.OFF;e&&t&&e.append(this._component.name,t),this._component.setFormValue(e,a)}};var Yi=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._value="on";this._dense=!1;this._disabled=!1;this._required=!1;this._readonly=!1;this._icon="both";this._labelPosition="end";this._clickListener=()=>this._handleChange();this._keydownListener=t=>this._handleKeydown(t);this._keyupListener=t=>this._handleKeyup(t)}get _submittedValue(){return this._checked?this._value:null}initialize(){this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.setIconVisibility(this._icon),this._adapter.syncValue(this._submittedValue)}_handleKeydown(t){t.key===" "&&t.preventDefault()}_handleKeyup(t){t.key===" "&&this._handleChange()}_handleChange(){if(this._readonly)return;let t=this._checked,e=!this._checked;this._checked=e;let a=new Event("change",{cancelable:!0,bubbles:!0}),o=new CustomEvent(i1.events.CHANGE,{detail:e,bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(a),this._adapter.dispatchHostEvent(o),this._checked=t,!(a.defaultPrevented||o.defaultPrevented)&&(this.checked=e)}_setCheckedAttribute(){this._adapter.toggleHostAttribute(i1.attributes.CHECKED,this._checked),this._adapter.toggleHostAttribute(i1.attributes.ON,this._checked),this._adapter.toggleHostAttribute(i1.attributes.SELECTED,this._checked)}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked),this._adapter.syncValue(this._submittedValue),this._setCheckedAttribute())}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(i1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.syncValue(this._submittedValue),(typeof this._value=="string"||this._value==null)&&this._adapter.toggleHostAttribute(i1.attributes.VALUE,!0,this._value))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(i1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(i1.attributes.DISABLED,this._disabled))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setRequired(this._required),this._adapter.toggleHostAttribute(i1.attributes.REQUIRED,this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(i1.attributes.READONLY,this._readonly))}get icon(){return this._icon}set icon(t){this._icon!==t&&(this._icon=t,this._adapter.setIconVisibility(this._icon),this._adapter.setHostAttribute(i1.attributes.ICON,this._icon))}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(i1.attributes.LABEL_POSITION,this._labelPosition))}};var Y9='<template><div class="forge-switch" part="switch"><div id="container" class="container"><div class="track" part="track"></div><div class="handle" part="handle"><div id="icon-off" class="icon icon__off" part="icon-off"><slot name="icon-off"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M20 13H4v-2h16v2z"/></svg></slot></div><div id="icon-on" class="icon icon__on" part="icon-on"><slot name="icon-on"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"/></svg></slot></div><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator></div><label id="label" class="label" part="label"><slot></slot></label></div></template>',K9=':host{display:inline-block;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-switch{--_switch-handle-size:var(--forge-switch-handle-size, 20px);--_switch-handle-scale:var(--forge-switch-handle-scale, 1);--_switch-handle-elevation:var(--forge-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_switch-track-border-width:var(--forge-switch-track-border-width, 0);--_switch-track-border-color:var(--forge-switch-track-border-color, transparent);--_switch-icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_switch-icon-size:var(--forge-switch-icon-size, 16px);--_switch-icon-scale:var(--forge-switch-icon-scale, 1);--_switch-state-layer-size:var(--forge-switch-state-layer-size, 40px);--_switch-state-layer-dense-size:var(--forge-switch-state-layer-dense-size, 28px);--_switch-handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_switch-handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_switch-handle-width:var(--forge-switch-handle-width, var(--_switch-handle-size));--_switch-handle-height:var(--forge-switch-handle-height, var(--_switch-handle-size));--_switch-handle-on-scale:var(--forge-switch-handle-on-scale, var(--_switch-handle-scale));--_switch-handle-off-scale:var(--forge-switch-handle-off-scale, var(--_switch-handle-scale));--_switch-handle-shape:var(--forge-switch-handle-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_switch-handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_switch-handle-elevation));--_switch-handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_switch-handle-elevation));--_switch-track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_switch-track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_switch-track-width:var(--forge-switch-track-width, 36px);--_switch-track-height:var(--forge-switch-track-height, 14px);--_switch-track-shape:var(--forge-switch-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_switch-track-on-border-width:var(--forge-switch-track-on-border-width, var(--_switch-track-border-width));--_switch-track-off-border-width:var(--forge-switch-track-off-border-width, var(--_switch-track-border-width));--_switch-track-on-border-color:var(--forge-switch-track-on-border-color, var(--_switch-track-border-color));--_switch-track-off-border-color:var(--forge-switch-track-off-border-color, var(--_switch-track-border-color));--_switch-icon-on-color:var(--forge-switch-icon-on-color, var(--_switch-icon-color));--_switch-icon-off-color:var(--forge-switch-icon-off-color, var(--_switch-icon-color));--_switch-icon-on-size:var(--forge-switch-icon-on-size, var(--_switch-icon-size));--_switch-icon-off-size:var(--forge-switch-icon-off-size, var(--_switch-icon-size));--_switch-icon-on-scale:var(--forge-switch-icon-on-scale, var(--_switch-icon-scale));--_switch-icon-off-scale:var(--forge-switch-icon-off-scale, var(--_switch-icon-scale));--_switch-gap:var(--forge-switch-gap, 0);--_switch-justify:var(--forge-switch-justify, start);--_switch-align:var(--forge-switch-align, center);--_switch-direction:var(--forge-switch-direction, initial);--_switch-state-layer-width:var(--forge-switch-state-layer-width, var(--_switch-state-layer-size));--_switch-state-layer-height:var(--forge-switch-state-layer-height, var(--_switch-state-layer-size));--_switch-state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_switch-handle-on-color));--_switch-state-layer-off-color:var(--forge-switch-state-layer-off-color, var(--_switch-color));--_switch-state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_switch-state-layer-dense-size));--_switch-state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_switch-state-layer-dense-size));--_switch-disabled-opacity:var(--forge-switch-disabled-opacity, 0.38);--_switch-handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_switch-handle-on-color));--_switch-handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_switch-handle-off-color));--_switch-handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_switch-handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_switch-handle-active-scale));--_switch-handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_switch-handle-active-scale));--_switch-handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_switch-handle-elevation));--_switch-handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-handle-active-off-elevation:var(--forge-switch-handle-active-off-elevation, var(--_switch-handle-active-elevation));--_switch-track-active-on-color:var(--forge-switch-track-active-on-color, var(--_switch-track-on-color));--_switch-track-active-off-color:var(--forge-switch-track-active-off-color, var(--_switch-track-off-color));--_switch-track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_switch-track-on-border-width));--_switch-track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_switch-track-off-border-width));--_switch-track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_switch-track-on-border-color));--_switch-track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_switch-track-off-border-color));--_switch-icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_switch-icon-on-color));--_switch-icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_switch-icon-off-color));--_switch-icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_switch-icon-on-scale));--_switch-icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_switch-icon-off-scale));--_switch-animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_switch-animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_switch-active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)))}.forge-switch{display:flex;position:relative;flex-direction:var(--_switch-direction);align-items:var(--_switch-align);justify-content:var(--_switch-justify);gap:var(--_switch-gap);--_switch-current-state-layer-width:var(--_switch-state-layer-width);--_switch-current-state-layer-height:var(--_switch-state-layer-height)}.forge-switch .container{position:relative;align-items:center;display:flex;flex-shrink:0;block-size:max(var(--_switch-handle-height),var(--_switch-track-height),var(--_switch-current-state-layer-height));cursor:pointer}.forge-switch .input{position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}.forge-switch .track{transition-property:background-color,border-color,border-width;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);box-sizing:border-box;margin-inline:calc(max(var(--_switch-handle-width),var(--_switch-current-state-layer-width))/ 2 - calc(var(--_switch-track-height)/ 2));border-width:var(--_switch-track-off-border-width);border-color:var(--_switch-track-off-border-color);border-style:solid;border-radius:var(--_switch-track-shape);inline-size:var(--_switch-track-width);block-size:var(--_switch-track-height);background-color:var(--_switch-track-off-color)}.forge-switch .handle{position:absolute;justify-content:center;align-items:center;display:flex;transition-property:translate;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-current-state-layer-width);block-size:var(--_switch-current-state-layer-height)}.forge-switch .handle::before{content:"";position:relative;display:block;scale:var(--_switch-handle-off-scale);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing);box-shadow:var(--_switch-handle-off-elevation);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-handle-width);block-size:var(--_switch-handle-height);background-color:var(--_switch-handle-off-color)}.forge-switch .icon{position:absolute;align-items:center;justify-content:center;display:flex;transition-property:opacity,scale;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);inline-size:var(--_switch-icon-off-size);block-size:var(--_switch-icon-off-size);color:var(--_switch-icon-off-color);fill:var(--_switch-icon-off-color);font-size:var(--_switch-icon-off-size);--forge-icon-font-size:var(--_switch-icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_switch-icon-on-size);inline-size:var(--_switch-icon-on-size);block-size:var(--_switch-icon-on-size);color:var(--_switch-icon-on-color);fill:var(--_switch-icon-on-color);font-size:var(--_switch-icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_switch-icon-off-scale)}.forge-switch .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-switch .label:empty{display:none}.forge-switch .hidden{display:none}.forge-switch ::slotted([slot=input]){position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}:host([checked]) .track{border-width:var(--_switch-track-on-border-width);border-color:var(--_switch-track-on-border-color);background-color:var(--_switch-track-on-color)}:host([checked]) .handle{translate:calc(var(--_switch-track-width) - calc(var(--_switch-track-height)/ 2) * 2)}:host([checked]) .handle::before{scale:var(--_switch-handle-on-scale);box-shadow:var(--_switch-handle-on-elevation);background-color:var(--_switch-handle-on-color)}:host([checked]) .handle .icon__on{opacity:1;scale:var(--_switch-icon-on-scale)}:host([checked]) .handle .icon__off{opacity:0;scale:0.4}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-on-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .track{border-width:var(--_switch-track-active-off-border-width);border-color:var(--_switch-track-active-off-border-color);background-color:var(--_switch-track-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-off-scale);box-shadow:var(--_switch-handle-active-off-elevation);background-color:var(--_switch-handle-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-off-scale);color:var(--_switch-icon-active-off-color);fill:var(--_switch-icon-active-off-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .track{border-width:var(--_switch-track-active-on-border-width);border-color:var(--_switch-track-active-on-border-color);background-color:var(--_switch-track-active-on-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-on-scale);box-shadow:var(--_switch-handle-active-on-elevation);background-color:var(--_switch-handle-active-on-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-on-scale);color:var(--_switch-icon-active-on-color);fill:var(--_switch-icon-active-on-color)}:host([dense]) .forge-switch{--_switch-current-state-layer-width:var(--_switch-state-layer-dense-width);--_switch-current-state-layer-height:var(--_switch-state-layer-dense-height)}:host([disabled]) .forge-switch .container{opacity:var(--_switch-disabled-opacity);cursor:not-allowed}:host([disabled]) .forge-switch .handle::before{box-shadow:none}:host([readonly]) .forge-switch .container{cursor:not-allowed}@media (prefers-reduced-motion){.switch{--_switch-animation-duration:var(--forge-switch-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_switch-track-shape);--forge-focus-indicator-outward-offset:0px}',W2=class extends Ue(it(Fe(L1(H1(M))))){static get observedAttributes(){return Object.values(i1.observedAttributes)}constructor(){super(),H(this,Y9,K9),this[jt]="checkbox",this._core=new Yi(new Gi(this))}connectedCallback(){super.connectedCallback(),this[P]({role:"switch",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"}),this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case i1.observedAttributes.CHECKED:case i1.observedAttributes.ON:case i1.observedAttributes.SELECTED:this.checked=p(a);break;case i1.observedAttributes.DEFAULT_CHECKED:case i1.observedAttributes.DEFAULT_ON:this.defaultChecked=p(a);break;case i1.observedAttributes.VALUE:this.value=a;break;case i1.observedAttributes.DENSE:this.dense=p(a);break;case i1.observedAttributes.DISABLED:this.disabled=p(a);break;case i1.observedAttributes.REQUIRED:this.required=p(a);break;case i1.observedAttributes.READONLY:this.readonly=p(a);break;case i1.observedAttributes.ICON:this.icon=a;break;case i1.observedAttributes.LABEL_POSITION:this.labelPosition=a;break}super.attributeChangedCallback(t,e,a)}[Lt](){return this.checked?this.value:null}[$t](){return this.checked?i1.state.ON:i1.state.OFF}[wt](){this[a1].setValidity({valueMissing:this.required&&!this.checked},this[Xt]({checked:this.checked,required:this.required}))}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t){this.checked=t===i1.state.ON}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[P]({ariaLabel:t})}setFormValue(t,e){if(this[a1].setFormValue(t,e),e){let a=Pt(e)?e:e[this.name];this.checked=a===i1.state.ON;return}Pt(t)?this.checked=!!t:t!=null&&t[this.name]?this.checked=!!t[this.name]:this.checked=!1}toggle(t){k(t)?this._core.checked=t:this._core.checked=!this._core.checked}};s([v()],W2.prototype,"checked",2),s([v({name:"checked"})],W2.prototype,"on",2),s([v({name:"checked"})],W2.prototype,"selected",2),s([v()],W2.prototype,"defaultChecked",2),s([v({name:"defaultChecked"})],W2.prototype,"defaultOn",2),s([v()],W2.prototype,"value",2),s([v()],W2.prototype,"dense",2),s([v()],W2.prototype,"disabled",2),s([v()],W2.prototype,"required",2),s([v()],W2.prototype,"readonly",2),s([v()],W2.prototype,"icon",2),s([v()],W2.prototype,"labelPosition",2),W2=s([y({name:i1.elementName,dependencies:[Q,r1]})],W2);var Lc=class extends a2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get checked(){return this._element.checked}set checked(t){this._element.checked=t}get on(){return this._element.on}set on(t){this._element.on=t}get selected(){return this._element.selected}set selected(t){this._element.selected=t}get defaultChecked(){return this._element.defaultChecked}set defaultChecked(t){this._element.defaultChecked=t}get defaultOn(){return this._element.defaultOn}set defaultOn(t){this._element.defaultOn=t}get icon(){return this._element.icon}set icon(t){this._element.icon=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get dense(){return this._element.dense}set dense(t){this._element.dense=t}get required(){return this._element.required}set required(t){this._element.required=t}get readonly(){return this._element.readonly}set readonly(t){this._element.readonly=t}get name(){return this._element.name}set name(t){this._element.name=t}get labelPosition(){return this._element.labelPosition}set labelPosition(t){this._element.labelPosition=t}onChange(t){this._element.addEventListener(i1.events.CHANGE,({detail:e})=>t(e))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setLabel(t){this._element.innerText=t!=null?t:""}toggle(t){this._element.toggle(t)}_build(){return document.createElement(i1.elementName)}_configure(){var t,e;(t=this._config.options)!=null&&t.id&&(this._element.id=this._config.options.id),(e=this._config.options)!=null&&e.label&&(this._element.innerText=this._config.options.label)}};function Ic(){x(W2)}var Vc=`${b}label`,Ec={FOR:"for",DYNAMIC:"dynamic",NON_INTERACTIVE:"non-interactive",LEGEND:"legend"},q9=w({},Ec),$9={SLOT:"slot"},X9={CONNECTED:`${Vc}-connected`},j9=[I2.elementName,N1.elementName,z1.elementName,J.elementName,f1.elementName,"forge-select",i1.elementName],o2={elementName:Vc,observedAttributes:Ec,attributes:q9,selectors:$9,events:X9,labelableChildSelectors:j9};var Ki=class extends I{constructor(e){super(e);this._targetElement=null;this._slotElement=g(e,o2.selectors.SLOT)}destroy(){var e;(e=this._targetElement)==null||e.labelChangedCallback(null),this._targetElement=null}hasTargetElement(){return!!this._targetElement}getTargetElement(){return this._targetElement}setTargetElement(e){if(e&&this._checkLabelAwareness(e)){this._targetElement=e;return}this._targetElement=null}trySetTarget(e){this._targetElement=this._locateTargetElement(e)}clickTarget(){var e,a;(a=(e=this._targetElement)==null?void 0:e.labelClickedCallback)==null||a.call(e)}updateTargetLabel(){var o,n;if(!this._targetElement)return;let e=(o=this._component.textContent)!=null?o:"";if(this._component.contains(this._targetElement)){let i=(n=this._targetElement.textContent)!=null?n:"";e=e.replace(i,"")}let a=e.trim();this._targetElement.labelChangedCallback(a)}addSlotChangeListener(e){this._slotElement.addEventListener("slotchange",e)}removeSlotChangeListener(e){this._slotElement.removeEventListener("slotchange",e)}addMutationObserver(e){this._mutationObserver=new MutationObserver(e),this._mutationObserver.observe(this._component,{subtree:!0,characterData:!0,childList:!0}),e([],this._mutationObserver)}removeMutationObserver(){var e;(e=this._mutationObserver)==null||e.disconnect(),this._mutationObserver=void 0}_checkLabelAwareness(e){return lc(e)?!0:(console.warn("Label target element is not label aware.",e),!1)}_locateTargetElement(e){let a;if(e)a=this._component.getRootNode().querySelector(`#${e}`);else{let o=o2.labelableChildSelectors.join(",");a=this._component.querySelector(o)}return a&&!a.shadowRoot?(a.setAttribute(Wo,""),a[Ga]=this._component,null):a&&!this._checkLabelAwareness(a)?null:a}};var qi=class{constructor(t){this._adapter=t;this._dynamic=!1;this._nonInteractive=!1;this._legend=!1;this._isConnected=!1;this._clickListener=e=>this._handleClick(e),this._slotChangeListener=()=>this._handleSlotChange(),this._mutationCallback=()=>this._handleMutation()}initialize(){this._legend?this._initializeAsLegend():this._initializeAsLabel()}destroy(){this._disconnect(),this._adapter.destroy()}update(){this._adapter.updateTargetLabel()}updateTarget(t){return this._adapter.setTargetElement(t),this._adapter.hasTargetElement()?(this._connect(),!0):!1}async _initializeAsLegend(){await Qt(),this._adapter.dispatchHostEvent(new CustomEvent(o2.events.CONNECTED,{bubbles:!0}))}async _initializeAsLabel(){var t;this._adapter.addSlotChangeListener(this._slotChangeListener),this._adapter.trySetTarget((t=this._for)!=null?t:null),this._adapter.hasTargetElement()&&this._connect()}_handleClick(t){var a;let e=(a=this._clickTarget)!=null?a:this._adapter.getTargetElement();t.target===e||e!=null&&e.contains(t.target)||this._adapter.clickTarget()}_handleSlotChange(){!this._for&&!this._forElement&&(this._adapter.trySetTarget(null),this._tryConnect())}_handleMutation(){this._adapter.updateTargetLabel()}_connect(){this._nonInteractive||this._adapter.addHostListener("click",this._clickListener),this._adapter.updateTargetLabel(),this._dynamic&&this._adapter.addMutationObserver(this._mutationCallback),this._isConnected=!0}_disconnect(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeMutationObserver(),this._isConnected=!1}_tryConnect(){this._adapter.hasTargetElement()?this._isConnected||this._connect():this._disconnect()}get for(){return this._for}set for(t){var e,a;this._for!==t&&(this._for=t,this._adapter.toggleHostAttribute(o2.attributes.FOR,!!this.for,(e=this.for)!=null?e:void 0),this._adapter.trySetTarget((a=this._for)!=null?a:null),this._tryConnect())}get forElement(){return this._forElement}set forElement(t){var e;this._forElement!==t&&(this._forElement=t,this._adapter.setTargetElement((e=this._forElement)!=null?e:null),this._tryConnect())}get clickTarget(){return this._clickTarget}set clickTarget(t){this._clickTarget!==t&&(this._clickTarget=t)}get dynamic(){return this._dynamic}set dynamic(t){this._dynamic!==t&&(this._dynamic=t,this._adapter.toggleHostAttribute(o2.attributes.DYNAMIC,this._dynamic),this._dynamic?this._adapter.hasTargetElement()&&this._adapter.addMutationObserver(this._mutationCallback):this._adapter.removeMutationObserver())}get nonInteractive(){return this._nonInteractive}set nonInteractive(t){if(this._nonInteractive!==t){if(this._nonInteractive=t,this._adapter.toggleHostAttribute(o2.attributes.NON_INTERACTIVE,this._nonInteractive),!this._isConnected)return;this._nonInteractive?this._adapter.removeHostListener("click",this._clickListener):this._adapter.addHostListener("click",this._clickListener)}}get legend(){return this._legend}set legend(t){var e;if(this._legend!==t){if(this._legend=t,this._adapter.toggleHostAttribute(o2.attributes.LEGEND,this._legend),this._legend){this._adapter.removeSlotChangeListener(this._slotChangeListener),this._adapter.dispatchHostEvent(new CustomEvent(o2.events.CONNECTED,{bubbles:!0}));return}this._adapter.addSlotChangeListener(this._slotChangeListener),this._adapter.trySetTarget((e=this._for)!=null?e:null),this._adapter.hasTargetElement()&&this._connect()}}};var Z9="<template><slot></slot></template>",Q9=':host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);display:inline-block;cursor:default}:host([hidden]){display:none}',ve=class extends M{static get observedAttributes(){return Object.values(o2.observedAttributes)}constructor(){super(),H(this,Z9,Q9),this._core=new qi(new Ki(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case o2.attributes.FOR:this.for=a;break;case o2.attributes.DYNAMIC:this.dynamic=p(a);break;case o2.attributes.NON_INTERACTIVE:this.nonInteractive=p(a);break;case o2.attributes.LEGEND:this.legend=p(a);break}}update(){this._core.update()}[Zr](t){return this._core.updateTarget(t)}};s([v()],ve.prototype,"for",2),s([v()],ve.prototype,"forElement",2),s([v()],ve.prototype,"clickTarget",2),s([v()],ve.prototype,"dynamic",2),s([v()],ve.prototype,"nonInteractive",2),s([v()],ve.prototype,"legend",2),ve=s([y({name:o2.elementName})],ve);function Cc(){x(ve)}var zc={LABEL_POSITION:"label-position",LABEL_ALIGNMENT:"label-alignment",INVALID:"invalid",REQUIRED:"required",OPTIONAL:"optional",DISABLED:"disabled",FLOAT_LABEL:"float-label",VARIANT:"variant",THEME:"theme",SHAPE:"shape",DENSITY:"density",DENSE:"dense",POPOVER_ICON:"popover-icon",POPOVER_EXPANDED:"popover-expanded",SUPPORT_TEXT_INSET:"support-text-inset"},J9=w({},zc),tw={DEFAULT_VARIANT:"outlined",DEFAULT_THEME:"default",DEFAULT_SHAPE:"default",DEFAULT_DENSITY:"default",DEFAULT_LABEL_POSITION:"inset",DEFAULT_LABEL_ALIGNMENT:"default",DEFAULT_SUPPORT_TEXT_INSET:"none"},F={observedAttributes:zc,attributes:J9,defaults:tw};var T4=`${b}field`,Ac=t1(w({},F.observedAttributes),{MULTILINE:"multiline",FOCUS_INDICATOR_ALLOW_FOCUS:"focus-indicator-allow-focus",FOCUS_INDICATOR_FOCUS_MODE:"focus-indicator-focus-mode"}),ew=t1(w({},Ac),{MULTI_INPUT_SEPARATOR:"data-forge-multi-input-separator"}),aw={FLOATING_IN:"floating-in",FLOATING_OUT:"floating-out",HAS_LABEL:"has-label",HAS_START:"has-start",HAS_END:"has-end",HAS_ACCESSORY:"has-accessory",HAS_SUPPORT_START:"has-support-text-start",HAS_SUPPORT_END:"has-support-text-end"},ow={ROOT:"#root",CONTAINER:"#container",INPUT_CONTAINER:"#input",LABEL:"#label",LABEL_SLOT:"slot[name=label]",POPOVER_ICON:"#popover-icon",LABEL_ELEMENTS:`:where(label, ${o2.elementName})`,POPOVER_TARGET:".popover-target"},rw={ROOT:"root",LABEL:"label",SURFACE:"surface",START:"start",INPUT:"input",END:"end",POPOVER_ICON:"popover-icon",ACCESSORY:"accessory",SUPPORT_TEXT:"support-text",SUPPORT_TEXT_END:"support-text-end",FOCUS_INDICATOR:"focus-indicator"},nw={POPOVER_ICON_CLICK:`${T4}-popover-icon-click`,POPOVER_ICON_MOUSEDOWN:`${T4}-popover-icon-mousedown`},iw=w({},F.defaults),sw={FLOAT_IN_LABEL:"float-in-label-animation",FLOAT_OUT_LABEL:"float-out-label-animation"},V={elementName:T4,observedAttributes:Ac,attributes:ew,classes:aw,selectors:ow,parts:rw,events:nw,defaults:iw,animations:sw};var $i=class extends I{get focusIndicator(){return this._focusIndicatorElement}get hasSlottedLabel(){return!!this._labelSlotElement.assignedNodes({flatten:!0}).length}constructor(t){super(t),this._rootElement=g(t,V.selectors.ROOT),this._containerElement=g(t,V.selectors.CONTAINER),this._inputContainerElement=g(t,V.selectors.INPUT_CONTAINER),this._labelElement=g(t,V.selectors.LABEL),this._labelSlotElement=g(t,V.selectors.LABEL_SLOT),this._popoverIconElement=g(t,V.selectors.POPOVER_ICON),this._focusIndicatorElement=g(t,m1.elementName)}addRootListener(t,e){this._rootElement.addEventListener(t,e)}addPopoverIconListener(t,e){this._popoverIconElement.addEventListener(t,e)}removePopoverIconListener(t,e){this._popoverIconElement.removeEventListener(t,e)}setLabelPosition(t){this._labelElement.remove(),t==="inset"?this._containerElement.prepend(this._labelElement):this._rootElement.prepend(this._labelElement)}setFloatingLabel(t){let e=t?V.classes.FLOATING_IN:V.classes.FLOATING_OUT,a=t?V.animations.FLOAT_IN_LABEL:V.animations.FLOAT_OUT_LABEL,o=n=>{n.animationName===a&&(we(e,this._rootElement),this._rootElement.removeEventListener("animationend",o))};y1(e,this._rootElement),this._rootElement.addEventListener("animationend",o)}handleSlotChange(t){if(t.name===""){this._trySlotLabel(t);return}for(;t.assignedSlot;)t=t.assignedSlot;if(!t)return;let e={label:V.classes.HAS_LABEL,start:V.classes.HAS_START,end:V.classes.HAS_END,accessory:V.classes.HAS_ACCESSORY,"support-text":V.classes.HAS_SUPPORT_START,"support-text-end":V.classes.HAS_SUPPORT_END};t.name in e&&_2(this._rootElement,!!t.assignedNodes({flatten:!0}).length,e[t.name])}initializeSlots(){this._rootElement.querySelectorAll("slot").forEach(e=>this.handleSlotChange(e))}_trySlotLabel(t){t.assignedElements({flatten:!0}).filter(o=>o.matches(V.selectors.LABEL_ELEMENTS)).forEach(o=>{o.slot||(o.slot="label")})}};var Xi=class{constructor(t){this._adapter=t;this._labelPosition=V.defaults.DEFAULT_LABEL_POSITION;this._labelAlignment=V.defaults.DEFAULT_LABEL_ALIGNMENT;this._floatLabel=!1;this._invalid=!1;this._required=!1;this._optional=!1;this._disabled=!1;this._variant=V.defaults.DEFAULT_VARIANT;this._theme=V.defaults.DEFAULT_THEME;this._shape=V.defaults.DEFAULT_SHAPE;this._density=V.defaults.DEFAULT_DENSITY;this._dense=!1;this._popoverIcon=!1;this._popoverExpanded=!1;this._multiline=!1;this._supportTextInset=V.defaults.DEFAULT_SUPPORT_TEXT_INSET;this._slotChangeListener=this._onSlotChange.bind(this);this._popoverIconClickListener=this._onPopoverIconClick.bind(this);this._popoverIconMousedownListener=this._onPopoverIconMousedown.bind(this)}initialize(){this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.initializeSlots(),this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),this._adapter.setLabelPosition(this._labelPosition),this._popoverIcon&&(this._adapter.addPopoverIconListener("click",this._popoverIconClickListener),this._adapter.addPopoverIconListener("mousedown",this._popoverIconMousedownListener))}_onSlotChange(t){this._adapter.handleSlotChange(t.target)}_onPopoverIconClick(){this._adapter.dispatchHostEvent(new CustomEvent(V.events.POPOVER_ICON_CLICK,{bubbles:!0,composed:!0}))}_onPopoverIconMousedown(t){let e=new CustomEvent(V.events.POPOVER_ICON_MOUSEDOWN,{bubbles:!0,composed:!0,cancelable:!0});this._adapter.dispatchHostEvent(e),e.defaultPrevented&&t.preventDefault()}floatLabelWithoutAnimation(t){this._floatLabel!==t&&(this._floatLabel=t,this._adapter.toggleHostAttribute(V.attributes.FLOAT_LABEL,this._floatLabel))}get labelPosition(){return this._labelPosition}set labelPosition(t){if(this._labelPosition!==t){if(this._labelPosition=t,this._adapter.setHostAttribute(V.attributes.LABEL_POSITION,this._labelPosition),!this._adapter.isConnected)return;this._adapter.setLabelPosition(this._labelPosition)}}get labelAlignment(){return this._labelAlignment}set labelAlignment(t){this._labelAlignment!==t&&(this._labelAlignment=t,this._adapter.setHostAttribute(V.attributes.LABEL_ALIGNMENT,this._labelAlignment))}get floatLabel(){return this._floatLabel}set floatLabel(t){this._floatLabel!==t&&(this._floatLabel=t,this._adapter.hasSlottedLabel&&this._adapter.setFloatingLabel(this._floatLabel),this._adapter.toggleHostAttribute(V.attributes.FLOAT_LABEL,this._floatLabel))}get invalid(){return this._invalid}set invalid(t){this._invalid!==t&&(this._invalid=t,this._adapter.toggleHostAttribute(V.attributes.INVALID,this._invalid))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(V.attributes.REQUIRED,this._required))}get optional(){return this._optional}set optional(t){this._optional!==t&&(this._optional=t,this._adapter.toggleHostAttribute(V.attributes.OPTIONAL,this._optional))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.toggleHostAttribute(V.attributes.DISABLED,this._disabled))}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t,this._adapter.setHostAttribute(V.attributes.VARIANT,this._variant))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.setHostAttribute(V.attributes.THEME,this._theme))}get shape(){return this._shape}set shape(t){this._shape!==t&&(this._shape=t,this._adapter.setHostAttribute(V.attributes.SHAPE,this._shape))}get density(){return this._density}set density(t){this._density!==t&&(this._density=t,this._adapter.setHostAttribute(V.attributes.DENSITY,this._density))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(V.attributes.DENSE,this._dense))}get popoverIcon(){return this._popoverIcon}set popoverIcon(t){if(this._popoverIcon!==t){if(this._popoverIcon=t,this._adapter.toggleHostAttribute(V.attributes.POPOVER_ICON,this._popoverIcon),!this._adapter.isConnected)return;this._popoverIcon?(this._adapter.addPopoverIconListener("click",this._popoverIconClickListener),this._adapter.addPopoverIconListener("mousedown",this._popoverIconMousedownListener)):(this._adapter.removePopoverIconListener("click",this._popoverIconClickListener),this._adapter.removePopoverIconListener("mousedown",this._popoverIconMousedownListener))}}get popoverExpanded(){return this._popoverExpanded}set popoverExpanded(t){this._popoverExpanded!==t&&(this._popoverExpanded=t,this._adapter.toggleHostAttribute(V.attributes.POPOVER_EXPANDED,this._popoverExpanded))}get multiline(){return this._multiline}set multiline(t){this._multiline!==t&&(this._multiline=t,this._adapter.toggleHostAttribute(V.attributes.MULTILINE,this._multiline))}get supportTextInset(){return this._supportTextInset}set supportTextInset(t){this._supportTextInset!==t&&(this._supportTextInset=t,this._adapter.setHostAttribute(V.attributes.SUPPORT_TEXT_INSET,this._supportTextInset))}get focusIndicatorTargetElement(){return this._adapter.focusIndicator.targetElement}set focusIndicatorTargetElement(t){this._adapter.focusIndicator.targetElement=t}get focusIndicatorFocusMode(){return this._adapter.focusIndicator.focusMode}set focusIndicatorFocusMode(t){this._adapter.focusIndicator.focusMode=t}get focusIndicatorAllowFocus(){return this._adapter.focusIndicator.allowFocus}set focusIndicatorAllowFocus(t){this._adapter.focusIndicator.allowFocus=t}};var lw='<template><div id="root" class="forge-field" part="root"><div id="label" class="label" part="label"><slot name="label"></slot></div><div id="container" class="container"><div class="popover-target" aria-hidden="true"></div><div id="surface" class="surface" part="surface"></div><div id="start" class="start" part="start"><slot name="start"></slot></div><div id="input" class="input" part="input"><slot></slot></div><div id="end" class="end" part="end"><slot name="end"></slot></div><div id="popover-icon" class="popover-icon" part="popover-icon"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" aria-hidden="true"><path d="M0 0h24v24H0z" fill="none"/><path d="M7 10l5 5 5-5z" id="popover-icon__arrow"/></svg></div><div id="accessory" class="accessory" part="accessory"><slot name="accessory"></slot></div></div><div class="support-text"><div class="support-text-start" part="support-text"><slot name="support-text"></slot></div><div class="support-text-end" part="support-text-end"><slot name="support-text-end"></slot></div></div><div class="outline"><forge-focus-indicator target="input" part="focus-indicator"></forge-focus-indicator></div></div></template>',vw='@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes multiline-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}@layer base,theme,variant,shape,density; @layer base{:host{display:block}:host([hidden]){display:none}.forge-field{--_field-background:var(--forge-field-background, transparent);--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-surface-container-low, #ebebeb));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-surface-container-minimum, #f5f5f5));--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-surface-bright, #ffffff));--_field-outline-style:var(--forge-field-outline-style, solid);--_field-outline-width:var(--forge-field-outline-width, var(--forge-border-thin, 1px));--_field-shape:var(--forge-field-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_field-height:var(--forge-field-height, 40px);--_field-inset-height:var(--forge-field-inset-height, 48px);--_field-padding-inline:var(--forge-field-padding-inline, 12px);--_field-padding-inline-start:var(--forge-field-padding-inline-start, var(--_field-padding-inline));--_field-padding-inline-end:var(--forge-field-padding-inline-end, var(--_field-padding-inline));--_field-inner-padding-inline:var(--forge-field-inner-padding-inline, 8px);--_field-rounded-container-padding-inline:var(--forge-field-rounded-container-padding-inline, calc(var(--_field-height) / 2));--_field-rounded-container-padding-inline-start:var(--forge-field-rounded-container-padding-inline-start, var(--_field-rounded-container-padding-inline));--_field-rounded-container-padding-inline-end:var(--forge-field-rounded-container-padding-inline-end, var(--_field-rounded-container-padding-inline));--_field-support-text-margin-block:var(--forge-field-support-text-margin-block, 4px);--_field-support-text-gap:var(--forge-field-support-text-gap, 8px);--_field-support-text-padding-inline:var(--forge-field-support-text-padding-inline, var(--_field-padding-inline));--_field-support-text-padding-inline-start:var(--forge-field-support-text-padding-inline-start, var(--_field-support-text-padding-inline));--_field-support-text-padding-inline-end:var(--forge-field-support-text-padding-inline-end, var(--_field-support-text-padding-inline));--_field-label-margin-inline:var(--forge-field-label-margin-inline, 8px);--_field-label-margin-block:var(--forge-field-label-margin-block, 4px);--_field-required-padding:var(--forge-field-required-padding, 0.35ch);--_field-required-content:var(--forge-field-required-content, "*");--_field-optional-padding:var(--forge-field-optional-padding, 0.5ch);--_field-optional-content:var(--forge-field-optional-content, "(optional)");--_field-multiline-resize:var(--forge-field-multiline-resize, block);--_field-multiline-min-inline-size:var(--forge-field-multiline-min-inline-size, initial);--_field-multiline-max-inline-size:var(--forge-field-multiline-max-inline-size, initial);--_field-multiline-min-block-size:var(--forge-field-multiline-min-block-size, var(--_field-height));--_field-multiline-max-block-size:var(--forge-field-multiline-max-block-size, initial);--_field-popover-icon-transition-duration:var(--forge-field-popover-icon-transition-duration, var(--forge-animation-duration-short3, 150ms));--_field-popover-icon-transition-timing:var(--forge-field-popover-icon-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_field-popover-icon-open-rotation:var(--forge-field-popover-icon-open-rotation, 180deg);--_field-surface-animation-duration:var(--forge-field-surface-animation-duration, var(--forge-animation-duration-short4, 200ms));--_field-surface-animation-timing:var(--forge-field-surface-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_field-floating-animation-duration:var(--forge-field-floating-animation-duration, var(--forge-animation-duration-short2, 100ms));--_field-floating-animation-timing:var(--forge-field-floating-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)));--_field-focus-indicator-width:var(--forge-field-focus-indicator-width, var(--forge-focus-indicator-width, var(--forge-border-medium, 2px)));--_field-disabled-opacity:var(--forge-field-disabled-opacity, 0.38);--_field-disabled-background:var(--forge-field-disabled-background, var(--forge-theme-surface-container-low, #ebebeb));--_field-font-size:var(--forge-field-font-size, inherit);--_field-dense-font-size:var(--forge-field-dense-font-size, 0.875rem);--_field-placeholder-color:var(--forge-field-placeholder-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}.forge-field{--_field-disableable-cursor:var(--forge-field-disableable-cursor, unset);--_field-disableable-opacity:var(--forge-field-disableable-opacity, 1);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, 100%);--_field-inner-border-color:var(--forge-field-inner-border-color, var(--_field-outline-color));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--_field-outline-color-hover));--_field-inner-border-display:var(--forge-field-inner-border-display, block);--_field-label-color:var(--forge-field-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_field-label-grid-area:var(--forge-field-label-grid-area, "label");--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--_field-multiline-inset-label-background));--_field-surface-display:var(--forge-field-surface-display, block);position:relative;display:grid}}@layer theme{:host(:where([theme=default],:not([theme]))) .forge-field{--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-outline-low, #9e9e9e));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-outline-high, #212121));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-filled-background));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--_field-tonal-background));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--_field-tonal-background-hover));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-outline-low, #9e9e9e));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-outline-high, #212121))}:host(:where([label-position=inset],:not([label-position])):where([theme=default],:not([theme]))) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}:host([theme=primary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-primary-container-low, #e8eaf6));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-primary-container, #222c62));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-primary, #3f51b5));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-primary-container, #222c62));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-primary-container-low, #222c62));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-primary-container-low, #e8eaf6));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-primary, #3f51b5));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-primary-container, #222c62))}:host(:where([label-position=inset],:not([label-position]))[theme=primary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-primary-container-low, #222c62))}:host([theme=secondary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-secondary, #ffc107));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-secondary-container-low, #fff8e1));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-secondary-container, #8a6804));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-secondary-container-low, #8a6804));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-secondary-container-low, #fff8e1));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-secondary-container, #8a6804))}:host(:where([label-position=inset],:not([label-position]))[theme=secondary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-secondary-container-low, #8a6804))}:host([theme=tertiary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-tertiary-container, #213189));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-tertiary, #3d5afe));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-tertiary-container, #213189));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-tertiary-container-low, #213189));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-tertiary, #3d5afe));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-tertiary-container, #213189))}:host(:where([label-position=inset],:not([label-position]))[theme=tertiary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-tertiary-container-low, #213189))}:host([theme=success]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-success-container-minimum, #f7faf7));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-success, #2e7d32));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-success-container-low, #e6efe6));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-success-container-minimum, #f7faf7));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-success-container, #19441b));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-success, #2e7d32));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-success-container, #19441b));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-success-container-low, #19441b));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-success-container-minimum, #f7faf7));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-success-container-low, #e6efe6));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-success-container-minimum, #f7faf7));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-success, #2e7d32));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-success-container, #19441b))}:host(:where([label-position=inset],:not([label-position]))[theme=success]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-success-container-low, #19441b))}:host([theme=error]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-error, #b00020));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-error-container, #5f0011));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-error, #b00020));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-error-container-low, #5f0011));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-error, #b00020));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-error-container, #5f0011))}:host(:where([label-position=inset],:not([label-position]))[theme=error]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-error-container-low, #5f0011))}:host([theme=warning]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-warning, #d14900));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-warning-container-low, #f9e9e0));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-warning-container, #712700));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-warning, #d14900));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-warning-container, #712700));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-warning-container-low, #712700));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-warning-container-low, #f9e9e0));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-warning, #d14900));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-warning-container, #712700))}:host(:where([label-position=inset],:not([label-position]))[theme=warning]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-warning-container-low, #712700))}:host([theme=info]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-info, #1565c0));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-info-container-low, #e3edf7));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-info-container, #0b3768));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-info, #1565c0));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-info-container, #0b3768));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-info-container-low, #0b3768));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-info-container-low, #e3edf7));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-info, #1565c0));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-info-container, #0b3768))}:host(:where([label-position=inset],:not([label-position]))[theme=info]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-info-container-low, #0b3768))}}@layer variant{:host([variant=plain]) .forge-field{--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--forge-theme-surface, #ffffff));--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-display:var(--forge-field-inner-border-display, none);--_field-padding-inline:var(--forge-field-padding-inline, 0);--_field-surface-display:var(--forge-field-surface-display, none)}:host(:where([variant=outlined],:not([variant]))) .forge-field{--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--forge-theme-surface, #ffffff))}:host([variant=tonal]) .forge-field{--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, calc(100% - 8px));--_field-background:var(--_field-tonal-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background));--_field-hover-background:var(--forge-field-hover-background, tonal-background-hover);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-multiline-inset-label-tonal-background))}:host([variant=filled]) .forge-field{--_field-background:var(--_field-filled-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background))}:host([variant=raised]) .forge-field{--_field-elevation:var(--forge-field-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_field-elevation-active:var(--forge-field-elevation-active, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, calc(100% - 8px));--_field-background:var(--_field-filled-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background))}}@layer shape{:host([shape=squared]) .forge-field{--_field-shape:var(--forge-field-shape, 0)}:host([shape=rounded]) .forge-field{--_field-shape:var(--forge-field-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_field-padding-inline:var(--forge-field-padding-inline, var(--_field-rounded-container-padding-inline-start))}}@layer density{:host(:where([label-position=inset],:not([label-position])):not([dense]):where([density=default],:not([density]))) .forge-field{--_field-height:var(--forge-field-height, var(--_field-inset-height))}:host(:where([density=extra-small],[dense])) .forge-field{--_field-height:var(--forge-field-height, 24px);--_field-padding-inline-start:var(--forge-field-padding-inline-start, 8px);--_field-padding-inline-end:var(--forge-field-padding-inline-end, 4px)}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .forge-field{--_field-height:var(--forge-field-height, 24px)}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .label,:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .label::before{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:fixed;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) ::slotted(:where(input,textarea,[data-forge-field-input])){--_field-font-size:var(--_field-dense-font-size)}:host(:not([dense])[density=small]) .forge-field{--_field-height:var(--forge-field-height, 32px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=small]) .forge-field{--_field-height:var(--forge-field-height, 40px)}:host(:not([dense])[density=medium]) .forge-field{--_field-height:var(--forge-field-height, 40px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=medium]) .forge-field{--_field-height:var(--forge-field-height, 48px)}:host(:not([dense])[density=large]) .forge-field{--_field-height:var(--forge-field-height, 48px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=large]) .forge-field{--_field-height:var(--forge-field-height, 56px)}:host(:not([dense])[density=extra-large]) .forge-field{--_field-height:var(--forge-field-height, 56px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=extra-large]) .forge-field{--_field-height:var(--forge-field-height, 64px)}}:host(:not([disabled]):hover) .forge-field{--_field-outline-color:var(--forge-field-outline-color, var(--_field-outline-color-hover));--_field-elevation:var(--forge-field-elevation, var(--_field-elevation-active));--_field-tonal-background:var(--_field-tonal-background-hover);--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--_field-multiline-inset-label-tonal-background-hover));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--_field-inner-border-color-hover))}:host([disabled]) .forge-field{--_field-background:var(--_field-disabled-background);--_field-disableable-cursor:var(--forge-field-disableable-cursor, not-allowed);--_field-disableable-opacity:var(--forge-field-disableable-opacity, var(--_field-disabled-opacity))}:host(:not([disabled])[invalid]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-error, #b00020));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-error-container, #5f0011));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-error, #b00020));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-error-container-low, #5f0011));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-error, #b00020));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-label-color:var(--forge-field-label-color, var(--forge-theme-error, #b00020))}:host(:not([disabled])[invalid]) .forge-field .support-text{color:var(--forge-theme-error,#b00020)}:host(:not([disabled])) .forge-field:has(.input:focus-within){--_field-elevation:var(--forge-field-elevation, var(--_field-elevation-active))}.forge-field .outline{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:outline-color;transition-timing-function:var(--_field-surface-animation-timing);position:relative;grid-area:main;inline-size:100%;block-size:100%;box-shadow:var(--_field-elevation);border-radius:var(--_field-shape);outline-style:var(--_field-outline-style);outline-width:var(--_field-outline-width);outline-color:var(--_field-outline-color);outline-offset:calc(var(--_field-outline-width) * -1);pointer-events:none}.forge-field .container{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);position:relative;display:grid;isolation:isolate;grid-area:main;grid-template-areas:"start center end popover-icon accessory";grid-template-columns:auto 1fr auto auto auto;align-items:center;border-radius:var(--_field-shape);inline-size:100%;block-size:var(--_field-height);overflow:hidden}.forge-field .surface{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:background;transition-timing-function:var(--_field-surface-animation-timing);display:var(--_field-surface-display);grid-column:1/-1;grid-row:1/-1;border-radius:var(--_field-shape);inline-size:100%;block-size:100%;background:var(--_field-background);pointer-events:none}.forge-field .input{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);display:flex;grid-area:center;block-size:100%;inline-size:100%;min-inline-size:0;color:var(--forge-theme-text-high,rgba(0,0,0,.87))}.forge-field .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);position:relative;display:inline-flex;grid-area:var(--_field-label-grid-area);pointer-events:var(--_field-label-pointer-events);margin-block-end:var(--_field-label-margin-block-end);margin-inline-start:var(--_field-label-margin-inline-start);margin-inline-end:var(--_field-label-margin-inline-end);block-size:fit-content;overflow:hidden;color:var(--_field-label-color);line-height:normal;white-space:var(--_field-label-white-space)}.forge-field .popover-target{position:absolute;inset:calc(var(--_field-focus-indicator-width) * -1);pointer-events:none}.forge-field .popover-icon{display:none}.forge-field .popover-icon__arrow{fill:inherit}.forge-field .accessory,.forge-field .end,.forge-field .start,.forge-field .support-text,.forge-field .support-text-end,.forge-field .support-text-start{display:none}:host([required]) .label::before{margin-inline-end:var(--_field-required-padding);color:var(--forge-theme-error,#b00020);content:var(--_field-required-content)}:host([optional]) .label::after{margin-inline-start:var(--_field-optional-padding);color:inherit;content:var(--_field-optional-content)}:host([popover-icon]) .popover-icon{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-end:var(--_field-inner-padding-inline);display:flex;align-items:center;grid-area:popover-icon;isolation:isolate;block-size:100%}:host([popover-icon]) .popover-icon>*{transition:rotate var(--_field-popover-icon-transition-duration) var(--_field-popover-icon-transition-timing);fill:var(--_field-content-color)}:host([popover-icon][popover-expanded]) .popover-icon>*{rotate:var(--_field-popover-icon-open-rotation)}.forge-field.has-start .start{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-start:var(--_field-padding-inline-start);display:flex;grid-area:start;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-end .end{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-end:var(--_field-padding-inline-end);display:flex;grid-area:end;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-accessory .accessory{padding-inline-end:var(--_field-inner-padding-inline);position:relative;display:flex;grid-area:accessory;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-accessory .accessory::before{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:border-color;transition-timing-function:var(--_field-surface-animation-timing);padding-inline-end:var(--_field-inner-padding-inline);display:var(--_field-inner-border-display);border-inline-start-style:solid;border-inline-start-width:var(--_field-outline-width);border-inline-start-color:var(--_field-inner-border-color);block-size:var(--_field-inner-border-block-size);content:""}.forge-field.has-accessory .forge-field:not(.has-accessory) .popover-icon{padding-inline-end:var(--_field-padding-inline-end)}.forge-field.has-support-text-end .support-text,.forge-field.has-support-text-start .support-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);justify-content:space-between;display:grid;grid-template-areas:"start end";grid-template-columns:1fr auto;grid-area:support-text;margin-block-start:var(--_field-support-text-margin-block);line-height:normal}.forge-field.has-support-text-start.has-support-text-end .support-text{gap:var(--_field-support-text-gap)}.forge-field.has-support-text-start .support-text-start{display:inline-block;grid-area:start}.forge-field.has-support-text-end .support-text-end{display:inline-block;grid-area:end}:host(:not([popover-icon])) .forge-field:not(.has-accessory) .end{padding-inline-end:var(--_field-padding-inline-end)}:host([label-position=block-start]) .forge-field{grid-template-areas:"label" "main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto auto}:host([label-position=block-start]) .label{--_field-label-margin-block-end:var(--forge-field-label-margin-block-end, var(--_field-label-margin-block))}:host([label-position=inline-start]) .forge-field{grid-template-areas:"label main" ". support-text";grid-template-columns:auto 1fr;grid-template-rows:auto auto}:host([label-position=inline-start]) .label{--_field-label-margin-inline-end:var(--forge-field-label-margin-inline-end, var(--_field-label-margin-inline))}:host([label-position=inline-end]) .forge-field{grid-template-areas:"main label" "support-text .";grid-template-columns:1fr auto;grid-template-rows:auto auto}:host([label-position=inline-end]) .label{--_field-label-margin-inline-start:var(--forge-field-label-margin-inline-start, var(--_field-label-margin-inline))}:host(:where([label-position=inset],:not([label-position]))) .forge-field{grid-template-areas:"main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto;--_field-label-grid-area:var(--forge-field-label-grid-area, center);--_field-label-pointer-events:var(--forge-field-label-pointer-events, none);--_field-label-white-space:var(--forge-field-label-white-space, nowrap)}:host(:where([label-position=inset],:not([label-position]))) .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);padding-inline-start:var(--_field-padding-inline-start);padding-inline-end:var(--_field-padding-inline-end);z-index:999;--_field-floating-label-translation:var(--forge-field-floating-label-translation, 0 calc(calc(calc(max(var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375))), var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)))) / 2) + calc((var(--_field-height) - 56px) / 8)) * -1))}:host([label-position=none]) .forge-field{grid-template-areas:"main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto}:host([label-position=none]) .label{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:fixed;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}:host([label-position=inline-end][label-alignment=start]) .label,:host([label-position=inline-start][label-alignment=start]) .label{align-self:start}:host([label-position=inline-end]:where([label-alignment=center],[label-alignment=default],:not([label-alignment]))) .label,:host([label-position=inline-start]:where([label-alignment=center],[label-alignment=default],:not([label-alignment]))) .label{align-self:center}:host([label-position=inline-end][label-alignment=end]) .label,:host([label-position=inline-start][label-alignment=end]) .label{align-self:end}:host([label-position=inline-end][label-alignment=baseline]) .label,:host([label-position=inline-start][label-alignment=baseline]) .label{align-self:center;padding-block-start:calc(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))) - var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))}:host([label-position=block-start]:where([label-alignment=start],[label-alignment=default],:not([label-alignment]))) .label{justify-self:start}:host([label-position=block-start][label-alignment=center]) .label{justify-self:center}:host([label-position=block-start][label-alignment=end]) .label{justify-self:end}:host([label-position=block-start][label-alignment=baseline]:not([variant=plain])) .label{justify-self:start;padding-inline-start:var(--_field-padding-inline-start)}:host([label-position=block-start][label-alignment=baseline][variant=plain]) .label{justify-self:start;padding-inline-start:0px}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);translate:var(--_field-floating-label-translation)}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label .input{box-sizing:border-box}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label.floating-in .label{animation-name:float-in-label-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing)}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label.floating-in .input ::slotted(:is(input,[data-forge-field-input],[data-forge-multi-input-separator])){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) * 2)!important}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label:not(.floating-in) .input ::slotted(:is(input,[data-forge-field-input],[data-forge-multi-input-separator])){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) * 2)!important}:host(:where([label-position=inset],:not([label-position])):not([float-label])) .has-label.floating-out .label{animation-name:float-out-label-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing)}:host(:where([label-position=inset],:not([label-position]))[float-label][multiline]) .has-label ::slotted(textarea){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) + (var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)!important;padding-block-end:calc((var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)!important}:host([support-text-inset=both]) .support-text{padding-inline-start:var(--_field-padding-inline-start);padding-inline-end:var(--_field-padding-inline-end)}:host([support-text-inset=start]) .support-text{padding-inline-start:var(--_field-padding-inline-start)}:host([support-text-inset=end]) .support-text{padding-inline-end:var(--_field-padding-inline-end)}:host([multiline]) .container{align-items:start;block-size:fit-content;min-inline-size:var(--_field-multiline-min-inline-size);max-inline-size:var(--_field-multiline-max-inline-size);min-block-size:var(--_field-multiline-min-block-size);max-block-size:var(--_field-multiline-max-block-size);resize:var(--_field-multiline-resize)}:host([multiline]) .container .end,:host([multiline]) .container .label,:host([multiline]) .container .popover-icon,:host([multiline]) .container .start{align-items:center;block-size:var(--_field-height)}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label{pointer-events:none;inline-size:fit-content}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label slot{display:block}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label::after{animation-name:multiline-inset-label-background-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing);position:absolute;z-index:-1;inset-inline-start:var(--_field-outline-width);transition-duration:var(--_field-surface-animation-duration);transition-property:background;transition-timing-function:var(--_field-surface-animation-timing);background:var(--_field-multiline-inset-label-background);inline-size:100%;block-size:3ex;filter:blur(2px);content:""}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .forge-field:not(.has-label) .label::after{display:none}.forge-field .input ::slotted(*){box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;font-size:var(--_field-font-size);text-overflow:ellipsis;padding-block-start:0;padding-block-end:0;transition:padding-block var(--_field-floating-animation-duration) var(--_field-floating-animation-timing);cursor:var(--_field-disableable-cursor)}.forge-field .input ::slotted(*)::placeholder{color:var(--_field-placeholder-color)}.forge-field .input ::slotted(textarea){resize:none}.forge-field .input ::slotted(:is([data-forge-field-input],:first-of-type:is(input,textarea))){padding-inline-start:var(--_field-padding-inline-start)}.forge-field .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-padding-inline-end)}.forge-field .input ::slotted([data-forge-multi-input-separator]){align-self:center;padding-inline:4px;block-size:fit-content;inline-size:fit-content}.forge-field .label ::slotted(forge-label){font:inherit}.forge-field.has-start .input ::slotted(:is([data-forge-field-input],:first-of-type:is(input,textarea))){padding-inline-start:var(--_field-inner-padding-inline)}.forge-field.has-end .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}.forge-field.has-accessory .end{padding-inline-end:var(--_field-inner-padding-inline)}:host([variant=plain]) .forge-field.has-accessory .end{padding-inline-end:var(--_field-inner-padding-inline)}:host(:where([label-position=inset],:not([label-position]))) .forge-field.has-start .label{padding-inline-start:var(--_field-inner-padding-inline)}:host(:where([label-position=inset],:not([label-position]))) .label ::slotted(*){max-inline-size:100%;overflow:hidden;text-overflow:ellipsis}:host([popover-icon]) .forge-field .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}:host([popover-icon]) .forge-field .end{padding-inline-end:var(--_field-inner-padding-inline)}:host(:not(popover-icon)) .forge-field.has-accessory:not(:is(.has-end)) .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}:host([multiline]) .input ::slotted(:is(input,textarea)){padding-block-start:calc((var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2);padding-block-end:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) + (var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)}:host([multiline]) .accessory slot{align-items:center;block-size:var(--_field-height);display:flex;align-self:start}forge-focus-indicator{--forge-focus-indicator-color:var(--_field-focus-indicator-color);--forge-focus-indicator-outward-offset:calc(var(--_field-outline-width) * -1);--forge-focus-indicator-shape:var(--_field-shape);--forge-focus-indicator-width:var(--_field-focus-indicator-width)}:host([variant=plain]) forge-focus-indicator{--forge-focus-indicator-offset-inline:-4px}@media (prefers-reduced-motion:reduce){.forge-field{--_field-floating-animation-duration:var(--forge-field-floating-animation-duration, 0s)}}',k1=class extends M{static get observedAttributes(){return Object.values(V.observedAttributes)}constructor(){super(),H(this,lw,vw),this._core=new Xi(new $i(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case V.attributes.LABEL_POSITION:this.labelPosition=a;break;case V.attributes.LABEL_ALIGNMENT:this.labelAlignment=a;break;case V.attributes.FLOAT_LABEL:this.floatLabel=p(a);break;case V.attributes.INVALID:this.invalid=p(a);break;case V.attributes.REQUIRED:this.required=p(a);break;case V.attributes.OPTIONAL:this.optional=p(a);break;case V.attributes.DISABLED:this.disabled=p(a);break;case V.attributes.VARIANT:this.variant=a;break;case V.attributes.THEME:this.theme=a;break;case V.attributes.SHAPE:this.shape=a;break;case V.attributes.DENSITY:this.density=a;break;case V.attributes.DENSE:this.dense=p(a);break;case V.attributes.POPOVER_ICON:this.popoverIcon=p(a);break;case V.attributes.POPOVER_EXPANDED:this.popoverExpanded=p(a);break;case V.attributes.MULTILINE:this.multiline=p(a);break;case V.attributes.SUPPORT_TEXT_INSET:this.supportTextInset=a;break;case V.attributes.FOCUS_INDICATOR_FOCUS_MODE:this.focusIndicatorFocusMode=a;break;case V.attributes.FOCUS_INDICATOR_ALLOW_FOCUS:this.focusIndicatorAllowFocus=p(a);break}}floatLabelWithoutAnimation(t){this._core.floatLabelWithoutAnimation(t)}};s([v()],k1.prototype,"labelPosition",2),s([v()],k1.prototype,"labelAlignment",2),s([v()],k1.prototype,"floatLabel",2),s([v()],k1.prototype,"invalid",2),s([v()],k1.prototype,"required",2),s([v()],k1.prototype,"optional",2),s([v()],k1.prototype,"disabled",2),s([v()],k1.prototype,"variant",2),s([v()],k1.prototype,"theme",2),s([v()],k1.prototype,"shape",2),s([v()],k1.prototype,"density",2),s([v()],k1.prototype,"dense",2),s([v()],k1.prototype,"popoverIcon",2),s([v()],k1.prototype,"popoverExpanded",2),s([v()],k1.prototype,"multiline",2),s([v()],k1.prototype,"supportTextInset",2),s([v()],k1.prototype,"focusIndicatorTargetElement",2),s([v()],k1.prototype,"focusIndicatorFocusMode",2),s([v()],k1.prototype,"focusIndicatorAllowFocus",2),k1=s([y({name:V.elementName,dependencies:[Q]})],k1);var b2=class extends it(M){static get observedAttributes(){return Object.values(F.observedAttributes)}constructor(){super()}attributeChangedCallback(t,e,a){switch(t){case F.observedAttributes.LABEL_POSITION:this.labelPosition=a;return;case F.observedAttributes.LABEL_ALIGNMENT:this.labelAlignment=a;return;case F.observedAttributes.INVALID:this.invalid=p(a);return;case F.observedAttributes.REQUIRED:this.required=p(a);return;case F.observedAttributes.OPTIONAL:this.optional=p(a);return;case F.observedAttributes.DISABLED:this.disabled=p(a);return;case F.observedAttributes.FLOAT_LABEL:this.floatLabel=p(a);return;case F.observedAttributes.VARIANT:this.variant=a;return;case F.observedAttributes.THEME:this.theme=a;return;case F.observedAttributes.SHAPE:this.shape=a;return;case F.observedAttributes.DENSITY:this.density=a;return;case F.observedAttributes.DENSE:this.dense=p(a);return;case F.observedAttributes.POPOVER_ICON:this.popoverIcon=p(a);return;case F.observedAttributes.POPOVER_EXPANDED:this.popoverExpanded=p(a);return;case F.observedAttributes.SUPPORT_TEXT_INSET:this.supportTextInset=a;return}}labelClickedCallback(){this._core.click()}labelChangedCallback(t){this._core.applyLabel(t)}floatLabelWithoutAnimation(t){this._core.floatLabelWithoutAnimation(t)}};s([v()],b2.prototype,"labelPosition",2),s([v()],b2.prototype,"labelAlignment",2),s([v()],b2.prototype,"invalid",2),s([v()],b2.prototype,"required",2),s([v()],b2.prototype,"optional",2),s([v()],b2.prototype,"disabled",2),s([v({name:"permanentlyFloatLabel"})],b2.prototype,"floatLabel",2),s([v()],b2.prototype,"variant",2),s([v()],b2.prototype,"theme",2),s([v()],b2.prototype,"shape",2),s([v()],b2.prototype,"density",2),s([v()],b2.prototype,"dense",2),s([v()],b2.prototype,"popoverIcon",2),s([v()],b2.prototype,"popoverExpanded",2),s([v()],b2.prototype,"supportTextInset",2);var mo=class extends I{setFieldProperty(t,e){this._fieldElement[t]=e}floatLabelWithoutAnimation(t){this._fieldElement.floatLabelWithoutAnimation(t)}};var go=class{constructor(t){this._adapter=t;this._labelPosition=F.defaults.DEFAULT_LABEL_POSITION;this._labelAlignment=F.defaults.DEFAULT_LABEL_ALIGNMENT;this._invalid=!1;this._required=!1;this._optional=!1;this._disabled=!1;this._variant=F.defaults.DEFAULT_VARIANT;this._theme=F.defaults.DEFAULT_THEME;this._shape=F.defaults.DEFAULT_SHAPE;this._density=F.defaults.DEFAULT_DENSITY;this._dense=!1;this._popoverIcon=!1;this._popoverExpanded=!1;this._supportTextInset=F.defaults.DEFAULT_SUPPORT_TEXT_INSET;this._permanentlyFloatLabel=!1}get _hasValue(){return this._adapter.hasValue}get _hasPlaceholder(){return this._adapter.hasPlaceholder}click(){this._adapter.click()}applyLabel(t){this._adapter.applyLabel(t)}floatLabelWithoutAnimation(t){this._adapter.floatLabelWithoutAnimation(this._hasValue||this._hasPlaceholder||t)}_tryFloatLabel(t){if(!this._permanentlyFloatLabel){if(this._labelPosition!=="inset"){this._adapter.tryFloatLabel(!1);return}this._adapter.tryFloatLabel(t)}}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setFieldProperty("labelPosition",t),this._adapter.setHostAttribute(F.attributes.LABEL_POSITION,t))}get labelAlignment(){return this._labelAlignment}set labelAlignment(t){this._labelAlignment!==t&&(this._labelAlignment=t,this._adapter.setFieldProperty("labelAlignment",t),this._adapter.setHostAttribute(F.attributes.LABEL_ALIGNMENT,t))}get invalid(){return this._invalid}set invalid(t){this._invalid!==t&&(this._invalid=t,this._adapter.setFieldProperty("invalid",t),this._adapter.toggleHostAttribute(F.attributes.INVALID,t))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setFieldProperty("required",t),this._adapter.toggleHostAttribute(F.attributes.REQUIRED,t))}get optional(){return this._optional}set optional(t){this._optional!==t&&(this._optional=t,this._adapter.setFieldProperty("optional",t),this._adapter.toggleHostAttribute(F.attributes.OPTIONAL,t))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setFieldProperty("disabled",t),this._adapter.toggleHostAttribute(F.attributes.DISABLED,t))}get permanentlyFloatLabel(){return this._permanentlyFloatLabel}set permanentlyFloatLabel(t){this._permanentlyFloatLabel!==t&&(this._permanentlyFloatLabel=t,this._adapter.setFieldProperty("floatLabel",t||this._hasValue||this._hasPlaceholder),this._adapter.toggleHostAttribute(F.attributes.FLOAT_LABEL,t))}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t,this._adapter.setFieldProperty("variant",t),this._adapter.setHostAttribute(F.attributes.VARIANT,t))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.setFieldProperty("theme",t),this._adapter.setHostAttribute(F.attributes.THEME,t))}get shape(){return this._shape}set shape(t){this._shape!==t&&(this._shape=t,this._adapter.setFieldProperty("shape",t),this._adapter.setHostAttribute(F.attributes.SHAPE,t))}get density(){return this._density}set density(t){this._density!==t&&(this._density=t,this._adapter.setFieldProperty("density",t),this._adapter.setHostAttribute(F.attributes.DENSITY,t))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setFieldProperty("dense",t),this._adapter.toggleHostAttribute(F.attributes.DENSE,t))}get popoverIcon(){return this._popoverIcon}set popoverIcon(t){this._popoverIcon!==t&&(this._popoverIcon=t,this._adapter.setFieldProperty("popoverIcon",t),this._adapter.toggleHostAttribute(F.attributes.POPOVER_ICON,t))}get popoverExpanded(){return this._popoverExpanded}set popoverExpanded(t){this._popoverExpanded!==t&&(this._popoverExpanded=t,this._adapter.setFieldProperty("popoverExpanded",t))}get supportTextInset(){return this._supportTextInset}set supportTextInset(t){this._supportTextInset!==t&&(this._supportTextInset=t,this._adapter.setFieldProperty("supportTextInset",t),this._adapter.setHostAttribute(F.attributes.SUPPORT_TEXT_INSET,t))}};function Bc(){x(k1)}var Tc=`${b}text-field`,Sc={SHOW_CLEAR:"show-clear"},hw=w({},Sc),cw={FIELD:"#field",DEFAULT_SLOT:"slot:not([name])",LABEL_SLOT:"slot[name=label]",CLEAR_BUTTON_SLOT:"slot[name=clear-button]",FORGE_LABEL:o2.elementName,INPUT:":where(input:not([type=button], [type=checkbox], [type=color], [type=hidden], [type=image], [type=radio], [type=range], [type=reset], [type=submit]), textarea)"},pw=["disabled","placeholder"],dw={TEXTAREA:"TEXTAREA",LABEL:"LABEL"},mw={CLEAR:`${Tc}-clear`},V1={elementName:Tc,observedAttributes:Sc,attributes:hw,selectors:cw,observedInputAttributes:pw,tagNames:dw,events:mw};var ji=class extends mo{constructor(e){super(e);this._inputElements=[];this._destroyValueChangerListeners=[];this._fieldElement=g(e,V1.selectors.FIELD),this._clearButtonSlotElement=g(e,V1.selectors.CLEAR_BUTTON_SLOT),this._defaultSlotElement=g(e,V1.selectors.DEFAULT_SLOT),this._labelSlotElement=g(e,V1.selectors.LABEL_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(V.parts).join(", ")),this._clearButtonSlotElement.remove()}get hasValue(){return this._inputElements.some(e=>!!e.value)}get hasPlaceholder(){return this._inputElements.some(e=>!!e.placeholder)}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=g(this._fieldElement,V.selectors.POPOVER_TARGET)),this._popoverTargetElement}addRootListener(e,a){this._fieldElement.addEventListener(e,a)}removeRootListener(e,a){this._fieldElement.removeEventListener(e,a)}disableInput(e){this._inputElements.forEach(a=>a.disabled=e)}inputIsDisabled(){return this._inputElements.some(e=>e.disabled)}click(){var e;(e=this._inputElements[0])==null||e.focus()}applyLabel(e){this._inputElements.forEach(a=>{K(a,!!e,"aria-label",e!=null?e:"")})}handleDefaultSlotChange(e){var o;(o=this._inputMutationObserver)==null||o.disconnect();let a=this._defaultSlotElement.assignedElements();a.length&&(this._inputElements=a.filter(n=>n.matches(V1.selectors.INPUT)),this._fieldElement.multiline=this._inputElements.some(n=>n.tagName===V1.tagNames.TEXTAREA),this._inputMutationObserver=new MutationObserver(n=>{n.forEach(i=>{if(i.attributeName){let h=i.target.getAttribute(i.attributeName),c=i.attributeName;e(c,h)}})}),this._inputElements.forEach(n=>{var i;(i=this._inputMutationObserver)==null||i.observe(n,{attributes:!0,attributeFilter:[...V1.observedInputAttributes]}),this._component.disabled&&(n.disabled=!0),Object.values(V1.observedInputAttributes).forEach(l=>{let h=l;e(h,n.getAttribute(h))})}))}tryAddValueChangeListener(e,a){this._destroyValueChangerListeners.forEach(o=>o()),this._destroyValueChangerListeners=this._inputElements.map(o=>a0(e,o,"value",a))}removeValueChangeListener(){this._destroyValueChangerListeners.forEach(e=>e())}tryFloatLabel(e){if(e!==void 0){this._fieldElement.floatLabel=e;return}this._fieldElement.floatLabel=this.hasValue||this.hasPlaceholder}tryConnectSlottedLabel(){var l;if(this._inputElements.length!==1||(l=this._inputElements[0].labels)!=null&&l.length)return;let e=this._inputElements[0],a=this._labelSlotElement.assignedElements({flatten:!0}),o=a.find(h=>h.matches(V1.selectors.FORGE_LABEL));if(o){o.forElement=this._component,o.clickTarget=e;return}let n=a.find(h=>h.tagName===V1.tagNames.LABEL);if(!n||n.control)return;let i=e.id||`forge-input-${P2()}`;e.id=i,n.htmlFor=i}connectClearButton(e){this._clearButtonSlotElement.addEventListener("click",e)}disconnectClearButton(e){this._clearButtonSlotElement.removeEventListener("click",e)}toggleClearButtonVisibility(e){e?this._fieldElement.append(this._clearButtonSlotElement):this._clearButtonSlotElement.remove()}clearInput(){this._inputElements.length&&(this._inputElements.forEach(e=>{e.value="",e.dispatchEvent(new Event("input"))}),this._inputElements[0].focus())}getAllSlotElements(){var e,a;return Array.from((a=(e=this._component.shadowRoot)==null?void 0:e.querySelectorAll("slot"))!=null?a:[])}};var Zi=class extends go{constructor(e){super(e);this._adapter=e;this._showClear=!1;this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onInputChange.bind(this);this._clearButtonClickListener=e=>this._onClearButtonClick(e)}initialize(){this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener),this._initializeSlots()}destroy(){this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeValueChangeListener()}get popoverTargetElement(){return this._adapter.popoverTargetElement}_initializeSlots(){this._adapter.getAllSlotElements().forEach(e=>this._handleSlotChange(e.name))}_onSlotChange(e){let a=e.target;this._handleSlotChange(a.name)}_handleSlotChange(e){switch(e){case"label":this._adapter.tryConnectSlottedLabel();break;case"":this._adapter.handleDefaultSlotChange(this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,a){switch(e){case"disabled":this.disabled=a!==null;break;case"placeholder":this._tryFloatLabel();break}}_onClearButtonClick(e){let a=new CustomEvent(V1.events.CLEAR,{bubbles:!0,cancelable:!0,composed:!0});this._adapter.dispatchHostEvent(a),a.defaultPrevented||this._adapter.clearInput()}_onInputChange(e){let a;f3(e,InputEvent.name)&&e.target.type==="number"&&(e.data!=null||e.target.validity.badInput)&&(a=!0),this._syncValueChange({floatLabel:a})}_onValueChange(){this._syncValueChange()}_syncValueChange({floatLabel:e=void 0}={}){this._tryFloatLabel(e),this._toggleClearButtonVisibility()}_toggleClearButtonVisibility(){this._adapter.toggleClearButtonVisibility(this._showClear&&this._hasValue&&!this.disabled)}get showClear(){return this._showClear}set showClear(e){this._showClear!==e&&(this._showClear=e,this._adapter.toggleHostAttribute(V1.attributes.SHOW_CLEAR,e),e?this._adapter.connectClearButton(this._clearButtonClickListener):this._adapter.disconnectClearButton(this._clearButtonClickListener),this._toggleClearButtonVisibility())}get disabled(){return super.disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._adapter.toggleHostAttribute(V.attributes.DISABLED,e),this._adapter.setFieldProperty("disabled",e),this._adapter.disableInput(e),this._toggleClearButtonVisibility())}get labelPosition(){return super.labelPosition}set labelPosition(e){this._labelPosition!==e&&(this._labelPosition=e,this._adapter.toggleHostAttribute(V.attributes.LABEL_POSITION,!0,e),this._adapter.setFieldProperty("labelPosition",e),this._tryFloatLabel())}};var gw='<template><forge-field id="field"><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><slot></slot><slot slot="end" name="end"></slot><slot slot="end" name="clear-button"><forge-icon-button tabindex="-1" dense><forge-icon name="clear"></forge-icon></forge-icon-button><forge-tooltip type="label"><slot name="clear-button-tooltip">Clear</slot></forge-tooltip></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',ww=":host{display:block}:host([hidden]){display:none}forge-field{display:contents}",m0=class extends b2{static get observedAttributes(){return[...Object.values(F.observedAttributes),...Object.values(V1.observedAttributes)]}constructor(){super(),H(this,gw,ww),this._core=new Zi(new ji(this)),q.define(Z5)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(super.attributeChangedCallback(t,e,a),t){case V1.attributes.SHOW_CLEAR:this.showClear=p(a);break}}get popoverTargetElement(){return this._core.popoverTargetElement}};s([v()],m0.prototype,"showClear",2),m0=s([y({name:V1.elementName,dependencies:[k1,n1,p1]})],m0);var J0=class extends a2{constructor(t){super(t)}_build(){let t=document.createElement(V1.elementName);return this._inputElement=this._buildInputElement(t),t.append(this._inputElement),t}_configure(){var t,e,a,o,n,i;(t=this._config.options)!=null&&t.label&&this._createLabel(this._config.options.label),(e=this._config.options)!=null&&e.startElement&&(this._config.options.startElement.slot="start",this._element.append(this._config.options.startElement)),(a=this._config.options)!=null&&a.leadingElement&&(this._config.options.leadingElement.slot="start",this._element.append(this._config.options.leadingElement)),(o=this._config.options)!=null&&o.endElement&&(this._config.options.endElement.slot="end",this._element.append(this._config.options.endElement)),(n=this._config.options)!=null&&n.trailingElement&&(this._config.options.trailingElement.slot="end",this._element.append(this._config.options.trailingElement)),(i=this._config.options)!=null&&i.accessoryElement&&(this._config.options.accessoryElement.slot="accessory",this._element.append(this._config.options.accessoryElement))}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}get disabled(){return this._inputElement.disabled}set disabled(t){this._inputElement.disabled=t}get invalid(){return this._element.invalid}set invalid(t){this._element.invalid=t}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(t){this._inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._inputElement.addEventListener("blur",e=>t(e))}setLabel(t){var e;if(t){this._labelElement?this._labelElement.textContent=t:this._createLabel(t);return}(e=this._labelElement)==null||e.remove(),this._labelElement=void 0}setSupportText(t){var e;if(t){this._supportTextElement||(this._supportTextElement=document.createElement("span"),this._supportTextElement.slot="support-text",this._element.append(this._supportTextElement)),this._supportTextElement.textContent=t;return}(e=this._supportTextElement)==null||e.remove(),this._supportTextElement=void 0}setHelperText(t){this.setSupportText(t)}setSupportTextEnd(t){var e;if(t){this._supportTextEndElement||(this._supportTextEndElement=document.createElement("span"),this._supportTextEndElement.slot="support-text-end",this._element.append(this._supportTextEndElement)),this._supportTextEndElement.textContent=t;return}(e=this._supportTextEndElement)==null||e.remove(),this._supportTextEndElement=void 0}floatLabel(t){this._element.floatLabel=t}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,this._labelElement.slot="label",(e=this._config.options)!=null&&e.id&&(this._labelElement.htmlFor=this._config.options.id),this._element.append(this._labelElement)}_buildInputElement(t){var a,o,n,i,l;let e=document.createElement("input");return e.type=(o=(a=this._config.options)==null?void 0:a.type)!=null?o:"text",((n=this._config.options)==null?void 0:n.value)!==void 0&&(e.value=this._config.options.value),(i=this._config.options)!=null&&i.id&&(e.id=this._config.options.id),((l=this._config.options)==null?void 0:l.placeholder)!==void 0&&(e.placeholder=this._config.options.placeholder),t.append(e),e}};function kc(){x(m0)}var S4=`${b}chip-field`,Oc={ADD_ON_BLUR:"add-on-blur"},uw=w({},Oc),_w={CONTAINER:".container",INPUT:"input",MEMBER_SLOT:"slot[name=member]",MEMBER:"[slot=member]"},fw={HAS_MEMBERS:"has-members"},xw={MEMBER_ADDED:`${S4}-member-added`,MEMBER_REMOVED:`${S4}-member-removed`},bw=["disabled","placeholder"],yw={TEXTAREA:"TEXTAREA",LABEL:"LABEL"},g2={elementName:S4,observedAttributes:Oc,attributes:uw,selectors:_w,classes:fw,events:xw,observedInputAttributes:bw,tagNames:yw};var Qi=class extends mo{get hasValue(){return!!this._component.querySelector(g2.selectors.MEMBER)||this.hasInputValue}get hasPlaceholder(){var t;return!!((t=this._inputElement)!=null&&t.placeholder)}get hasInputValue(){var t;return!!((t=this._inputElement)!=null&&t.value)}get inputHasFocus(){var t;return!!((t=this._inputElement)!=null&&t.matches(":focus"))}get inputElement(){return this._inputElement}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=g(this._fieldElement,V.selectors.POPOVER_TARGET)),this._popoverTargetElement}constructor(t){super(t),this._fieldElement=g(t,V.elementName),this._containerElement=g(t,g2.selectors.CONTAINER),this._memberSlot=g(t,g2.selectors.MEMBER_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(V.parts).join(", "))}initialize(){this._inputElement=this._component.querySelector("input:not([type=checkbox]):not([type=radio])")}addRootListener(t,e,a){this._fieldElement.addEventListener(t,e,a)}removeRootListener(t,e,a){this._fieldElement.removeEventListener(t,e,a)}addInputListener(t,e){var a;(a=this._inputElement)==null||a.addEventListener(t,e)}removeInputListener(t,e){var a;(a=this._inputElement)==null||a.removeEventListener(t,e)}clickInput(){var t;(t=this._inputElement)==null||t.click()}tryAddValueChangeListener(t,e){var a;(a=this._destroyValueChangerListener)==null||a.call(this),this._inputElement&&(this._destroyValueChangerListener=a0(t,this._inputElement,"value",e))}removeValueChangeListener(){var t;(t=this._destroyValueChangerListener)==null||t.call(this)}focusInput(){var t;(t=this._inputElement)==null||t.focus()}getSlottedMemberElements(){return this._memberSlot.assignedElements()}click(){this.focusInput()}applyLabel(t){this._inputElement&&K(this._inputElement,!!t,"aria-label",t!=null?t:"")}tryFloatLabel(t){if(t!==void 0){this._component.floatLabel=t;return}this._component.floatLabel=this.hasValue||this.hasPlaceholder}handleDefaultSlotChange(t,e){var o,n;(o=this._inputMutationObserver)==null||o.disconnect();let a=t.assignedElements();this._inputElement=a.find(i=>i.matches(g2.selectors.INPUT)),this._inputElement&&(this._component.disabled&&(this._inputElement.disabled=!0),this._inputMutationObserver=new MutationObserver(i=>{i.forEach(l=>{if(l.attributeName){let c=l.target.getAttribute(l.attributeName),d=l.attributeName;e(d,c)}})}),(n=this._inputMutationObserver)==null||n.observe(this._inputElement,{attributes:!0,attributeFilter:[...g2.observedInputAttributes]}),Object.values(g2.observedInputAttributes).forEach(i=>{let l=i;this._inputElement&&e(l,this._inputElement.getAttribute(l))}))}tryConnectSlottedLabel(t){if(!this._inputElement)return;let e=t.assignedElements({flatten:!0}),a=e.find(i=>i.matches(o2.elementName));if(a){a.forElement=this._component,a.clickTarget=this._inputElement;return}let o=e.find(i=>i.tagName===g2.tagNames.LABEL);if(!o||o.control)return;let n=this._inputElement.id||`forge-input-${P2()}`;this._inputElement.id=n,o.htmlFor=n}toggleContainerClass(t,e){this._containerElement.classList.toggle(t,e)}setDisabled(t){this._inputElement&&(this._inputElement.disabled=t)}};var Ji=class extends go{constructor(e){super(e);this._addOnBlur=!1;this._mouseDownListener=this._onMouseDown.bind(this);this._clickListener=this._onClick.bind(this);this._rootKeyDownListener=this._onRootKeyDown.bind(this);this._inputKeyDownListener=this._onKeyDown.bind(this);this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onValueChange.bind(this);this._blurListener=this._onBlur.bind(this)}initialize(){this._adapter.initialize(),this._adapter.addRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.addRootListener("click",this._clickListener),this._adapter.addRootListener("keydown",this._rootKeyDownListener),this._adapter.addInputListener("keydown",this._inputKeyDownListener),this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._addOnBlur&&this._adapter.addInputListener("blur",this._blurListener)}destroy(){this._adapter.removeRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeRootListener("keydown",this._rootKeyDownListener),this._adapter.removeInputListener("keydown",this._inputKeyDownListener),this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeValueChangeListener()}_onBlur(e){let a=e.target;this._addOnBlur&&this._addMember(a),a.value=""}_onMouseDown(e){if(this._disabled||this._adapter.inputHasFocus){e.preventDefault(),e.stopPropagation();return}}_onClick(e){this._disabled||e.target!==this._adapter.inputElement&&(this._adapter.focusInput(),this._adapter.clickInput())}_onValueChange(){this._tryFloatLabel()}_onSlotChange(e){let a=e.target;switch(a.name){case"label":this._adapter.tryConnectSlottedLabel(a);break;case"member":this._adapter.toggleContainerClass(g2.classes.HAS_MEMBERS,a.assignedElements().length>0),this._adapter.tryFloatLabel(),this._adapter.getSlottedMemberElements().forEach(o=>o.tabIndex=-1);break;case"":this._adapter.handleDefaultSlotChange(a,this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,a){switch(e){case"disabled":this.disabled=a!==null;break;case"placeholder":this._tryFloatLabel();break}}_onRootKeyDown({key:e}){if(!this._adapter.hasInputValue)switch(e){case"ArrowRight":this._focusNextMember();break;case"ArrowLeft":this._focusPreviousMember();break;case"Backspace":case"Delete":this._removeMember();break}}_onKeyDown({target:e,key:a}){let o=e;switch(a){case"Enter":this._addMember(o);break;case"Escape":o.value="";break;case"Tab":this._addOnBlur||(o.value="");break}}_focusNextMember(){let e=this._adapter.getSlottedMemberElements();if(!(!e.length||this._adapter.inputHasFocus))for(let a=0;a<e.length;a++){let o=e.at(a),n=e.at(a+1);if(o&&this._isMemberActive(o))if(n){n.focus();break}else this._adapter.focusInput()}}_focusPreviousMember(){let e=this._adapter.getSlottedMemberElements();if(e.length){if(this._adapter.inputHasFocus){e[e.length-1].focus();return}for(let a=0;a<e.length;a++){let o=e.at(a-1),n=e.at(a);if(n&&this._isMemberActive(n)&&o){o.focus();break}}}}_isMemberActive(e){return e.matches(":focus-within")}_getActiveMember(){var a;return(a=this._adapter.getSlottedMemberElements().find(o=>this._isMemberActive(o)))!=null?a:null}_addMember(e){let a=e.value.trim();a.length>0&&this._adapter.emitHostEvent(g2.events.MEMBER_ADDED,a),e.value=""}_removeMember(){let e=this._getActiveMember();e||(e=this._adapter.getSlottedMemberElements().at(-1)),e&&(this._focusNextMember(),this._adapter.emitHostEvent(g2.events.MEMBER_REMOVED,e))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){e=!!e,this._addOnBlur!==e&&(this._addOnBlur=e,this._adapter.isConnected&&(this._addOnBlur?this._adapter.addInputListener("blur",this._blurListener):this._adapter.removeInputListener("blur",this._blurListener)),this._adapter.toggleHostAttribute(g2.attributes.ADD_ON_BLUR,this._addOnBlur))}get popoverTargetElement(){return this._adapter.popoverTargetElement}get disabled(){return super.disabled}set disabled(e){this.disabled!==e&&(super.disabled=e,this._adapter.setDisabled(e))}};var Mw=`${b}chip-set`,Dc={VERTICAL:"vertical",TYPE:"type",DENSE:"dense",DISABLED:"disabled",INVALID:"invalid",THEME:"theme"},Hw=w({},Dc),Lw={ROOT:".forge-chip-set"},tt={elementName:Mw,observedAttributes:Dc,attributes:Hw,selectors:Lw};var ts=`${b}chip`,Pc={TYPE:"type",VALUE:"value",SELECTED:"selected",INVALID:"invalid",DISABLED:"disabled",DENSE:"dense",THEME:"theme",HREF:"href",TARGET:"target",DOWNLOAD:"download",REL:"rel"},Iw=w({},Pc),Vw={ROOT:".forge-chip",TRIGGER:"#trigger"},Ew={DELETE:`${ts}-delete`,SELECT:`${ts}-select`,NAVIGATE:`${ts}-navigate`},Cw={TYPE:"action",THEME:"primary"},d1={elementName:ts,observedAttributes:Pc,attributes:Iw,selectors:Vw,events:Ew,defaults:Cw};var zw='<div class="checkmark" aria-hidden="true"><svg viewBox="-2 -3 30 30"><path fill="none" stroke="black" d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></div>',es=class extends I{constructor(e){super(e);this._component=e;this._rootElement=g(this._component,d1.selectors.ROOT),this._triggerElement=g(this._component,d1.selectors.TRIGGER),this._startSlotElement=g(this._component,"slot[name=start]"),this._focusIndicatorElement=g(this._component,m1.elementName),this._stateLayerElement=g(this._component,M1.elementName)}get removeButtonElement(){return this._removeButtonElement}get isAnchor(){return this._triggerElement.localName==="a"}clickTrigger(){this._triggerElement.click()}addRootListener(e,a){this._rootElement.addEventListener(e,a)}removeRootListener(e,a){this._rootElement.removeEventListener(e,a)}setAnchor(e){if(e){if(this._triggerElement.localName==="button"){let a=this._createAnchorElement();this._triggerElement=Ka(this._triggerElement,a)}}else if(this._triggerElement.localName==="a"){let a=this._createButtonElement();this._triggerElement=Ka(this._triggerElement,a)}this._stateLayerElement.targetElement!==this._triggerElement&&(this._stateLayerElement.targetElement=this._triggerElement),this._focusIndicatorElement.targetElement!==this._triggerElement&&(this._focusIndicatorElement.targetElement=this._triggerElement)}setAnchorProperty(e,a){this._triggerElement.localName==="a"&&this._triggerElement instanceof HTMLAnchorElement&&(this._triggerElement[e]=a)}setCheckmarkVisibility(e){e?(this._checkmarkElement||(this._checkmarkElement=b5(zw)),this._rootElement.insertBefore(this._checkmarkElement,this._rootElement.firstChild)):this._checkmarkElement&&this._checkmarkElement.isConnected&&this._checkmarkElement.remove()}setDisabled(e){if(this._triggerElement instanceof HTMLAnchorElement){this._focusIndicatorElement.isConnected||this._rootElement.append(this._focusIndicatorElement),this._stateLayerElement.isConnected||this._rootElement.append(this._stateLayerElement);return}this._removeButtonElement&&(this._removeButtonElement.disabled=e),this._triggerElement.disabled=e,this._triggerElement.tabIndex=e?-1:0,e?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}setSelected(e){this._triggerElement instanceof HTMLAnchorElement||K(this._triggerElement,e,"aria-pressed",String(e))}toggleFieldVariant(e){e?(this._stateLayerElement.isConnected||this._rootElement.append(this._stateLayerElement),this._focusIndicatorElement.targetElement!==this._triggerElement&&(this._focusIndicatorElement.targetElement=this._triggerElement)):this._stateLayerElement.remove()}setDeleteButtonVisibility(e){var a;e?(this._removeButtonElement||(this._removeButtonElement=this._createRemoveButton()),this._rootElement.appendChild(this._removeButtonElement)):(a=this._removeButtonElement)==null||a.remove()}setStartSlotVisibility(e){this._startSlotElement.style.display=e?"":"none"}getChipSetState(){let e=null,a=Wl(this._component,o=>o&&o.nodeName===tt.elementName.toUpperCase());return a&&(e={type:a.type,disabled:a.disabled,dense:a.dense}),e}focusTrigger(e){this._triggerElement.focus(w({preventScroll:!0},e))}tryFocusRemoveButton(){this._removeButtonElement?this._removeButtonElement.focus({preventScroll:!0,focusVisible:!0}):this.focusTrigger()}clickRemoveButton(){var e;(e=this._removeButtonElement)==null||e.click()}animateStateLayer(){this._stateLayerElement.playAnimation()}_createRemoveButton(){let e=document.createElement("forge-icon-button");e.density="small",e.id="remove-button",e.classList.add("remove"),e.tabIndex=-1,e.setAttribute("aria-label",`Remove ${this._component.innerText}`),e.setAttribute("part","remove-button");let a=document.createElement("forge-icon");return a.name="close",e.appendChild(a),e}_createAnchorElement(){let e=document.createElement("a");return e.id="trigger",e.setAttribute("part","trigger"),e.classList.add("trigger"),this._component.href&&(e.href=this._component.href),this._component.target&&(e.target=this._component.target),this._component.download&&(e.download=this._component.download),this._component.rel&&(e.rel=this._component.rel),e}_createButtonElement(){let e=document.createElement("button");return e.type="button",e.id="trigger",e.setAttribute("part","trigger"),e.classList.add("trigger"),this._component.disabled&&(e.disabled=!0),this._component.selected&&e.setAttribute("aria-pressed","true"),e}};var as=class{constructor(t){this._adapter=t;this._type=d1.defaults.TYPE;this._selected=!1;this._invalid=!1;this._disabled=!1;this._dense=!1;this._theme=d1.defaults.THEME;this._clickListener=this._onClick.bind(this);this._keydownListener=this._onKeydown.bind(this)}initialize(){this._attachListeners(),this._tryInheritChipSetState()}focus(t){this._adapter.focusTrigger(t)}focusRemoveButton(){var t;(t=this._adapter.removeButtonElement)==null||t.focus()}click(){this._adapter.clickTrigger()}_attachListeners(){this._adapter.addRootListener("click",this._clickListener),this._adapter.addRootListener("keydown",this._keydownListener)}_detachListeners(){this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeRootListener("keydown",this._keydownListener)}_tryInheritChipSetState(){let t=this._adapter.getChipSetState();t&&(t.type!==void 0&&(this.type=t.type),t.disabled!==void 0&&(this.disabled=t.disabled),t.dense!==void 0&&(this.dense=t.dense))}_onClick(t){this._isRemoveButton(t)?(t.stopImmediatePropagation(),this._dispatchDeleteEvent()):this._handleSelectInteraction()}_onKeydown(t){switch(t.key){case"Delete":case"Backspace":this._type==="input"&&(t.preventDefault(),this._dispatchDeleteEvent());break;case"Enter":case" ":t.preventDefault(),this._isRemoveButton(t)?(t.stopImmediatePropagation(),t.key==="Enter"&&this._adapter.clickRemoveButton()):(this.click(),this._adapter.isAnchor&&this._adapter.animateStateLayer());break;case"ArrowLeft":case"ArrowRight":this._tryNavigate(t);break;case"Tab":this._type==="input"&&this._isRemoveButton(t)&&this._tryNavigate(t);break}}_tryNavigate(t){var a;if(this._type==="input"){if(!!((a=this._adapter.removeButtonElement)!=null&&a.matches(":focus"))){if(t.stopPropagation(),t.preventDefault(),t.key==="ArrowLeft"){this._adapter.focusTrigger();return}}else if(t.key==="ArrowRight"){this._adapter.tryFocusRemoveButton();return}}let e={direction:t.key==="ArrowRight"||t.key==="Tab"?"next":"previous"};this._adapter.dispatchHostEvent(new CustomEvent(d1.events.NAVIGATE,{bubbles:!0,detail:e}))}_isRemoveButton(t){return!!this._adapter.removeButtonElement&&t.composedPath().includes(this._adapter.removeButtonElement)}_handleSelectInteraction(){let t=this._selected;this._selected=!this._selected;let e=this._dispatchSelectEvent();this._selected=t;let a=["filter","choice","input"].includes(this._type);!e&&a&&(this._selected=!this._selected,this._applySelected())}_dispatchSelectEvent(){let t={selected:this._selected,value:this._value},e=new CustomEvent(d1.events.SELECT,{detail:t,bubbles:!0,cancelable:!0});return this._adapter.dispatchHostEvent(e),e.defaultPrevented}_dispatchDeleteEvent(){let t={value:this._value};this._adapter.dispatchHostEvent(new CustomEvent(d1.events.DELETE,{detail:t,bubbles:!0}))}_applyType(){let t=this._type==="input"||this._type==="field";this._adapter.setDeleteButtonVisibility(t),this._adapter.setCheckmarkVisibility(this._type==="filter"),this._adapter.setStartSlotVisibility(!this._selected),this._adapter.toggleFieldVariant(this._type!=="field"),this._applySelected(),this._adapter.setHostAttribute(d1.attributes.TYPE,this._type)}_applySelected(){this._adapter.setSelected(this._selected),this._type==="filter"&&this._adapter.setStartSlotVisibility(!this._selected),this._adapter.toggleHostAttribute(d1.attributes.SELECTED,this._selected)}get type(){return this._type}set type(t){this._type!==t&&(this._type=t,["action","choice","filter","input","field"].includes(this._type)||(this._type="action"),this._applyType())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t)}get selected(){return this._selected}set selected(t){t=!!t,this._selected!==t&&(this._selected=t,this._applySelected())}get invalid(){return this._invalid}set invalid(t){t=!!t,this._invalid!==t&&(this._invalid=t,this._adapter.toggleHostAttribute(d1.attributes.INVALID,t))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.isConnected&&(this._disabled?this._detachListeners():this._attachListeners()),this._adapter.toggleHostAttribute(d1.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){t=!!t,this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(d1.attributes.DENSE,this._dense))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:d1.defaults.THEME,this._adapter.setHostAttribute(d1.attributes.THEME,this._theme))}get href(){return this._href}set href(t){var e;if(this._href!==t){this._href=t;let a=!!((e=this._href)!=null&&e.trim());this._adapter.setAnchor(a),a&&this._disabled&&this._adapter.setDisabled(!1),this._adapter.toggleHostAttribute(d1.attributes.HREF,a,this._href)}}get target(){return this._target}set target(t){var e;this._target!==t&&(this._target=t,this._adapter.setAnchorProperty("target",t),this._adapter.toggleHostAttribute(d1.attributes.TARGET,!!((e=this._target)!=null&&e.trim()),this._target))}get download(){return this._download}set download(t){var e;this._download!==t&&(this._download=t,this._adapter.setAnchorProperty("download",t),this._adapter.toggleHostAttribute(d1.attributes.DOWNLOAD,!!((e=this._download)!=null&&e.trim()),this._download))}get rel(){return this._rel}set rel(t){var e;this._rel!==t&&(this._rel=t,this._adapter.setAnchorProperty("rel",t),this._adapter.toggleHostAttribute(d1.attributes.REL,!!((e=this._rel)!=null&&e.trim()),this._rel))}};var Aw='<template><div class="forge-chip" part="root"><button type="button" id="trigger" class="trigger" part="trigger"><slot name="start"><slot name="leading"></slot></slot><slot></slot><slot name="end"><slot name="trailing"></slot></slot></button><forge-focus-indicator target="trigger" part="focus-indicator"></forge-focus-indicator><forge-state-layer target="trigger" exportparts="surface:state-layer"></forge-state-layer></div></template>',Bw=':host{display:inline-flex}:host([hidden]){display:none}.forge-chip{--_chip-background:var(--forge-chip-background, transparent);--_chip-color:var(--forge-chip-color, var(--forge-theme-primary, #3f51b5));--_chip-shape:var(--forge-chip-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_chip-spacing:var(--forge-chip-spacing, var(--forge-spacing-xsmall, 8px));--_chip-height:var(--forge-chip-height, 32px);--_chip-padding-inline:var(--forge-chip-padding-inline, var(--forge-spacing-small, 12px));--_chip-padding-block:var(--forge-chip-padding-block, 0);--_chip-cursor:var(--forge-chip-cursor, pointer);--_chip-icon-font-size:var(--forge-chip-icon-font-size, 1.5rem);--_chip-focus-indicator-color:var(--forge-chip-focus-indicator-color, var(--_chip-color));--_chip-disabled-opacity:var(--forge-chip-disabled-opacity, 0.38);--_chip-disabled-cursor:var(--forge-chip-disabled-cursor, not-allowed);--_chip-dense-height:var(--forge-chip-dense-height, 24px);--_chip-dense-padding-inline:var(--forge-chip-dense-padding-inline, var(--forge-spacing-xsmall, 8px));--_chip-dense-spacing:var(--forge-chip-dense-spacing, var(--forge-spacing-xxsmall, 4px));--_chip-dense-font-size:var(--forge-chip-dense-font-size, 0.75rem);--_chip-dense-font-weight:var(--forge-chip-dense-font-weight, normal);--_chip-dense-focus-indicator-offset:var(--forge-chip-dense-focus-indicator-offset, var(--forge-spacing-xxxsmall, 2px));--_chip-dense-icon-font-size:var(--forge-chip-dense-icon-font-size, 1.25rem);--_chip-remove-button-spacing:var(--forge-chip-remove-button-spacing, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-xxsmall, 4px));--_chip-remove-button-height-dense:var(--forge-chip-remove-button-height-dense, 18px);--_chip-remove-button-icon-size-dense:var(--forge-chip-remove-button-icon-size-dense, 16px);--_chip-remove-button-spacing-dense:var(--forge-chip-remove-button-spacing-dense, 0 var(--forge-spacing-xxxsmall, 2px));--_chip-selected-background:var(--forge-chip-selected-background, var(--forge-theme-primary, #3f51b5));--_chip-selected-color:var(--forge-chip-selected-color, var(--forge-theme-on-primary, #ffffff));--_chip-invalid-color:var(--forge-chip-invalid-color, var(--forge-theme-error, #b00020));--_chip-invalid-selected-background:var(--forge-chip-invalid-selected-background, var(--forge-theme-error, #b00020));--_chip-invalid-selected-color:var(--forge-chip-invalid-selected-color, var(--forge-theme-on-error, #ffffff));--_chip-border-width:var(--forge-chip-border-width, var(--forge-border-thin, 1px));--_chip-border-style:var(--forge-chip-border-style, solid);--_chip-border-color:var(--forge-chip-border-color, var(--_chip-color));--_chip-field-background:var(--forge-chip-field-background, var(--forge-theme-surface-container-low, #ebebeb));--_chip-field-color:var(--forge-chip-field-color, var(--forge-theme-on-surface-container-low, #000000));--_chip-field-shape:var(--forge-chip-field-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_chip-field-border-color:var(--forge-chip-field-border-color, transparent);--_chip-field-cursor:var(--forge-chip-field-cursor, default);--_chip-checkmark-size:var(--forge-chip-checkmark-size, 1.25em);--_chip-checkmark-color:var(--forge-chip-checkmark-color, var(--_chip-color));--_chip-checkmark-spacing:var(--forge-chip-checkmark-spacing, var(--forge-spacing-xsmall, 8px));--_chip-avatar-size:var(--forge-chip-avatar-size, 24px);--_chip-avatar-size-dense:var(--forge-chip-avatar-size-dense, 18px);--_chip-avatar-font-size:var(--forge-chip-avatar-font-size, 0.75rem);--_chip-avatar-font-size-dense:var(--forge-chip-avatar-font-size-dense, 0.5rem);--_chip-avatar-spacing:var(--forge-chip-avatar-spacing, calc(var(--forge-spacing-xsmall, 8px) * -1));--_chip-avatar-spacing-dense:var(--forge-chip-avatar-spacing-dense, calc(var(--forge-spacing-xxsmall, 4px) * -1));--_chip-transition-duration:var(--forge-chip-transition-duration, var(--forge-animation-duration-short3, 150ms));--_chip-transition-easing:var(--forge-chip-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_chip-checkmark-transition-delay:var(--forge-chip-checkmark-transition-delay, 50ms)}.forge-chip{position:relative;display:inline-flex;align-items:center;box-sizing:border-box;height:var(--_chip-height);border-width:var(--_chip-border-width);border-style:var(--_chip-border-style);border-color:var(--_chip-border-color);border-radius:var(--_chip-shape);background:var(--_chip-background);color:var(--_chip-color);transition-property:background-color,color;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing)}.trigger{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:inline-flex;align-items:center;justify-content:center;gap:var(--_chip-spacing);box-sizing:border-box;height:100%;padding-inline:var(--_chip-padding-inline);padding-block:var(--_chip-padding-block);cursor:var(--_chip-cursor);z-index:0;text-decoration:none;border:none;background:inherit;color:inherit;-webkit-tap-highlight-color:transparent;border-radius:var(--_chip-shape);outline:0}.remove{padding-inline:var(--_chip-remove-button-spacing);--forge-icon-button-focus-indicator-color:var(--_chip-color)}forge-focus-indicator{--forge-focus-indicator-color:var(--_chip-focus-indicator-color);--forge-focus-indicator-shape:var(--_chip-shape)}forge-state-layer{--forge-state-layer-color:var(--_chip-color)}:host([dense]) .forge-chip{--_chip-height:var(--_chip-dense-height);--_chip-padding-inline:var(--_chip-dense-padding-inline);--_chip-spacing:var(--_chip-dense-spacing)}:host([dense]) .trigger{--forge-typography-button-font-size:var(--_chip-dense-font-size);--forge-typography-button-font-weight:var(--_chip-dense-font-weight)}:host([dense]) .remove{--_chip-remove-button-spacing:var(--_chip-remove-button-spacing-dense);--forge-icon-button-density-small-size:var(--_chip-remove-button-height-dense);--forge-icon-button-density-small-icon-size:var(--_chip-remove-button-icon-size-dense)}:host([dense]) forge-focus-indicator{--forge-focus-indicator-outward-offset:var(--_chip-dense-focus-indicator-offset)}:host([dense]) ::slotted(forge-avatar){--_chip-avatar-spacing:var(--_chip-avatar-spacing-dense);--forge-typography-subheading2-font-size:var(--_chip-avatar-font-size-dense);--forge-avatar-size:var(--_chip-avatar-size-dense)}:host([dense]) ::slotted(:is([slot=start],[slot=leading],[slot=end],[slot=trailing])){--_chip-icon-font-size:var(--_chip-dense-icon-font-size)}:host(:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--_chip-selected-background);--_chip-color:var(--_chip-selected-color)}:host(:is([type=filter],[type=choice],[type=input])[selected]) forge-focus-indicator{--forge-focus-indicator-color:var(--_chip-background)}:host([invalid]) .forge-chip{--_chip-color:var(--_chip-invalid-color)}:host([invalid]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--_chip-invalid-selected-background);--_chip-color:var(--_chip-invalid-selected-color)}:host([disabled]:not([href])) .forge-chip{opacity:var(--_chip-disabled-opacity)}:host([disabled]:not([href])) .trigger{cursor:var(--_chip-disabled-cursor)}::slotted(:not(forge-avatar):is([slot=start],[slot=leading],[slot=end],[slot=trailing])){font-size:var(--_chip-icon-font-size)}::slotted(forge-avatar:is([slot=start],[slot=leading])){margin-inline-start:var(--_chip-avatar-spacing)}::slotted(forge-avatar:is([slot=end],[slot=trailing])){margin-inline-end:var(--_chip-avatar-spacing)}::slotted(forge-avatar){--forge-typography-subheading2-font-size:var(--_chip-avatar-font-size);--forge-avatar-size:var(--_chip-avatar-size)}:host([type=filter]) .checkmark{height:var(--_chip-checkmark-size)}:host([type=filter]) .checkmark svg{width:0;height:var(--_chip-checkmark-size);transition-property:width;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing)}:host([type=filter]) .checkmark svg path{stroke:var(--_chip-checkmark-color);transition-property:stroke-dashoffset;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing);stroke-width:2px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}:host([type=filter][selected]) .checkmark{padding-inline-start:var(--_chip-checkmark-spacing)}:host([type=filter][selected]) .checkmark svg{width:var(--_chip-checkmark-size)}:host([type=filter][selected]) .checkmark svg path{transition-delay:var(--_chip-checkmark-transition-delay);stroke-dashoffset:0}:host([type=input]) .trigger{padding-inline:var(--_chip-padding-inline) 0}:host([type=field]) .forge-chip{--_chip-background:var(--_chip-field-background);--_chip-color:var(--_chip-field-color);--_chip-border-color:var(--_chip-field-border-color);--_chip-shape:var(--_chip-field-shape);--_chip-cursor:var(--_chip-field-cursor)}:host([theme=secondary]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_chip-border-color:var(--forge-chip-border-color, var(--forge-theme-secondary, #ffc107))}:host([theme=secondary]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-secondary, #ffc107));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-secondary, #000000))}:host([theme=secondary][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-secondary-container-low, #fff8e1));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-secondary-container-low, #8a6804))}:host([theme=tertiary]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-tertiary, #3d5afe))}:host([theme=tertiary]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-tertiary, #3d5afe));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=tertiary][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-tertiary-container-low, #213189))}:host([theme=success]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-success, #2e7d32))}:host([theme=success]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-success, #2e7d32));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-success, #ffffff))}:host([theme=success][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-success-container-low, #e6efe6));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-success-container-low, #19441b))}:host([theme=warning]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-warning, #d14900))}:host([theme=warning]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-warning, #d14900));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=warning][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-warning-container-low, #f9e9e0));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-warning-container-low, #712700))}:host([theme=error]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-error, #b00020))}:host([theme=error]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-error, #b00020));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-error, #ffffff))}:host([theme=error][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-error-container-low, #f6e0e4));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-error-container-low, #5f0011))}:host([theme=info]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-info, #1565c0))}:host([theme=info]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-info, #1565c0));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-info, #ffffff))}:host([theme=info][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-info-container-low, #e3edf7));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-info-container-low, #0b3768))}',y2=class extends M{static get observedAttributes(){return Object.values(d1.observedAttributes)}constructor(){super(),q.define(Ya),H(this,Aw,Bw),this._core=new as(new es(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case d1.attributes.TYPE:this.type=a;break;case d1.attributes.VALUE:this.value=a;break;case d1.attributes.SELECTED:this.selected=p(a);break;case d1.attributes.INVALID:this.invalid=p(a);break;case d1.attributes.DISABLED:this.disabled=p(a);break;case d1.attributes.DENSE:this.dense=p(a);break;case d1.attributes.THEME:this.theme=a;break;case d1.attributes.HREF:this.href=a;break;case d1.attributes.TARGET:this.target=a;break;case d1.attributes.DOWNLOAD:this.download=a;break;case d1.attributes.REL:this.rel=a;break}}focus(t){this._core.focus(t)}focusRemoveButton(){this._core.focusRemoveButton()}click(){this._core.click()}};s([v()],y2.prototype,"type",2),s([v()],y2.prototype,"value",2),s([v()],y2.prototype,"selected",2),s([v()],y2.prototype,"invalid",2),s([v()],y2.prototype,"disabled",2),s([v()],y2.prototype,"dense",2),s([v()],y2.prototype,"theme",2),s([v()],y2.prototype,"href",2),s([v()],y2.prototype,"target",2),s([v()],y2.prototype,"download",2),s([v()],y2.prototype,"rel",2),y2=s([y({name:d1.elementName,dependencies:[Q,r1,n1,X]})],y2);function Nc(){x(y2)}var Tw='<template><div class="forge-chip-set" part="root"><slot></slot></div></template>',Sw=":host{display:inline-block}:host([hidden]){display:none}.forge-chip-set{--_chip-set-spacing:var(--forge-chip-set-spacing, var(--forge-spacing-xsmall, 8px))}.forge-chip-set{display:flex;flex-wrap:wrap;gap:var(--_chip-set-spacing)}:host([vertical]) .forge-chip-set{flex-direction:column}",wo=class extends M{constructor(){super();this._vertical=!1;this._type=d1.defaults.TYPE;this._dense=!1;this._disabled=!1;this._invalid=!1;this._theme=d1.defaults.THEME;H(this,Tw,Sw)}static get observedAttributes(){return Object.values(tt.observedAttributes)}connectedCallback(){this.addEventListener(d1.events.NAVIGATE,this._onChipNavigate.bind(this))}attributeChangedCallback(e,a,o){switch(e){case tt.observedAttributes.VERTICAL:this.vertical=p(o);break;case tt.observedAttributes.TYPE:this.type=o;break;case tt.observedAttributes.DENSE:this.dense=p(o);break;case tt.observedAttributes.DISABLED:this.disabled=p(o);break;case tt.observedAttributes.INVALID:this.invalid=p(o);break;case tt.observedAttributes.THEME:this.theme=o;break}}_onChipNavigate(e){let a=this._findChipDescendants().filter(l=>!l.disabled),o=a.findIndex(l=>l===e.target),n=e.detail.direction==="previous"?o-1:o+1;n>a.length-1&&(n=0);let i=a.at(n);(i==null?void 0:i.type)==="input"&&e.detail.direction==="previous"?i.focusRemoveButton():i==null||i.focus()}_findChipDescendants(){return Array.from(this.querySelectorAll(d1.elementName))}_syncChipsProperty(e,a){this._findChipDescendants().forEach(n=>n[e]=a)}get vertical(){return this._vertical}set vertical(e){e=!!e,this._vertical!==e&&(this._vertical=e,this.toggleAttribute(tt.attributes.VERTICAL,this._vertical))}get type(){return this._type}set type(e){this._type!==e&&(this._type=e,this._syncChipsProperty("type",this._type),this.setAttribute(tt.attributes.TYPE,this._type))}get dense(){return this._dense}set dense(e){e=!!e,this._dense!==e&&(this._dense=e,this._syncChipsProperty("dense",this._dense),this.toggleAttribute(tt.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(e){e=!!e,this._disabled!==e&&(this._disabled=e,this._syncChipsProperty("disabled",this._disabled),this.toggleAttribute(tt.attributes.DISABLED,this._disabled))}get invalid(){return this._invalid}set invalid(e){e=!!e,this._invalid!==e&&(this._invalid=e,this._syncChipsProperty("invalid",this._invalid),this.toggleAttribute(tt.attributes.INVALID,this._invalid))}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this._syncChipsProperty("theme",this._theme),this.setAttribute(tt.attributes.THEME,this._theme))}};wo=s([y({name:tt.elementName,dependencies:[y2]})],wo);function Rc(){x(wo)}var kw='<template><forge-field id="field" multiline><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><div class="container" data-forge-field-input><slot name="member"></slot><slot></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',Ow="@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes multiline-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}:host{display:block}:host([hidden]){display:none}forge-field{--_chip-field-member-spacing:var(--forge-chip-field-member-spacing, var(--forge-spacing-xsmall, 8px));--_chip-field-content-spacing:var(--forge-chip-field-content-spacing, var(--forge-spacing-xxsmall, 4px))}.container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--_chip-field-member-spacing);block-size:auto}.container.has-members{margin-block:var(--_chip-field-content-spacing)}.container.has-members ::slotted(input){block-size:auto;inline-size:auto}::slotted(input){flex-grow:1;cursor:inherit;box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;font-size:var(--_field-font-size);text-overflow:ellipsis;padding-block-start:0;padding-block-end:0;transition:padding-block var(--_field-floating-animation-duration) var(--_field-floating-animation-timing)}forge-field{display:contents;--forge-field-multiline-resize:none}forge-field::part(label)::after{content:none}:host([theme=primary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-primary, #3f51b5);--forge-chip-field-color:var(--forge-theme-on-primary, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-primary, #3f51b5)}:host([theme=secondary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-secondary, #ffc107);--forge-chip-field-color:var(--forge-theme-on-secondary, #000000);--forge-chip-focus-indicator-color:var(--forge-theme-secondary, #ffc107)}:host([theme=tertiary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-tertiary, #3d5afe);--forge-chip-field-color:var(--forge-theme-on-tertiary, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-tertiary, #3d5afe)}:host([theme=success]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-success, #2e7d32);--forge-chip-field-color:var(--forge-theme-on-success, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-success, #2e7d32)}:host([theme=warning]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-warning, #d14900);--forge-chip-field-color:var(--forge-theme-on-warning, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-warning, #d14900)}:host([theme=error]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-error, #b00020);--forge-chip-field-color:var(--forge-theme-on-error, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-error, #b00020)}:host([theme=info]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-info, #1565c0);--forge-chip-field-color:var(--forge-theme-on-info, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-info, #1565c0)}",za=class extends b2{static get observedAttributes(){return[...Object.values(F.observedAttributes),...Object.values(g2.observedAttributes)]}constructor(){super(),H(this,kw,Ow),this._core=new Ji(new Qi(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(super.attributeChangedCallback(t,e,a),t){case g2.attributes.ADD_ON_BLUR:this.addOnBlur=p(a);return}}get popoverTargetElement(){return this._core.popoverTargetElement}click(){this._core.click()}};s([v()],za.prototype,"addOnBlur",2),za=s([y({name:g2.elementName,dependencies:[k1,y2]})],za);var Fc=class extends a2{constructor(t){super(t)}_build(){var e,a;let t=document.createElement(g2.elementName);return this._inputElement=this._buildInputElement(t),(e=this._config.options)!=null&&e.leadingElement&&(this._config.options.leadingElement.slot="leading",t.appendChild(this._config.options.leadingElement)),(a=this._config.options)!=null&&a.trailingElement&&(this._config.options.trailingElement.slot="trailing",t.appendChild(this._config.options.trailingElement)),t.appendChild(this._inputElement),t}_configure(){var t,e;(t=this._config.options)!=null&&t.helperText&&this.setHelperText(this._config.options.helperText),typeof((e=this._config.options)==null?void 0:e.label)=="string"&&this._createLabel(this._config.options.label)}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}get disabled(){return this._inputElement.disabled}set disabled(t){this._inputElement.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(t){this._inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._inputElement.addEventListener("blur",e=>t(e))}setLabel(t){t?this._labelElement?this._labelElement.textContent=t:this._createLabel(t):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}floatLabel(t){this._element.floatLabel=t}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,(e=this._config.options)!=null&&e.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_buildInputElement(t){var a,o,n,i,l;let e=document.createElement("input");return e.type=((a=this._config.options)==null?void 0:a.type)||"text",((o=this._config.options)==null?void 0:o.value)!==void 0&&(e.value=this._config.options.value),(n=this._config.options)!=null&&n.id&&(e.id=this._config.options.id),typeof((i=this._config.options)==null?void 0:i.placeholder)=="string"&&(e.placeholder=(l=this._config.options)==null?void 0:l.placeholder),t.appendChild(e),e}};function Uc(){x(za)}var os=`${b}autocomplete`,Dw={MODE:"mode",MULTIPLE:"multiple",DEBOUNCE:"debounce",FILTER_ON_FOCUS:"filter-on-focus",FILTER_FOCUS_FIRST:"filter-focus-first",ALLOW_UNMATCHED:"allow-unmatched",POPUP_TARGET:"popup-target",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",OPEN:"open",MATCH_KEY:"match-key",FILTER_TEXT:"filter-text",DROPDOWN_ICON_OPEN:"data-forge-dropdown-icon-open"},Pw={INPUT:"input",DROPDOWN_ICON:"[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon",CLEAR_BUTTON:"[data-forge-autocomplete-clear],[forge-autocomplete-clear]"},Nw={DEFAULT_DEBOUNCE_TIME:W5,NUM_SKELETON_ITEMS:3},Rw={CHANGE:`${os}-change`,SELECT:`${os}-select`,SCROLLED_BOTTOM:`${os}-scrolled-bottom`},s1={elementName:os,attributes:Dw,selectors:Pw,numbers:Nw,events:Rw},Wc=(e=>(e.Default="default",e.Stateless="stateless",e))(Wc||{});var rs=class extends I{constructor(t){super(t),this.setInputElement()}get inputElement(){return this._inputElement}setInputElement(){let t=Be(this._component,s1.selectors.INPUT,!1);return t.length&&(this._inputElement=t[0]),this._inputElement}setInputAttribute(t,e){this._inputElement.setAttribute(t,e)}addInputListener(t,e){this._inputElement.addEventListener(t,e)}removeInputListener(t,e){this._inputElement.removeEventListener(t,e)}initializeInputAccessibility(t){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","polite"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-autocomplete","list"),Oe(),Zt(this._inputElement)}isWrappingChipField(){return!!this._component.querySelector(g2.elementName)}show(t,e){this._targetElement=this._getTargetElement(e),this._targetElement&&(this._listDropdown=new Pe(this._targetElement,t),this._listDropdown.open(),this._inputElement.setAttribute("aria-expanded","true"),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._tryToggleDropdownIconRotation(!0))}async hide(t,{destroy:e=!1}={}){var o,n,i;if(this.setBusyVisibility(!1),this._tryToggleDropdownIconRotation(!1),(o=this._inputElement)==null||o.removeAttribute("aria-activedescendant"),(n=this._inputElement)==null||n.removeAttribute("aria-controls"),(i=this._inputElement)==null||i.setAttribute("aria-expanded","false"),!this._listDropdown)return;let{anchorElement:a}=this._listDropdown.dropdownElement;a&&a instanceof HTMLElement&&(a==null||a.removeEventListener(Z.events.TOGGLE,t)),e?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0}setBusyVisibility(t){var e;(e=this._listDropdown)==null||e.setBusyVisibility(t)}setDismissListener(t){var e,a;(a=(e=this._listDropdown)==null?void 0:e.dropdownElement)==null||a.addEventListener(Z.events.TOGGLE,t)}focus(){window.requestAnimationFrame(()=>this._inputElement.focus())}setOptions(t){var e;(e=this._listDropdown)==null||e.setOptions(t)}appendOptions(t){var e;(e=this._listDropdown)==null||e.appendOptions(t)}setSelectedText(t){this._inputElement.value=t}getInputValue(){return this._inputElement.value}setInputValue(t){this._inputElement.value=t}selectInputValue(){window.requestAnimationFrame(()=>this._inputElement.select())}isFocusWithinPopup(t){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(t)}hasFocus(){let t=Se(this._component.ownerDocument);return t===this._inputElement||this.isFocusWithinPopup(t)}hasInputElement(){return!!this._inputElement}setDropdownIconListener(t,e){window.requestAnimationFrame(()=>{let a=this._component.querySelector(V1.elementName);if(a&&(a.popoverIcon||a.hasAttribute(V.attributes.POPOVER_ICON))){let n=t==="mousedown"?V.events.POPOVER_ICON_MOUSEDOWN:V.events.POPOVER_ICON_CLICK;this._component.addEventListener(n,e)}let o=this._component.querySelector(s1.selectors.DROPDOWN_ICON);o==null||o.addEventListener(t,e)})}removeDropdownIconListener(t,e){this._component.removeEventListener(V.events.POPOVER_ICON_CLICK,e);let a=this._component.querySelector(s1.selectors.DROPDOWN_ICON);a==null||a.removeEventListener(t,e)}setClearButtonListener(t,e){window.requestAnimationFrame(()=>{let a=this._component.querySelector(V1.elementName);a&&(a.showClear||a.hasAttribute(V1.attributes.SHOW_CLEAR))&&this._component.addEventListener(V1.events.CLEAR,e);let o=this._component.querySelector(s1.selectors.CLEAR_BUTTON);o&&o.addEventListener(t,e)})}removeClearButtonListener(t,e){this._component.removeEventListener(V1.events.CLEAR,e);let a=this._component.querySelector(s1.selectors.CLEAR_BUTTON);a==null||a.removeEventListener(t,e)}propagateKey(t){var e;(e=this._listDropdown)==null||e.handleKey(t)}updateActiveDescendant(t){this._targetElement&&K(this._inputElement,!!t,"aria-activedescendant",t)}getTargetElementWidth(t){return this._targetElement||(this._targetElement=this._getTargetElement(t)),this._targetElement.getBoundingClientRect().width}getPopupElement(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.dropdownElement)!=null?e:null}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}activateSelectedOption(){var t;(t=this._listDropdown)==null||t.activateSelectedOption()}activateOptionByIndex(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}getActiveOptionIndex(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:null}clearActiveOption(){var t;(t=this._listDropdown)==null||t.clearActiveOption()}setSelectedOptions(t){if(this._listDropdown){let e=t.map(a=>a.value);this._listDropdown.setSelectedValues(e)}}queueDropdownPositionUpdate(){this.getPopupElement()&&window.requestAnimationFrame(()=>{let t=this.getPopupElement();t==null||t.position()})}_getTargetElement(t){return t?this._component.querySelector(t)||this._getDefaultTargetElement():this._getDefaultTargetElement()}_getDefaultTargetElement(){let t=this._tryGetFieldLikeChild();return t!=null&&t.popoverTargetElement?t.popoverTargetElement:this._component.querySelector("input")||this._component}_tryToggleDropdownIconRotation(t){let e=this._tryGetFieldLikeChild();e!=null&&e.popoverIcon&&(e.popoverExpanded=t);let a=this._component.querySelector(s1.selectors.DROPDOWN_ICON);a&&(a.style.transition="transform 120ms linear",a.style.transform=t?"rotateZ(180deg)":"")}_tryGetFieldLikeChild(){let t=[V1.elementName,g2.elementName];return this._component.querySelector(`:is(${t.join(",")})`)}};var Gc=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(Gc||{});function gr(r,t){let e=r.some(o=>k(o)&&nt(o)&&o.hasOwnProperty("options")&&(o.hasOwnProperty("text")||o.hasOwnProperty("builder"))),a=r.some(o=>k(o)&&nt(o)&&o.hasOwnProperty("label")&&o.hasOwnProperty("value"));return e&&t===1||a&&t===0}function Yc(r,t){return r.find(e=>e.value===t)}function wr(r,t,e=null){return e?!(e in r.value)||!(e in t)?!1:Nt(r.value[e],t[e]):Nt(r.value,t)}var ns=class extends K0{constructor(e){super();this._adapter=e;this._isInitialized=!1;this._isDropdownOpen=!1;this._mode="default";this._multiple=!1;this._debounce=s1.numbers.DEFAULT_DEBOUNCE_TIME;this._allowUnmatched=!1;this._filterOnFocus=!0;this._filterFocusFirst=!0;this._options=[];this._filterText="";this._selectedOptions=[];this._values=[];this._pendingFilterPromises=[];this._matchKey=null;this._clickListener=a=>this._onClick(a),this._focusListener=()=>this._onFocus(),this._blurListener=a=>this._onBlur(a),this._keydownListener=a=>this._onKeydown(a),this._dropdownIconClickListener=a=>this._onDropdownIconClick(a),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dropdownIconMouseDownListener=a=>this._onDropdownIconMouseDown(a),this._clearButtonListener=a=>this._onClear(a),this._dismissListener=()=>this._onDismiss(),this._activeChangeListener=a=>this._adapter.updateActiveDescendant(a),this._targetWidthCallback=()=>this._adapter.getTargetElementWidth(this._popupTarget),this._identifier=P2()}async initialize(){if(!this._adapter.hasInputElement()&&!this._adapter.setInputElement())throw new Error("An input element is required as a child of the autocomplete component.");if(this._setInputListener(),this._setFilterCallback(),this._attachListeners(),this._initializeAccessibility(),this._values.length){if(!this._selectedOptions.length){try{await this._executeFilter()}catch(e){console.error(e)}this._updateSelectedOptions(this._values)}this._adapter.setSelectedText(this._getSelectedText())}this._isInitialized=!0}destroy(){this._isInitialized&&(this._detachListeners(),this._isInitialized=!1),this._closeDropdown({destroy:!0})}async forceFilter({preserveValue:e}){this._options=[],await this._executeFilter(!0,!0),e&&this._options.push(...this._selectedOptions),this._applyValue(this._values)}_attachListeners(){this._adapter.addInputListener("click",this._clickListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.addInputListener("input",this._inputListener),this._adapter.addInputListener("keydown",this._keydownListener),this._adapter.setDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.setDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.setClearButtonListener("click",this._clearButtonListener)}_detachListeners(){this._adapter.removeInputListener("click",this._clickListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("keydown",this._keydownListener),this._adapter.removeDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.removeDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.removeClearButtonListener("click",this._clearButtonListener)}_setInputListener(){this._inputListener=e=>this._onInput(e)}_setFilterCallback(){this._filterFn=k(this._debounce)&&this._debounce>0?Ae(this._debounceFilter,this._debounce,!1):this._debounceFilter}_initializeAccessibility(){this._adapter.initializeInputAccessibility(this._identifier)}get _flatOptions(){return gr(this._options,1)?this._options.reduce((e,a)=>e.concat(a.options),[]):this._options}_onClick(e){!this._isDropdownOpen&&this._filterOnFocus?this._showDropdown():this._closeDropdown()}_onDropdownIconMouseDown(e){e.preventDefault()}_onDropdownIconClick(e){this._isDropdownOpen?this._closeDropdown():(this._adapter.focus(),window.requestAnimationFrame(()=>this._showDropdown()))}_onClear(e){this._filterText="",this._clearValue(),this._adapter.setSelectedText(this._getSelectedText())}_onDropdownScrollEnd(){this._adapter.emitHostEvent(s1.events.SCROLLED_BOTTOM)}_onFocus(){!this._isDropdownOpen&&this._adapter.getInputValue()&&!$2.isMobile&&this._adapter.selectInputValue()}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._applyBlur()}_applyBlur(){this._isDropdownOpen&&this._closeDropdown(),this._mode!=="stateless"&&(this._selectedOptions.length?this._adapter.setSelectedText(this._getSelectedText()):this._allowUnmatched||(this._filterText="",this._adapter.setSelectedText("")))}_onInput(e){this._selectedOptions.length&&!this._multiple&&(!this._adapter.getInputValue()||this._allowUnmatched)&&!this._adapter.isWrappingChipField()&&(this._selectedOptions=[],this._values=[],this._emitChangeEvent()),this._filterText=this._adapter.getInputValue(),this._filterFn()}async _debounceFilter({checkFocus:e=!0}={}){if(!e&&!this._adapter.hasFocus()){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}let a=this._filterText,o=this._executeFilter();this._pendingFilterPromises.push(o),this._isDropdownOpen?this._adapter.setBusyVisibility(!0):this._showDropdown({filter:!1});try{await o}catch(n){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}if(a===this._filterText)this._pendingFilterPromises=[],this._onFilterComplete();else{let n=this._pendingFilterPromises.indexOf(o);n!==-1&&this._pendingFilterPromises.splice(n,1)}}_onKeydown(e){switch(e.key){case"Tab":this._isDropdownOpen&&!this._multiple&&this._selectActiveOption(!1);break;case"Esc":case"Escape":this._isDropdownOpen&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Down":case"ArrowDown":e.preventDefault(),this._isDropdownOpen?this._adapter.propagateKey(e.key):this._showDropdown({activateFirst:!0,activateSelected:!0});break;case"Up":case"ArrowUp":e.preventDefault(),this._isDropdownOpen&&this._adapter.propagateKey(e.key);break;case"Enter":case"Home":case"End":this._isDropdownOpen&&(e.key==="Enter"&&e.stopPropagation(),e.preventDefault(),this._adapter.propagateKey(e.key));break;case"Backspace":case"Delete":let a=e.target,o=this._adapter.getInputValue(),n=a.value.substring(a.selectionStart,a.selectionEnd)===a.value,i=o.length===1&&a.selectionEnd===1,l=o.length===1&&a.selectionEnd===0,h=!o||n||i||l;!this._adapter.isWrappingChipField()&&h&&!this._multiple&&this._values.length&&this._clearValue();break}}_executeFilter(e=!0,a=!1){if(!this._filter||typeof this._filter!="function")throw new Error('A filter callback must be provided. Did you set the "filter" property?');let o=this._filter,n=e?this._filterText:"",i=a?this._getValue():null;return new Promise((l,h)=>Promise.resolve(o(n,i)).then(c=>{this._options=c,l(this._options)}).catch(c=>h(`An unexpected error occurred while filtering: ${c}`)))}_onFilterComplete(){if(!this._adapter.hasFocus()){this._isDropdownOpen&&this._closeDropdown();return}if(this._options.length){let e=this._allowUnmatched&&!this._selectedOptions.length;this._dropdownReady({userTriggered:e}),this._filterFocusFirst&&this._filterText&&this._adapter.activateFirstOption()}else this._closeDropdown()}_clearValue(){this._selectedOptions=[],this._values=[],this._isDropdownOpen&&(this._adapter.setSelectedOptions([]),this._adapter.clearActiveOption()),this._emitChangeEvent()}async _showDropdown({filter:e=!0,userTriggered:a=!0,activateFirst:o=!1,activateSelected:n=!1}={}){if(!this._isInitialized||!this._adapter.hasInputElement())return;let i=this._allowUnmatched&&!this._selectedOptions.length;this._isDropdownOpen=!0;let l;if(this._optionBuilder){let c=this._optionBuilder;l=(d,u)=>c(d,this._filterText,u)}let h={options:this._options,referenceElement:this._adapter.inputElement,multiple:this._multiple,selectedValues:[...this._values],id:`forge-autocomplete-${this._identifier}`,asyncStyle:"skeleton",headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,transform:c=>{if(this._filterText){let d=g3(c,this._filterText);if(d)return d}return c},allowBusy:!0,optionBuilder:l,optionLimit:this._optionLimit,popupClasses:this._popupClasses,syncWidth:this._syncPopupWidth,constrainViewportWidth:this._constrainPopupWidth,wrapOptionText:this._wrapOptionText,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,selectCallback:c=>this._onSelect(c),closeCallback:()=>this._closeDropdown()};if(this._adapter.show(h,this._popupTarget),this._adapter.toggleHostAttribute(s1.attributes.OPEN,this._isDropdownOpen),e){this._options.length&&this._adapter.setBusyVisibility(!0);try{await this._executeFilter(i)}catch(c){console.error(c)}this._updateSelectedOptions(this._values)}this._pendingFilterPromises.length||this._dropdownReady({userTriggered:a,activateFirst:o,activateSelected:n})}_dropdownReady({userTriggered:e=!0,activateFirst:a=!1,activateSelected:o=!1}={}){if(!this._isDropdownOpen||!this._options.length||e&&!this._adapter.hasFocus()){this._closeDropdown();return}this._sortSelectedOptions(),this._adapter.setBusyVisibility(!1),this._adapter.setOptions(this._options),this._adapter.setSelectedOptions(this._selectedOptions),this._adapter.setDismissListener(this._dismissListener),o&&this._selectedOptions.length?this._adapter.activateSelectedOption():a&&this._adapter.activateFirstOption()}_closeDropdown({destroy:e=!1}={}){this._multiple&&(this._filterText=""),this._isDropdownOpen=!1,this._adapter.hide(this._dismissListener,{destroy:e}),this._sortSelectedOptions(),this._adapter.toggleHostAttribute(s1.attributes.OPEN,this._isDropdownOpen)}_sortSelectedOptions(){if(this._multiple&&this._selectedOptions.length&&gr(this._options,0)){let e=[],a=[];this._options.forEach(o=>{this._selectedOptions.find(n=>wr(n,o.value,this._matchKey))?e.push(o):a.push(o)}),this._options=[...e,...a]}}async _onSelect(e,a=!0){if(this._valueChanging)return;if(this._mode==="stateless"){let n={value:e};this._adapter.emitHostEvent(s1.events.SELECT,n,!0,!0)&&(this._filterText="",this._multiple||this._closeDropdown());return}let o=()=>{let i=this._flatOptions.find(c=>wr(c,e,this._matchKey)),l=i?i.value:"",h=i?i.label:"";if(this._multiple){let c=Yc(this._selectedOptions,l);if(c){let d=this._selectedOptions.indexOf(c);this._selectedOptions.splice(d,1)}else this._selectedOptions.push(i)}else k(l)?(this._selectedOptions[0]=i,this._filterText=h):(this._selectedOptions=[],this._filterText="");this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions),this._values=this._selectedOptions.map(c=>c.value),this._adapter.setSelectedText(this._getSelectedText()),!$2.isMobile&&a&&this._adapter.selectInputValue(),this._emitChangeEvent(),this._tryUpdateDropdownPosition()};this._isDropdownOpen&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"?(this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,e,this._matchKey)),await this._valueChanging?o():this._tryUpdateDropdownPosition(),this._valueChanging=void 0):o()}_selectActiveOption(e=!0){let a=this._adapter.getActiveOptionIndex();if(typeof a=="number"&&a>=0){let o=this._flatOptions[a];o&&this._onSelect(o.value,e)}}_emitChangeEvent(){this._adapter.emitHostEvent(s1.events.CHANGE,this._getValue(),!0)}_tryUpdateDropdownPosition(){this._isDropdownOpen&&this._adapter.queueDropdownPositionUpdate()}_getValue(){return this._values?this._values.length?this._multiple?[...this._values]:this._values[0]:this._multiple?[]:null:null}_getSelectedText(){var e,a;return this._adapter.isWrappingChipField()?"":this._selectedTextBuilder?this._selectedTextBuilder(this._selectedOptions):this._multiple?this._values.length?this._values.length===1?(a=(e=this._selectedOptions[0])==null?void 0:e.label)!=null?a:"":`${this._values.length} options selected`:"":this._selectedOptions.filter(o=>o&&o.label).map(o=>o.label).join(" ").trim()}_onDismiss(){this._closeDropdown()}async _applyValue(e){let a=[];this._selectedOptions=[],Array.isArray(e)?a=e:a=k(e)?[e]:[],!this._multiple&&a.length>1&&(a=[a[0]]),gr(a,0)?(this._values=a.map(n=>n.value),this._selectedOptions=a):this._values=a;let o=this._flatOptions;if(a.length&&o.length&&this._updateSelectedOptions(a),this._values.length&&!this._selectedOptions.length&&this._filter&&this._isInitialized){try{await this._executeFilter(!1,!0)}catch(n){console.error(n)}this._updateSelectedOptions(this._values)}this._multiple?this._filterText="":this._filterText=this._selectedOptions.length?this._selectedOptions[0].label:"",this._isInitialized&&this._adapter.setSelectedText(this._getSelectedText()),this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions)}_updateSelectedOptions(e){let a=[...this._flatOptions,...this._selectedOptions];if(this._selectedOptions.length&&(this._selectedOptions=[]),gr(e,0))for(let o of e){let n=a.find(i=>wr(i,o.value,this._matchKey));n?this._selectedOptions.push(n):this._selectedOptions.push(o)}else for(let o of e){let n=a.find(i=>wr(i,o,this._matchKey));n?this._selectedOptions.push(n):this._allowUnmatched&&this._selectedOptions.push({label:o,value:o})}}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._mode==="stateless"&&(this._selectedOptions=[],this._isDropdownOpen&&this._closeDropdown()),this._adapter.setHostAttribute(s1.attributes.MODE,this._mode))}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._adapter.setHostAttribute(s1.attributes.MULTIPLE,k(this._multiple)?this._multiple.toString():""))}get value(){return this._getValue()}set value(e){let a=[];e==null?a=[]:Array.isArray(e)?a=structuredClone(e):Pt(e)?a=[e]:a=[structuredClone(e)],(a.length!==this._values.length||a.some(n=>!this._values.includes(n)))&&this._applyValue(e)}get filterOnFocus(){return this._filterOnFocus}set filterOnFocus(e){this._filterOnFocus!==e&&(this._filterOnFocus=e,this._adapter.setHostAttribute(s1.attributes.FILTER_ON_FOCUS,k(this._filterOnFocus)?this._filterOnFocus.toString():""))}get filterFocusFirst(){return this._filterFocusFirst}set filterFocusFirst(e){this._filterFocusFirst!==e&&(this._filterFocusFirst=e,this._adapter.toggleHostAttribute(s1.attributes.FILTER_FOCUS_FIRST,this._filterFocusFirst))}get allowUnmatched(){return this._allowUnmatched}set allowUnmatched(e){this._allowUnmatched!==e&&(this._allowUnmatched=e,k(this._allowUnmatched)&&this._adapter.setHostAttribute(s1.attributes.ALLOW_UNMATCHED,this._allowUnmatched.toString()))}get matchKey(){return this._matchKey}set matchKey(e){this._matchKey!==e&&(this._matchKey=e)}get popupTarget(){return this._popupTarget}set popupTarget(e){this._popupTarget!==e&&(this._popupTarget=e)}get filterText(){return this._filterText}set filterText(e){this._filterText!==e&&(this._filterText=this._allowUnmatched?e:"",this._isInitialized&&this._allowUnmatched&&(this._adapter.setInputValue(this._filterText),this._isDropdownOpen&&this._debounceFilter({checkFocus:!1})))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:[this._popupClasses]}set popupClasses(e){this._popupClasses!==e&&(this._popupClasses=Array.isArray(e)?[...e]:[e])}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}set popupFooterBuilder(e){this._popupFooterBuilder=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth!==e&&(this._syncPopupWidth=e)}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit!==e&&(this._optionLimit=e)}get debounce(){return this._debounce}set debounce(e){this._debounce!==e&&(this._debounce=e,this._isInitialized&&this._setFilterCallback(),this._adapter.setHostAttribute(s1.attributes.DEBOUNCE,k(this._debounce)?this._debounce.toString():""))}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get filter(){return this._filter}set filter(e){this._filter!==e&&(this._filter=e,this._isInitialized&&this._values.length&&!this._flatOptions.length&&this._filter&&this._executeFilter().then(()=>{this._updateSelectedOptions(this._values),this._adapter.setSelectedText(this._getSelectedText())}))}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e,this._selectedOptions.length&&this._adapter.setSelectedText(this._getSelectedText())}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}appendOptions(e){this._isDropdownOpen&&(this._options=[...this._options,...e],this._adapter.appendOptions(e))}get isInitialized(){return this._isInitialized}get open(){return this._isDropdownOpen}set open(e){this._isDropdownOpen!==e&&(e?this._showDropdown({userTriggered:!1}):this._closeDropdown())}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){e!==this._beforeValueChange&&(this._beforeValueChange=e)}get popupElement(){return this._adapter.getPopupElement()}};var Fw="<template><slot></slot></template>",Uw=":host{display:block}:host([hidden]){display:none}",c2=class extends R2{static get observedAttributes(){return[...R2.observedAttributes,s1.attributes.MODE,s1.attributes.MULTIPLE,s1.attributes.DEBOUNCE,s1.attributes.FILTER_ON_FOCUS,s1.attributes.FILTER_FOCUS_FIRST,s1.attributes.ALLOW_UNMATCHED,s1.attributes.POPUP_TARGET,s1.attributes.OPEN,s1.attributes.MATCH_KEY,s1.attributes.FILTER_TEXT]}constructor(){super(),q.define([C0,A0,z0]),H(this,Fw,Uw),this._core=new ns(new rs(this))}connectedCallback(){this.querySelector(s1.selectors.INPUT)?this._core.initialize():I0(this,s1.selectors.INPUT).then(()=>this._core.initialize())}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(super.attributeChangedCallback(t,e,a),t){case s1.attributes.MODE:this.mode=a;break;case s1.attributes.MULTIPLE:this.multiple=p(a);break;case s1.attributes.DEBOUNCE:this.debounce=W(a);break;case s1.attributes.FILTER_ON_FOCUS:this.filterOnFocus=p(a);break;case s1.attributes.FILTER_FOCUS_FIRST:this.filterFocusFirst=p(a);break;case s1.attributes.ALLOW_UNMATCHED:this.allowUnmatched=p(a);break;case s1.attributes.POPUP_TARGET:this.popupTarget=a;break;case s1.attributes.OPEN:this.open=p(a);break;case s1.attributes.MATCH_KEY:this.matchKey=a;break;case s1.attributes.FILTER_TEXT:this.filterText=a;break}}appendOptions(t){this._core.appendOptions(t)}openDropdown(){this.open=!0}closeDropdown(){this.open=!1}forceFilter(t={preserveValue:!1}){this._core.forceFilter(t)}};s([v()],c2.prototype,"mode",2),s([v()],c2.prototype,"multiple",2),s([v()],c2.prototype,"value",2),s([v()],c2.prototype,"debounce",2),s([v()],c2.prototype,"filterOnFocus",2),s([v()],c2.prototype,"filterFocusFirst",2),s([v()],c2.prototype,"allowUnmatched",2),s([v()],c2.prototype,"popupTarget",2),s([v()],c2.prototype,"filterText",2),s([v()],c2.prototype,"optionBuilder",2),s([v()],c2.prototype,"filter",2),s([v()],c2.prototype,"selectedTextBuilder",2),s([v()],c2.prototype,"open",2),s([v()],c2.prototype,"matchKey",2),s([v({set:!1})],c2.prototype,"isInitialized",2),s([v({set:!1})],c2.prototype,"popupElement",2),s([v()],c2.prototype,"beforeValueChange",2),c2=s([y({name:s1.elementName,dependencies:[m0,P1,h2,j1,Z0,Y0,ae,X]})],c2);var Kc=class extends a2{constructor(t){super(t)}_build(){let t=document.createElement(s1.elementName);return this._attachTextField(t),t}get textFieldDelegate(){return this._textFieldDelegate}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(t){this._textFieldDelegate.inputElement.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.addEventListener(s1.events.CHANGE,e=>t(e.detail))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var a,o,n,i,l,h;let e={props:w({},(o=(a=this._config.options)==null?void 0:a.textFieldDelegateConfig)==null?void 0:o.props),options:w({},(i=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:i.options)};e.options||(e.options={}),((l=this._config.options)==null?void 0:l.useDropdownIcon)!==!1&&!((h=e.options)!=null&&h.trailingElement)&&(e.options.trailingElement=this._createDropdownIconElement()),this._textFieldDelegate=new J0(e),t.appendChild(this._textFieldDelegate.element)}_createDropdownIconElement(){let t={props:{slot:"trailing",name:"arrow_drop_down"},options:{attributes:{"forge-dropdown-icon":""}}};return new P0(t).element}};function qc(){x(c2)}var Ww=`${b}backdrop`,$c={VISIBLE:"visible",FIXED:"fixed"},Gw=w({},$c),Yw={ENTERING:"entering",EXITING:"exiting"},Kw={ROOT:".forge-backdrop"},s2={elementName:Ww,observedAttributes:$c,attributes:Gw,classes:Yw,selectors:Kw};var qw='<template><div class="forge-backdrop" part="root"></div></template>',$w="@keyframes enter{from{opacity:0}to{opacity:var(--_backdrop-opacity)}}@keyframes exit{from{opacity:var(--_backdrop-opacity)}to{opacity:0}}:host{display:contents}:host([hidden]){display:none}.forge-backdrop{--_backdrop-background:var(--forge-backdrop-background, #000);--_backdrop-opacity:var(--forge-backdrop-opacity, 0.54);--_backdrop-z-index:var(--forge-backdrop-z-index, var(--forge-z-index-backdrop, 7));--_backdrop-enter-animation-duration:var(--forge-backdrop-enter-animation-duration, var(--forge-animation-duration-short4, 200ms));--_backdrop-enter-animation-easing:var(--forge-backdrop-enter-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_backdrop-exit-animation-duration:var(--forge-backdrop-exit-animation-duration, var(--forge-animation-duration-short1, 50ms));--_backdrop-exit-animation-easing:var(--forge-backdrop-exit-animation-easing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)))}.forge-backdrop{position:absolute;inset:0;z-index:var(--_backdrop-z-index);background:var(--_backdrop-background);opacity:0;animation-fill-mode:forwards}:host([fixed]) .forge-backdrop{position:fixed}:host([visible]) .forge-backdrop{opacity:var(--_backdrop-opacity)}:host([visible]) .forge-backdrop.entering{animation-name:enter;animation-duration:var(--_backdrop-enter-animation-duration);animation-timing-function:var(--_backdrop-enter-animation-easing)}:host([visible]) .forge-backdrop.exiting{animation-name:exit;animation-duration:var(--_backdrop-exit-animation-duration);animation-timing-function:var(--_backdrop-exit-animation-easing)}",We=class extends M{constructor(){super();this._visible=!1;this._fixed=!1;H(this,qw,$w),this._rootElement=g(this,s2.selectors.ROOT)}static get observedAttributes(){return Object.values(s2.observedAttributes)}disconnectedCallback(){this._animationController&&(this._animationController.abort(),this._animationController=void 0),this.classList.remove(s2.classes.ENTERING,s2.classes.EXITING)}attributeChangedCallback(e,a,o){switch(e){case s2.attributes.VISIBLE:this.visible=p(o);break;case s2.attributes.FIXED:this.fixed=p(o);break}}async _applyVisibility(e,{animate:a}={animate:!0}){if(this._visible===e)return;if(this._visible=e,!this.isConnected)return this.toggleAttribute(s2.attributes.VISIBLE,this._visible),Promise.resolve();if(!a){this.toggleAttribute(s2.attributes.VISIBLE,this._visible);return}let o=this._visible,n=o?s2.classes.ENTERING:s2.classes.EXITING;this._animationController&&(this._animationController.abort(),this._rootElement.classList.remove(s2.classes.ENTERING,s2.classes.EXITING)),this._animationController=new AbortController;let i=new Promise(l=>{var h;this._rootElement.addEventListener("animationend",()=>{o||this.removeAttribute(s2.attributes.VISIBLE),this._rootElement.classList.remove(n),l()},{once:!0,signal:(h=this._animationController)==null?void 0:h.signal})});return o&&this.setAttribute(s2.attributes.VISIBLE,""),this._rootElement.classList.add(n),i}show(){this._applyVisibility(!0,{animate:!1})}hide(){this._applyVisibility(!1,{animate:!1})}fadeIn(){return this._applyVisibility(!0)}fadeOut(){return this._applyVisibility(!1)}get visible(){return this._visible}set visible(e){e=!!e,this._visible!==e&&this._applyVisibility(e)}get fixed(){return this._fixed}set fixed(e){e=!!e,this._fixed!==e&&(this._fixed=e,this.toggleAttribute(s2.attributes.FIXED,this._fixed))}};We=s([y({name:s2.elementName})],We);function Xc(){x(We)}var k4=`${b}banner`,jc={DISMISSED:"dismissed",PERSISTENT:"persistent",CAN_DISMISS:"can-dismiss",THEME:"theme"},Xw=w({},jc),jw={HAS_ICON:"has-icon",HAS_BUTTON:"has-button"},Zw={DISMISS_BUTTON:"[part=dismiss-button]",ICON_SLOT:"slot[name=icon]",BUTTON_SLOT:"slot[name=button]"},Qw={THEME:"info"},Jw={BEFORE_DISMISS:`${k4}-before-dismiss`,DISMISSED:`${k4}-dismissed`},M2={elementName:k4,observedAttributes:jc,attributes:Xw,classes:jw,selectors:Zw,defaults:Qw,events:Jw};var is=class extends I{constructor(e){super(e);this._rootElement=this._component;this._rootElement=g(e,".forge-banner"),this._dismissButtonElement=g(e,M2.selectors.DISMISS_BUTTON),this._iconSlotElement=g(e,M2.selectors.ICON_SLOT),this._buttonSlotElement=g(e,M2.selectors.BUTTON_SLOT)}initialize(){this._iconSlotElement.addEventListener("slotchange",this._onIconSlotChange.bind(this)),this._buttonSlotElement.addEventListener("slotchange",this._onButtonSlotChange.bind(this)),this._onIconSlotChange(),this._onButtonSlotChange()}setDismissButtonVisibility(e){this._dismissButtonElement.hidden=!e}addDismissListener(e){this._dismissButtonElement.addEventListener("click",e)}removeDismissListener(e){this._dismissButtonElement.removeEventListener("click",e)}setDismissed(e){this._rootElement.inert=e}async startDismissCompleteListener(){return new Promise(e=>{this._rootElement.addEventListener("transitionend",()=>e(),{once:!0})})}_onIconSlotChange(){this._rootElement.classList.toggle(M2.classes.HAS_ICON,this._iconSlotElement.assignedNodes().length>0)}_onButtonSlotChange(){this._rootElement.classList.toggle(M2.classes.HAS_BUTTON,this._buttonSlotElement.assignedNodes().length>0)}};var ss=class{constructor(t){this._adapter=t;this._dismissed=!1;this._persistent=!1;this._theme=M2.defaults.THEME;this._dismissListener=this._onDismiss.bind(this)}initialize(){this._adapter.initialize(),this._persistent||this._addDismissListener()}async _onDismiss(){if(this._dismissed||this._persistent)return;let t=this._dismissed;this._dismissed=!this._dismissed;let e=new CustomEvent(M2.events.BEFORE_DISMISS,{bubbles:!0,composed:!0,cancelable:!0});if(this._adapter.dispatchHostEvent(e),this._dismissed=t,e.defaultPrevented)return;let a=this._adapter.startDismissCompleteListener();this.dismissed=!this._dismissed,await a,this._adapter.dispatchHostEvent(new CustomEvent(M2.events.DISMISSED,{bubbles:!0,composed:!0}))}_addDismissListener(){this._adapter.addDismissListener(this._dismissListener)}_removeDismissEventListener(){this._adapter.removeDismissListener(this._dismissListener)}_applyPersistent(){this._adapter.setDismissButtonVisibility(!this._persistent),this._persistent?this._removeDismissEventListener():this._addDismissListener()}get dismissed(){return this._dismissed}set dismissed(t){t=!!t,this.dismissed!==t&&(this._dismissed=t,this._adapter.setDismissed(this._dismissed),this._adapter.toggleHostAttribute(M2.attributes.DISMISSED,this.dismissed))}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._applyPersistent(),this._adapter.toggleHostAttribute(M2.attributes.PERSISTENT,this._persistent))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:M2.defaults.THEME,this._adapter.setHostAttribute(M2.attributes.THEME,this._theme))}};var tu='<template><div class="forge-banner" part="root"><div class="inner"><div class="container"><slot name="icon"></slot><slot></slot><div class="button-container"><slot name="button"></slot></div></div><div class="dismiss-button-container"><slot name="dismiss-button"><forge-icon-button part="dismiss-button"><forge-icon name="cancel"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="bottom"><slot name="dismiss-tooltip">Dismiss</slot></forge-tooltip></slot></div></div></div></template>',eu=":host{display:block;container-type:inline-size}:host([hidden]){display:none}.forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-info-container, #c7daf0));--_banner-color:var(--forge-banner-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-info-container, #0b3768));--_banner-gap:var(--forge-banner-gap, var(--forge-spacing-small, 12px));--_banner-padding-inline:var(--forge-banner-padding-inline, var(--forge-spacing-large, 24px));--_banner-padding-block:var(--forge-banner-padding-block, var(--forge-spacing-small, 12px));--_banner-transition-duration:var(--forge-banner-transition-duration, var(--forge-animation-duration-short4, 200ms));--_banner-transition-easing:var(--forge-banner-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-banner{display:grid;grid-template-columns:1fr;grid-template-rows:1fr;overflow:hidden;box-sizing:border-box;transition-property:opacity,grid-template-rows,min-height;transition-duration:var(--_banner-transition-duration);transition-timing-function:var(--_banner-transition-easing);background:var(--_banner-background);color:var(--_banner-color);opacity:1}.forge-banner .inner{display:grid;grid-template-columns:1fr auto;place-items:center;gap:var(--_banner-gap);overflow:hidden;padding-inline:var(--_banner-padding-inline)}.forge-banner .container{display:flex;justify-content:center;align-items:center;gap:var(--_banner-gap);flex:1 1 auto;padding-block:var(--_banner-padding-block)}.forge-banner .dismiss-button-container{display:flex;align-items:center;gap:var(--_banner-gap)}.forge-banner ::slotted(forge-button[slot=dismiss-button]){--forge-button-primary-color:var(--_banner-color)}.forge-banner ::slotted(forge-icon-button[slot=dismiss-button]),.forge-banner forge-icon-button[part=dismiss-button]{color:var(--_banner-icon-color);--forge-icon-button-focus-indicator-color:var(--_banner-color)}::slotted(forge-button[slot=button]){--forge-button-primary-color:var(--_banner-color)}::slotted([slot=icon]){color:var(--_banner-icon-color)}:host([dismissed]) .forge-banner{grid-template-rows:0fr;opacity:0}:host([theme=primary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-primary-container, #d1d5ed));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-primary-container, #222c62))}:host([theme=secondary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-secondary-container, #fff0c3));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-secondary-container, #8a6804))}:host([theme=tertiary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-tertiary-container, #d0d7ff));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-tertiary-container, #213189))}:host([theme=success]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-success-container, #cde0ce));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-success-container, #19441b))}:host([theme=error]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-error-container, #ecc2c9));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-error-container, #5f0011))}:host([theme=warning]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-warning-container, #f4d3c2));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-warning-container, #712700))}:host([theme=danger]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-error-container, #ecc2c9));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-error-container, #5f0011))}:host([theme=info-secondary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-surface-container, #e0e0e0));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-surface-container, #000000))}@container (max-width:600px){.forge-banner.has-button .container{display:grid;grid-template-rows:[content] 1fr [button] auto;grid-template-columns:[content] 1fr;place-items:normal}.forge-banner.has-button.has-icon .container{grid-template-columns:[icon] auto [content] 1fr}.forge-banner.has-button .inner{place-items:normal}.forge-banner.has-button .button-container{grid-row:button;grid-column:content}.forge-banner.has-button .dismiss-button-container{align-items:flex-start}}",g0=class extends M{static get observedAttributes(){return Object.values(M2.observedAttributes)}constructor(){super(),q.define(X5),H(this,tu,eu),this._core=new ss(new is(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case M2.observedAttributes.DISMISSED:this.dismissed=p(a);break;case M2.observedAttributes.PERSISTENT:this.persistent=p(a);break;case M2.observedAttributes.CAN_DISMISS:this.persistent=p(a)===!1;break;case M2.observedAttributes.THEME:this.theme=a;break}}get canDismiss(){return!this.persistent}set canDismiss(t){this.persistent=!t}};s([v()],g0.prototype,"dismissed",2),s([v()],g0.prototype,"persistent",2),s([v()],g0.prototype,"theme",2),g0=s([y({name:M2.elementName,dependencies:[n1,p1]})],g0);function Zc(){x(g0)}var ta=`${b}dialog`,Qc={OPEN:"open",VISIBLE:"visible",MODE:"mode",TYPE:"type",ANIMATION_TYPE:"animation-type",PRESET:"preset",PERSISTENT:"persistent",FULLSCREEN:"fullscreen",FULLSCREEN_THRESHOLD:"fullscreen-threshold",TRIGGER:"trigger",MOVEABLE:"moveable",MOVE_TARGET:"move-target",POSITION_STRATEGY:"position-strategy",PLACEMENT:"placement",SIZE_STRATEGY:"size-strategy",LABEL:"label",DESCRIPTION:"description"},au=t1(w({},Qc),{ARIA_LABEL_ID:"forge-dialog-label",ARIA_DESCRIPTION_ID:"forge-dialog-description"}),ou={MOVED:"moved",MOVING:"moving"},ru={DIALOG:".forge-dialog",SURFACE:".surface",MOVE_HANDLE:".move-handle",AUTOFOCUS:":is([autofocus],[forge-dialog-focus])"},nu={BEFORE_CLOSE:`${ta}-before-close`,OPEN:`${ta}-open`,CLOSE:`${ta}-close`,MOVE_START:`${ta}-move-start`,MOVE:`${ta}-move`,MOVE_END:`${ta}-move-end`,FULLSCREEN_CHANGE:`${ta}-fullscreen-change`},iu={MODE:"modal",TYPE:"dialog",ANIMATION_TYPE:"zoom",PRESET:"dialog",SIZE_STRATEGY:"content",POSITION_STRATEGY:"viewport",PLACEMENT:"center",FULLSCREEN_THRESHOLD:599},O={elementName:ta,observedAttributes:Qc,classes:ou,attributes:au,selectors:ru,events:nu,defaults:iu},ls=Symbol("hideBackdrop"),vs=Symbol("showBackdrop"),w0=Symbol("dialogStack");var hs=class extends I{get moveHandleElement(){return this._moveHandleElement}get surfaceElement(){return this._surfaceElement}constructor(t){super(t),this._dialogElement=g(t,O.selectors.DIALOG),this._surfaceElement=g(t,O.selectors.SURFACE),this._moveHandleElement=g(t,O.selectors.MOVE_HANDLE),this._backdropElement=g(t,s2.elementName),this._backdropElement.shadowRoot||window.customElements.upgrade(this._backdropElement)}destroy(){this._forceClose()}show(){if(this._dialogElement.open)return;this._component.type!=="dialog"&&this._dialogElement.setAttribute("role",this._component.type);let t=this._component.mode==="modal"||this._component.mode==="inline-modal";t||this._dialogElement.setAttribute("aria-modal","false"),t&&(this._component.animationType==="none"?this._backdropElement.show():this._backdropElement.fadeIn()),this._component.mode==="modal"?this._dialogElement.showModal():this._dialogElement.show(),t&&this._hideBackdrops(),E1[w0].add(this._component)}_hideBackdrops(){E1[w0].forEach(t=>t[ls]())}_showBackdropMostRecent(){var t;(t=Array.from(E1[w0]).filter(e=>e.mode==="modal"||e.mode==="inline-modal").at(-1))==null||t[vs]()}async hide(){if(this._component.animationType==="none")return this._forceClose(),Promise.resolve();this._backdropElement.fadeOut(),await Rt(this._surfaceElement,s2.classes.EXITING),this._forceClose()}addDialogFormSubmitListener(t){this._dialogElement.addEventListener("submit",t)}removeDialogFormSubmitListener(t){this._dialogElement.removeEventListener("submit",t)}addBackdropDismissListener(t){this._backdropElement.addEventListener("click",t)}removeBackdropDismissListener(t){this._backdropElement.removeEventListener("click",t)}tryAutofocus(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{if(!this._component.matches(":focus-within")&&(this._dialogElement.focus(),this._component.open&&this._dialogElement.isConnected)){let e=this._component.querySelector(O.selectors.AUTOFOCUS);e==null||e.focus()}})})}tryLocateTriggerElement(t){if(!t){this.triggerElement=null;return}let e=this._component.getRootNode();this.triggerElement=e.querySelector(`#${t}`)}addTriggerInteractionListener(t){var e;(e=this.triggerElement)==null||e.addEventListener("click",t)}removeTriggerInteractionListener(t){var e;(e=this.triggerElement)==null||e.removeEventListener("click",t)}hideBackdrop(){this._backdropElement.fadeOut()}showBackdrop(){this._backdropElement.fadeIn()}addSurfaceClass(t){this._surfaceElement.classList.add(t)}removeSurfaceClass(t){this._surfaceElement.classList.remove(t)}addFullscreenListener(t,e){this._fullscreenMediaQuery=window.matchMedia(`(max-width: ${t}px)`),this._fullscreenMediaQuery.addEventListener("change",a=>e(a.matches)),!this._component.fullscreen&&this._fullscreenMediaQuery.matches&&e(!0)}removeFullscreenListener(t){var e;(e=this._fullscreenMediaQuery)==null||e.removeEventListener("change",a=>t(a.matches)),this._fullscreenMediaQuery=void 0}setAccessibleLabel(t){var e,a;if(t!=null&&t.trim()){if(this._accessibleLabelElement=this._createOrUpdateVisuallyHiddenElement(O.attributes.ARIA_LABEL_ID,t),this._accessibleLabelElement.isConnected)return;this._dialogElement.appendChild(this._accessibleLabelElement),this._dialogElement.setAttribute("aria-labelledby",this._accessibleLabelElement.id)}else(e=this._accessibleLabelElement)!=null&&e.isConnected&&(this._dialogElement.removeAttribute("aria-labelledby"),(a=this._accessibleLabelElement)==null||a.remove(),this._accessibleLabelElement=void 0)}setAccessibleDescription(t){var e,a;if(t!=null&&t.trim()){if(this._accessibleDescriptionElement=this._createOrUpdateVisuallyHiddenElement(O.attributes.ARIA_DESCRIPTION_ID,t),this._accessibleDescriptionElement.isConnected)return;this._dialogElement.appendChild(this._accessibleDescriptionElement),this._dialogElement.setAttribute("aria-describedby",this._accessibleDescriptionElement.id)}else(e=this._accessibleDescriptionElement)!=null&&e.isConnected&&(this._dialogElement.removeAttribute("aria-describedby"),(a=this._accessibleDescriptionElement)==null||a.remove(),this._accessibleDescriptionElement=void 0)}_createOrUpdateVisuallyHiddenElement(t,e){let a=e.trim(),o=this._dialogElement.querySelector(`#${t}`);return o?(o.textContent=a,o):(o=document.createElement("div"),o.classList.add("visually-hidden"),o.id=t,o.textContent=a,o)}_forceClose(){this._surfaceElement.classList.remove(s2.classes.EXITING),this._dialogElement.close(),E1[w0].delete(this._component),this._showBackdropMostRecent()}};function Jc(r=class{}){class t extends r{constructor(){super(...arguments);this._isMoving=!1;this._activeElement=void 0;this._movePointerDownListener=this._onMoveTargetPointerDown.bind(this);this._movePointerMoveListener=this._onMoveTargetPointerMove.bind(this);this._movePointerUpListener=this._onMoveTargetPointerUp.bind(this)}stopMoveListener(){this._updatePosition(null,null),document.removeEventListener("pointermove",this._movePointerMoveListener),document.removeEventListener("pointerup",this._movePointerUpListener),this._isMoving=!1,this._moveContext=void 0,this._lastPosition=void 0,this._activeElement=void 0}_onMoveTargetPointerDown(o){o.preventDefault(),this._captureActiveElement();let n=this._getMoveableBounds();this._moveContext={top:o.pageY-n.top,left:o.pageX-n.left,height:n.height,width:n.width},document.addEventListener("pointermove",this._movePointerMoveListener),document.addEventListener("pointerup",this._movePointerUpListener)}_onMoveTargetPointerMove(o){o.preventDefault();let n=this._calculateOffsetPosition(o.pageX,o.pageY,this._moveContext);if(!this._isMoving&&(this._isMoving=!0,this._onMoveStart()))return;let i=this._clampPosition(n,this._moveContext);if((!this._lastPosition||i.x!==this._lastPosition.x||i.y!==this._lastPosition.y)&&!this._onMove(i)){this._lastPosition=w({},i);let h=this._normalizePositionValue(i.x),c=this._normalizePositionValue(i.y);this._updatePosition(h,c)}}_onMoveTargetPointerUp(o){this._isMoving&&this._onMoveEnd(),this._moveComplete()}_moveComplete(){this._tryRestoreActiveElement(),document.removeEventListener("pointermove",this._movePointerMoveListener),document.removeEventListener("pointerup",this._movePointerUpListener),this._lastPosition=void 0,this._moveContext=void 0,this._isMoving=!1}_captureActiveElement(){var o;this._activeElement=Se(),(o=this._activeElement)==null||o.blur()}_tryRestoreActiveElement(){var o;(o=this._activeElement)!=null&&o.isConnected&&this._activeElement.focus(),this._activeElement=void 0}_normalizePositionValue(o){return z2(o)?`${o}px`:Pt(o)?o:null}_calculateOffsetPosition(o,n,i){var l,h;return{x:o-((l=i==null?void 0:i.left)!=null?l:0),y:n-((h=i==null?void 0:i.top)!=null?h:0)}}_clampPosition({x:o,y:n},i){let l=0,h=0;return i&&(l=i.width,h=i.height),o<=0?o=0:o+l>=window.innerWidth&&(o=window.innerWidth-l),n<=0?n=0:n+h>=window.innerHeight&&(n=window.innerHeight-h),{x:o,y:n}}}return t}var cs=class extends Jc(Object){constructor(e){super();this._config=e;this._startMoveListener()}destroy(){this._stopMoveListener(),super.stopMoveListener()}_getMoveableBounds(){return this._config.surfaceElement.getBoundingClientRect()}_updatePosition(e,a){this._config.surfaceElement.style.top=a!=null?a:"",this._config.surfaceElement.style.left=e!=null?e:""}_onMoveStart(){return this._config.onMoveStart()}_onMove(e){return this._config.onMove(e)}_onMoveEnd(){this._config.onMoveEnd()}_startMoveListener(){this._config.handleElement.addEventListener("pointerdown",this._movePointerDownListener)}_stopMoveListener(){this._config.handleElement.removeEventListener("pointerdown",this._movePointerDownListener)}};var ps=class{constructor(t){this._adapter=t;this._open=!1;this._mode=O.defaults.MODE;this._type=O.defaults.TYPE;this._animationType=O.defaults.ANIMATION_TYPE;this._preset=O.defaults.PRESET;this._persistent=!1;this._fullscreen=!1;this._fullscreenThreshold=O.defaults.FULLSCREEN_THRESHOLD;this._trigger="";this._moveable=!1;this._label="";this._description="";this._sizeStrategy=O.defaults.SIZE_STRATEGY;this._placement=O.defaults.PLACEMENT;this._positionStrategy=O.defaults.POSITION_STRATEGY;this._escapeDismissListener=this._onEscapeDismiss.bind(this);this._backdropDismissListener=this._onBackdropDismiss.bind(this);this._dialogFormSubmitListener=this._onDialogFormSubmit.bind(this);this._triggerClickListener=this._onTriggerClick.bind(this);this._fullscreenListener=this._onFullscreenChange.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["mode","animationType","positionStrategy","sizeStrategy","persistent","moveable","fullscreenThreshold"]),this._trigger&&!this._adapter.triggerElement&&this._adapter.tryLocateTriggerElement(this._trigger),this._adapter.triggerElement&&this._adapter.addTriggerInteractionListener(this._triggerClickListener),this._open&&this._applyOpen()}destroy(){this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._moveController&&this._destroyMoveController(),this._release(),this._tryResetFullscreenValue(),this._adapter.destroy()}dispatchBeforeCloseEvent(){let t=new CustomEvent(O.events.BEFORE_CLOSE,{cancelable:!0,bubbles:!0,composed:!0});return this._adapter.dispatchHostEvent(t),!t.defaultPrevented}hideBackdrop(){this._adapter.hideBackdrop()}showBackdrop(){this._adapter.showBackdrop()}_show(){this._adapter.show(),this._adapter.addDialogFormSubmitListener(this._dialogFormSubmitListener),Vt.instance.add(this._adapter.hostElement),(this._mode==="modal"||this._mode==="inline-modal")&&this._adapter.addDocumentListener("keydown",this._escapeDismissListener),this._persistent||this._adapter.addBackdropDismissListener(this._backdropDismissListener),this._moveable&&!this._fullscreen&&this._initializeMoveController(),!this._fullscreen&&this._fullscreenThreshold>0&&(this._originalFullscreenValue=this._fullscreen,this._adapter.addFullscreenListener(this._fullscreenThreshold,this._fullscreenListener)),this._adapter.dispatchHostEvent(new CustomEvent(O.events.OPEN,{bubbles:!0,composed:!0}))}async _hide(){this._release(),await this._adapter.hide(),this._tryResetFullscreenValue(),this._moveController&&this._destroyMoveController(),this._adapter.dispatchHostEvent(new CustomEvent(O.events.CLOSE,{bubbles:!0,composed:!0}))}_release(){this._adapter.removeDialogFormSubmitListener(this._dialogFormSubmitListener),this._adapter.removeDocumentListener("keydown",this._escapeDismissListener),this._adapter.removeBackdropDismissListener(this._backdropDismissListener),Vt.instance.remove(this._adapter.hostElement)}_tryResetFullscreenValue(){typeof this._originalFullscreenValue=="boolean"&&(this.fullscreen=this._originalFullscreenValue),this._originalFullscreenValue=void 0}async _applyOpen(){this._open?(this._show(),this._adapter.tryAutofocus()):await this._hide(),this._adapter.toggleHostAttribute(O.attributes.VISIBLE,this._open),this._adapter.toggleHostAttribute(O.attributes.OPEN,this._open)}_onEscapeDismiss(t){t.key!=="Escape"||!Vt.instance.isMostRecent(this._adapter.hostElement)||(t.preventDefault(),this._persistent||this._tryClose())}_onBackdropDismiss(){this._tryClose()}_onDialogFormSubmit(t){var a,o;t.stopPropagation(),(((a=t.submitter)==null?void 0:a.getAttribute("formmethod"))==="dialog"||((o=t.target)==null?void 0:o.getAttribute("method"))==="dialog")&&this._tryClose()}_onFullscreenChange(t){this.fullscreen=t;let e=new CustomEvent(O.events.FULLSCREEN_CHANGE,{bubbles:!0,composed:!0,detail:t});this._adapter.dispatchHostEvent(e)}_tryClose(){this.dispatchBeforeCloseEvent()&&(this.open=!1)}_onTriggerClick(t){this.open=!this._open}_initializeMoveController(){if(this._moveController)return;let t=()=>{let i=new CustomEvent(O.events.MOVE_START,{cancelable:!0});return this._adapter.dispatchHostEvent(i),i.defaultPrevented},e=i=>{let l=new CustomEvent(O.events.MOVE,{detail:i,cancelable:!0});return this._adapter.dispatchHostEvent(l),l.defaultPrevented||(this._adapter.addSurfaceClass(O.classes.MOVED),this._adapter.addSurfaceClass(O.classes.MOVING)),l.defaultPrevented},a=()=>{let i=new CustomEvent(O.events.MOVE_END);this._adapter.removeSurfaceClass(O.classes.MOVING),this._adapter.dispatchHostEvent(i)},{moveHandleElement:o,surfaceElement:n}=this._adapter;this._moveController=new cs({handleElement:o,surfaceElement:n,onMoveStart:t,onMove:e,onMoveEnd:a})}_destroyMoveController(){var t;this._adapter.removeSurfaceClass(O.classes.MOVED),(t=this._moveController)==null||t.destroy(),this._moveController=void 0}_applyMoveable({enabled:t}={enabled:this._moveable}){t?this._initializeMoveController():this._destroyMoveController()}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&this._applyOpen())}get mode(){return this._mode}set mode(t){this._mode!==t&&(this._mode=t,this._adapter.setHostAttribute(O.attributes.MODE,this._mode))}get type(){return this._type}set type(t){this._type!==t&&(this._type=t,this._adapter.setHostAttribute(O.attributes.TYPE,this._type))}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._adapter.setHostAttribute(O.attributes.ANIMATION_TYPE,this._animationType))}get preset(){return this._preset}set preset(t){this._preset!==t&&(this._preset=t,this._adapter.setHostAttribute(O.attributes.PRESET,this._preset))}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._adapter.toggleHostAttribute(O.attributes.PERSISTENT,this._persistent))}get fullscreen(){return this._fullscreen}set fullscreen(t){t=!!t,this._fullscreen!==t&&(this._fullscreen=t,this._applyMoveable({enabled:!this._fullscreen}),this._adapter.toggleHostAttribute(O.attributes.FULLSCREEN,this._fullscreen))}get fullscreenThreshold(){return this._fullscreenThreshold}set fullscreenThreshold(t){this._fullscreenThreshold!==t&&(this._fullscreenThreshold=t,this._adapter.isConnected&&this._open&&!this._fullscreen&&this._fullscreenThreshold>0&&(this._adapter.removeFullscreenListener(this._fullscreenListener),this._adapter.addFullscreenListener(this._fullscreenThreshold,this._fullscreenListener)),this._adapter.setHostAttribute(O.attributes.FULLSCREEN_THRESHOLD,this._fullscreenThreshold.toString()))}get trigger(){var t;return(t=this._trigger)!=null?t:""}set trigger(t){this._trigger!==t&&(this._trigger=t,this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._adapter.isConnected&&(this._adapter.tryLocateTriggerElement(this._trigger),this._adapter.addTriggerInteractionListener(this._triggerClickListener)),this._adapter.setHostAttribute(O.attributes.TRIGGER,this._trigger))}get triggerElement(){return this._adapter.triggerElement}set triggerElement(t){this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._trigger&&(this._trigger=""),this._adapter.triggerElement=t,this._adapter.isConnected&&this._adapter.addTriggerInteractionListener(this._triggerClickListener)}get moveable(){return this._moveable}set moveable(t){t=!!t,this._moveable!==t&&(this._moveable=t,this._adapter.isConnected&&this._open&&this._applyMoveable(),this._adapter.toggleHostAttribute(O.attributes.MOVEABLE,this._moveable))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.setAccessibleLabel(this._label))}get description(){return this._description}set description(t){this._description!==t&&(this._description=t,this._adapter.setAccessibleDescription(this._description))}get positionStrategy(){return this._positionStrategy}set positionStrategy(t){this._positionStrategy!==t&&(this._positionStrategy=t,this._adapter.setHostAttribute(O.attributes.POSITION_STRATEGY,this._positionStrategy))}get sizeStrategy(){return this._sizeStrategy}set sizeStrategy(t){this._sizeStrategy!==t&&(this._sizeStrategy=t,this._adapter.setHostAttribute(O.attributes.SIZE_STRATEGY,this._sizeStrategy))}get placement(){return this._placement}set placement(t){this._placement!==t&&(this._placement=t,this._adapter.setHostAttribute(O.attributes.PLACEMENT,this._placement))}};var su='<template><dialog class="forge-dialog" part="root"><forge-backdrop exportparts="root:backdrop"></forge-backdrop><div class="surface" part="surface"><div class="move-handle-container" part="move-handle-container"><div class="move-handle" part="move-handle"><slot name="move-handle"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" part="move-handle-icon"><path d="M3 15v-2h2v2H3m0-4V9h2v2H3m4 4v-2h2v2H7m0-4V9h2v2H7m4 4v-2h2v2h-2m0-4V9h2v2h-2m4 4v-2h2v2h-2m0-4V9h2v2h-2m4 4v-2h2v2h-2m0-4V9h2v2h-2z"/></svg></slot></div></div><slot></slot></div></dialog></template>',lu="@keyframes forge-dialog-zoom-in{from{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}to{opacity:1;scale:1}}@keyframes forge-dialog-zoom-out{from{opacity:1;scale:1}to{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}}@keyframes forge-dialog-fade-in{from{opacity:var(--_dialog-fade-opacity)}to{opacity:1}}@keyframes forge-dialog-fade-out{from{opacity:1}to{opacity:var(--_dialog-fade-opacity)}}@keyframes forge-dialog-slide-in{from{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}to{opacity:1;translate:0 0}}@keyframes forge-dialog-slide-out{from{opacity:1;translate:0 0}to{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}}@layer base,nonmodal,animation,placement,size-strategy,preset,fullscreen,position-strategy,media; @layer base{:host{display:none;--forge-theme-surface:var(--forge-theme-surface-bright, #ffffff)}:host([hidden]){display:none}.forge-dialog{--_dialog-background:var(--forge-dialog-background, var(--forge-theme-surface-bright, #ffffff));--_dialog-shape:var(--forge-dialog-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_dialog-elevation:var(--forge-dialog-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));--_dialog-spacing:var(--forge-dialog-spacing, auto);--_dialog-block-start-spacing:var(--forge-dialog-block-start-spacing, var(--_dialog-spacing));--_dialog-block-end-spacing:var(--forge-dialog-block-end-spacing, var(--_dialog-spacing));--_dialog-inline-start-spacing:var(--forge-dialog-inline-start-spacing, var(--_dialog-spacing));--_dialog-inline-end-spacing:var(--forge-dialog-inline-end-spacing, var(--_dialog-spacing));--_dialog-padding:var(--forge-dialog-padding, 0);--_dialog-width:var(--forge-dialog-width, fit-content);--_dialog-height:var(--forge-dialog-height, fit-content);--_dialog-min-width:var(--forge-dialog-min-width, 0);--_dialog-max-width:var(--forge-dialog-max-width, calc(100% - var(--forge-spacing-xxlarge, 48px)));--_dialog-min-height:var(--forge-dialog-min-height, 0);--_dialog-max-height:var(--forge-dialog-max-height, calc(100% - var(--forge-spacing-xxlarge, 48px)));--_dialog-z-index:var(--forge-dialog-z-index, var(--forge-z-index-dialog, 8));--_dialog-move-handle-color:var(--forge-dialog-move-handle-color, currentColor);--_dialog-move-handle-size:var(--forge-dialog-move-handle-size, 24px);--_dialog-move-handle-hover-cursor:var(--forge-dialog-move-handle-hover-cursor, grab);--_dialog-move-handle-active-cursor:var(--forge-dialog-move-handle-active-cursor, grabbing);--_dialog-move-handle-spacing:var(--forge-dialog-move-handle-spacing, calc(var(--forge-spacing-xxsmall, 4px) * -1) 0 0);--_dialog-move-transition-duration:var(--forge-dialog-move-transition-duration, var(--forge-animation-duration-short4, 200ms));--_dialog-move-transition-easing:var(--forge-dialog-move-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_dialog-moving-opacity:var(--forge-dialog-moving-opacity, 0.54);--_dialog-enter-animation-duration:var(--forge-dialog-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-enter-animation-easing:var(--forge-dialog-enter-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_dialog-exit-animation-duration:var(--forge-dialog-exit-animation-duration, var(--forge-animation-duration-short2, 100ms));--_dialog-exit-animation-easing:var(--forge-dialog-exit-animation-easing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)));--_dialog-zoom-opacity:var(--forge-dialog-zoom-opacity, 0);--_dialog-zoom-scale:var(--forge-dialog-zoom-scale, 0.8);--_dialog-fade-opacity:var(--forge-dialog-fade-opacity, 0);--_dialog-slide-opacity:var(--forge-dialog-slide-opacity, 0);--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 -30%);--_dialog-backdrop-opacity:var(--forge-dialog-backdrop-opacity, var(--forge-backdrop-opacity, 0.54));--_dialog-nonmodal-elevation:var(--forge-dialog-nonmodal-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_dialog-fullscreen-enter-animation-duration:var(--forge-dialog-fullscreen-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-fullscreen-exit-animation-duration:var(--forge-dialog-fullscreen-exit-animation-duration, var(--forge-animation-duration-short2, 100ms));--_dialog-position-x:var(--forge-dialog-position-x, 0);--_dialog-position-y:var(--forge-dialog-position-y, 0);--_dialog-preset-sheet-enter-animation-duration:var(--forge-dialog-preset-sheet-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-preset-sheet-exit-animation-duration:var(--forge-dialog-preset-sheet-exit-animation-duration, var(--forge-animation-duration-short3, 150ms))}.forge-dialog{position:fixed;inset:0;z-index:var(--_dialog-z-index);background-color:transparent;color:inherit;border:none;width:auto;height:auto;padding:0;margin:0;overflow:visible;max-width:100%;max-height:100%;box-sizing:border-box}.container{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.surface{position:absolute;inset:0;display:flex;background:var(--_dialog-background);box-shadow:var(--_dialog-elevation);z-index:var(--_dialog-z-index);overflow:hidden;border-radius:var(--_dialog-shape);margin-block-start:var(--_dialog-block-start-spacing);margin-block-end:var(--_dialog-block-end-spacing);margin-inline-start:var(--_dialog-inline-start-spacing);margin-inline-end:var(--_dialog-inline-end-spacing);padding:var(--_dialog-padding);width:var(--_dialog-width);height:var(--_dialog-height);min-width:var(--_dialog-min-width);max-width:var(--_dialog-max-width);min-height:var(--_dialog-min-height);max-height:var(--_dialog-max-height);box-sizing:border-box}.visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:fixed;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}dialog.forge-dialog::backdrop{display:none}forge-backdrop{--forge-backdrop-opacity:var(--_dialog-backdrop-opacity);--forge-backdrop-enter-animation-duration:var(--_dialog-enter-animation-duration);--forge-backdrop-enter-animation-easing:var(--_dialog-enter-animation-easing);--forge-backdrop-exit-animation-duration:var(--_dialog-exit-animation-duration);--forge-backdrop-exit-animation-easing:var(--_dialog-exit-animation-easing)}:host(:not([moveable])) .move-handle{display:none}:host([moveable]:not([fullscreen])) .surface{user-select:none;transition-property:opacity;transition-duration:var(--_dialog-move-transition-duration);transition-timing-function:var(--_dialog-move-transition-easing)}:host([moveable]:not([fullscreen])) .surface:not(:hover) .move-handle-container{display:none}:host([moveable]:not([fullscreen])) .surface.moved{margin:0}:host([moveable]:not([fullscreen])) .surface.moving{opacity:var(--_dialog-moving-opacity)}:host([moveable]:not([fullscreen])) .move-handle-container{position:absolute;top:0;z-index:1;display:flex;justify-content:center;width:100%}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle{fill:var(--_dialog-move-handle-color);height:var(--_dialog-move-handle-size);width:var(--_dialog-move-handle-size);margin:var(--_dialog-move-handle-spacing);touch-action:none}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle:hover{cursor:var(--_dialog-move-handle-hover-cursor)}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle:active{cursor:var(--_dialog-move-handle-active-cursor)}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle svg{fill:currentColor}:host([visible]){display:contents}}@layer nonmodal{:host([mode=nonmodal]) .forge-dialog{pointer-events:none}:host([mode=nonmodal]) .container{display:contents}:host([mode=nonmodal]) .surface{--_dialog-elevation:var(--_dialog-nonmodal-elevation);pointer-events:all}:host([mode=nonmodal]) forge-backdrop{display:none}}@layer animation{:host([visible]:not([animation-type=none])) dialog.forge-dialog[open] .surface{animation-duration:var(--_dialog-enter-animation-duration);animation-timing-function:var(--_dialog-enter-animation-easing)}:host([visible]:not([animation-type=none])) dialog.forge-dialog[open] .surface.exiting{animation-duration:var(--_dialog-exit-animation-duration);animation-timing-function:var(--_dialog-exit-animation-easing)}:host([visible]:not([animation-type=none]):is(:not([animation-type]),[animation-type=zoom])) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-zoom-in}:host([visible]:not([animation-type=none]):is(:not([animation-type]),[animation-type=zoom])) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-zoom-out}:host([visible]:not([animation-type=none])[animation-type=fade]) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-fade-in}:host([visible]:not([animation-type=none])[animation-type=fade]) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-fade-out}:host([visible]:not([animation-type=none])[animation-type=slide]) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-slide-in}:host([visible]:not([animation-type=none])[animation-type=slide]) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-slide-out}}@layer placement{:host([placement=custom]) .surface{margin:0;top:var(--_dialog-position-x);left:var(--_dialog-position-y)}:host([placement=top]) .surface{--_dialog-block-start-spacing:var(--forge-dialog-block-start-spacing, 0);top:0;bottom:auto}:host([placement=top-right]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:0;left:auto;right:0;bottom:auto}:host([placement=top-left]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:0;left:0;right:auto;bottom:auto}:host([placement=bottom]) .surface{--_dialog-block-end-spacing:var(--forge-dialog-block-end-spacing, 0);top:auto;bottom:0}:host([placement=bottom-right]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:auto;left:auto;right:0;bottom:0}:host([placement=bottom-left]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:auto;left:0;right:auto;bottom:0}}@layer size-strategy{:host([size-strategy=container-inline]) .surface{width:100%}:host([size-strategy=container-block]) .surface{height:100%}}@layer preset{:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .forge-dialog{--_dialog-enter-animation-duration:var(--_dialog-preset-sheet-enter-animation-duration);--_dialog-exit-animation-duration:var(--_dialog-preset-sheet-exit-animation-duration)}:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface{animation-name:forge-dialog-slide-in}:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface.exiting{animation-name:forge-dialog-slide-out}:host(:is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface{--_dialog-max-width:var(--forge-dialog-max-width, none);--_dialog-max-height:var(--forge-dialog-max-height, none);inset:auto;display:inline-flex}:host([preset=left-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, -100% 0)}:host([preset=left-sheet]) .surface{left:0;bottom:0;top:0;height:100%;border-top-left-radius:0;border-bottom-left-radius:0}:host([preset=right-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 100% 0)}:host([preset=right-sheet]) .surface{right:0;bottom:0;top:0;height:100%;border-top-right-radius:0;border-bottom-right-radius:0}:host([preset=top-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 -100%)}:host([preset=top-sheet]) .surface{top:0;left:0;right:0;border-top-left-radius:0;border-top-right-radius:0}:host([preset=bottom-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 100%)}:host([preset=bottom-sheet]) .surface{bottom:0;left:0;right:0;border-bottom-left-radius:0;border-bottom-right-radius:0}}@layer fullscreen{:host([fullscreen]) .forge-dialog{--_dialog-enter-animation-duration:var(--_dialog-fullscreen-enter-animation-duration);--_dialog-exit-animation-duration:var(--_dialog-fullscreen-exit-animation-duration)}:host([fullscreen]) .surface{height:100%;width:100%;max-width:none;max-height:none;border-radius:0;box-shadow:none}:host([fullscreen]) forge-backdrop{display:none}}@layer position-strategy{:host([position-strategy=viewport]) .forge-dialog{position:fixed}:host([position-strategy=container]) .forge-dialog{position:absolute}:host([position-strategy=container][preset$=-sheet]) .forge-dialog{contain:content}}@layer media{@media (prefers-reduced-motion:reduce){.surface{animation-name:forge-dialog-fade-in}.surface.exiting{animation-name:forge-dialog-fade-out}}}",tp,E1=class extends L1(H1(M)){static get observedAttributes(){return Object.values(O.observedAttributes)}[(tp=w0,ls)](){this._core.hideBackdrop()}[vs](){this._core.showBackdrop()}[T0](t){return this._core.dispatchBeforeCloseEvent()}constructor(){super(),H(this,su,lu),this._core=new ps(new hs(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case O.observedAttributes.OPEN:this.open=p(a);break;case O.observedAttributes.MODE:this.mode=a!=null?a:O.defaults.MODE;break;case O.observedAttributes.TYPE:this.type=a!=null?a:O.defaults.TYPE;break;case O.observedAttributes.ANIMATION_TYPE:this.animationType=a!=null?a:O.defaults.ANIMATION_TYPE;break;case O.observedAttributes.PRESET:this.preset=a!=null?a:O.defaults.PRESET;break;case O.observedAttributes.PERSISTENT:this.persistent=p(a);break;case O.observedAttributes.FULLSCREEN:this.fullscreen=p(a);break;case O.observedAttributes.FULLSCREEN_THRESHOLD:this.fullscreenThreshold=a==null?O.defaults.FULLSCREEN_THRESHOLD:W(a);break;case O.observedAttributes.TRIGGER:this.trigger=a;break;case O.observedAttributes.MOVEABLE:this.moveable=p(a);break;case O.observedAttributes.POSITION_STRATEGY:this.positionStrategy=a!=null?a:O.defaults.POSITION_STRATEGY;break;case O.observedAttributes.SIZE_STRATEGY:this.sizeStrategy=a!=null?a:O.defaults.SIZE_STRATEGY;break;case O.observedAttributes.PLACEMENT:this.placement=a!=null?a:O.defaults.PLACEMENT;break;case O.observedAttributes.LABEL:this.label=a;break;case O.observedAttributes.DESCRIPTION:this.description=a;break}}show(){this.open=!0}hide(){this.open=!1}};E1[tp]=new Set,s([v()],E1.prototype,"open",2),s([v()],E1.prototype,"mode",2),s([v()],E1.prototype,"type",2),s([v()],E1.prototype,"animationType",2),s([v()],E1.prototype,"preset",2),s([v()],E1.prototype,"persistent",2),s([v()],E1.prototype,"fullscreen",2),s([v()],E1.prototype,"fullscreenThreshold",2),s([v()],E1.prototype,"trigger",2),s([v()],E1.prototype,"triggerElement",2),s([v()],E1.prototype,"moveable",2),s([v()],E1.prototype,"positionStrategy",2),s([v()],E1.prototype,"sizeStrategy",2),s([v()],E1.prototype,"placement",2),s([v()],E1.prototype,"label",2),s([v()],E1.prototype,"description",2),E1=s([y({name:O.elementName,dependencies:[We]})],E1);function ep(){x(E1)}var ap=`${b}bottom-sheet`,op={PERSISTENT:"persistent",MODE:"mode",OPEN:"open",FULLSCREEN:"fullscreen"},vu=w({},op),hu={DRAGGING:"dragging",FULLSCREEN:"fullscreen"},cu={DIALOG:O.elementName,SURFACE:".surface",CONTENT_BODY:"[forge-bottom-sheet-body]",INITIAL_FOCUS:`:is([autofocus], [${ap}-focus])`},pu={BEFORE_CLOSE:"forge-bottom-sheet-before-close",CLOSE:"forge-bottom-sheet-close",OPEN:"forge-bottom-sheet-open",READY:"forge-bottom-sheet-ready",DRAG_START:"forge-bottom-sheet-drag-start",DRAGGED:"forge-bottom-sheet-dragged",DRAG_END:"forge-bottom-sheet-drag-end",DRAG_CANCEL:"forge-bottom-sheet-drag-cancel",FULLSCREEN:"forge-bottom-sheet-fullscreen"},du={mode:"nonmodal"},A1={elementName:ap,observedAttributes:op,attributes:vu,classes:hu,selectors:cu,events:pu,defaults:du};var ds=class extends I{constructor(t){super(t),this._dialogElement=g(t,A1.selectors.DIALOG),this._surfaceElement=g(t,A1.selectors.SURFACE)}setDialogProperty(t,e){this._dialogElement[t]=e}addDialogListener(t,e){this._dialogElement.addEventListener(t,e)}removeDialogListener(t,e){this._dialogElement.removeEventListener(t,e)}initialize(){this._component[P]({role:"dialog",ariaModal:this._component.mode==="modal"||this._component.mode==="inline-modal"?"true":"false"},{setAttribute:!0})}open(){this._dialogElement.mode=this._component.mode,this._dialogElement.open=!0}close(){this._dialogElement.open=!1}trySetInitialFocus(){window.requestAnimationFrame(()=>{if(this._component.open&&this._component.isConnected){let t=this._component.querySelector(A1.selectors.INITIAL_FOCUS);t==null||t.focus()}})}isScrollable(){let t=this._getContentElement();return t?t.scrollHeight>t.offsetHeight:!1}isContentChild(t){var a;let e=this._getContentElement();return(a=e==null?void 0:e.contains(t))!=null?a:!1}setDragging(t){this._dialogElement.classList.toggle(A1.classes.DRAGGING,t)}setFullscreen(t){this._dialogElement.classList.toggle(A1.classes.FULLSCREEN,t)}isFullscreen(){return this._dialogElement.classList.contains(A1.classes.FULLSCREEN)}setContainerHeight(t){if(t!=null){let e=Math.min(100,100*t/window.innerHeight);this._dialogElement.style.setProperty("--forge-dialog-max-height",`${e}%`)}else this._dialogElement.style.removeProperty("--forge-dialog-max-height")}getContainerBounds(){return this._surfaceElement.getBoundingClientRect()}setDragTargetHandler(t,e){this._surfaceElement.addEventListener(t,e)}removeDragTargetHandler(t,e){this._surfaceElement.removeEventListener(t,e)}setBodyScrollHandler(t){let e=this._getContentElement();e==null||e.addEventListener("scroll",t)}_getContentElement(){var e;return(e=Array.from(Be(this._component,A1.selectors.CONTENT_BODY,!1))[0])!=null?e:null}setBodyListener(t,e,a){document.body.addEventListener(t,e,a)}removeBodyListener(t,e){document.body.removeEventListener(t,e)}};var ms=class{constructor(t){this._adapter=t;this._open=!1;this._mode=A1.defaults.mode;this._persistent=!1;this._fullscreen=!1;this._isDragging=!1;this._bodyScrollHandler=()=>this._onBodyScroll();this._dragStartHandler=this._onDragStart.bind(this);this._dragMoveHandler=this._onDragMove.bind(this);this._dragEndHandler=this._onDragEnd.bind(this);this._dragCancelHandler=this._onDragCancel.bind(this);this._dialogDismissListener=this._onDialogDismiss.bind(this);this._dialogBeforeCloseListener=this._onDialogBeforeClose.bind(this)}initialize(){this._adapter.initialize(),this._adapter.setDialogProperty("persistent",this._persistent),this._adapter.setDialogProperty("mode",this._mode),this._adapter.setDialogProperty("fullscreen",this._fullscreen),this._open&&this._openBottomSheet()}_openBottomSheet(){this._fullscreen&&this._adapter.setFullscreen(!0),this._adapter.addDialogListener(O.events.BEFORE_CLOSE,this._dialogBeforeCloseListener),this._adapter.addDialogListener(O.events.CLOSE,this._dialogDismissListener),this._adapter.open(),this._adapter.isScrollable()&&this._initScrollableHandlers(),this._adapter.trySetInitialFocus(),this._adapter.setBodyAttribute(A1.attributes.OPEN,"true"),this._adapter.dispatchHostEvent(new CustomEvent(A1.events.OPEN,{bubbles:!0}))}_closeBottomSheet(){this._adapter.removeDialogListener(O.events.BEFORE_CLOSE,this._dialogBeforeCloseListener),this._adapter.removeDialogListener(O.events.CLOSE,this._dialogDismissListener),this._adapter.close(),this._adapter.dispatchHostEvent(new CustomEvent(A1.events.CLOSE,{bubbles:!0})),this._open=!1,this._adapter.setFullscreen(!1)}_onDialogDismiss(){this._closeBottomSheet()}_onDialogBeforeClose(t){let e=new CustomEvent(A1.events.BEFORE_CLOSE,{bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(e),e.defaultPrevented&&t.preventDefault()}_initScrollableHandlers(){!this._adapter.isFullscreen()&&this._adapter.isScrollable()&&(this._adapter.setDragTargetHandler("mousedown",this._dragStartHandler),this._adapter.setDragTargetHandler("touchstart",this._dragStartHandler),this._adapter.setBodyScrollHandler(this._bodyScrollHandler))}_onBodyScroll(){!this._adapter.isFullscreen()&&!this._isDragging&&(this._adapter.setFullscreen(!0),this._adapter.dispatchHostEvent(new CustomEvent(A1.events.FULLSCREEN,{bubbles:!0,detail:!0})))}_onDragStart(t){if(this._adapter.isFullscreen()){let o=L2(t);if(this._adapter.isScrollable()&&this._adapter.isContentChild(o[0]))return}t.stopPropagation();let e=this._adapter.getContainerBounds(),a=t instanceof MouseEvent?t.clientY:t.touches[0].clientY;this._dragContext={top:a-e.top,height:e.height},this._adapter.setBodyListener("mousemove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("touchmove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("mouseup",this._dragEndHandler),this._adapter.setBodyListener("touchend",this._dragEndHandler),this._adapter.setBodyListener("touchcancel",this._dragCancelHandler)}_onDragMove(t){if(t.stopPropagation(),t.preventDefault(),!this._dragContext)return;let e=t instanceof MouseEvent?t.clientY:t.touches[0].clientY,a={y:window.innerHeight-e+this._dragContext.top};if(!this._isDragging){this._isDragging=!0;let n=new CustomEvent(A1.events.DRAG_START,{bubbles:!0,detail:a,cancelable:!0});if(this._adapter.dispatchHostEvent(n),n.defaultPrevented)return;this._adapter.setDragging(!0)}let o=this._adapter.isFullscreen()?a:{y:Math.max(a.y,this._dragContext.height)};if(!this._lastPosition||o.y!==this._lastPosition.y){let n=new CustomEvent(A1.events.DRAGGED,{bubbles:!0,detail:o,cancelable:!0});if(this._adapter.dispatchHostEvent(n),n.defaultPrevented)return;this._lastPosition=t1(w({},o),{clientY:e}),this._adapter.setContainerHeight(o.y)}}_onDragEnd(){if(this._lastPosition){let t=this._lastPosition.clientY,e=this._dragContext;if(e){let a=this._adapter.isFullscreen();a&&t>0?this._adapter.setFullscreen(!1):!a&&t<e.height+e.top&&this._adapter.setFullscreen(!0);let o=new CustomEvent(A1.events.FULLSCREEN,{bubbles:!0,detail:a});this._adapter.dispatchHostEvent(o)}}if(this._isDragging){let t=new CustomEvent(A1.events.DRAG_END,{bubbles:!0});this._adapter.dispatchHostEvent(t)}this._dragComplete()}_onDragCancel(){if(this._isDragging){let t=new CustomEvent(A1.events.DRAG_CANCEL,{bubbles:!0});this._adapter.dispatchHostEvent(t)}this._dragComplete()}_dragComplete(){this._adapter.setDragging(!1),this._adapter.removeBodyListener("mousemove",this._dragMoveHandler),this._adapter.removeBodyListener("touchmove",this._dragMoveHandler),this._adapter.removeBodyListener("mouseup",this._dragEndHandler),this._adapter.removeBodyListener("touchend",this._dragEndHandler),this._adapter.removeBodyListener("touchcancel",this._dragCancelHandler),this._adapter.setContainerHeight(null),this._lastPosition=void 0,this._dragContext=void 0,this._isDragging=!1}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&(this._open?this._openBottomSheet():this._closeBottomSheet()),this._adapter.toggleHostAttribute(A1.attributes.OPEN,t))}get mode(){return this._mode}set mode(t){if(t||(t=A1.defaults.mode),this._mode!==t){this._mode=t,this._adapter.setDialogProperty("mode",this._mode);let e=this._mode!==A1.defaults.mode;this._adapter.toggleHostAttribute(A1.attributes.MODE,e,this._mode)}}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._adapter.setDialogProperty("persistent",this._persistent),this._adapter.toggleHostAttribute(A1.attributes.PERSISTENT,this._persistent))}get fullscreen(){return this._fullscreen}set fullscreen(t){this._fullscreen!==t&&(this._fullscreen=t,this._adapter.setFullscreen(this._fullscreen),this._adapter.toggleHostAttribute(A1.attributes.FULLSCREEN,this._fullscreen))}};var mu='<template><forge-dialog class="dialog" preset="bottom-sheet" exportparts="surface" role="presentation"><div class="surface" part="root"><slot></slot></div></forge-dialog></template>',gu="@keyframes forge-dialog-zoom-in{from{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}to{opacity:1;scale:1}}@keyframes forge-dialog-zoom-out{from{opacity:1;scale:1}to{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}}@keyframes forge-dialog-fade-in{from{opacity:var(--_dialog-fade-opacity)}to{opacity:1}}@keyframes forge-dialog-fade-out{from{opacity:1}to{opacity:var(--_dialog-fade-opacity)}}@keyframes forge-dialog-slide-in{from{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}to{opacity:1;translate:0 0}}@keyframes forge-dialog-slide-out{from{opacity:1;translate:0 0}to{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}}:host{display:contents}:host([hidden]){display:none}.dialog{--_bottom-sheet-desktop-max-width:var(--forge-bottom-sheet-desktop-max-width, 50%);--_bottom-sheet-desktop-max-height:var(--forge-bottom-sheet-desktop-max-height, 50%);--_bottom-sheet-animation-duration:var(--forge-bottom-sheet-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_bottom-sheet-animation-timing:var(--forge-bottom-sheet-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.surface{width:100%;display:inline-flex;flex-direction:column}.dialog.dragging::part(surface){transition:none}:host([open]) forge-dialog.fullscreen{--forge-dialog-max-height:100%}:host([open]) forge-dialog.fullscreen::part(surface){transition:max-height var(--_bottom-sheet-animation-duration) var(--_bottom-sheet-animation-timing)}forge-dialog{--forge-dialog-width:var(--_bottom-sheet-desktop-max-width);--forge-dialog-max-height:var(--_bottom-sheet-desktop-max-height)}@media (max-width:600px){forge-dialog{--forge-dialog-shape:0;--forge-dialog-max-width:100vw;--forge-dialog-width:100vw}}",Ge=class extends H1(L1(M)){static get observedAttributes(){return Object.values(A1.observedAttributes)}constructor(){super(),H(this,mu,gu),this._core=new ms(new ds(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case A1.attributes.OPEN:this.open=p(a);break;case A1.attributes.MODE:this.mode=a;break;case A1.observedAttributes.PERSISTENT:this.persistent=p(a);break;case A1.attributes.FULLSCREEN:this.fullscreen=p(a);break}}};s([v()],Ge.prototype,"open",2),s([v()],Ge.prototype,"mode",2),s([v()],Ge.prototype,"persistent",2),s([v()],Ge.prototype,"fullscreen",2),Ge=s([y({name:A1.elementName,dependencies:[E1]})],Ge);function rp(){x(Ge)}var wu=`${b}button-area`,uu={DISABLED:"disabled",IGNORE:"data-forge-ignore",IGNORE_ALT:"forge-ignore"},O4={ROOT:"root",BUTTON_SLOT:"button",CONTENT_SLOT:"content"},_u={ROOT:"forge-button-area"},fu={ROOT:`#${O4.ROOT}`,BUTTON_SLOT:"slot[name=button]",CONTENT_SLOT:`#${O4.CONTENT_SLOT}`},Bt={elementName:wu,attributes:uu,ids:O4,classes:_u,selectors:fu};var gs=class extends I{constructor(t){super(t),this._rootElement=g(t,Bt.selectors.ROOT),this._buttonSlotElement=g(t,Bt.selectors.BUTTON_SLOT),this._contentSlotElement=g(t,Bt.selectors.CONTENT_SLOT),this._focusIndicatorElement=g(t,m1.elementName),this._stateLayerElement=g(t,M1.elementName)}destroy(){}setDisabled(t){var e;(e=this._buttonElement)==null||e.toggleAttribute(Bt.attributes.DISABLED,t),t?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}addListener(t,e,a){this._rootElement.addEventListener(t,e,{capture:a})}removeListener(t,e,a){this._rootElement.removeEventListener(t,e,{capture:a})}addButtonSlotListener(t,e){this._buttonSlotElement.addEventListener(t,e)}removeButtonSlotListener(t,e){this._buttonSlotElement.removeEventListener(t,e)}addContentSlotListener(t,e){this._contentSlotElement.addEventListener(t,e)}removeContentSlotListener(t,e){this._contentSlotElement.removeEventListener(t,e)}animateStateLayer(){this._stateLayerElement.playAnimation()}startButtonObserver(t){this._buttonElement&&(this._buttonObserver=new MutationObserver(t),this._buttonObserver.observe(this._buttonElement,{attributeFilter:[Bt.attributes.DISABLED]}))}stopButtonObserver(){this._buttonObserver&&(this._buttonObserver.disconnect(),this._buttonObserver=void 0)}detectSlottedButton(){this._buttonElement=this._buttonSlotElement.assignedElements()[0]}isButtonDisabled(){var t,e;return(e=(t=this._buttonElement)==null?void 0:t.disabled)!=null?e:!0}requestDisabledButtonFrame(){this._buttonElement&&(this._buttonElement.disabled=!0,requestAnimationFrame(()=>this._buttonElement.disabled=!1))}};var ws=class{constructor(t){this._adapter=t;this._disabled=!1;this._clickListener=this._handleClick.bind(this);this._keydownListener=this._handleKeydown.bind(this);this._pointerdownListener=this._handlePointerdown.bind(this);this._ignoreStateLayerListener=this._handleIgnoreStateLayer.bind(this);this._slotListener=this._handleSlotChange.bind(this)}initialize(){this._adapter.addListener("click",this._clickListener),this._adapter.addListener("keydown",this._keydownListener),this._adapter.addListener("pointerdown",this._pointerdownListener),this._adapter.addContentSlotListener("click",this._ignoreStateLayerListener.bind(this)),this._adapter.addContentSlotListener("pointerdown",this._ignoreStateLayerListener.bind(this)),this._adapter.addContentSlotListener("pointerup",this._ignoreStateLayerListener.bind(this)),this._adapter.addButtonSlotListener("slotchange",this._slotListener)}destroy(){this._adapter.removeListener("click",this._clickListener),this._adapter.removeListener("keydown",this._keydownListener),this._adapter.removeListener("pointerdown",this._pointerdownListener),this._adapter.removeContentSlotListener("click",this._ignoreStateLayerListener.bind(this)),this._adapter.removeContentSlotListener("pointerdown",this._ignoreStateLayerListener.bind(this)),this._adapter.removeContentSlotListener("pointerup",this._ignoreStateLayerListener.bind(this)),this._adapter.removeButtonSlotListener("slotchange",this._slotListener),this._adapter.destroy(),this._adapter.stopButtonObserver()}_handleClick(t){this._disabled&&t.stopPropagation();let e=window.getSelection();(e==null?void 0:e.type)==="Range"&&(e==null?void 0:e.toString().trim())!==""&&t.stopPropagation(),this._shouldIgnoreEvent(t)&&t.stopPropagation()}_handleKeydown(t){t.key!==" "&&t.key!=="Enter"||(this._shouldIgnoreEvent(t)?t.stopPropagation():this._adapter.animateStateLayer())}_handlePointerdown(t){this._disabled||this._shouldIgnoreEvent(t)&&this._adapter.requestDisabledButtonFrame()}_handleIgnoreStateLayer(t){this._disabled||this._shouldIgnoreEvent(t)&&t.stopPropagation()}_handleSlotChange(){this._adapter.stopButtonObserver(),this._adapter.detectSlottedButton(),this._adapter.startButtonObserver(()=>this._handleButtonDisabled()),this._adapter.isButtonDisabled()?this.disabled=!0:this._disabled&&this._adapter.setDisabled(!0)}_handleButtonDisabled(){this.disabled=this._adapter.isButtonDisabled()}_shouldIgnoreEvent(t){return L2(t).some(a=>a.nodeType===1&&(a.hasAttribute(Bt.attributes.IGNORE)||a.hasAttribute(Bt.attributes.IGNORE_ALT)))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(Bt.attributes.DISABLED,this._disabled))}};var xu='<template><div class="forge-button-area" id="root" part="root"><div class="button" id="button" part="button"><slot name="button"></slot></div><slot id="content"></slot><forge-state-layer target="root" exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator target="button" part="focus-indicator" inward></forge-focus-indicator></div></template>',bu=":host{display:block;position:relative}:host .forge-button-area{cursor:var(--_button-area-cursor)}:host([hidden]){display:none}:host([disabled]) .forge-button-area{cursor:var(--_button-area-disabled-cursor)}.forge-button-area{--_button-area-primary-color:var(--forge-button-area-primary-color, var(--forge-theme-primary, #3f51b5));--_button-area-cursor:var(--forge-button-area-cursor, pointer);--_button-area-disabled-cursor:var(--forge-button-area-disabled-cursor, not-allowed);--_button-area-focus-indicator-color:var(--forge-button-area-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_button-area-focus-indicator-offset:var(--forge-button-area-focus-indicator-offset, 4px)}.forge-button-area{position:relative;overflow:hidden;block-size:100%;inline-size:100%}.forge-button-area .button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:fixed;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}forge-focus-indicator{z-index:1;--forge-focus-indicator-color:var(--_button-area-focus-indicator-color);--forge-focus-indicator-outward-offset:var(--_button-area-focus-indicator-offset)}forge-state-layer{--forge-state-layer-color:var(--_button-area-primary-color);border-radius:inherit}",Aa=class extends M{static get observedAttributes(){return[Bt.attributes.DISABLED]}constructor(){super(),H(this,xu,bu),this._core=new ws(new gs(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case Bt.attributes.DISABLED:this.disabled=p(a);break}}};s([v()],Aa.prototype,"disabled",2),Aa=s([y({name:Bt.elementName,dependencies:[Q,r1]})],Aa);function np(){x(Aa)}var D4=`${b}calendar-menu`,yu={ANIMATION_TYPE:"animation-type",DATA_ANIMATION:"data-animation",DATA_VALUE:"data-value",POPOVER_CONTEXT:"forge-popover-context",PREVENT_FOCUS:"prevent-focus"},ea={BACKDROP:"forge-calendar-menu__backdrop",CLOSING:"forge-calendar-menu--closing",GRID:"forge-calendar-menu__grid",GRID_ITEM:"forge-calendar-menu__item--grid",GRID_FOUR_COL:"forge-calendar-menu__grid--four-col",GRID_THREE_COL:"forge-calendar-menu__grid--three-col",ITEM:"forge-calendar-menu__item",ITEM_FOCUSED:"forge-calendar-menu__item--focused",ITEM_SELECTED:"forge-calendar-menu__item--selected",LIST:"forge-calendar-menu__list",LIST_ITEM:"forge-calendar-menu__item--list",LIST_WRAPPER:"forge-calendar-menu__list__wrapper",OPEN:"forge-calendar-menu--open",REPLACING_VIEW:"forge-calendar-menu--replacing-view",SLIDE_LEFT:"forge-calendar-menu--slide-left",SLIDE_RIGHT:"forge-calendar-menu--slide-right",VIEW:"forge-calendar-menu__view"},P4={SCROLL_SPY_BOTTOM:"scroll-spy-bottom",SCROLL_SPY_TOP:"scroll-spy-top"},Mu={ITEM:"menu-item",ITEM_BUTTON:"menu-item-button",ITEM_CONTENT:"menu-item-content",MENU:"menu"},Hu={CONTAINER:".forge-calendar-menu",FOCUSED:`.${ea.ITEM_FOCUSED}`,GRID:`.${ea.GRID}`,ITEM:`.${ea.ITEM}`,LIST:`.${ea.LIST}`,LIST_WRAPPER:`.${ea.LIST_WRAPPER}`,SCROLL_SPY_BOTTOM:`#${P4.SCROLL_SPY_BOTTOM}`,SCROLL_SPY_TOP:`#${P4.SCROLL_SPY_TOP}`,SELECTED:`.${ea.ITEM_SELECTED}`,VIEW:`.${ea.VIEW}`},Lu={FOCUS_CHANGE:`${D4}-focus-change`,SELECT:`${D4}-select`},Iu={FOUR_COL:4,LARGE_ITEM_SET:13,LIST_SLICE_SIZE:20,THREE_COL:3},T={elementName:D4,attributes:yu,classes:ea,ids:P4,parts:Mu,selectors:Hu,events:Lu,numbers:Iu};function us(r){let t=document.createElement("div");t.setAttribute("part",T.parts.MENU),t.classList.add(T.classes.VIEW,T.classes.GRID);let e;return r.length>12?(t.classList.add(T.classes.GRID_FOUR_COL),e=ip(r)):(t.classList.add(T.classes.GRID_THREE_COL),e=ip(r)),e.forEach(a=>t.appendChild(a)),t}function ip(r){return r.map(t=>{let e=document.createElement("div");e.classList.add(T.classes.ITEM,T.classes.GRID_ITEM),e.innerText=t.label,e.setAttribute("role","button"),e.setAttribute("part",T.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute(T.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.add(T.classes.ITEM_SELECTED),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true");let a=document.createElement("forge-state-layer");e.appendChild(a);let o=document.createElement("forge-focus-indicator");return o.inward=!0,e.appendChild(o),e})}function lp(r){let t=document.createElement("div"),e=document.createElement("div");return t.classList.add(T.classes.VIEW,T.classes.LIST_WRAPPER),e.classList.add(T.classes.LIST),e.setAttribute("role","list"),e.appendChild(sp(T.ids.SCROLL_SPY_TOP)),_s(r).forEach(a=>e.appendChild(a)),e.appendChild(sp(T.ids.SCROLL_SPY_BOTTOM)),t.appendChild(e),t}function _s(r){return r.map(t=>{let e=document.createElement("div");e.innerText=t.label,e.classList.add(T.classes.ITEM,T.classes.LIST_ITEM),e.setAttribute("part",T.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute("role","listitem"),e.setAttribute(T.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.toggle(T.classes.ITEM_SELECTED,!0),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true");let a=document.createElement("forge-state-layer");e.appendChild(a);let o=document.createElement("forge-focus-indicator");return o.inward=!0,e.appendChild(o),e})}function sp(r){let t=document.createElement("div");return t.id=r,t.setAttribute("aria-hidden","true"),t}function ur(r){for(;r.childNodes.length>1;)r.firstChild&&r.removeChild(r.firstChild)}var fs=class extends I{constructor(e){super(e);this.component=e;this._container=g(e,T.selectors.CONTAINER)}registerClickListener(e){this._container.addEventListener("click",e)}unregisterClickListener(e){this._container.removeEventListener("click",e)}registerIntersectionObserver(e){let a=this._container.querySelector(T.selectors.LIST_WRAPPER);if(!a)return;let o={root:a};this._intersectionObserver=new IntersectionObserver(e,o);let n=this._container.querySelector(T.selectors.SCROLL_SPY_BOTTOM),i=this._container.querySelector(T.selectors.SCROLL_SPY_TOP);n&&this._intersectionObserver.observe(n),i&&this._intersectionObserver.observe(i)}unregisterIntersectionObserver(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0)}setAnimationType(e){this._container.setAttribute(T.attributes.DATA_ANIMATION,e)}setClosed(){this._container.classList.remove(T.classes.OPEN),this._container.classList.add(T.classes.CLOSING),Rt(this._container,T.classes.CLOSING,!0).then(()=>{r2(this._container),this.toggleHostAttribute("hidden",!0)})}setOpenAsGrid(e,a,o,n,i){let l=us(e);i&&Rt(this._container,T.classes.REPLACING_VIEW,!0).then(()=>{ur(this._container),this.setFocusAtIndex(a,o,n)}),this._container.appendChild(l),this.toggleHostAttribute("hidden",!1),this._container.classList.add(T.classes.OPEN),i||this.setFocusAtIndex(a,o,n)}setOpenAsList(e,a,o,n,i){let l=lp(e);i&&Rt(this._container,T.classes.REPLACING_VIEW,!0).then(()=>{ur(this._container),this.setFocusAtIndex(a,o,n)}),this._container.appendChild(l),this.toggleHostAttribute("hidden",!1),this._container.classList.add(T.classes.OPEN),this._scrollItemIntoView("selected"),i||this.setFocusAtIndex(a,o,n)}appendListItemsToStart(e){let a=this._container.querySelector(T.selectors.LIST_WRAPPER),o=this._container.querySelector(T.selectors.LIST),n=o==null?void 0:o.querySelector(T.selectors.ITEM);if(a&&o&&n){let i=a.scrollTop,l=a.scrollHeight-a.clientHeight;_s(e).forEach(c=>{o.insertBefore(c,n)});let h=a.scrollHeight-a.clientHeight;a.scrollTop=i+(h-l)}}appendListItemsToEnd(e){let a=this._container.querySelector(T.selectors.LIST),o=this._container.querySelector(T.selectors.SCROLL_SPY_BOTTOM);a&&o&&_s(e).forEach(n=>{a.insertBefore(n,o)})}animateInFromLeft(e,a){Rt(this._container,T.classes.SLIDE_RIGHT,!0).then(()=>{ur(this._container),a&&a()});let o=us(e);this._container.appendChild(o)}animateInFromRight(e,a){Rt(this._container,T.classes.SLIDE_LEFT,!0).then(()=>{ur(this._container),a&&a()});let o=us(e);this._container.appendChild(o)}setFocusAtIndex(e,a,o){var h;let n=this._container.querySelector(T.selectors.FOCUSED);n==null||n.classList.remove(T.classes.ITEM_FOCUSED),n==null||n.setAttribute("tabindex","-1");let i=n==null?void 0:n.querySelector("forge-focus-indicator");i&&(i.active=!1);let l=(h=this._container.querySelectorAll(T.selectors.ITEM))==null?void 0:h[e];if(l){if(l.classList.add(T.classes.ITEM_FOCUSED),l.setAttribute("tabindex",o?"-1":"0"),a&&!o)l.focus();else if(o){let c=l.querySelector("forge-focus-indicator");c&&(c.active=!0)}this._scrollItemIntoView("focused")}}_scrollItemIntoView(e){let a=this._container.querySelector(T.selectors.LIST),o=a==null?void 0:a.querySelector(e==="selected"?T.selectors.SELECTED:T.selectors.FOCUSED);a&&o&&Dr(a.parentElement,o,e==="selected"?"auto":"smooth",e==="selected"?"center":"nearest")}};var xs=class{constructor(t){this._adapter=t;this._animationType="scale";this._columnCount=3;this._focusedIndex=0;this._list=!1;this._open=!1;this._options=[];this._preventFocus=!1;this._sliceEnd=-1;this._sliceStart=-1;this._clickListener=e=>this._onClick(e),this._intersectionObserverCallback=e=>this._onIntersection(e)}initialize(){this._applyAnimationType(),this._applyPreventFocus(),this._adapter.setHostAttribute("exportparts",Object.values(T.parts).join(", ")),this._adapter.toggleHostAttribute("hidden",!0),this._adapter.registerClickListener(this._clickListener)}destroy(){this._adapter.unregisterClickListener(this._clickListener),this._adapter.unregisterIntersectionObserver()}openAsGrid(t,e){this._list=!1,this._options=t,this._focusedIndex=0,this._setColumnCount(),this._adapter.setOpenAsGrid(t,this._focusedIndex,e,this._preventFocus,this._open),this._setGridListeners(),this._open=!0,this._emitFocusChangeEvent()}openAsList(t,e){this._list=!0,this._options=t;let a=this._getOptionSliceIncludingSelected();this._focusedIndex=Math.max(t.findIndex(o=>o.selected),this._sliceStart),this._adapter.setOpenAsList(a,this._focusedIndex-this._sliceStart,e,this._preventFocus,this._open),this._setListListeners(),this._open=!0,this._emitFocusChangeEvent()}close(){this._open=!1,this._options=[],this._adapter.setClosed()}animateIn(t,e,a){let o=()=>{this._setFocusFromStoredIndex(a)};e==="left"?this._adapter.animateInFromLeft(t,o):this._adapter.animateInFromRight(t,o),this._options=t,this._setColumnCount()}selectFocusedItem(){var t;this._adapter.emitHostEvent(T.events.SELECT,(t=this._options[this._focusedIndex])==null?void 0:t.value)}moveFocusBackward(){if(this._list)return!0;let t=this._focusedIndex-1,e=t>=0&&t%this._columnCount!==this._columnCount-1;return this._focusedIndexAfterAnimation=e?void 0:t+this._columnCount,this._tryMoveFocus(t,e)}moveFocusDown(){if(this._list){let t=Math.min(this._focusedIndex+=1,this._options.length-1);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex+this._columnCount,e=t<this._options.length;this._focusedIndexAfterAnimation=e?void 0:t%this._columnCount,this._tryMoveFocus(t,e)}}moveFocusForward(){if(this._list)return!0;let t=this._focusedIndex+1,e=t<this._options.length&&t%this._columnCount!==0;return this._focusedIndexAfterAnimation=e?void 0:t-this._columnCount,this._tryMoveFocus(t,e)}moveFocusUp(){if(this._list){let t=Math.max(this._focusedIndex-=1,0);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex-this._columnCount,e=t>=0;this._focusedIndexAfterAnimation=e?void 0:this._options.length+t,this._tryMoveFocus(t,e)}}_tryMoveFocus(t,e){var a;return e&&!((a=this._options[t])!=null&&a.disabled)&&(this._focusedIndex=t,this._adapter.setFocusAtIndex(this._list?this._focusedIndex-this._sliceStart:this._focusedIndex,!0,this._preventFocus),this._emitFocusChangeEvent()),e}_setFocusFromStoredIndex(t){var e,a;this._focusedIndexAfterAnimation!==void 0&&(this._options[this._focusedIndexAfterAnimation]&&!((e=this._options[this._focusedIndexAfterAnimation])!=null&&e.disabled)?this._focusedIndex=this._focusedIndexAfterAnimation:(a=this._options[0])!=null&&a.disabled?this._focusedIndex=this._options.findIndex(o=>!o.disabled):this._focusedIndex=this._options.length-this._options.slice().reverse().findIndex(o=>!o.disabled)-1,this._focusedIndexAfterAnimation=void 0,this._adapter.setFocusAtIndex(this._focusedIndex,t,this._preventFocus),this._emitFocusChangeEvent())}_onClick(t){let e=L2(t).find(o=>o.classList&&o.classList.contains(T.classes.ITEM)),a=e==null?void 0:e.getAttribute(T.attributes.DATA_VALUE);k(a)&&this._adapter.emitHostEvent(T.events.SELECT,+a)}_onIntersection(t){this._sliceStart>0&&t.some(e=>e.target.id===T.ids.SCROLL_SPY_TOP&&e.isIntersecting)&&this._adapter.appendListItemsToStart(this._getPreviousOptionsSlice()),this._sliceEnd<this._options.length&&t.some(e=>e.target.id===T.ids.SCROLL_SPY_BOTTOM&&e.isIntersecting)&&this._adapter.appendListItemsToEnd(this._getNextOptionsSlice())}_setColumnCount(){this._columnCount=this._options.length>=T.numbers.LARGE_ITEM_SET?T.numbers.FOUR_COL:T.numbers.THREE_COL}_emitFocusChangeEvent(){var t;this._adapter.emitHostEvent(T.events.FOCUS_CHANGE,(t=this._options[this._focusedIndex])==null?void 0:t.value)}_setGridListeners(){this._adapter.unregisterIntersectionObserver()}_setListListeners(){this._adapter.unregisterIntersectionObserver(),this._adapter.registerIntersectionObserver(this._intersectionObserverCallback)}_getOptionSliceIncludingSelected(){if(this._options.length<=T.numbers.LIST_SLICE_SIZE)return this._sliceStart=0,this._sliceEnd=this._options.length,this._options.slice();let t=Math.max(this._options.findIndex(o=>o.selected),0),e=Math.max(Math.floor(t-T.numbers.LIST_SLICE_SIZE/2),0),a=e+T.numbers.LIST_SLICE_SIZE;return a>this._options.length&&(e=this._options.length-1-T.numbers.LIST_SLICE_SIZE,a=this._options.length),this._sliceStart=e,this._sliceEnd=a,this._options.slice(this._sliceStart,this._sliceEnd)}_getNextOptionsSlice(){let t=Math.min(this._sliceEnd+T.numbers.LIST_SLICE_SIZE,this._options.length),e=this._options.slice(this._sliceEnd,t);return this._sliceEnd=t,e}_getPreviousOptionsSlice(){let t=Math.max(this._sliceStart-T.numbers.LIST_SLICE_SIZE,0),e=this._options.slice(t,this._sliceStart);return this._sliceStart=t,e}_applyAnimationType(){this._adapter.setHostAttribute(T.attributes.ANIMATION_TYPE,this._animationType),this._adapter.setAnimationType(this._animationType)}_applyPreventFocus(){this._adapter.toggleHostAttribute(T.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setFocusAtIndex(this._focusedIndex,!1,this._preventFocus)}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._applyAnimationType())}get preventFocus(){return this._preventFocus}set preventFocus(t){this._preventFocus!==t&&(this._preventFocus=t,this._applyPreventFocus())}};var Vu='<template><div class="forge-calendar-menu" part="root"></div></template>',Eu='.forge-calendar-menu{background-color:var(--forge-theme-surface,#fff);position:relative;height:100%;width:100%;overflow:hidden}.forge-calendar-menu__view{position:absolute;top:0;left:0;height:100%;width:100%;background-color:inherit}.forge-calendar-menu__grid{max-height:var(--forge-calendar-menu-max-height,320px);display:grid;gap:16px;justify-items:center;align-items:center;padding:8px;box-sizing:border-box}.forge-calendar-menu__grid--three-col{grid-template-columns:repeat(3,1fr)}.forge-calendar-menu__grid--four-col{grid-template-columns:repeat(4,1fr)}.forge-calendar-menu__list{position:relative;background-color:inherit}.forge-calendar-menu__list__wrapper{position:relative;height:100%;overflow:auto}.forge-calendar-menu__list__wrapper::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-calendar-menu__item--grid{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:4px;overflow:hidden;font-weight:500;user-select:none}.forge-calendar-menu__item--grid:not([disabled]){border:1px solid var(--forge-theme-outline,#e0e0e0);cursor:pointer}.forge-calendar-menu__item--grid[disabled]{color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container, #d1d5ed)}.forge-calendar-menu__item--list{display:flex;align-items:center;justify-content:center;margin:0 4px;width:calc(100% - 8px);height:48px;border-radius:4px;overflow:hidden;text-align:center;cursor:pointer;position:relative}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container)}.forge-calendar-menu__item--focused,.forge-calendar-menu__item:focus{outline:0}.forge-calendar-menu--open{animation-duration:.2s;animation-name:scale-open;transform-origin:top center}.forge-calendar-menu--open[data-animation=fade]{animation-name:fade-in}.forge-calendar-menu--open[data-animation=none]{animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--open{animation-name:fade-in}}.forge-calendar-menu--closing{animation-duration:.2s;animation-name:scale-closed;transform-origin:top center}.forge-calendar-menu--closing[data-animation=fade]{animation-name:fade-out}.forge-calendar-menu--closing[data-animation=none]{animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--closing{animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:slide-out-to-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:slide-in-from-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{animation-name:fade-in}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:slide-out-to-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{animation-name:fade-out}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:slide-in-from-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{animation-name:fade-in}}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:fade-out}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:fade-in}#scroll-spy-bottom{position:absolute;bottom:0;height:48px;pointer-events:none}#scroll-spy-top{position:absolute;top:0;height:48px;pointer-events:none}@keyframes scale-open{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}@keyframes scale-closed{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.4)}}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-out{from{opacity:1}to{opacity:0}}@keyframes slide-in-from-left{from{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-in-from-right{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slide-out-to-left{from{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes slide-out-to-right{from{transform:translateX(0)}to{transform:translateX(100%)}}:host{display:block;position:absolute;top:0;left:0;height:100%;width:100%}:host([hidden]){display:none}:host([forge-popover-context=true]) .forge-calendar-menu{background-color:var(--forge-theme-surface-bright,#fff)}',Ye=class extends M{static get observedAttributes(){return[T.attributes.ANIMATION_TYPE,T.attributes.PREVENT_FOCUS]}constructor(){super(),H(this,Vu,Eu),this._core=new xs(new fs(this))}connectedCallback(){!this.hasAttribute(T.attributes.POPOVER_CONTEXT)&&Ra(this).some(t=>t.tagName.toLowerCase()==="forge-popover")&&this.setAttribute(T.attributes.POPOVER_CONTEXT,"true"),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case T.attributes.ANIMATION_TYPE:this.animationType=a;break;case T.attributes.PREVENT_FOCUS:this.preventFocus=p(a);break}}animateIn(t,e,a=!1){this._core.animateIn(t,e,a)}close(){this._core.close()}moveFocusDown(){this._core.moveFocusDown()}moveFocusBackward(){return this._core.moveFocusBackward()}moveFocusForward(){return this._core.moveFocusForward()}moveFocusUp(){this._core.moveFocusUp()}openAsGrid(t,e=!1){this._core.openAsGrid(t,e)}openAsList(t,e=!1){this._core.openAsList(t,e)}selectFocusedItem(){this._core.selectFocusedItem()}};s([v()],Ye.prototype,"animationType",2),s([v()],Ye.prototype,"preventFocus",2),Ye=s([y({name:T.elementName,dependencies:[r1,Q]})],Ye);function zl1(){x(Ye)}var _r=`${b}calendar`,Cu={ALLOW_SINGLE_DATE_RANGE:"allow-single-date-range",CLEAR_BUTTON:"clear-button",CONSTRAIN_TO_ENABLED:"constrain-to-enabled",FIRST_DAY_OF_WEEK:"first-day-of-week",FIXED_HEIGHT:"static-height",LIST_YEARS:"list-years",LOCALE:"locale",MAX:"max",MENU_ANIMATION:"menu-animation",MIN:"min",MODE:"mode",MONTH:"month",PREVENT_FOCUS:"prevent-focus",READONLY:"readonly",SELECTION_FOLLOWS_MONTH:"selection-follows-month",SHOW_HEADER:"show-header",SHOW_OTHER_MONTHS:"show-other-months",SHOW_TODAY:"show-today",TODAY_BUTTON:"today-button",VIEW:"view",YEAR:"year",YEAR_RANGE:"year-range"},zu=t1(w({},Cu),{DATA_DATE:"data-date",DATA_EVENT_THEME:"data-event-theme",POPOVER_CONTEXT:"forge-popover-context"}),he={ALLOW_SINGLE_DATE_RANGE:"forge-calendar--allow-single-date-range",DATE:"forge-calendar__date",DATE_GRID:"forge-calendar__date-grid",DATE_INNER:"forge-calendar__date__inner",DATE_OTHER_MONTH:"forge-calendar__date--other-month",DATE_SPACER:"forge-calendar__date-spacer",DATE_SELECTED:"forge-calendar__date--selected",DATE_TODAY:"forge-calendar__date--today",DATE_VIEW:"forge-calendar__date-view",DATE_VIEW_ROW:"forge-calendar__date-view__row",DATE_WRAPPER:"forge-calendar__date-wrapper",DAY:"forge-calendar__day",EVENT:"forge-calendar__event",EVENT_OVERFLOW:"forge-calendar__event--overflow",EVENT_WRAPPER:"forge-calendar__event__wrapper",FIXED_HEIGHT:"forge-calendar--fixed-height",FOOTER:"forge-calendar__footer",HEADER:"forge-calendar__header",MONTH_MENU_OPEN:"forge-calendar--month-menu-open",PREVENT_FOCUS:"forge-calendar--prevent-focus",RANGE:"forge-calendar__range",RANGE_END:"forge-calendar__range--end",RANGE_START:"forge-calendar__range--start",RANGE_TARGET:"forge-calendar__range__target",READONLY:"forge-calendar--readonly",RTL:"forge-calendar--rtl",SHOW_OTHER_MONTHS:"forge-calendar--show-other-months",SHOW_TODAY:"forge-calendar--show-today",VIEW:"forge-calendar__view",YEAR_MENU_OPEN:"forge-calendar--year-menu-open"},et={ACCESSIBLE_HEADER:"accessible-header",ACCESSIBLE_MONTH:"accessible-month",ACCESSIBLE_YEAR:"accessible-year",CLEAR_BUTTON:"clear-button",DATE_GRID:"date-grid",DATE_VIEW:"date-view",DAY_ROW:"day-row",FOOTER:"footer",HEADER:"header",MENU:"menu",MONTH_BUTTON:"month-button",NEXT_BUTTON:"next-button",NEXT_BUTTON_TOOLTIP:"next-button-tooltip",PREVIOUS_BUTTON:"previous-button",PREVIOUS_BUTTON_TOOLTIP:"previous-button-tooltip",TODAY_BUTTON:"today-button",YEAR_BUTTON:"year-button"},Au={PREVIOUS_MONTH_BUTTON_TEXT:"previous-month-button-text",NEXT_MONTH_BUTTON_TEXT:"next-month-button-text",PREVIOUS_YEAR_BUTTON_TEXT:"previous-year-button-text",NEXT_YEAR_BUTTON_TEXT:"next-year-button-text",PREVIOUS_YEARS_BUTTON_TEXT:"previous-years-button-text",NEXT_YEARS_BUTTON_TEXT:"next-years-button-text",TODAY_BUTTON_TEXT:"today-button-text",CLEAR_BUTTON_TEXT:"clear-button-text"},Bu={SUNDAY:"sunday",MONDAY:"monday",TUESDAY:"tuesday",WEDNESDAY:"wednesday",THURSDAY:"thursday",FRIDAY:"friday",SATURDAY:"saturday"},Tu=t1(w({},Bu),{CLEAR_BUTTON:"clear-button",DATE:"date",DATE_OTHER_MONTH:"date-other-month",DATE_VIEW:"date-view",DATE_WRAPPER:"date-wrapper",DAY:"day",EVENT:"event",EVENT_WRAPPER:"event-wrapper",FOOTER:"footer",HEADER:"header",MONTH_BUTTON:"month-button",MONTH_BUTTON_ELEMENT:"month-button-element",NEXT_BUTTON:"next-button",PREVIOUS_BUTTON:"previous-button",RANGE:"range",RANGE_END:"range-end",RANGE_START:"range-start",TODAY:"today",TODAY_BUTTON:"today-button",WEEKEND:"weekend",YEAR_BUTTON:"year-button",YEAR_BUTTON_ELEMENT:"year-button-element"}),Su={ACCESSIBLE_HEADER:`#${et.ACCESSIBLE_HEADER}`,ACCESSIBLE_MONTH:`#${et.ACCESSIBLE_MONTH}`,ACCESSIBLE_YEAR:`#${et.ACCESSIBLE_YEAR}`,CALENDAR:".forge-calendar",CLEAR_BUTTON:`#${et.CLEAR_BUTTON}`,DATE:`.${he.DATE}`,DATE_GRID:`#${et.DATE_GRID}`,DATE_INNER:`.${he.DATE_INNER}`,DATE_OTHER_MONTH:`.${he.DATE_OTHER_MONTH}`,DATE_SPACER:`.${he.DATE_SPACER}`,DATE_SELECTED:`.${he.DATE_SELECTED}`,DATE_TODAY:`.${he.DATE_TODAY}`,DATE_VIEW:`#${et.DATE_VIEW}`,DATE_WRAPPER:`.${he.DATE_WRAPPER}`,DAY_ROW:`#${et.DAY_ROW}`,EVENT_WRAPPER:`.${he.EVENT_WRAPPER}`,FOOTER:`#${et.FOOTER}`,HEADER:`#${et.HEADER}`,MENU:T.elementName,MONTH_BUTTON:`#${et.MONTH_BUTTON}`,NEXT_BUTTON:`#${et.NEXT_BUTTON}`,NEXT_BUTTON_TOOLTIP:`#${et.NEXT_BUTTON_TOOLTIP}`,PREVIOUS_BUTTON:`#${et.PREVIOUS_BUTTON}`,PREVIOUS_BUTTON_TOOLTIP:`#${et.PREVIOUS_BUTTON_TOOLTIP}`,RANGE:`.${he.RANGE}`,RANGE_END:`.${he.RANGE_END}`,RANGE_START:`.${he.RANGE_START}`,TODAY_BUTTON:`#${et.TODAY_BUTTON}`,TOOLTIP:o1.elementName,VIEW:"#view",YEAR_BUTTON:`#${et.YEAR_BUTTON}`},ku={DATE_SELECT:`${_r}-date-select`,FOCUS_CHANGE:`${_r}-focus-change`,MONTH_CHANGE:`${_r}-month-change`,VIEW_CHANGE:`${_r}-view-change`},Ou={DEFAULT_PREVIOUS_MONTH_BUTTON_TEXT:"Previous month",DEFAULT_NEXT_MONTH_BUTTON_TEXT:"Next month",DEFAULT_PREVIOUS_YEAR_BUTTON_TEXT:"Previous year",DEFAULT_NEXT_YEAR_BUTTON_TEXT:"Next year",DEFAULT_PREVIOUS_YEARS_BUTTON_TEXT:"Previous years",DEFAULT_NEXT_YEARS_BUTTON_TEXT:"Next years",DEFAULT_TODAY_BUTTON_TEXT:"Today",DEFAULT_CLEAR_BUTTON_TEXT:"Clear"},Du={DEFAULT_MAX_YEAR_OFFSET:50,DEFAULT_MIN_YEAR_OFFSET:50,FINAL_WEEK_BEGIN_INDEX:35,MONTH_LENGTH:42,PENULTIMATE_WEEK_BEGIN_INDEX:28,WEEK_LENGTH:7,YEARS_IN_VIEW:20},m={elementName:_r,attributes:zu,classes:he,ids:et,slots:Au,parts:Tu,selectors:Su,events:ku,strings:Ou,numbers:Du},fr=(l=>(l[l.Sunday=0]="Sunday",l[l.Monday=1]="Monday",l[l.Tuesday=2]="Tuesday",l[l.Wednesday=3]="Wednesday",l[l.Thursday=4]="Thursday",l[l.Friday=5]="Friday",l[l.Saturday=6]="Saturday",l))(fr||{}),vp=(a=>(a[a.First=1]="First",a[a.Last=2]="Last",a[a.Current=3]="Current",a))(vp||{});function N4(r,t,e){return e||(e=navigator.language),new Date(2017,0,r+1).toLocaleString(e,{weekday:t})}function hp(r,t,e){return e||(e=navigator.language),new Date(1970,0,r).toLocaleDateString(e,{day:t})}function aa(r,t,e){return e||(e=navigator.language),new Date(1970,r,1).toLocaleString(e,{month:t})}function u0(r,t,e){return e||(e=navigator.language),new Date(r,0,1).toLocaleDateString(e,{year:t})}function cp(r){r||(r=navigator.language);let t=r.match(/^([a-z]{2,3})(?:-([a-z]{3})(?=$|-))?(?:-([a-z]{4})(?=$|-))?(?:-([a-z]{2}|\d{3})(?=$|-))?/i);if(!t||!t.length)return 1;let e=t[1],a=t[4],o="AEAFBHDJDZEGIQIRJOKWLYOMQASDSY".match(/../g),n="AGARASAUBDBRBSBTBWBZCACNCODMDOETGTGUHKHNIDILINJMJPKEKHKRLAMHMMMOMTMXMZNINPPAPEPHPKPRPTPYSASGSVTHTTTWUMUSVEVIWSYEZAZW".match(/../g),i=["ar","arq","arz","fa"],l="amasbndzengnguhehiidjajvkmknkolomhmlmrmtmyneomorpapssdsmsnsutatethtnurzhzu".match(/../g);return a?n&&n.includes(a)?0:o&&o.includes(a)?6:1:l&&l.includes(e)?0:i&&i.includes(e)?6:1}function pp(r){switch(r||(r=navigator.language),r.split("-")[1]){case"DZ":case"BH":case"BD":case"EG":case"IQ":case"IL":case"JO":case"KW":case"LY":case"MV":case"MR":case"NP":case"OM":case"QA":case"SA":case"SD":case"SY":case"AE":case"YE":case"AF":case"IR":return[4,5];case"BN":return[0,5];default:return[0,6]}}function dp(r){return r||(r=navigator.language),["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","sd","ur","uz-AF","yi"].some(e=>r?r.startsWith(e):!1)}function Pu(r){return`d${r}`}function at(r){let t=String(r.getMonth()).padStart(2,"0"),e=String(r.getDate()).padStart(2,"0");return["d",r.getFullYear(),t,e].join("")}function R4(r){let t=String(r.getMonth()).padStart(2,"0"),e=String(r.getDate()).padStart(2,"0");return["e",r.getFullYear(),t,e].join("")}function mp(r,t){let e=document.createElement("div");return e.classList.add(m.classes.DAY),e.id=Pu(r),e.setAttribute("role","columnheader"),e.setAttribute("aria-label",N4(r,"long",t)),e.setAttribute("part",m.parts.DAY),e.textContent=N4(r,"short",t),e}function gp(r,t,e){var o;let a=document.createElement("div");return a.classList.add(m.classes.DATE_VIEW_ROW),a.setAttribute("role","row"),t>0&&!((o=r[0])!=null&&o.thisMonth)?(r.forEach(n=>a.appendChild(bs(n.date))),a.setAttribute("aria-hidden","true")):r.forEach(n=>{let i=n.thisMonth||e!=null&&e.showOtherMonths?F4(n,e==null?void 0:e.locale):bs(n.date);(n.thisMonth||e!=null&&e.showOtherMonths)&&(e!=null&&e.builder)&&(i=e.builder(n,i)),a.appendChild(i)}),a}function F4(r,t){let e=document.createElement("div"),a=document.createElement("div"),o=document.createElement("div"),n=document.createElement("forge-state-layer");n.disabled=r.disabled;let i=document.createElement("forge-focus-indicator");i.inward=!0;let l=r.date.getDay();e.id=at(r.date),e.tabIndex=-1,e.classList.add(m.classes.DATE),e.classList.toggle(m.classes.DATE_TODAY,r.today),e.classList.toggle(m.classes.DATE_SELECTED,r.selected),e.classList.toggle(m.classes.DATE_OTHER_MONTH,!r.thisMonth),e.setAttribute("role","gridcell"),e.setAttribute("aria-disabled",r.disabled.toString()),e.setAttribute("aria-label",`${r.today?"Today, ":""}${r.date.toLocaleDateString(t!=null?t:navigator.language,{weekday:"long",month:"long",day:"numeric",year:"numeric"})}`),e.setAttribute("aria-selected",r.selected.toString()),e.setAttribute(m.attributes.DATA_DATE,r.date.toDateString()),e.toggleAttribute("disabled",r.disabled),e.setAttribute("part",m.parts.DATE_WRAPPER);let h="";switch(l){case 0:h=m.parts.SUNDAY;break;case 1:h=m.parts.MONDAY;break;case 2:h=m.parts.TUESDAY;break;case 3:h=m.parts.WEDNESDAY;break;case 4:h=m.parts.THURSDAY;break;case 5:h=m.parts.FRIDAY;break;case 6:h=m.parts.SATURDAY;break}return Ua(o,"part",h),Ua(o,"part",m.parts.DATE),No(o,"part",m.parts.TODAY,r.today),No(o,"part",m.parts.DATE_OTHER_MONTH,!r.thisMonth),a.classList.add(m.classes.RANGE_TARGET),e.appendChild(a),o.textContent=hp(r.date.getDate(),"numeric",t),o.classList.add(m.classes.DATE_INNER),e.appendChild(o),e.appendChild(n),e.appendChild(i),e}function bs(r){let t=document.createElement("span");return t.classList.add(m.classes.DATE_SPACER),t.id=at(r),t}function wp(r){let t=document.createElement("div");return t.classList.add(m.classes.EVENT_WRAPPER),t.id=R4(r),t.setAttribute("part",m.parts.EVENT_WRAPPER),t}function up(r,t){let e=document.createElement("forge-icon");if(e.classList.add(m.classes.EVENT),e.setAttribute("part",m.parts.EVENT),t)e.classList.add(m.classes.EVENT_OVERFLOW),e.name="add";else{let a='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" stroke="var(--forge-calendar-event-stroke-color)" stroke-width="4px" paint-order="stroke"></path></svg>';e.src=a,e.setAttribute(m.attributes.DATA_EVENT_THEME,r.color)}return e}function _p(r){let t=document.createElement("forge-tooltip");return t.textContent=r,t}function U4(){let r=document.createElement("div");r.classList.add(m.classes.HEADER),r.id=m.ids.HEADER,r.setAttribute("part",m.parts.HEADER);let t=document.createElement("forge-icon-button"),e=document.createElement("forge-icon"),a=document.createElement("forge-tooltip");t.setAttribute("part",m.parts.PREVIOUS_BUTTON),t.id=m.ids.PREVIOUS_BUTTON,t.type="button",e.setAttribute("name","keyboard_arrow_left"),a.id=m.ids.PREVIOUS_BUTTON_TOOLTIP,a.setAttribute("aria-hidden","true"),a.type="label",a.innerText="Previous",t.appendChild(a),t.appendChild(e);let o=document.createElement("forge-icon-button"),n=document.createElement("forge-icon"),i=document.createElement("forge-tooltip");o.setAttribute("part",m.parts.NEXT_BUTTON),o.id=m.ids.NEXT_BUTTON,o.type="button",n.setAttribute("name","keyboard_arrow_right"),i.id=m.ids.NEXT_BUTTON_TOOLTIP,i.setAttribute("aria-hidden","true"),i.type="label",i.innerText="Next",o.appendChild(i),o.appendChild(n);let l=document.createElement("forge-button");l.setAttribute("part",m.parts.MONTH_BUTTON),l.id=m.ids.MONTH_BUTTON,l.type="button",l.setAttribute("aria-pressed","false");let h=document.createElement("forge-button");h.setAttribute("part",m.parts.YEAR_BUTTON),h.id=m.ids.YEAR_BUTTON,h.type="button",h.setAttribute("aria-pressed","false");let c=document.createElement("div");return c.setAttribute("aria-live","polite"),c.appendChild(l),c.appendChild(h),r.appendChild(t),r.appendChild(c),r.appendChild(o),r}function fp(r,t){let e=document.createElement("span"),a=document.createElement("forge-icon");return e.innerHTML=aa(r,"long",t),a.setAttribute("name","arrow_drop_down"),[e,a]}function xp(r,t){let e=document.createElement("span"),a=document.createElement("forge-icon");return e.innerHTML=u0(r,"numeric",t),a.setAttribute("name","arrow_drop_down"),[e,a]}function W4(){let r=document.createElement("div");r.id=m.ids.ACCESSIBLE_HEADER,r.setAttribute("aria-live","polite");let t=document.createElement("span");t.id=m.ids.ACCESSIBLE_MONTH;let e=document.createElement("span");return e.id=m.ids.ACCESSIBLE_YEAR,r.appendChild(t),r.appendChild(e),r}function bp(){let r=document.createElement("div");return r.id=m.ids.FOOTER,r.classList.add(m.classes.FOOTER),r.setAttribute("part",m.parts.FOOTER),r}function yp(){let r=document.createElement("forge-button");r.id=m.ids.CLEAR_BUTTON,r.setAttribute("part",m.parts.CLEAR_BUTTON),r.type="button";let t=document.createElement("slot");return t.name=m.slots.CLEAR_BUTTON_TEXT,t.innerText=m.strings.DEFAULT_CLEAR_BUTTON_TEXT,r.appendChild(t),r}function Mp(){let r=document.createElement("forge-button");r.id=m.ids.TODAY_BUTTON,r.setAttribute("part",m.parts.TODAY_BUTTON),r.type="button";let t=document.createElement("slot");return t.name=m.slots.TODAY_BUTTON_TEXT,t.innerText=m.strings.DEFAULT_TODAY_BUTTON_TEXT,r.appendChild(t),r}function xr(r,t){let e=L2(r).find(a=>a.classList&&a.classList.contains(m.classes.DATE));return!e||!t&&e.hasAttribute("disabled")?null:e}function Hp(r,t){let e=L2(r).find(a=>a.id===t);return e!=null?e:null}function G4(r,t,e,a){r.tabIndex=a?-1:t;let o=r.querySelector("forge-focus-indicator");o&&(o.active=!!a&&t>-1),t>-1&&e&&!a?r.focus():r.blur()}var l2=class r{constructor(t){t&&(this.from=t.from?new Date(t.from):void 0,this.to=t.to?new Date(t.to):void 0)}copy(){return new r(this)}};function Y4(r,t,e=0){let a=[],o=br(new Date(t,r,1),e),n=new Date(o);n.setDate(o.getDate()+m.numbers.MONTH_LENGTH);for(let i=o;i<n;i.setDate(i.getDate()+1))a.push(new Date(i));return a}function c41(r,t=0){let e=[],a=br(r,t),o=new Date(a);o.setDate(a.getDate()+7);for(let n=a;n<o;n.setDate(n.getDate()+1))e.push(new Date(n));return e}function br(r,t=0){let e=r.getDay(),a=new Date(r),o=e>=t?e-t:7+(e-t);return a.setDate(r.getDate()-o),a.setHours(0,0,0,0),a}function Lp(r,t=0){let e=br(r,t);return e.setDate(e.getDate()+6),e}function p41(r,t){return new Date(t,r,1).getDay()}function ys(r=0){let t=[],e=r;do t.push(e),e+=1,e%=7;while(e!==r);return t}function Ip(r){return f2(new Date,r)}function ht(r,t,e){return r.getMonth()===t&&r.getFullYear()===e}function Nu(r,t,e){return r>t&&r<e||f2(r,t)||f2(r,e)}function Ms(r){return r.sort((t,e)=>t.getTime()-e.getTime())}function Vp(r){let t=[];for(let e=0;e<r.length;e+=7){let a=r.slice(e,e+7);t.push(a)}return t}function Ba(r){if(!r.length)return new l2;if(r.length===1)return new l2({from:new Date(r[0])});let t=Hs(r);return new l2({from:t[0],to:t[t.length-1]})}function Ep(r){let t=[];return r.from&&t.push(new Date(r.from)),r.to&&t.push(new Date(r.to)),t}function Hs(r){if(!r.length)return[];if(r.length===1)return[new Date(r[0])];let t=Ms(r.slice().map(e=>new Date(e)));return[new Date(t[0]),new Date(t[t.length-1])]}function Ls(r,t,e){return!t||!e?[]:r.filter(a=>Nu(a,t,e))}function K4(r){let t=`${r.length} event${r.length===1?"":"s"}`,e=r.map(a=>a.label).join(", ");return e!=null&&e.length&&(t+=`: ${e}`),t}function Ru(r){var a,o;let t=new Date;return((o=(a=r.match(/-?[0-9]*[a-zA-Z]/g))==null?void 0:a.map(n=>n.trim()))!=null?o:[]).forEach(n=>{let i=n.slice(-1),l=+n.slice(0,-1);switch(i){case"y":t.setFullYear(t.getFullYear()+l);break;case"m":t.setMonth(t.getMonth()+l);break;case"w":t.setDate(t.getDate()+l*7);break;case"d":t.setDate(t.getDate()+l);break}}),t.setHours(0,0,0,0),t}function Cp(r){let t=r.split(":");if((t==null?void 0:t.length)<2)return{min:1970,max:1970};let e=new Date().getFullYear(),a=t.slice(0,2).map(o=>o.startsWith("-")?e-+o.substring(1):o.startsWith("+")?e+ +o.substring(1):+o);return{min:a[0],max:a[1]}}function zp(r){var n,i,l,h,c,d,u,_;let t=(i=(n=r.min)==null?void 0:n.getFullYear())!=null?i:0,e=(h=(l=r.max)==null?void 0:l.getFullYear())!=null?h:0,a=(d=(c=r.min)==null?void 0:c.getMonth())!=null?d:-1,o=(_=(u=r.max)==null?void 0:u.getMonth())!=null?_:12;return[...Array(12).keys()].map(L=>{let C=r.min?r.selectedYear<t||r.selectedYear===t&&L<a:!1,A=r.max?r.selectedYear>e||r.selectedYear===e&&L>o:!1;return{value:L,label:aa(L,"long",r.locale),selected:L===r.selectedMonth,disabled:C||A}})}function Ap(r){let t=[],e=r.yearInView%m.numbers.YEARS_IN_VIEW,a=r.yearInView-e;for(let o=a;o<a+m.numbers.YEARS_IN_VIEW;o++)t.push({value:o,label:u0(o,"numeric",r.locale),selected:o===r.selectedYear,disabled:o<r.min||o>r.max});return t}function Bp(r){let t=[];for(let e=r.min;e<=r.max;e++)t.push({value:e,label:u0(e,"numeric",r.locale),selected:e===r.selectedYear});return t}function uo(r,t){return t.some(e=>f2(e,r))}function ct(r,t){return!!(t.minDate&&r<t.minDate||t.maxDate&&r>t.maxDate||t.otherMonth||t.disabledDates.some(e=>f2(e,r))||t.disabledDaysOfWeek.includes(r.getDay())||t.builder&&t.builder(r))}function yr(r,t){return t.findIndex(e=>f2(e,r))}function Is(r,t,e){let a=t.filter(o=>f2(o.date,r));if(e){let o=e(r);o&&(rt(o)?a.push(...o):a.push(o))}return a}function Tp(r,t){if(!r.length)return[];let e=new Date(r[0]),a=r[r.length-1],o=[];for(;e<=a;)(!t||!ct(e,t))&&o.push(new Date(e)),e.setDate(e.getDate()+1);return o}function q4(r){let t=null;return typeof r=="string"&&!r.length&&(r=null),r!=null&&(gt(new Date(r))?t=new Date(r):r.length&&(t=Ru(r)),t==null||t.setHours(0,0,0,0)),t}function $4(r,t,e){return e||!L2(r).length||!!(t==="date"&&xr(r))||!!(t!=="date"&&Hp(r,m.ids.MENU))}var Vs=class extends I{constructor(t){super(t),this._container=g(t,m.selectors.CALENDAR),this._dateView=g(t,m.selectors.DATE_VIEW),this._dayRow=g(t,m.selectors.DAY_ROW),this._dateGrid=g(t,m.selectors.DATE_GRID),this._menu=g(t,m.selectors.MENU)}toggleContainerAttribute(t,e,a){K(this._container,t,e,a)}registerMonthButtonListener(t){let e=this._container.querySelector(m.selectors.MONTH_BUTTON);e==null||e.addEventListener("click",t)}unregisterMonthButtonListener(t){let e=this._container.querySelector(m.selectors.MONTH_BUTTON);e==null||e.removeEventListener("click",t)}registerYearButtonListener(t){let e=this._container.querySelector(m.selectors.YEAR_BUTTON);e==null||e.addEventListener("click",t)}unregisterYearButtonListener(t){let e=this._container.querySelector(m.selectors.YEAR_BUTTON);e==null||e.removeEventListener("click",t)}registerMenuListener(t){this._menu.addEventListener(T.events.SELECT,t)}unregisterMenuListener(t){this._menu.removeEventListener(T.events.SELECT,t)}registerMenuFocusChangeEventListener(t){this._menu.addEventListener(T.events.FOCUS_CHANGE,t)}unregisterMenuFocusChangeEventListener(t){this._menu.addEventListener(T.events.FOCUS_CHANGE,t)}registerNextButtonListener(t){let e=this._container.querySelector(m.selectors.NEXT_BUTTON);e==null||e.addEventListener("click",t)}unregisterNextButtonListener(t){let e=this._container.querySelector(m.selectors.NEXT_BUTTON);e==null||e.removeEventListener("click",t)}registerPreviousButtonListener(t){let e=this._container.querySelector(m.selectors.PREVIOUS_BUTTON);e==null||e.addEventListener("click",t)}unregisterPreviousButtonListener(t){let e=this._container.querySelector(m.selectors.PREVIOUS_BUTTON);e==null||e.removeEventListener("click",t)}registerClearButtonListener(t){let e=this._container.querySelector(m.selectors.CLEAR_BUTTON);e==null||e.addEventListener("click",t)}unregisterClearButtonListener(t){let e=this._container.querySelector(m.selectors.CLEAR_BUTTON);e==null||e.removeEventListener("click",t)}registerTodayButtonListener(t){let e=this._container.querySelector(m.selectors.TODAY_BUTTON);e==null||e.addEventListener("click",t)}unregisterTodayButtonListener(t){let e=this._container.querySelector(m.selectors.TODAY_BUTTON);e==null||e.removeEventListener("click",t)}registerDateClickListener(t){this._dateGrid.addEventListener("click",t)}unregisterDateClickListener(t){this._dateGrid.removeEventListener("click",t)}registerKeydownListener(t){this._container.addEventListener("keydown",t)}registerHoverListener(t){this._dateGrid.addEventListener("mouseover",t)}unregisterHoverListener(t){this._dateGrid.removeEventListener("mouseover",t)}registerPreventFocusListener(t){this._container.addEventListener("mousedown",t)}unregisterPreventFocusListener(t){this._container.removeEventListener("mousedown",t)}setContainerClass(t,e){this._container.classList.toggle(t,e)}setHeader(){let t=this._container.querySelector(m.selectors.ACCESSIBLE_HEADER);t==null||t.remove();let e=this._container.querySelector(m.selectors.HEADER);e?e.replaceWith(U4()):this._container.prepend(U4())}removeHeader(){let t=this._container.querySelector(m.selectors.HEADER);t==null||t.remove();let e=this._container.querySelector(m.selectors.ACCESSIBLE_HEADER);e?e.replaceWith(W4()):this._container.prepend(W4())}setNextButtonDisabled(t){let e=this._container.querySelector(m.selectors.NEXT_BUTTON);e==null||e.toggleAttribute("disabled",t)}setPreviousButtonDisabled(t){let e=this._container.querySelector(m.selectors.PREVIOUS_BUTTON);e==null||e.toggleAttribute("disabled",t)}setNextButtonLabel(t){let e="",a="";switch(t){case"date":e=m.strings.DEFAULT_NEXT_MONTH_BUTTON_TEXT,a=m.slots.NEXT_MONTH_BUTTON_TEXT;break;case"month":e=m.strings.DEFAULT_NEXT_YEAR_BUTTON_TEXT,a=m.slots.NEXT_YEAR_BUTTON_TEXT;break;case"year":e=m.strings.DEFAULT_NEXT_YEARS_BUTTON_TEXT,a=m.slots.NEXT_YEARS_BUTTON_TEXT;break}let o=this._container.querySelector(m.selectors.NEXT_BUTTON_TOOLTIP);if(o){let n=document.createElement("slot");n.name=a,n.innerText=e,o.innerHTML=n.outerHTML}}setPreviousButtonLabel(t){let e="",a="";switch(t){case"date":e=m.strings.DEFAULT_PREVIOUS_MONTH_BUTTON_TEXT,a=m.slots.PREVIOUS_MONTH_BUTTON_TEXT;break;case"month":e=m.strings.DEFAULT_PREVIOUS_YEAR_BUTTON_TEXT,a=m.slots.PREVIOUS_YEAR_BUTTON_TEXT;break;case"year":e=m.strings.DEFAULT_PREVIOUS_YEARS_BUTTON_TEXT,a=m.slots.PREVIOUS_YEARS_BUTTON_TEXT;break}let o=this._container.querySelector(m.selectors.PREVIOUS_BUTTON_TOOLTIP);if(o){let n=document.createElement("slot");n.name=a,n.innerText=e,o.innerHTML=n.outerHTML}}setMonthButtonPressed(t){let e=this._container.querySelector(m.selectors.MONTH_BUTTON);e&&(e.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(m.classes.MONTH_MENU_OPEN,t))}setYearButtonPressed(t){let e=this._container.querySelector(m.selectors.YEAR_BUTTON);e&&(e.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(m.classes.YEAR_MENU_OPEN,t))}setMonth(t,e){let a=this._container.querySelector(m.selectors.MONTH_BUTTON);if(a){let n=fp(t,e);a.replaceChildren(n[0],n[1]);return}let o=this._container.querySelector(m.selectors.ACCESSIBLE_MONTH);o&&(o.textContent=aa(t,"long",e))}setYear(t,e){let a=this._container.querySelector(m.selectors.YEAR_BUTTON);if(a){let n=xp(t,e);a.replaceChildren(n[0],n[1]);return}let o=this._container.querySelector(m.selectors.ACCESSIBLE_YEAR);o&&(o.textContent=u0(t,"numeric",e))}setFooter(){this._container.querySelector(m.selectors.FOOTER)||this._container.appendChild(bp())}removeFooter(){var e;let t=this._container.querySelector(m.selectors.FOOTER);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setClearButton(){let t=this._container.querySelector(m.selectors.FOOTER);if(!t)return;t.querySelector(m.selectors.CLEAR_BUTTON)||t.prepend(yp())}removeClearButton(){var e;let t=this._container.querySelector(m.selectors.CLEAR_BUTTON);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setTodayButton(){let t=this._container.querySelector(m.selectors.FOOTER);if(!t)return;t.querySelector(m.selectors.TODAY_BUTTON)||t.appendChild(Mp())}removeTodayButton(){var e;let t=this._container.querySelector(m.selectors.TODAY_BUTTON);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setDays(t,e){r2(this._dayRow),t.forEach(a=>{let o=mp(a,e==null?void 0:e.locale);e!=null&&e.builder&&(o=e.builder(a,o)),this._dayRow.appendChild(o)})}setDates(t,e){r2(this._dateGrid),Vp(t).forEach((a,o)=>{let n=gp(a,o,e);this._dateGrid.appendChild(n)})}replaceDate(t,e){let a=this._dateGrid.querySelector(`#${at(t.date)}`);if(a){let o=F4(t,e==null?void 0:e.locale);e!=null&&e.builder?a.replaceWith(e.builder(t,o)):a.replaceWith(o)}}replaceDateWithSpacer(t){let e=this._dateGrid.querySelector(`#${at(t)}`);e==null||e.replaceWith(bs(t))}setDateDisabled(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`);a&&(a.toggleAttribute("disabled",e),a.setAttribute("aria-disabled",e.toString()))}setDateSelected(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`);a&&(a.classList.toggle(m.classes.DATE_SELECTED,e),a.setAttribute("aria-selected",e.toString()))}setWeekend(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`),o=a==null?void 0:a.querySelector(m.selectors.DATE_INNER);o&&No(o,"part",m.parts.WEEKEND,e)}appendDateAttribute(t,e,a){let o=this._dateGrid.querySelector(`#${at(t)}`);o&&Ua(o,e,a)}setMultiple(t){this._dateView.setAttribute("aria-multiselectable",t.toString())}setDateViewHidden(t){K(this._dateView,t,"aria-hidden",t.toString()),this.setAllDatesUnfocusable()}setRange(t){this._dateGrid.querySelectorAll(m.selectors.RANGE).forEach(a=>a.classList.remove(m.classes.RANGE)),t&&t.forEach(a=>{let o=this._dateGrid.querySelector(`#${at(a)}`);o==null||o.classList.add(m.classes.RANGE)})}setRangeStart(t){let e=this._dateGrid.querySelector(m.selectors.RANGE_START);if(e==null||e.classList.remove(m.classes.RANGE_START),!t)return;let a=this._dateGrid.querySelector(`#${at(t)}`);a==null||a.classList.add(m.classes.RANGE_START)}setRangeEnd(t){let e=this._dateGrid.querySelector(m.selectors.RANGE_END);if(e==null||e.classList.remove(m.classes.RANGE_END),!t)return;let a=this._dateGrid.querySelector(`#${at(t)}`);a==null||a.classList.add(m.classes.RANGE_END)}setActiveDate(t,e,a){let o=t.toDateString();this._dateGrid.querySelectorAll(m.selectors.DATE).forEach(i=>{let l=i.getAttribute(m.attributes.DATA_DATE)===o;G4(i,l?0:-1,e,a)})}setAllDatesUnfocusable(){this._dateGrid.querySelectorAll(m.selectors.DATE).forEach(e=>G4(e,-1,!1,!0))}setDateDescription(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`);a&&K(a,!!e,e)}setDateTooltip(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`);if(!a)return;let o=a.querySelector(m.selectors.TOOLTIP);o?e!=null&&e.length?o.textContent=e:o.remove():e!=null&&e.length&&a.prepend(_p(e))}setEventWrapperOnDate(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`);if(!a)return;let o=a.querySelector(m.selectors.EVENT_WRAPPER);o?e?r2(o):o.remove():e&&a.appendChild(wp(t))}setEvent(t,e){let a=this._dateGrid.querySelector(`#${R4(t.date)}`);a==null||a.appendChild(up(t,e))}openMenuAsGrid(t,e){this._menu.isConnected&&this._menu.openAsGrid(t,e)}openMenuAsList(t,e){this._menu.openAsList(t,e)}closeMenu(){this._menu.close()}setMenuAnimation(t){this._menu.animationType=t}animateIntoSelectionMenu(t,e,a){this._menu.animateIn(t,e,a)}moveMenuFocusDown(){this._menu.moveFocusDown()}moveMenuFocusBackward(){return this._menu.moveFocusBackward()}moveMenuFocusForward(){return this._menu.moveFocusForward()}moveMenuFocusUp(){this._menu.moveFocusUp()}selectFocusedMenuItem(){this._menu.selectFocusedItem()}setPreventFocusOnMenu(t){this._menu.preventFocus=t}};var Es=class{constructor(t){this._adapter=t;this._dates=[];this._month=new Date().getMonth();this._year=new Date().getFullYear();this._showToday=!0;this._showOtherMonths=!1;this._fixedHeight=!1;this._events=[];this._value=[];this._mode="single";this._readonly=!1;this._selectionFollowsMonth=!1;this._rangeSelectionState="none";this._allowSingleDateRange=!0;this._min=null;this._max=null;this._minAttribute=null;this._maxAttribute=null;this._disabledDates=[];this._disabledDaysOfWeek=[];this._constrainToEnabled=!0;this._showHeader=!0;this._clearButton=!1;this._todayButton=!1;this._view="date";this._menuAnimation="scale";this._menuYear=null;this._listYears=!0;this._menuIncludedYear=new Date().getFullYear();this._menuYearsInView=null;this._yearRange=`-${m.numbers.DEFAULT_MIN_YEAR_OFFSET}:+${m.numbers.DEFAULT_MAX_YEAR_OFFSET}`;this._weekendDays=null;this._localeFirstDayOfWeek=0;this._localeWeekendDays=[];this._rtl=!1;this._preventFocus=!1;this._isInitialized=!1;this._clearButtonListener=()=>this._onClearClicked(),this._dateClickListener=e=>this._onDateClick(e),this._keydownListener=e=>this._onKeydown(e),this._hoverListener=e=>this._onHover(e),this._menuFocusChangeListener=e=>this._onMenuFocusChange(e),this._menuListener=e=>this._onMenuSelect(e),this._monthButtonListener=()=>this._onMonthButtonClicked(),this._nextButtonListener=()=>this._onNextButtonClicked(),this._preventFocusListener=e=>e.preventDefault(),this._previousButtonListener=()=>this._onPreviousButtonClicked(),this._todayButtonListener=()=>this._onTodayClicked(),this._yearButtonListener=()=>this._onYearButtonClicked()}initialize(){this._adapter.registerMenuListener(this._menuListener),this._adapter.registerMenuFocusChangeEventListener(this._menuFocusChangeListener),this._adapter.registerKeydownListener(this._keydownListener),this._applyMin(),this._applyMax(),this._applyFixedHeight(),this._applyReadOnly(),this._applyShowToday(),this._applyPreventFocus(),this._applyShowHeader(),this._applyMonth(),this._applyYear(),this._applyListYears(),this._applyMenuAnimation(),this._applyLocale(),this._applyClearButton(),this._applyTodayButton(),this._applyFirstDayOfWeek(),this._applyShowOtherMonths(),this._createDateView(),this._applyConstrainToEnabled(),this._applyAllowSingleDateRange(),this._applyMode(),this._applyYearRange(),this._applySelectionFollowsMonth(),this._isInitialized=!0}destroy(){this._isInitialized=!1}_onMonthButtonClicked(){this._toggleMonthMenu()}_toggleMonthMenu(t=!1){this._view!=="month"?this._openMonthMenu(t):this._closeMenu(!1,t)}_onYearButtonClicked(){this._toggleYearMenu()}_toggleYearMenu(t=!1){this._view!=="year"?this._openYearMenu(t):this._closeMenu(!1,t)}_onMenuFocusChange(t){this._emitFocusChangeEvent(t.detail)}_onMenuSelect(t){switch(this._view){case"month":this._onMonthSelected(t.detail);break;case"year":this._onYearSelected(t.detail);break}}_onNextButtonClicked(){this._view==="date"?(this._goToNextMonth(),this._setFocusInMonth(1,!1)):this._view==="month"?this._goToNextYear():this._goToNextSetOfYears()}_onPreviousButtonClicked(){this._view==="date"?(this._goToPreviousMonth(),this._setFocusInMonth(2,!1)):this._view==="month"?this._goToPreviousYear():this._goToPreviousSetOfYears()}_onHover(t){if(this._mode==="range"){let e=xr(t,!1);if(!e)return;let a=new Date(Date.parse(e.getAttribute(m.attributes.DATA_DATE)));ht(a,this._month,this._year)&&this._setRangePreview(a)}}_onDateClick(t){let e=xr(t,!1);if(!e)return;let a=e.getAttribute(m.attributes.DATA_DATE);if(!a)return;let o=new Date(a);ht(o,this._month,this._year)&&(this._focusedDate=o,this._beforeDateSelected(o)),this._resumeTabindexOnDate(!1)}_onKeydown(t){switch(t.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this._handleArrowKey(t);break;case"Home":case"End":case"PageUp":case"PageDown":this._handleNavigationKey(t);break;case" ":case"Enter":this._handleEnterOrSpaceKey(t);break;case"m":case"M":t.preventDefault(),this._toggleMonthMenu(!0);break;case"y":case"Y":t.preventDefault(),this._toggleYearMenu(!0);break;case"t":case"T":case"n":case"N":t.preventDefault(),this.today();break;case"Delete":case"Backspace":t.preventDefault(),this._deselectAllDates();break;case"Escape":this._view!=="date"&&(t.preventDefault(),t.stopPropagation(),this._closeMenu(!1,!0));break}}_handleArrowKey(t){if(!$4(t,this._view,this._preventFocus))return;t.preventDefault();let e;switch(t.key){case"ArrowLeft":e=this._rtl?"next":"previous";break;case"ArrowRight":e=this._rtl?"previous":"next";break;case"ArrowUp":e="up";break;case"ArrowDown":e="down";break}switch(e){case"previous":this._view==="date"?this._moveFocusToPreviousDate(!0):!this._adapter.moveMenuFocusBackward()&&this._canGoBackward()&&(this._view==="month"?this._goToPreviousYear(!0):this._goToPreviousSetOfYears(!0));break;case"next":this._view==="date"?this._moveFocusToNextDate(!0):!this._adapter.moveMenuFocusForward()&&this._canGoForward()&&(this._view==="month"?this._goToNextYear(!0):this._goToNextSetOfYears(!0));break;case"up":this._view==="date"?this._moveFocusToPreviousWeek(!0):this._adapter.moveMenuFocusUp();break;case"down":this._view==="date"?this._moveFocusToNextWeek(!0):this._adapter.moveMenuFocusDown();break}this._mode==="range"&&this._setRangePreview(this._focusedDate)}_handleNavigationKey(t){switch(t.preventDefault(),t.key){case"Home":if(this._view!=="date")break;t.shiftKey?this._moveFocusToFirstOfMonth(!0):this._moveFocusToFirstOfWeek(!0);break;case"End":if(this._view!=="date")break;t.shiftKey?this._moveFocusToLastOfMonth(!0):this._moveFocusToLastOfWeek(!0);break;case"PageUp":this._view==="date"?t.shiftKey?this._moveFocusToPreviousYear(!0):this._moveFocusToPreviousMonth(!0):this._view==="month"&&!t.shiftKey&&this._canGoBackward()?this._goToPreviousYear(!0):this._view==="year"&&!t.shiftKey&&this._canGoBackward()&&this._goToPreviousSetOfYears(!0);break;case"PageDown":this._view==="date"?t.shiftKey?this._moveFocusToNextYear(!0):this._moveFocusToNextMonth(!0):this._view==="month"&&!t.shiftKey&&this._canGoForward()?this._goToNextYear(!0):this._view==="year"&&!t.shiftKey&&this._canGoForward()&&this._goToNextSetOfYears(!0);break}}_handleEnterOrSpaceKey(t){if($4(t,this._view,this._preventFocus))switch(t.preventDefault(),this._view){case"date":if(this._readonly)break;this._setSelectOnFocusedDate();break;case"month":case"year":this._adapter.selectFocusedMenuItem();break}}_onMonthSelected(t){this._year!==this._menuYear&&this._menuYear!=null&&(this._year=this._menuYear,this._setYear()),this._month=t,this._setMonth(!0),this._trySetValueMonthAndYear(this._month,this._year,"month"),this._closeMenu(!0)}_onYearSelected(t){this._year=t,this._setYear(!0),this._trySetValueMonthAndYear(this._month,this._year,"year"),this._closeMenu(!0)}_onClearClicked(){this.clear()}_onTodayClicked(){this.today()}_trySetValueMonthAndYear(t,e,a="date"){var i;if(!this.selectionFollowsMonth||this._mode!=="single"||!((i=this._value)!=null&&i.length))return;let o=new Date(this._value[0]),n=m3(t,e);o.setDate(Math.min(o.getDate(),n)),o.setFullYear(e),o.setMonth(t),!ct(o,this._getDisabledDateParams())&&this._beforeDateSelected(o,a)}_setInitialDateFocus(t=!1){let e=new Date;if(ht(e,this._month,this._year)&&!ct(e,this._getDisabledDateParams(!1))){this._setFocusedDate(e,t);return}let a=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(a,1,!1,!0,!0),t)}_resumeTabindexOnDate(t){return ht(this._focusedDate,this._month,this._year)?(this._adapter.setActiveDate(this._focusedDate,t,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate),!0):!1}_moveFocusToNextDate(t){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate),t)}_moveFocusToPreviousDate(t){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate),t)}_moveFocusToNextWeek(t){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate,7,!0),t)}_moveFocusToPreviousWeek(t){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate,7,!0),t)}_moveFocusToFirstOfWeek(t){this._setFocusedDate(this._getFirstEnabledDayOfWeek(this._focusedDate,!0),t)}_moveFocusToLastOfWeek(t){this._setFocusedDate(this._getLastEnabledDayOfWeek(this._focusedDate,!0),t)}_moveFocusToFirstOfMonth(t){let e=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(e,1,!1,!0),t)}_moveFocusToLastOfMonth(t){let e=new Date(this._year,this._month+1,0);this._setFocusedDate(this._getPreviousEnabledDate(e,1,!1,!0),t)}_moveFocusToNextMonth(t){let e=yr(this._focusedDate,this._dates),a=(this._month+1)%12,o=a===0?this._year+1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(e,a,o),t)}_moveFocusToPreviousMonth(t){let e=yr(this._focusedDate,this._dates),a=this._month===0?11:this._month-1,o=a===11?this._year-1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(e,a,o),t)}_moveFocusToNextYear(t){let e=yr(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(e,this._month,this._year+1),t)}_moveFocusToPreviousYear(t){let e=yr(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(e,this._month,this._year-1),t)}_setFocusInMonth(t,e){switch(t){case 1:this._moveFocusToFirstOfMonth(e);break;case 2:this._moveFocusToLastOfMonth(e);break;default:this._resumeTabindexOnDate(e);break}}_setSelectOnFocusedDate(){ht(this._focusedDate,this._month,this._year)&&!ct(this._focusedDate,this._getDisabledDateParams(!1))&&this._beforeDateSelected(this._focusedDate)}_emitFocusChangeEvent(t){let e={type:this._view,value:t};switch(this._view){case"date":e.selected=uo(t,this._value),e.text=t.toLocaleDateString(this.locale,{month:"long",day:"2-digit",year:"numeric"});break;case"month":e.selected=this._month===t,e.text=aa(t,"long");break;case"year":e.selected=this._year===t,e.text=u0(t,"numeric");break}this._adapter.emitHostEvent(m.events.FOCUS_CHANGE,e)}_getPreviousEnabledDate(t,e=1,a=!1,o=!1,n=!1){let i=this._getDisabledDateParams(),l=new Date(t);if(o&&!ct(l,i))return l;let h=t.getMonth(),c=!1;do l.setDate(l.getDate()-e),a&&(e=1),(n&&l.getMonth()!==h||this._min&&l<this._min)&&(c=!0);while(!c&&ct(l,i));return c?null:l}_getNextEnabledDate(t,e=1,a=!1,o=!1,n=!1){let i=this._getDisabledDateParams(),l=new Date(t);if(o&&!ct(l,i))return l;let h=t.getMonth(),c=!1;do l.setDate(l.getDate()+e),a&&(e=1),(n&&l.getMonth()!==h||this._max&&l>this._max)&&(c=!0);while(!c&&ct(l,i));return c?null:l}_getClosestEnabledDate(t,e=!1,a=!1){if(this._min&&t<this._min)return this._getFirstEnabledDate();if(this._max&&t>this._max)return this._getLastEnabledDate();let o=this._getDisabledDateParams();if(a&&!ct(t,o))return new Date(t);let n=t.getDate(),i,l=!1,h=!1,c=1;for(;!l||!h;){if(!l){if(i=new Date(t),i.setDate(n+c),l=!ht(i,t.getMonth(),t.getFullYear()),!l&&!ct(i,o))return i;this._max&&i>this._max&&(l=!0)}if(!h){if(i=new Date(t),i.setDate(n-c),h=!ht(i,t.getMonth(),t.getFullYear()),!h&&!ct(i,o))return i;this._min&&i<this._min&&(h=!0)}c+=1}return null}_getFirstEnabledDayOfWeek(t,e=!0){let a=br(t),o=this._getDisabledDateParams(e?a.getMonth()!==t.getMonth()||a.getFullYear()!==t.getFullYear():void 0),n=0;for(;n<7&&ct(a,o);)a.setDate(a.getDate()+1),o.otherMonth=e?a.getMonth()!==t.getMonth()||a.getFullYear()!==t.getFullYear():void 0,n+=1;return n<7?a:null}_getLastEnabledDayOfWeek(t,e=!0){let a=Lp(t),o=this._getDisabledDateParams(e?a.getMonth()!==t.getMonth()||a.getFullYear()!==t.getFullYear():void 0),n=0;for(;n<7&&ct(a,o);)a.setDate(a.getDate()-1),o.otherMonth=e?a.getMonth()!==t.getMonth()||a.getFullYear()!==t.getFullYear():void 0,n+=1;return n<7?a:null}_getDateAtIndexInMonth(t,e,a){var n;let o=Y4(e,a,(n=this._firstDayOfWeek)!=null?n:this._localeFirstDayOfWeek);return this._min&&o[t]<this._min?this._getFirstEnabledDate():this._max&&o[t]>this._max?this._getLastEnabledDate():ht(o[t],e,a)?this._getClosestEnabledDate(o[t],!0):t<20?this._getNextEnabledDate(o[t],7,!0):this._getPreviousEnabledDate(o[t],7,!0)}_getFirstEnabledDate(){return this._min?this._getNextEnabledDate(this._min,1,!1,!0):null}_getLastEnabledDate(){return this._max?this._getPreviousEnabledDate(this._max,1,!1,!0):null}_setFocusedDate(t,e){if(!t)return;let a=this._month!==t.getMonth(),o=this._year!==t.getFullYear();(a||o)&&(a&&(this._month=t.getMonth(),this._setMonth()),o&&(this._year=t.getFullYear(),this._setYear()),this._resetDateGrid()),this._focusedDate=t,this._adapter.setActiveDate(this._focusedDate,e,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_getDisabledDateParams(t){return{builder:this._disabledDateBuilder,disabledDates:this._disabledDates,disabledDaysOfWeek:this._disabledDaysOfWeek,maxDate:this._max,minDate:this._min,otherMonth:t}}_createDateView(){this._resetDateGrid(),(!this._focusedDate||!this._resumeTabindexOnDate(!1))&&this._setInitialDateFocus()}_openMonthMenu(t=!1){this._view="month",this._menuYear==null&&(this._menuYear=this._year),this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!0),this._adapter.setYearButtonPressed(!1)),this._adapter.openMenuAsGrid(this._getMonthsForMenu(),t),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(m.events.VIEW_CHANGE,this._view)}_openYearMenu(t=!1){var e;this._view="year",this._menuIncludedYear=(e=this._menuYear)!=null?e:this._year,this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!0)),this._listYears?this._adapter.openMenuAsList(this._getYearsForMenu(),t):this._adapter.openMenuAsGrid(this._getYearsForMenu(),t),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(m.events.VIEW_CHANGE,this._view)}_getMonthsForMenu(){var e;let t={locale:this._locale,max:this._max,min:this._min,selectedMonth:this._year===this._menuYear?this._month:-1,selectedYear:(e=this._menuYear)!=null?e:this._year};return zp(t)}_getYearsForMenu(){let t=this._min?this._min.getFullYear():this._minYear,e=this._max?this._max.getFullYear():this._maxYear,a={locale:this._locale,max:e,min:t,selectedYear:this._year,yearInView:this._menuIncludedYear},o=this._listYears?Bp(a):Ap(a);return this._menuYearsInView={min:o[0].value,max:o[o.length-1].value},o}_closeMenu(t,e=!1){this._view="date",this._menuYear=null,this._adapter.closeMenu(),this._adapter.setDateViewHidden(!1),this._adapter.setYear(this._year,this._locale),t&&this._resetDateGrid(),this._showHeader&&(this._setNavButtonLabels(),this._setNavigationButtonStates(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!1)),this._resumeTabindexOnDate(e)||this._setInitialDateFocus(e),this._adapter.emitHostEvent(m.events.VIEW_CHANGE,this._view)}_setNavButtonLabels(){this._adapter.setPreviousButtonLabel(this._view),this._adapter.setNextButtonLabel(this._view)}_resetDateGrid(){var e;this._dates=Y4(this._month,this._year,(e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek);let t=this._dates.map(a=>this._getDateConfig(a));this._adapter.setDates(t,{builder:this._dateBuilder,locale:this._locale,showOtherMonths:this._showOtherMonths}),this._setNavigationButtonStates(),this._applyWeekendDays(),this._applyEvents(),this._mode==="range"&&(this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_getDateConfig(t){let e=ht(t,this._month,this._year);return{date:new Date(t),selected:uo(t,this._value),today:Ip(t),thisMonth:e,disabled:ct(t,this._getDisabledDateParams(!e))}}_getCalendarDate(t){return{date:new Date(t),selected:uo(t,this._value),events:Is(t,this._events,this._eventBuilder)}}_setEventsOnDate(t){var o;if(!this._showOtherMonths&&!ht(t,this._month,this._year)){this._adapter.setEventWrapperOnDate(t,!1);return}let e=Is(t,this._events,this._eventBuilder);this._adapter.setEventWrapperOnDate(t,!!e.length),e.forEach((n,i)=>{i>2||this._adapter.setEvent(n,i===2&&e.length>3)});let a=e.length?K4(e):"";this._tooltipBuilder&&(a=(o=this._tooltipBuilder(this._getCalendarDate(t),a))!=null?o:""),this._adapter.setDateTooltip(t,a)}_beforeDateSelected(t,e="date"){this._dateSelectCallback?Promise.resolve(this._dateSelectCallback(this._getCalendarDate(t))).then(a=>{a&&this._onDateSelected(t,void 0,e)}):this._onDateSelected(t,void 0,e)}_onDateSelected(t,e,a="date"){if(this._mode==="range"&&this._emitRangeSelectionEvent(t)){this._applyRangeSelection(t),this._rangeSelectionStore=void 0;return}let o=uo(t,this._value),n={date:new Date(t),selected:o,type:a};this._adapter.emitHostEvent(m.events.DATE_SELECT,n,!0,!0)&&(this._rangeSelectionStore=void 0,this._mode==="single"?o&&!e||e===!1?this._deselectDate(t):(e===void 0||e===!0)&&(this._value.length&&this._deselectDate(this._value[0]),this._selectDate(t)):o&&!e||e===!1?this._deselectDate(t):(e===void 0||e===!0)&&this._selectDate(t),Ms(this._value))}_emitRangeSelectionEvent(t){let e={date:new Date(t),selected:uo(t,this._value),type:"date"};switch(this._rangeSelectionState){case"none":case"to":e.range=Ba([t]),e.rangeSelectionState="from";break;case"from":f2(t,this._value[0])?this._allowSingleDateRange?(e.range=Ba([this._value[0],t]),e.rangeSelectionState="to"):(e.range=Ba([]),e.rangeSelectionState="none"):t<this._value[0]?(e.range=Ba([t]),e.rangeSelectionState="from"):(e.range=Ba([this._value[0],t]),e.rangeSelectionState="to");break}return this._adapter.emitHostEvent(m.events.DATE_SELECT,e,!0,!0)}_applyRangeSelection(t){switch(this._rangeSelectionState){case"none":case"to":this._deselectAllDates(),this._selectDate(t),this._adapter.setRange(null),this._adapter.setRangeStart(t),this._rangeSelectionState="from";break;case"from":f2(t,this._value[0])?this._allowSingleDateRange?(this._value.push(t),this._rangeSelectionState="to"):(this._deselectDate(t),this._rangeSelectionState="none"):t<this._value[0]?(this._deselectDate(this._value[0]),this._selectDate(t),this._adapter.setRangeStart(t)):(this._selectDate(t),this._setRangePreview(t),this._rangeSelectionState="to");break}}_setRangePreview(t){switch(this._rangeSelectionState){case"from":if(!t)return;t<this._value[0]?this._adapter.setRange(null):(this._adapter.setRange(Ls(this._dates,this._value[0],t)),this._adapter.setRangeEnd(t));break;case"to":this._adapter.setRange(Ls(this._dates,this._value[0],this._value[1])),this._adapter.setRangeEnd(this._value[1]);break}}_clearRangePreview(){this._adapter.setRange(null),this._adapter.setRangeStart(null),this._adapter.setRangeEnd(null)}_selectDate(t){this._value.push(t),this._focusedDate=t,this._adapter.setDateSelected(t,!0)}_deselectDate(t){let e=this._value.findIndex(a=>f2(a,t));e>-1&&this._value.splice(e,1),this._adapter.setDateSelected(t,!1)}_deselectAllDates(){this._value.forEach(t=>this._adapter.setDateSelected(t,!1)),this._clearRangePreview(),this._value=[]}_goToDate(t,e){let a=t.getFullYear(),o=t.getMonth();this._focusedDate=t,this._month=o,this._setMonth(),this._year=a,this._setYear(),this._view!=="date"?this._closeMenu(!1,e):this._resetDateGrid(),this._adapter.setActiveDate(t,e,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_goToNextMonth(){this._month<11?this._month+=1:(this._month=0,this._year+=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToPreviousMonth(){this._month>0?this._month-=1:(this._month=11,this._year-=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToNextYear(t=!1){this._view==="month"?(this._menuYear&&(this._menuYear+=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"left":"right",t)):(this._year+=1,this._setYear(),this._resetDateGrid())}_goToPreviousYear(t=!1){this._view==="month"?(this._menuYear&&(this._menuYear-=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"right":"left",t)):(this._year-=1,this._setYear(),this._resetDateGrid())}_goToNextSetOfYears(t=!1){this._menuIncludedYear+=m.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"left":"right",t),this._setNavigationButtonStates()}_goToPreviousSetOfYears(t=!1){this._menuIncludedYear-=m.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"right":"left",t),this._setNavigationButtonStates()}_canGoBackward(t){var e;if(!t&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._min||this._min<new Date(this._year,this._month,1);case"month":let a=(e=this._min)==null?void 0:e.getFullYear();return this._menuYear!=null&&(a==null||a<this._menuYear);case"year":return!!this._menuYearsInView&&this._minYear<this._menuYearsInView.min;default:return!1}}_canGoForward(t){var e;if(!t&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._max||this._max>jl(this._month,this._year);case"month":let a=(e=this._max)==null?void 0:e.getFullYear();return this._menuYear!=null&&(a==null||a>this._menuYear);case"year":return!!this._menuYearsInView&&this._maxYear>this._menuYearsInView.max;default:return!1}}_setNavigationButtonStates(){if(this._showHeader){if(!this._constrainToEnabled){this._adapter.setPreviousButtonDisabled(!1),this._adapter.setNextButtonDisabled(!1);return}this._adapter.setPreviousButtonDisabled(!this._canGoBackward()),this._adapter.setNextButtonDisabled(!this._canGoForward())}}_setMonth(t){this._adapter.setMonth(this._month,this._locale),this._adapter.setHostAttribute(m.attributes.MONTH,this._month.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(m.events.MONTH_CHANGE,{month:this._month,userSelected:t!=null?t:!1,year:this._year}))}_setYear(t){this._adapter.setYear(this._year,this._locale),this._adapter.setHostAttribute(m.attributes.YEAR,this._year.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(m.events.MONTH_CHANGE,{month:this._month,userSelected:t!=null?t:!1,year:this._year}))}_setMenuYear(){this._menuYear!=null&&(this._setNavigationButtonStates(),this._adapter.setYear(this._menuYear,this._locale))}_applyAllowSingleDateRange(){this._adapter.toggleHostAttribute(m.attributes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange),this._adapter.setContainerClass(m.classes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange)}_applyClearButton(){this._adapter.toggleHostAttribute(m.attributes.CLEAR_BUTTON,!0,this._clearButton.toString()),this._clearButton?(this._adapter.setFooter(),this._adapter.setClearButton(),this._adapter.registerClearButtonListener(this._clearButtonListener)):(this._adapter.unregisterClearButtonListener(this._clearButtonListener),this._adapter.removeClearButton(),this._todayButton||this._adapter.removeFooter())}_applyConstrainToEnabled(){this._adapter.toggleHostAttribute(m.attributes.CONSTRAIN_TO_ENABLED,!0,this._constrainToEnabled.toString()),this._isInitialized&&this._setNavigationButtonStates()}_applyDateBuilder(){this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyDayBuilder(){var t;this._adapter.setDays(ys((t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale})}_applyDisabledDates(){switch(this._view){case"date":this._dates.forEach(t=>{let e=ht(t,this._month,this._year),a=this._getDisabledDateParams(!e);this._adapter.setDateDisabled(t,ct(t,a))});break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}this._setNavigationButtonStates()}_applyEvents(){this._view==="date"&&this._dates.forEach(t=>{this._setEventsOnDate(t)})}_applyFirstDayOfWeek(){var t,e;this._adapter.toggleHostAttribute(m.attributes.FIRST_DAY_OF_WEEK,k(this._firstDayOfWeek),((t=this._firstDayOfWeek)!=null?t:0).toString()),this._adapter.setDays(ys((e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyFixedHeight(){this._adapter.toggleHostAttribute(m.attributes.FIXED_HEIGHT,this._fixedHeight),this._adapter.setContainerClass(m.classes.FIXED_HEIGHT,this._fixedHeight)}_applyListYears(){this._adapter.toggleHostAttribute(m.attributes.LIST_YEARS,this._listYears),this._isInitialized&&this._view==="year"&&this._openYearMenu()}_applyLocale(){var t;if(this._adapter.toggleHostAttribute(m.attributes.LOCALE,!!this._locale,this._locale),this._adapter.toggleContainerAttribute(!!this._locale,"lang",this._locale),this._localeFirstDayOfWeek=cp(this._locale),this._localeWeekendDays=pp(this._locale),this._applyRtl(),this._isInitialized)switch(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._view){case"date":this._adapter.setDays(ys((t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._resetDateGrid(),this._resumeTabindexOnDate(!1);break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyMenuAnimation(){this._adapter.setHostAttribute(m.attributes.MENU_ANIMATION,this._menuAnimation),this._adapter.setMenuAnimation(this._menuAnimation)}_applyMin(){if(this._adapter.toggleHostAttribute(m.attributes.MIN,!!this._minAttribute,this._minAttribute),this._min){let t=new Date(this._min.getFullYear(),this._min.getMonth(),1),e=new Date(this._year,this._month,1);t>e&&(this._year=this._min.getFullYear(),this._month=this._min.getMonth())}if(this._isInitialized&&(this._applyDisabledDates(),this._min&&this._min>this._focusedDate)){let t=this._getFirstEnabledDate();t&&this._goToDate(t,!1)}}_applyMax(){if(this._adapter.toggleHostAttribute(m.attributes.MAX,!!this._maxAttribute,this._maxAttribute),this._max){let t=new Date(this._max.getFullYear(),this._max.getMonth(),1),e=new Date(this._year,this._month,1);t<e&&(this._year=this._max.getFullYear(),this._month=this._max.getMonth())}if(this._isInitialized&&(this._applyDisabledDates(),this._max&&this._max<this._focusedDate)){let t=this._getLastEnabledDate();t&&this._goToDate(t,!1)}}_applyMode(t){switch(this._mode){case"single":this._applySingleMode();break;case"multiple":this._applyMultipleMode(t==="range");break;case"range":this._applyRangeMode();break}this._mode!=="range"&&(this._rangeSelectionState="none",this._adapter.unregisterHoverListener(this._hoverListener),this._clearRangePreview())}_applySingleMode(){if(this._adapter.setHostAttribute(m.attributes.MODE,"single"),this._adapter.setMultiple(!1),this._value.length>1)for(let t=this._value.length-2;t>=0;t-=1)this._deselectDate(this._value[t])}_applyMultipleMode(t=!1){if(this._adapter.setHostAttribute(m.attributes.MODE,"multiple"),this._adapter.setMultiple(!0),t){let e=Tp(this._value,this._getDisabledDateParams());this._deselectAllDates(),e.forEach(a=>{this._selectDate(a)})}}_applyRangeMode(){var e,a;this._adapter.setHostAttribute(m.attributes.MODE,"range"),this._adapter.setMultiple(!1);let t=Hs(this._value);this._deselectAllDates(),t.forEach(o=>{this._selectDate(o)}),this._rangeSelectionState=this._value[0]?this._value[1]?"to":"from":"none",this._adapter.registerHoverListener(this._hoverListener),this._adapter.setRange(Ls(this._dates,this._value[0],this._value[1])),this._adapter.setRangeStart((e=this._value[0])!=null?e:null),this._adapter.setRangeEnd((a=this._value[1])!=null?a:null)}_applyMonth(){this._setMonth(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyPreventFocus(){this._adapter.toggleHostAttribute(m.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setContainerClass(m.classes.PREVENT_FOCUS,this._preventFocus),this._adapter.setPreventFocusOnMenu(this._preventFocus),this._preventFocus?this._adapter.registerPreventFocusListener(this._preventFocusListener):this._adapter.unregisterPreventFocusListener(this._preventFocusListener),this._isInitialized&&this._view==="date"&&this._resumeTabindexOnDate(!1)}_applyReadOnly(){this._adapter.toggleHostAttribute(m.attributes.READONLY,this._readonly),this._adapter.toggleHostAttribute("aria-readonly",this._readonly,"true"),this._adapter.setContainerClass(m.classes.READONLY,this._readonly),this._readonly?(this._adapter.unregisterDateClickListener(this._dateClickListener),this._adapter.unregisterHoverListener(this._hoverListener)):(this._adapter.registerDateClickListener(this._dateClickListener),this._mode==="range"&&this._adapter.registerHoverListener(this._hoverListener))}_applyRtl(){this._rtl=dp(this._locale),this._adapter.setContainerClass(m.classes.RTL,this._rtl),this._adapter.toggleContainerAttribute(this._rtl,"dir","rtl")}_applySelectionFollowsMonth(){this._adapter.setHostAttribute(m.attributes.SELECTION_FOLLOWS_MONTH,this._selectionFollowsMonth.toString())}_applyShowHeader(){this._adapter.toggleHostAttribute(m.attributes.SHOW_HEADER,this._showHeader,this._showHeader.toString()),this._showHeader?(this._adapter.setHeader(),this._adapter.registerMonthButtonListener(this._monthButtonListener),this._adapter.registerNextButtonListener(this._nextButtonListener),this._adapter.registerPreviousButtonListener(this._previousButtonListener),this._adapter.registerYearButtonListener(this._yearButtonListener),this._setNavButtonLabels()):(this._adapter.unregisterMonthButtonListener(this._monthButtonListener),this._adapter.unregisterNextButtonListener(this._nextButtonListener),this._adapter.unregisterPreviousButtonListener(this._previousButtonListener),this._adapter.unregisterYearButtonListener(this._yearButtonListener),this._adapter.removeHeader()),this._isInitialized&&(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._setNavigationButtonStates())}_applyShowOtherMonths(){if(this._adapter.toggleHostAttribute(m.attributes.SHOW_OTHER_MONTHS,this._showOtherMonths),this._isInitialized&&this._view==="date"){let t=!1;this._dates.forEach((e,a)=>{ht(e,this._month,this._year)||((a===m.numbers.PENULTIMATE_WEEK_BEGIN_INDEX||a===m.numbers.FINAL_WEEK_BEGIN_INDEX)&&(t=!0),this._showOtherMonths&&!t?this._adapter.replaceDate(this._getDateConfig(e),{builder:this._dateBuilder,locale:this._locale}):this._adapter.replaceDateWithSpacer(e),this._setEventsOnDate(e),this._applyWeekendDays())})}}_applyShowToday(){this._adapter.toggleHostAttribute(m.attributes.SHOW_TODAY,this._showToday),this._adapter.setContainerClass(m.classes.SHOW_TODAY,this._showToday)}_applyTodayButton(){this._adapter.toggleHostAttribute(m.attributes.TODAY_BUTTON,!0,this._todayButton.toString()),this._todayButton?(this._adapter.setFooter(),this._adapter.setTodayButton(),this._adapter.registerTodayButtonListener(this._todayButtonListener)):(this._adapter.unregisterTodayButtonListener(this._todayButtonListener),this._adapter.removeTodayButton(),this._clearButton||this._adapter.removeFooter())}_applyTooltipBuilder(){this._view==="date"&&this._dates.forEach(t=>{var o;if(!this._showOtherMonths&&!ht(t,this._month,this._year))return;let e=Is(t,this._events,this._eventBuilder),a=K4(e);this._tooltipBuilder&&(a=(o=this._tooltipBuilder(this._getCalendarDate(t),a))!=null?o:""),this._adapter.setDateTooltip(t,a)})}_applyWeekendDays(){var e;let t=(e=this._weekendDays)!=null?e:this._localeWeekendDays;this._view==="date"&&this._dates.forEach(a=>{let o=a.getDay();this._adapter.setWeekend(a,(this._showOtherMonths||ht(a,this._month,this._year))&&t.includes(o))})}_applyValue(t){t=t.map(e=>new Date(e)),Ms(t),this._deselectAllDates(),t.forEach(e=>this._selectDate(e)),this._mode==="range"&&(this._rangeSelectionState=this._value.length===2?"to":this._value.length===1?"from":"none",this._clearRangePreview(),this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_applyView(){switch(this._adapter.setHostAttribute(m.attributes.VIEW,this._view),this._view){case"date":this._closeMenu();break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyYear(){this._setYear(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyYearRange(){this._adapter.setHostAttribute(m.attributes.YEAR_RANGE,this._yearRange);let t=Cp(this._yearRange);this._minYear=t.min,this._maxYear=t.max,this._view==="year"&&(this._openYearMenu(),this._setNavigationButtonStates())}get activeDate(){return new Date(this._focusedDate)}get allowSingleDateRange(){return this._allowSingleDateRange}set allowSingleDateRange(t){this._allowSingleDateRange!==t&&(this._allowSingleDateRange=t,this._applyAllowSingleDateRange())}get clearButton(){return this._clearButton}set clearButton(t){this._clearButton!==t&&(this._clearButton=t,this._isInitialized&&this._applyClearButton())}get clearCallback(){return this._clearCallback}set clearCallback(t){this._clearCallback=t}get constrainToEnabled(){return this._constrainToEnabled}set constrainToEnabled(t){this._constrainToEnabled!==t&&(this._constrainToEnabled=t,this._isInitialized&&this._applyConstrainToEnabled())}get dateBuilder(){return this._dateBuilder}set dateBuilder(t){this._dateBuilder=t,this._isInitialized&&this._applyDateBuilder()}get dateSelectCallback(){return this._dateSelectCallback}set dateSelectCallback(t){this._dateSelectCallback=t}get dayBuilder(){return this.dayBuilder}set dayBuilder(t){this._dayBuilder=t,this._isInitialized&&this._applyDayBuilder()}get disabledDateBuilder(){return this._disabledDateBuilder}set disabledDateBuilder(t){this._disabledDateBuilder=t,this._isInitialized&&this._applyDisabledDates()}get disabledDates(){let t=this._disabledDates.map(e=>new Date(e));return t.length?t:null}set disabledDates(t){let e=t?rt(t)?t:[t]:[];this._disabledDates=e.map(a=>{let o=new Date(a);return o.setHours(0,0,0,0),o}),this._isInitialized&&this._applyDisabledDates()}get disabledDaysOfWeek(){return this._disabledDaysOfWeek.length?[...this._disabledDaysOfWeek]:null}set disabledDaysOfWeek(t){this._disabledDaysOfWeek=k(t)?rt(t)?t:[t]:[],this._isInitialized&&this._applyDisabledDates()}get eventBuilder(){return this._eventBuilder}set eventBuilder(t){this._eventBuilder=t,this._isInitialized&&this._applyEvents()}get events(){return this._events?[...this._events]:null}set events(t){this._events=t!=null&&t.length?[...t]:[],this._isInitialized&&this._applyEvents()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(t){this._firstDayOfWeek!==t&&(this._firstDayOfWeek=k(t)?+t:t,this._isInitialized&&this._applyFirstDayOfWeek())}get fixedHeight(){return this._fixedHeight}set fixedHeight(t){this._fixedHeight!==t&&(this._fixedHeight=t,this._isInitialized&&this._applyFixedHeight())}get listYears(){return this._listYears}set listYears(t){this._listYears!==t&&(this._listYears=t,this._applyListYears())}get locale(){return this._locale}set locale(t){typeof t=="string"&&!t.length&&(t=void 0),this._locale!==t&&(this._locale=t,this._isInitialized&&this._applyLocale())}get max(){return this._max}set max(t){var e;this._maxAttribute!==t&&(this._maxAttribute=(e=t==null?void 0:t.toString())!=null?e:null,this._max=q4(t),this._applyMax())}get menuAnimation(){return this._menuAnimation}set menuAnimation(t){this._menuAnimation!==t&&(this._menuAnimation=t,this._isInitialized&&this._applyMenuAnimation())}get min(){return this._min}set min(t){var e;this._minAttribute!==t&&(this._minAttribute=(e=t==null?void 0:t.toString())!=null?e:null,this._min=q4(t),this._applyMin())}get mode(){return this._mode}set mode(t){if(this._mode!==t){let e=this._mode;this._mode=t,this._isInitialized&&this._applyMode(e)}}get month(){return this._month}set month(t){if(this._month!==t){let e=isNaN(+t)?this._month:+t;if(this._month===e)return;this._month=+t,this._isInitialized&&this._applyMonth()}}get preventFocus(){return this._preventFocus}set preventFocus(t){this._preventFocus!==t&&(this._preventFocus=t,this._isInitialized&&this._applyPreventFocus())}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._isInitialized&&this._applyReadOnly())}get selectionFollowsMonth(){return this._selectionFollowsMonth}set selectionFollowsMonth(t){this._selectionFollowsMonth!==t&&(this._selectionFollowsMonth=t,this._isInitialized&&this._applySelectionFollowsMonth())}get showHeader(){return this._showHeader}set showHeader(t){this._showHeader!==t&&(this._showHeader=t,this._isInitialized&&this._applyShowHeader())}get showOtherMonths(){return this._showOtherMonths}set showOtherMonths(t){this._showOtherMonths!==t&&(this._showOtherMonths=t,this._isInitialized&&this._applyShowOtherMonths())}get showToday(){return this._showToday}set showToday(t){this._showToday!==t&&(this._showToday=t,this._isInitialized&&this._applyShowToday())}get todayButton(){return this._todayButton}set todayButton(t){this._todayButton!==t&&(this._todayButton=t,this._isInitialized&&this._applyTodayButton())}get todayCallback(){return this._todayCallback}set todayCallback(t){this._todayCallback=t}get tooltipBuilder(){return this._tooltipBuilder}set tooltipBuilder(t){this._tooltipBuilder=t,this._isInitialized&&this._applyTooltipBuilder()}get value(){var e;if(this._mode==="range")return(e=this._rangeSelectionStore)!=null?e:Ba(this._value);let t=this._value.map(a=>new Date(a));return this._mode==="multiple"?t:t.length?t[0]:null}set value(t){let e=[];if(this._rangeSelectionStore=void 0,!t||Array.isArray(t)&&!t.length)this._value=[];else if(Array.isArray(t))switch(this._mode){case"single":e=[t[0]];break;case"multiple":e=t;break;case"range":let a=Hs(t);e.push(a[0]),a.length>1&&e.push(a[1]);break}else gt(new Date(t))?e=[t]:(this._rangeSelectionStore=new l2(t),e=Ep(t));this._applyValue(e)}get view(){return this._view}set view(t){this._view!==t&&(this._view=t,this._applyView())}get weekendDays(){return this._weekendDays?[...this._weekendDays]:null}set weekendDays(t){var e;this._weekendDays=(e=t==null?void 0:t.map(a=>+a))!=null?e:null,this._isInitialized&&this._applyWeekendDays()}get year(){return this._year}set year(t){if(this._year!==t){let e=isNaN(+t)?this._year:+t;if(this._year===e)return;this._year=e,this._isInitialized&&this._applyYear()}}get yearRange(){return this._yearRange}set yearRange(t){this._yearRange!==t&&(this._yearRange=t,this._isInitialized&&this._applyYearRange())}clear(){this._deselectAllDates(),this._clearCallback&&this._clearCallback()}deselectDate(t,e){this._onDateSelected(t,!1),e&&(this._focusedDate=t,this._resumeTabindexOnDate(!0))}goToDate(t,e){this._goToDate(t,e!=null?e:!1)}handleExternalKeyEvent(t){this._onKeydown(t)}layout(){this._applyFirstDayOfWeek(),this._createDateView(),this._applyShowHeader(),this._applyConstrainToEnabled()}selectDate(t,e){this._onDateSelected(t,!0),e&&(this._focusedDate=t,this._resumeTabindexOnDate(!0))}setActiveDate(t,e){return this._dates.some(a=>f2(a,t)&&(this._showOtherMonths||ht(a,this._month,this._year)))?(this._goToDate(t,e!=null?e:!1),!0):!1}today(){let t=new Date;t.setHours(0,0,0,0),this._goToDate(t,!0),this._todayCallback&&this._todayCallback()}toggleDate(t,e){this._onDateSelected(t)}};var Fu='<template><div class="forge-calendar" part="root"><div id="view" class="forge-calendar__view" part="view"><div id="date-view" class="forge-calendar__date-view" role="grid" part="date-view"><div role="rowgroup" part="date-view-container"><div id="day-row" class="forge-calendar__date-view__row" role="row" part="date-view-row"></div></div><div id="date-grid" class="forge-calendar__date-grid" role="rowgroup" part="date-grid-container"></div></div><forge-calendar-menu id="menu" part="calendar-menu"></forge-calendar-menu></div></div></template>',Uu='.forge-calendar{width:var(--forge-calendar-width,100%);height:fit-content;position:relative}.forge-calendar__header{padding:var(--forge-calendar-controls-padding,0);display:flex;align-items:center;justify-content:space-between}.forge-calendar__footer{padding:var(--forge-calendar-controls-padding,0);display:flex;align-items:center;justify-content:space-between}.forge-calendar__view{position:relative}.forge-calendar__date-view{display:block}.forge-calendar__date-view__row{display:grid;grid-template-columns:repeat(7,1fr)}.forge-calendar__date-grid{display:grid}.forge-calendar__day{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);display:flex;justify-content:center;align-items:center;min-width:0;padding:0;font-weight:700;user-select:none}.forge-calendar__day::after{float:left;padding-top:100%;content:""}.forge-calendar__date{margin-top:var(--forge-calendar-row-gap,2px);min-width:0;padding:0;border-radius:50%;position:relative;outline:0;cursor:default;user-select:none}.forge-calendar__date::after{float:left;padding-top:100%;content:""}.forge-calendar__date forge-focus-indicator{--forge-focus-indicator-shape:50%}.forge-calendar__date__inner{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);position:absolute;width:calc(100% - 2px);height:calc(100% - 2px);top:calc(2px / 2);left:calc(2px / 2);display:flex;justify-content:center;align-items:center;border-radius:inherit;box-sizing:border-box}.forge-calendar--show-today .forge-calendar__date--today:not([disabled]){color:var(--forge-theme-primary,#3f51b5);border-color:var(--forge-theme-primary,#3f51b5)}.forge-calendar--show-today .forge-calendar__date--today .forge-calendar__date__inner{border-color:inherit;border-width:1px;border-style:solid;font-weight:700}.forge-calendar--show-today .forge-calendar__date--today.forge-calendar__date--selected{color:var(--forge-theme-on-primary,#fff)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]){cursor:pointer}.forge-calendar__date--selected:not([disabled]) .forge-calendar__date__inner{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar__date--selected[disabled] .forge-calendar__date__inner{background-color:var(--forge-theme-primary-container-minimum,#f7f8fc);color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar__date--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container)}.forge-calendar__date[disabled]{color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar__date-spacer{pointer-events:none}.forge-calendar--fixed-height .forge-calendar__date-spacer{margin-top:var(--forge-calendar-row-gap,2px)}.forge-calendar--fixed-height .forge-calendar__date-spacer::after{float:left;padding-top:100%;content:""}.forge-calendar__range:not(.forge-calendar__date-spacer) .forge-calendar__range__target{background-color:var(--forge-theme-primary,#3f51b5);position:absolute;width:100%;height:100%;opacity:.14;border-radius:0}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--start .forge-calendar__range__target{border-top-left-radius:50%;border-bottom-left-radius:50%}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--end .forge-calendar__range__target{border-top-right-radius:50%;border-bottom-right-radius:50%}.forge-calendar__range:not(.forge-calendar__range--start):first-of-type .forge-calendar__range__target{border-top-left-radius:4px;border-bottom-left-radius:4px}.forge-calendar__range:not(.forge-calendar__range--end):last-of-type .forge-calendar__range__target{border-top-right-radius:4px;border-bottom-right-radius:4px}.forge-calendar--allow-single-date-range .forge-calendar__range--start.forge-calendar__range--end .forge-calendar__range__target{transition:transform .2s;transform:scale(1.15);transform-origin:center}.forge-calendar__event{font-size:var(--forge-calendar-event-dot-size, 12px)}.forge-calendar__event[data-event-theme=primary]{color:var(--forge-calendar-theme-event-primary-accent,#3f51b5)}.forge-calendar__event[data-event-theme=secondary]{color:var(--forge-calendar-theme-event-secondary-accent,#ffc107)}.forge-calendar__event[data-event-theme=blue]{color:var(--forge-calendar-theme-event-blue-accent,#2196f3)}.forge-calendar__event[data-event-theme=light-green]{color:var(--forge-calendar-theme-event-light-green-accent,#8bc34a)}.forge-calendar__event[data-event-theme=cyan]{color:var(--forge-calendar-theme-event-cyan-accent,#00bcd4)}.forge-calendar__event[data-event-theme=teal]{color:var(--forge-calendar-theme-event-teal-accent,#009688)}.forge-calendar__event[data-event-theme=orange]{color:var(--forge-calendar-theme-event-orange-accent,#ff9800)}.forge-calendar__event[data-event-theme=blue-grey]{color:var(--forge-calendar-theme-event-blue-grey-accent,#607d8b)}.forge-calendar__event[data-event-theme=grey]{color:var(--forge-calendar-theme-event-grey-accent,#9e9e9e)}.forge-calendar__event[data-event-theme=red]{color:var(--forge-calendar-theme-event-red-accent,#f44336)}.forge-calendar__event[data-event-theme=pink]{color:var(--forge-calendar-theme-event-pink-accent,#e91e63)}.forge-calendar__event[data-event-theme=purple]{color:var(--forge-calendar-theme-event-purple-accent,#9c27b0)}.forge-calendar__event[data-event-theme=light-blue]{color:var(--forge-calendar-theme-event-light-blue-accent,#03a9f4)}.forge-calendar__event[data-event-theme=deep-purple]{color:var(--forge-calendar-theme-event-deep-purple-accent,#673ab7)}.forge-calendar__event[data-event-theme=green]{color:var(--forge-calendar-theme-event-green-accent,#4caf50)}.forge-calendar__event[data-event-theme=lime]{color:var(--forge-calendar-theme-event-lime-accent,#cddc39)}.forge-calendar__event[data-event-theme=yellow]{color:var(--forge-calendar-theme-event-yellow-accent,#ffeb3b)}.forge-calendar__event[data-event-theme=brown]{color:var(--forge-calendar-theme-event-brown-accent,#795548)}.forge-calendar__event[data-event-theme=deep-orange]{color:var(--forge-calendar-theme-event-deep-orange-accent,#ff5722)}.forge-calendar__date[disabled] .forge-calendar__event{opacity:.14}.forge-calendar__event--overflow{background-color:var(--forge-theme-surface,#fff);color:var(--forge-theme-on-surface,#000);border-radius:50%}.forge-calendar__event__wrapper{display:flex;justify-content:center;gap:2px;position:absolute;bottom:0;left:0;width:100%;padding-bottom:2px;pointer-events:none}.forge-calendar__date-spacer .forge-calendar__event__wrapper{display:none}.forge-calendar--rtl .forge-calendar__header forge-icon-button forge-icon{transform:rotate(180deg)}#accessible-header{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:fixed;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}#month-button forge-icon{transition:transform .2s}.forge-calendar--month-menu-open #month-button forge-icon{transform:rotate(180deg)}#year-button forge-icon{transition:transform .2s}.forge-calendar--year-menu-open #year-button forge-icon{transform:rotate(180deg)}:host{--forge-calendar-event-stroke-color:var(--forge-theme-surface, #ffffff);display:inline-block}:host([hidden]){display:none}:host([forge-popover-context=true]){--forge-calendar-event-stroke-color:var(--forge-theme-surface-bright, #ffffff)}',v1=class extends M{static get observedAttributes(){return[m.attributes.ALLOW_SINGLE_DATE_RANGE,m.attributes.CLEAR_BUTTON,m.attributes.CONSTRAIN_TO_ENABLED,m.attributes.FIRST_DAY_OF_WEEK,m.attributes.FIXED_HEIGHT,m.attributes.LIST_YEARS,m.attributes.LOCALE,m.attributes.MAX,m.attributes.MENU_ANIMATION,m.attributes.MIN,m.attributes.MODE,m.attributes.MONTH,m.attributes.PREVENT_FOCUS,m.attributes.READONLY,m.attributes.SELECTION_FOLLOWS_MONTH,m.attributes.SHOW_HEADER,m.attributes.SHOW_OTHER_MONTHS,m.attributes.SHOW_TODAY,m.attributes.TODAY_BUTTON,m.attributes.VIEW,m.attributes.YEAR,m.attributes.YEAR_RANGE]}constructor(){super(),q.define([s0,fe,C0,r3,Y5]),H(this,Fu,Uu),this._core=new Es(new Vs(this))}connectedCallback(){!this.hasAttribute(m.attributes.POPOVER_CONTEXT)&&Ra(this).some(t=>t.tagName.toLowerCase()==="forge-popover")&&this.setAttribute(m.attributes.POPOVER_CONTEXT,"true"),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case m.attributes.ALLOW_SINGLE_DATE_RANGE:this.allowSingleDateRange=p(a);break;case m.attributes.CLEAR_BUTTON:this.clearButton=p(a);break;case m.attributes.CONSTRAIN_TO_ENABLED:this.constrainToEnabled=p(a);break;case m.attributes.FIRST_DAY_OF_WEEK:this.firstDayOfWeek=W(a);break;case m.attributes.FIXED_HEIGHT:this.fixedHeight=p(a);break;case m.attributes.LIST_YEARS:this.listYears=p(a);break;case m.attributes.LOCALE:this.locale=a;break;case m.attributes.MAX:this.max=a;break;case m.attributes.MENU_ANIMATION:this.menuAnimation=a;break;case m.attributes.MIN:this.min=a;break;case m.attributes.MODE:this.mode=a;break;case m.attributes.MONTH:this.month=W(a);break;case m.attributes.PREVENT_FOCUS:this.preventFocus=p(a);break;case m.attributes.READONLY:this.readonly=p(a);break;case m.attributes.SELECTION_FOLLOWS_MONTH:this.selectionFollowsMonth=p(a);break;case m.attributes.SHOW_HEADER:this.showHeader=p(a);break;case m.attributes.SHOW_OTHER_MONTHS:this.showOtherMonths=p(a);break;case m.attributes.SHOW_TODAY:this.showToday=p(a);break;case m.attributes.TODAY_BUTTON:this.todayButton=p(a);break;case m.attributes.VIEW:this.view=a;break;case m.attributes.YEAR:this.year=W(a);break;case m.attributes.YEAR_RANGE:this.yearRange=a;break}}clear(){this._core.clear()}deselectDate(t){this._core.deselectDate(new Date(t))}goToDate(t,e){this._core.goToDate(new Date(t),e)}handleKey(t){this._core.handleExternalKeyEvent(t)}layout(){this._core.layout()}selectDate(t){this._core.selectDate(new Date(t))}setActiveDate(t,e){return this._core.setActiveDate(new Date(t),e)}today(){this._core.today()}toggleDate(t,e){this._core.toggleDate(new Date(t),e)}};s([v({set:!1})],v1.prototype,"activeDate",2),s([v()],v1.prototype,"allowSingleDateRange",2),s([v()],v1.prototype,"clearButton",2),s([v()],v1.prototype,"clearCallback",2),s([v()],v1.prototype,"constrainToEnabled",2),s([v()],v1.prototype,"dateBuilder",2),s([v()],v1.prototype,"dateSelectCallback",2),s([v()],v1.prototype,"dayBuilder",2),s([v()],v1.prototype,"disabledDateBuilder",2),s([v()],v1.prototype,"disabledDates",2),s([v()],v1.prototype,"disabledDaysOfWeek",2),s([v()],v1.prototype,"eventBuilder",2),s([v()],v1.prototype,"events",2),s([v()],v1.prototype,"firstDayOfWeek",2),s([v()],v1.prototype,"fixedHeight",2),s([v()],v1.prototype,"listYears",2),s([v()],v1.prototype,"locale",2),s([v()],v1.prototype,"max",2),s([v()],v1.prototype,"menuAnimation",2),s([v()],v1.prototype,"min",2),s([v()],v1.prototype,"mode",2),s([v()],v1.prototype,"month",2),s([v()],v1.prototype,"preventFocus",2),s([v()],v1.prototype,"readonly",2),s([v()],v1.prototype,"selectionFollowsMonth",2),s([v()],v1.prototype,"showHeader",2),s([v()],v1.prototype,"showOtherMonths",2),s([v()],v1.prototype,"showToday",2),s([v()],v1.prototype,"todayButton",2),s([v()],v1.prototype,"todayCallback",2),s([v()],v1.prototype,"tooltipBuilder",2),s([v()],v1.prototype,"value",2),s([v()],v1.prototype,"view",2),s([v()],v1.prototype,"weekendDays",2),s([v()],v1.prototype,"year",2),s([v()],v1.prototype,"yearRange",2),v1=s([y({name:m.elementName,dependencies:[V2,Ye,n1,X,p1,r1,Q]})],v1);var Sp=class extends X1{constructor(t){super(t)}_build(){return document.createElement(m.elementName)}onDateSelect(t){this._element.addEventListener(m.events.DATE_SELECT,t)}onFocusChange(t){this._element.addEventListener(m.events.FOCUS_CHANGE,t)}onMonthChange(t){this._element.addEventListener(m.events.MONTH_CHANGE,t)}onViewChange(t){this._element.addEventListener(m.events.VIEW_CHANGE,t)}};var Wu={POPUP:"forge-calendar-dropdown__popup"},kp={classes:Wu};var _o=class{constructor(t,e){this._popupClasses=[];this.targetElement=t,this.id=e}get isOpen(){var t,e;return(e=(t=this.dropdownElement)==null?void 0:t.open)!=null?e:!1}get popupClasses(){return this._popupClasses}set popupClasses(t){this._popupClasses=t?rt(t)?[...t]:[t]:[]}get locale(){var t;return(t=this.calendar)==null?void 0:t.locale}set locale(t){this.calendar&&(this.calendar.locale=t)}async close({force:t=!1}={}){var e;this.dropdownElement&&(t?this.dropdownElement.open=!1:await this.dropdownElement.hideAsync(),(e=this.dropdownElement)==null||e.remove(),this.dropdownElement=void 0,this.calendar=void 0)}destroy(){this.close({force:!0})}open(t){var o,n;this.calendar=this._createCalendar(t),this._announcerElement=Ar(),this._announcerElement.id=`${this.id}-activedescendant`,this.dropdownElement=this._createDropdown(),this.dropdownElement.appendChild(this.calendar),this.dropdownElement.appendChild(this._announcerElement),this.calendar.addEventListener(m.events.FOCUS_CHANGE,i=>{var h;let l=`${this.id}-activedescendent-`;switch(i.detail.type){case"date":l+=at(i.detail.value);break;case"month":l+=`month-${i.detail.value.toString()}`;break;case"year":l+=`year-${i.detail.value.toString()}`;break}(h=this.activeChangeCallback)==null||h.call(this,l),this._announcerElement&&(this._announcerElement.id=l,this._announcerElement.setAttribute("aria-selected",i.detail.selected.toString()),this._announcerElement.textContent=i.detail.text)});let e=(o=this.targetElement.ownerDocument)!=null?o:document;((n=Gr(Z.selectors.HOST,this.targetElement))!=null?n:e.body).appendChild(this.dropdownElement),this.dropdownElement.open=!0}propagateKeyboardEvent(t){var e;(e=this.calendar)==null||e.handleKey(t)}_createCalendar(t){let e=document.createElement(m.elementName);return Object.assign(e,t),e}_createDropdown(){let t=document.createElement("forge-popover");return t.anchorElement=this.targetElement,t.placement="bottom-start",t.persistent=!0,t.classList.add(kp.classes.POPUP),t.id=this.id,t.classList.add(...this._popupClasses),t.addEventListener(Z.events.TOGGLE,()=>{var e;return(e=this.closeCallback)==null?void 0:e.call(this)}),t}};function Op(){x(v1)}var Gu=`${b}card`,Dp={RAISED:"raised"},Yu=w({},Dp),Mr={elementName:Gu,observedAttributes:Dp,attributes:Yu};var Ku='<template><div class="forge-card" part="root"><slot></slot></div></template>',qu=":host{display:block}:host([hidden]){display:none}.forge-card{--_card-background:var(--forge-card-background, var(--forge-theme-surface, #ffffff));--_card-height:var(--forge-card-height, 100%);--_card-width:var(--forge-card-width, 100%);--_card-outline-color:var(--forge-card-outline-color, var(--forge-theme-outline, #e0e0e0));--_card-outline-width:var(--forge-card-outline-width, var(--forge-border-thin, 1px));--_card-outline-style:var(--forge-card-outline-style, solid);--_card-elevation:var(--forge-card-elevation, none);--_card-padding:var(--forge-card-padding, var(--forge-spacing-medium, 16px));--_card-shape:var(--forge-card-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_card-overflow:var(--forge-card-overflow, initial);--_card-raised-elevation:var(--forge-card-raised-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_card-raised-outline-width:var(--forge-card-raised-outline-width, 0)}.forge-card{background:var(--_card-background);border-color:var(--_card-outline-color);border-width:var(--_card-outline-width);border-style:var(--_card-outline-style);border-radius:var(--_card-shape);box-shadow:var(--_card-elevation);box-sizing:border-box;padding:var(--_card-padding);overflow:var(--_card-overflow);height:var(--_card-height);width:var(--_card-width);-webkit-tap-highlight-color:transparent}:host([raised]) .forge-card{--_card-elevation:var(--_card-raised-elevation);--_card-outline-width:var(--_card-raised-outline-width)}:host([no-padding]) .forge-card{--_card-padding:var(--forge-card-padding, 0)}",fo=class extends M{constructor(){super();this._raised=!1;H(this,Ku,qu)}static get observedAttributes(){return Object.values(Mr.observedAttributes)}attributeChangedCallback(e,a,o){switch(e){case Mr.attributes.RAISED:this.raised=p(o);break}}get raised(){return this._raised}set raised(e){e=!!e,this._raised!==e&&(this._raised=e,this.toggleAttribute(Mr.attributes.RAISED,this._raised))}};fo=s([y({name:Mr.elementName})],fo);function Pp(){x(fo)}var $u=`${b}circular-progress`,Xu={DETERMINATE:"determinate",PROGRESS:"progress",THEME:"theme",TRACK:"track"},ju={INDETERMINATE:"forge-circular-progress--indeterminate"},Zu={ROOT:".forge-circular-progress",DETERMINATE_PROGRESS_CIRCLE:".progress",TEMPLATES:"svg, .spinner"},C2={elementName:$u,attributes:Xu,classes:ju,selectors:Zu};var Qu='<svg viewBox="0 0 4800 4800"><circle class="track-background" pathLength="100"></circle></svg><div class="spinner"><div class="left"><div class="circle"></div></div><div class="right"><div class="circle"></div></div></div>',Ju='<svg viewBox="0 0 4800 4800"><circle class="track-background" pathLength="100"></circle><circle class="track" pathLength="100"></circle><circle class="progress" pathLength="100" stroke-dashoffset="100"></circle></svg>',Cs=class extends I{constructor(t){super(t),this._rootElement=g(this._component,C2.selectors.ROOT)}initialize(){this._component[P]({role:"progressbar",ariaValueMin:"0",ariaValueMax:"1"})}setDeterminate(t){this._tryResetTemplate(),this._rootElement.classList.toggle(C2.classes.INDETERMINATE,!t),t?(this._rootElement.insertAdjacentHTML("beforeend",Ju),this._determinateProgressCircleElement=g(this._component,C2.selectors.DETERMINATE_PROGRESS_CIRCLE)):(this._rootElement.insertAdjacentHTML("beforeend",Qu),this._component[P]({ariaValueNow:null}),this._determinateProgressCircleElement=void 0)}setProgress(t){var e;this._component[P]({ariaValueNow:`${t}`}),(e=this._determinateProgressCircleElement)==null||e.setAttribute("stroke-dashoffset",`${(1-t)*100}`)}_tryResetTemplate(){var e;let t=(e=this._component.shadowRoot)==null?void 0:e.querySelectorAll(C2.selectors.TEMPLATES);t==null||t.forEach(a=>a.remove())}};var zs=class{constructor(t){this._adapter=t;this._determinate=!1;this._progress=0;this._theme="primary";this._track=!1}initialize(){this._adapter.tryApplyGlobalConfiguration(["track"]),this._adapter.initialize(),this._applyDeterminate()}_applyDeterminate(){this._adapter.setDeterminate(this._determinate),this._determinate&&this._adapter.setProgress(this._progress)}get determinate(){return this._determinate}set determinate(t){t=!!t,this._determinate!==t&&(this._determinate=t,this._applyDeterminate(),this._adapter.toggleHostAttribute(C2.attributes.DETERMINATE,this._determinate))}get progress(){return this._progress}set progress(t){isNaN(t)&&(t=0),this._progress!==t&&(this._progress=t,this._determinate&&this._adapter.setProgress(this._progress),this._adapter.setHostAttribute(C2.attributes.PROGRESS,`${this._progress}`))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.toggleHostAttribute(C2.attributes.THEME,!!this._theme,this._theme))}get track(){return this._track}set track(t){t=!!t,this._track!==t&&(this._track=t,this._adapter.toggleHostAttribute(C2.attributes.TRACK,this._track))}};var t_='<template><div class="forge-circular-progress" part="progressbar"><slot class="center-content"></slot></div></template>',e_=":host{--_circular-progress-size:var(--forge-circular-progress-size, 48px)}:host{display:inline-flex;vertical-align:middle;block-size:var(--_circular-progress-size);inline-size:var(--_circular-progress-size);position:relative;align-items:center;justify-content:center;transition:background-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);contain:strict;content-visibility:auto}:host([hidden]){display:none}.forge-circular-progress{--_circular-progress-padding:var(--forge-circular-progress-padding, 0);--_circular-progress-track-width:var(--forge-circular-progress-track-width, 12);--_circular-progress-track-color:var(--forge-circular-progress-track-color, transparent);--_circular-progress-track-fill-color:var(--forge-circular-progress-track-fill-color, var(--forge-theme-tertiary-container, #d0d7ff));--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_circular-progress-arc-duration:var(--forge-circular-progress-arc-duration, 1333ms);--_circular-progress-theme-transition-duration:var(--forge-circular-progress-theme-transition-duration, var(--forge-animation-duration-short3, 150ms));--_circular-progress-theme-transition-timing:var(--forge-circular-progress-theme-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-circular-progress{flex:1;align-self:stretch;margin:var(--_circular-progress-padding)}.forge-circular-progress--indeterminate{will-change:transform;animation:linear infinite linear-rotate;animation-duration:calc(var(--_circular-progress-arc-duration) * 360 / 306)}.circle,.forge-circular-progress,.left,.right,.spinner,svg{position:absolute;inset:0}.center-content{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.left{overflow:hidden;inset:0 50% 0 0}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:calc(-.5 * var(--_circular-progress-arc-duration)),0s}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_circular-progress-size) * var(--_circular-progress-track-width)/ 100);border-color:var(--_circular-progress-indicator-color) var(--_circular-progress-indicator-color) transparent transparent;transition:border-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);will-change:transform;animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:var(--_circular-progress-arc-duration),calc(4 * var(--_circular-progress-arc-duration));animation-timing-function:cubic-bezier(0.4,0,0.2,1)}svg{transform:rotate(-90deg)}svg circle{cx:50%;cy:50%;r:calc(50% * (1 - var(--_circular-progress-track-width)/ 100));stroke-width:calc(var(--_circular-progress-track-width) * 1%);stroke-dasharray:100;fill:transparent}.progress{transition:stroke-dashoffset .5s cubic-bezier(0, 0, .2, 1),stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-indicator-color)}.track{stroke:transparent}.track-background{transition:stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-track-color)}.spinner{will-change:transform;animation:infinite both rotate-arc;animation-duration:calc(4 * var(--_circular-progress-arc-duration));animation-timing-function:cubic-bezier(0.4,0,0.2,1)}:host(:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--_circular-progress-track-fill-color)}:host([theme=primary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-primary, #3f51b5))}:host([theme=primary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-secondary, #ffc107))}:host([theme=secondary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-secondary-container, #fff0c3))}:host([theme=success]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-success, #2e7d32))}:host([theme=success]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=error]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-error, #b00020))}:host([theme=error]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=warning]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-warning, #d14900))}:host([theme=warning]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-warning-container, #f4d3c2))}:host([theme=info]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-info, #1565c0))}:host([theme=info]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-info-container, #c7daf0))}@media screen and (forced-colors:active){.progress{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}",Tt=class extends L1(H1(M)){static get observedAttributes(){return[C2.attributes.DETERMINATE,C2.attributes.PROGRESS,C2.attributes.THEME,C2.attributes.TRACK]}constructor(){super(),H(this,t_,e_),this._core=new zs(new Cs(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case C2.attributes.DETERMINATE:this.determinate=p(a);break;case C2.attributes.PROGRESS:this.progress=W(a);break;case C2.attributes.THEME:this.theme=a;break;case C2.attributes.TRACK:this.track=p(a);break}}};s([v()],Tt.prototype,"determinate",2),s([v()],Tt.prototype,"progress",2),s([v()],Tt.prototype,"theme",2),s([v()],Tt.prototype,"track",2),Tt=s([y({name:C2.elementName})],Tt);function Np(){x(Tt)}var Rp=`${b}color-picker`,a_={VALUE:"value",ALLOW_OPACITY:"allow-opacity",DEBOUNCE_CHANGE_EVENT:"debounce-change-event"},o_={SLIDER_THUMB_ACTIVE:"forge-color-picker__slider-thumb--active",GRADIENT_THUMB_ACTIVE:"forge-color-picker__gradient-thumb--active"},r_={GRADIENT:".forge-color-picker__gradient",GRADIENT_THUMB:".forge-color-picker__gradient-thumb",PREVIEW_COLOR:".forge-color-picker__color-preview",HEX_INPUT:"#forge-color-picker-hex-input",RGBA_INPUT:"#forge-color-picker-rgba-input",HSVA_INPUT:"#forge-color-picker-hsva-input",HUE_SLIDER:".forge-color-picker__hue-slider",HUE_SLIDER_THUMB:"#forge-color-picker-hue-thumb",OPACITY_SLIDER:".forge-color-picker__opacity-slider",OPACITY_SLIDER_THUMB:"#forge-color-picker-opacity-thumb",SLIDER:".forge-color-picker__slider",SLIDER_THUMB:".forge-color-picker__slider-thumb",COLOR_VALUE_HEX_CONTAINER:".forge-color-picker__color-hex",COLOR_VALUE_RGBA_CONTAINER:".forge-color-picker__color-rgba",COLOR_VALUE_HSVA_CONTAINER:".forge-color-picker__color-hsva",TYPE_BUTTON:"#forge-color-picker-type-button",COLOR_VALUE_RGBA_R:"#forge-color-picker-rgba-r-input",COLOR_VALUE_RGBA_G:"#forge-color-picker-rgba-g-input",COLOR_VALUE_RGBA_B:"#forge-color-picker-rgba-b-input",COLOR_VALUE_RGBA_A:"#forge-color-picker-rgba-a-input",COLOR_VALUE_HSVA_H:"#forge-color-picker-hsva-h-input",COLOR_VALUE_HSVA_S:"#forge-color-picker-hsva-s-input",COLOR_VALUE_HSVA_V:"#forge-color-picker-hsva-v-input",COLOR_VALUE_HSVA_A:"#forge-color-picker-hsva-a-input"},n_={CHANGE:`${Rp}-change`},i_={CHANGE_EVENT_DEBOUNCE_THRESHOLD:200},g1={elementName:Rp,attributes:a_,events:n_,classes:o_,selectors:r_,numbers:i_},X4="000000",j4=(n=>(n.HEX="hex",n.RGB="rgb",n.RGBA="rgba",n.HSV="hsv",n.HSVA="hsva",n))(j4||{});var As=class extends I{constructor(t){super(t),this._gradientElement=g(t,g1.selectors.GRADIENT),this._previewColorElement=g(t,g1.selectors.PREVIEW_COLOR),this._hexInputElement=g(t,g1.selectors.HEX_INPUT),this._rgbaInputRElement=g(t,g1.selectors.COLOR_VALUE_RGBA_R),this._rgbaInputGElement=g(t,g1.selectors.COLOR_VALUE_RGBA_G),this._rgbaInputBElement=g(t,g1.selectors.COLOR_VALUE_RGBA_B),this._rgbaInputAElement=g(t,g1.selectors.COLOR_VALUE_RGBA_A),this._hsvaInputHElement=g(t,g1.selectors.COLOR_VALUE_HSVA_H),this._hsvaInputSElement=g(t,g1.selectors.COLOR_VALUE_HSVA_S),this._hsvaInputVElement=g(t,g1.selectors.COLOR_VALUE_HSVA_V),this._hsvaInputAElement=g(t,g1.selectors.COLOR_VALUE_HSVA_A),this._hueSliderElement=g(t,g1.selectors.HUE_SLIDER),this._hueSliderThumbElement=g(t,g1.selectors.HUE_SLIDER_THUMB),this._opacitySliderElement=g(t,g1.selectors.OPACITY_SLIDER),this._opacitySliderThumbElement=g(t,g1.selectors.OPACITY_SLIDER_THUMB),this._hexValueContainerElement=g(t,g1.selectors.COLOR_VALUE_HEX_CONTAINER),this._rgbaValueContainerElement=g(t,g1.selectors.COLOR_VALUE_RGBA_CONTAINER),this._hsvaValueContainerElement=g(t,g1.selectors.COLOR_VALUE_HSVA_CONTAINER),this._typeButtonElement=g(t,g1.selectors.TYPE_BUTTON)}setPreviewColor(t){this._previewColorElement.style.backgroundColor=t}setHexInputValue(t){this._hexInputElement.value=t}setRgbaInputValue(t){this._rgbaInputRElement.value=t.r.toString(),this._rgbaInputGElement.value=t.g.toString(),this._rgbaInputBElement.value=t.b.toString(),this._rgbaInputAElement.value=t.a.toString()}setHsvaInputValue(t){this._hsvaInputHElement.value=t.h.toString(),this._hsvaInputSElement.value=t.s.toString(),this._hsvaInputVElement.value=t.v.toString(),this._hsvaInputAElement.value=t.a.toString()}updateA11y(t,e){this._hueSliderThumbElement.setAttribute("aria-valuenow",t.toString()),this._hueSliderThumbElement.setAttribute("aria-valuetext",t.toString()),this._opacitySliderThumbElement.setAttribute("aria-valuenow",e.toString()),this._opacitySliderThumbElement.setAttribute("aria-valuetext",e.toString())}setGradientColor(t){this._gradientElement.style.backgroundColor=t}getHueSliderElement(){return this._hueSliderElement}getOpacitySliderElement(){return this._opacitySliderElement}getGradientElement(){return this._gradientElement}setActiveValueType(t){switch(this._hexValueContainerElement.style.display="none",this._rgbaValueContainerElement.style.display="none",this._hsvaValueContainerElement.style.display="none",t){case"hex":this._hexValueContainerElement.style.removeProperty("display");break;case"rgba":this._rgbaValueContainerElement.style.removeProperty("display");break;case"hsva":this._hsvaValueContainerElement.style.removeProperty("display");break}}focusValueInput(t){switch(t){case"hex":this._hexInputElement.focus(),this._hexInputElement.select();break;case"rgba":this._rgbaInputRElement.focus(),this._rgbaInputRElement.select();break;case"hsva":this._hsvaInputHElement.focus(),this._hsvaInputHElement.select();break}}setTypeClickListener(t){this._typeButtonElement.addEventListener("click",t)}removeTypeClickListener(t){this._typeButtonElement.removeEventListener("click",t)}setHexInputListener(t,e){this._hexInputElement.addEventListener(t,e)}removeHexInputListener(t,e){this._hexInputElement.removeEventListener(t,e)}getHexInputValue(){return this._hexInputElement.value}setRgbaInputListener(t,e){this._rgbaInputRElement.addEventListener(t,e),this._rgbaInputGElement.addEventListener(t,e),this._rgbaInputBElement.addEventListener(t,e),this._rgbaInputAElement.addEventListener(t,e)}removeRgbaInputListener(t,e){this._rgbaInputRElement.removeEventListener(t,e),this._rgbaInputGElement.removeEventListener(t,e),this._rgbaInputBElement.removeEventListener(t,e),this._rgbaInputAElement.removeEventListener(t,e)}getRgbaInputValue(){return{r:parseInt(this._rgbaInputRElement.value,10),g:parseInt(this._rgbaInputGElement.value,10),b:parseInt(this._rgbaInputBElement.value,10),a:parseFloat(this._rgbaInputAElement.value)}}setHsvaInputListener(t,e){this._hsvaInputHElement.addEventListener(t,e),this._hsvaInputSElement.addEventListener(t,e),this._hsvaInputVElement.addEventListener(t,e),this._hsvaInputAElement.addEventListener(t,e)}removeHsvaInputListener(t,e){this._hsvaInputHElement.removeEventListener(t,e),this._hsvaInputSElement.removeEventListener(t,e),this._hsvaInputVElement.removeEventListener(t,e),this._hsvaInputAElement.removeEventListener(t,e)}getHsvaInputValue(){return{h:parseInt(this._hsvaInputHElement.value,10),s:parseInt(this._hsvaInputSElement.value,10),v:parseInt(this._hsvaInputVElement.value,10),a:parseFloat(this._hsvaInputAElement.value)}}toggleOpacityControls(t){t?(this._opacitySliderElement.style.removeProperty("display"),this._rgbaInputAElement.parentElement&&this._rgbaInputAElement.parentElement.style.removeProperty("display"),this._hsvaInputAElement.parentElement&&this._hsvaInputAElement.parentElement.style.removeProperty("display")):(this._opacitySliderElement.style.display="none",this._rgbaInputAElement.parentElement&&(this._rgbaInputAElement.parentElement.style.display="none"),this._hsvaInputAElement.parentElement&&(this._hsvaInputAElement.parentElement.style.display="none"))}};function Bs(r,t,e){let a=e.getBoundingClientRect(),o=r-a.left,n=t-a.top;return o>a.width?o=a.width:o<0&&(o=0),n>a.height?n=a.height:n<0&&(n=0),{x:o,y:n,height:a.height,width:a.width}}function Hr(r){let t,e,a,o=r.h/60,n=r.s/100,i=r.v/100;if(n===0)return t=e=a=i,{r:Math.round(t*255),g:Math.round(e*255),b:Math.round(a*255),a:r.a};let l=Math.floor(o),h=o-l,c=i*(1-n),d=i*(1-n*h),u=i*(1-n*(1-h));switch(l){case 0:t=i,e=u,a=c;break;case 1:t=d,e=i,a=c;break;case 2:t=c,e=i,a=u;break;case 3:t=c,e=d,a=i;break;case 4:t=u,e=c,a=i;break;default:t=i,e=c,a=d}return{r:Math.round(t*255),g:Math.round(e*255),b:Math.round(a*255),a:r.a}}function xo(r){return Z4(r.r)+Z4(r.g)+Z4(r.b)+(Math.round(r.a*255)+65536).toString(16).substr(-2)}function Z4(r){return("0"+r.toString(16)).slice(-2)}function Fp(r){let t=r.length===3||r.length===4,e=t?`${r.slice(0,1)}${r.slice(0,1)}`:r.slice(0,2),a=t?`${r.slice(1,2)}${r.slice(1,2)}`:r.slice(2,4),o=t?`${r.slice(2,3)}${r.slice(2,3)}`:r.slice(4,6),n=(t?`${r.slice(3,4)}${r.slice(3,4)}`:r.slice(6,8))||"ff";return{r:parseInt(e,16),g:parseInt(a,16),b:parseInt(o,16),a:parseFloat((parseInt(n,16)/255).toFixed(2))}}function Up(r){return`rgba(${r.r}, ${r.g}, ${r.b}, ${r.a})`}function Q4(r,t){let e=r.replace(/^#/,"");return t||(e.length===4?e=e.substring(0,3):e.length===8&&(e=e.substring(0,6))),`#${e}`}function Wp(r){let t=r.r/255,e=r.g/255,a=r.b/255,o=Math.max(t,e,a),n=Math.min(t,e,a),i=o,l=o,h=o,c=o-n;if(l=o===0?0:c/o,o===n)i=0;else{switch(o){case t:i=(e-a)/c+(e<a?6:0);break;case e:i=(a-t)/c+2;break;case a:i=(t-e)/c+4;break}i/=6}return{h:Math.round(i*360),s:Math.round(l*100),v:Math.round(h*100),a:r.a}}function J4(r){if(!r||typeof r!="string")return!1;switch(r.substring(0,1)==="#"&&(r=r.substring(1)),r.length){case 3:return/^[0-9A-F]{3}$/i.test(r);case 4:return/^[0-9A-F]{4}$/i.test(r);case 6:return/^[0-9A-F]{6}$/i.test(r);case 8:return/^[0-9A-F]{8}$/i.test(r);default:return!1}}function t5(r){return z2(r.r)&&r.r>=0&&r.r<=255&&z2(r.g)&&r.g>=0&&r.g<=255&&z2(r.b)&&r.b>=0&&r.b<=255&&z2(r.a)&&r.a>=0&&r.a<=1}function e5(r){return z2(r.h)&&r.h>=0&&r.h<=360&&z2(r.s)&&r.s>=0&&r.s<=100&&z2(r.v)&&r.v>=0&&r.v<=100&&z2(r.a)&&r.a>=0&&r.a<=1}var Ts=class{constructor(t,e){this._rootElement=t;this._changeListener=e;this._keydownListener=a=>this._onKeydown(a),this._downListener=a=>this._onDown(a),this._moveListener=a=>this._onMove(a),this._upListener=a=>this._onUp(a),this._initialize()}destroy(){this._unlisten()}setValue(t,e){window.requestAnimationFrame(()=>{let a=this._rootElement.getBoundingClientRect();this._xPercent=Math.round(a.width*(t/100)),this._yPercent=a.height-Math.round(a.height*(e/100)),this._setThumbPosition(this._xPercent,this._yPercent)})}_initialize(){this._thumbElement=this._rootElement.querySelector(g1.selectors.GRADIENT_THUMB),this._listen(),this._setThumbPosition(this._xPercent,this._yPercent)}_listen(){this._rootElement.addEventListener("keydown",this._keydownListener),this._rootElement.addEventListener("mousedown",this._downListener),this._rootElement.addEventListener("touchstart",this._downListener)}_unlisten(){this._rootElement.removeEventListener("keydown",this._keydownListener),this._rootElement.removeEventListener("mousedown",this._downListener),this._rootElement.removeEventListener("touchstart",this._downListener),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener)}_onKeydown(t){let e=t.key==="Enter"||t.keyCode===13,a=t.key==="ArrowLeft"||t.keyCode===37,o=t.key==="ArrowUp"||t.keyCode===38,n=t.key==="ArrowRight"||t.keyCode===39,i=t.key==="ArrowDown"||t.keyCode===40,l=this._rootElement.getBoundingClientRect();if(i)t.preventDefault(),this._yPercent++;else if(o)t.preventDefault(),this._yPercent--;else if(a)t.preventDefault(),this._xPercent--;else if(n)t.preventDefault(),this._xPercent++;else if(e)t.preventDefault();else return;this._xPercent>l.width?this._xPercent=l.width:this._xPercent<0&&(this._xPercent=0),this._yPercent>l.height?this._yPercent=l.height:this._yPercent<0&&(this._yPercent=0),this._setThumbPosition(this._xPercent,this._yPercent),this._notify()}_onDown(t){t.preventDefault(),document.addEventListener("mousemove",this._moveListener),document.addEventListener("touchmove",this._moveListener),document.addEventListener("mouseup",this._upListener),document.addEventListener("touchend",this._upListener),this._updateThumbPosition(t)}_onMove(t){t.preventDefault(),this._updateThumbPosition(t)}_onUp(t){document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener),this._updateThumbPosition(t),this._thumbElement.focus()}_updateThumbPosition(t){let e=/^mouse/.test(t.type),a=e?t.clientX:t.changedTouches[0].clientX,o=e?t.clientY:t.changedTouches[0].clientY,n=this._calculateSliderPercent(a,o);this._setThumbPosition(n.x,n.y),this._xPercent=parseInt((n.x/n.width*100).toString(),10),this._yPercent=Math.abs(parseInt((n.y/n.height*100).toString(),10)-100),this._notify()}_calculateSliderPercent(t,e){return Bs(t,e,this._rootElement)}_setThumbPosition(t,e){this._thumbElement.style.left=`${t}px`,this._thumbElement.style.top=`${e}px`}_notify(){typeof this._changeListener=="function"&&this._changeListener(this._xPercent,this._yPercent)}};var Lr=class{constructor(t,e){this._rootElement=t;this._changeListener=e;this._percent=1;this._min=0;this._max=1;this._step=.01;this._keydownListener=a=>this._onKeydown(a),this._downListener=a=>this._onDown(a),this._moveListener=a=>this._onMove(a),this._upListener=a=>this._onUp(a),this._initialize()}destroy(){this._unlisten()}setValue(t){this._percent=t,this._setThumbPosition(this._percent)}_initialize(){this._thumbElement=this._rootElement.querySelector(g1.selectors.SLIDER_THUMB),this._listen(),this._setThumbPosition(this._percent)}_listen(){this._thumbElement.addEventListener("keydown",this._keydownListener),this._rootElement.addEventListener("mousedown",this._downListener),this._rootElement.addEventListener("touchstart",this._downListener)}_unlisten(){this._thumbElement.removeEventListener("keydown",this._keydownListener),this._rootElement.removeEventListener("mousedown",this._downListener),this._rootElement.removeEventListener("touchstart",this._downListener),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener)}_onKeydown(t){let e=t.key==="ArrowLeft"||t.keyCode===37,a=t.key==="ArrowRight"||t.keyCode===39,o=t.key==="Home"||t.keyCode===36,n=t.key==="End"||t.keyCode===35;e?(t.preventDefault(),this._percent-=this._step):a?(t.preventDefault(),this._percent+=this._step):o?(t.preventDefault(),this._percent=this._min):n&&(t.preventDefault(),this._percent=this._max),this._percent<this._min?this._percent=this._min:this._percent>this._max&&(this._percent=this._max),this._setThumbPosition(this._percent),this._notify()}_onDown(t){t.preventDefault(),document.addEventListener("mousemove",this._moveListener),document.addEventListener("touchmove",this._moveListener),document.addEventListener("mouseup",this._upListener),document.addEventListener("touchend",this._upListener),this._updateThumbPosition(t)}_onMove(t){t.preventDefault(),this._thumbElement.classList.add(g1.classes.SLIDER_THUMB_ACTIVE),this._updateThumbPosition(t)}_onUp(t){this._thumbElement.classList.remove(g1.classes.SLIDER_THUMB_ACTIVE),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener),this._updateThumbPosition(t),this._thumbElement.focus()}_updateThumbPosition(t){let e=/^mouse/.test(t.type)?t.clientX:t.changedTouches[0].clientX;this._percent=this._calculateSliderPercent(e),this._setThumbPosition(this._percent),this._notify()}_calculateSliderPercent(t){let e=Bs(t,0,this._rootElement);return parseFloat((e.x/e.width).toFixed(2))}_setThumbPosition(t){this._thumbElement.style.left=`${t*100}%`}_notify(){typeof this._changeListener=="function"&&this._changeListener(this._percent)}};var Ss=class{constructor(t){this._adapter=t;this._value=null;this._allowOpacity=!0;this._hex=X4;this._hsva={h:0,s:0,v:0,a:1};this._rgba={r:0,g:0,b:0,a:1};this._debounceChangeEvent=!1;this._valueType="hex";this._initialized=!1;this._gradientSliderChangedListener=(e,a)=>this._onGradientSliderChanged(e,a),this._hueSliderChangedListener=e=>this._onHueSliderChanged(e),this._opacitySliderChangedListener=e=>this._onOpacitySliderChanged(e),this._typeClickListener=e=>this._onTypeClicked(e),this._hexInputChangedListener=e=>this._onHexInputChanged(),this._rgbaInputChangedListener=e=>this._onRgbaInputChanged(),this._hsvaInputChangedListener=e=>this._onHsvaInputChanged()}initialize(){this._initialized=!0,this._applyChangeEventTrigger(),this._adapter.setTypeClickListener(this._typeClickListener),this._adapter.setHexInputListener("input",this._hexInputChangedListener),this._adapter.setRgbaInputListener("input",this._rgbaInputChangedListener),this._adapter.setHsvaInputListener("input",this._hsvaInputChangedListener),this._gradientSlider=new Ts(this._adapter.getGradientElement(),this._gradientSliderChangedListener),this._hueSlider=new Lr(this._adapter.getHueSliderElement(),this._hueSliderChangedListener),this._opacitySlider=new Lr(this._adapter.getOpacitySliderElement(),this._opacitySliderChangedListener),this._initializeOpacity(),this._setColorFromHex(),this._adapter.setActiveValueType(this._valueType)}destroy(){this._adapter.removeTypeClickListener(this._typeClickListener),this._adapter.removeHexInputListener("input",this._hexInputChangedListener),this._adapter.removeRgbaInputListener("input",this._hexInputChangedListener),this._adapter.removeHsvaInputListener("input",this._hexInputChangedListener),this._gradientSlider.destroy(),this._hueSlider.destroy(),this._opacitySlider.destroy(),this._initialized=!1}_applyChangeEventTrigger(){this._debounceChangeEvent?this._triggerChangeEvent=Ae((t,e)=>{this._emitChangeEvent(t,e)},g1.numbers.CHANGE_EVENT_DEBOUNCE_THRESHOLD,!1):this._triggerChangeEvent=(t,e)=>this._emitChangeEvent(t,e)}_initializeOpacity(){this._hsva.a=1,this._adapter.toggleOpacityControls(this._allowOpacity),this._render()}_onTypeClicked(t){this._valueType==="hex"?this._valueType="rgba":this._valueType==="rgba"?this._valueType="hsva":this._valueType==="hsva"&&(this._valueType="hex"),this._adapter.setActiveValueType(this._valueType),this._adapter.focusValueInput(this._valueType)}_onHexInputChanged(){let t=this._adapter.getHexInputValue();J4(t)&&(this.value=t,this._triggerChangeEvent("input","hex"))}_onRgbaInputChanged(){let t=this._adapter.getRgbaInputValue();t5(t)&&(this.value=xo(t),this._triggerChangeEvent("input","rgba"))}_onHsvaInputChanged(){let t=this._adapter.getHsvaInputValue();e5(t)&&(this.value=xo(Hr(t)),this._triggerChangeEvent("input","hsva"))}_setColorFromHex(){this._rgba=Fp(this._hex),this._hsva=Wp(this._rgba),this._initialized&&(this._gradientSlider.setValue(this._hsva.s,this._hsva.v),this._hueSlider.setValue(parseFloat((this._hsva.h/360).toFixed(2))),this._opacitySlider.setValue(this._hsva.a),this._render())}_onGradientSliderChanged(t,e){this._hsva.s=t,this._hsva.v=e,this._syncColors(),this._render(),this._triggerChangeEvent("slider","gradient")}_onHueSliderChanged(t){this._hsva.h=parseInt((360*t).toString(),10),this._syncColors(),this._setGradientColor(),this._render(),this._triggerChangeEvent("slider","hue")}_onOpacitySliderChanged(t){this._hsva.a=t,this._syncColors(),this._render(),this._triggerChangeEvent("slider","opacity")}_setGradientColor(){let t=Hr({h:this._hsva.h,s:100,v:100,a:1});this._adapter.setGradientColor(`rgb(${t.r}, ${t.g}, ${t.b})`)}_syncColors(){this._rgba=Hr(this._hsva),this._hex=xo(this._rgba),this._value=this._hex||null}_render(){this._setGradientColor(),this._adapter.setPreviewColor(Up(this._rgba)),this._adapter.setHexInputValue(`#${this._hex}`),this._adapter.setRgbaInputValue(this._rgba),this._adapter.setHsvaInputValue(this._hsva),this._adapter.updateA11y(this._hsva.h,Math.round(this._hsva.a*100))}_emitChangeEvent(t,e){let a={type:t,source:e,hex:Q4(this._hex,!1).replace(/^#/,""),rgba:this._rgba,hsva:this._hsva};this._allowOpacity&&(a.alpha=this._hsva.a),this._adapter.emitHostEvent(g1.events.CHANGE,a)}get value(){return Q4(this._hex,!1)}set value(t){if(this._value!==t){if(this._value=t||X4,!J4(this._value))throw new Error("Invalid hex value provided.");this._hex=this._value.replace(/^#/,""),this._setColorFromHex(),this._adapter.setHostAttribute(g1.attributes.VALUE,this._value)}}get rgba(){return this._rgba?w({},this._rgba):null}set rgba(t){t?t5(t)&&(this.value=xo(t)):this.value=null}get hsva(){return this._hsva?w({},this._hsva):null}set hsva(t){t?e5(t)&&(this.value=xo(Hr(t))):this.value=null}get opacity(){return this._hsva?this._hsva.a:null}set opacity(t){this._hsva.a!==t&&t!=null&&this._allowOpacity&&(t>=0&&t<=1?(this._hsva.a=t,this._syncColors(),this._initialized&&(this._opacitySlider.setValue(this._hsva.a),this._render())):console.warn(`The provided opacity value (${t}) must be between 0 and 1.`))}get allowOpacity(){return this._allowOpacity}set allowOpacity(t){this._allowOpacity=t,this._initialized&&this._initializeOpacity()}get debounceChangeEvent(){return this._debounceChangeEvent}set debounceChangeEvent(t){this._debounceChangeEvent!==t&&(this._debounceChangeEvent=t,this._initialized&&this._applyChangeEventTrigger())}};var s_='<template><div class="forge-color-picker" part="root"><input type="color" tabindex="-1" class="forge-color-picker__input" spellcheck="false" autocomplete="off" aria-label="Color picker value" part="input"><div class="forge-color-picker__container" part="container"><div class="forge-color-picker__gradient" tabindex="0" part="gradient"><div class="forge-color-picker__gradient-color" part="gradient-color"></div><div class="forge-color-picker__gradient-thumb" part="gradient-thumb"></div></div><div class="forge-color-picker__control-preview" part="controls-preview-container"><div class="forge-color-picker__controls" part="controls-container"><div class="forge-color-picker__slider-control" part="hue-control-container"><div class="forge-color-picker__slider forge-color-picker__hue-slider" part="hue-control-slider"><div class="forge-color-picker__slider-thumb" id="forge-color-picker-hue-thumb" part="hue-control-slider-thumb" tabindex="0" role="slider" aria-label="Change hue" aria-valuemin="0" aria-valuemax="360" aria-valuenow="0" aria-orientation="horizontal" aria-valuetext="0"></div></div></div><div class="forge-color-picker__slider-control" part="opacity-control-container"><div class="forge-color-picker__canvas" part="opacity-control-canvas"><div class="forge-color-picker__slider forge-color-picker__opacity-slider" part="opacity-control-slider"><div class="forge-color-picker__slider-thumb" id="forge-color-picker-opacity-thumb" part="opacity-control-slider-thumb" tabindex="0" role="slider" aria-label="Change opacity" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-orientation="horizontal" aria-valuetext="0"></div></div></div></div></div><div class="forge-color-picker__color-preview-container forge-color-picker__canvas" part="color-preview-container"><div class="forge-color-picker__color-preview" part="color-preview"></div></div></div><div class="forge-color-picker__value" part="value-container"><div class="forge-color-picker__color-types" part="types-container"><div class="forge-color-picker__color-hex" part="hex-type-container"><div part="hex-type-label-wrapper"><label for="forge-color-picker-hex-input" part="hex-label">HEX</label></div><input type="text" id="forge-color-picker-hex-input" part="hex-input" style="width: 88px" maxlength="9" spellcheck="false" autocomplete="off" aria-label="HEX value"></div><div class="forge-color-picker__color-rgba" part="rgba-type-container"><div part="rgba-type-wrapper-r"><label for="forge-color-picker-rgba-r-input" part="rgba-type-label-r">R</label> <input type="number" id="forge-color-picker-rgba-r-input" part="rgba-type-input-r" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Red"></div><div part="rgba-type-wrapper-g"><label for="forge-color-picker-rgba-g-input" part="rgba-type-label-g">G</label> <input type="number" id="forge-color-picker-rgba-g-input" part="rgba-type-input-g" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Green"></div><div part="rgba-type-wrapper-b"><label for="forge-color-picker-rgba-b-input" part="rgba-type-label-b">B</label> <input type="number" id="forge-color-picker-rgba-b-input" part="rgba-type-input-b" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Blue"></div><div part="rgba-type-wrapper-a"><label for="forge-color-picker-rgba-a-input" part="rgba-type-label-a">A</label> <input type="number" id="forge-color-picker-rgba-a-input" part="rgba-type-input-a" min="0" max="1" step="0.1" maxlength="3" autocomplete="off" aria-label="Alpha"></div></div><div class="forge-color-picker__color-hsva" part="hsva-type-container"><div part="hsva-type-wrapper-h"><label for="forge-color-picker-hsva-h-input" part="hsva-type-label-h">H</label> <input type="number" id="forge-color-picker-hsva-h-input" part="hsva-type-input-h" min="0" max="360" maxlength="3" autocomplete="off" aria-label="Hue"></div><div part="hsva-type-wrapper-s"><label for="forge-color-picker-hsva-s-input" part="hsva-type-label-s">S</label> <input type="number" id="forge-color-picker-hsva-s-input" part="hsva-type-input-s" min="0" max="100" maxlength="3" autocomplete="off" aria-label="Saturation"></div><div part="hsva-type-wrapper-v"><label for="forge-color-picker-hsva-v-input" part="hsva-type-label-v">V</label> <input type="number" id="forge-color-picker-hsva-v-input" part="hsva-type-input-v" min="0" max="100" maxlength="3" autocomplete="off" aria-label="Value"></div><div part="hsva-type-wrapper-a"><label for="forge-color-picker-hsva-a-input" part="hsva-type-label-a">A</label> <input type="number" id="forge-color-picker-hsva-a-input" part="hsva-type-input-a" min="0" max="1" step="0.1" maxlength="3" autocomplete="off" aria-label="Alpha"></div></div></div><div class="forge-color-picker__type-button" part="type-container"><forge-icon-button part="type-button" id="forge-color-picker-type-button" aria-labelledby="type-button-tooltip" part="type-button-element"><forge-icon name="unfold_more" part="type-button-icon"></forge-icon></forge-icon-button><forge-tooltip placement="bottom" id="type-button-tooltip">Change color format</forge-tooltip></div></div></div></div></template>',l_='*{box-sizing:border-box}.forge-color-picker{width:var(--forge-color-picker-width,272px);position:relative;display:inline-block;overflow:hidden}.forge-color-picker__input{height:1px;opacity:0;position:absolute;width:1px}.forge-color-picker__gradient{position:relative;outline:0}.forge-color-picker__gradient-color{background:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);height:152px}.forge-color-picker__gradient-thumb{border:1px solid #fff;border-radius:50%;cursor:pointer;display:inline-block;height:10px;width:10px;margin-left:-5px;margin-top:-5px;position:absolute;touch-action:none;user-select:none;transition:left .2s cubic-bezier(.25, .8, .25, 1) 0s,top .2s cubic-bezier(.25, .8, .25, 1) 0s}.forge-color-picker__control-preview{display:flex;align-items:center;width:100%;padding:16px}.forge-color-picker__controls{flex:1;margin-right:16px}.forge-color-picker__slider{position:relative}.forge-color-picker__slider-thumb{outline:0;height:16px;width:16px;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);position:absolute;border-radius:50%;top:calc(50% - 8px);margin-left:-8px;transition:left .4s cubic-bezier(.25, .8, .25, 1)}.forge-color-picker__slider-thumb--active{transition:none}.forge-color-picker__slider-thumb:hover{cursor:pointer}.forge-color-picker__color-preview-container{border-radius:50%;box-shadow:0 0 2px 0 rgba(0,0,0,.54) inset,0 0 2px 0 rgba(0,0,0,.54);overflow:hidden}.forge-color-picker__color-preview{height:32px;width:32px;transition:background-color .2s cubic-bezier(.25, .8, .25, 1)}.forge-color-picker__value{display:flex;width:100%;align-items:center;padding:0 8px 16px 16px;font-size:12px}.forge-color-picker__color-types{flex:1}.forge-color-picker__color-types label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);color:var(--forge-theme-text-medium,rgba(0,0,0,.6))}.forge-color-picker__color-types input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-color-picker__color-types input[type=number],.forge-color-picker__color-types input[type=text]{border-color:var(--forge-theme-outline,#e0e0e0);color:var(--forge-theme-on-surface,#000);background-color:transparent;padding:4px 8px;border-width:1px;border-style:solid;border-radius:4px;box-sizing:border-box;outline:0;transition-property:box-shadow,border-colo;transition-duration:var(--forge-animation-duration-short4, 200ms);transition-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}.forge-color-picker__color-types input[type=number]:hover,.forge-color-picker__color-types input[type=text]:hover{border-color:var(--forge-theme-text-high,rgba(0,0,0,.87))}.forge-color-picker__color-types input[type=number]:focus,.forge-color-picker__color-types input[type=text]:focus{border-color:var(--forge-theme-primary,#3f51b5);box-shadow:0 0 0 1px inset var(--forge-theme-primary,#3f51b5)}.forge-color-picker__color-types input[type=number]{text-align:center;-moz-appearance:textfield}.forge-color-picker__color-types input[type=number]::-webkit-inner-spin-button,.forge-color-picker__color-types input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}.forge-color-picker__color-hex{display:flex;flex-direction:column;justify-content:center;align-items:space-between}.forge-color-picker__canvas{background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNnB4IiBoZWlnaHQ9IjZweCIgdmlld0JveD0iMCAwIDYgNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTAgKDU0OTgzKSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5Hcm91cCA5PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Ikdyb3VwLTkiPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTExIiBmaWxsPSIjRTBFMEUwIiB4PSIwIiB5PSIwIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMTEtQ29weS0yIiBmaWxsPSIjRkZGRkZGIiB4PSIwIiB5PSIzIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMTEtQ29weSIgZmlsbD0iI0ZGRkZGRiIgeD0iMyIgeT0iMCIgd2lkdGg9IjMiIGhlaWdodD0iMyI+PC9yZWN0PgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTExLUNvcHktMyIgZmlsbD0iI0UwRTBFMCIgeD0iMyIgeT0iMyIgd2lkdGg9IjMiIGhlaWdodD0iMyI+PC9yZWN0PgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+")}.forge-color-picker__hue-slider{height:8px;background:linear-gradient(to right,red 0,#ff0 16%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 84%,#ff0004 100%)}.forge-color-picker__opacity-slider{height:8px;margin-top:16px;background:linear-gradient(to right,rgba(255,0,0,0) 0,red 100%)}.forge-color-picker__color-hsva,.forge-color-picker__color-rgba{display:flex}.forge-color-picker__color-hsva div,.forge-color-picker__color-rgba div{margin-right:4px}.forge-color-picker__color-hsva label,.forge-color-picker__color-rgba label{display:block;text-align:center}.forge-color-picker__color-hsva input,.forge-color-picker__color-rgba input{width:44px}:host{display:inline-block}:host([hidden]){display:none}',ce=class extends M{static get observedAttributes(){return[g1.attributes.VALUE,g1.attributes.ALLOW_OPACITY,g1.attributes.DEBOUNCE_CHANGE_EVENT]}constructor(){super(),q.define(l3),H(this,s_,l_),this._core=new Ss(new As(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case g1.attributes.VALUE:this.value=a;break;case g1.attributes.ALLOW_OPACITY:this.allowOpacity=p(a);break;case g1.attributes.DEBOUNCE_CHANGE_EVENT:this.debounceChangeEvent=p(a);break}}};s([v()],ce.prototype,"value",2),s([v()],ce.prototype,"rgba",2),s([v()],ce.prototype,"hsva",2),s([v()],ce.prototype,"opacity",2),s([v()],ce.prototype,"allowOpacity",2),s([v()],ce.prototype,"debounceChangeEvent",2),ce=s([y({name:g1.elementName,dependencies:[n1,p1,X]})],ce);function Gp(){x(ce)}var v_={MIN:"min",MAX:"max",OPEN:"open",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",MASKED:"masked",MASK_FORMAT:"mask-format",SHOW_MASK_FORMAT:"show-mask-format",VALUE_MODE:"value-mode",ALLOW_INVALID_DATE:"allow-invalid-date",SHOW_TODAY:"show-today",SHOW_CLEAR:"show-clear",DISABLED_DAYS_OF_WEEK:"disabled-days-of-week",YEAR_RANGE:"year-range",LOCALE:"locale",CALENDAR_TEXT:"calendar-text"},h_={TOGGLE:"forge-date-picker-toggle"},c_={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},R1={observedAttributes:v_,attributes:h_,selectors:c_};var G1=class extends M{constructor(){super()}connectedCallback(){this.querySelector(R1.selectors.INPUT)?this._core.initialize():I0(this,R1.selectors.INPUT).then(()=>{this._core.initialize()})}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case R1.observedAttributes.MIN:this.min=a;break;case R1.observedAttributes.MAX:this.max=a;break;case R1.observedAttributes.OPEN:this.open=p(a);break;case R1.observedAttributes.POPUP_CLASSES:this.popupClasses=a;break;case R1.observedAttributes.DISABLED:this.disabled=p(a);break;case R1.observedAttributes.MASKED:this.masked=p(a);break;case R1.observedAttributes.SHOW_MASK_FORMAT:this.showMaskFormat=p(a);break;case R1.observedAttributes.MASK_FORMAT:this.maskFormat=a;break;case R1.observedAttributes.VALUE_MODE:this.valueMode=a;break;case R1.observedAttributes.ALLOW_INVALID_DATE:this.allowInvalidDate=p(a);break;case R1.observedAttributes.SHOW_TODAY:this.showToday=p(a);break;case R1.observedAttributes.SHOW_CLEAR:this.showClear=p(a);break;case R1.observedAttributes.DISABLED_DAYS_OF_WEEK:this.disabledDaysOfWeek=Tr(a);break;case R1.observedAttributes.YEAR_RANGE:this.yearRange=a;break;case R1.observedAttributes.LOCALE:this.locale=a;break;case R1.observedAttributes.CALENDAR_TEXT:this.calendarText=JSON.parse(a);break}}};s([v()],G1.prototype,"value",2),s([v()],G1.prototype,"min",2),s([v()],G1.prototype,"max",2),s([v()],G1.prototype,"disabledDates",2),s([v()],G1.prototype,"open",2),s([v()],G1.prototype,"popupClasses",2),s([v()],G1.prototype,"disabled",2),s([v()],G1.prototype,"masked",2),s([v()],G1.prototype,"maskFormat",2),s([v()],G1.prototype,"showMaskFormat",2),s([v()],G1.prototype,"valueMode",2),s([v()],G1.prototype,"notifyInputValueChanges",2),s([v()],G1.prototype,"allowInvalidDate",2),s([v()],G1.prototype,"showToday",2),s([v()],G1.prototype,"showClear",2),s([v()],G1.prototype,"parseCallback",2),s([v()],G1.prototype,"formatCallback",2),s([v()],G1.prototype,"prepareMaskCallback",2),s([v()],G1.prototype,"disabledDaysOfWeek",2),s([v()],G1.prototype,"disableDayCallback",2),s([v()],G1.prototype,"yearRange",2),s([v()],G1.prototype,"locale",2),s([v()],G1.prototype,"calendarText",2);function ks(r){let t=document.createElement("forge-icon-button");t.type="button",t.tabIndex=-1,t.setAttribute("aria-label","Toggle calendar"),t.slot="end",t.density="medium";let e=document.createElement("forge-icon");return e.name=r,t.appendChild(e),t}var bo=class extends I{constructor(e){super(e);this._valueChangeListeners=[];this._identifier=P2()}initialize(){this._initializeInput()}destroy(){var e;(e=this._calendarDropdown)==null||e.destroy(),this.destroyValueChangeListener()}destroyValueChangeListener(){this._valueChangeListeners.forEach(e=>e())}addToggleListener(e,a){var o;(o=this._toggleElement)==null||o.addEventListener(e,a)}removeToggleListener(e,a){var o;(o=this._toggleElement)==null||o.removeEventListener(e,a)}attachCalendar(e,a){var o,n,i;if((o=this._calendarDropdown)==null||o.destroy(),this._initializeCalendarDropdown(),!this._calendarDropdown)throw new Error("CalendarDropdown was not initialized.");a&&Object.assign(this._calendarDropdown,a),this._calendarDropdown.open(e),(n=this._calendarDropdown.dropdownElement)==null||n.style.setProperty("--forge-calendar-width","320px"),(i=this._calendarDropdown.calendar)==null||i.style.setProperty("margin","8px"),this.setCalendarText((a==null?void 0:a.calendarText)||{})}detachCalendar(){this._calendarDropdown&&this._calendarDropdown.isOpen&&this._calendarDropdown.close()}goToCalendarDate(e){var a,o;(o=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||o.goToDate(e,!0)}addCalendarListener(e,a){var o,n;(n=(o=this._calendarDropdown)==null?void 0:o.calendar)==null||n.addEventListener(e,a)}removeCalendarListener(e,a){var o,n;(n=(o=this._calendarDropdown)==null?void 0:o.calendar)==null||n.removeEventListener(e,a)}setCalendarValue(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.value=e)}setCalendarMinDate(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.min=e)}setCalendarMaxDate(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.max=e)}setCalendarDisabledDates(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDates=e)}setCalendarDisabledDaysOfWeek(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDaysOfWeek=e)}setCalendarDisableDayCallback(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDateBuilder=e)}setCalendarActiveDate(e){var a,o;(o=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||o.setActiveDate(e)}getCalendarActiveDate(){var e,a;return(a=(e=this._calendarDropdown)==null?void 0:e.calendar)==null?void 0:a.activeDate}setCalendarYearRange(e){var a,o;(o=(a=this._calendarDropdown)==null?void 0:a.calendar)!=null&&o.yearRange&&(this._calendarDropdown.calendar.yearRange=e)}setCalendarLocale(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.locale=e)}setCalendarText(e){var o;let a=(o=this._calendarDropdown)==null?void 0:o.calendar;if(a){if(e.today){let n=document.createElement("span");n.slot=m.slots.TODAY_BUTTON_TEXT,n.textContent=e.today,a.append(n)}if(e.clear){let n=document.createElement("span");n.slot=m.slots.CLEAR_BUTTON_TEXT,n.textContent=e.clear,a.append(n)}if(e.nextMonth){let n=document.createElement("span");n.slot=m.slots.NEXT_MONTH_BUTTON_TEXT,n.textContent=e.nextMonth,a.append(n)}if(e.previousMonth){let n=document.createElement("span");n.slot=m.slots.PREVIOUS_MONTH_BUTTON_TEXT,n.textContent=e.previousMonth,a.append(n)}if(e.nextYear){let n=document.createElement("span");n.slot=m.slots.NEXT_YEAR_BUTTON_TEXT,n.textContent=e.nextYear,a.append(n)}if(e.previousYear){let n=document.createElement("span");n.slot=m.slots.PREVIOUS_YEAR_BUTTON_TEXT,n.textContent=e.previousYear,a.append(n)}if(e.nextYears){let n=document.createElement("span");n.slot=m.slots.NEXT_YEARS_BUTTON_TEXT,n.textContent=e.nextYears,a.append(n)}if(e.previousYears){let n=document.createElement("span");n.slot=m.slots.PREVIOUS_YEARS_BUTTON_TEXT,n.textContent=e.previousYears,a.append(n)}}}propagateCalendarKey(e){var a,o;(o=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||o.handleKey(e)}tryCreateToggle(){let e=this._component.querySelector("forge-text-field"),a=this._component.querySelector(R1.selectors.TOGGLE);if(e){let o=e.querySelector(`${J.elementName}[slot=end]`);if(o||a){this._toggleElement=o||a;return}let n=this._createToggleElement();e.appendChild(n),this._toggleElement=n}else a&&(this._toggleElement=a)}_createToggleElement(){return ks("insert_invitation")}_getDefaultTargetElement(){let e=this._component.querySelector(V1.elementName);return e!=null&&e.popoverTargetElement?e.popoverTargetElement:this._component.querySelector("input")||this._component}};var Ir=`${b}date-picker`,p_={VALUE:"value"},d_={INPUT:"input,input[forge-date-picker-input]"},m_={CHANGE:`${Ir}-change`,OPEN:`${Ir}-open`,CLOSE:`${Ir}-close`,INPUT:`${Ir}-input`},ft={elementName:Ir,selectors:d_,events:m_,observedAttributes:p_};var Os=class extends bo{constructor(t){super(t),this._dropdownIdentifier=`forge-date-picker-${this._identifier}`}_initializeInput(){this._inputElement=this._component.querySelector(ft.selectors.INPUT)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new _o(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=new ga(this._inputElement,t)}destroyMask(){var t;(t=this._inputMask)==null||t.destroy(),this._inputMask=void 0}initializeAccessibility(){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-owns",this._dropdownIdentifier),Oe(),Zt(this._inputElement)}addInputListener(t,e,a){var o;(o=this._inputElement)==null||o.addEventListener(t,e,{capture:a})}removeInputListener(t,e,a){var o;(o=this._inputElement)==null||o.removeEventListener(t,e,{capture:a})}setInputValueChangedListener(t,e){this.destroyValueChangeListener();let a=a0(t,this._inputElement,"value",e);this._valueChangeListeners.push(a)}hasInputElement(){return!!this._inputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._inputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._inputElement&&(this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._inputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._inputElement.value!==t&&(this._inputElement.value=t,this._inputMask&&this._inputMask.updateMask(),e&&(this._inputElement.dispatchEvent(new Event("change")),this._inputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return Se(this._component.ownerDocument)===this._inputElement}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(t){this._inputElement.disabled=t,this._inputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t,this._toggleElement.tabIndex=-1))}tryFocusInput(){this._inputElement.focus()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}emitInputEvent(t,e){o0(this._inputElement,t,e)}};var yo=class{constructor(t){this._adapter=t;this._value=null;this._min=null;this._max=null;this._disabledDates=null;this._open=!1;this._disabled=!1;this._masked=!0;this._maskFormat=hn;this._showMaskFormat=!1;this._valueMode="object";this._notifyInputValueChanges=!0;this._allowInvalidDate=!1;this._showToday=!1;this._showClear=!1;this._yearRange="-50:+50";this._calendarText={};this._isInitialized=!1;this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputValueChangedListener=e=>this._onInputValueChanged(e),this._dropdownCloseListener=()=>this._onDropdownClose(),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._dateSelectListener=e=>this._onDateSelected(e.detail),this._monthChangeListener=e=>this._onMonthChanged(e),this._activeChangeListener=e=>this._onActiveDescendantChanged(e),this._todayListener=()=>this._onToday(),this._clearListener=()=>this._onClear()}initialize(){var t;if(this._adapter.initialize(),this._adapter.initializeAccessibility(),!this._adapter.hasInputElement())throw new Error("Unable to locate child <input> element.");(t=this._initializeState)==null||t.call(this),this._adapter.tryCreateToggle(),this._masked||this._setInputChangeListeners(),this._initializeListeners(),this._setFormattedInputValue(!0),this._applyDisabled(),this._applyMask(),this._initializeValueChangedListeners(),this._isInitialized=!0}destroy(){this._isInitialized=!1,this._destroyListeners(),this._masked&&this._adapter.destroyMask(),this._closeCalendar(),this._adapter.destroy()}_initializeListeners(){this._adapter.addToggleListener("mousedown",this._toggleMousedownListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener)}_initializeValueChangedListeners(){this._adapter.setInputValueChangedListener(this,this._inputValueChangedListener)}_setInputChangeListeners(){this._adapter.addInputListener("input",this._inputListener)}_removeInputChangeListeners(){this._adapter.removeInputListener("input",this._inputListener)}_destroyListeners(){this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._removeInputChangeListeners()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputFocus(t){this.masked&&this.showMaskFormat&&this._applyMask(),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this.showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeCalendar(!0)}_openCalendar(t=!1){this._formatInputValue();let e={mode:this._mode,value:this._getCurrentValue(),min:this._min,max:this._max,disabledDates:this._disabledDates,yearRange:this._yearRange,todayButton:this._showToday,clearButton:this._showClear,todayCallback:this._todayListener,clearCallback:this._clearListener,disabledDateBuilder:this._disableDayCallback,disabledDaysOfWeek:this._disabledDaysOfWeek,preventFocus:!0,menuAnimation:"fade",fixedHeight:!0,selectionFollowsMonth:!0,locale:this._locale},a={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener,calendarText:this._calendarText},o=new Date().getTime();this._min&&this._max&&this._max.getTime()<o&&(e.year=this._min.getFullYear(),e.month=this._min.getMonth()),this._adapter.attachCalendar(e,a),this._adapter.addCalendarListener(m.events.DATE_SELECT,this._dateSelectListener),this._adapter.addCalendarListener(m.events.MONTH_CHANGE,this._monthChangeListener),this._open=!0,this._adapter.setHostAttribute(R1.observedAttributes.OPEN),t&&this._emitOpenEvent()}_closeCalendar(t=!1){this._open=!1,this._adapter.removeHostAttribute(R1.observedAttributes.OPEN),this._adapter.removeCalendarListener(m.events.DATE_SELECT,this._dateSelectListener),this._adapter.removeCalendarListener(m.events.MONTH_CHANGE,this._monthChangeListener),this._adapter.detachCalendar(),t&&this._emitCloseEvent()}_onInputKeydown(t){if(t.shiftKey)switch(t.key){case"Delete":case"Backspace":t.preventDefault(),this._onClear(),this._open&&this._closeCalendar(!0);return;case"ArrowLeft":case"ArrowRight":case"m":case"M":case"y":case"Y":case"d":case"D":if(this._open){t.preventDefault(),this._adapter.propagateCalendarKey(t);return}break}switch(t.key){case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeCalendar(!0));break;case"ArrowDown":t.preventDefault(),this._open?this._adapter.propagateCalendarKey(t):(this._adapter.selectInputText(),this._openCalendar(!0));break;case"ArrowUp":this._open&&(t.preventDefault(),this._adapter.propagateCalendarKey(t));break;case"ArrowLeft":case"ArrowRight":case"Enter":case"Home":case"End":if(this._open){t.key==="Enter"&&t.stopPropagation(),t.preventDefault();let e=["ArrowLeft","ArrowRight"].includes(t.key);this._masked&&e&&t.stopImmediatePropagation(),this._adapter.propagateCalendarKey(t)}break;case"n":case"t":t.preventDefault(),this._onToday(),this._open&&this._closeCalendar(!0);break;case"PageUp":case"PageDown":this._open&&(t.preventDefault(),this._adapter.propagateCalendarKey(t));break;case"Tab":if(this._open){let e=this._adapter.getCalendarActiveDate();e&&this._onDateSelected({date:e,selected:!0,type:"date"})}break}}_getSanitizedDateString(t){return t.replace(/_|[a-z]|[A-Z]/g,"").replace(/\/$|\/\/$/,"")}_onToggleMousedown(t){this._disabled||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeCalendar(!0):($2.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openCalendar(!0))))}_onDropdownClose(){this._closeCalendar(!0)}_onMonthChanged(t){this._adapter.redispatchEvent(t)}_onActiveDescendantChanged(t){this._adapter.setActiveDescendant(t)}_formatInputValue(){let t=this._adapter.getInputValue();if(t){let e=this._parseDateString(t);if(gt(e)&&this._isDateValueAcceptable(e)){let a=this._formatDate(e);a&&a!==t&&this._adapter.setInputValue(a,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setInputValue("",this._notifyInputValueChanges)}}_formatDate(t){return gt(t)?typeof this._formatCallback=="function"?this._formatCallback(t):d3(t):""}_parseDateString(t){if(t=t.replace(/_|\s/g,""),!t||!t.length)return null;let e=typeof this._parseCallback=="function"?this._parseCallback(t):p3(t);return gt(e)?e:null}_coerceDateValue(t){return typeof t=="string"?this._parseDateString(t):t}_getTypedValue(t){switch(this._valueMode){case"object":return t;case"string":return this._formatDate(t);case"iso-string":return t&&t.setHours(0,0,0,0),t?t.toISOString():null;default:return t}}_isDateValueAcceptable(t){if(!t||this._allowInvalidDate)return!0;let e=()=>this._min&&!this._allowInvalidDate?this._min.getTime()<=t.getTime():!0,a=()=>this._max&&!this._allowInvalidDate?this._max.getTime()>=t.getTime():!0,o=()=>Array.isArray(this._disabledDates)?this._disabledDates:this._disabledDates?[this._disabledDates]:[],n=()=>!o().some(h=>h.getTime()===t.getTime()),i=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(t.getDay())),l=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(t);return e()&&a()&&n()&&i()&&l()}_initializeMask(){let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,a,o,n)=>this._prepareMaskCallback.call(null,e,a,o,n)),this._adapter.initializeMask(t)}_applyMask(){this._masked?this._initializeMask():(this._adapter.destroyMask(),this._formatInputValue())}_applyMin(){this._isInitialized&&this._adapter.setCalendarMinDate(this._min)}_applyMax(){this._isInitialized&&this._adapter.setCalendarMaxDate(this._max)}_applyDisableDayCallback(){this._adapter.setCalendarDisableDayCallback(this._disableDayCallback)}_applyDisabled(){this._adapter.setDisabled(this._disabled)}get valueMode(){return this._valueMode}set valueMode(t){if(this._valueMode!==t){if(!["object","string","iso-string"].includes(t))return;this._valueMode=t,this._emitChangeEvent(this._value),this._adapter.setHostAttribute(R1.observedAttributes.VALUE_MODE,this._valueMode)}}get min(){return this._min?new Date(this._min.getTime()):null}set min(t){if(this._min!==t){let e=this._coerceDateValue(t);this._min=e?new Date(e.getTime()):null,this._applyMin(),this._isInitialized&&this._open&&this._adapter.setCalendarMinDate(this._min)}}get max(){return this._max?new Date(this._max.getTime()):null}set max(t){this._max!==t&&(this._max=this._coerceDateValue(t),this._applyMax(),this._isInitialized&&this._open&&this._adapter.setCalendarMaxDate(this._max))}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openCalendar():this._closeCalendar())}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._isInitialized&&this._applyDisabled())}get disabledDates(){return this._disabledDates?Array.isArray(this._disabledDates)?this._disabledDates.map(t=>new Date(t.getTime())):new Date(this._disabledDates.getTime()):null}set disabledDates(t){t?Array.isArray(t)?this._disabledDates=t.map(e=>new Date(e.getTime())):this._disabledDates=new Date(t.getTime()):this._disabledDates=null,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDates(this._disabledDates),this._applyDisabledDates()}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=t}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._removeInputChangeListeners(),this._applyMask()):(this._adapter.destroyMask(),this._setInputChangeListeners(),this._formatInputValue())))}get maskFormat(){return this._maskFormat}set maskFormat(t){this._maskFormat!==t&&(this._maskFormat=t,this._isInitialized&&this._applyMask())}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get notifyInputValueChanges(){return this._notifyInputValueChanges}set notifyInputValueChanges(t){this._notifyInputValueChanges=t}get allowInvalidDate(){return this._allowInvalidDate}set allowInvalidDate(t){this._allowInvalidDate!==t&&(this._allowInvalidDate=t,this._adapter.toggleHostAttribute(R1.observedAttributes.ALLOW_INVALID_DATE,this._allowInvalidDate))}get disabledDaysOfWeek(){return this._disabledDaysOfWeek}set disabledDaysOfWeek(t){this._disabledDaysOfWeek!==t&&(this._disabledDaysOfWeek=t,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek),this._applyDisabledDaysOfWeek())}get disableDayCallback(){return this._disableDayCallback}set disableDayCallback(t){t!==this._disableDayCallback&&(this._disableDayCallback=t,this._applyDisableDayCallback())}get parseCallback(){return this._parseCallback}set parseCallback(t){this._parseCallback=t,this._isInitialized&&this._applyMask()}get formatCallback(){return this._formatCallback}set formatCallback(t){this._formatCallback=t,this._isInitialized&&this._applyMask()}get prepareMaskCallback(){return this._prepareMaskCallback}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get showToday(){return this._showToday}set showToday(t){this._showToday=t}get showClear(){return this._showClear}set showClear(t){this._showClear=t}get yearRange(){return this._yearRange}set yearRange(t){this._yearRange!==t&&(this._yearRange=t,this._isInitialized&&this._open&&this._adapter.setCalendarYearRange(this._yearRange))}get locale(){return this._locale}set locale(t){this._locale!==t&&(this._locale=t,this._isInitialized&&this._open&&this._adapter.setCalendarLocale(this._locale))}get calendarText(){return w({},this._calendarText)}set calendarText(t){JSON.stringify(this._calendarText)!==JSON.stringify(t)&&(this._calendarText=w({},t),this._adapter.setCalendarText(this._calendarText))}};var Ds=class extends yo{constructor(e){super(e);this._mode="single"}_initializeState(){this._value||(this._value=this._coerceDateValue(this._adapter.getInputValue()))}_emitChangeEvent(e,a){let o=this._getTypedValue(e);return this._adapter.emitHostEvent(ft.events.CHANGE,o,!0,!a)?(this._setValue(e),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(ft.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(ft.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;this._tryMergeCurrentTime(e),this._onDateSelected({date:e,selected:!0,type:"date"})}_onClear(){this._onDateSelected({date:null,selected:!1,type:"date"})}_getCurrentValue(){return this._value}_setFormattedInputValue(e){let a=this._formatDate(this._value);a?this._adapter.setInputValue(a,e?!1:this._notifyInputValueChanges):this._allowInvalidDate||this._adapter.setInputValue("",e?!1:this._notifyInputValueChanges)}_setValue(e){(!e||this._isDateValueAcceptable(e))&&(this._value=e)}_onDateSelected(e){let a=e.date;if(e.type==="date"&&this._closeCalendar(!0),this._tryMergeCurrentTime(a),!this._emitChangeEvent(a))return;let o=this._formatDate(a);this._adapter.setInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),$2.isMobile||this._adapter.selectInputText()}_openCalendar(e){super._openCalendar(e);let a=this._getCurrentValue();a&&this._adapter.goToCalendarDate(new Date(a))}_applyMin(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMin()}_applyMax(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMax()}_applyDisabledDates(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_applyDisabledDaysOfWeek(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_handleInput(e){let a=this._getSanitizedDateString(e),o=this._coerceDateValue(a);this._tryMergeCurrentTime(o),this._masked&&this._adapter.emitInputEvent(ft.events.INPUT,a),!f2(o,this._value)&&this._isDateValueAcceptable(o)&&this._emitChangeEvent(o)}_onInputValueChanged(e){let a=this._getSanitizedDateString(e);if(this._masked&&a)return;let o=this._coerceDateValue(a);!f2(o,this._value)&&this._isDateValueAcceptable(o)&&(this.value=o,this._emitChangeEvent(this._value))}_tryMergeCurrentTime(e){!e||!this._value||e.setHours(this._value.getHours(),this._value.getMinutes(),this._value.getSeconds(),this._value.getMilliseconds())}_applyValue(){this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(this._value)}get value(){let e=this._getTypedValue(this._value);return e?Na(e)?new Date(e.getTime()):e:null}set value(e){this._value!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&this._applyValue())}};var g_="<template><slot></slot></template>",w_=":host{display:block}:host([hidden]){display:none}",Mo=class extends G1{static get observedAttributes(){return[...Object.values(R1.observedAttributes),ft.observedAttributes.VALUE]}constructor(){super(),q.define(a3),H(this,g_,w_),this._core=new Ds(new Os(this))}attributeChangedCallback(t,e,a){switch(t){case ft.observedAttributes.VALUE:this.value=a;return}super.attributeChangedCallback(t,e,a)}};Mo=s([y({name:ft.elementName,dependencies:[P1,v1,n1,X]})],Mo);var Yp=class extends a2{constructor(t){super(t)}_build(){let t=document.createElement(ft.elementName);return this._attachTextField(t),t}getInputElement(){return this._textFieldDelegate.inputElement}getTextFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.masked?this._element.addEventListener(ft.events.INPUT,e=>t(e.target.value)):this.getInputElement().addEventListener("input",e=>t(e.target.value))}onInput(t){this._element.masked?this._element.addEventListener(ft.events.INPUT,e=>t(e.detail)):this._textFieldDelegate.inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var a,o,n,i;let e={props:w({},(o=(a=this._config.options)==null?void 0:a.textFieldDelegateConfig)==null?void 0:o.props),options:w({},(i=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:i.options)};this._textFieldDelegate=new J0(e),t.appendChild(this._textFieldDelegate.element)}};function Kp(){x(Mo)}var Vr=`${b}date-range-picker`,Ps=class r{constructor(t){t&&(this.from=t.from,this.to=t.to)}copy(){return new r(this)}},u_={FROM:"from",TO:"to",END_VALUE:"end-value"},__={INPUT:"input"},f_={CHANGE:`${Vr}-change`,OPEN:`${Vr}-open`,CLOSE:`${Vr}-close`,INPUT:`${Vr}-input`},k2={elementName:Vr,selectors:__,events:f_,observedAttributes:u_};var Ns=class extends bo{constructor(t){super(t),this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(k2.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(k2.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${k2.elementName} requires two inputs`);if(!this._component.querySelector(`[${V.attributes.MULTI_INPUT_SEPARATOR}]`)){let t=this._createInputSeparator();this._fromInputElement.insertAdjacentElement("afterend",t)}}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new _o(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new ga(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new ga(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier)),this._toInputElement.hasAttribute("aria-label")||this._toInputElement.setAttribute("aria-label","To date"),Oe(),this._applyToInputs(t=>Zt(t))}addInputListener(t,e,a){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:a})}addToInputListener(t,e,a){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:a})}removeInputListener(t,e){var a;(a=this._fromInputElement)==null||a.removeEventListener(t,e)}removeToInputListener(t,e){var a;(a=this._toInputElement)==null||a.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let a=a0(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(a)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=a0(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=Se(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t,this._toggleElement.tabIndex=-1))}emitInputEvent(t,e){o0(this._fromInputElement,t,e)}emitToInputEvent(t,e){o0(this._toInputElement,t,e)}_createToggleElement(){return ks("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}_createInputSeparator(){let t=document.createElement("span");return K(t,!0,V.attributes.MULTI_INPUT_SEPARATOR),t.setAttribute("aria-hidden","true"),t.textContent="-",t}};var Rs=class extends yo{constructor(e){super(e);this._mode="range";this._from=null;this._to=null;this._toInputListener=a=>this._onToInput(a),this._toInputValueChangedListener=a=>this._onToInputValueChanged(a),this._toInputKeydownListener=a=>this._onInputKeydown(a),this._toInputFocusListener=a=>this._onToInputFocus(),this._toInputBlurListener=a=>this._onToInputBlur(a)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(e){this._formatToInputValue(),super._openCalendar(e);let a=this._getCurrentValue();a!=null&&a.to?this._adapter.goToCalendarDate(new Date(a.to)):a!=null&&a.from&&this._adapter.goToCalendarDate(new Date(a.from))}_emitChangeEvent(e,a){let o=this._getTypedValue(e&&e.from||null),n=this._getTypedValue(e&&e.to||null),i=new Ps({from:o,to:n});return this._adapter.emitHostEvent(k2.events.CHANGE,i,!0,!a)?(this._setValue(this._coerceDateValue(e&&e.from||null)),this._setToValue(this._coerceDateValue(e&&e.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(k2.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(k2.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;this._tryMergeCurrentTime({from:e});let a=this._open?new l2({from:this._from||e,to:this._to||void 0}):new l2({from:e});this._isDateRangeAcceptable(a)&&(this.value=a,this._onDateSelected({date:e,range:a,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(e))}_onClear(){this._onDateSelected({date:null,range:new l2,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let e=this._adapter.getToInputValue();if(e){let a=this._parseDateString(e);if(gt(a)&&this._isDateValueAcceptable(a)){let o=this._formatDate(a);o&&this._adapter.setToInputValue(o,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(e){let a=this._formatDate(this._from);!a&&!this._allowInvalidDate&&(a=""),this._adapter.setInputValue(a,e?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(e){let a=this._formatDate(this._to);!a&&!this._allowInvalidDate&&(a=""),this._adapter.setToInputValue(a,e?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(e){if(!(e!=null&&e.to))return!0;let a=()=>this._isDateValueAcceptable(e.from),o=()=>this._isDateValueAcceptable(e.to),n=()=>e!=null&&e.from&&(e!=null&&e.to)?e.from.getTime()<=e.to.getTime():!0;return a()&&o()&&n()}_setValue(e){this._isDateValueAcceptable(e)&&(this._from=e||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(e){this._isDateValueAcceptable(e)&&(this._to=e||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(e){let a=e.range;if(e.rangeSelectionState==="to"&&this._closeCalendar(!0),this._tryMergeCurrentTime(a),!this._emitChangeEvent(a!=null?a:null))return;let o=this._formatDate(a&&a.from||null),n=this._formatDate(a&&a.to||null);this._adapter.setInputValue(o,this._notifyInputValueChanges),this._adapter.setToInputValue(n,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=a&&a.from||null,this._to=a&&a.to||null,$2.isMobile||(n?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeToMask(){if(!this._masked)return;let e={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:a=>this._handleToInput(a)};this._prepareMaskCallback&&(e.prepareCallback=(a,o,n,i)=>this._prepareMaskCallback.call(null,a,o,n,i)),this._adapter.initializeToMask(e)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(e){this._handleInput(this._adapter.getInputValue())}_handleInput(e){let a=this._getSanitizedDateString(e),o=this._coerceDateValue(a);this._tryMergeCurrentTime({from:o}),this._masked&&this._adapter.emitInputEvent(k2.events.INPUT,a),!f2(o,this._from)&&this._isDateValueAcceptable(o)&&this._emitChangeEvent(new l2({from:o||void 0,to:this._to||void 0}))}_handleToInput(e){let a=this._getSanitizedDateString(e),o=this._coerceDateValue(a);this._tryMergeCurrentTime({to:o}),this._masked&&this._adapter.emitToInputEvent(k2.events.INPUT,a),!f2(o,this._to)&&this._isDateValueAcceptable(o)&&this._emitChangeEvent(new l2({from:this._from||void 0,to:o||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(e){this._masked&&!this._adapter.isInputFocused(e.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(e){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(e){this.masked&&!this._adapter.isInputFocused(e.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(e.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(e){if(this._masked)return;let a=this._getSanitizedDateString(e),o=this._coerceDateValue(a);f2(o,this._from)||(this.from=o,this._emitChangeEvent(new l2({from:o||void 0,to:this._to||void 0})))}_onToInputValueChanged(e){if(this._masked)return;let a=this._getSanitizedDateString(e),o=this._coerceDateValue(a);f2(o,this._to)||(this.to=o,this._emitChangeEvent(new l2({from:this._from||void 0,to:o||void 0})))}_tryMergeCurrentTime(e){!e||!this._value||!this._value.from&&!this._value.to||(e.from&&this._value.from&&this._value.from instanceof Date&&e.from.setHours(this._value.from.getHours(),this._value.from.getMinutes(),this._value.from.getSeconds(),this._value.from.getMilliseconds()),e.to&&this._value.to&&this._value.to instanceof Date&&e.to.setHours(this._value.to.getHours(),this._value.to.getMinutes(),this._value.to.getSeconds(),this._value.to.getMilliseconds()))}get value(){return{from:this.from,to:this.to}}set value(e){e||(e={from:null,to:null}),e.from===void 0&&(e.from=null),e.to===void 0&&(e.to=null),this.from=e.from,this.to=e.to,this._value={from:this.from,to:this.to}}get from(){let e=this._getTypedValue(this._from);return e?Na(e)?new Date(e.getTime()):e:null}set from(e){this._from!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new l2({from:this._coerceDateValue(e)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let e=this._getTypedValue(this._to);return e?Na(e)?new Date(e.getTime()):e:null}set to(e){this._to!==e&&(this._setToValue(this._coerceDateValue(e)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new l2({to:this._coerceDateValue(e)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var x_="<template><slot></slot></template>",b_=":host{display:block}:host([hidden]){display:none}",oa=class extends G1{static get observedAttributes(){return[...Object.values(R1.observedAttributes),k2.observedAttributes.FROM,k2.observedAttributes.TO]}constructor(){super(),q.define(Q5),H(this,x_,b_),this._core=new Rs(new Ns(this))}attributeChangedCallback(t,e,a){switch(t){case k2.observedAttributes.FROM:this.from=a;return;case k2.observedAttributes.TO:this.to=a;return}super.attributeChangedCallback(t,e,a)}};s([v()],oa.prototype,"from",2),s([v()],oa.prototype,"to",2),oa=s([y({name:k2.elementName,dependencies:[P1,v1,n1,X]})],oa);var qp=class extends a2{constructor(t){super(t)}_build(){let t=document.createElement(k2.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector("input:first-of-type")}get toInput(){return this._textField.querySelector("input:last-of-type")}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(k2.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var a,o,n,i,l;this._textField=document.createElement(V1.elementName),(a=this._config.options)!=null&&a.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((n=this._config.options)==null?void 0:n.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((i=this._config.options)==null?void 0:i.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((l=this._config.options)==null?void 0:l.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function $p(){x(oa)}var Xp={OPEN:"open",DIRECTION:"direction"},y_=w({},Xp),jp={DRAWER:"forge-drawer",LEFT:"left",RIGHT:"right",CLOSING:"closing",CLOSED:"closed",NO_TRANSITION:"no-transition"},M_={DRAWER:`.${jp.DRAWER}`},H_={AFTER_OPEN:"forge-drawer-after-open",AFTER_CLOSE:"forge-drawer-after-close"},Z1={observedAttributes:Xp,attributes:y_,classes:jp,selectors:M_,events:H_};var ra=class extends I{constructor(e){super(e);this._component=e;this._drawerElement=g(this._component,Z1.selectors.DRAWER)}proxyScrollEvent(){this.tryUnproxyScrollEvent(),this._unproxyScrollEventCb=x3(this._component.shadowRoot,this._component)}tryUnproxyScrollEvent(){this._unproxyScrollEventCb&&this._unproxyScrollEventCb()}setDirection(e){switch(e){case"left":this._drawerElement.classList.remove(Z1.classes.RIGHT),this._drawerElement.classList.add(Z1.classes.LEFT);break;case"right":this._drawerElement.classList.remove(Z1.classes.LEFT),this._drawerElement.classList.add(Z1.classes.RIGHT);break}}removeDrawerClass(e){we(e,this._drawerElement)}setDrawerClass(e){y1(e,this._drawerElement)}listenTransitionComplete(e){this._activeTransitionListener&&this._drawerElement.removeEventListener("transitionend",this._activeTransitionListener),this._activeTransitionListener=a=>{a.propertyName==="transform"&&(this._activeTransitionListener&&(this._drawerElement.removeEventListener("transitionend",this._activeTransitionListener),this._activeTransitionListener=void 0),e())},this._drawerElement.addEventListener("transitionend",this._activeTransitionListener)}};var na=class{constructor(t){this._adapter=t;this._open=!0;this._direction="left";this._openAnimationListener=()=>this._onOpenComplete(),this._closeAnimationListener=()=>this._onCloseComplete()}initialize(){this._open?this._setOpened():this._setClosed(),this._applyDirection(),this._adapter.proxyScrollEvent()}destroy(){this._adapter.tryUnproxyScrollEvent()}_applyDirection(){this._adapter.setDirection(this._direction),this._adapter.setHostAttribute(Z1.attributes.DIRECTION,k(this._direction)?this._direction.toString():"")}_onOpenComplete(){if(!this._open)return;this._setOpened();let t=new CustomEvent(Z1.events.AFTER_OPEN,{bubbles:!0,composed:!0});this._adapter.dispatchHostEvent(t)}_onCloseComplete(){if(this._open)return;this._setClosed();let t=new CustomEvent(Z1.events.AFTER_CLOSE,{bubbles:!0,composed:!0});this._adapter.dispatchHostEvent(t)}_setOpened(){this._adapter.removeDrawerClass([Z1.classes.CLOSED,Z1.classes.CLOSING]),this._adapter.setHostAttribute(Z1.attributes.OPEN)}_setClosed(){this._adapter.removeDrawerClass([Z1.classes.CLOSING,Z1.classes.NO_TRANSITION]),this._adapter.setDrawerClass(Z1.classes.CLOSED),this._adapter.removeHostAttribute(Z1.attributes.OPEN)}_applyOpen(){this._open?(this._triggerDrawerOpen(),this._adapter.setHostAttribute(Z1.attributes.OPEN)):(this._triggerDrawerClose(),this._adapter.removeHostAttribute(Z1.attributes.OPEN))}async _triggerDrawerOpen(){this._adapter.listenTransitionComplete(this._openAnimationListener),await Ko(),this._adapter.removeDrawerClass([Z1.classes.CLOSED,Z1.classes.CLOSING])}async _triggerDrawerClose(){this._adapter.listenTransitionComplete(this._closeAnimationListener),await Ko(),this._adapter.setDrawerClass(Z1.classes.CLOSING)}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&this._applyOpen())}get direction(){return this._direction}set direction(t){this._direction!==t&&(this._direction=t,this._adapter.isConnected&&this._applyDirection())}};var Ke=class extends M{static get observedAttributes(){return Object.values(Z1.observedAttributes)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case Z1.observedAttributes.OPEN:this.open=p(a);break;case Z1.observedAttributes.DIRECTION:this.direction=a;break}}};s([v()],Ke.prototype,"open",2),s([v()],Ke.prototype,"direction",2);var L_=`${b}drawer`,Zp={elementName:L_};var I_='<template><div class="forge-drawer" part="root"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></template>',V_=':host{display:grid;box-sizing:border-box;height:100%;overflow:hidden!important;--forge-divider-margin:4px 0}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}:host([open]){transform:translateZ(0)}',Ho=class extends Ke{constructor(){super(),H(this,I_,V_),this._core=new na(new ra(this))}};Ho=s([y({name:Zp.elementName})],Ho);function Qp(){x(Ho)}var Fs=class extends ra{constructor(e){super(e);this._component=e;this._backdropElement=g(this._component,s2.elementName)}setBackdropCloseListener(e){this._backdropElement.addEventListener("click",e)}setBackdropVisibility(e,{immediate:a}){return this._backdropElement.toggleAttribute("hidden",!e),!this._backdropElement.fadeIn||!this._backdropElement.fadeOut?(a&&this._backdropElement.toggleAttribute(s2.attributes.VISIBLE,e),Promise.resolve()):a?Promise.resolve(e?this._backdropElement.show():this._backdropElement.hide()):e?this._backdropElement.fadeIn():this._backdropElement.fadeOut()}toggleBackdropClass(e,a){_2(this._backdropElement,e,a)}};var Jp=`${b}modal-drawer`,E_={DISPLAY_NONE:"display-none",SCRIM_CLOSED:"closed"},C_={CLOSE:`${Jp}-close`},Lo={elementName:Jp,classes:E_,events:C_};var Us=class extends na{constructor(e){super(e);this._adapter=e;this._open=!1;this._backdropClickListener=this._onBackdropClick.bind(this)}initialize(){super.initialize(),this._adapter.setBackdropCloseListener(this._backdropClickListener),this._setBackdrop(this._open,{immediate:!0})}async _triggerDrawerOpen(){super._triggerDrawerOpen(),this._setBackdrop(!0)}async _triggerDrawerClose(){super._triggerDrawerClose(),this._setBackdrop(!1)}_onBackdropClick(e){this._adapter.emitHostEvent(Lo.events.CLOSE,void 0,!0,!0)&&(this.open=!1)}async _setBackdrop(e,{immediate:a=!1}={}){e?(this._adapter.toggleBackdropClass(!1,Lo.classes.SCRIM_CLOSED),this._adapter.setBackdropVisibility(!0,{immediate:a})):this._adapter.isConnected&&(await this._adapter.setBackdropVisibility(!1,{immediate:a}),this._open||this._adapter.toggleBackdropClass(!0,Lo.classes.SCRIM_CLOSED))}};var z_='<template><forge-backdrop class="scrim" hidden exportparts="root:backdrop"></forge-backdrop><div class="forge-drawer modal" part="root"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></template>',A_=':host{--forge-divider-margin:4px 0}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}.forge-drawer.modal{position:absolute;top:0;z-index:var(--forge-z-index-dialog,8);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);max-width:80%}.forge-drawer.modal.closed,.forge-drawer.modal.closing{box-shadow:none}.forge-drawer.modal.closing.right{transform:translateX(100%)}.forge-drawer.right{right:0}.forge-drawer.display-none{display:none!important}.scrim{z-index:var(--forge-z-index-dialog,8)}.scrim.closed{display:none}',Io=class extends Ke{constructor(){super(),H(this,z_,A_),this._core=new Us(new Fs(this))}};Io=s([y({name:Lo.elementName,dependencies:[We]})],Io);function td(){x(Io)}var B_=`${b}mini-drawer`,T_={HOVER:"hover"},ed={elementName:B_,attributes:T_};var S_='<template><div class="root" part="root"><div class="forge-drawer mini" part="container"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></div></template>',k_=':host{--_mini-drawer-width:var(--forge-mini-drawer-width, 56px);--_mini-drawer-min-width:var(--forge-mini-drawer-min-width, var(--_mini-drawer-width));--_mini-drawer-hover-width:var(--forge-mini-drawer-hover-width, var(--forge-drawer-width, 256px));--_mini-drawer-transition-duration:var(--forge-mini-drawer-transition-duration, var(--forge-animation-duration-short4, 200ms));--_mini-drawer-transition-easing:var(--forge-mini-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_mini-drawer-transition-delay:var(--forge-mini-drawer-transition-delay, 300ms);--_mini-drawer-hover-transition-duration:var(--forge-mini-drawer-hover-transition-duration, var(--forge-animation-duration-medium2, 300ms));--_mini-drawer-hover-transition-easing:var(--forge-mini-drawer-hover-transition-easing, var(--_mini-drawer-transition-easing));--_mini-drawer-hover-transition-delay:var(--forge-mini-drawer-hover-transition-delay, var(--forge-animation-duration-medium2, 300ms))}:host{display:grid;box-sizing:border-box;height:100%;overflow:hidden!important;width:var(--_mini-drawer-width);overflow:visible!important;--forge-divider-margin:4px 0}:host([direction=right]){min-width:var(--_mini-drawer-width);width:auto}:host([direction=right]) .root{position:relative}:host(:not([open])){display:none}:host([hover]) .right{position:absolute;right:0}:host([hover]) .forge-drawer:hover{width:var(--_mini-drawer-hover-width)!important;transition:width var(--_mini-drawer-hover-transition-duration) var(--_mini-drawer-hover-transition-easing) var(--_mini-drawer-hover-transition-delay)}:host([hover]) .forge-drawer:hover .content{overflow:auto;overflow:overlay}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}.root{z-index:var(--forge-z-index-surface,1);height:100%;min-width:var(--_mini-drawer-min-width)}.forge-drawer.mini{width:var(--_mini-drawer-width);z-index:var(--forge-z-index-surface,1);transition:width var(--_mini-drawer-transition-duration) var(--_mini-drawer-transition-easing)}.forge-drawer.mini .content{overflow:hidden}.forge-drawer.closed{width:0}',Vo=class extends Ke{constructor(){super(),H(this,S_,k_),this._core=new na(new ra(this))}get hover(){return this.hasAttribute("hover")}set hover(t){this.toggleAttribute("hover",t)}};Vo=s([y({name:ed.elementName})],Vo);function ad(){x(Vo)}var od=`${b}file-picker`,O_={ACCEPT:"accept",MAX_SIZE:"max-size",CAPTURE:"capture",MULTIPLE:"multiple",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},D_={HIGHLIGHT:"highlight",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},P_={CONTAINER:"container",BUTTON:"button",INPUT:"input"},N_={CONTAINER:"#container",BUTTON:"#button",INPUT:"#input",BUTTON_SLOT:"#button-slot"},R_={FILES_CHANGED:`${od}-change`},w1={elementName:od,attributes:O_,classes:D_,ids:P_,selectors:N_,events:R_};var Ws=class extends I{constructor(t){super(t),this._container=g(t,w1.selectors.CONTAINER),this._buttonSlot=g(t,w1.selectors.BUTTON_SLOT),this._input=g(t,w1.selectors.INPUT),this._inputEventListener=()=>{this._input.value="",this._input.click()},this._container.addEventListener("click",this._inputEventListener)}destroy(){this._inputEventListener&&(this._container.removeEventListener("click",this._inputEventListener),this._inputEventListener=void 0)}registerButtonSlotListener(t){this._buttonSlot.addEventListener("slotchange",t)}registerInputChangeListener(t){this._input.addEventListener("change",t)}registerDragEnterListener(t){this._container.addEventListener("dragenter",t)}registerDragLeaveListener(t){this._container.addEventListener("dragleave",t)}registerDragOverListener(t){this._container.addEventListener("dragover",t)}registerDropListener(t){this._container.addEventListener("drop",t)}removeDragEnterListener(t){this._container.removeEventListener("dragenter",t)}removeDragLeaveListener(t){this._container.removeEventListener("dragleave",t)}removeDragOverListener(t){this._container.removeEventListener("dragover",t)}removeDropListener(t){this._container.removeEventListener("drop",t)}initializeButton(){let t=this._component.querySelector("forge-button");this._button=t||void 0}setHighlightState(t){this._container.classList.contains(w1.classes.HIGHLIGHT)!==t&&this._container.classList.toggle(w1.classes.HIGHLIGHT)}setAccept(t){t?this._input.setAttribute("accept",t):this._input.removeAttribute("accept")}setCapture(t){t?this._input.setAttribute("capture",t):this._input.removeAttribute("capture")}setMultiple(t){t?this._input.setAttribute("multiple",""):this._input.removeAttribute("multiple")}setDisabled(t){var e,a;t?(this._container.removeEventListener("click",this._inputEventListener),(e=this._button)==null||e.setAttribute("disabled",""),this._container.setAttribute("disabled","")):(this._container.addEventListener("click",this._inputEventListener),(a=this._button)==null||a.removeAttribute("disabled"),this._container.removeAttribute("disabled"))}setCompact(t){this._container.classList.contains(w1.classes.COMPACT)!==t&&this._container.classList.toggle(w1.classes.COMPACT)}setBorderless(t){this._container.classList.contains(w1.classes.BORDERLESS)!==t&&this._container.classList.toggle(w1.classes.BORDERLESS)}};var Gs=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._accept=null;this._maxSize=null;this._capture=null;this._multiple=!1;this._disabled=!1;this._compact=!1;this._borderless=!1;this._buttonSlotListener=e=>this._onButtonSlotChanged(e),this._inputChangeListener=e=>this._onInputChange(e),this._dragEnterListener=e=>this._onDragEnter(e),this._dragLeaveListener=e=>this._onDragLeave(e),this._dragOverListener=e=>this._onDragOver(e),this._dropListener=e=>this._onDrop(e),this._adapter.registerButtonSlotListener(this._buttonSlotListener),this._adapter.registerInputChangeListener(this._inputChangeListener),this._compact||this._registerDragListeners()}initialize(){this._adapter.initializeButton(),this._adapter.setDisabled(this._disabled),this._isInitialized=!0}destroy(){this._adapter.destroy(),this._isInitialized=!1}_onButtonSlotChanged(t){this._adapter.initializeButton()}_onInputChange(t){let e=t.target.files;e&&this._handleFiles(e)}_onDragEnter(t){this._handleDragEvent(t,!0)}_onDragLeave(t){this._handleDragEvent(t,!1)}_onDragOver(t){this._handleDragEvent(t,!0)}_onDrop(t){if(this._handleDragEvent(t,!1),!this._disabled){let e=t.dataTransfer;if(e){let a=e.files;this._handleFiles(a)}}}_registerDragListeners(){this._adapter.registerDragEnterListener(this._dragEnterListener),this._adapter.registerDragLeaveListener(this._dragLeaveListener),this._adapter.registerDragOverListener(this._dragOverListener),this._adapter.registerDropListener(this._dropListener)}_removeDragListeners(){this._adapter.removeDragEnterListener(this._dragEnterListener),this._adapter.removeDragLeaveListener(this._dragLeaveListener),this._adapter.removeDragOverListener(this._dragOverListener),this._adapter.removeDropListener(this._dropListener)}_handleFiles(t){let e={};if(t){let a=this._sortFiles(t),o=a.legalFiles||null;!this._multiple&&o&&o.length>1&&(o=o.splice(1)),e=a}this._adapter.emitHostEvent(w1.events.FILES_CHANGED,e)}_sortFiles(t){let e=[],a=[];if(!this._accept&&!this.maxSize)return e=Array.from(t),{legalFiles:e,illegalFiles:a};let o=this._accept?this._accept.split(",").map(n=>n.trim().toLowerCase()):[""];for(let n=0;n<t.length;n++)!o.some(i=>t[n].type.toLowerCase().match(i)||t[n].name.toLowerCase().match("\\"+i))||this._maxSize&&t[n].size>this._maxSize?a.push(t[n]):e.push(t[n]);return{legalFiles:e,illegalFiles:a}}_handleDragEvent(t,e){this._disabled||(t.preventDefault(),t.stopPropagation(),this._adapter.setHighlightState(e))}get accept(){return this._accept}set accept(t){this._accept!==t&&(this._accept=t,this._adapter.setAccept(t),this._adapter.toggleHostAttribute(w1.attributes.ACCEPT,!!t,String(t)))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize!==t&&(this._maxSize=t,this._adapter.toggleHostAttribute(w1.attributes.MAX_SIZE,!!t,String(t)))}get capture(){return this._capture}set capture(t){this._capture!==t&&(this._capture=t,this._adapter.setCapture(t),this._adapter.toggleHostAttribute(w1.attributes.CAPTURE,!!t,String(t)))}get multiple(){return this._multiple}set multiple(t){this._multiple!==t&&(this._multiple=t,this._adapter.setMultiple(t),this._adapter.toggleHostAttribute(w1.attributes.MULTIPLE,t))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._isInitialized&&this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(w1.attributes.DISABLED,t))}get compact(){return this._compact}set compact(t){this._compact!==t&&(this._compact=t,this._adapter.setCompact(t),t?this._removeDragListeners():this._registerDragListeners(),this._adapter.toggleHostAttribute(w1.attributes.COMPACT,t))}get borderless(){return this._borderless}set borderless(t){this._borderless!==t&&(this._borderless=t,this._adapter.setBorderless(t),this._adapter.toggleHostAttribute(w1.attributes.BORDERLESS,t))}};var F_='<template><form class="forge-file-picker" id="container" part="form"><div class="primary" id="primary" part="primary"><slot name="primary"></slot></div><slot id="button-slot"></slot><div class="secondary" id="secondary" part="secondary"><slot name="secondary"></slot></div><input type="file" class="input" id="input" part="input"></form><div class="helper-text" part="helper-text-container"><slot name="helper-text"></slot></div></template>',U_=':host{--_file-picker-background:var(--forge-file-picker-background, var(--forge-theme-surface-dim, #fafafa));--_file-picker-width:var(--forge-file-picker-width, auto);--_file-picker-height:var(--forge-file-picker-height, auto);--_file-picker-max-width:var(--forge-file-picker-max-width, auto);--_file-picker-border-width:var(--forge-file-picker-border-width, var(--forge-border-thin, 1px));--_file-picker-border-style:var(--forge-file-picker-border-style, dashed);--_file-picker-border-color:var(--forge-file-picker-border-color, var(--forge-theme-outline-low, #9e9e9e));--_file-picker-gap:var(--forge-file-picker-gap, var(--forge-spacing-medium, 16px));--_file-picker-padding:var(--forge-file-picker-padding, var(--forge-spacing-medium, 16px));--_file-picker-padding-block:var(--forge-file-picker-padding-block, 0);--_file-picker-padding-inline:var(--forge-file-picker-padding-inline, var(--_file-picker-padding));--_file-picker-disabled-opacity:var(--forge-file-picker-disabled-opacity, 0.38);--_file-picker-highlight-background:var(--forge-file-picker-highlight-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_file-picker-highlight-border-color:var(--forge-file-picker-highlight-border-color, var(--forge-theme-primary, #3f51b5))}:host{display:block;height:100%;width:100%}:host([hidden]){display:none}:host([compact]){display:inline-block}.forge-file-picker{--_file-picker-background:var(--forge-file-picker-background, var(--forge-theme-surface-dim, #fafafa));--_file-picker-width:var(--forge-file-picker-width, auto);--_file-picker-height:var(--forge-file-picker-height, auto);--_file-picker-max-width:var(--forge-file-picker-max-width, auto);--_file-picker-border-width:var(--forge-file-picker-border-width, var(--forge-border-thin, 1px));--_file-picker-border-style:var(--forge-file-picker-border-style, dashed);--_file-picker-border-color:var(--forge-file-picker-border-color, var(--forge-theme-outline-low, #9e9e9e));--_file-picker-gap:var(--forge-file-picker-gap, var(--forge-spacing-medium, 16px));--_file-picker-padding:var(--forge-file-picker-padding, var(--forge-spacing-medium, 16px));--_file-picker-padding-block:var(--forge-file-picker-padding-block, 0);--_file-picker-padding-inline:var(--forge-file-picker-padding-inline, var(--_file-picker-padding));--_file-picker-disabled-opacity:var(--forge-file-picker-disabled-opacity, 0.38);--_file-picker-highlight-background:var(--forge-file-picker-highlight-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_file-picker-highlight-border-color:var(--forge-file-picker-highlight-border-color, var(--forge-theme-primary, #3f51b5))}.forge-file-picker{display:grid;justify-content:center;align-content:center;gap:var(--_file-picker-gap);box-sizing:border-box;padding:var(--_file-picker-padding);height:var(--_file-picker-height);width:var(--_file-picker-width);max-width:var(--_file-picker-max-width);text-align:center;background:var(--_file-picker-background);cursor:pointer;border-width:var(--_file-picker-border-width);border-style:var(--_file-picker-border-style);border-color:var(--_file-picker-border-color)}.forge-file-picker[disabled]{opacity:var(--_file-picker-disabled-opacity);cursor:unset}.forge-file-picker:not(.compact).highlight{--_file-picker-border-color:var(--_file-picker-highlight-border-color);--_file-picker-background:var(--_file-picker-highlight-background)}.primary{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);color:var(--forge-theme-text-high,rgba(0,0,0,.87));max-width:var(--_file-picker-max-width)}.secondary{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);color:var(--forge-theme-text-high,rgba(0,0,0,.87));max-width:var(--_file-picker-max-width)}.input{display:none}.helper-text ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);text-align:start}.borderless{--_file-picker-width:var(--forge-file-picker-width, 100%);border:none}.borderless:not(.compact).highlight{border:none}.borderless+.helper-text{display:none}.compact{--_file-picker-height:var(--forge-file-picker-height, fit-content);--_file-picker-width:var(--forge-file-picker-width, fit-content);--_file-picker-background-color:var(--forge-file-picker-background-color, transparent);--_file-picker-padding:var(--forge-file-picker-padding, 0);border:none}.compact .primary,.compact .secondary{display:none}.compact .button{--_file-picker-width:var(--forge-file-picker-width, auto);background-color:transparent}',Gt=class extends M{static get observedAttributes(){return[w1.attributes.ACCEPT,w1.attributes.MAX_SIZE,w1.attributes.CAPTURE,w1.attributes.MULTIPLE,w1.attributes.DISABLED,w1.attributes.COMPACT,w1.attributes.BORDERLESS]}constructor(){super(),H(this,F_,U_),this._core=new Gs(new Ws(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case w1.attributes.ACCEPT:this.accept=a;break;case w1.attributes.MAX_SIZE:this.maxSize=W(a);break;case w1.attributes.CAPTURE:this.capture=a;break;case w1.attributes.MULTIPLE:this.multiple=p(a);break;case w1.attributes.DISABLED:this.disabled=p(a);break;case w1.attributes.COMPACT:this.compact=p(a);break;case w1.attributes.BORDERLESS:this.borderless=p(a);break}}};s([v()],Gt.prototype,"accept",2),s([v()],Gt.prototype,"maxSize",2),s([v()],Gt.prototype,"capture",2),s([v()],Gt.prototype,"multiple",2),s([v()],Gt.prototype,"disabled",2),s([v()],Gt.prototype,"compact",2),s([v()],Gt.prototype,"borderless",2),Gt=s([y({name:w1.elementName,dependencies:[V2]})],Gt);var rd=class extends X1{constructor(t){super(t)}_build(){return document.createElement(w1.elementName)}_configure(){var t,e,a,o;if((t=this._config.options)!=null&&t.primaryText){let n=document.createElement("span");n.slot="primary",n.textContent=this._config.options.primaryText,this._element.appendChild(n)}if((e=this._config.options)!=null&&e.secondaryText){let n=document.createElement("span");n.slot="secondary",n.textContent=this._config.options.secondaryText,this._element.appendChild(n)}if((a=this._config.options)!=null&&a.buttonText&&new xi({options:{parent:this._element,text:this._config.options.buttonText},props:{variant:"outlined"}}),(o=this._config.options)!=null&&o.helperText){let n=document.createElement("span");n.slot="helper-text",n.textContent=this._config.options.helperText,this._element.appendChild(n)}}onChange(t){this._element.addEventListener(w1.events.FILES_CHANGED,e=>t(e.detail))}};function nd(){x(Gt)}var id=`${b}fab`,sd={THEME:"theme",DENSITY:"density",ELEVATION:"elevation"},W_=w({},sd),G_={LABEL_SLOT:"slot[name=label]"},Y_={EXTENDED:`${id}--extended`},K_={DEFAULT_THEME:"secondary",DEFAULT_DENSITY:"medium",DEFAULT_ELEVATION:"raised"},Q1={elementName:id,observedAttributes:sd,attributes:W_,selectors:G_,classes:Y_,defaults:K_};var Ys=class extends R0{constructor(t){super(t),this._labelSlotElement=g(this._component,Q1.selectors.LABEL_SLOT)}initialize(){super.initialize(),this._extendedObserver||this._startExtendedWatcher(),this._detectExtendedState()}destroy(){var t;(t=this._extendedObserver)==null||t.disconnect(),this._extendedObserver=void 0}toggleDefaultPopoverIcon(t){super.toggleDefaultPopoverIcon(t),this._detectExtendedState()}_startExtendedWatcher(){this._extendedObserver=new MutationObserver(()=>this._detectExtendedState()),this._extendedObserver.observe(this._component,{childList:!0,subtree:!0,characterData:!0})}_detectExtendedState(){if(this._labelSlotElement.assignedNodes().length>0){this._rootElement.classList.add(Q1.classes.EXTENDED);return}this._rootElement.classList.remove(Q1.classes.EXTENDED),this._component.clientWidth>this._component.clientHeight&&this._rootElement.classList.add(Q1.classes.EXTENDED)}};var Ks=class extends N0{constructor(e){super(e);this._theme=Q1.defaults.DEFAULT_THEME;this._density=Q1.defaults.DEFAULT_DENSITY;this._elevation=Q1.defaults.DEFAULT_ELEVATION}destroy(){this._adapter.destroy()}get theme(){return this._theme}set theme(e){if(this._theme!==e){this._theme=e!=null?e:Q1.defaults.DEFAULT_THEME;let a=this._theme!==Q1.defaults.DEFAULT_THEME;this._adapter.toggleHostAttribute(Q1.attributes.THEME,a,this._theme)}}get density(){return this._density}set density(e){if(this._density!==e){this._density=e!=null?e:Q1.defaults.DEFAULT_DENSITY;let a=this._density!==Q1.defaults.DEFAULT_DENSITY;this._adapter.toggleHostAttribute(Q1.attributes.DENSITY,a,this._density)}}get elevation(){return this._elevation}set elevation(e){if(this._elevation!==e){this._elevation=e!=null?e:Q1.defaults.DEFAULT_ELEVATION;let a=this._elevation!==Q1.defaults.DEFAULT_ELEVATION;this._adapter.toggleHostAttribute(Q1.attributes.ELEVATION,a,this._elevation)}}};var q_='<template><div class="forge-fab" part="root"><slot name="start"></slot><slot></slot><slot name="label"></slot><slot name="end"></slot><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div></template>',$_=':host{--_fab-display:var(--forge-fab-display, inline-flex);--_fab-disabled-cursor:var(--forge-fab-disabled-cursor, not-allowed)}:host{display:var(--_fab-display);position:relative;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-fab{--_fab-gap:var(--forge-fab-gap, var(--forge-spacing-xsmall, 8px));--_fab-background:var(--forge-fab-background, var(--forge-theme-secondary, #ffc107));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-secondary, #000000));--_fab-size:var(--forge-fab-size, 56px);--_fab-padding:var(--forge-fab-padding, var(--forge-spacing-xsmall, 8px));--_fab-shadow:var(--forge-fab-shadow, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_fab-hover-shadow:var(--forge-fab-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_fab-active-shadow:var(--forge-fab-active-shadow, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-shadow:var(--forge-fab-lowered-shadow, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-hover-shadow:var(--forge-fab-lowered-hover-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-active-shadow:var(--forge-fab-lowered-active-shadow, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_fab-transition-duration:var(--forge-fab-transition-duration, var(--forge-animation-duration-short3, 150ms));--_fab-transition-timing:var(--forge-fab-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_fab-shape:var(--forge-fab-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_fab-shape-start-start:var(--forge-fab-shape-start-start, var(--_fab-shape));--_fab-shape-start-end:var(--forge-fab-shape-start-end, var(--_fab-shape));--_fab-shape-end-start:var(--forge-fab-shape-end-start, var(--_fab-shape));--_fab-shape-end-end:var(--forge-fab-shape-end-end, var(--_fab-shape));--_fab-extended-padding:var(--forge-fab-extended-padding, var(--forge-spacing-medium-large, 20px));--_fab-extended-min-width:var(--forge-fab-extended-min-width, 96px);--_fab-density-small-size:var(--forge-fab-density-small-size, 40px);--_fab-density-medium-size:var(--forge-fab-density-medium-size, var(--_fab-size));--_fab-density-large-size:var(--forge-fab-density-large-size, 96px);--_fab-disabled-background:var(--forge-fab-disabled-background, var(--forge-theme-surface-container, #e0e0e0));--_fab-disabled-color:var(--forge-fab-disabled-color, var(--forge-theme-on-surface-container, #000000));--_fab-disabled-opacity:var(--forge-fab-disabled-opacity, 0.38)}.forge-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:inline-flex;justify-content:center;align-items:center;gap:var(--_fab-gap);z-index:0;background:var(--_fab-background);color:var(--_fab-color);cursor:pointer;box-shadow:var(--_fab-shadow);box-sizing:border-box;height:var(--_fab-density-medium-size);min-width:var(--_fab-density-medium-size);padding-inline:var(--_fab-padding);border-width:medium;border-style:none;border-color:currentColor;border-top-left-radius:var(--_fab-shape-start-start);border-top-right-radius:var(--_fab-shape-start-end);border-bottom-left-radius:var(--_fab-shape-end-start);border-bottom-right-radius:var(--_fab-shape-end-end);user-select:none;white-space:nowrap;transition-property:box-shadow,background,color;transition-duration:var(--_fab-transition-duration);transition-timing-function:var(--_fab-transition-timing)}.forge-fab:hover{--_fab-shadow:var(--_fab-hover-shadow)}.forge-fab:active{--_fab-shadow:var(--_fab-active-shadow)}.forge-fab--extended{--_fab-padding:var(--_fab-extended-padding);min-width:var(--_fab-extended-min-width)}.with-anchor{padding-inline:0}::slotted(a){height:100%;width:100%;outline:0;border-radius:var(--_fab-shape);padding-inline:var(--_fab-padding);display:flex;align-items:center;justify-content:center;gap:var(--_fab-gap);color:var(--_fab-color);text-decoration:none}forge-focus-indicator{--forge-focus-indicator-color:var(--_fab-background);--forge-focus-indicator-shape-start-start:var(--_fab-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_fab-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_fab-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_fab-shape-end-end)}forge-state-layer{--forge-state-layer-color:var(--_fab-color)}:host(:is([dense],[density=small])) .forge-fab{--_fab-size:var(--_fab-density-small-size)}:host([density=large]) .forge-fab{--_fab-size:var(--_fab-density-large-size);--_fab-shape:var(--forge-fab-shape, calc(var(--forge-shape-extra-large, 16px) * var(--forge-shape-factor, 1)))}:host([elevation=lowered]) .forge-fab{--_fab-shadow:var(--_fab-lowered-shadow)}:host([elevation=lowered]) .forge-fab:hover{--_fab-shadow:var(--_fab-lowered-hover-shadow)}:host([elevation=lowered]) .forge-fab:active{--_fab-shadow:var(--_fab-lowered-active-shadow)}:host([disabled]){cursor:var(--_fab-disabled-cursor)}:host([disabled]) .forge-fab{--_fab-background:var(--_fab-disabled-background);--_fab-color:var(--_fab-disabled-color);pointer-events:none;opacity:var(--_fab-disabled-opacity)}:host([theme=primary]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-primary, #3f51b5));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-primary, #ffffff))}:host([theme=tertiary]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-tertiary, #3d5afe));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=success]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-success, #2e7d32));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-success, #ffffff))}:host([theme=error]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-error, #b00020));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-error, #ffffff))}:host([theme=warning]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-warning, #d14900));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=info]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-info, #1565c0));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-info, #ffffff))}',_0=class extends Wt{static get observedAttributes(){return[...Object.values(v2.observedAttributes),...Object.values(Q1.observedAttributes)]}constructor(){super(),H(this,q_,$_),this._core=new Ks(new Ys(this))}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case Q1.attributes.THEME:this.theme=a;return;case Q1.attributes.DENSITY:this.density=a;return;case Q1.attributes.ELEVATION:this.elevation=a;return}super.attributeChangedCallback(t,e,a)}};s([v()],_0.prototype,"theme",2),s([v()],_0.prototype,"density",2),s([v()],_0.prototype,"elevation",2),_0=s([y({name:Q1.elementName,dependencies:[Q,r1,X]})],_0);var ld=class extends X1{constructor(t){super(t)}_build(){var e,a,o,n,i;let t=document.createElement(Q1.elementName);if((e=this._config.options)!=null&&e.theme&&(t.theme=this._config.options.theme),(a=this._config.options)!=null&&a.density&&(t.density=this._config.options.density),(o=this._config.options)!=null&&o.elevation&&(t.elevation=this._config.options.elevation),(i=(n=this._config.options)==null?void 0:n.label)!=null&&i.trim().length){let l=document.createElement("span");l.slot="label",t.textContent=this._config.options.label,t.appendChild(l)}return t}_configure(){this._configureIcon()}_configureIcon(){var e,a;if(!((e=this._config.options)!=null&&e.iconName))return;switch(((a=this._config.options)==null?void 0:a.iconType)||"component"){case"font":let o=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[ke];y1(o,this._element),this._element.textContent=this._config.options.iconName;break;case"component":this._iconElement=document.createElement(h1.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&y1(this._config.options.iconClass,this._iconElement),this._element.appendChild(this._iconElement);break}}get iconElement(){return this._iconElement}get disabled(){return!!this._element.disabled}set disabled(t){this._element.disabled=t}onClick(t){this._element.addEventListener("click",t)}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}};function vd(){x(_0)}var X_=`${b}inline-message`,j_={THEME:"theme"},Z_={THEME:"info"},Eo={elementName:X_,attributes:j_,defaults:Z_};var Q_='<template><div class="forge-inline-message" part="root"><slot name="icon"></slot><div class="container" part="container"><slot name="title"></slot><slot></slot></div></div></template>',J_=':host{display:block}:host([hidden]){display:none}.forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-info-container-low, #e3edf7));--_inline-message-color:var(--forge-inline-message-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_inline-message-shape:var(--forge-inline-message-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_inline-message-padding:var(--forge-inline-message-padding, var(--forge-spacing-small, 12px));--_inline-message-padding-inline:var(--forge-inline-message-padding-inline, var(--_inline-message-padding));--_inline-message-padding-block:var(--forge-inline-message-padding-block, var(--_inline-message-padding));--_inline-message-border-width:var(--forge-inline-message-border-width, var(--forge-border-thin, 1px));--_inline-message-border-style:var(--forge-inline-message-border-style, none);--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-info-container, #c7daf0));--_inline-message-gap:var(--forge-inline-message-gap, var(--forge-spacing-small, 12px));--_inline-message-icon-gap:var(--forge-inline-message-icon-gap, var(--_inline-message-gap));--_inline-message-content-gap:var(--forge-inline-message-content-gap, var(--_inline-message-gap));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-info-container-low, #0b3768))}.forge-inline-message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);background:var(--_inline-message-background);color:var(--_inline-message-color);border-radius:var(--_inline-message-shape);border-width:var(--_inline-message-border-width);border-style:var(--_inline-message-border-style);border-color:var(--_inline-message-border-color);display:flex;align-items:center;gap:var(--_inline-message-icon-gap);box-sizing:border-box;padding-inline:var(--_inline-message-padding-inline);padding-block:var(--_inline-message-padding-block)}.forge-inline-message .container{display:flex;flex-direction:column;gap:var(--_inline-message-content-gap)}::slotted(*){margin:0}::slotted([slot=title]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-font-size-scale, .875)));font-weight:var(--forge-typography-heading1-font-weight,500);line-height:var(--forge-typography-heading1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-heading1-letter-spacing, .0178571429em);text-transform:var(--forge-typography-heading1-text-transform,inherit);text-decoration:var(--forge-typography-heading1-text-decoration,inherit)}::slotted([slot=icon]){color:var(--_inline-message-icon-color);align-self:start}:host([theme=primary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-primary-container-low, #e8eaf6));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-primary-container-low, #222c62));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-secondary-container, #fff0c3));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-secondary-container, #8a6804));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-secondary, #ffc107))}:host([theme=tertiary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-tertiary-container-low, #213189));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-tertiary-container, #d0d7ff))}:host([theme=success]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-success-container-low, #e6efe6));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-success-container-low, #19441b));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=warning]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-warning-container-low, #f9e9e0));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-warning-container-low, #712700));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-warning-container, #f4d3c2))}:host(:is([theme=error],[theme=danger])) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-error-container-low, #f6e0e4));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-error-container-low, #5f0011));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=info-secondary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-surface-container-low, #ebebeb));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-surface-container-low, #000000));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-surface-container, #e0e0e0))}',Co=class extends M{constructor(){super(),H(this,Q_,J_)}get theme(){var t;return(t=this.getAttribute(Eo.attributes.THEME))!=null?t:Eo.defaults.THEME}set theme(t){K(this,t!==Eo.defaults.THEME,Eo.attributes.THEME,t)}};Co=s([y({name:Eo.elementName})],Co);function hd(){x(Co)}var tf=":host{display:block}.forge-key{--_key-gap:var(--forge-key-gap, var(--forge-spacing-medium, 16px));--_key-direction:var(--forge-key-direction, row)}.forge-key{box-sizing:border-box;display:flex;flex-direction:var(--_key-direction);gap:var(--_key-gap);flex-wrap:wrap}",Ta=class extends st{constructor(){super(),this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),Ut(this,this._internals,{role:"list"})}render(){return re`<div part="root" class="forge-key"><slot></slot></div>`}};Ta.styles=oe(tf),Ta=s([Re("forge-key")],Ta);function cd(){ue("forge-key",Ta)}var ef=':host{display:inline}.forge-key-item{--_key-item-icon-color:var(--forge-key-item-icon-color, var(--forge-theme-tertiary, #3d5afe));--_key-item-label-color:var(--forge-key-item-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_key-item-value-color:var(--forge-key-item-value-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_key-item-gap:var(--forge-key-item-gap, var(--forge-spacing-xsmall, 8px));--_key-item-icon-size:var(--forge-key-item-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1))}.forge-key-item{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);box-sizing:border-box;display:grid;grid-template:"icon label" "icon value";column-gap:var(--_key-item-gap);inline-size:fit-content;line-height:normal}.forge-key-item.inline{grid-template:"icon label value";grid-template-columns:auto 1fr auto;align-items:center;inline-size:auto}.forge-key-item.no-value{grid-template:"icon label";align-items:center}.forge-key-item.no-value .value{display:none}.forge-key-item:not(.inline,.no-value) .label{padding-block-start:1px}.icon{--forge-icon-size:var(--_key-item-icon-size);grid-area:icon;color:var(--_key-item-icon-color)}.label{grid-area:label;color:var(--_key-item-label-color)}.value{grid-area:value;color:var(--_key-item-value-color)}.default-icon{block-size:calc(var(--_key-item-icon-size) - 1px);inline-size:calc(var(--_key-item-icon-size) - 1px);border-radius:50%;background:currentColor}',qe=class extends st{constructor(){super();this.inline=!1;this._hasValue=!1;this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),Ut(this,this._internals,{role:"listitem"}),this._handleSlotChange()}render(){return re`
|
|
16
|
+
`}async _tryLoadImage(){if(this.imageUrl){let e=new Image;e.onload=()=>this._image=e,e.onerror=()=>this._image=void 0,e.src=this.imageUrl}else this._image=void 0}};Ve.styles=oe(J8),s([S1()],Ve.prototype,"text",2),s([S1({type:Number,attribute:"letter-count"})],Ve.prototype,"letterCount",2),s([S1({type:String,attribute:"image-url"})],Ve.prototype,"imageUrl",2),s([ne()],Ve.prototype,"_image",2),Ve=s([Re(z4)],Ve);function ho(){ue(z4,Ve)}var e9=`${b}toolbar`,ac={INVERTED:"inverted"},a9=w({},ac),oc={TOOLBAR:"forge-toolbar"},o9={TOOLBAR:`.${oc.TOOLBAR}`,BEFORE_START:"slot[name=before-start]",START_SLOT:"slot[name=start]",CENTER_SLOT:"slot[name=center]",END_SLOT:"slot[name=end]",AFTER_END:"slot[name=after-end]"},mr={elementName:e9,observedAttributes:ac,attributes:a9,classes:oc,selectors:o9};var r9='<template><div class="forge-toolbar" part="root"><div class="section" part="before-section-start"><slot name="before-start"></slot></div><div class="inner center" part="inner"><div class="section" part="section-start"><slot name="start"></slot><slot></slot></div><div class="section center" part="section-center"><slot name="center"></slot></div><div class="section end" part="section-end"><slot name="end"></slot></div></div><div class="section end" part="after-section-end"><slot name="after-end"></slot></div></div></template>',n9=":host{display:block}:host([hidden]){display:none}.forge-toolbar{--_toolbar-background:var(--forge-toolbar-background, var(--forge-theme-surface, #ffffff));--_toolbar-height:var(--forge-toolbar-height, 56px);--_toolbar-min-height:var(--forge-toolbar-min-height, var(--_toolbar-height));--_toolbar-divider-width:var(--forge-toolbar-divider-width, var(--forge-border-thin, 1px));--_toolbar-divider-style:var(--forge-toolbar-divider-style, solid);--_toolbar-divider-color:var(--forge-toolbar-divider-color, var(--forge-theme-outline, #e0e0e0));--_toolbar-shape:var(--forge-toolbar-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_toolbar-start-start-shape:var(--forge-toolbar-start-start-shape, var(--_toolbar-shape));--_toolbar-start-end-shape:var(--forge-toolbar-start-end-shape, var(--_toolbar-shape));--_toolbar-end-start-shape:var(--forge-toolbar-end-start-shape, 0);--_toolbar-end-end-shape:var(--forge-toolbar-end-end-shape, 0);--_toolbar-padding:var(--forge-toolbar-padding, var(--forge-spacing-medium, 16px));--_toolbar-padding-block:var(--forge-toolbar-padding-block, 0);--_toolbar-padding-inline:var(--forge-toolbar-padding-inline, var(--_toolbar-padding));--_toolbar-columns:var(--forge-toolbar-columns, auto 1fr auto)}.forge-toolbar{display:grid;grid-template-columns:var(--_toolbar-columns);height:var(--_toolbar-height);min-height:var(--_toolbar-min-height);box-sizing:border-box;padding-inline:0;border-block-end-width:var(--_toolbar-divider-width);border-block-end-style:var(--_toolbar-divider-style);border-block-end-color:var(--_toolbar-divider-color);border-start-start-radius:var(--_toolbar-start-start-shape);border-start-end-radius:var(--_toolbar-start-end-shape);border-end-start-radius:var(--_toolbar-end-start-shape);border-end-end-radius:var(--_toolbar-end-end-shape);background:var(--_toolbar-background)}.inner{display:grid;grid-template-columns:var(--_toolbar-columns);padding-inline:var(--_toolbar-padding-inline);padding-block:var(--_toolbar-padding-block);box-sizing:border-box}.section{display:flex;align-items:center;width:100%;box-sizing:border-box}.section.center{justify-content:center}.section.end{justify-content:end}:host([inverted]) .forge-toolbar{--_toolbar-start-start-shape:var(--forge-toolbar-start-start-shape, 0);--_toolbar-start-end-shape:var(--forge-toolbar-start-end-shape, 0);--_toolbar-end-start-shape:var(--_toolbar-shape);--_toolbar-end-end-shape:var(--_toolbar-shape);border-block-end:none;border-block-start-width:var(--_toolbar-divider-width);border-block-start-style:var(--_toolbar-divider-style);border-block-start-color:var(--_toolbar-divider-color)}:host(:is([no-divider],[no-border])) .forge-toolbar{border:none}:host([no-padding]) .forge-toolbar{--_toolbar-padding:var(--forge-toolbar-padding, 0)}:host([auto-height]) .forge-toolbar{--_toolbar-height:var(--forge-toolbar-height, auto)}::slotted(:is(h1,h2,h3,h4,h5,h6,p)){margin:0}",se=class extends M{constructor(){super();this._inverted=!1;H(this,r9,n9)}static get observedAttributes(){return Object.values(mr.observedAttributes)}attributeChangedCallback(e,a,o){switch(e){case mr.observedAttributes.INVERTED:this.inverted=p(o);break}}get inverted(){return this._inverted}set inverted(e){this._inverted!==e&&(this._inverted=e,this.toggleAttribute(mr.attributes.INVERTED,this._inverted))}};se=s([y({name:mr.elementName})],se);function rc(){x(se)}var i9='<template><div class="forge-profile-card" part="root"><div class="info-container"><div class="avatar"><forge-avatar part="avatar"></forge-avatar></div><div class="info-text"><div class="full-name" part="name"></div><div class="email" part="email"></div></div></div><slot></slot><forge-toolbar inverted id="action-toolbar"><forge-button variant="outlined" slot="end" style="display: none" part="profile-button" id="profile-button">Profile</forge-button><forge-button slot="end" part="sign-out-button" id="sign-out-button">Sign out</forge-button></forge-toolbar></div></template>',s9=':host{display:block}:host([hidden]){display:none}.forge-profile-card{--_profile-card-min-width:var(--forge-profile-card-min-width, 360px);--_profile-card-shape:var(--forge-profile-card-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_profile-card-avatar-size:var(--forge-profile-card-avatar-size, 56px)}.forge-profile-card{min-width:var(--_profile-card-min-width);border-radius:var(--_profile-card-shape)}@media (max-width:399px){.forge-profile-card{width:100vw;min-width:unset;overflow:auto}}.forge-profile-card .info-container{display:flex;align-items:center;padding-block:var(--forge-spacing-xsmall,8px);padding-inline:var(--forge-spacing-medium,16px)}.forge-profile-card .avatar{display:flex;align-items:center;padding:var(--forge-spacing-xsmall,8px);margin-inline-end:var(--forge-spacing-medium,16px);--forge-avatar-size:var(--_profile-card-avatar-size)}.forge-profile-card .text{display:flex;flex-direction:column}.forge-profile-card .full-name{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading2-font-size-scale, 1)));font-weight:var(--forge-typography-heading2-font-weight,500);line-height:var(--forge-typography-heading2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading2-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-heading2-letter-spacing, .0125em);text-transform:var(--forge-typography-heading2-text-transform,inherit);text-decoration:var(--forge-typography-heading2-text-decoration,inherit)}.forge-profile-card .email{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-subheading1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-subheading1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-subheading1-font-size-scale, .875)));font-weight:var(--forge-typography-subheading1-font-weight,400);line-height:var(--forge-typography-subheading1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-subheading1-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-subheading1-letter-spacing, normal);text-transform:var(--forge-typography-subheading1-text-transform,inherit);text-decoration:var(--forge-typography-subheading1-text-decoration,inherit);color:var(--forge-theme-text-medium,rgba(0,0,0,.6))}#action-toolbar{--forge-toolbar-padding:8px}#action-toolbar forge-button:not(:last-of-type){margin-inline-end:8px}',F2=class extends M{static get observedAttributes(){return[Y.attributes.FULL_NAME,Y.attributes.EMAIL,Y.attributes.SIGN_OUT,Y.attributes.PROFILE,Y.attributes.SIGN_OUT_TEXT,Y.attributes.PROFILE_TEXT,Y.attributes.AVATAR_TEXT,Y.attributes.AVATAR_ICON,Y.attributes.AVATAR_IMAGE_URL,Y.attributes.AVATAR_LETTER_COUNT]}constructor(){super(),H(this,i9,s9),this._core=new ui(new wi(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case Y.attributes.FULL_NAME:this.fullName=a;break;case Y.attributes.EMAIL:this.email=a;break;case Y.attributes.SIGN_OUT:this.signOut=p(a);break;case Y.attributes.PROFILE:this.profile=p(a);break;case Y.attributes.SIGN_OUT_TEXT:this.signOutText=a;break;case Y.attributes.PROFILE_TEXT:this.profileText=a;break;case Y.attributes.AVATAR_TEXT:this.avatarText=a;break;case Y.attributes.AVATAR_ICON:this.avatarIcon=a;break;case Y.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=a;break;case Y.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=W(a);break}}focus(t){this._core.focus(t)}};ho(),s([v()],F2.prototype,"fullName",2),s([v()],F2.prototype,"email",2),s([v()],F2.prototype,"signOut",2),s([v()],F2.prototype,"profile",2),s([v()],F2.prototype,"signOutText",2),s([v()],F2.prototype,"profileText",2),s([v()],F2.prototype,"avatarText",2),s([v()],F2.prototype,"avatarIcon",2),s([v()],F2.prototype,"avatarImageUrl",2),s([v()],F2.prototype,"avatarLetterCount",2),F2=s([y({name:Y.elementName,dependencies:[se,V2,X]})],F2);function nc(){x(F2)}var l9=`${b}app-bar-profile-button`,v9={FULL_NAME:"full-name",EMAIL:"email",AVATAR_IMAGE_URL:"avatar-image-url",AVATAR_LETTER_COUNT:"avatar-letter-count",AVATAR_TEXT:"avatar-text",AVATAR_ICON:"avatar-icon",SIGN_OUT_BUTTON:"sign-out-button",PROFILE_BUTTON:"profile-button",SIGN_OUT_BUTTON_TEXT:"sign-out-button-text",PROFILE_BUTTON_TEXT:"profile-button-text",OPEN:"open"},h9=["aria-label","aria-labelledby"],_1={elementName:l9,attributes:v9,forwardedAttributes:h9};var Ci=class extends I{constructor(t){super(t)}get popupElement(){return this._popupElement}initialize(){this._avatarElement=Ft(this._component,Ca.elementName),this._iconButtonElement=Ft(this._component,J.elementName);let t=this._iconButtonElement.getAttribute("aria-labelledby");this._forwardObserver=S0(this._component,_1.forwardedAttributes,(e,a)=>{e==="aria-labelledby"&&!a&&(a=t),K(this._iconButtonElement,!!a,e,a!=null?a:void 0)})}destroy(){var t;(t=this._forwardObserver)==null||t.disconnect(),this._forwardObserver=void 0,this._popupElement&&(this._popupElement.remove(),this._popupElement=void 0,this._profileCardElement=void 0)}setClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}openPopup(t,e,a,o,n){var i;return(i=this._popupElement)!=null&&i.isConnected&&this._popupElement.remove(),this._profileCardElement=document.createElement(Y.elementName),this._profileCardElement.fullName=t.fullName,this._profileCardElement.email=t.email,this._profileCardElement.signOut=t.signOut,this._profileCardElement.profile=t.profile,this._profileCardElement.signOutText=t.signOutButtonText,this._profileCardElement.profileText=t.profileButtonText,this._profileCardElement.avatarText=t.avatarText,this._profileCardElement.avatarIcon=t.avatarIcon,this._profileCardElement.avatarImageUrl=t.avatarImageUrl,this._profileCardElement.avatarLetterCount=t.avatarLetterCount,this._profileCardElement.addEventListener(Y.events.PROFILE,()=>a()),this._profileCardElement.addEventListener(Y.events.SIGN_OUT,()=>o()),n&&this._profileCardElement.appendChild(n),this._popupElement=document.createElement("forge-popover"),this._popupElement.anchorElement=this._iconButtonElement,this._popupElement.placement="bottom-end",this._popupElement.arrow=!0,this._popupElement.persistent=!0,this._popupElement.appendChild(this._profileCardElement),this._component.ownerDocument.body.appendChild(this._popupElement),this._popupElement.open=!0,this._profileCardElement.tabIndex=-1,this._profileCardElement.focus(),_5(this._popupElement,()=>{if(!this._popupElement){e();return}!this._popupElement.matches(":focus-within")&&!this._component.matches(":focus-within")&&e()},!0)}async closePopup(){this._popupElement&&(await this._popupElement.hideAsync(),this._popupElement.remove(),this._popupElement=void 0,this._profileCardElement=void 0)}focusButtonElement(){this._iconButtonElement.focus()}setAvatarText(t){this._avatarElement.text=t,r2(this._avatarElement)}setAvatarIcon(t){if(t){let e=new P0({props:{name:t}});this._avatarElement.replaceChildren(e.element)}else r2(this._avatarElement)}setAvatarLetterCount(t){this._avatarElement.letterCount=t}setAvatarImageUrl(t){this._avatarElement.imageUrl=t}setSignOutButtonText(t){var e;this._profileCardElement&&(this._profileCardElement.signOutText=t,(e=this._popupElement)==null||e.position())}setProfileButtonText(t){var e;this._profileCardElement&&(this._profileCardElement.profileText=t,(e=this._popupElement)==null||e.position())}};var zi=class{constructor(t){this._adapter=t;this._avatarLetterCount=Ca.numbers.DEFAULT_LETTER_COUNT;this._showSignOutButton=Y.defaults.SHOW_SIGN_OUT_BUTTON;this._showProfileButton=Y.defaults.SHOW_PROFILE_BUTTON;this._signOutButtonText=Y.defaults.SIGN_OUT_BUTTON_TEXT;this._profileButtonText=Y.defaults.PROFILE_BUTTON_TEXT;this._open=!1;this._isInitialized=!1;this._clickListener=this._onClick.bind(this);this._dismissListener=this._onDismiss.bind(this);this._keydownListener=this._onKeydown.bind(this);this._profileButtonListener=this._onProfileButtonClick.bind(this);this._signOutButtonListener=this._onSignOutButtonClick.bind(this)}initialize(){this._adapter.initialize(),this._adapter.setClickListener(this._clickListener),this._adapter.setAvatarImageUrl(this._avatarImageUrl),this._adapter.setAvatarLetterCount(this._avatarLetterCount),this._adapter.setAvatarText(this._avatarText),this._adapter.setAvatarIcon(this._avatarIcon),this._isInitialized=!0}destroy(){this._adapter.removeDocumentListener("keydown",this._keydownListener),this._adapter.removeClickListener(this._clickListener),this._adapter.destroy(),this._isInitialized=!1}_onClick(t){this._open?this._closeDropdown():this._openDropdown()}_onKeydown(t){t.key==="Escape"&&(this._closeDropdown(),this._adapter.focusButtonElement())}_onDismiss(){this._closeDropdown()}_onProfileButtonClick(){this._adapter.dispatchHostEvent(new CustomEvent(Y.events.PROFILE,{bubbles:!0,composed:!0})),this._closeDropdown()}_onSignOutButtonClick(){this._adapter.dispatchHostEvent(new CustomEvent(Y.events.SIGN_OUT,{bubbles:!0,composed:!0})),this._closeDropdown()}_openDropdown(){if(this._open)return;let t={fullName:this._fullName,email:this._email,signOut:this._showSignOutButton,profile:this._showProfileButton,signOutButtonText:this._signOutButtonText,profileButtonText:this._profileButtonText,avatarText:this._avatarText,avatarIcon:this._avatarIcon,avatarImageUrl:this._avatarImageUrl,avatarLetterCount:this._avatarLetterCount},e=this._profileCardBuilder?this._profileCardBuilder():void 0;this._cancelDismissListener=this._adapter.openPopup(t,this._dismissListener,this._profileButtonListener,this._signOutButtonListener,e),this._adapter.addDocumentListener("keydown",this._keydownListener),this._open=!0,this._adapter.toggleHostAttribute(_1.attributes.OPEN,this._open)}_closeDropdown(){this._open&&(this._cancelDismissListener&&t0(this._cancelDismissListener)&&(this._cancelDismissListener(),this._cancelDismissListener=void 0),this._open=!1,this._adapter.closePopup(),this._adapter.toggleHostAttribute(_1.attributes.OPEN,this._open))}get fullName(){return this._fullName}set fullName(t){this._fullName!==t&&(this._fullName=t,this.avatarText=this._fullName,this._adapter.setHostAttribute(_1.attributes.FULL_NAME,this._fullName))}get email(){return this._email}set email(t){this._email!==t&&(this._email=t,this._adapter.setHostAttribute(_1.attributes.EMAIL,this._email))}get avatarImageUrl(){return this._avatarImageUrl}set avatarImageUrl(t){this._avatarImageUrl!==t&&(this._avatarImageUrl=t,this._isInitialized&&(this._adapter.setAvatarImageUrl(this._avatarImageUrl),this._adapter.setHostAttribute(_1.attributes.AVATAR_IMAGE_URL,this._avatarImageUrl)))}get avatarLetterCount(){return this._avatarLetterCount}set avatarLetterCount(t){this._avatarLetterCount!==t&&(this._avatarLetterCount=t,this._isInitialized&&(this._adapter.setAvatarLetterCount(this._avatarLetterCount),this._adapter.setHostAttribute(_1.attributes.AVATAR_LETTER_COUNT,String(this._avatarLetterCount))))}get avatarText(){return this._avatarText}set avatarText(t){this._avatarText!==t&&(this._avatarText=t,this._isInitialized&&(this._adapter.setAvatarText(this._avatarText),this._adapter.toggleHostAttribute(_1.attributes.AVATAR_TEXT,!!this._avatarText,this._avatarText)))}get avatarIcon(){return this._avatarIcon}set avatarIcon(t){this._avatarIcon!==t&&(this._avatarIcon=t,this._isInitialized&&(this._adapter.setAvatarIcon(this._avatarIcon),this._adapter.toggleHostAttribute(_1.attributes.AVATAR_ICON,!!this._avatarIcon,this._avatarIcon)))}get signOutButton(){return this._showSignOutButton}set signOutButton(t){t=!!t,this._showSignOutButton!==t&&(this._showSignOutButton=t,this._adapter.toggleHostAttribute(_1.attributes.SIGN_OUT_BUTTON,this._showSignOutButton))}get profileButton(){return this._showProfileButton}set profileButton(t){t=!!t,this._showProfileButton!==t&&(this._showProfileButton=t,this._adapter.toggleHostAttribute(_1.attributes.PROFILE_BUTTON,this._showProfileButton))}get signOutButtonText(){return this._signOutButtonText}set signOutButtonText(t){this._signOutButtonText!==t&&(this._signOutButtonText=t,this._adapter.setSignOutButtonText(t))}get profileButtonText(){return this._profileButtonText}set profileButtonText(t){this._profileButtonText!==t&&(this._profileButtonText=t,this._adapter.setProfileButtonText(t))}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(t?this._openDropdown():this._closeDropdown())}get popupElement(){return this._adapter.popupElement}get profileCardBuilder(){return this._profileCardBuilder}set profileCardBuilder(t){this._profileCardBuilder=t}};var c9='<template><forge-icon-button><forge-avatar aria-hidden="true"></forge-avatar></forge-icon-button><forge-tooltip type="label" placement="bottom">View profile</forge-tooltip></template>',U2=class extends M{static get observedAttributes(){return[_1.attributes.FULL_NAME,_1.attributes.EMAIL,_1.attributes.AVATAR_IMAGE_URL,_1.attributes.AVATAR_LETTER_COUNT,_1.attributes.AVATAR_TEXT,_1.attributes.AVATAR_ICON,_1.attributes.SIGN_OUT_BUTTON,_1.attributes.PROFILE_BUTTON,_1.attributes.SIGN_OUT_BUTTON_TEXT,_1.attributes.PROFILE_BUTTON_TEXT,_1.attributes.OPEN]}constructor(){super(),this._core=new zi(new Ci(this))}initializedCallback(){V0(this,c9)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case _1.attributes.FULL_NAME:this.fullName=a;break;case _1.attributes.EMAIL:this.email=a;break;case _1.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=a;break;case _1.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=W(a);break;case _1.attributes.AVATAR_TEXT:this.avatarText=a;break;case _1.attributes.AVATAR_ICON:this.avatarIcon=a;break;case _1.attributes.SIGN_OUT_BUTTON:this.signOutButton=p(a);break;case _1.attributes.PROFILE_BUTTON:this.profileButton=p(a);break;case _1.attributes.SIGN_OUT_BUTTON_TEXT:this.signOutButtonText=a;break;case _1.attributes.PROFILE_BUTTON_TEXT:this.profileButtonText=a;break;case _1.attributes.OPEN:this.open=p(a);break}}get popupElement(){return this._core.popupElement}};ho(),s([v()],U2.prototype,"fullName",2),s([v()],U2.prototype,"email",2),s([v()],U2.prototype,"avatarImageUrl",2),s([v()],U2.prototype,"avatarLetterCount",2),s([v()],U2.prototype,"avatarText",2),s([v()],U2.prototype,"avatarIcon",2),s([v()],U2.prototype,"signOutButton",2),s([v()],U2.prototype,"profileButton",2),s([v()],U2.prototype,"signOutButtonText",2),s([v()],U2.prototype,"profileButtonText",2),s([v()],U2.prototype,"open",2),s([v()],U2.prototype,"profileCardBuilder",2),U2=s([y({name:_1.elementName,dependencies:[P1,F2,n1,p1]})],U2);function ic(){x(U2)}var p9=`${b}divider`,d9={VERTICAL:"vertical"},co={elementName:p9,attributes:d9};var m9='<template><div class="forge-divider" part="root"></div></template>',g9=":host{--_divider-margin:var(--forge-divider-margin, 0)}:host{display:block;margin:var(--_divider-margin)}:host([hidden]){display:none}.forge-divider{--_divider-color:var(--forge-divider-color, var(--forge-theme-outline, #e0e0e0));--_divider-width:var(--forge-divider-width, var(--forge-border-thin, 1px));--_divider-border-style:var(--forge-divider-border-style, solid)}.forge-divider{border:none;border-bottom-color:var(--_divider-color);border-bottom-width:var(--_divider-width);border-bottom-style:var(--_divider-border-style);height:0}:host([vertical]){display:inline-block;height:100%}:host([vertical]) .forge-divider{border:none;border-right-color:var(--_divider-color);border-right-width:var(--_divider-width);border-right-style:var(--_divider-border-style);height:100%;width:0}",Z0=class extends M{static get observedAttributes(){return[co.attributes.VERTICAL]}constructor(){super(),H(this,m9,g9)}attributeChangedCallback(t,e,a){switch(t){case co.attributes.VERTICAL:this.vertical=p(a);break}}get vertical(){return this.hasAttribute(co.attributes.VERTICAL)}set vertical(t){this.toggleAttribute(co.attributes.VERTICAL,t)}};Z0=s([y({name:co.elementName})],Z0);function sc(){x(Z0)}var lc=r=>typeof r.labelChangedCallback=="function";var A4=Symbol("privateIsFocusable"),Ai=Symbol("externalTabIndex"),Bi=Symbol("isUpdatingTabIndex"),B4=Symbol("updateTabIndex");function Fe(r){var e,a,o;class t extends r{constructor(){super(...arguments);this[o]=!1;this[a]=null;this[e]=!1}get[$1](){return this[A4]}set[$1](l){this[$1]!==l&&(this[A4]=l,this[B4]())}connectedCallback(){var l;this[$1]=!0,(l=super.connectedCallback)==null||l.call(this)}attributeChangedCallback(l,h,c){var d;if((d=super.attributeChangedCallback)==null||d.call(this,l,h,c),!(l!=="tabindex"||this[Bi])){if(!this.hasAttribute("tabindex")){this[Ai]=null,this[B4]();return}this[Ai]=this.tabIndex}}[(o=A4,a=Ai,e=Bi,B4)](){var c;let l=this[$1]?0:-1,h=(c=this[Ai])!=null?c:l;this[Bi]=!0,this.tabIndex=h,this[Bi]=!1}}return t}var Ti=class extends I{constructor(t){super(t),this._focusIndicatorElement=g(t,m1.elementName),this._stateLayerElement=g(t,M1.elementName)}initialize(){this._component[P]({role:"button"},{setAttribute:!this._component.hasAttribute("role")}),this._component[P]({ariaPressed:`${!!this._component.selected}`,ariaDisabled:`${!!this._component.disabled}`}),this._component[$1]=!this._component.disabled}setSelected(t){this._component[P]({ariaPressed:`${!!t}`})}setDisabled(t){this._component[P]({ariaDisabled:`${!!t}`}),this._component[$1]=!t,this._stateLayerElement.disabled=t}forceFocusVisible(){this._focusIndicatorElement.active=!0}};var vc=`${b}button-toggle`,hc={SELECTED:"selected",VALUE:"value",DISABLED:"disabled",READONLY:"readonly",TABINDEX:"tabindex"},w9=w({},hc),u9={SELECT:`${vc}-select`},Z2={elementName:vc,observedAttributes:hc,attributes:w9,events:u9};var Si=class{constructor(t){this._adapter=t;this._selected=!1;this._disabled=!1;this._readonly=!1;this._clickListener=t=>this._onClick(t);this._keydownListener=t=>this._onKeyDown(t)}initialize(){this._adapter.initialize(),!this._disabled&&!this._readonly&&this._applyListeners()}destroy(){this._removeListeners()}focus(t={focusVisible:!0}){this._adapter.focusHost(t),t.focusVisible&&this._adapter.forceFocusVisible()}click(){this._adapter.clickHost()}_applyListeners(){this._adapter.addHostListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keydownListener)}_removeListeners(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeHostListener("keydown",this._keydownListener)}async _onClick(t){let e=this._selected;this._selected=!this._selected;let a={value:this._value,selected:this._selected},o=new CustomEvent(Z2.events.SELECT,{detail:a,bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(o),await Qt(),this._selected=e,!o.defaultPrevented&&(this.selected=!e)}_onKeyDown(t){t.key===" "&&(t.preventDefault(),this.click())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t)}get selected(){return this._selected}set selected(t){t=!!t,this._selected!==t&&(this._selected=t,this._adapter.setSelected(this._selected),this._adapter.toggleHostAttribute(Z2.attributes.SELECTED,this._selected))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._disabled?this._removeListeners():this._applyListeners(),this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(Z2.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){t=!!t,this._readonly!==t&&(this._readonly=t,this._readonly?this._removeListeners():this._applyListeners(),this._adapter.toggleHostAttribute(Z2.attributes.READONLY,this._readonly))}};var _9='<template><div class="forge-button-toggle" part="root"><slot name="start"></slot><slot></slot><slot name="end"></slot><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div></template>',f9=':host{--_button-toggle-display:var(--forge-button-toggle-display, inline-flex)}:host{display:var(--_button-toggle-display);position:relative;outline:0;height:100%;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-button-toggle{--_button-toggle-min-width:var(--forge-button-toggle-min-width, auto);--_button-toggle-spacing:var(--forge-button-toggle-spacing, var(--forge-spacing-xsmall, 8px));--_button-toggle-padding-block:var(--forge-button-toggle-padding-block, 2px);--_button-toggle-padding-inline:var(--forge-button-toggle-padding-inline, 8px);--_button-toggle-icon-size:var(--forge-button-toggle-icon-size, var(--forge-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125)));--_button-toggle-color:var(--forge-button-toggle-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_button-toggle-background:var(--forge-button-toggle-background, transparent);--_button-toggle-hover-background:var(--forge-button-toggle-hover-background, var(--_button-toggle-background));--_button-toggle-active-background:var(--forge-button-toggle-active-background, var(--_button-toggle-background));--_button-toggle-cursor:var(--forge-button-toggle-cursor, pointer);--_button-toggle-border-width:var(--forge-button-toggle-border-width, medium);--_button-toggle-border-style:var(--forge-button-toggle-border-style, none);--_button-toggle-border-color:var(--forge-button-toggle-border-color, var(--forge-theme-outline-medium, #757575));--_button-toggle-shape:var(--forge-button-toggle-shape, calc(var(--forge-shape-small, 2px) * var(--forge-shape-factor, 1)));--_button-toggle-shape-start-start:var(--forge-button-toggle-shape-start-start, var(--_button-toggle-shape));--_button-toggle-shape-start-end:var(--forge-button-toggle-shape-start-end, var(--_button-toggle-shape));--_button-toggle-shape-end-start:var(--forge-button-toggle-shape-end-start, var(--_button-toggle-shape));--_button-toggle-shape-end-end:var(--forge-button-toggle-shape-end-end, var(--_button-toggle-shape));--_button-toggle-selected-background:var(--forge-button-toggle-selected-background, var(--forge-theme-tertiary-container, #d0d7ff));--_button-toggle-selected-color:var(--forge-button-toggle-selected-color, var(--forge-theme-on-tertiary-container, #213189));--_button-toggle-selected-disabled-background:var(--forge-button-toggle-selected-disabled-background, var(--forge-theme-surface-container, #e0e0e0));--_button-toggle-disabled-opacity:var(--forge-button-toggle-disabled-opacity, 0.38);--_button-toggle-disabled-cursor:var(--forge-button-toggle-disabled-cursor, not-allowed);--_button-toggle-disabled-color:var(--forge-button-toggle-disabled-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_button-toggle-disabled-background:var(--forge-button-toggle-disabled-background, transparent);--_button-toggle-transition-duration:var(--forge-button-toggle-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-toggle-transition-timing:var(--forge-button-toggle-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-toggle-focus-indicator-color:var(--forge-button-toggle-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_button-toggle-focus-indicator-offset:var(--forge-button-toggle-focus-indicator-offset, 0px)}.forge-button-toggle{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:var(--_button-toggle-display);align-items:center;justify-content:center;gap:var(--_button-toggle-spacing);z-index:0;box-sizing:border-box;min-inline-size:var(--_button-toggle-min-width);inline-size:100%;border-width:var(--_button-toggle-border-width);border-style:var(--_button-toggle-border-style);border-color:var(--_button-toggle-border-color);border-start-start-radius:var(--_button-toggle-shape-start-start);border-start-end-radius:var(--_button-toggle-shape-start-end);border-end-start-radius:var(--_button-toggle-shape-end-start);border-end-end-radius:var(--_button-toggle-shape-end-end);padding-block:var(--_button-toggle-padding-block);padding-inline:var(--_button-toggle-padding-inline);outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;text-decoration:none;white-space:nowrap;background:var(--_button-toggle-background);color:var(--_button-toggle-color);cursor:var(--_button-toggle-cursor);transition-property:color,background-color,border-color;transition-duration:var(--_button-toggle-transition-duration);transition-timing-function:var(--_button-toggle-transition-timing)}.forge-button-toggle forge-state-layer{--forge-state-layer-color:var(--_button-toggle-color)}.forge-button-toggle forge-focus-indicator{--forge-focus-indicator-outward-offset:var(--_button-toggle-focus-indicator-offset);--forge-focus-indicator-color:var(--_button-toggle-focus-indicator-color);--forge-focus-indicator-shape:var(--_button-toggle-shape);--forge-focus-indicator-shape-start-start:var(--_button-toggle-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_button-toggle-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_button-toggle-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_button-toggle-shape-end-end)}::slotted(:is([slot=start],[slot=end])){font-size:var(--_button-toggle-icon-size)}:host([selected]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-selected-background);--_button-toggle-color:var(--_button-toggle-selected-color);--_button-toggle-border-color:var(--_button-toggle-background)}:host([disabled]){--_button-toggle-cursor:var(--_button-toggle-disabled-cursor);cursor:not-allowed}:host([disabled]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-disabled-background);--_button-toggle-color:var(--_button-toggle-disabled-color);opacity:var(--_button-toggle-disabled-opacity);pointer-events:none}:host([disabled][selected]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-selected-disabled-background)}',le=class extends L1(H1(Fe(M))){static get observedAttributes(){return Object.values(Z2.observedAttributes)}constructor(){super(),H(this,_9,f9),this._core=new Si(new Ti(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case Z2.attributes.VALUE:this.value=a;return;case Z2.attributes.SELECTED:this.selected=p(a);return;case Z2.attributes.DISABLED:this.disabled=p(a);return;case Z2.attributes.READONLY:this.readonly=p(a);return}super.attributeChangedCallback(t,e,a)}focus(t){this._core.focus(t)}click(){this._core.click()}};s([v()],le.prototype,"value",2),s([v()],le.prototype,"selected",2),s([v()],le.prototype,"disabled",2),s([v()],le.prototype,"readonly",2),le=s([y({name:Z2.elementName,dependencies:[Q,r1]})],le);function cc(){x(le)}function Ue(r){class t extends r{get form(){return this[a1].form}get labels(){return this[a1].labels}get name(){var a;return(a=this.getAttribute("name"))!=null?a:""}set name(a){K(this,!!a,"name",a)}[$t](){return this[Lt]()}formDisabledCallback(a){this.disabled=a}set[jt](a){let o=a==="select"?document.createElement("select"):document.createElement("input");o.setAttribute("type",a),o.name="internal",this._inputElement=o}[Xt](a){if(this._inputElement)return this[a1].validity.customError?this[a1].validationMessage:(Object.entries(a).forEach(([o,n])=>this._inputElement[o]=n),this._inputElement.validationMessage)}}return t.formAssociated=!0,t}function pc(r){class t extends r{constructor(){super(...arguments);this._hasCustomValidityError=!1}get validity(){return this[a1].validity}get validationMessage(){return this[a1].validationMessage}get willValidate(){return this[a1].willValidate}checkValidity(){return this[a1].checkValidity()}reportValidity(){return this[a1].reportValidity()}setCustomValidity(o){this._hasCustomValidityError=o!=="",this[a1].setCustomValidity({customError:this._hasCustomValidityError},o)}}return t}var dc=`${b}button-toggle-group`,mc={VALUE:"value",MULTIPLE:"multiple",MANDATORY:"mandatory",VERTICAL:"vertical",STRETCH:"stretch",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",DENSE:"dense",NO_OUTLINE:"no-outline",THEME:"theme"},x9=w({},mc),b9={VERTICAL:"forge-button-toggle-group--vertical",STRETCH:"forge-button-toggle-group--stretch"},y9={ROOT:".forge-button-toggle-group"},M9={CHANGE:`${dc}-change`},N1={elementName:dc,observedAttributes:mc,attributes:x9,classes:b9,selectors:y9,events:M9};var ki=class extends I{constructor(t){super(t),this._rootElement=g(t,N1.selectors.ROOT),this._defaultSlotElement=this._rootElement.querySelector("slot")}addListener(t,e){this._rootElement.addEventListener(t,e)}removeListener(t,e){this._rootElement.removeEventListener(t,e)}addSlotChangeListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}removeSlotChangeListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}deselect(t){this._getButtonToggleElements().filter(a=>a!==t).forEach(a=>a.selected=!1)}setDisabled(t){this._component[$1]=!t,this._getButtonToggleElements().forEach(a=>a.disabled=t)}setReadonly(t){this._getButtonToggleElements().forEach(a=>a.readonly=t)}getSelectedValues(){return this._getButtonToggleElements().filter(e=>e.selected).map(e=>e.value)}applyValues(t){this._getButtonToggleElements().forEach(a=>a.selected=t.indexOf(a.value)>=0)}setFormValue(){if(!this._component.form)return;let t=this._component[Lt](),e=this._component[$t]();this._component[a1].setFormValue(t,e)}setFormValidity(){if(!this._component.form||!this._component.required)return;let t=this._component.multiple?!this._component.value.length:!this._component.value;if(t){let e=this._component[Xt]({required:t});this._component[a1].setValidity({valueMissing:t},e,this._getButtonToggleElements()[0])}else this._component[a1].setValidity({})}_getButtonToggleElements(){return Array.from(this._component.querySelectorAll(Z2.elementName))}};var Oi=class{constructor(t){this._adapter=t;this._values=[];this._outlined=!0;this._multiple=!1;this._mandatory=!1;this._vertical=!1;this._stretch=!1;this._dense=!1;this._disabled=!1;this._readonly=!1;this._required=!1;this._theme="tertiary";this._selectListener=e=>this._onSelect(e),this._slotListener=()=>this._synchronize()}initialize(){this._adapter.setFormValue(),this._adapter.setFormValidity(),this._adapter.addListener(Z2.events.SELECT,this._selectListener),this._adapter.addSlotChangeListener(this._slotListener)}destroy(){this._adapter.removeListener(Z2.events.SELECT,this._selectListener),this._adapter.removeSlotChangeListener(this._slotListener)}_synchronize(){if(this._disabled&&this._adapter.setDisabled(this._disabled),this._readonly&&this._adapter.setReadonly(this._readonly),this._multiple){let t=new Set(this._adapter.getSelectedValues().concat(this._values));this.value=Array.from(t)}else{let t=this._adapter.getSelectedValues().concat(this._values);this.value=t.length?t[t.length-1]:null}}_onSelect(t){if(this._mandatory&&!this._adapter.getSelectedValues().length){t.preventDefault();return}let e;t.detail.selected?e=this._multiple?[...this._values,t.detail.value]:[t.detail.value]:e=this._multiple?this._values.filter(n=>n!==t.detail.value):[];let a=this._multiple?e:e.length?e[0]:null,o=new CustomEvent(N1.events.CHANGE,{detail:a,bubbles:!0,cancelable:!0});if(this._adapter.dispatchHostEvent(o),o.defaultPrevented){t.preventDefault();return}this._values=e,this._adapter.applyValues(this._values),this._adapter.setFormValue(),this._adapter.setFormValidity()}_applyValue(t){let e=Array.isArray(t)?t:t!=null?[t]:[];this._values=e,!this._multiple&&e.length>1&&(e=[e[0]]),this._adapter.applyValues(e),this._adapter.setFormValue(),this._adapter.setFormValidity()}get value(){var e;let t=Array.from(new Set(this._adapter.getSelectedValues().concat(this._values)));return this._multiple?Array.from(t):(e=t[0])!=null?e:null}set value(t){this._applyValue(t)}get multiple(){return this._multiple}set multiple(t){t=!!t,this._multiple!==t&&(this._multiple=t,this._applyValue(this._values),this._adapter.toggleHostAttribute(N1.attributes.MULTIPLE,this._multiple))}get mandatory(){return this._mandatory}set mandatory(t){t=!!t,this._mandatory!==t&&(this._mandatory=t,this._adapter.toggleHostAttribute(N1.attributes.MANDATORY,this._mandatory))}get vertical(){return this._vertical}set vertical(t){t=!!t,this._vertical!==t&&(this._vertical=t,this._adapter.toggleHostAttribute(N1.attributes.VERTICAL,this._vertical))}get stretch(){return this._stretch}set stretch(t){t=!!t,this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(N1.attributes.STRETCH,this._stretch))}get dense(){return this._dense}set dense(t){t=!!t,this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(N1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(N1.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){t=!!t,this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(N1.attributes.READONLY,this._readonly))}get required(){return this._required}set required(t){t=!!t,this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(N1.attributes.REQUIRED,this._required))}get outlined(){return this._outlined}set outlined(t){t=!!t,this._outlined!==t&&(this._outlined=t,this._adapter.toggleHostAttribute(N1.attributes.NO_OUTLINE,!this._outlined))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.toggleHostAttribute(N1.attributes.THEME,this._theme!=="tertiary",this._theme))}};var H9='<template><div class="forge-button-toggle-group" part="root"><slot></slot></div></template>',L9=":host{--_button-toggle-group-display:var(--forge-button-toggle-group-display, inline-flex)}:host{display:var(--_button-toggle-group-display)}:host([hidden]){display:none}.forge-button-toggle-group{--_button-toggle-group-gap:var(--forge-button-toggle-group-gap, 4px);--_button-toggle-group-padding:var(--forge-button-toggle-group-padding, 4px);--_button-toggle-group-padding-block:var(--forge-button-toggle-group-padding-block, var(--_button-toggle-group-padding));--_button-toggle-group-padding-inline:var(--forge-button-toggle-group-padding-inline, var(--_button-toggle-group-padding));--_button-toggle-group-height:var(--forge-button-toggle-group-height, var(--forge-button-height, 36px));--_button-toggle-group-dense-height:var(--forge-button-toggle-group-dense-height, var(--forge-button-dense-height, 24px));--_button-toggle-group-outline-width:var(--forge-button-toggle-group-outline-width, var(--forge-border-thin, 1px));--_button-toggle-group-outline-style:var(--forge-button-toggle-group-outline-style, solid);--_button-toggle-group-outline-color:var(--forge-button-toggle-group-outline-color, var(--forge-theme-outline-low, #9e9e9e));--_button-toggle-group-outline-color-active:var(--forge-button-toggle-group-outline-color-active, var(--forge-theme-outline-medium, #757575));--_button-toggle-group-shape:var(--forge-button-toggle-group-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_button-toggle-group-shape-start-start:var(--forge-button-toggle-group-shape-start-start, var(--_button-toggle-group-shape));--_button-toggle-group-shape-start-end:var(--forge-button-toggle-group-shape-start-end, var(--_button-toggle-group-shape));--_button-toggle-group-shape-end-start:var(--forge-button-toggle-group-shape-end-start, var(--_button-toggle-group-shape));--_button-toggle-group-shape-end-end:var(--forge-button-toggle-group-shape-end-end, var(--_button-toggle-group-shape));--_button-toggle-group-transition-duration:var(--forge-button-toggle-group-transition-duration, var(--forge-button-toggle-transition-duration, var(--forge-animation-duration-short3, 150ms)));--_button-toggle-group-transition-timing:var(--forge-button-toggle-group-transition-timing, var(--forge-button-toggle-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1))))}.forge-button-toggle-group{display:flex;align-items:center;gap:var(--_button-toggle-group-gap);height:var(--_button-toggle-group-height);border-width:var(--_button-toggle-group-outline-width);border-style:var(--_button-toggle-group-outline-style);border-color:var(--_button-toggle-group-outline-color);border-start-start-radius:var(--_button-toggle-group-shape-start-start);border-start-end-radius:var(--_button-toggle-group-shape-start-end);border-end-start-radius:var(--_button-toggle-group-shape-end-start);border-end-end-radius:var(--_button-toggle-group-shape-end-end);padding-block:var(--_button-toggle-group-padding-block);padding-inline:var(--_button-toggle-group-padding-inline);transition-property:border-color;transition-duration:var(--_button-toggle-group-transition-duration);transition-timing-function:var(--_button-toggle-group-transition-timing)}:host(:not([disabled]):not([no-outline])) .forge-button-toggle-group:focus-within,:host(:not([disabled]):not([no-outline])) .forge-button-toggle-group:hover{--_button-toggle-group-outline-color:var(--_button-toggle-group-outline-color-active)}:host([no-outline]) .forge-button-toggle-group{--_button-toggle-group-padding:var(--forge-button-toggle-group-padding, 0);--_button-toggle-group-outline-style:var(--forge-button-toggle-group-outline-style, none)}:host(:is([dense],[density=dense])) .forge-button-toggle-group{--_button-toggle-group-height:var(--_button-toggle-group-dense-height)}:host([vertical]) .forge-button-toggle-group{height:auto;flex-direction:column}:host([vertical]) ::slotted(forge-button-toggle){height:var(--_button-toggle-group-height);width:100%}:host([vertical]) ::slotted(forge-divider:not([vertical])){margin-inline:4px;width:100%}::slotted(forge-divider[vertical]){margin-block:4px}:host([stretch]){display:block}:host([stretch]) .forge-button-toggle-group{width:100%}:host(:not([vertical])[stretch]) ::slotted(forge-button-toggle){flex:1}:host([theme=primary]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-primary-container, #d1d5ed);--forge-button-toggle-selected-color:var(--forge-theme-on-primary-container, #222c62);--forge-button-toggle-focus-indicator-color:var(--forge-theme-primary, #3f51b5)}:host([theme=secondary]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-secondary-container, #fff0c3);--forge-button-toggle-selected-color:var(--forge-theme-on-secondary-container, #8a6804);--forge-button-toggle-focus-indicator-color:var(--forge-theme-secondary, #ffc107)}:host([theme=success]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-success-container, #cde0ce);--forge-button-toggle-selected-color:var(--forge-theme-on-success-container, #19441b);--forge-button-toggle-focus-indicator-color:var(--forge-theme-success, #2e7d32)}:host([theme=error]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-error-container, #ecc2c9);--forge-button-toggle-selected-color:var(--forge-theme-on-error-container, #5f0011);--forge-button-toggle-focus-indicator-color:var(--forge-theme-error, #b00020)}:host([theme=warning]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-warning-container, #f4d3c2);--forge-button-toggle-selected-color:var(--forge-theme-on-warning-container, #712700);--forge-button-toggle-focus-indicator-color:var(--forge-theme-warning, #d14900)}:host([theme=info]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-info-container, #c7daf0);--forge-button-toggle-selected-color:var(--forge-theme-on-info-container, #0b3768);--forge-button-toggle-focus-indicator-color:var(--forge-theme-info, #1565c0)}",Q2=class extends it(Ue(pc(L1(H1(M))))){static get observedAttributes(){return Object.values(N1.observedAttributes)}constructor(){super(),H(this,H9,L9),this._core=new Oi(new ki(this)),this[jt]="radio"}connectedCallback(){super.connectedCallback(),this[P]({role:"group"},{setAttribute:!this.hasAttribute("role")}),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case N1.observedAttributes.VALUE:this.value=a;break;case N1.observedAttributes.NO_OUTLINE:this.outlined=!p(a);break;case N1.observedAttributes.MULTIPLE:this.multiple=p(a);break;case N1.observedAttributes.MANDATORY:this.mandatory=p(a);break;case N1.observedAttributes.VERTICAL:this.vertical=p(a);break;case N1.observedAttributes.STRETCH:this.stretch=p(a);break;case N1.observedAttributes.DENSE:this.dense=p(a);break;case N1.observedAttributes.DISABLED:this.disabled=p(a);break;case N1.observedAttributes.REQUIRED:this.required=p(a);break;case N1.observedAttributes.READONLY:this.readonly=p(a);break;case N1.observedAttributes.THEME:this.theme=a;break}}[Lt](){let t=Array.isArray(this.value)?this.value.length>0:!!this.value,e=null;if(t){let a=Array.isArray(this.value)?this.value:[this.value];a.length&&(e=new FormData,a.forEach(o=>e==null?void 0:e.append(this.name,o)))}return e}[$t](){let t=new FormData,e=Array.isArray(this.value)?this.value:this.value!=null?[this.value]:[];return t.append("multiple",String(this.multiple)),e.forEach(a=>t.append("value",a)),t}formStateRestoreCallback(t,e){var a;if(e==="restore"&&t instanceof FormData){let o=t.get("multiple")==="true",n=t.getAll("value");if(o){this.multiple=o,this.value=n;return}this.value=(a=n[0])!=null?a:null}}formResetCallback(){this.value=this.getAttribute("value")}labelChangedCallback(t){this[P]({ariaLabel:t!=null?t:void 0})}};s([v()],Q2.prototype,"value",2),s([v()],Q2.prototype,"outlined",2),s([v()],Q2.prototype,"multiple",2),s([v()],Q2.prototype,"mandatory",2),s([v()],Q2.prototype,"vertical",2),s([v()],Q2.prototype,"stretch",2),s([v()],Q2.prototype,"dense",2),s([v()],Q2.prototype,"disabled",2),s([v()],Q2.prototype,"required",2),s([v()],Q2.prototype,"readonly",2),s([v()],Q2.prototype,"theme",2),Q2=s([y({name:N1.elementName,dependencies:[le]})],Q2);function gc(){x(Q2)}var I9=`${b}checkbox`,wc={CHECKED:"checked",DEFAULT_CHECKED:"default-checked",INDETERMINATE:"indeterminate",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},V9=w({},wc),E9={ROOT:".forge-checkbox",LABEL:"#label",STATE_LAYER:"forge-state-layer"},z1={elementName:I9,selectors:E9,observedAttributes:wc,attributes:V9};var Di=class extends I{constructor(t){super(t),this._rootElement=g(t,z1.selectors.ROOT),this._labelElement=g(t,z1.selectors.LABEL),this._stateLayerElement=g(t,z1.selectors.STATE_LAYER)}setChecked(t){this._component[wt](),this._component[P]({ariaChecked:t?"true":"false"})}setDisabled(t){this._component[$1]=!t,this._component[P]({ariaDisabled:t?"true":"false"}),this._stateLayerElement.disabled=t}setRequired(t){this._component[wt](),this._component[P]({ariaRequired:t?"true":"false"})}setReadonly(t){this._component[P]({ariaReadOnly:t?"true":"false"}),this._stateLayerElement.disabled=t}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}syncValue(t,e){let a=t?new FormData:null;a&&t&&a.append(this._component.name,t),this._component.setFormValue(a,e)}};var Pi=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._indeterminate=!1;this._value="on";this._dense=!1;this._disabled=!1;this._required=!1;this._readonly=!1;this._labelPosition="end";this._clickListener=t=>this._handleChange();this._keydownListener=t=>this._handleKeydown(t);this._keyupListener=t=>this._handleKeyup(t)}get _submittedValue(){return this._checked?this._value:null}get _formState(){return this._checked?this._indeterminate?"checked-indeterminate":"checked":this._indeterminate?"unchecked-indeterminate":"unchecked"}initialize(){this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.syncValue(this._submittedValue,this._formState)}_handleKeydown(t){t.key===" "&&t.preventDefault()}_handleKeyup(t){t.key===" "&&this._handleChange()}_handleChange(){if(this._readonly)return;let t=this._checked,e=!this._checked;this._checked=e;let a=new Event("change",{cancelable:!0,bubbles:!0});this._adapter.dispatchHostEvent(a),this._checked=t,!a.defaultPrevented&&(this.checked=e,this._indeterminate=!1,this._adapter.toggleHostAttribute(z1.attributes.INDETERMINATE,this._indeterminate))}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked),this._adapter.syncValue(this._submittedValue,this._formState),this._adapter.toggleHostAttribute(z1.attributes.CHECKED,this._checked))}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(z1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get indeterminate(){return this._indeterminate}set indeterminate(t){this._indeterminate!==t&&(this._indeterminate=t,this._adapter.syncValue(this._submittedValue,this._formState),this._adapter.toggleHostAttribute(z1.attributes.INDETERMINATE,this._indeterminate))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.syncValue(this._submittedValue,this._formState),(typeof this._value=="string"||this._value==null)&&this._adapter.setHostAttribute(z1.attributes.VALUE,this._value))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(z1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this.disabled),this._adapter.toggleHostAttribute(z1.attributes.DISABLED,this._disabled))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setRequired(this._required),this._adapter.toggleHostAttribute(z1.attributes.REQUIRED,this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(z1.attributes.READONLY,this._readonly))}get labelPosition(){return this._labelPosition}set labelPosition(t){this.labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(z1.attributes.LABEL_POSITION,this._labelPosition))}};var C9='<template><div class="forge-checkbox" part="root"><div id="container" class="container"><div class="background" part="background"><svg class="icon icon--checked" aria-hidden="true" viewBox="0 0 24 24" part="checkmark"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"></path></svg> <svg class="icon icon--indeterminate" aria-hidden="true" viewBox="0 0 24 24" part="mixedmark"><line x1="2" y1="12" x2="22" y2="12"></line></svg><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator></div><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div><div id="label" class="label" part="label"><slot></slot></div></div></template>',z9=':host{display:inline-block;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-checkbox{--_checkbox-primary-color:var(--forge-checkbox-primary-color, var(--forge-theme-tertiary, #3d5afe));--_checkbox-size:var(--forge-checkbox-size, 16px);--_checkbox-border-width:var(--forge-checkbox-border-width, var(--forge-border-medium, 2px));--_checkbox-icon-color:var(--forge-checkbox-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_checkbox-state-layer-size:var(--forge-checkbox-state-layer-size, 40px);--_checkbox-state-layer-dense-size:var(--forge-checkbox-state-layer-dense-size, 24px);--_checkbox-background:var(--forge-checkbox-background, var(--forge-theme-surface, #ffffff));--_checkbox-width:var(--forge-checkbox-width, var(--_checkbox-size));--_checkbox-height:var(--forge-checkbox-height, var(--_checkbox-size));--_checkbox-unchecked-border-width:var(--forge-checkbox-unchecked-border-width, var(--_checkbox-border-width));--_checkbox-unchecked-border-color:var(--forge-checkbox-unchecked-border-color, var(--forge-theme-surface-container-high, #9e9e9e));--_checkbox-shape:var(--forge-checkbox-shape, calc(var(--forge-shape-small, 2px) * var(--forge-shape-factor, 1)));--_checkbox-elevation:var(--forge-checkbox-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));--_checkbox-checked-background:var(--forge-checkbox-checked-background, var(--_checkbox-primary-color));--_checkbox-checked-border-width:var(--forge-checkbox-checked-border-width, var(--_checkbox-border-width));--_checkbox-checked-border-color:var(--forge-checkbox-checked-border-color, var(--_checkbox-checked-background));--_checkbox-icon-checked-color:var(--forge-checkbox-icon-checked-color, var(--_checkbox-icon-color));--_checkbox-icon-indeterminate-color:var(--forge-checkbox-icon-indeterminate-color, var(--_checkbox-icon-color));--_checkbox-icon-stroke-width:var(--forge-checkbox-icon-stroke-width, 4px);--_checkbox-gap:var(--forge-checkbox-gap, 0);--_checkbox-justify:var(--forge-checkbox-justify, start);--_checkbox-align:var(--forge-checkbox-align, center);--_checkbox-direction:var(--forge-checkbox-direction, initial);--_checkbox-state-layer-width:var(--forge-checkbox-state-layer-width, var(--_checkbox-state-layer-size));--_checkbox-state-layer-height:var(--forge-checkbox-state-layer-height, var(--_checkbox-state-layer-size));--_checkbox-state-layer-checked-color:var(--forge-checkbox-state-layer-checked-color, var(--_checkbox-primary-color));--_checkbox-state-layer-unchecked-color:var(--forge-checkbox-state-layer-unchecked-color, var(--_checkbox-color));--_checkbox-state-layer-shape:var(--forge-checkbox-state-layer-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_checkbox-dense-gap:var(--forge-checkbox-dense-gap, 8px);--_checkbox-state-layer-dense-width:var(--forge-checkbox-state-layer-dense-width, var(--_checkbox-state-layer-dense-size));--_checkbox-state-layer-dense-height:var(--forge-checkbox-state-layer-dense-height, var(--_checkbox-state-layer-dense-size));--_checkbox-disabled-opacity:var(--forge-checkbox-disabled-opacity, 0.38);--_checkbox-animation-duration:var(--forge-checkbox-animation-duration, var(--forge-animation-duration-short2, 100ms));--_checkbox-background-animation-timing:var(--forge-checkbox-background-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_checkbox-icon-animation-timing:var(--forge-checkbox-icon-animation-timing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)))}.forge-checkbox{position:relative;flex-direction:var(--_checkbox-direction);align-items:var(--_checkbox-align);justify-content:var(--_checkbox-justify);gap:var(--_checkbox-gap);display:flex}.forge-checkbox .container{position:relative;align-items:center;justify-content:center;display:flex;flex-shrink:0;border-radius:var(--_checkbox-state-layer-shape);inline-size:var(--_checkbox-state-layer-width);block-size:var(--_checkbox-state-layer-height);cursor:pointer}.forge-checkbox .background{position:relative;align-items:center;justify-content:center;display:flex;transition-property:background,border-width,border-color;transition-duration:var(--_checkbox-animation-duration);transition-timing-function:var(--_checkbox-background-animation-timing);box-shadow:var(--_checkbox-elevation);border-style:solid;border-width:var(--_checkbox-unchecked-border-width);border-color:var(--_checkbox-unchecked-border-color);border-radius:var(--_checkbox-shape);box-sizing:border-box;block-size:var(--_checkbox-height);inline-size:var(--_checkbox-width);background:var(--_checkbox-background)}.forge-checkbox .icon{position:absolute;transition-property:stroke-dashoffset;transition-duration:var(--_checkbox-animation-duration);transition-timing-function:var(--_checkbox-icon-animation-timing);fill:none;stroke-width:var(--_checkbox-icon-stroke-width)}.forge-checkbox .icon--checked{stroke:var(--_checkbox-icon-checked-color);stroke-dasharray:30;transition-delay:0s;stroke-dashoffset:30}.forge-checkbox .icon--indeterminate{stroke:var(--_checkbox-icon-indeterminate-color);stroke-dasharray:20;transition-delay:0s;stroke-dashoffset:20}.forge-checkbox .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);cursor:default}:host([checked]) .background{border-style:solid;border-width:var(--_checkbox-checked-border-width);border-color:var(--_checkbox-checked-border-color);background:var(--_checkbox-checked-background)}:host([checked]) .icon--checked{transition-delay:var(--_checkbox-animation-duration);stroke-dashoffset:0}:host([checked]) .icon--checked:dir(rtl){stroke-dashoffset:60}:host([checked]) .icon--indeterminate{transition-delay:0s;stroke-dashoffset:20}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-checked-color)}:host([indeterminate]) .background{border-style:solid;border-width:var(--_checkbox-checked-border-width);border-color:var(--_checkbox-checked-border-color);background:var(--_checkbox-checked-background)}:host([indeterminate]) .icon--checked{transition-delay:0s;stroke-dashoffset:30}:host([indeterminate]) .icon--indeterminate{transition-delay:var(--_checkbox-animation-duration);stroke-dashoffset:0}:host([indeterminate]) .icon--indeterminate:dir(rtl){stroke-dashoffset:40}:host([indeterminate]) forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-checked-color)}:host([dense]) .forge-checkbox{--_checkbox-gap:var(--_checkbox-dense-gap)}:host([dense]) .forge-checkbox .container{inline-size:var(--_checkbox-state-layer-dense-width);block-size:var(--_checkbox-state-layer-dense-height)}:host([disabled]) .forge-checkbox .container{opacity:var(--_checkbox-disabled-opacity);cursor:not-allowed}:host([readonly]) .forge-checkbox .container{cursor:not-allowed}@media (prefers-reduced-motion){.forge-checkbox{--_checkbox-animation-duration:var(--forge-checkbox-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-unchecked-color)}forge-focus-indicator{--forge-focus-indicator-shape:0px;--forge-focus-indicator-outward-offset:8px}',J2=class extends Ue(it(Fe(L1(H1(M))))){static get observedAttributes(){return Object.values(z1.observedAttributes)}constructor(){super(),H(this,C9,z9),this[jt]="checkbox",this._core=new Pi(new Di(this))}connectedCallback(){super.connectedCallback(),this[P]({role:"checkbox",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"}),this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case z1.observedAttributes.CHECKED:this.checked=p(a);break;case z1.observedAttributes.DEFAULT_CHECKED:this.defaultChecked=p(a);break;case z1.observedAttributes.INDETERMINATE:this.indeterminate=p(a);break;case z1.observedAttributes.VALUE:this.value=a;break;case z1.observedAttributes.DENSE:this.dense=p(a);break;case z1.observedAttributes.DISABLED:this.disabled=p(a);break;case z1.observedAttributes.REQUIRED:this.required=p(a);break;case z1.observedAttributes.READONLY:this.readonly=p(a);break;case z1.observedAttributes.LABEL_POSITION:this.labelPosition=a;break}super.attributeChangedCallback(t,e,a)}[Lt](){return this.checked?this.value:null}[$t](){return this.checked?this.indeterminate?"checked-indeterminate":"checked":this.indeterminate?"unchecked-indeterminate":"unchecked"}[wt](){this[a1].setValidity({valueMissing:this.required&&!this.checked},this[Xt]({checked:this.checked,required:this.required}))}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t){this.checked=t==="checked"||t==="checked-indeterminate",this.indeterminate=t==="unchecked-indeterminate"||t==="checked-indeterminate"}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[P]({ariaLabel:t})}setFormValue(t,e){if(this[a1].setFormValue(t,e),e){let a=Pt(e)?e:e[this.name];this.checked=a==="checked"||a==="checked-indeterminate",this.indeterminate=a==="unchecked-indeterminate"||a==="checked-indeterminate";return}Pt(t)?this.checked=!!t:t!=null&&t[this.name]?this.checked=!!t[this.name]:this.checked=!1}toggle(t){k(t)?this._core.checked=t:this._core.checked=!this._core.checked}};s([v()],J2.prototype,"checked",2),s([v()],J2.prototype,"defaultChecked",2),s([v()],J2.prototype,"indeterminate",2),s([v()],J2.prototype,"value",2),s([v()],J2.prototype,"dense",2),s([v()],J2.prototype,"disabled",2),s([v()],J2.prototype,"required",2),s([v()],J2.prototype,"readonly",2),s([v()],J2.prototype,"labelPosition",2),J2=s([y({name:z1.elementName,dependencies:[Q,r1]})],J2);var uc=class extends a2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get checked(){return this._element.checked}set checked(t){this._element.checked=t}get defaultChecked(){return this._element.defaultChecked}set defaultChecked(t){this._element.defaultChecked=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get indeterminate(){return this._element.indeterminate}set indeterminate(t){this._element.indeterminate=t}get dense(){return this._element.dense}set dense(t){this._element.dense=t}get required(){return this._element.required}set required(t){this._element.required=t}get readonly(){return this._element.readonly}set readonly(t){this._element.readonly=t}get name(){return this._element.name}set name(t){this._element.name=t}get labelPosition(){return this._element.labelPosition}set labelPosition(t){this._element.labelPosition=t}onChange(t){this._element.addEventListener("change",e=>t(e.target.checked))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setLabel(t){this._element.innerText=t!=null?t:""}toggle(t){this._element.toggle(t)}_build(){return document.createElement(z1.elementName)}_configure(){var t,e;(t=this._config.options)!=null&&t.id&&(this._element.id=this._config.options.id),(e=this._config.options)!=null&&e.label&&(this._element.innerText=this._config.options.label)}};function _c(){x(J2)}var At=class At{static getRadioGroup(t,{rootNode:e,form:a}={}){var n;if(!t.name)return[t];if(!t.form&&!a){let l=(e!=null?e:t.getRootNode()).querySelectorAll(`${f1.elementName}[name=${t.name}]`);return Array.from(l).filter(h=>!h.form)}let o=((n=t.form)!=null?n:a).elements.namedItem(t.name);return o&&Object.prototype.isPrototypeOf.call(RadioNodeList.prototype,o)?Array.from(o).filter(i=>i.matches(f1.elementName)):[t]}static setRadioGroupValidity(t){let e=At.getRadioGroup(t),a=At._selectionIsRequired(e);e.forEach(o=>{if(!o.shadowRoot)return;let n=o[Xt]({required:a,checked:o.checked});o[a1].setValidity({valueMissing:a},n)})}static setRadioGroupRequired(t){let e=At.getRadioGroupElement(t);if(!e)return;let a=At.getRadioGroup(t),o=Array.from(a).some(n=>n.required);(e==null?void 0:e.tagName)==="forge-radio-group"?e[P]({ariaRequired:o?"true":"false"}):e.setAttribute("aria-required",o?"true":"false")}static getRadioGroupElement(t){return t.closest(":is(fieldset, [role=radiogroup], forge-radio-group)")}static setSelectedRadioInGroup(t){At.getRadioGroup(t).forEach(a=>a.checked=a===t)}static syncRadioFocusableState(t,{ignoreSelf:e,rootNode:a,form:o}={ignoreSelf:!1}){let n=At.getRadioGroup(t,{rootNode:a,form:o});if(n=n.filter(i=>e&&i!==t||i.shadowRoot),!n.some(i=>i.checked)){n.forEach(i=>i[$1]=!i.disabled);return}n.forEach(i=>i[$1]=i.checked&&!i.disabled)}static focusNextRadioInGroup(t){At._updateRadioGroupFocus(t,1)}static focusPreviousRadioInGroup(t){At._updateRadioGroupFocus(t,-1)}static setUncheckedRadioGroupFocus(t,e){let a=At.getRadioGroup(t);if(e==="focus"){a.forEach(o=>o[$1]=o===t);return}(!t.checked||a[0]===t||a[a.length-1]===t)&&a.forEach(o=>o[$1]=!0)}static async requestRadioGroupReset(t){if(this._radiosRequestingReset.add(t),await Qt(),!this._radiosRequestingReset.has(t))return;let e=At.getRadioGroup(t),a=null;e.forEach(o=>{this._radiosRequestingReset.delete(o),o.defaultChecked&&(a=o)}),e.forEach(o=>{o.checked=o===a,o[$1]=!a||o.checked})}static _updateRadioGroupFocus(t,e){let a=At.getRadioGroup(t),o=a.indexOf(t),n=a[o];do if(o+=e,o<0?o=a.length-1:o>=a.length&&(o=0),n=a[o],n===t)return;while(n.disabled||n.readonly);n[Ni]()&&(n[$1]=!0,n.focus(),a.forEach(i=>{i!==n&&(i[$1]=!1,i.checked=!1)}))}static _selectionIsRequired(t){let e=!1,a=!1;return t.forEach(o=>{o.required&&(e=!0),o.checked&&(a=!0)}),e&&!a}};At._radiosRequestingReset=new WeakSet;var lt=At;var A9=`${b}radio`,fc={CHECKED:"checked",DEFAULT_CHECKED:"default-checked",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},B9=w({},fc),T9={ROOT:".forge-radio",LABEL:"#label",STATE_LAYER:"forge-state-layer"},S9={CHANGE:"change",INPUT:"input"},f1={elementName:A9,observedAttributes:fc,attributes:B9,selectors:T9,events:S9},Ni=Symbol("tryCheck");var Ri=class extends I{constructor(t){super(t),this._rootElement=g(t,f1.selectors.ROOT),this._labelElement=g(t,f1.selectors.LABEL),this._stateLayerElement=g(t,f1.selectors.STATE_LAYER)}setChecked(t,e){this._component[P]({ariaChecked:t?"true":"false"}),t&<.setSelectedRadioInGroup(this._component),lt.syncRadioFocusableState(this._component);let a=t?e:null,o=t?"checked":"unchecked";this._component[a1].setFormValue(a,o),lt.setRadioGroupValidity(this._component)}trySetDisabled(t){let e=this._component.closest("forge-radio-group");return!t&&e&&e.disabled?!1:(this._component[P]({ariaDisabled:`${!!t}`}),lt.syncRadioFocusableState(this._component),!0)}setRequired(){lt.setRadioGroupValidity(this._component),lt.setRadioGroupRequired(this._component)}setReadonly(t){this._component[P]({ariaDisabled:`${!!t}`})}disableStateLayer(t){this._stateLayerElement.disabled=t}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}setUncheckedRadioGroupFocus(t){lt.setUncheckedRadioGroupFocus(this._component,t)}focusNext(){lt.focusNextRadioInGroup(this._component)}focusPrevious(){lt.focusPreviousRadioInGroup(this._component)}};var Fi=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._value="on";this._disabled=!1;this._required=!1;this._readonly=!1;this._dense=!1;this._labelPosition="end";this._focusListener=()=>this._handleFocus(),this._blurListener=()=>this._handleBlur(),this._clickListener=e=>this._handleClick(e),this._keydownListener=e=>this._handleKeydown(e),this._keyupListener=e=>this._handleKeyup(e)}initialize(){this._adapter.addHostListener("focus",this._focusListener),this._adapter.addHostListener("blur",this._blurListener),this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.setChecked(this._checked,this._value)}tryCheck(){return this._checked=!0,this._dispatchEvents()?(this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(f1.attributes.CHECKED,this._checked),!0):(this._checked=!1,!1)}_handleFocus(){this._checked||this._adapter.setUncheckedRadioGroupFocus("focus")}_handleBlur(){this._checked||this._adapter.setUncheckedRadioGroupFocus("blur")}_handleClick(t){this._activate(t)}_handleKeydown(t){switch(t.key){case"ArrowRight":case"ArrowDown":t.preventDefault(),this._adapter.focusNext();break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this._adapter.focusPrevious();break;case" ":t.preventDefault();break}}_handleKeyup(t){t.key===" "&&this._activate(t)}async _activate(t){if(!(this._checked||this._disabled||this._readonly)&&(await Qt(),!t.defaultPrevented)){if(this._checked=!0,!this._dispatchEvents()){this._checked=!1;return}this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(f1.attributes.CHECKED,this._checked)}}_dispatchEvents(){let t=new Event(f1.events.CHANGE,{bubbles:!0,cancelable:!0}),e=new Event(f1.events.INPUT,{bubbles:!0,cancelable:!0,composed:!0});return this._adapter.dispatchHostEvent(t),this._adapter.dispatchHostEvent(e),!(t.defaultPrevented||e.defaultPrevented)}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(f1.attributes.CHECKED,this._checked))}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(f1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,(typeof this._value=="string"||this._value==null)&&this._adapter.setHostAttribute(f1.attributes.VALUE,this._value))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.trySetDisabled(this._disabled)?(this._adapter.disableStateLayer(this._disabled||this._readonly),this._adapter.toggleHostAttribute(f1.attributes.DISABLED,this._disabled)):this._disabled=!this._disabled)}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(f1.attributes.REQUIRED,this._required),this._adapter.setRequired(this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.disableStateLayer(this._disabled||this._readonly),this._adapter.toggleHostAttribute(f1.attributes.READONLY,this._readonly))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(f1.attributes.DENSE,this._dense))}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(f1.attributes.LABEL_POSITION,this._labelPosition))}};var k9='<template><div id="radio" class="forge-radio" part="root"><div id="container" class="container" aria-hidden="true"><div id="background" class="background" part="background"></div><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></div><span id="label" class="label" for="input" part="label"><slot></slot></span></div></template>',O9=':host{display:inline-block;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}:host(:focus){outline:0}.forge-radio{--_radio-primary-color:var(--forge-radio-primary-color, var(--forge-theme-tertiary, #3d5afe));--_radio-inactive-color:var(--forge-radio-inactive-color, var(--forge-theme-surface-container-high, #9e9e9e));--_radio-size:var(--forge-radio-size, 20px);--_radio-mark-size:var(--forge-radio-mark-size, 75%);--_radio-state-layer-size:var(--forge-radio-state-layer-size, 40px);--_radio-state-layer-dense-size:var(--forge-radio-state-layer-dense-size, 24px);--_radio-width:var(--forge-radio-width, var(--_radio-size));--_radio-height:var(--forge-radio-height, var(--_radio-size));--_radio-border-width:var(--forge-radio-border-width, var(--forge-border-medium, 2px));--_radio-unchecked-border-color:var(--forge-radio-unchecked-border-color, var(--_radio-inactive-color));--_radio-checked-border-color:var(--forge-radio-checked-border-color, var(--_radio-primary-color));--_radio-background:var(--forge-radio-background, transparent);--_radio-shape:var(--forge-radio-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_radio-mark-width:var(--forge-radio-mark-width, var(--_radio-mark-size));--_radio-mark-height:var(--forge-radio-mark-height, var(--_radio-mark-size));--_radio-mark-color:var(--forge-radio-mark-color, var(--_radio-primary-color));--_radio-gap:var(--forge-radio-gap, 0);--_radio-justify:var(--forge-radio-justify, start);--_radio-align:var(--forge-radio-align, center);--_radio-direction:var(--forge-radio-direction, initial);--_radio-state-layer-width:var(--forge-radio-state-layer-width, var(--_radio-state-layer-size));--_radio-state-layer-height:var(--forge-radio-state-layer-height, var(--_radio-state-layer-size));--_radio-state-layer-unchecked-color:var(--forge-radio-state-layer-unchecked-color, var(--_radio-color));--_radio-state-layer-checked-color:var(--forge-radio-state-layer-checked-color, var(--_radio-primary-color));--_radio-state-layer-shape:var(--forge-radio-state-layer-shape, var(--_radio-shape));--_radio-state-layer-dense-width:var(--forge-radio-state-layer-dense-width, var(--_radio-state-layer-dense-size));--_radio-state-layer-dense-height:var(--forge-radio-state-layer-dense-height, var(--_radio-state-layer-dense-size));--_radio-disabled-opacity:var(--forge-radio-disabled-opacity, 0.38);--_radio-animation-duration:var(--forge-radio-animation-duration, var(--forge-animation-duration-short4, 200ms));--_radio-animation-timing-function:var(--forge-radio-animation-timing-function, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_radio-animation-delay:var(--forge-radio-animation-delay, 0ms)}.forge-radio{position:relative;flex-direction:var(--_radio-direction);align-items:var(--_radio-align);justify-content:var(--_radio-justify);gap:var(--_radio-gap);display:flex}.forge-radio .container{position:relative;align-items:center;justify-content:center;display:flex;flex-shrink:0;border-radius:var(--_radio-shape);inline-size:var(--_radio-state-layer-width);block-size:var(--_radio-state-layer-height);cursor:pointer}.forge-radio .background{position:relative;display:inline block;overflow:hidden;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:border-color;box-sizing:border-box;border-radius:var(--_radio-shape);border-width:var(--_radio-border-width);border-style:solid;border-color:var(--_radio-unchecked-border-color);inline-size:var(--_radio-width);block-size:var(--_radio-height);background:var(--_radio-background)}.forge-radio .background::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:top left;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:opacity,scale;border-radius:var(--_radio-shape);inline-size:var(--_radio-mark-width);block-size:var(--_radio-mark-height);background:var(--_radio-mark-color);scale:0.5;opacity:0}.forge-radio .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);cursor:default}.forge-radio .label:empty{display:none}:host([checked]) .forge-radio .background{border-color:var(--_radio-checked-border-color)}:host([checked]) .forge-radio .background::after{scale:1;opacity:1}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-checked-color)}:host([dense]) .forge-radio .container{inline-size:var(--_radio-state-layer-dense-width);block-size:var(--_radio-state-layer-dense-height)}:host([disabled]) .forge-radio .container{opacity:var(--_radio-disabled-opacity);cursor:not-allowed}:host([readonly]) .forge-radio .container{cursor:not-allowed}forge-focus-indicator{--forge-focus-indicator-color:var(--_radio-primary-color);--forge-focus-indicator-outward-offset:0px;--forge-focus-indicator-shape:var(--_radio-state-layer-shape)}forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-unchecked-color)}',vt=class extends Ue(it(Fe(L1(H1(M))))){static get observedAttributes(){return Object.values(f1.observedAttributes)}constructor(){super(),H(this,k9,O9),this[jt]="radio",this._core=new Fi(new Ri(this))}connectedCallback(){super.connectedCallback(),this[P]({role:"radio",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false"}),lt.syncRadioFocusableState(this),this._core.initialize(),this._rootNode=this.getRootNode()}disconnectedCallback(){lt.syncRadioFocusableState(this,{ignoreSelf:!0,rootNode:this._rootNode,form:this._latestAssociatedForm})}attributeChangedCallback(t,e,a){switch(t){case f1.attributes.CHECKED:this._core.checked=p(a);break;case f1.attributes.DEFAULT_CHECKED:this._core.defaultChecked=p(a);break;case f1.attributes.VALUE:this.value=a;break;case f1.attributes.DENSE:this.dense=p(a);break;case f1.attributes.DISABLED:this.disabled=p(a);break;case f1.attributes.REQUIRED:this.required=p(a);break;case f1.attributes.READONLY:this.readonly=p(a);break;case f1.attributes.LABEL_POSITION:this.labelPosition=a;break}super.attributeChangedCallback(t,e,a)}[Lt](){return this.checked?this.value:null}[$t](){return this.checked?"checked":"unchecked"}formAssociatedCallback(t){t&&(this._latestAssociatedForm=t)}formResetCallback(){lt.requestRadioGroupReset(this)}formStateRestoreCallback(t){this.checked=t==="checked"}labelClickedCallback(){this.click()}labelChangedCallback(t){this[P]({ariaLabel:t})}[Ni](){return this._core.tryCheck()}};s([v()],vt.prototype,"checked",2),s([v()],vt.prototype,"defaultChecked",2),s([v()],vt.prototype,"value",2),s([v()],vt.prototype,"dense",2),s([v()],vt.prototype,"disabled",2),s([v()],vt.prototype,"required",2),s([v()],vt.prototype,"readonly",2),s([v()],vt.prototype,"labelPosition",2),vt=s([y({name:f1.elementName,dependencies:[Q,r1]})],vt);function xc(){x(vt)}var Ui=class extends I{constructor(t){super(t)}attachLabel(t){t.nonInteractive=!0,t.forElement=this._component}setDisabled(t){this._component[P]({ariaDisabled:t?"true":null}),this._disableRadios(t)}trySetRequired(){let t=Array.from(this._component.querySelectorAll(f1.elementName)).some(e=>e.required);this._component[P]({ariaRequired:t?"true":null})}_disableRadios(t){this._component.querySelectorAll(f1.elementName).forEach(e=>{e.disabled=t})}};var D9=`${b}radio-group`,bc={DISABLED:"disabled"},P9=w({},bc),po={elementName:D9,observedAttributes:bc,attributes:P9};var Wi=class{constructor(t){this._adapter=t;this._disabled=!1;this._labelConnectedListener=e=>this._handleLabelConnected(e)}initialize(){this._adapter.addHostListener(o2.events.CONNECTED,this._labelConnectedListener),this._adapter.trySetRequired()}_handleLabelConnected(t){t.stopPropagation(),this._adapter.attachLabel(t.target)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(po.attributes.DISABLED,t))}};var N9="<template><slot></slot></template>",Q0=class extends it(L1(H1(M))){get form(){return this[a1].form}get labels(){return this[a1].labels}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}set name(t){K(this,!!t,"name",t)}static get observedAttributes(){return Object.values(po.observedAttributes)}constructor(){super(),H(this,N9),this._core=new Wi(new Ui(this))}connectedCallback(){super.connectedCallback(),this[P]({role:"radiogroup",ariaDisabled:this.disabled?"true":null}),this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case po.attributes.DISABLED:this.disabled=p(a);break}}formDisabledCallback(t){this.disabled=t}labelChangedCallback(t){this[P]({ariaLabel:t!=null?t:null})}};Q0.formAssociated=!0,s([v()],Q0.prototype,"disabled",2),Q0=s([y({name:po.elementName,dependencies:[vt]})],Q0);function yc(){x(Q0)}var Mc=`${b}switch`,Hc={CHECKED:"checked",ON:"on",SELECTED:"selected",DEFAULT_CHECKED:"default-checked",DEFAULT_ON:"default-on",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",ICON:"icon",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},R9=w({},Hc),F9={HIDDEN:"hidden"},U9={ROOT:".forge-switch",LABEL:"#label",ICON_ON:"#icon-on",ICON_OFF:"#icon-off",STATE_LAYER:"forge-state-layer"},W9={CHANGE:`${Mc}-change`},G9={ON:"on",OFF:"off"},i1={attributes:R9,observedAttributes:Hc,classes:F9,selectors:U9,elementName:Mc,events:W9,state:G9};var Gi=class extends I{constructor(t){super(t),this._rootElement=g(t,i1.selectors.ROOT),this._labelElement=g(t,i1.selectors.LABEL),this._iconCheckedElement=g(t,i1.selectors.ICON_ON),this._iconUncheckedElement=g(t,i1.selectors.ICON_OFF),this._stateLayerElement=g(t,i1.selectors.STATE_LAYER)}setChecked(t){this._component[wt](),this._component[P]({ariaChecked:t?"true":"false"})}setDisabled(t){this._component[$1]=!t,this._component[P]({ariaDisabled:t?"true":"false"}),this._stateLayerElement.disabled=t}setRequired(t){this._component[wt](),this._component[P]({ariaRequired:t?"true":"false"})}setReadonly(t){this._component[P]({ariaReadOnly:t?"true":"false"}),this._stateLayerElement.disabled=t}setIconVisibility(t){let e=t==="none"||t==="off",a=t==="none"||t==="on";_2(this._iconCheckedElement,e,i1.classes.HIDDEN),_2(this._iconUncheckedElement,a,i1.classes.HIDDEN)}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}syncValue(t){let e=t?new FormData:null,a=t?i1.state.ON:i1.state.OFF;e&&t&&e.append(this._component.name,t),this._component.setFormValue(e,a)}};var Yi=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._value="on";this._dense=!1;this._disabled=!1;this._required=!1;this._readonly=!1;this._icon="both";this._labelPosition="end";this._clickListener=()=>this._handleChange();this._keydownListener=t=>this._handleKeydown(t);this._keyupListener=t=>this._handleKeyup(t)}get _submittedValue(){return this._checked?this._value:null}initialize(){this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.setIconVisibility(this._icon),this._adapter.syncValue(this._submittedValue)}_handleKeydown(t){t.key===" "&&t.preventDefault()}_handleKeyup(t){t.key===" "&&this._handleChange()}_handleChange(){if(this._readonly)return;let t=this._checked,e=!this._checked;this._checked=e;let a=new Event("change",{cancelable:!0,bubbles:!0}),o=new CustomEvent(i1.events.CHANGE,{detail:e,bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(a),this._adapter.dispatchHostEvent(o),this._checked=t,!(a.defaultPrevented||o.defaultPrevented)&&(this.checked=e)}_setCheckedAttribute(){this._adapter.toggleHostAttribute(i1.attributes.CHECKED,this._checked),this._adapter.toggleHostAttribute(i1.attributes.ON,this._checked),this._adapter.toggleHostAttribute(i1.attributes.SELECTED,this._checked)}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked),this._adapter.syncValue(this._submittedValue),this._setCheckedAttribute())}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(i1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.syncValue(this._submittedValue),(typeof this._value=="string"||this._value==null)&&this._adapter.toggleHostAttribute(i1.attributes.VALUE,!0,this._value))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(i1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(i1.attributes.DISABLED,this._disabled))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setRequired(this._required),this._adapter.toggleHostAttribute(i1.attributes.REQUIRED,this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(i1.attributes.READONLY,this._readonly))}get icon(){return this._icon}set icon(t){this._icon!==t&&(this._icon=t,this._adapter.setIconVisibility(this._icon),this._adapter.setHostAttribute(i1.attributes.ICON,this._icon))}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(i1.attributes.LABEL_POSITION,this._labelPosition))}};var Y9='<template><div class="forge-switch" part="switch"><div id="container" class="container"><div class="track" part="track"></div><div class="handle" part="handle"><div id="icon-off" class="icon icon__off" part="icon-off"><slot name="icon-off"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M20 13H4v-2h16v2z"/></svg></slot></div><div id="icon-on" class="icon icon__on" part="icon-on"><slot name="icon-on"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"/></svg></slot></div><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator></div><label id="label" class="label" part="label"><slot></slot></label></div></template>',K9=':host{display:inline-block;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-switch{--_switch-handle-size:var(--forge-switch-handle-size, 20px);--_switch-handle-scale:var(--forge-switch-handle-scale, 1);--_switch-handle-elevation:var(--forge-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_switch-track-border-width:var(--forge-switch-track-border-width, 0);--_switch-track-border-color:var(--forge-switch-track-border-color, transparent);--_switch-icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_switch-icon-size:var(--forge-switch-icon-size, 16px);--_switch-icon-scale:var(--forge-switch-icon-scale, 1);--_switch-state-layer-size:var(--forge-switch-state-layer-size, 40px);--_switch-state-layer-dense-size:var(--forge-switch-state-layer-dense-size, 28px);--_switch-handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_switch-handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_switch-handle-width:var(--forge-switch-handle-width, var(--_switch-handle-size));--_switch-handle-height:var(--forge-switch-handle-height, var(--_switch-handle-size));--_switch-handle-on-scale:var(--forge-switch-handle-on-scale, var(--_switch-handle-scale));--_switch-handle-off-scale:var(--forge-switch-handle-off-scale, var(--_switch-handle-scale));--_switch-handle-shape:var(--forge-switch-handle-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_switch-handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_switch-handle-elevation));--_switch-handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_switch-handle-elevation));--_switch-track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_switch-track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_switch-track-width:var(--forge-switch-track-width, 36px);--_switch-track-height:var(--forge-switch-track-height, 14px);--_switch-track-shape:var(--forge-switch-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_switch-track-on-border-width:var(--forge-switch-track-on-border-width, var(--_switch-track-border-width));--_switch-track-off-border-width:var(--forge-switch-track-off-border-width, var(--_switch-track-border-width));--_switch-track-on-border-color:var(--forge-switch-track-on-border-color, var(--_switch-track-border-color));--_switch-track-off-border-color:var(--forge-switch-track-off-border-color, var(--_switch-track-border-color));--_switch-icon-on-color:var(--forge-switch-icon-on-color, var(--_switch-icon-color));--_switch-icon-off-color:var(--forge-switch-icon-off-color, var(--_switch-icon-color));--_switch-icon-on-size:var(--forge-switch-icon-on-size, var(--_switch-icon-size));--_switch-icon-off-size:var(--forge-switch-icon-off-size, var(--_switch-icon-size));--_switch-icon-on-scale:var(--forge-switch-icon-on-scale, var(--_switch-icon-scale));--_switch-icon-off-scale:var(--forge-switch-icon-off-scale, var(--_switch-icon-scale));--_switch-gap:var(--forge-switch-gap, 0);--_switch-justify:var(--forge-switch-justify, start);--_switch-align:var(--forge-switch-align, center);--_switch-direction:var(--forge-switch-direction, initial);--_switch-state-layer-width:var(--forge-switch-state-layer-width, var(--_switch-state-layer-size));--_switch-state-layer-height:var(--forge-switch-state-layer-height, var(--_switch-state-layer-size));--_switch-state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_switch-handle-on-color));--_switch-state-layer-off-color:var(--forge-switch-state-layer-off-color, var(--_switch-color));--_switch-state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_switch-state-layer-dense-size));--_switch-state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_switch-state-layer-dense-size));--_switch-disabled-opacity:var(--forge-switch-disabled-opacity, 0.38);--_switch-handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_switch-handle-on-color));--_switch-handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_switch-handle-off-color));--_switch-handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_switch-handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_switch-handle-active-scale));--_switch-handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_switch-handle-active-scale));--_switch-handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_switch-handle-elevation));--_switch-handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-handle-active-off-elevation:var(--forge-switch-handle-active-off-elevation, var(--_switch-handle-active-elevation));--_switch-track-active-on-color:var(--forge-switch-track-active-on-color, var(--_switch-track-on-color));--_switch-track-active-off-color:var(--forge-switch-track-active-off-color, var(--_switch-track-off-color));--_switch-track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_switch-track-on-border-width));--_switch-track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_switch-track-off-border-width));--_switch-track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_switch-track-on-border-color));--_switch-track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_switch-track-off-border-color));--_switch-icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_switch-icon-on-color));--_switch-icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_switch-icon-off-color));--_switch-icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_switch-icon-on-scale));--_switch-icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_switch-icon-off-scale));--_switch-animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_switch-animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_switch-active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)))}.forge-switch{display:flex;position:relative;flex-direction:var(--_switch-direction);align-items:var(--_switch-align);justify-content:var(--_switch-justify);gap:var(--_switch-gap);--_switch-current-state-layer-width:var(--_switch-state-layer-width);--_switch-current-state-layer-height:var(--_switch-state-layer-height)}.forge-switch .container{position:relative;align-items:center;display:flex;flex-shrink:0;block-size:max(var(--_switch-handle-height),var(--_switch-track-height),var(--_switch-current-state-layer-height));cursor:pointer}.forge-switch .input{position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}.forge-switch .track{transition-property:background-color,border-color,border-width;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);box-sizing:border-box;margin-inline:calc(max(var(--_switch-handle-width),var(--_switch-current-state-layer-width))/ 2 - calc(var(--_switch-track-height)/ 2));border-width:var(--_switch-track-off-border-width);border-color:var(--_switch-track-off-border-color);border-style:solid;border-radius:var(--_switch-track-shape);inline-size:var(--_switch-track-width);block-size:var(--_switch-track-height);background-color:var(--_switch-track-off-color)}.forge-switch .handle{position:absolute;justify-content:center;align-items:center;display:flex;transition-property:translate;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-current-state-layer-width);block-size:var(--_switch-current-state-layer-height)}.forge-switch .handle::before{content:"";position:relative;display:block;scale:var(--_switch-handle-off-scale);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing);box-shadow:var(--_switch-handle-off-elevation);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-handle-width);block-size:var(--_switch-handle-height);background-color:var(--_switch-handle-off-color)}.forge-switch .icon{position:absolute;align-items:center;justify-content:center;display:flex;transition-property:opacity,scale;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);inline-size:var(--_switch-icon-off-size);block-size:var(--_switch-icon-off-size);color:var(--_switch-icon-off-color);fill:var(--_switch-icon-off-color);font-size:var(--_switch-icon-off-size);--forge-icon-font-size:var(--_switch-icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_switch-icon-on-size);inline-size:var(--_switch-icon-on-size);block-size:var(--_switch-icon-on-size);color:var(--_switch-icon-on-color);fill:var(--_switch-icon-on-color);font-size:var(--_switch-icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_switch-icon-off-scale)}.forge-switch .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-switch .label:empty{display:none}.forge-switch .hidden{display:none}.forge-switch ::slotted([slot=input]){position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}:host([checked]) .track{border-width:var(--_switch-track-on-border-width);border-color:var(--_switch-track-on-border-color);background-color:var(--_switch-track-on-color)}:host([checked]) .handle{translate:calc(var(--_switch-track-width) - calc(var(--_switch-track-height)/ 2) * 2)}:host([checked]) .handle::before{scale:var(--_switch-handle-on-scale);box-shadow:var(--_switch-handle-on-elevation);background-color:var(--_switch-handle-on-color)}:host([checked]) .handle .icon__on{opacity:1;scale:var(--_switch-icon-on-scale)}:host([checked]) .handle .icon__off{opacity:0;scale:0.4}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-on-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .track{border-width:var(--_switch-track-active-off-border-width);border-color:var(--_switch-track-active-off-border-color);background-color:var(--_switch-track-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-off-scale);box-shadow:var(--_switch-handle-active-off-elevation);background-color:var(--_switch-handle-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-off-scale);color:var(--_switch-icon-active-off-color);fill:var(--_switch-icon-active-off-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .track{border-width:var(--_switch-track-active-on-border-width);border-color:var(--_switch-track-active-on-border-color);background-color:var(--_switch-track-active-on-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-on-scale);box-shadow:var(--_switch-handle-active-on-elevation);background-color:var(--_switch-handle-active-on-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-on-scale);color:var(--_switch-icon-active-on-color);fill:var(--_switch-icon-active-on-color)}:host([dense]) .forge-switch{--_switch-current-state-layer-width:var(--_switch-state-layer-dense-width);--_switch-current-state-layer-height:var(--_switch-state-layer-dense-height)}:host([disabled]) .forge-switch .container{opacity:var(--_switch-disabled-opacity);cursor:not-allowed}:host([disabled]) .forge-switch .handle::before{box-shadow:none}:host([readonly]) .forge-switch .container{cursor:not-allowed}@media (prefers-reduced-motion){.switch{--_switch-animation-duration:var(--forge-switch-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_switch-track-shape);--forge-focus-indicator-outward-offset:0px}',W2=class extends Ue(it(Fe(L1(H1(M))))){static get observedAttributes(){return Object.values(i1.observedAttributes)}constructor(){super(),H(this,Y9,K9),this[jt]="checkbox",this._core=new Yi(new Gi(this))}connectedCallback(){super.connectedCallback(),this[P]({role:"switch",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"}),this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case i1.observedAttributes.CHECKED:case i1.observedAttributes.ON:case i1.observedAttributes.SELECTED:this.checked=p(a);break;case i1.observedAttributes.DEFAULT_CHECKED:case i1.observedAttributes.DEFAULT_ON:this.defaultChecked=p(a);break;case i1.observedAttributes.VALUE:this.value=a;break;case i1.observedAttributes.DENSE:this.dense=p(a);break;case i1.observedAttributes.DISABLED:this.disabled=p(a);break;case i1.observedAttributes.REQUIRED:this.required=p(a);break;case i1.observedAttributes.READONLY:this.readonly=p(a);break;case i1.observedAttributes.ICON:this.icon=a;break;case i1.observedAttributes.LABEL_POSITION:this.labelPosition=a;break}super.attributeChangedCallback(t,e,a)}[Lt](){return this.checked?this.value:null}[$t](){return this.checked?i1.state.ON:i1.state.OFF}[wt](){this[a1].setValidity({valueMissing:this.required&&!this.checked},this[Xt]({checked:this.checked,required:this.required}))}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t){this.checked=t===i1.state.ON}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[P]({ariaLabel:t})}setFormValue(t,e){if(this[a1].setFormValue(t,e),e){let a=Pt(e)?e:e[this.name];this.checked=a===i1.state.ON;return}Pt(t)?this.checked=!!t:t!=null&&t[this.name]?this.checked=!!t[this.name]:this.checked=!1}toggle(t){k(t)?this._core.checked=t:this._core.checked=!this._core.checked}};s([v()],W2.prototype,"checked",2),s([v({name:"checked"})],W2.prototype,"on",2),s([v({name:"checked"})],W2.prototype,"selected",2),s([v()],W2.prototype,"defaultChecked",2),s([v({name:"defaultChecked"})],W2.prototype,"defaultOn",2),s([v()],W2.prototype,"value",2),s([v()],W2.prototype,"dense",2),s([v()],W2.prototype,"disabled",2),s([v()],W2.prototype,"required",2),s([v()],W2.prototype,"readonly",2),s([v()],W2.prototype,"icon",2),s([v()],W2.prototype,"labelPosition",2),W2=s([y({name:i1.elementName,dependencies:[Q,r1]})],W2);var Lc=class extends a2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get checked(){return this._element.checked}set checked(t){this._element.checked=t}get on(){return this._element.on}set on(t){this._element.on=t}get selected(){return this._element.selected}set selected(t){this._element.selected=t}get defaultChecked(){return this._element.defaultChecked}set defaultChecked(t){this._element.defaultChecked=t}get defaultOn(){return this._element.defaultOn}set defaultOn(t){this._element.defaultOn=t}get icon(){return this._element.icon}set icon(t){this._element.icon=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get dense(){return this._element.dense}set dense(t){this._element.dense=t}get required(){return this._element.required}set required(t){this._element.required=t}get readonly(){return this._element.readonly}set readonly(t){this._element.readonly=t}get name(){return this._element.name}set name(t){this._element.name=t}get labelPosition(){return this._element.labelPosition}set labelPosition(t){this._element.labelPosition=t}onChange(t){this._element.addEventListener(i1.events.CHANGE,({detail:e})=>t(e))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setLabel(t){this._element.innerText=t!=null?t:""}toggle(t){this._element.toggle(t)}_build(){return document.createElement(i1.elementName)}_configure(){var t,e;(t=this._config.options)!=null&&t.id&&(this._element.id=this._config.options.id),(e=this._config.options)!=null&&e.label&&(this._element.innerText=this._config.options.label)}};function Ic(){x(W2)}var Vc=`${b}label`,Ec={FOR:"for",DYNAMIC:"dynamic",NON_INTERACTIVE:"non-interactive",LEGEND:"legend"},q9=w({},Ec),$9={SLOT:"slot"},X9={CONNECTED:`${Vc}-connected`},j9=[I2.elementName,N1.elementName,z1.elementName,J.elementName,f1.elementName,"forge-select",i1.elementName],o2={elementName:Vc,observedAttributes:Ec,attributes:q9,selectors:$9,events:X9,labelableChildSelectors:j9};var Ki=class extends I{constructor(e){super(e);this._targetElement=null;this._slotElement=g(e,o2.selectors.SLOT)}destroy(){var e;(e=this._targetElement)==null||e.labelChangedCallback(null),this._targetElement=null}hasTargetElement(){return!!this._targetElement}getTargetElement(){return this._targetElement}setTargetElement(e){if(e&&this._checkLabelAwareness(e)){this._targetElement=e;return}this._targetElement=null}trySetTarget(e){this._targetElement=this._locateTargetElement(e)}clickTarget(){var e,a;(a=(e=this._targetElement)==null?void 0:e.labelClickedCallback)==null||a.call(e)}updateTargetLabel(){var o,n;if(!this._targetElement)return;let e=(o=this._component.textContent)!=null?o:"";if(this._component.contains(this._targetElement)){let i=(n=this._targetElement.textContent)!=null?n:"";e=e.replace(i,"")}let a=e.trim();this._targetElement.labelChangedCallback(a)}addSlotChangeListener(e){this._slotElement.addEventListener("slotchange",e)}removeSlotChangeListener(e){this._slotElement.removeEventListener("slotchange",e)}addMutationObserver(e){this._mutationObserver=new MutationObserver(e),this._mutationObserver.observe(this._component,{subtree:!0,characterData:!0,childList:!0}),e([],this._mutationObserver)}removeMutationObserver(){var e;(e=this._mutationObserver)==null||e.disconnect(),this._mutationObserver=void 0}_checkLabelAwareness(e){return lc(e)?!0:(console.warn("Label target element is not label aware.",e),!1)}_locateTargetElement(e){let a;if(e)a=this._component.getRootNode().querySelector(`#${e}`);else{let o=o2.labelableChildSelectors.join(",");a=this._component.querySelector(o)}return a&&!a.shadowRoot?(a.setAttribute(Wo,""),a[Ga]=this._component,null):a&&!this._checkLabelAwareness(a)?null:a}};var qi=class{constructor(t){this._adapter=t;this._dynamic=!1;this._nonInteractive=!1;this._legend=!1;this._isConnected=!1;this._clickListener=e=>this._handleClick(e),this._slotChangeListener=()=>this._handleSlotChange(),this._mutationCallback=()=>this._handleMutation()}initialize(){this._legend?this._initializeAsLegend():this._initializeAsLabel()}destroy(){this._disconnect(),this._adapter.destroy()}update(){this._adapter.updateTargetLabel()}updateTarget(t){return this._adapter.setTargetElement(t),this._adapter.hasTargetElement()?(this._connect(),!0):!1}async _initializeAsLegend(){await Qt(),this._adapter.dispatchHostEvent(new CustomEvent(o2.events.CONNECTED,{bubbles:!0}))}async _initializeAsLabel(){var t;this._adapter.addSlotChangeListener(this._slotChangeListener),this._adapter.trySetTarget((t=this._for)!=null?t:null),this._adapter.hasTargetElement()&&this._connect()}_handleClick(t){var a;let e=(a=this._clickTarget)!=null?a:this._adapter.getTargetElement();t.target===e||e!=null&&e.contains(t.target)||this._adapter.clickTarget()}_handleSlotChange(){!this._for&&!this._forElement&&(this._adapter.trySetTarget(null),this._tryConnect())}_handleMutation(){this._adapter.updateTargetLabel()}_connect(){this._nonInteractive||this._adapter.addHostListener("click",this._clickListener),this._adapter.updateTargetLabel(),this._dynamic&&this._adapter.addMutationObserver(this._mutationCallback),this._isConnected=!0}_disconnect(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeMutationObserver(),this._isConnected=!1}_tryConnect(){this._adapter.hasTargetElement()?this._isConnected||this._connect():this._disconnect()}get for(){return this._for}set for(t){var e,a;this._for!==t&&(this._for=t,this._adapter.toggleHostAttribute(o2.attributes.FOR,!!this.for,(e=this.for)!=null?e:void 0),this._adapter.trySetTarget((a=this._for)!=null?a:null),this._tryConnect())}get forElement(){return this._forElement}set forElement(t){var e;this._forElement!==t&&(this._forElement=t,this._adapter.setTargetElement((e=this._forElement)!=null?e:null),this._tryConnect())}get clickTarget(){return this._clickTarget}set clickTarget(t){this._clickTarget!==t&&(this._clickTarget=t)}get dynamic(){return this._dynamic}set dynamic(t){this._dynamic!==t&&(this._dynamic=t,this._adapter.toggleHostAttribute(o2.attributes.DYNAMIC,this._dynamic),this._dynamic?this._adapter.hasTargetElement()&&this._adapter.addMutationObserver(this._mutationCallback):this._adapter.removeMutationObserver())}get nonInteractive(){return this._nonInteractive}set nonInteractive(t){if(this._nonInteractive!==t){if(this._nonInteractive=t,this._adapter.toggleHostAttribute(o2.attributes.NON_INTERACTIVE,this._nonInteractive),!this._isConnected)return;this._nonInteractive?this._adapter.removeHostListener("click",this._clickListener):this._adapter.addHostListener("click",this._clickListener)}}get legend(){return this._legend}set legend(t){var e;if(this._legend!==t){if(this._legend=t,this._adapter.toggleHostAttribute(o2.attributes.LEGEND,this._legend),this._legend){this._adapter.removeSlotChangeListener(this._slotChangeListener),this._adapter.dispatchHostEvent(new CustomEvent(o2.events.CONNECTED,{bubbles:!0}));return}this._adapter.addSlotChangeListener(this._slotChangeListener),this._adapter.trySetTarget((e=this._for)!=null?e:null),this._adapter.hasTargetElement()&&this._connect()}}};var Z9="<template><slot></slot></template>",Q9=':host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);display:inline-block;cursor:default}:host([hidden]){display:none}',ve=class extends M{static get observedAttributes(){return Object.values(o2.observedAttributes)}constructor(){super(),H(this,Z9,Q9),this._core=new qi(new Ki(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case o2.attributes.FOR:this.for=a;break;case o2.attributes.DYNAMIC:this.dynamic=p(a);break;case o2.attributes.NON_INTERACTIVE:this.nonInteractive=p(a);break;case o2.attributes.LEGEND:this.legend=p(a);break}}update(){this._core.update()}[Zr](t){return this._core.updateTarget(t)}};s([v()],ve.prototype,"for",2),s([v()],ve.prototype,"forElement",2),s([v()],ve.prototype,"clickTarget",2),s([v()],ve.prototype,"dynamic",2),s([v()],ve.prototype,"nonInteractive",2),s([v()],ve.prototype,"legend",2),ve=s([y({name:o2.elementName})],ve);function Cc(){x(ve)}var zc={LABEL_POSITION:"label-position",LABEL_ALIGNMENT:"label-alignment",INVALID:"invalid",REQUIRED:"required",OPTIONAL:"optional",DISABLED:"disabled",FLOAT_LABEL:"float-label",VARIANT:"variant",THEME:"theme",SHAPE:"shape",DENSITY:"density",DENSE:"dense",POPOVER_ICON:"popover-icon",POPOVER_EXPANDED:"popover-expanded",SUPPORT_TEXT_INSET:"support-text-inset"},J9=w({},zc),tw={DEFAULT_VARIANT:"outlined",DEFAULT_THEME:"default",DEFAULT_SHAPE:"default",DEFAULT_DENSITY:"default",DEFAULT_LABEL_POSITION:"inset",DEFAULT_LABEL_ALIGNMENT:"default",DEFAULT_SUPPORT_TEXT_INSET:"none"},F={observedAttributes:zc,attributes:J9,defaults:tw};var T4=`${b}field`,Ac=t1(w({},F.observedAttributes),{MULTILINE:"multiline",FOCUS_INDICATOR_ALLOW_FOCUS:"focus-indicator-allow-focus",FOCUS_INDICATOR_FOCUS_MODE:"focus-indicator-focus-mode"}),ew=t1(w({},Ac),{MULTI_INPUT_SEPARATOR:"data-forge-multi-input-separator"}),aw={FLOATING_IN:"floating-in",FLOATING_OUT:"floating-out",HAS_LABEL:"has-label",HAS_START:"has-start",HAS_END:"has-end",HAS_ACCESSORY:"has-accessory",HAS_SUPPORT_START:"has-support-text-start",HAS_SUPPORT_END:"has-support-text-end"},ow={ROOT:"#root",CONTAINER:"#container",INPUT_CONTAINER:"#input",LABEL:"#label",LABEL_SLOT:"slot[name=label]",POPOVER_ICON:"#popover-icon",LABEL_ELEMENTS:`:where(label, ${o2.elementName})`,POPOVER_TARGET:".popover-target"},rw={ROOT:"root",LABEL:"label",SURFACE:"surface",START:"start",INPUT:"input",END:"end",POPOVER_ICON:"popover-icon",ACCESSORY:"accessory",SUPPORT_TEXT:"support-text",SUPPORT_TEXT_END:"support-text-end",FOCUS_INDICATOR:"focus-indicator"},nw={POPOVER_ICON_CLICK:`${T4}-popover-icon-click`,POPOVER_ICON_MOUSEDOWN:`${T4}-popover-icon-mousedown`},iw=w({},F.defaults),sw={FLOAT_IN_LABEL:"float-in-label-animation",FLOAT_OUT_LABEL:"float-out-label-animation"},V={elementName:T4,observedAttributes:Ac,attributes:ew,classes:aw,selectors:ow,parts:rw,events:nw,defaults:iw,animations:sw};var $i=class extends I{get focusIndicator(){return this._focusIndicatorElement}get hasSlottedLabel(){return!!this._labelSlotElement.assignedNodes({flatten:!0}).length}constructor(t){super(t),this._rootElement=g(t,V.selectors.ROOT),this._containerElement=g(t,V.selectors.CONTAINER),this._inputContainerElement=g(t,V.selectors.INPUT_CONTAINER),this._labelElement=g(t,V.selectors.LABEL),this._labelSlotElement=g(t,V.selectors.LABEL_SLOT),this._popoverIconElement=g(t,V.selectors.POPOVER_ICON),this._focusIndicatorElement=g(t,m1.elementName)}addRootListener(t,e){this._rootElement.addEventListener(t,e)}addPopoverIconListener(t,e){this._popoverIconElement.addEventListener(t,e)}removePopoverIconListener(t,e){this._popoverIconElement.removeEventListener(t,e)}setLabelPosition(t){this._labelElement.remove(),t==="inset"?this._containerElement.prepend(this._labelElement):this._rootElement.prepend(this._labelElement)}setFloatingLabel(t){let e=t?V.classes.FLOATING_IN:V.classes.FLOATING_OUT,a=t?V.animations.FLOAT_IN_LABEL:V.animations.FLOAT_OUT_LABEL,o=n=>{n.animationName===a&&(we(e,this._rootElement),this._rootElement.removeEventListener("animationend",o))};y1(e,this._rootElement),this._rootElement.addEventListener("animationend",o)}handleSlotChange(t){if(t.name===""){this._trySlotLabel(t);return}for(;t.assignedSlot;)t=t.assignedSlot;if(!t)return;let e={label:V.classes.HAS_LABEL,start:V.classes.HAS_START,end:V.classes.HAS_END,accessory:V.classes.HAS_ACCESSORY,"support-text":V.classes.HAS_SUPPORT_START,"support-text-end":V.classes.HAS_SUPPORT_END};t.name in e&&_2(this._rootElement,!!t.assignedNodes({flatten:!0}).length,e[t.name])}initializeSlots(){this._rootElement.querySelectorAll("slot").forEach(e=>this.handleSlotChange(e))}_trySlotLabel(t){t.assignedElements({flatten:!0}).filter(o=>o.matches(V.selectors.LABEL_ELEMENTS)).forEach(o=>{o.slot||(o.slot="label")})}};var Xi=class{constructor(t){this._adapter=t;this._labelPosition=V.defaults.DEFAULT_LABEL_POSITION;this._labelAlignment=V.defaults.DEFAULT_LABEL_ALIGNMENT;this._floatLabel=!1;this._invalid=!1;this._required=!1;this._optional=!1;this._disabled=!1;this._variant=V.defaults.DEFAULT_VARIANT;this._theme=V.defaults.DEFAULT_THEME;this._shape=V.defaults.DEFAULT_SHAPE;this._density=V.defaults.DEFAULT_DENSITY;this._dense=!1;this._popoverIcon=!1;this._popoverExpanded=!1;this._multiline=!1;this._supportTextInset=V.defaults.DEFAULT_SUPPORT_TEXT_INSET;this._slotChangeListener=this._onSlotChange.bind(this);this._popoverIconClickListener=this._onPopoverIconClick.bind(this);this._popoverIconMousedownListener=this._onPopoverIconMousedown.bind(this)}initialize(){this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.initializeSlots(),this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),this._adapter.setLabelPosition(this._labelPosition),this._popoverIcon&&(this._adapter.addPopoverIconListener("click",this._popoverIconClickListener),this._adapter.addPopoverIconListener("mousedown",this._popoverIconMousedownListener))}_onSlotChange(t){this._adapter.handleSlotChange(t.target)}_onPopoverIconClick(){this._adapter.dispatchHostEvent(new CustomEvent(V.events.POPOVER_ICON_CLICK,{bubbles:!0,composed:!0}))}_onPopoverIconMousedown(t){let e=new CustomEvent(V.events.POPOVER_ICON_MOUSEDOWN,{bubbles:!0,composed:!0,cancelable:!0});this._adapter.dispatchHostEvent(e),e.defaultPrevented&&t.preventDefault()}floatLabelWithoutAnimation(t){this._floatLabel!==t&&(this._floatLabel=t,this._adapter.toggleHostAttribute(V.attributes.FLOAT_LABEL,this._floatLabel))}get labelPosition(){return this._labelPosition}set labelPosition(t){if(this._labelPosition!==t){if(this._labelPosition=t,this._adapter.setHostAttribute(V.attributes.LABEL_POSITION,this._labelPosition),!this._adapter.isConnected)return;this._adapter.setLabelPosition(this._labelPosition)}}get labelAlignment(){return this._labelAlignment}set labelAlignment(t){this._labelAlignment!==t&&(this._labelAlignment=t,this._adapter.setHostAttribute(V.attributes.LABEL_ALIGNMENT,this._labelAlignment))}get floatLabel(){return this._floatLabel}set floatLabel(t){this._floatLabel!==t&&(this._floatLabel=t,this._adapter.hasSlottedLabel&&this._adapter.setFloatingLabel(this._floatLabel),this._adapter.toggleHostAttribute(V.attributes.FLOAT_LABEL,this._floatLabel))}get invalid(){return this._invalid}set invalid(t){this._invalid!==t&&(this._invalid=t,this._adapter.toggleHostAttribute(V.attributes.INVALID,this._invalid))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(V.attributes.REQUIRED,this._required))}get optional(){return this._optional}set optional(t){this._optional!==t&&(this._optional=t,this._adapter.toggleHostAttribute(V.attributes.OPTIONAL,this._optional))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.toggleHostAttribute(V.attributes.DISABLED,this._disabled))}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t,this._adapter.setHostAttribute(V.attributes.VARIANT,this._variant))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.setHostAttribute(V.attributes.THEME,this._theme))}get shape(){return this._shape}set shape(t){this._shape!==t&&(this._shape=t,this._adapter.setHostAttribute(V.attributes.SHAPE,this._shape))}get density(){return this._density}set density(t){this._density!==t&&(this._density=t,this._adapter.setHostAttribute(V.attributes.DENSITY,this._density))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(V.attributes.DENSE,this._dense))}get popoverIcon(){return this._popoverIcon}set popoverIcon(t){if(this._popoverIcon!==t){if(this._popoverIcon=t,this._adapter.toggleHostAttribute(V.attributes.POPOVER_ICON,this._popoverIcon),!this._adapter.isConnected)return;this._popoverIcon?(this._adapter.addPopoverIconListener("click",this._popoverIconClickListener),this._adapter.addPopoverIconListener("mousedown",this._popoverIconMousedownListener)):(this._adapter.removePopoverIconListener("click",this._popoverIconClickListener),this._adapter.removePopoverIconListener("mousedown",this._popoverIconMousedownListener))}}get popoverExpanded(){return this._popoverExpanded}set popoverExpanded(t){this._popoverExpanded!==t&&(this._popoverExpanded=t,this._adapter.toggleHostAttribute(V.attributes.POPOVER_EXPANDED,this._popoverExpanded))}get multiline(){return this._multiline}set multiline(t){this._multiline!==t&&(this._multiline=t,this._adapter.toggleHostAttribute(V.attributes.MULTILINE,this._multiline))}get supportTextInset(){return this._supportTextInset}set supportTextInset(t){this._supportTextInset!==t&&(this._supportTextInset=t,this._adapter.setHostAttribute(V.attributes.SUPPORT_TEXT_INSET,this._supportTextInset))}get focusIndicatorTargetElement(){return this._adapter.focusIndicator.targetElement}set focusIndicatorTargetElement(t){this._adapter.focusIndicator.targetElement=t}get focusIndicatorFocusMode(){return this._adapter.focusIndicator.focusMode}set focusIndicatorFocusMode(t){this._adapter.focusIndicator.focusMode=t}get focusIndicatorAllowFocus(){return this._adapter.focusIndicator.allowFocus}set focusIndicatorAllowFocus(t){this._adapter.focusIndicator.allowFocus=t}};var lw='<template><div id="root" class="forge-field" part="root"><div id="label" class="label" part="label"><slot name="label"></slot></div><div id="container" class="container"><div class="popover-target" aria-hidden="true"></div><div id="surface" class="surface" part="surface"></div><div id="start" class="start" part="start"><slot name="start"></slot></div><div id="input" class="input" part="input"><slot></slot></div><div id="end" class="end" part="end"><slot name="end"></slot></div><div id="popover-icon" class="popover-icon" part="popover-icon"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" aria-hidden="true"><path d="M0 0h24v24H0z" fill="none"/><path d="M7 10l5 5 5-5z" id="popover-icon__arrow"/></svg></div><div id="accessory" class="accessory" part="accessory"><slot name="accessory"></slot></div></div><div class="support-text"><div class="support-text-start" part="support-text"><slot name="support-text"></slot></div><div class="support-text-end" part="support-text-end"><slot name="support-text-end"></slot></div></div><div class="outline"><forge-focus-indicator target="input" part="focus-indicator"></forge-focus-indicator></div></div></template>',vw='@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes multiline-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}@layer base,theme,variant,shape,density; @layer base{:host{display:block}:host([hidden]){display:none}.forge-field{--_field-background:var(--forge-field-background, transparent);--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-surface-container-low, #ebebeb));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-surface-container-minimum, #f5f5f5));--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-surface-bright, #ffffff));--_field-outline-style:var(--forge-field-outline-style, solid);--_field-outline-width:var(--forge-field-outline-width, var(--forge-border-thin, 1px));--_field-shape:var(--forge-field-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_field-height:var(--forge-field-height, 40px);--_field-inset-height:var(--forge-field-inset-height, 48px);--_field-padding-inline:var(--forge-field-padding-inline, 12px);--_field-padding-inline-start:var(--forge-field-padding-inline-start, var(--_field-padding-inline));--_field-padding-inline-end:var(--forge-field-padding-inline-end, var(--_field-padding-inline));--_field-inner-padding-inline:var(--forge-field-inner-padding-inline, 8px);--_field-rounded-container-padding-inline:var(--forge-field-rounded-container-padding-inline, calc(var(--_field-height) / 2));--_field-rounded-container-padding-inline-start:var(--forge-field-rounded-container-padding-inline-start, var(--_field-rounded-container-padding-inline));--_field-rounded-container-padding-inline-end:var(--forge-field-rounded-container-padding-inline-end, var(--_field-rounded-container-padding-inline));--_field-support-text-margin-block:var(--forge-field-support-text-margin-block, 4px);--_field-support-text-gap:var(--forge-field-support-text-gap, 8px);--_field-support-text-padding-inline:var(--forge-field-support-text-padding-inline, var(--_field-padding-inline));--_field-support-text-padding-inline-start:var(--forge-field-support-text-padding-inline-start, var(--_field-support-text-padding-inline));--_field-support-text-padding-inline-end:var(--forge-field-support-text-padding-inline-end, var(--_field-support-text-padding-inline));--_field-label-margin-inline:var(--forge-field-label-margin-inline, 8px);--_field-label-margin-block:var(--forge-field-label-margin-block, 4px);--_field-required-padding:var(--forge-field-required-padding, 0.35ch);--_field-required-content:var(--forge-field-required-content, "*");--_field-optional-padding:var(--forge-field-optional-padding, 0.5ch);--_field-optional-content:var(--forge-field-optional-content, "(optional)");--_field-multiline-resize:var(--forge-field-multiline-resize, block);--_field-multiline-min-inline-size:var(--forge-field-multiline-min-inline-size, initial);--_field-multiline-max-inline-size:var(--forge-field-multiline-max-inline-size, initial);--_field-multiline-min-block-size:var(--forge-field-multiline-min-block-size, var(--_field-height));--_field-multiline-max-block-size:var(--forge-field-multiline-max-block-size, initial);--_field-popover-icon-transition-duration:var(--forge-field-popover-icon-transition-duration, var(--forge-animation-duration-short3, 150ms));--_field-popover-icon-transition-timing:var(--forge-field-popover-icon-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_field-popover-icon-open-rotation:var(--forge-field-popover-icon-open-rotation, 180deg);--_field-surface-animation-duration:var(--forge-field-surface-animation-duration, var(--forge-animation-duration-short4, 200ms));--_field-surface-animation-timing:var(--forge-field-surface-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_field-floating-animation-duration:var(--forge-field-floating-animation-duration, var(--forge-animation-duration-short2, 100ms));--_field-floating-animation-timing:var(--forge-field-floating-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)));--_field-focus-indicator-width:var(--forge-field-focus-indicator-width, var(--forge-focus-indicator-width, var(--forge-border-medium, 2px)));--_field-disabled-opacity:var(--forge-field-disabled-opacity, 0.38);--_field-disabled-background:var(--forge-field-disabled-background, var(--forge-theme-surface-container-low, #ebebeb));--_field-font-size:var(--forge-field-font-size, inherit);--_field-dense-font-size:var(--forge-field-dense-font-size, 0.875rem);--_field-placeholder-color:var(--forge-field-placeholder-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}.forge-field{--_field-disableable-cursor:var(--forge-field-disableable-cursor, unset);--_field-disableable-opacity:var(--forge-field-disableable-opacity, 1);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, 100%);--_field-inner-border-color:var(--forge-field-inner-border-color, var(--_field-outline-color));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--_field-outline-color-hover));--_field-inner-border-display:var(--forge-field-inner-border-display, block);--_field-label-color:var(--forge-field-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_field-label-grid-area:var(--forge-field-label-grid-area, "label");--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--_field-multiline-inset-label-background));--_field-surface-display:var(--forge-field-surface-display, block);position:relative;display:grid}}@layer theme{:host(:where([theme=default],:not([theme]))) .forge-field{--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-outline-low, #9e9e9e));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-outline-high, #212121));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-filled-background));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--_field-tonal-background));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--_field-tonal-background-hover));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-outline-low, #9e9e9e));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-outline-high, #212121))}:host(:where([label-position=inset],:not([label-position])):where([theme=default],:not([theme]))) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}:host([theme=primary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-primary-container-low, #e8eaf6));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-primary-container, #222c62));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-primary, #3f51b5));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-primary-container, #222c62));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-primary-container-low, #222c62));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-primary-container-low, #e8eaf6));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-primary, #3f51b5));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-primary-container, #222c62))}:host(:where([label-position=inset],:not([label-position]))[theme=primary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-primary-container-low, #222c62))}:host([theme=secondary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-secondary, #ffc107));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-secondary-container-low, #fff8e1));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-secondary-container, #8a6804));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-secondary-container-low, #8a6804));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-secondary-container-low, #fff8e1));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-secondary-container, #8a6804))}:host(:where([label-position=inset],:not([label-position]))[theme=secondary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-secondary-container-low, #8a6804))}:host([theme=tertiary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-tertiary-container, #213189));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-tertiary, #3d5afe));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-tertiary-container, #213189));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-tertiary-container-low, #213189));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-tertiary, #3d5afe));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-tertiary-container, #213189))}:host(:where([label-position=inset],:not([label-position]))[theme=tertiary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-tertiary-container-low, #213189))}:host([theme=success]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-success-container-minimum, #f7faf7));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-success, #2e7d32));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-success-container-low, #e6efe6));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-success-container-minimum, #f7faf7));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-success-container, #19441b));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-success, #2e7d32));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-success-container, #19441b));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-success-container-low, #19441b));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-success-container-minimum, #f7faf7));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-success-container-low, #e6efe6));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-success-container-minimum, #f7faf7));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-success, #2e7d32));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-success-container, #19441b))}:host(:where([label-position=inset],:not([label-position]))[theme=success]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-success-container-low, #19441b))}:host([theme=error]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-error, #b00020));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-error-container, #5f0011));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-error, #b00020));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-error-container-low, #5f0011));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-error, #b00020));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-error-container, #5f0011))}:host(:where([label-position=inset],:not([label-position]))[theme=error]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-error-container-low, #5f0011))}:host([theme=warning]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-warning, #d14900));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-warning-container-low, #f9e9e0));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-warning-container, #712700));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-warning, #d14900));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-warning-container, #712700));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-warning-container-low, #712700));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-warning-container-low, #f9e9e0));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-warning, #d14900));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-warning-container, #712700))}:host(:where([label-position=inset],:not([label-position]))[theme=warning]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-warning-container-low, #712700))}:host([theme=info]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-info, #1565c0));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-info-container-low, #e3edf7));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-info-container, #0b3768));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-info, #1565c0));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-info-container, #0b3768));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-info-container-low, #0b3768));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-info-container-low, #e3edf7));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-info, #1565c0));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-info-container, #0b3768))}:host(:where([label-position=inset],:not([label-position]))[theme=info]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-info-container-low, #0b3768))}}@layer variant{:host([variant=plain]) .forge-field{--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--forge-theme-surface, #ffffff));--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-display:var(--forge-field-inner-border-display, none);--_field-padding-inline:var(--forge-field-padding-inline, 0);--_field-surface-display:var(--forge-field-surface-display, none)}:host(:where([variant=outlined],:not([variant]))) .forge-field{--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--forge-theme-surface, #ffffff))}:host([variant=tonal]) .forge-field{--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, calc(100% - 8px));--_field-background:var(--_field-tonal-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background));--_field-hover-background:var(--forge-field-hover-background, tonal-background-hover);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-multiline-inset-label-tonal-background))}:host([variant=filled]) .forge-field{--_field-background:var(--_field-filled-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background))}:host([variant=raised]) .forge-field{--_field-elevation:var(--forge-field-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_field-elevation-active:var(--forge-field-elevation-active, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, calc(100% - 8px));--_field-background:var(--_field-filled-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background))}}@layer shape{:host([shape=squared]) .forge-field{--_field-shape:var(--forge-field-shape, 0)}:host([shape=rounded]) .forge-field{--_field-shape:var(--forge-field-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_field-padding-inline:var(--forge-field-padding-inline, var(--_field-rounded-container-padding-inline-start))}}@layer density{:host(:where([label-position=inset],:not([label-position])):not([dense]):where([density=default],:not([density]))) .forge-field{--_field-height:var(--forge-field-height, var(--_field-inset-height))}:host(:where([density=extra-small],[dense])) .forge-field{--_field-height:var(--forge-field-height, 24px);--_field-padding-inline-start:var(--forge-field-padding-inline-start, 8px);--_field-padding-inline-end:var(--forge-field-padding-inline-end, 4px)}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .forge-field{--_field-height:var(--forge-field-height, 24px)}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .label,:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .label::before{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:fixed;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) ::slotted(:where(input,textarea,[data-forge-field-input])){--_field-font-size:var(--_field-dense-font-size)}:host(:not([dense])[density=small]) .forge-field{--_field-height:var(--forge-field-height, 32px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=small]) .forge-field{--_field-height:var(--forge-field-height, 40px)}:host(:not([dense])[density=medium]) .forge-field{--_field-height:var(--forge-field-height, 40px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=medium]) .forge-field{--_field-height:var(--forge-field-height, 48px)}:host(:not([dense])[density=large]) .forge-field{--_field-height:var(--forge-field-height, 48px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=large]) .forge-field{--_field-height:var(--forge-field-height, 56px)}:host(:not([dense])[density=extra-large]) .forge-field{--_field-height:var(--forge-field-height, 56px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=extra-large]) .forge-field{--_field-height:var(--forge-field-height, 64px)}}:host([disabled]) .forge-field{--_field-background:var(--_field-disabled-background);--_field-disableable-cursor:var(--forge-field-disableable-cursor, not-allowed);--_field-disableable-opacity:var(--forge-field-disableable-opacity, var(--_field-disabled-opacity))}:host(:not([disabled])[invalid]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-error, #b00020));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-error-container, #5f0011));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-error, #b00020));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-error-container-low, #5f0011));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-error, #b00020));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-label-color:var(--forge-field-label-color, var(--forge-theme-error, #b00020))}:host(:not([disabled])[invalid]) .forge-field .support-text{color:var(--forge-theme-error,#b00020)}:host(:not([disabled])) .forge-field:has(.container:hover){--_field-outline-color:var(--forge-field-outline-color, var(--_field-outline-color-hover));--_field-elevation:var(--forge-field-elevation, var(--_field-elevation-active));--_field-tonal-background:var(--_field-tonal-background-hover);--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--_field-multiline-inset-label-tonal-background-hover));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--_field-inner-border-color-hover))}:host(:not([disabled])) .forge-field:has(.input:focus-within){--_field-elevation:var(--forge-field-elevation, var(--_field-elevation-active))}.forge-field .outline{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:outline-color;transition-timing-function:var(--_field-surface-animation-timing);position:relative;grid-area:main;inline-size:100%;block-size:100%;box-shadow:var(--_field-elevation);border-radius:var(--_field-shape);outline-style:var(--_field-outline-style);outline-width:var(--_field-outline-width);outline-color:var(--_field-outline-color);outline-offset:calc(var(--_field-outline-width) * -1);pointer-events:none}.forge-field .container{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);position:relative;display:grid;isolation:isolate;grid-area:main;grid-template-areas:"start center end popover-icon accessory";grid-template-columns:auto 1fr auto auto auto;align-items:center;border-radius:var(--_field-shape);inline-size:100%;block-size:var(--_field-height);overflow:hidden}.forge-field .surface{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:background;transition-timing-function:var(--_field-surface-animation-timing);display:var(--_field-surface-display);grid-column:1/-1;grid-row:1/-1;border-radius:var(--_field-shape);inline-size:100%;block-size:100%;background:var(--_field-background);pointer-events:none}.forge-field .input{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);display:flex;grid-area:center;block-size:100%;inline-size:100%;min-inline-size:0;color:var(--forge-theme-text-high,rgba(0,0,0,.87))}.forge-field .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);position:relative;display:inline-flex;grid-area:var(--_field-label-grid-area);pointer-events:var(--_field-label-pointer-events);margin-block-end:var(--_field-label-margin-block-end);margin-inline-start:var(--_field-label-margin-inline-start);margin-inline-end:var(--_field-label-margin-inline-end);block-size:fit-content;overflow:hidden;color:var(--_field-label-color);line-height:normal;white-space:var(--_field-label-white-space)}.forge-field .popover-target{position:absolute;inset:calc(var(--_field-focus-indicator-width) * -1);pointer-events:none}.forge-field .popover-icon{display:none}.forge-field .popover-icon__arrow{fill:inherit}.forge-field .accessory,.forge-field .end,.forge-field .start,.forge-field .support-text,.forge-field .support-text-end,.forge-field .support-text-start{display:none}:host([required]) .label::before{margin-inline-end:var(--_field-required-padding);color:var(--forge-theme-error,#b00020);content:var(--_field-required-content)}:host([optional]) .label::after{margin-inline-start:var(--_field-optional-padding);color:inherit;content:var(--_field-optional-content)}:host([popover-icon]) .popover-icon{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-end:var(--_field-inner-padding-inline);display:flex;align-items:center;grid-area:popover-icon;isolation:isolate;block-size:100%}:host([popover-icon]) .popover-icon>*{transition:rotate var(--_field-popover-icon-transition-duration) var(--_field-popover-icon-transition-timing);fill:var(--_field-content-color)}:host([popover-icon][popover-expanded]) .popover-icon>*{rotate:var(--_field-popover-icon-open-rotation)}.forge-field.has-start .start{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-start:var(--_field-padding-inline-start);display:flex;grid-area:start;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-end .end{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-end:var(--_field-padding-inline-end);display:flex;grid-area:end;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-accessory .accessory{padding-inline-end:var(--_field-inner-padding-inline);position:relative;display:flex;grid-area:accessory;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-accessory .accessory::before{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:border-color;transition-timing-function:var(--_field-surface-animation-timing);padding-inline-end:var(--_field-inner-padding-inline);display:var(--_field-inner-border-display);border-inline-start-style:solid;border-inline-start-width:var(--_field-outline-width);border-inline-start-color:var(--_field-inner-border-color);block-size:var(--_field-inner-border-block-size);content:""}.forge-field.has-accessory .forge-field:not(.has-accessory) .popover-icon{padding-inline-end:var(--_field-padding-inline-end)}.forge-field.has-support-text-end .support-text,.forge-field.has-support-text-start .support-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);justify-content:space-between;display:grid;grid-template-areas:"start end";grid-template-columns:1fr auto;grid-area:support-text;margin-block-start:var(--_field-support-text-margin-block);line-height:normal}.forge-field.has-support-text-start.has-support-text-end .support-text{gap:var(--_field-support-text-gap)}.forge-field.has-support-text-start .support-text-start{display:inline-block;grid-area:start}.forge-field.has-support-text-end .support-text-end{display:inline-block;grid-area:end}:host(:not([popover-icon])) .forge-field:not(.has-accessory) .end{padding-inline-end:var(--_field-padding-inline-end)}:host([label-position=block-start]) .forge-field{grid-template-areas:"label" "main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto auto}:host([label-position=block-start]) .label{--_field-label-margin-block-end:var(--forge-field-label-margin-block-end, var(--_field-label-margin-block))}:host([label-position=inline-start]) .forge-field{grid-template-areas:"label main" ". support-text";grid-template-columns:auto 1fr;grid-template-rows:auto auto}:host([label-position=inline-start]) .label{--_field-label-margin-inline-end:var(--forge-field-label-margin-inline-end, var(--_field-label-margin-inline))}:host([label-position=inline-end]) .forge-field{grid-template-areas:"main label" "support-text .";grid-template-columns:1fr auto;grid-template-rows:auto auto}:host([label-position=inline-end]) .label{--_field-label-margin-inline-start:var(--forge-field-label-margin-inline-start, var(--_field-label-margin-inline))}:host(:where([label-position=inset],:not([label-position]))) .forge-field{grid-template-areas:"main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto;--_field-label-grid-area:var(--forge-field-label-grid-area, center);--_field-label-pointer-events:var(--forge-field-label-pointer-events, none);--_field-label-white-space:var(--forge-field-label-white-space, nowrap)}:host(:where([label-position=inset],:not([label-position]))) .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);padding-inline-start:var(--_field-padding-inline-start);padding-inline-end:var(--_field-padding-inline-end);z-index:999;--_field-floating-label-translation:var(--forge-field-floating-label-translation, 0 calc(calc(calc(max(var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375))), var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)))) / 2) + calc((var(--_field-height) - 56px) / 8)) * -1))}:host([label-position=none]) .forge-field{grid-template-areas:"main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto}:host([label-position=none]) .label{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:fixed;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}:host([label-position=inline-end][label-alignment=start]) .label,:host([label-position=inline-start][label-alignment=start]) .label{align-self:start}:host([label-position=inline-end]:where([label-alignment=center],[label-alignment=default],:not([label-alignment]))) .label,:host([label-position=inline-start]:where([label-alignment=center],[label-alignment=default],:not([label-alignment]))) .label{align-self:center}:host([label-position=inline-end][label-alignment=end]) .label,:host([label-position=inline-start][label-alignment=end]) .label{align-self:end}:host([label-position=inline-end][label-alignment=baseline]) .label,:host([label-position=inline-start][label-alignment=baseline]) .label{align-self:center;padding-block-start:calc(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))) - var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))}:host([label-position=block-start]:where([label-alignment=start],[label-alignment=default],:not([label-alignment]))) .label{justify-self:start}:host([label-position=block-start][label-alignment=center]) .label{justify-self:center}:host([label-position=block-start][label-alignment=end]) .label{justify-self:end}:host([label-position=block-start][label-alignment=baseline]:not([variant=plain])) .label{justify-self:start;padding-inline-start:var(--_field-padding-inline-start)}:host([label-position=block-start][label-alignment=baseline][variant=plain]) .label{justify-self:start;padding-inline-start:0px}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);translate:var(--_field-floating-label-translation)}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label .input{box-sizing:border-box}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label.floating-in .label{animation-name:float-in-label-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing)}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label.floating-in .input ::slotted(:is(input,[data-forge-field-input],[data-forge-multi-input-separator])){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) * 2)!important}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label:not(.floating-in) .input ::slotted(:is(input,[data-forge-field-input],[data-forge-multi-input-separator])){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) * 2)!important}:host(:where([label-position=inset],:not([label-position])):not([float-label])) .has-label.floating-out .label{animation-name:float-out-label-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing)}:host(:where([label-position=inset],:not([label-position]))[float-label][multiline]) .has-label ::slotted(textarea){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) + (var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)!important;padding-block-end:calc((var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)!important}:host([support-text-inset=both]) .support-text{padding-inline-start:var(--_field-padding-inline-start);padding-inline-end:var(--_field-padding-inline-end)}:host([support-text-inset=start]) .support-text{padding-inline-start:var(--_field-padding-inline-start)}:host([support-text-inset=end]) .support-text{padding-inline-end:var(--_field-padding-inline-end)}:host([multiline]) .container{align-items:start;block-size:fit-content;min-inline-size:var(--_field-multiline-min-inline-size);max-inline-size:var(--_field-multiline-max-inline-size);min-block-size:var(--_field-multiline-min-block-size);max-block-size:var(--_field-multiline-max-block-size);resize:var(--_field-multiline-resize)}:host([multiline]) .container .end,:host([multiline]) .container .label,:host([multiline]) .container .popover-icon,:host([multiline]) .container .start{align-items:center;block-size:var(--_field-height)}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label{pointer-events:none;inline-size:fit-content}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label slot{display:block}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label::after{animation-name:multiline-inset-label-background-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing);position:absolute;z-index:-1;inset-inline-start:var(--_field-outline-width);transition-duration:var(--_field-surface-animation-duration);transition-property:background;transition-timing-function:var(--_field-surface-animation-timing);background:var(--_field-multiline-inset-label-background);inline-size:100%;block-size:3ex;filter:blur(2px);content:""}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .forge-field:not(.has-label) .label::after{display:none}.forge-field .input ::slotted(*){box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;font-size:var(--_field-font-size);text-overflow:ellipsis;padding-block-start:0;padding-block-end:0;transition:padding-block var(--_field-floating-animation-duration) var(--_field-floating-animation-timing);cursor:var(--_field-disableable-cursor)}.forge-field .input ::slotted(*)::placeholder{color:var(--_field-placeholder-color)}.forge-field .input ::slotted(textarea){resize:none}.forge-field .input ::slotted(:is([data-forge-field-input],:first-of-type:is(input,textarea))){padding-inline-start:var(--_field-padding-inline-start)}.forge-field .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-padding-inline-end)}.forge-field .input ::slotted([data-forge-multi-input-separator]){align-self:center;padding-inline:4px;block-size:fit-content;inline-size:fit-content}.forge-field .label ::slotted(forge-label){font:inherit}.forge-field.has-start .input ::slotted(:is([data-forge-field-input],:first-of-type:is(input,textarea))){padding-inline-start:var(--_field-inner-padding-inline)}.forge-field.has-end .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}.forge-field.has-accessory .end{padding-inline-end:var(--_field-inner-padding-inline)}.forge-field ::slotted(:where([slot=support-text],[slot=helper-text])){display:block;min-height:.875rem}:host([variant=plain]) .forge-field.has-accessory .end{padding-inline-end:var(--_field-inner-padding-inline)}:host(:where([label-position=inset],:not([label-position]))) .forge-field.has-start .label{padding-inline-start:var(--_field-inner-padding-inline)}:host(:where([label-position=inset],:not([label-position]))) .label ::slotted(*){max-inline-size:100%;overflow:hidden;text-overflow:ellipsis}:host([popover-icon]) .forge-field .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}:host([popover-icon]) .forge-field .end{padding-inline-end:var(--_field-inner-padding-inline)}:host(:not(popover-icon)) .forge-field.has-accessory:not(:is(.has-end)) .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}:host([multiline]) .input ::slotted(:is(input,textarea)){padding-block-start:calc((var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2);padding-block-end:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) + (var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)}:host([multiline]) .accessory slot{align-items:center;block-size:var(--_field-height);display:flex;align-self:start}forge-focus-indicator{--forge-focus-indicator-color:var(--_field-focus-indicator-color);--forge-focus-indicator-outward-offset:calc(var(--_field-outline-width) * -1);--forge-focus-indicator-shape:var(--_field-shape);--forge-focus-indicator-width:var(--_field-focus-indicator-width)}:host([variant=plain]) forge-focus-indicator{--forge-focus-indicator-offset-inline:-4px}@media (prefers-reduced-motion:reduce){.forge-field{--_field-floating-animation-duration:var(--forge-field-floating-animation-duration, 0s)}}',k1=class extends M{static get observedAttributes(){return Object.values(V.observedAttributes)}constructor(){super(),H(this,lw,vw),this._core=new Xi(new $i(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case V.attributes.LABEL_POSITION:this.labelPosition=a;break;case V.attributes.LABEL_ALIGNMENT:this.labelAlignment=a;break;case V.attributes.FLOAT_LABEL:this.floatLabel=p(a);break;case V.attributes.INVALID:this.invalid=p(a);break;case V.attributes.REQUIRED:this.required=p(a);break;case V.attributes.OPTIONAL:this.optional=p(a);break;case V.attributes.DISABLED:this.disabled=p(a);break;case V.attributes.VARIANT:this.variant=a;break;case V.attributes.THEME:this.theme=a;break;case V.attributes.SHAPE:this.shape=a;break;case V.attributes.DENSITY:this.density=a;break;case V.attributes.DENSE:this.dense=p(a);break;case V.attributes.POPOVER_ICON:this.popoverIcon=p(a);break;case V.attributes.POPOVER_EXPANDED:this.popoverExpanded=p(a);break;case V.attributes.MULTILINE:this.multiline=p(a);break;case V.attributes.SUPPORT_TEXT_INSET:this.supportTextInset=a;break;case V.attributes.FOCUS_INDICATOR_FOCUS_MODE:this.focusIndicatorFocusMode=a;break;case V.attributes.FOCUS_INDICATOR_ALLOW_FOCUS:this.focusIndicatorAllowFocus=p(a);break}}floatLabelWithoutAnimation(t){this._core.floatLabelWithoutAnimation(t)}};s([v()],k1.prototype,"labelPosition",2),s([v()],k1.prototype,"labelAlignment",2),s([v()],k1.prototype,"floatLabel",2),s([v()],k1.prototype,"invalid",2),s([v()],k1.prototype,"required",2),s([v()],k1.prototype,"optional",2),s([v()],k1.prototype,"disabled",2),s([v()],k1.prototype,"variant",2),s([v()],k1.prototype,"theme",2),s([v()],k1.prototype,"shape",2),s([v()],k1.prototype,"density",2),s([v()],k1.prototype,"dense",2),s([v()],k1.prototype,"popoverIcon",2),s([v()],k1.prototype,"popoverExpanded",2),s([v()],k1.prototype,"multiline",2),s([v()],k1.prototype,"supportTextInset",2),s([v()],k1.prototype,"focusIndicatorTargetElement",2),s([v()],k1.prototype,"focusIndicatorFocusMode",2),s([v()],k1.prototype,"focusIndicatorAllowFocus",2),k1=s([y({name:V.elementName,dependencies:[Q]})],k1);var b2=class extends it(M){static get observedAttributes(){return Object.values(F.observedAttributes)}constructor(){super()}attributeChangedCallback(t,e,a){switch(t){case F.observedAttributes.LABEL_POSITION:this.labelPosition=a;return;case F.observedAttributes.LABEL_ALIGNMENT:this.labelAlignment=a;return;case F.observedAttributes.INVALID:this.invalid=p(a);return;case F.observedAttributes.REQUIRED:this.required=p(a);return;case F.observedAttributes.OPTIONAL:this.optional=p(a);return;case F.observedAttributes.DISABLED:this.disabled=p(a);return;case F.observedAttributes.FLOAT_LABEL:this.floatLabel=p(a);return;case F.observedAttributes.VARIANT:this.variant=a;return;case F.observedAttributes.THEME:this.theme=a;return;case F.observedAttributes.SHAPE:this.shape=a;return;case F.observedAttributes.DENSITY:this.density=a;return;case F.observedAttributes.DENSE:this.dense=p(a);return;case F.observedAttributes.POPOVER_ICON:this.popoverIcon=p(a);return;case F.observedAttributes.POPOVER_EXPANDED:this.popoverExpanded=p(a);return;case F.observedAttributes.SUPPORT_TEXT_INSET:this.supportTextInset=a;return}}labelClickedCallback(){this._core.click()}labelChangedCallback(t){this._core.applyLabel(t)}floatLabelWithoutAnimation(t){this._core.floatLabelWithoutAnimation(t)}};s([v()],b2.prototype,"labelPosition",2),s([v()],b2.prototype,"labelAlignment",2),s([v()],b2.prototype,"invalid",2),s([v()],b2.prototype,"required",2),s([v()],b2.prototype,"optional",2),s([v()],b2.prototype,"disabled",2),s([v({name:"permanentlyFloatLabel"})],b2.prototype,"floatLabel",2),s([v()],b2.prototype,"variant",2),s([v()],b2.prototype,"theme",2),s([v()],b2.prototype,"shape",2),s([v()],b2.prototype,"density",2),s([v()],b2.prototype,"dense",2),s([v()],b2.prototype,"popoverIcon",2),s([v()],b2.prototype,"popoverExpanded",2),s([v()],b2.prototype,"supportTextInset",2);var mo=class extends I{setFieldProperty(t,e){this._fieldElement[t]=e}floatLabelWithoutAnimation(t){this._fieldElement.floatLabelWithoutAnimation(t)}};var go=class{constructor(t){this._adapter=t;this._labelPosition=F.defaults.DEFAULT_LABEL_POSITION;this._labelAlignment=F.defaults.DEFAULT_LABEL_ALIGNMENT;this._invalid=!1;this._required=!1;this._optional=!1;this._disabled=!1;this._variant=F.defaults.DEFAULT_VARIANT;this._theme=F.defaults.DEFAULT_THEME;this._shape=F.defaults.DEFAULT_SHAPE;this._density=F.defaults.DEFAULT_DENSITY;this._dense=!1;this._popoverIcon=!1;this._popoverExpanded=!1;this._supportTextInset=F.defaults.DEFAULT_SUPPORT_TEXT_INSET;this._permanentlyFloatLabel=!1}get _hasValue(){return this._adapter.hasValue}get _hasPlaceholder(){return this._adapter.hasPlaceholder}click(){this._adapter.click()}applyLabel(t){this._adapter.applyLabel(t)}floatLabelWithoutAnimation(t){this._adapter.floatLabelWithoutAnimation(this._hasValue||this._hasPlaceholder||t)}_tryFloatLabel(t){if(!this._permanentlyFloatLabel){if(this._labelPosition!=="inset"){this._adapter.tryFloatLabel(!1);return}this._adapter.tryFloatLabel(t)}}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setFieldProperty("labelPosition",t),this._adapter.setHostAttribute(F.attributes.LABEL_POSITION,t))}get labelAlignment(){return this._labelAlignment}set labelAlignment(t){this._labelAlignment!==t&&(this._labelAlignment=t,this._adapter.setFieldProperty("labelAlignment",t),this._adapter.setHostAttribute(F.attributes.LABEL_ALIGNMENT,t))}get invalid(){return this._invalid}set invalid(t){this._invalid!==t&&(this._invalid=t,this._adapter.setFieldProperty("invalid",t),this._adapter.toggleHostAttribute(F.attributes.INVALID,t))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setFieldProperty("required",t),this._adapter.toggleHostAttribute(F.attributes.REQUIRED,t))}get optional(){return this._optional}set optional(t){this._optional!==t&&(this._optional=t,this._adapter.setFieldProperty("optional",t),this._adapter.toggleHostAttribute(F.attributes.OPTIONAL,t))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setFieldProperty("disabled",t),this._adapter.toggleHostAttribute(F.attributes.DISABLED,t))}get permanentlyFloatLabel(){return this._permanentlyFloatLabel}set permanentlyFloatLabel(t){this._permanentlyFloatLabel!==t&&(this._permanentlyFloatLabel=t,this._adapter.setFieldProperty("floatLabel",t||this._hasValue||this._hasPlaceholder),this._adapter.toggleHostAttribute(F.attributes.FLOAT_LABEL,t))}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t,this._adapter.setFieldProperty("variant",t),this._adapter.setHostAttribute(F.attributes.VARIANT,t))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.setFieldProperty("theme",t),this._adapter.setHostAttribute(F.attributes.THEME,t))}get shape(){return this._shape}set shape(t){this._shape!==t&&(this._shape=t,this._adapter.setFieldProperty("shape",t),this._adapter.setHostAttribute(F.attributes.SHAPE,t))}get density(){return this._density}set density(t){this._density!==t&&(this._density=t,this._adapter.setFieldProperty("density",t),this._adapter.setHostAttribute(F.attributes.DENSITY,t))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setFieldProperty("dense",t),this._adapter.toggleHostAttribute(F.attributes.DENSE,t))}get popoverIcon(){return this._popoverIcon}set popoverIcon(t){this._popoverIcon!==t&&(this._popoverIcon=t,this._adapter.setFieldProperty("popoverIcon",t),this._adapter.toggleHostAttribute(F.attributes.POPOVER_ICON,t))}get popoverExpanded(){return this._popoverExpanded}set popoverExpanded(t){this._popoverExpanded!==t&&(this._popoverExpanded=t,this._adapter.setFieldProperty("popoverExpanded",t))}get supportTextInset(){return this._supportTextInset}set supportTextInset(t){this._supportTextInset!==t&&(this._supportTextInset=t,this._adapter.setFieldProperty("supportTextInset",t),this._adapter.setHostAttribute(F.attributes.SUPPORT_TEXT_INSET,t))}};function Bc(){x(k1)}var Tc=`${b}text-field`,Sc={SHOW_CLEAR:"show-clear"},hw=w({},Sc),cw={FIELD:"#field",DEFAULT_SLOT:"slot:not([name])",LABEL_SLOT:"slot[name=label]",CLEAR_BUTTON_SLOT:"slot[name=clear-button]",FORGE_LABEL:o2.elementName,INPUT:":where(input:not([type=button], [type=checkbox], [type=color], [type=hidden], [type=image], [type=radio], [type=range], [type=reset], [type=submit]), textarea)"},pw=["disabled","placeholder"],dw={TEXTAREA:"TEXTAREA",LABEL:"LABEL"},mw={CLEAR:`${Tc}-clear`},V1={elementName:Tc,observedAttributes:Sc,attributes:hw,selectors:cw,observedInputAttributes:pw,tagNames:dw,events:mw};var ji=class extends mo{constructor(e){super(e);this._inputElements=[];this._destroyValueChangerListeners=[];this._fieldElement=g(e,V1.selectors.FIELD),this._clearButtonSlotElement=g(e,V1.selectors.CLEAR_BUTTON_SLOT),this._defaultSlotElement=g(e,V1.selectors.DEFAULT_SLOT),this._labelSlotElement=g(e,V1.selectors.LABEL_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(V.parts).join(", ")),this._clearButtonSlotElement.remove()}get hasValue(){return this._inputElements.some(e=>!!e.value)}get hasPlaceholder(){return this._inputElements.some(e=>!!e.placeholder)}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=g(this._fieldElement,V.selectors.POPOVER_TARGET)),this._popoverTargetElement}addRootListener(e,a){this._fieldElement.addEventListener(e,a)}removeRootListener(e,a){this._fieldElement.removeEventListener(e,a)}disableInput(e){this._inputElements.forEach(a=>a.disabled=e)}inputIsDisabled(){return this._inputElements.some(e=>e.disabled)}click(){var e;(e=this._inputElements[0])==null||e.focus()}applyLabel(e){this._inputElements.forEach(a=>{K(a,!!e,"aria-label",e!=null?e:"")})}handleDefaultSlotChange(e){var o;(o=this._inputMutationObserver)==null||o.disconnect();let a=this._defaultSlotElement.assignedElements();a.length&&(this._inputElements=a.filter(n=>n.matches(V1.selectors.INPUT)),this._fieldElement.multiline=this._inputElements.some(n=>n.tagName===V1.tagNames.TEXTAREA),this._inputMutationObserver=new MutationObserver(n=>{n.forEach(i=>{if(i.attributeName){let h=i.target.getAttribute(i.attributeName),c=i.attributeName;e(c,h)}})}),this._inputElements.forEach(n=>{var i;(i=this._inputMutationObserver)==null||i.observe(n,{attributes:!0,attributeFilter:[...V1.observedInputAttributes]}),this._component.disabled&&(n.disabled=!0),Object.values(V1.observedInputAttributes).forEach(l=>{let h=l;e(h,n.getAttribute(h))})}))}tryAddValueChangeListener(e,a){this._destroyValueChangerListeners.forEach(o=>o()),this._destroyValueChangerListeners=this._inputElements.map(o=>a0(e,o,"value",a))}removeValueChangeListener(){this._destroyValueChangerListeners.forEach(e=>e())}tryFloatLabel(e){if(e!==void 0){this._fieldElement.floatLabel=e;return}this._fieldElement.floatLabel=this.hasValue||this.hasPlaceholder}tryConnectSlottedLabel(){var l;if(this._inputElements.length!==1||(l=this._inputElements[0].labels)!=null&&l.length)return;let e=this._inputElements[0],a=this._labelSlotElement.assignedElements({flatten:!0}),o=a.find(h=>h.matches(V1.selectors.FORGE_LABEL));if(o){o.forElement=this._component,o.clickTarget=e;return}let n=a.find(h=>h.tagName===V1.tagNames.LABEL);if(!n||n.control)return;let i=e.id||`forge-input-${P2()}`;e.id=i,n.htmlFor=i}connectClearButton(e){this._clearButtonSlotElement.addEventListener("click",e)}disconnectClearButton(e){this._clearButtonSlotElement.removeEventListener("click",e)}toggleClearButtonVisibility(e){e?this._fieldElement.append(this._clearButtonSlotElement):this._clearButtonSlotElement.remove()}clearInput(){this._inputElements.length&&(this._inputElements.forEach(e=>{e.value="",e.dispatchEvent(new Event("input"))}),this._inputElements[0].focus())}getAllSlotElements(){var e,a;return Array.from((a=(e=this._component.shadowRoot)==null?void 0:e.querySelectorAll("slot"))!=null?a:[])}};var Zi=class extends go{constructor(e){super(e);this._adapter=e;this._showClear=!1;this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onInputChange.bind(this);this._clearButtonClickListener=e=>this._onClearButtonClick(e)}initialize(){this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener),this._initializeSlots()}destroy(){this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeValueChangeListener()}get popoverTargetElement(){return this._adapter.popoverTargetElement}_initializeSlots(){this._adapter.getAllSlotElements().forEach(e=>this._handleSlotChange(e.name))}_onSlotChange(e){let a=e.target;this._handleSlotChange(a.name)}_handleSlotChange(e){switch(e){case"label":this._adapter.tryConnectSlottedLabel();break;case"":this._adapter.handleDefaultSlotChange(this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,a){switch(e){case"disabled":this.disabled=a!==null;break;case"placeholder":this._tryFloatLabel();break}}_onClearButtonClick(e){let a=new CustomEvent(V1.events.CLEAR,{bubbles:!0,cancelable:!0,composed:!0});this._adapter.dispatchHostEvent(a),a.defaultPrevented||this._adapter.clearInput()}_onInputChange(e){let a;f3(e,InputEvent.name)&&e.target.type==="number"&&(e.data!=null||e.target.validity.badInput)&&(a=!0),this._syncValueChange({floatLabel:a})}_onValueChange(){this._syncValueChange()}_syncValueChange({floatLabel:e=void 0}={}){this._tryFloatLabel(e),this._toggleClearButtonVisibility()}_toggleClearButtonVisibility(){this._adapter.toggleClearButtonVisibility(this._showClear&&this._hasValue&&!this.disabled)}get showClear(){return this._showClear}set showClear(e){this._showClear!==e&&(this._showClear=e,this._adapter.toggleHostAttribute(V1.attributes.SHOW_CLEAR,e),e?this._adapter.connectClearButton(this._clearButtonClickListener):this._adapter.disconnectClearButton(this._clearButtonClickListener),this._toggleClearButtonVisibility())}get disabled(){return super.disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._adapter.toggleHostAttribute(V.attributes.DISABLED,e),this._adapter.setFieldProperty("disabled",e),this._adapter.disableInput(e),this._toggleClearButtonVisibility())}get labelPosition(){return super.labelPosition}set labelPosition(e){this._labelPosition!==e&&(this._labelPosition=e,this._adapter.toggleHostAttribute(V.attributes.LABEL_POSITION,!0,e),this._adapter.setFieldProperty("labelPosition",e),this._tryFloatLabel())}};var gw='<template><forge-field id="field"><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><slot></slot><slot slot="end" name="end"></slot><slot slot="end" name="clear-button"><forge-icon-button tabindex="-1" dense><forge-icon name="clear"></forge-icon></forge-icon-button><forge-tooltip type="label"><slot name="clear-button-tooltip">Clear</slot></forge-tooltip></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',ww=":host{display:block}:host([hidden]){display:none}forge-field{display:contents}",m0=class extends b2{static get observedAttributes(){return[...Object.values(F.observedAttributes),...Object.values(V1.observedAttributes)]}constructor(){super(),H(this,gw,ww),this._core=new Zi(new ji(this)),q.define(Z5)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(super.attributeChangedCallback(t,e,a),t){case V1.attributes.SHOW_CLEAR:this.showClear=p(a);break}}get popoverTargetElement(){return this._core.popoverTargetElement}};s([v()],m0.prototype,"showClear",2),m0=s([y({name:V1.elementName,dependencies:[k1,n1,p1]})],m0);var J0=class extends a2{constructor(t){super(t)}_build(){let t=document.createElement(V1.elementName);return this._inputElement=this._buildInputElement(t),t.append(this._inputElement),t}_configure(){var t,e,a,o,n,i;(t=this._config.options)!=null&&t.label&&this._createLabel(this._config.options.label),(e=this._config.options)!=null&&e.startElement&&(this._config.options.startElement.slot="start",this._element.append(this._config.options.startElement)),(a=this._config.options)!=null&&a.leadingElement&&(this._config.options.leadingElement.slot="start",this._element.append(this._config.options.leadingElement)),(o=this._config.options)!=null&&o.endElement&&(this._config.options.endElement.slot="end",this._element.append(this._config.options.endElement)),(n=this._config.options)!=null&&n.trailingElement&&(this._config.options.trailingElement.slot="end",this._element.append(this._config.options.trailingElement)),(i=this._config.options)!=null&&i.accessoryElement&&(this._config.options.accessoryElement.slot="accessory",this._element.append(this._config.options.accessoryElement))}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}get disabled(){return this._inputElement.disabled}set disabled(t){this._inputElement.disabled=t}get invalid(){return this._element.invalid}set invalid(t){this._element.invalid=t}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(t){this._inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._inputElement.addEventListener("blur",e=>t(e))}setLabel(t){var e;if(t){this._labelElement?this._labelElement.textContent=t:this._createLabel(t);return}(e=this._labelElement)==null||e.remove(),this._labelElement=void 0}setSupportText(t){var e;if(t){this._supportTextElement||(this._supportTextElement=document.createElement("span"),this._supportTextElement.slot="support-text",this._element.append(this._supportTextElement)),this._supportTextElement.textContent=t;return}(e=this._supportTextElement)==null||e.remove(),this._supportTextElement=void 0}setHelperText(t){this.setSupportText(t)}setSupportTextEnd(t){var e;if(t){this._supportTextEndElement||(this._supportTextEndElement=document.createElement("span"),this._supportTextEndElement.slot="support-text-end",this._element.append(this._supportTextEndElement)),this._supportTextEndElement.textContent=t;return}(e=this._supportTextEndElement)==null||e.remove(),this._supportTextEndElement=void 0}floatLabel(t){this._element.floatLabel=t}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,this._labelElement.slot="label",(e=this._config.options)!=null&&e.id&&(this._labelElement.htmlFor=this._config.options.id),this._element.append(this._labelElement)}_buildInputElement(t){var a,o,n,i,l;let e=document.createElement("input");return e.type=(o=(a=this._config.options)==null?void 0:a.type)!=null?o:"text",((n=this._config.options)==null?void 0:n.value)!==void 0&&(e.value=this._config.options.value),(i=this._config.options)!=null&&i.id&&(e.id=this._config.options.id),((l=this._config.options)==null?void 0:l.placeholder)!==void 0&&(e.placeholder=this._config.options.placeholder),t.append(e),e}};function kc(){x(m0)}var S4=`${b}chip-field`,Oc={ADD_ON_BLUR:"add-on-blur"},uw=w({},Oc),_w={CONTAINER:".container",INPUT:"input",MEMBER_SLOT:"slot[name=member]",MEMBER:"[slot=member]"},fw={HAS_MEMBERS:"has-members"},xw={MEMBER_ADDED:`${S4}-member-added`,MEMBER_REMOVED:`${S4}-member-removed`},bw=["disabled","placeholder"],yw={TEXTAREA:"TEXTAREA",LABEL:"LABEL"},g2={elementName:S4,observedAttributes:Oc,attributes:uw,selectors:_w,classes:fw,events:xw,observedInputAttributes:bw,tagNames:yw};var Qi=class extends mo{get hasValue(){return!!this._component.querySelector(g2.selectors.MEMBER)||this.hasInputValue}get hasPlaceholder(){var t;return!!((t=this._inputElement)!=null&&t.placeholder)}get hasInputValue(){var t;return!!((t=this._inputElement)!=null&&t.value)}get inputHasFocus(){var t;return!!((t=this._inputElement)!=null&&t.matches(":focus"))}get inputElement(){return this._inputElement}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=g(this._fieldElement,V.selectors.POPOVER_TARGET)),this._popoverTargetElement}constructor(t){super(t),this._fieldElement=g(t,V.elementName),this._containerElement=g(t,g2.selectors.CONTAINER),this._memberSlot=g(t,g2.selectors.MEMBER_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(V.parts).join(", "))}initialize(){this._inputElement=this._component.querySelector("input:not([type=checkbox]):not([type=radio])")}addRootListener(t,e,a){this._fieldElement.addEventListener(t,e,a)}removeRootListener(t,e,a){this._fieldElement.removeEventListener(t,e,a)}addInputListener(t,e){var a;(a=this._inputElement)==null||a.addEventListener(t,e)}removeInputListener(t,e){var a;(a=this._inputElement)==null||a.removeEventListener(t,e)}clickInput(){var t;(t=this._inputElement)==null||t.click()}tryAddValueChangeListener(t,e){var a;(a=this._destroyValueChangerListener)==null||a.call(this),this._inputElement&&(this._destroyValueChangerListener=a0(t,this._inputElement,"value",e))}removeValueChangeListener(){var t;(t=this._destroyValueChangerListener)==null||t.call(this)}focusInput(){var t;(t=this._inputElement)==null||t.focus()}getSlottedMemberElements(){return this._memberSlot.assignedElements()}click(){this.focusInput()}applyLabel(t){this._inputElement&&K(this._inputElement,!!t,"aria-label",t!=null?t:"")}tryFloatLabel(t){if(t!==void 0){this._component.floatLabel=t;return}this._component.floatLabel=this.hasValue||this.hasPlaceholder}handleDefaultSlotChange(t,e){var o,n;(o=this._inputMutationObserver)==null||o.disconnect();let a=t.assignedElements();this._inputElement=a.find(i=>i.matches(g2.selectors.INPUT)),this._inputElement&&(this._component.disabled&&(this._inputElement.disabled=!0),this._inputMutationObserver=new MutationObserver(i=>{i.forEach(l=>{if(l.attributeName){let c=l.target.getAttribute(l.attributeName),d=l.attributeName;e(d,c)}})}),(n=this._inputMutationObserver)==null||n.observe(this._inputElement,{attributes:!0,attributeFilter:[...g2.observedInputAttributes]}),Object.values(g2.observedInputAttributes).forEach(i=>{let l=i;this._inputElement&&e(l,this._inputElement.getAttribute(l))}))}tryConnectSlottedLabel(t){if(!this._inputElement)return;let e=t.assignedElements({flatten:!0}),a=e.find(i=>i.matches(o2.elementName));if(a){a.forElement=this._component,a.clickTarget=this._inputElement;return}let o=e.find(i=>i.tagName===g2.tagNames.LABEL);if(!o||o.control)return;let n=this._inputElement.id||`forge-input-${P2()}`;this._inputElement.id=n,o.htmlFor=n}toggleContainerClass(t,e){this._containerElement.classList.toggle(t,e)}setDisabled(t){this._inputElement&&(this._inputElement.disabled=t)}};var Ji=class extends go{constructor(e){super(e);this._addOnBlur=!1;this._mouseDownListener=this._onMouseDown.bind(this);this._clickListener=this._onClick.bind(this);this._rootKeyDownListener=this._onRootKeyDown.bind(this);this._inputKeyDownListener=this._onKeyDown.bind(this);this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onValueChange.bind(this);this._blurListener=this._onBlur.bind(this)}initialize(){this._adapter.initialize(),this._adapter.addRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.addRootListener("click",this._clickListener),this._adapter.addRootListener("keydown",this._rootKeyDownListener),this._adapter.addInputListener("keydown",this._inputKeyDownListener),this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._addOnBlur&&this._adapter.addInputListener("blur",this._blurListener)}destroy(){this._adapter.removeRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeRootListener("keydown",this._rootKeyDownListener),this._adapter.removeInputListener("keydown",this._inputKeyDownListener),this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeValueChangeListener()}_onBlur(e){let a=e.target;this._addOnBlur&&this._addMember(a),a.value=""}_onMouseDown(e){if(this._disabled||this._adapter.inputHasFocus){e.preventDefault(),e.stopPropagation();return}}_onClick(e){this._disabled||e.target!==this._adapter.inputElement&&(this._adapter.focusInput(),this._adapter.clickInput())}_onValueChange(){this._tryFloatLabel()}_onSlotChange(e){let a=e.target;switch(a.name){case"label":this._adapter.tryConnectSlottedLabel(a);break;case"member":this._adapter.toggleContainerClass(g2.classes.HAS_MEMBERS,a.assignedElements().length>0),this._adapter.tryFloatLabel(),this._adapter.getSlottedMemberElements().forEach(o=>o.tabIndex=-1);break;case"":this._adapter.handleDefaultSlotChange(a,this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,a){switch(e){case"disabled":this.disabled=a!==null;break;case"placeholder":this._tryFloatLabel();break}}_onRootKeyDown({key:e}){if(!this._adapter.hasInputValue)switch(e){case"ArrowRight":this._focusNextMember();break;case"ArrowLeft":this._focusPreviousMember();break;case"Backspace":case"Delete":this._removeMember();break}}_onKeyDown({target:e,key:a}){let o=e;switch(a){case"Enter":this._addMember(o);break;case"Escape":o.value="";break;case"Tab":this._addOnBlur||(o.value="");break}}_focusNextMember(){let e=this._adapter.getSlottedMemberElements();if(!(!e.length||this._adapter.inputHasFocus))for(let a=0;a<e.length;a++){let o=e.at(a),n=e.at(a+1);if(o&&this._isMemberActive(o))if(n){n.focus();break}else this._adapter.focusInput()}}_focusPreviousMember(){let e=this._adapter.getSlottedMemberElements();if(e.length){if(this._adapter.inputHasFocus){e[e.length-1].focus();return}for(let a=0;a<e.length;a++){let o=e.at(a-1),n=e.at(a);if(n&&this._isMemberActive(n)&&o){o.focus();break}}}}_isMemberActive(e){return e.matches(":focus-within")}_getActiveMember(){var a;return(a=this._adapter.getSlottedMemberElements().find(o=>this._isMemberActive(o)))!=null?a:null}_addMember(e){let a=e.value.trim();a.length>0&&this._adapter.emitHostEvent(g2.events.MEMBER_ADDED,a),e.value=""}_removeMember(){let e=this._getActiveMember();e||(e=this._adapter.getSlottedMemberElements().at(-1)),e&&(this._focusNextMember(),this._adapter.emitHostEvent(g2.events.MEMBER_REMOVED,e))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){e=!!e,this._addOnBlur!==e&&(this._addOnBlur=e,this._adapter.isConnected&&(this._addOnBlur?this._adapter.addInputListener("blur",this._blurListener):this._adapter.removeInputListener("blur",this._blurListener)),this._adapter.toggleHostAttribute(g2.attributes.ADD_ON_BLUR,this._addOnBlur))}get popoverTargetElement(){return this._adapter.popoverTargetElement}get disabled(){return super.disabled}set disabled(e){this.disabled!==e&&(super.disabled=e,this._adapter.setDisabled(e))}};var Mw=`${b}chip-set`,Dc={VERTICAL:"vertical",TYPE:"type",DENSE:"dense",DISABLED:"disabled",INVALID:"invalid",THEME:"theme"},Hw=w({},Dc),Lw={ROOT:".forge-chip-set"},tt={elementName:Mw,observedAttributes:Dc,attributes:Hw,selectors:Lw};var ts=`${b}chip`,Pc={TYPE:"type",VALUE:"value",SELECTED:"selected",INVALID:"invalid",DISABLED:"disabled",DENSE:"dense",THEME:"theme",HREF:"href",TARGET:"target",DOWNLOAD:"download",REL:"rel"},Iw=w({},Pc),Vw={ROOT:".forge-chip",TRIGGER:"#trigger"},Ew={DELETE:`${ts}-delete`,SELECT:`${ts}-select`,NAVIGATE:`${ts}-navigate`},Cw={TYPE:"action",THEME:"primary"},d1={elementName:ts,observedAttributes:Pc,attributes:Iw,selectors:Vw,events:Ew,defaults:Cw};var zw='<div class="checkmark" aria-hidden="true"><svg viewBox="-2 -3 30 30"><path fill="none" stroke="black" d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></div>',es=class extends I{constructor(e){super(e);this._component=e;this._rootElement=g(this._component,d1.selectors.ROOT),this._triggerElement=g(this._component,d1.selectors.TRIGGER),this._startSlotElement=g(this._component,"slot[name=start]"),this._focusIndicatorElement=g(this._component,m1.elementName),this._stateLayerElement=g(this._component,M1.elementName)}get removeButtonElement(){return this._removeButtonElement}get isAnchor(){return this._triggerElement.localName==="a"}clickTrigger(){this._triggerElement.click()}addRootListener(e,a){this._rootElement.addEventListener(e,a)}removeRootListener(e,a){this._rootElement.removeEventListener(e,a)}setAnchor(e){if(e){if(this._triggerElement.localName==="button"){let a=this._createAnchorElement();this._triggerElement=Ka(this._triggerElement,a)}}else if(this._triggerElement.localName==="a"){let a=this._createButtonElement();this._triggerElement=Ka(this._triggerElement,a)}this._stateLayerElement.targetElement!==this._triggerElement&&(this._stateLayerElement.targetElement=this._triggerElement),this._focusIndicatorElement.targetElement!==this._triggerElement&&(this._focusIndicatorElement.targetElement=this._triggerElement)}setAnchorProperty(e,a){this._triggerElement.localName==="a"&&this._triggerElement instanceof HTMLAnchorElement&&(this._triggerElement[e]=a)}setCheckmarkVisibility(e){e?(this._checkmarkElement||(this._checkmarkElement=b5(zw)),this._rootElement.insertBefore(this._checkmarkElement,this._rootElement.firstChild)):this._checkmarkElement&&this._checkmarkElement.isConnected&&this._checkmarkElement.remove()}setDisabled(e){if(this._triggerElement instanceof HTMLAnchorElement){this._focusIndicatorElement.isConnected||this._rootElement.append(this._focusIndicatorElement),this._stateLayerElement.isConnected||this._rootElement.append(this._stateLayerElement);return}this._removeButtonElement&&(this._removeButtonElement.disabled=e),this._triggerElement.disabled=e,this._triggerElement.tabIndex=e?-1:0,e?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}setSelected(e){this._triggerElement instanceof HTMLAnchorElement||K(this._triggerElement,e,"aria-pressed",String(e))}toggleFieldVariant(e){e?(this._stateLayerElement.isConnected||this._rootElement.append(this._stateLayerElement),this._focusIndicatorElement.targetElement!==this._triggerElement&&(this._focusIndicatorElement.targetElement=this._triggerElement)):this._stateLayerElement.remove()}setDeleteButtonVisibility(e){var a;e?(this._removeButtonElement||(this._removeButtonElement=this._createRemoveButton()),this._rootElement.appendChild(this._removeButtonElement)):(a=this._removeButtonElement)==null||a.remove()}setStartSlotVisibility(e){this._startSlotElement.style.display=e?"":"none"}getChipSetState(){let e=null,a=Wl(this._component,o=>o&&o.nodeName===tt.elementName.toUpperCase());return a&&(e={type:a.type,disabled:a.disabled,dense:a.dense}),e}focusTrigger(e){this._triggerElement.focus(w({preventScroll:!0},e))}tryFocusRemoveButton(){this._removeButtonElement?this._removeButtonElement.focus({preventScroll:!0,focusVisible:!0}):this.focusTrigger()}clickRemoveButton(){var e;(e=this._removeButtonElement)==null||e.click()}animateStateLayer(){this._stateLayerElement.playAnimation()}_createRemoveButton(){let e=document.createElement("forge-icon-button");e.density="small",e.id="remove-button",e.classList.add("remove"),e.tabIndex=-1,e.setAttribute("aria-label",`Remove ${this._component.innerText}`),e.setAttribute("part","remove-button");let a=document.createElement("forge-icon");return a.name="close",e.appendChild(a),e}_createAnchorElement(){let e=document.createElement("a");return e.id="trigger",e.setAttribute("part","trigger"),e.classList.add("trigger"),this._component.href&&(e.href=this._component.href),this._component.target&&(e.target=this._component.target),this._component.download&&(e.download=this._component.download),this._component.rel&&(e.rel=this._component.rel),e}_createButtonElement(){let e=document.createElement("button");return e.type="button",e.id="trigger",e.setAttribute("part","trigger"),e.classList.add("trigger"),this._component.disabled&&(e.disabled=!0),this._component.selected&&e.setAttribute("aria-pressed","true"),e}};var as=class{constructor(t){this._adapter=t;this._type=d1.defaults.TYPE;this._selected=!1;this._invalid=!1;this._disabled=!1;this._dense=!1;this._theme=d1.defaults.THEME;this._clickListener=this._onClick.bind(this);this._keydownListener=this._onKeydown.bind(this)}initialize(){this._attachListeners(),this._tryInheritChipSetState()}focus(t){this._adapter.focusTrigger(t)}focusRemoveButton(){var t;(t=this._adapter.removeButtonElement)==null||t.focus()}click(){this._adapter.clickTrigger()}_attachListeners(){this._adapter.addRootListener("click",this._clickListener),this._adapter.addRootListener("keydown",this._keydownListener)}_detachListeners(){this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeRootListener("keydown",this._keydownListener)}_tryInheritChipSetState(){let t=this._adapter.getChipSetState();t&&(t.type!==void 0&&(this.type=t.type),t.disabled!==void 0&&(this.disabled=t.disabled),t.dense!==void 0&&(this.dense=t.dense))}_onClick(t){this._isRemoveButton(t)?(t.stopImmediatePropagation(),this._dispatchDeleteEvent()):this._handleSelectInteraction()}_onKeydown(t){switch(t.key){case"Delete":case"Backspace":this._type==="input"&&(t.preventDefault(),this._dispatchDeleteEvent());break;case"Enter":case" ":t.preventDefault(),this._isRemoveButton(t)?(t.stopImmediatePropagation(),t.key==="Enter"&&this._adapter.clickRemoveButton()):(this.click(),this._adapter.isAnchor&&this._adapter.animateStateLayer());break;case"ArrowLeft":case"ArrowRight":this._tryNavigate(t);break;case"Tab":this._type==="input"&&this._isRemoveButton(t)&&this._tryNavigate(t);break}}_tryNavigate(t){var a;if(this._type==="input"){if(!!((a=this._adapter.removeButtonElement)!=null&&a.matches(":focus"))){if(t.stopPropagation(),t.preventDefault(),t.key==="ArrowLeft"){this._adapter.focusTrigger();return}}else if(t.key==="ArrowRight"){this._adapter.tryFocusRemoveButton();return}}let e={direction:t.key==="ArrowRight"||t.key==="Tab"?"next":"previous"};this._adapter.dispatchHostEvent(new CustomEvent(d1.events.NAVIGATE,{bubbles:!0,detail:e}))}_isRemoveButton(t){return!!this._adapter.removeButtonElement&&t.composedPath().includes(this._adapter.removeButtonElement)}_handleSelectInteraction(){let t=this._selected;this._selected=!this._selected;let e=this._dispatchSelectEvent();this._selected=t;let a=["filter","choice","input"].includes(this._type);!e&&a&&(this._selected=!this._selected,this._applySelected())}_dispatchSelectEvent(){let t={selected:this._selected,value:this._value},e=new CustomEvent(d1.events.SELECT,{detail:t,bubbles:!0,cancelable:!0});return this._adapter.dispatchHostEvent(e),e.defaultPrevented}_dispatchDeleteEvent(){let t={value:this._value};this._adapter.dispatchHostEvent(new CustomEvent(d1.events.DELETE,{detail:t,bubbles:!0}))}_applyType(){let t=this._type==="input"||this._type==="field";this._adapter.setDeleteButtonVisibility(t),this._adapter.setCheckmarkVisibility(this._type==="filter"),this._adapter.setStartSlotVisibility(!this._selected),this._adapter.toggleFieldVariant(this._type!=="field"),this._applySelected(),this._adapter.setHostAttribute(d1.attributes.TYPE,this._type)}_applySelected(){this._adapter.setSelected(this._selected),this._type==="filter"&&this._adapter.setStartSlotVisibility(!this._selected),this._adapter.toggleHostAttribute(d1.attributes.SELECTED,this._selected)}get type(){return this._type}set type(t){this._type!==t&&(this._type=t,["action","choice","filter","input","field"].includes(this._type)||(this._type="action"),this._applyType())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t)}get selected(){return this._selected}set selected(t){t=!!t,this._selected!==t&&(this._selected=t,this._applySelected())}get invalid(){return this._invalid}set invalid(t){t=!!t,this._invalid!==t&&(this._invalid=t,this._adapter.toggleHostAttribute(d1.attributes.INVALID,t))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.isConnected&&(this._disabled?this._detachListeners():this._attachListeners()),this._adapter.toggleHostAttribute(d1.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){t=!!t,this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(d1.attributes.DENSE,this._dense))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:d1.defaults.THEME,this._adapter.setHostAttribute(d1.attributes.THEME,this._theme))}get href(){return this._href}set href(t){var e;if(this._href!==t){this._href=t;let a=!!((e=this._href)!=null&&e.trim());this._adapter.setAnchor(a),a&&this._disabled&&this._adapter.setDisabled(!1),this._adapter.toggleHostAttribute(d1.attributes.HREF,a,this._href)}}get target(){return this._target}set target(t){var e;this._target!==t&&(this._target=t,this._adapter.setAnchorProperty("target",t),this._adapter.toggleHostAttribute(d1.attributes.TARGET,!!((e=this._target)!=null&&e.trim()),this._target))}get download(){return this._download}set download(t){var e;this._download!==t&&(this._download=t,this._adapter.setAnchorProperty("download",t),this._adapter.toggleHostAttribute(d1.attributes.DOWNLOAD,!!((e=this._download)!=null&&e.trim()),this._download))}get rel(){return this._rel}set rel(t){var e;this._rel!==t&&(this._rel=t,this._adapter.setAnchorProperty("rel",t),this._adapter.toggleHostAttribute(d1.attributes.REL,!!((e=this._rel)!=null&&e.trim()),this._rel))}};var Aw='<template><div class="forge-chip" part="root"><button type="button" id="trigger" class="trigger" part="trigger"><slot name="start"><slot name="leading"></slot></slot><slot></slot><slot name="end"><slot name="trailing"></slot></slot></button><forge-focus-indicator target="trigger" part="focus-indicator"></forge-focus-indicator><forge-state-layer target="trigger" exportparts="surface:state-layer"></forge-state-layer></div></template>',Bw=':host{display:inline-flex}:host([hidden]){display:none}.forge-chip{--_chip-background:var(--forge-chip-background, transparent);--_chip-color:var(--forge-chip-color, var(--forge-theme-primary, #3f51b5));--_chip-shape:var(--forge-chip-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_chip-spacing:var(--forge-chip-spacing, var(--forge-spacing-xsmall, 8px));--_chip-height:var(--forge-chip-height, 32px);--_chip-padding-inline:var(--forge-chip-padding-inline, var(--forge-spacing-small, 12px));--_chip-padding-block:var(--forge-chip-padding-block, 0);--_chip-cursor:var(--forge-chip-cursor, pointer);--_chip-icon-font-size:var(--forge-chip-icon-font-size, 1.5rem);--_chip-focus-indicator-color:var(--forge-chip-focus-indicator-color, var(--_chip-color));--_chip-disabled-opacity:var(--forge-chip-disabled-opacity, 0.38);--_chip-disabled-cursor:var(--forge-chip-disabled-cursor, not-allowed);--_chip-dense-height:var(--forge-chip-dense-height, 24px);--_chip-dense-padding-inline:var(--forge-chip-dense-padding-inline, var(--forge-spacing-xsmall, 8px));--_chip-dense-spacing:var(--forge-chip-dense-spacing, var(--forge-spacing-xxsmall, 4px));--_chip-dense-font-size:var(--forge-chip-dense-font-size, 0.75rem);--_chip-dense-font-weight:var(--forge-chip-dense-font-weight, normal);--_chip-dense-focus-indicator-offset:var(--forge-chip-dense-focus-indicator-offset, var(--forge-spacing-xxxsmall, 2px));--_chip-dense-icon-font-size:var(--forge-chip-dense-icon-font-size, 1.25rem);--_chip-remove-button-spacing:var(--forge-chip-remove-button-spacing, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-xxsmall, 4px));--_chip-remove-button-height-dense:var(--forge-chip-remove-button-height-dense, 18px);--_chip-remove-button-icon-size-dense:var(--forge-chip-remove-button-icon-size-dense, 16px);--_chip-remove-button-spacing-dense:var(--forge-chip-remove-button-spacing-dense, 0 var(--forge-spacing-xxxsmall, 2px));--_chip-selected-background:var(--forge-chip-selected-background, var(--forge-theme-primary, #3f51b5));--_chip-selected-color:var(--forge-chip-selected-color, var(--forge-theme-on-primary, #ffffff));--_chip-invalid-color:var(--forge-chip-invalid-color, var(--forge-theme-error, #b00020));--_chip-invalid-selected-background:var(--forge-chip-invalid-selected-background, var(--forge-theme-error, #b00020));--_chip-invalid-selected-color:var(--forge-chip-invalid-selected-color, var(--forge-theme-on-error, #ffffff));--_chip-border-width:var(--forge-chip-border-width, var(--forge-border-thin, 1px));--_chip-border-style:var(--forge-chip-border-style, solid);--_chip-border-color:var(--forge-chip-border-color, var(--_chip-color));--_chip-field-background:var(--forge-chip-field-background, var(--forge-theme-surface-container-low, #ebebeb));--_chip-field-color:var(--forge-chip-field-color, var(--forge-theme-on-surface-container-low, #000000));--_chip-field-shape:var(--forge-chip-field-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_chip-field-border-color:var(--forge-chip-field-border-color, transparent);--_chip-field-cursor:var(--forge-chip-field-cursor, default);--_chip-checkmark-size:var(--forge-chip-checkmark-size, 1.25em);--_chip-checkmark-color:var(--forge-chip-checkmark-color, var(--_chip-color));--_chip-checkmark-spacing:var(--forge-chip-checkmark-spacing, var(--forge-spacing-xsmall, 8px));--_chip-avatar-size:var(--forge-chip-avatar-size, 24px);--_chip-avatar-size-dense:var(--forge-chip-avatar-size-dense, 18px);--_chip-avatar-font-size:var(--forge-chip-avatar-font-size, 0.75rem);--_chip-avatar-font-size-dense:var(--forge-chip-avatar-font-size-dense, 0.5rem);--_chip-avatar-spacing:var(--forge-chip-avatar-spacing, calc(var(--forge-spacing-xsmall, 8px) * -1));--_chip-avatar-spacing-dense:var(--forge-chip-avatar-spacing-dense, calc(var(--forge-spacing-xxsmall, 4px) * -1));--_chip-transition-duration:var(--forge-chip-transition-duration, var(--forge-animation-duration-short3, 150ms));--_chip-transition-easing:var(--forge-chip-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_chip-checkmark-transition-delay:var(--forge-chip-checkmark-transition-delay, 50ms)}.forge-chip{position:relative;display:inline-flex;align-items:center;box-sizing:border-box;height:var(--_chip-height);border-width:var(--_chip-border-width);border-style:var(--_chip-border-style);border-color:var(--_chip-border-color);border-radius:var(--_chip-shape);background:var(--_chip-background);color:var(--_chip-color);transition-property:background-color,color;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing)}.trigger{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:inline-flex;align-items:center;justify-content:center;gap:var(--_chip-spacing);box-sizing:border-box;height:100%;padding-inline:var(--_chip-padding-inline);padding-block:var(--_chip-padding-block);cursor:var(--_chip-cursor);z-index:0;text-decoration:none;border:none;background:inherit;color:inherit;-webkit-tap-highlight-color:transparent;border-radius:var(--_chip-shape);outline:0}.remove{padding-inline:var(--_chip-remove-button-spacing);--forge-icon-button-focus-indicator-color:var(--_chip-color)}forge-focus-indicator{--forge-focus-indicator-color:var(--_chip-focus-indicator-color);--forge-focus-indicator-shape:var(--_chip-shape)}forge-state-layer{--forge-state-layer-color:var(--_chip-color)}:host([dense]) .forge-chip{--_chip-height:var(--_chip-dense-height);--_chip-padding-inline:var(--_chip-dense-padding-inline);--_chip-spacing:var(--_chip-dense-spacing)}:host([dense]) .trigger{--forge-typography-button-font-size:var(--_chip-dense-font-size);--forge-typography-button-font-weight:var(--_chip-dense-font-weight)}:host([dense]) .remove{--_chip-remove-button-spacing:var(--_chip-remove-button-spacing-dense);--forge-icon-button-density-small-size:var(--_chip-remove-button-height-dense);--forge-icon-button-density-small-icon-size:var(--_chip-remove-button-icon-size-dense)}:host([dense]) forge-focus-indicator{--forge-focus-indicator-outward-offset:var(--_chip-dense-focus-indicator-offset)}:host([dense]) ::slotted(forge-avatar){--_chip-avatar-spacing:var(--_chip-avatar-spacing-dense);--forge-typography-subheading2-font-size:var(--_chip-avatar-font-size-dense);--forge-avatar-size:var(--_chip-avatar-size-dense)}:host([dense]) ::slotted(:is([slot=start],[slot=leading],[slot=end],[slot=trailing])){--_chip-icon-font-size:var(--_chip-dense-icon-font-size)}:host(:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--_chip-selected-background);--_chip-color:var(--_chip-selected-color)}:host(:is([type=filter],[type=choice],[type=input])[selected]) forge-focus-indicator{--forge-focus-indicator-color:var(--_chip-background)}:host([invalid]) .forge-chip{--_chip-color:var(--_chip-invalid-color)}:host([invalid]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--_chip-invalid-selected-background);--_chip-color:var(--_chip-invalid-selected-color)}:host([disabled]:not([href])) .forge-chip{opacity:var(--_chip-disabled-opacity)}:host([disabled]:not([href])) .trigger{cursor:var(--_chip-disabled-cursor)}::slotted(:not(forge-avatar):is([slot=start],[slot=leading],[slot=end],[slot=trailing])){font-size:var(--_chip-icon-font-size)}::slotted(forge-avatar:is([slot=start],[slot=leading])){margin-inline-start:var(--_chip-avatar-spacing)}::slotted(forge-avatar:is([slot=end],[slot=trailing])){margin-inline-end:var(--_chip-avatar-spacing)}::slotted(forge-avatar){--forge-typography-subheading2-font-size:var(--_chip-avatar-font-size);--forge-avatar-size:var(--_chip-avatar-size)}:host([type=filter]) .checkmark{height:var(--_chip-checkmark-size)}:host([type=filter]) .checkmark svg{width:0;height:var(--_chip-checkmark-size);transition-property:width;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing)}:host([type=filter]) .checkmark svg path{stroke:var(--_chip-checkmark-color);transition-property:stroke-dashoffset;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing);stroke-width:2px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}:host([type=filter][selected]) .checkmark{padding-inline-start:var(--_chip-checkmark-spacing)}:host([type=filter][selected]) .checkmark svg{width:var(--_chip-checkmark-size)}:host([type=filter][selected]) .checkmark svg path{transition-delay:var(--_chip-checkmark-transition-delay);stroke-dashoffset:0}:host([type=input]) .trigger{padding-inline:var(--_chip-padding-inline) 0}:host([type=field]) .forge-chip{--_chip-background:var(--_chip-field-background);--_chip-color:var(--_chip-field-color);--_chip-border-color:var(--_chip-field-border-color);--_chip-shape:var(--_chip-field-shape);--_chip-cursor:var(--_chip-field-cursor)}:host([theme=secondary]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_chip-border-color:var(--forge-chip-border-color, var(--forge-theme-secondary, #ffc107))}:host([theme=secondary]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-secondary, #ffc107));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-secondary, #000000))}:host([theme=secondary][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-secondary-container-low, #fff8e1));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-secondary-container-low, #8a6804))}:host([theme=tertiary]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-tertiary, #3d5afe))}:host([theme=tertiary]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-tertiary, #3d5afe));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=tertiary][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-tertiary-container-low, #213189))}:host([theme=success]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-success, #2e7d32))}:host([theme=success]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-success, #2e7d32));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-success, #ffffff))}:host([theme=success][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-success-container-low, #e6efe6));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-success-container-low, #19441b))}:host([theme=warning]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-warning, #d14900))}:host([theme=warning]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-warning, #d14900));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=warning][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-warning-container-low, #f9e9e0));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-warning-container-low, #712700))}:host([theme=error]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-error, #b00020))}:host([theme=error]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-error, #b00020));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-error, #ffffff))}:host([theme=error][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-error-container-low, #f6e0e4));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-error-container-low, #5f0011))}:host([theme=info]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-info, #1565c0))}:host([theme=info]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-info, #1565c0));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-info, #ffffff))}:host([theme=info][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-info-container-low, #e3edf7));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-info-container-low, #0b3768))}',y2=class extends M{static get observedAttributes(){return Object.values(d1.observedAttributes)}constructor(){super(),q.define(Ya),H(this,Aw,Bw),this._core=new as(new es(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case d1.attributes.TYPE:this.type=a;break;case d1.attributes.VALUE:this.value=a;break;case d1.attributes.SELECTED:this.selected=p(a);break;case d1.attributes.INVALID:this.invalid=p(a);break;case d1.attributes.DISABLED:this.disabled=p(a);break;case d1.attributes.DENSE:this.dense=p(a);break;case d1.attributes.THEME:this.theme=a;break;case d1.attributes.HREF:this.href=a;break;case d1.attributes.TARGET:this.target=a;break;case d1.attributes.DOWNLOAD:this.download=a;break;case d1.attributes.REL:this.rel=a;break}}focus(t){this._core.focus(t)}focusRemoveButton(){this._core.focusRemoveButton()}click(){this._core.click()}};s([v()],y2.prototype,"type",2),s([v()],y2.prototype,"value",2),s([v()],y2.prototype,"selected",2),s([v()],y2.prototype,"invalid",2),s([v()],y2.prototype,"disabled",2),s([v()],y2.prototype,"dense",2),s([v()],y2.prototype,"theme",2),s([v()],y2.prototype,"href",2),s([v()],y2.prototype,"target",2),s([v()],y2.prototype,"download",2),s([v()],y2.prototype,"rel",2),y2=s([y({name:d1.elementName,dependencies:[Q,r1,n1,X]})],y2);function Nc(){x(y2)}var Tw='<template><div class="forge-chip-set" part="root"><slot></slot></div></template>',Sw=":host{display:inline-block}:host([hidden]){display:none}.forge-chip-set{--_chip-set-spacing:var(--forge-chip-set-spacing, var(--forge-spacing-xsmall, 8px))}.forge-chip-set{display:flex;flex-wrap:wrap;gap:var(--_chip-set-spacing)}:host([vertical]) .forge-chip-set{flex-direction:column}",wo=class extends M{constructor(){super();this._vertical=!1;this._type=d1.defaults.TYPE;this._dense=!1;this._disabled=!1;this._invalid=!1;this._theme=d1.defaults.THEME;H(this,Tw,Sw)}static get observedAttributes(){return Object.values(tt.observedAttributes)}connectedCallback(){this.addEventListener(d1.events.NAVIGATE,this._onChipNavigate.bind(this))}attributeChangedCallback(e,a,o){switch(e){case tt.observedAttributes.VERTICAL:this.vertical=p(o);break;case tt.observedAttributes.TYPE:this.type=o;break;case tt.observedAttributes.DENSE:this.dense=p(o);break;case tt.observedAttributes.DISABLED:this.disabled=p(o);break;case tt.observedAttributes.INVALID:this.invalid=p(o);break;case tt.observedAttributes.THEME:this.theme=o;break}}_onChipNavigate(e){let a=this._findChipDescendants().filter(l=>!l.disabled),o=a.findIndex(l=>l===e.target),n=e.detail.direction==="previous"?o-1:o+1;n>a.length-1&&(n=0);let i=a.at(n);(i==null?void 0:i.type)==="input"&&e.detail.direction==="previous"?i.focusRemoveButton():i==null||i.focus()}_findChipDescendants(){return Array.from(this.querySelectorAll(d1.elementName))}_syncChipsProperty(e,a){this._findChipDescendants().forEach(n=>n[e]=a)}get vertical(){return this._vertical}set vertical(e){e=!!e,this._vertical!==e&&(this._vertical=e,this.toggleAttribute(tt.attributes.VERTICAL,this._vertical))}get type(){return this._type}set type(e){this._type!==e&&(this._type=e,this._syncChipsProperty("type",this._type),this.setAttribute(tt.attributes.TYPE,this._type))}get dense(){return this._dense}set dense(e){e=!!e,this._dense!==e&&(this._dense=e,this._syncChipsProperty("dense",this._dense),this.toggleAttribute(tt.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(e){e=!!e,this._disabled!==e&&(this._disabled=e,this._syncChipsProperty("disabled",this._disabled),this.toggleAttribute(tt.attributes.DISABLED,this._disabled))}get invalid(){return this._invalid}set invalid(e){e=!!e,this._invalid!==e&&(this._invalid=e,this._syncChipsProperty("invalid",this._invalid),this.toggleAttribute(tt.attributes.INVALID,this._invalid))}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this._syncChipsProperty("theme",this._theme),this.setAttribute(tt.attributes.THEME,this._theme))}};wo=s([y({name:tt.elementName,dependencies:[y2]})],wo);function Rc(){x(wo)}var kw='<template><forge-field id="field" multiline><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><div class="container" data-forge-field-input><slot name="member"></slot><slot></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',Ow="@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes multiline-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}:host{display:block}:host([hidden]){display:none}forge-field{--_chip-field-member-spacing:var(--forge-chip-field-member-spacing, var(--forge-spacing-xsmall, 8px));--_chip-field-content-spacing:var(--forge-chip-field-content-spacing, var(--forge-spacing-xxsmall, 4px))}.container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--_chip-field-member-spacing);block-size:auto}.container.has-members{margin-block:var(--_chip-field-content-spacing)}.container.has-members ::slotted(input){block-size:auto;inline-size:auto}::slotted(input){flex-grow:1;cursor:inherit;box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;font-size:var(--_field-font-size);text-overflow:ellipsis;padding-block-start:0;padding-block-end:0;transition:padding-block var(--_field-floating-animation-duration) var(--_field-floating-animation-timing)}forge-field{display:contents;--forge-field-multiline-resize:none}forge-field::part(label)::after{content:none}:host([theme=primary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-primary, #3f51b5);--forge-chip-field-color:var(--forge-theme-on-primary, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-primary, #3f51b5)}:host([theme=secondary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-secondary, #ffc107);--forge-chip-field-color:var(--forge-theme-on-secondary, #000000);--forge-chip-focus-indicator-color:var(--forge-theme-secondary, #ffc107)}:host([theme=tertiary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-tertiary, #3d5afe);--forge-chip-field-color:var(--forge-theme-on-tertiary, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-tertiary, #3d5afe)}:host([theme=success]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-success, #2e7d32);--forge-chip-field-color:var(--forge-theme-on-success, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-success, #2e7d32)}:host([theme=warning]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-warning, #d14900);--forge-chip-field-color:var(--forge-theme-on-warning, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-warning, #d14900)}:host([theme=error]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-error, #b00020);--forge-chip-field-color:var(--forge-theme-on-error, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-error, #b00020)}:host([theme=info]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-info, #1565c0);--forge-chip-field-color:var(--forge-theme-on-info, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-info, #1565c0)}",za=class extends b2{static get observedAttributes(){return[...Object.values(F.observedAttributes),...Object.values(g2.observedAttributes)]}constructor(){super(),H(this,kw,Ow),this._core=new Ji(new Qi(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(super.attributeChangedCallback(t,e,a),t){case g2.attributes.ADD_ON_BLUR:this.addOnBlur=p(a);return}}get popoverTargetElement(){return this._core.popoverTargetElement}click(){this._core.click()}};s([v()],za.prototype,"addOnBlur",2),za=s([y({name:g2.elementName,dependencies:[k1,y2]})],za);var Fc=class extends a2{constructor(t){super(t)}_build(){var e,a;let t=document.createElement(g2.elementName);return this._inputElement=this._buildInputElement(t),(e=this._config.options)!=null&&e.leadingElement&&(this._config.options.leadingElement.slot="leading",t.appendChild(this._config.options.leadingElement)),(a=this._config.options)!=null&&a.trailingElement&&(this._config.options.trailingElement.slot="trailing",t.appendChild(this._config.options.trailingElement)),t.appendChild(this._inputElement),t}_configure(){var t,e;(t=this._config.options)!=null&&t.helperText&&this.setHelperText(this._config.options.helperText),typeof((e=this._config.options)==null?void 0:e.label)=="string"&&this._createLabel(this._config.options.label)}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}get disabled(){return this._inputElement.disabled}set disabled(t){this._inputElement.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(t){this._inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._inputElement.addEventListener("blur",e=>t(e))}setLabel(t){t?this._labelElement?this._labelElement.textContent=t:this._createLabel(t):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}floatLabel(t){this._element.floatLabel=t}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,(e=this._config.options)!=null&&e.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_buildInputElement(t){var a,o,n,i,l;let e=document.createElement("input");return e.type=((a=this._config.options)==null?void 0:a.type)||"text",((o=this._config.options)==null?void 0:o.value)!==void 0&&(e.value=this._config.options.value),(n=this._config.options)!=null&&n.id&&(e.id=this._config.options.id),typeof((i=this._config.options)==null?void 0:i.placeholder)=="string"&&(e.placeholder=(l=this._config.options)==null?void 0:l.placeholder),t.appendChild(e),e}};function Uc(){x(za)}var os=`${b}autocomplete`,Dw={MODE:"mode",MULTIPLE:"multiple",DEBOUNCE:"debounce",FILTER_ON_FOCUS:"filter-on-focus",FILTER_FOCUS_FIRST:"filter-focus-first",ALLOW_UNMATCHED:"allow-unmatched",POPUP_TARGET:"popup-target",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",OPEN:"open",MATCH_KEY:"match-key",FILTER_TEXT:"filter-text",DROPDOWN_ICON_OPEN:"data-forge-dropdown-icon-open"},Pw={INPUT:"input",DROPDOWN_ICON:"[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon",CLEAR_BUTTON:"[data-forge-autocomplete-clear],[forge-autocomplete-clear]"},Nw={DEFAULT_DEBOUNCE_TIME:W5,NUM_SKELETON_ITEMS:3},Rw={CHANGE:`${os}-change`,SELECT:`${os}-select`,SCROLLED_BOTTOM:`${os}-scrolled-bottom`},s1={elementName:os,attributes:Dw,selectors:Pw,numbers:Nw,events:Rw},Wc=(e=>(e.Default="default",e.Stateless="stateless",e))(Wc||{});var rs=class extends I{constructor(t){super(t),this.setInputElement()}get inputElement(){return this._inputElement}setInputElement(){let t=Be(this._component,s1.selectors.INPUT,!1);return t.length&&(this._inputElement=t[0]),this._inputElement}setInputAttribute(t,e){this._inputElement.setAttribute(t,e)}addInputListener(t,e){this._inputElement.addEventListener(t,e)}removeInputListener(t,e){this._inputElement.removeEventListener(t,e)}initializeInputAccessibility(t){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","polite"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-autocomplete","list"),Oe(),Zt(this._inputElement)}isWrappingChipField(){return!!this._component.querySelector(g2.elementName)}show(t,e){this._targetElement=this._getTargetElement(e),this._targetElement&&(this._listDropdown=new Pe(this._targetElement,t),this._listDropdown.open(),this._inputElement.setAttribute("aria-expanded","true"),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._tryToggleDropdownIconRotation(!0))}async hide(t,{destroy:e=!1}={}){var o,n,i;if(this.setBusyVisibility(!1),this._tryToggleDropdownIconRotation(!1),(o=this._inputElement)==null||o.removeAttribute("aria-activedescendant"),(n=this._inputElement)==null||n.removeAttribute("aria-controls"),(i=this._inputElement)==null||i.setAttribute("aria-expanded","false"),!this._listDropdown)return;let{anchorElement:a}=this._listDropdown.dropdownElement;a&&a instanceof HTMLElement&&(a==null||a.removeEventListener(Z.events.TOGGLE,t)),e?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0}setBusyVisibility(t){var e;(e=this._listDropdown)==null||e.setBusyVisibility(t)}setDismissListener(t){var e,a;(a=(e=this._listDropdown)==null?void 0:e.dropdownElement)==null||a.addEventListener(Z.events.TOGGLE,t)}focus(){window.requestAnimationFrame(()=>this._inputElement.focus())}setOptions(t){var e;(e=this._listDropdown)==null||e.setOptions(t)}appendOptions(t){var e;(e=this._listDropdown)==null||e.appendOptions(t)}setSelectedText(t){this._inputElement.value=t}getInputValue(){return this._inputElement.value}setInputValue(t){this._inputElement.value=t}selectInputValue(){window.requestAnimationFrame(()=>this._inputElement.select())}isFocusWithinPopup(t){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(t)}hasFocus(){let t=Se(this._component.ownerDocument);return t===this._inputElement||this.isFocusWithinPopup(t)}hasInputElement(){return!!this._inputElement}setDropdownIconListener(t,e){window.requestAnimationFrame(()=>{let a=this._component.querySelector(V1.elementName);if(a&&(a.popoverIcon||a.hasAttribute(V.attributes.POPOVER_ICON))){let n=t==="mousedown"?V.events.POPOVER_ICON_MOUSEDOWN:V.events.POPOVER_ICON_CLICK;this._component.addEventListener(n,e)}let o=this._component.querySelector(s1.selectors.DROPDOWN_ICON);o==null||o.addEventListener(t,e)})}removeDropdownIconListener(t,e){this._component.removeEventListener(V.events.POPOVER_ICON_CLICK,e);let a=this._component.querySelector(s1.selectors.DROPDOWN_ICON);a==null||a.removeEventListener(t,e)}setClearButtonListener(t,e){window.requestAnimationFrame(()=>{let a=this._component.querySelector(V1.elementName);a&&(a.showClear||a.hasAttribute(V1.attributes.SHOW_CLEAR))&&this._component.addEventListener(V1.events.CLEAR,e);let o=this._component.querySelector(s1.selectors.CLEAR_BUTTON);o&&o.addEventListener(t,e)})}removeClearButtonListener(t,e){this._component.removeEventListener(V1.events.CLEAR,e);let a=this._component.querySelector(s1.selectors.CLEAR_BUTTON);a==null||a.removeEventListener(t,e)}propagateKey(t){var e;(e=this._listDropdown)==null||e.handleKey(t)}updateActiveDescendant(t){this._targetElement&&K(this._inputElement,!!t,"aria-activedescendant",t)}getTargetElementWidth(t){return this._targetElement||(this._targetElement=this._getTargetElement(t)),this._targetElement.getBoundingClientRect().width}getPopupElement(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.dropdownElement)!=null?e:null}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}activateSelectedOption(){var t;(t=this._listDropdown)==null||t.activateSelectedOption()}activateOptionByIndex(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}getActiveOptionIndex(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:null}clearActiveOption(){var t;(t=this._listDropdown)==null||t.clearActiveOption()}setSelectedOptions(t){if(this._listDropdown){let e=t.map(a=>a.value);this._listDropdown.setSelectedValues(e)}}queueDropdownPositionUpdate(){this.getPopupElement()&&window.requestAnimationFrame(()=>{let t=this.getPopupElement();t==null||t.position()})}_getTargetElement(t){return t?this._component.querySelector(t)||this._getDefaultTargetElement():this._getDefaultTargetElement()}_getDefaultTargetElement(){let t=this._tryGetFieldLikeChild();return t!=null&&t.popoverTargetElement?t.popoverTargetElement:this._component.querySelector("input")||this._component}_tryToggleDropdownIconRotation(t){let e=this._tryGetFieldLikeChild();e!=null&&e.popoverIcon&&(e.popoverExpanded=t);let a=this._component.querySelector(s1.selectors.DROPDOWN_ICON);a&&(a.style.transition="transform 120ms linear",a.style.transform=t?"rotateZ(180deg)":"")}_tryGetFieldLikeChild(){let t=[V1.elementName,g2.elementName];return this._component.querySelector(`:is(${t.join(",")})`)}};var Gc=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(Gc||{});function gr(r,t){let e=r.some(o=>k(o)&&nt(o)&&o.hasOwnProperty("options")&&(o.hasOwnProperty("text")||o.hasOwnProperty("builder"))),a=r.some(o=>k(o)&&nt(o)&&o.hasOwnProperty("label")&&o.hasOwnProperty("value"));return e&&t===1||a&&t===0}function Yc(r,t){return r.find(e=>e.value===t)}function wr(r,t,e=null){return e?!(e in r.value)||!(e in t)?!1:Nt(r.value[e],t[e]):Nt(r.value,t)}var ns=class extends K0{constructor(e){super();this._adapter=e;this._isInitialized=!1;this._isDropdownOpen=!1;this._mode="default";this._multiple=!1;this._debounce=s1.numbers.DEFAULT_DEBOUNCE_TIME;this._allowUnmatched=!1;this._filterOnFocus=!0;this._filterFocusFirst=!0;this._options=[];this._filterText="";this._selectedOptions=[];this._values=[];this._pendingFilterPromises=[];this._matchKey=null;this._clickListener=a=>this._onClick(a),this._focusListener=()=>this._onFocus(),this._blurListener=a=>this._onBlur(a),this._keydownListener=a=>this._onKeydown(a),this._dropdownIconClickListener=a=>this._onDropdownIconClick(a),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dropdownIconMouseDownListener=a=>this._onDropdownIconMouseDown(a),this._clearButtonListener=a=>this._onClear(a),this._dismissListener=()=>this._onDismiss(),this._activeChangeListener=a=>this._adapter.updateActiveDescendant(a),this._targetWidthCallback=()=>this._adapter.getTargetElementWidth(this._popupTarget),this._identifier=P2()}async initialize(){if(!this._adapter.hasInputElement()&&!this._adapter.setInputElement())throw new Error("An input element is required as a child of the autocomplete component.");if(this._setInputListener(),this._setFilterCallback(),this._attachListeners(),this._initializeAccessibility(),this._values.length){if(!this._selectedOptions.length){try{await this._executeFilter()}catch(e){console.error(e)}this._updateSelectedOptions(this._values)}this._adapter.setSelectedText(this._getSelectedText())}this._isInitialized=!0}destroy(){this._isInitialized&&(this._detachListeners(),this._isInitialized=!1),this._closeDropdown({destroy:!0})}async forceFilter({preserveValue:e}){this._options=[],await this._executeFilter(!0,!0),e&&this._options.push(...this._selectedOptions),this._applyValue(this._values)}_attachListeners(){this._adapter.addInputListener("click",this._clickListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.addInputListener("input",this._inputListener),this._adapter.addInputListener("keydown",this._keydownListener),this._adapter.setDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.setDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.setClearButtonListener("click",this._clearButtonListener)}_detachListeners(){this._adapter.removeInputListener("click",this._clickListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("keydown",this._keydownListener),this._adapter.removeDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.removeDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.removeClearButtonListener("click",this._clearButtonListener)}_setInputListener(){this._inputListener=e=>this._onInput(e)}_setFilterCallback(){this._filterFn=k(this._debounce)&&this._debounce>0?Ae(this._debounceFilter,this._debounce,!1):this._debounceFilter}_initializeAccessibility(){this._adapter.initializeInputAccessibility(this._identifier)}get _flatOptions(){return gr(this._options,1)?this._options.reduce((e,a)=>e.concat(a.options),[]):this._options}_onClick(e){!this._isDropdownOpen&&this._filterOnFocus?this._showDropdown():this._closeDropdown()}_onDropdownIconMouseDown(e){e.preventDefault()}_onDropdownIconClick(e){this._isDropdownOpen?this._closeDropdown():(this._adapter.focus(),window.requestAnimationFrame(()=>this._showDropdown()))}_onClear(e){this._filterText="",this._clearValue(),this._adapter.setSelectedText(this._getSelectedText())}_onDropdownScrollEnd(){this._adapter.emitHostEvent(s1.events.SCROLLED_BOTTOM)}_onFocus(){!this._isDropdownOpen&&this._adapter.getInputValue()&&!$2.isMobile&&this._adapter.selectInputValue()}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._applyBlur()}_applyBlur(){this._isDropdownOpen&&this._closeDropdown(),this._mode!=="stateless"&&(this._selectedOptions.length?this._adapter.setSelectedText(this._getSelectedText()):this._allowUnmatched||(this._filterText="",this._adapter.setSelectedText("")))}_onInput(e){this._selectedOptions.length&&!this._multiple&&(!this._adapter.getInputValue()||this._allowUnmatched)&&!this._adapter.isWrappingChipField()&&(this._selectedOptions=[],this._values=[],this._emitChangeEvent()),this._filterText=this._adapter.getInputValue(),this._filterFn()}async _debounceFilter({checkFocus:e=!0}={}){if(!e&&!this._adapter.hasFocus()){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}let a=this._filterText,o=this._executeFilter();this._pendingFilterPromises.push(o),this._isDropdownOpen?this._adapter.setBusyVisibility(!0):this._showDropdown({filter:!1});try{await o}catch(n){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}if(a===this._filterText)this._pendingFilterPromises=[],this._onFilterComplete();else{let n=this._pendingFilterPromises.indexOf(o);n!==-1&&this._pendingFilterPromises.splice(n,1)}}_onKeydown(e){switch(e.key){case"Tab":this._isDropdownOpen&&!this._multiple&&this._selectActiveOption(!1);break;case"Esc":case"Escape":this._isDropdownOpen&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Down":case"ArrowDown":e.preventDefault(),this._isDropdownOpen?this._adapter.propagateKey(e.key):this._showDropdown({activateFirst:!0,activateSelected:!0});break;case"Up":case"ArrowUp":e.preventDefault(),this._isDropdownOpen&&this._adapter.propagateKey(e.key);break;case"Enter":case"Home":case"End":this._isDropdownOpen&&(e.key==="Enter"&&e.stopPropagation(),e.preventDefault(),this._adapter.propagateKey(e.key));break;case"Backspace":case"Delete":let a=e.target,o=this._adapter.getInputValue(),n=a.value.substring(a.selectionStart,a.selectionEnd)===a.value,i=o.length===1&&a.selectionEnd===1,l=o.length===1&&a.selectionEnd===0,h=!o||n||i||l;!this._adapter.isWrappingChipField()&&h&&!this._multiple&&this._values.length&&this._clearValue();break}}_executeFilter(e=!0,a=!1){if(!this._filter||typeof this._filter!="function")throw new Error('A filter callback must be provided. Did you set the "filter" property?');let o=this._filter,n=e?this._filterText:"",i=a?this._getValue():null;return new Promise((l,h)=>Promise.resolve(o(n,i)).then(c=>{this._options=c,l(this._options)}).catch(c=>h(`An unexpected error occurred while filtering: ${c}`)))}_onFilterComplete(){if(!this._adapter.hasFocus()){this._isDropdownOpen&&this._closeDropdown();return}if(this._options.length){let e=this._allowUnmatched&&!this._selectedOptions.length;this._dropdownReady({userTriggered:e}),this._filterFocusFirst&&this._filterText&&this._adapter.activateFirstOption()}else this._closeDropdown()}_clearValue(){this._selectedOptions=[],this._values=[],this._isDropdownOpen&&(this._adapter.setSelectedOptions([]),this._adapter.clearActiveOption()),this._emitChangeEvent()}async _showDropdown({filter:e=!0,userTriggered:a=!0,activateFirst:o=!1,activateSelected:n=!1}={}){if(!this._isInitialized||!this._adapter.hasInputElement())return;let i=this._allowUnmatched&&!this._selectedOptions.length;this._isDropdownOpen=!0;let l;if(this._optionBuilder){let c=this._optionBuilder;l=(d,u)=>c(d,this._filterText,u)}let h={options:this._options,referenceElement:this._adapter.inputElement,multiple:this._multiple,selectedValues:[...this._values],id:`forge-autocomplete-${this._identifier}`,asyncStyle:"skeleton",headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,transform:c=>{if(this._filterText){let d=g3(c,this._filterText);if(d)return d}return c},allowBusy:!0,optionBuilder:l,optionLimit:this._optionLimit,popupClasses:this._popupClasses,syncWidth:this._syncPopupWidth,constrainViewportWidth:this._constrainPopupWidth,wrapOptionText:this._wrapOptionText,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,selectCallback:c=>this._onSelect(c),closeCallback:()=>this._closeDropdown()};if(this._adapter.show(h,this._popupTarget),this._adapter.toggleHostAttribute(s1.attributes.OPEN,this._isDropdownOpen),e){this._options.length&&this._adapter.setBusyVisibility(!0);try{await this._executeFilter(i)}catch(c){console.error(c)}this._updateSelectedOptions(this._values)}this._pendingFilterPromises.length||this._dropdownReady({userTriggered:a,activateFirst:o,activateSelected:n})}_dropdownReady({userTriggered:e=!0,activateFirst:a=!1,activateSelected:o=!1}={}){if(!this._isDropdownOpen||!this._options.length||e&&!this._adapter.hasFocus()){this._closeDropdown();return}this._sortSelectedOptions(),this._adapter.setBusyVisibility(!1),this._adapter.setOptions(this._options),this._adapter.setSelectedOptions(this._selectedOptions),this._adapter.setDismissListener(this._dismissListener),o&&this._selectedOptions.length?this._adapter.activateSelectedOption():a&&this._adapter.activateFirstOption()}_closeDropdown({destroy:e=!1}={}){this._multiple&&(this._filterText=""),this._isDropdownOpen=!1,this._adapter.hide(this._dismissListener,{destroy:e}),this._sortSelectedOptions(),this._adapter.toggleHostAttribute(s1.attributes.OPEN,this._isDropdownOpen)}_sortSelectedOptions(){if(this._multiple&&this._selectedOptions.length&&gr(this._options,0)){let e=[],a=[];this._options.forEach(o=>{this._selectedOptions.find(n=>wr(n,o.value,this._matchKey))?e.push(o):a.push(o)}),this._options=[...e,...a]}}async _onSelect(e,a=!0){if(this._valueChanging)return;if(this._mode==="stateless"){let n={value:e};this._adapter.emitHostEvent(s1.events.SELECT,n,!0,!0)&&(this._filterText="",this._multiple||this._closeDropdown());return}let o=()=>{let i=this._flatOptions.find(c=>wr(c,e,this._matchKey)),l=i?i.value:"",h=i?i.label:"";if(this._multiple){let c=Yc(this._selectedOptions,l);if(c){let d=this._selectedOptions.indexOf(c);this._selectedOptions.splice(d,1)}else this._selectedOptions.push(i)}else k(l)?(this._selectedOptions[0]=i,this._filterText=h):(this._selectedOptions=[],this._filterText="");this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions),this._values=this._selectedOptions.map(c=>c.value),this._adapter.setSelectedText(this._getSelectedText()),!$2.isMobile&&a&&this._adapter.selectInputValue(),this._emitChangeEvent(),this._tryUpdateDropdownPosition()};this._isDropdownOpen&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"?(this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,e,this._matchKey)),await this._valueChanging?o():this._tryUpdateDropdownPosition(),this._valueChanging=void 0):o()}_selectActiveOption(e=!0){let a=this._adapter.getActiveOptionIndex();if(typeof a=="number"&&a>=0){let o=this._flatOptions[a];o&&this._onSelect(o.value,e)}}_emitChangeEvent(){this._adapter.emitHostEvent(s1.events.CHANGE,this._getValue(),!0)}_tryUpdateDropdownPosition(){this._isDropdownOpen&&this._adapter.queueDropdownPositionUpdate()}_getValue(){return this._values?this._values.length?this._multiple?[...this._values]:this._values[0]:this._multiple?[]:null:null}_getSelectedText(){var e,a;return this._adapter.isWrappingChipField()?"":this._selectedTextBuilder?this._selectedTextBuilder(this._selectedOptions):this._multiple?this._values.length?this._values.length===1?(a=(e=this._selectedOptions[0])==null?void 0:e.label)!=null?a:"":`${this._values.length} options selected`:"":this._selectedOptions.filter(o=>o&&o.label).map(o=>o.label).join(" ").trim()}_onDismiss(){this._closeDropdown()}async _applyValue(e){let a=[];this._selectedOptions=[],Array.isArray(e)?a=e:a=k(e)?[e]:[],!this._multiple&&a.length>1&&(a=[a[0]]),gr(a,0)?(this._values=a.map(n=>n.value),this._selectedOptions=a):this._values=a;let o=this._flatOptions;if(a.length&&o.length&&this._updateSelectedOptions(a),this._values.length&&!this._selectedOptions.length&&this._filter&&this._isInitialized){try{await this._executeFilter(!1,!0)}catch(n){console.error(n)}this._updateSelectedOptions(this._values)}this._multiple?this._filterText="":this._filterText=this._selectedOptions.length?this._selectedOptions[0].label:"",this._isInitialized&&this._adapter.setSelectedText(this._getSelectedText()),this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions)}_updateSelectedOptions(e){let a=[...this._flatOptions,...this._selectedOptions];if(this._selectedOptions.length&&(this._selectedOptions=[]),gr(e,0))for(let o of e){let n=a.find(i=>wr(i,o.value,this._matchKey));n?this._selectedOptions.push(n):this._selectedOptions.push(o)}else for(let o of e){let n=a.find(i=>wr(i,o,this._matchKey));n?this._selectedOptions.push(n):this._allowUnmatched&&this._selectedOptions.push({label:o,value:o})}}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._mode==="stateless"&&(this._selectedOptions=[],this._isDropdownOpen&&this._closeDropdown()),this._adapter.setHostAttribute(s1.attributes.MODE,this._mode))}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._adapter.setHostAttribute(s1.attributes.MULTIPLE,k(this._multiple)?this._multiple.toString():""))}get value(){return this._getValue()}set value(e){let a=[];e==null?a=[]:Array.isArray(e)?a=structuredClone(e):Pt(e)?a=[e]:a=[structuredClone(e)],(a.length!==this._values.length||a.some(n=>!this._values.includes(n)))&&this._applyValue(e)}get filterOnFocus(){return this._filterOnFocus}set filterOnFocus(e){this._filterOnFocus!==e&&(this._filterOnFocus=e,this._adapter.setHostAttribute(s1.attributes.FILTER_ON_FOCUS,k(this._filterOnFocus)?this._filterOnFocus.toString():""))}get filterFocusFirst(){return this._filterFocusFirst}set filterFocusFirst(e){this._filterFocusFirst!==e&&(this._filterFocusFirst=e,this._adapter.toggleHostAttribute(s1.attributes.FILTER_FOCUS_FIRST,this._filterFocusFirst))}get allowUnmatched(){return this._allowUnmatched}set allowUnmatched(e){this._allowUnmatched!==e&&(this._allowUnmatched=e,k(this._allowUnmatched)&&this._adapter.setHostAttribute(s1.attributes.ALLOW_UNMATCHED,this._allowUnmatched.toString()))}get matchKey(){return this._matchKey}set matchKey(e){this._matchKey!==e&&(this._matchKey=e)}get popupTarget(){return this._popupTarget}set popupTarget(e){this._popupTarget!==e&&(this._popupTarget=e)}get filterText(){return this._filterText}set filterText(e){this._filterText!==e&&(this._filterText=this._allowUnmatched?e:"",this._isInitialized&&this._allowUnmatched&&(this._adapter.setInputValue(this._filterText),this._isDropdownOpen&&this._debounceFilter({checkFocus:!1})))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:[this._popupClasses]}set popupClasses(e){this._popupClasses!==e&&(this._popupClasses=Array.isArray(e)?[...e]:[e])}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}set popupFooterBuilder(e){this._popupFooterBuilder=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth!==e&&(this._syncPopupWidth=e)}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit!==e&&(this._optionLimit=e)}get debounce(){return this._debounce}set debounce(e){this._debounce!==e&&(this._debounce=e,this._isInitialized&&this._setFilterCallback(),this._adapter.setHostAttribute(s1.attributes.DEBOUNCE,k(this._debounce)?this._debounce.toString():""))}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get filter(){return this._filter}set filter(e){this._filter!==e&&(this._filter=e,this._isInitialized&&this._values.length&&!this._flatOptions.length&&this._filter&&this._executeFilter().then(()=>{this._updateSelectedOptions(this._values),this._adapter.setSelectedText(this._getSelectedText())}))}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e,this._selectedOptions.length&&this._adapter.setSelectedText(this._getSelectedText())}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}appendOptions(e){this._isDropdownOpen&&(this._options=[...this._options,...e],this._adapter.appendOptions(e))}get isInitialized(){return this._isInitialized}get open(){return this._isDropdownOpen}set open(e){this._isDropdownOpen!==e&&(e?this._showDropdown({userTriggered:!1}):this._closeDropdown())}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){e!==this._beforeValueChange&&(this._beforeValueChange=e)}get popupElement(){return this._adapter.getPopupElement()}};var Fw="<template><slot></slot></template>",Uw=":host{display:block}:host([hidden]){display:none}",c2=class extends R2{static get observedAttributes(){return[...R2.observedAttributes,s1.attributes.MODE,s1.attributes.MULTIPLE,s1.attributes.DEBOUNCE,s1.attributes.FILTER_ON_FOCUS,s1.attributes.FILTER_FOCUS_FIRST,s1.attributes.ALLOW_UNMATCHED,s1.attributes.POPUP_TARGET,s1.attributes.OPEN,s1.attributes.MATCH_KEY,s1.attributes.FILTER_TEXT]}constructor(){super(),q.define([C0,A0,z0]),H(this,Fw,Uw),this._core=new ns(new rs(this))}connectedCallback(){this.querySelector(s1.selectors.INPUT)?this._core.initialize():I0(this,s1.selectors.INPUT).then(()=>this._core.initialize())}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(super.attributeChangedCallback(t,e,a),t){case s1.attributes.MODE:this.mode=a;break;case s1.attributes.MULTIPLE:this.multiple=p(a);break;case s1.attributes.DEBOUNCE:this.debounce=W(a);break;case s1.attributes.FILTER_ON_FOCUS:this.filterOnFocus=p(a);break;case s1.attributes.FILTER_FOCUS_FIRST:this.filterFocusFirst=p(a);break;case s1.attributes.ALLOW_UNMATCHED:this.allowUnmatched=p(a);break;case s1.attributes.POPUP_TARGET:this.popupTarget=a;break;case s1.attributes.OPEN:this.open=p(a);break;case s1.attributes.MATCH_KEY:this.matchKey=a;break;case s1.attributes.FILTER_TEXT:this.filterText=a;break}}appendOptions(t){this._core.appendOptions(t)}openDropdown(){this.open=!0}closeDropdown(){this.open=!1}forceFilter(t={preserveValue:!1}){this._core.forceFilter(t)}};s([v()],c2.prototype,"mode",2),s([v()],c2.prototype,"multiple",2),s([v()],c2.prototype,"value",2),s([v()],c2.prototype,"debounce",2),s([v()],c2.prototype,"filterOnFocus",2),s([v()],c2.prototype,"filterFocusFirst",2),s([v()],c2.prototype,"allowUnmatched",2),s([v()],c2.prototype,"popupTarget",2),s([v()],c2.prototype,"filterText",2),s([v()],c2.prototype,"optionBuilder",2),s([v()],c2.prototype,"filter",2),s([v()],c2.prototype,"selectedTextBuilder",2),s([v()],c2.prototype,"open",2),s([v()],c2.prototype,"matchKey",2),s([v({set:!1})],c2.prototype,"isInitialized",2),s([v({set:!1})],c2.prototype,"popupElement",2),s([v()],c2.prototype,"beforeValueChange",2),c2=s([y({name:s1.elementName,dependencies:[m0,P1,h2,j1,Z0,Y0,ae,X]})],c2);var Kc=class extends a2{constructor(t){super(t)}_build(){let t=document.createElement(s1.elementName);return this._attachTextField(t),t}get textFieldDelegate(){return this._textFieldDelegate}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(t){this._textFieldDelegate.inputElement.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.addEventListener(s1.events.CHANGE,e=>t(e.detail))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var a,o,n,i,l,h;let e={props:w({},(o=(a=this._config.options)==null?void 0:a.textFieldDelegateConfig)==null?void 0:o.props),options:w({},(i=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:i.options)};e.options||(e.options={}),((l=this._config.options)==null?void 0:l.useDropdownIcon)!==!1&&!((h=e.options)!=null&&h.trailingElement)&&(e.options.trailingElement=this._createDropdownIconElement()),this._textFieldDelegate=new J0(e),t.appendChild(this._textFieldDelegate.element)}_createDropdownIconElement(){let t={props:{slot:"trailing",name:"arrow_drop_down"},options:{attributes:{"forge-dropdown-icon":""}}};return new P0(t).element}};function qc(){x(c2)}var Ww=`${b}backdrop`,$c={VISIBLE:"visible",FIXED:"fixed"},Gw=w({},$c),Yw={ENTERING:"entering",EXITING:"exiting"},Kw={ROOT:".forge-backdrop"},s2={elementName:Ww,observedAttributes:$c,attributes:Gw,classes:Yw,selectors:Kw};var qw='<template><div class="forge-backdrop" part="root"></div></template>',$w="@keyframes enter{from{opacity:0}to{opacity:var(--_backdrop-opacity)}}@keyframes exit{from{opacity:var(--_backdrop-opacity)}to{opacity:0}}:host{display:contents}:host([hidden]){display:none}.forge-backdrop{--_backdrop-background:var(--forge-backdrop-background, #000);--_backdrop-opacity:var(--forge-backdrop-opacity, 0.54);--_backdrop-z-index:var(--forge-backdrop-z-index, var(--forge-z-index-backdrop, 7));--_backdrop-enter-animation-duration:var(--forge-backdrop-enter-animation-duration, var(--forge-animation-duration-short4, 200ms));--_backdrop-enter-animation-easing:var(--forge-backdrop-enter-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_backdrop-exit-animation-duration:var(--forge-backdrop-exit-animation-duration, var(--forge-animation-duration-short1, 50ms));--_backdrop-exit-animation-easing:var(--forge-backdrop-exit-animation-easing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)))}.forge-backdrop{position:absolute;inset:0;z-index:var(--_backdrop-z-index);background:var(--_backdrop-background);opacity:0;animation-fill-mode:forwards}:host([fixed]) .forge-backdrop{position:fixed}:host([visible]) .forge-backdrop{opacity:var(--_backdrop-opacity)}:host([visible]) .forge-backdrop.entering{animation-name:enter;animation-duration:var(--_backdrop-enter-animation-duration);animation-timing-function:var(--_backdrop-enter-animation-easing)}:host([visible]) .forge-backdrop.exiting{animation-name:exit;animation-duration:var(--_backdrop-exit-animation-duration);animation-timing-function:var(--_backdrop-exit-animation-easing)}",We=class extends M{constructor(){super();this._visible=!1;this._fixed=!1;H(this,qw,$w),this._rootElement=g(this,s2.selectors.ROOT)}static get observedAttributes(){return Object.values(s2.observedAttributes)}disconnectedCallback(){this._animationController&&(this._animationController.abort(),this._animationController=void 0),this.classList.remove(s2.classes.ENTERING,s2.classes.EXITING)}attributeChangedCallback(e,a,o){switch(e){case s2.attributes.VISIBLE:this.visible=p(o);break;case s2.attributes.FIXED:this.fixed=p(o);break}}async _applyVisibility(e,{animate:a}={animate:!0}){if(this._visible===e)return;if(this._visible=e,!this.isConnected)return this.toggleAttribute(s2.attributes.VISIBLE,this._visible),Promise.resolve();if(!a){this.toggleAttribute(s2.attributes.VISIBLE,this._visible);return}let o=this._visible,n=o?s2.classes.ENTERING:s2.classes.EXITING;this._animationController&&(this._animationController.abort(),this._rootElement.classList.remove(s2.classes.ENTERING,s2.classes.EXITING)),this._animationController=new AbortController;let i=new Promise(l=>{var h;this._rootElement.addEventListener("animationend",()=>{o||this.removeAttribute(s2.attributes.VISIBLE),this._rootElement.classList.remove(n),l()},{once:!0,signal:(h=this._animationController)==null?void 0:h.signal})});return o&&this.setAttribute(s2.attributes.VISIBLE,""),this._rootElement.classList.add(n),i}show(){this._applyVisibility(!0,{animate:!1})}hide(){this._applyVisibility(!1,{animate:!1})}fadeIn(){return this._applyVisibility(!0)}fadeOut(){return this._applyVisibility(!1)}get visible(){return this._visible}set visible(e){e=!!e,this._visible!==e&&this._applyVisibility(e)}get fixed(){return this._fixed}set fixed(e){e=!!e,this._fixed!==e&&(this._fixed=e,this.toggleAttribute(s2.attributes.FIXED,this._fixed))}};We=s([y({name:s2.elementName})],We);function Xc(){x(We)}var k4=`${b}banner`,jc={DISMISSED:"dismissed",PERSISTENT:"persistent",CAN_DISMISS:"can-dismiss",THEME:"theme"},Xw=w({},jc),jw={HAS_ICON:"has-icon",HAS_BUTTON:"has-button"},Zw={DISMISS_BUTTON:"[part=dismiss-button]",ICON_SLOT:"slot[name=icon]",BUTTON_SLOT:"slot[name=button]"},Qw={THEME:"info"},Jw={BEFORE_DISMISS:`${k4}-before-dismiss`,DISMISSED:`${k4}-dismissed`},M2={elementName:k4,observedAttributes:jc,attributes:Xw,classes:jw,selectors:Zw,defaults:Qw,events:Jw};var is=class extends I{constructor(e){super(e);this._rootElement=this._component;this._rootElement=g(e,".forge-banner"),this._dismissButtonElement=g(e,M2.selectors.DISMISS_BUTTON),this._iconSlotElement=g(e,M2.selectors.ICON_SLOT),this._buttonSlotElement=g(e,M2.selectors.BUTTON_SLOT)}initialize(){this._iconSlotElement.addEventListener("slotchange",this._onIconSlotChange.bind(this)),this._buttonSlotElement.addEventListener("slotchange",this._onButtonSlotChange.bind(this)),this._onIconSlotChange(),this._onButtonSlotChange()}setDismissButtonVisibility(e){this._dismissButtonElement.hidden=!e}addDismissListener(e){this._dismissButtonElement.addEventListener("click",e)}removeDismissListener(e){this._dismissButtonElement.removeEventListener("click",e)}setDismissed(e){this._rootElement.inert=e}async startDismissCompleteListener(){return new Promise(e=>{this._rootElement.addEventListener("transitionend",()=>e(),{once:!0})})}_onIconSlotChange(){this._rootElement.classList.toggle(M2.classes.HAS_ICON,this._iconSlotElement.assignedNodes().length>0)}_onButtonSlotChange(){this._rootElement.classList.toggle(M2.classes.HAS_BUTTON,this._buttonSlotElement.assignedNodes().length>0)}};var ss=class{constructor(t){this._adapter=t;this._dismissed=!1;this._persistent=!1;this._theme=M2.defaults.THEME;this._dismissListener=this._onDismiss.bind(this)}initialize(){this._adapter.initialize(),this._persistent||this._addDismissListener()}async _onDismiss(){if(this._dismissed||this._persistent)return;let t=this._dismissed;this._dismissed=!this._dismissed;let e=new CustomEvent(M2.events.BEFORE_DISMISS,{bubbles:!0,composed:!0,cancelable:!0});if(this._adapter.dispatchHostEvent(e),this._dismissed=t,e.defaultPrevented)return;let a=this._adapter.startDismissCompleteListener();this.dismissed=!this._dismissed,await a,this._adapter.dispatchHostEvent(new CustomEvent(M2.events.DISMISSED,{bubbles:!0,composed:!0}))}_addDismissListener(){this._adapter.addDismissListener(this._dismissListener)}_removeDismissEventListener(){this._adapter.removeDismissListener(this._dismissListener)}_applyPersistent(){this._adapter.setDismissButtonVisibility(!this._persistent),this._persistent?this._removeDismissEventListener():this._addDismissListener()}get dismissed(){return this._dismissed}set dismissed(t){t=!!t,this.dismissed!==t&&(this._dismissed=t,this._adapter.setDismissed(this._dismissed),this._adapter.toggleHostAttribute(M2.attributes.DISMISSED,this.dismissed))}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._applyPersistent(),this._adapter.toggleHostAttribute(M2.attributes.PERSISTENT,this._persistent))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:M2.defaults.THEME,this._adapter.setHostAttribute(M2.attributes.THEME,this._theme))}};var tu='<template><div class="forge-banner" part="root"><div class="inner"><div class="container"><slot name="icon"></slot><slot></slot><div class="button-container"><slot name="button"></slot></div></div><div class="dismiss-button-container"><slot name="dismiss-button"><forge-icon-button part="dismiss-button"><forge-icon name="cancel"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="bottom"><slot name="dismiss-tooltip">Dismiss</slot></forge-tooltip></slot></div></div></div></template>',eu=":host{display:block;container-type:inline-size}:host([hidden]){display:none}.forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-info-container, #c7daf0));--_banner-color:var(--forge-banner-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-info-container, #0b3768));--_banner-gap:var(--forge-banner-gap, var(--forge-spacing-small, 12px));--_banner-padding-inline:var(--forge-banner-padding-inline, var(--forge-spacing-large, 24px));--_banner-padding-block:var(--forge-banner-padding-block, var(--forge-spacing-small, 12px));--_banner-transition-duration:var(--forge-banner-transition-duration, var(--forge-animation-duration-short4, 200ms));--_banner-transition-easing:var(--forge-banner-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-banner{display:grid;grid-template-columns:1fr;grid-template-rows:1fr;overflow:hidden;box-sizing:border-box;transition-property:opacity,grid-template-rows,min-height;transition-duration:var(--_banner-transition-duration);transition-timing-function:var(--_banner-transition-easing);background:var(--_banner-background);color:var(--_banner-color);opacity:1}.forge-banner .inner{display:grid;grid-template-columns:1fr auto;place-items:center;gap:var(--_banner-gap);overflow:hidden;padding-inline:var(--_banner-padding-inline)}.forge-banner .container{display:flex;justify-content:center;align-items:center;gap:var(--_banner-gap);flex:1 1 auto;padding-block:var(--_banner-padding-block)}.forge-banner .dismiss-button-container{display:flex;align-items:center;gap:var(--_banner-gap)}.forge-banner ::slotted(forge-button[slot=dismiss-button]){--forge-button-primary-color:var(--_banner-color)}.forge-banner ::slotted(forge-icon-button[slot=dismiss-button]),.forge-banner forge-icon-button[part=dismiss-button]{color:var(--_banner-icon-color);--forge-icon-button-focus-indicator-color:var(--_banner-color)}::slotted(forge-button[slot=button]){--forge-button-primary-color:var(--_banner-color)}::slotted([slot=icon]){color:var(--_banner-icon-color)}:host([dismissed]) .forge-banner{grid-template-rows:0fr;opacity:0}:host([theme=primary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-primary-container, #d1d5ed));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-primary-container, #222c62))}:host([theme=secondary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-secondary-container, #fff0c3));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-secondary-container, #8a6804))}:host([theme=tertiary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-tertiary-container, #d0d7ff));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-tertiary-container, #213189))}:host([theme=success]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-success-container, #cde0ce));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-success-container, #19441b))}:host([theme=error]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-error-container, #ecc2c9));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-error-container, #5f0011))}:host([theme=warning]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-warning-container, #f4d3c2));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-warning-container, #712700))}:host([theme=danger]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-error-container, #ecc2c9));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-error-container, #5f0011))}:host([theme=info-secondary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-surface-container, #e0e0e0));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-surface-container, #000000))}@container (max-width:600px){.forge-banner.has-button .container{display:grid;grid-template-rows:[content] 1fr [button] auto;grid-template-columns:[content] 1fr;place-items:normal}.forge-banner.has-button.has-icon .container{grid-template-columns:[icon] auto [content] 1fr}.forge-banner.has-button .inner{place-items:normal}.forge-banner.has-button .button-container{grid-row:button;grid-column:content}.forge-banner.has-button .dismiss-button-container{align-items:flex-start}}",g0=class extends M{static get observedAttributes(){return Object.values(M2.observedAttributes)}constructor(){super(),q.define(X5),H(this,tu,eu),this._core=new ss(new is(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case M2.observedAttributes.DISMISSED:this.dismissed=p(a);break;case M2.observedAttributes.PERSISTENT:this.persistent=p(a);break;case M2.observedAttributes.CAN_DISMISS:this.persistent=p(a)===!1;break;case M2.observedAttributes.THEME:this.theme=a;break}}get canDismiss(){return!this.persistent}set canDismiss(t){this.persistent=!t}};s([v()],g0.prototype,"dismissed",2),s([v()],g0.prototype,"persistent",2),s([v()],g0.prototype,"theme",2),g0=s([y({name:M2.elementName,dependencies:[n1,p1]})],g0);function Zc(){x(g0)}var ta=`${b}dialog`,Qc={OPEN:"open",VISIBLE:"visible",MODE:"mode",TYPE:"type",ANIMATION_TYPE:"animation-type",PRESET:"preset",PERSISTENT:"persistent",FULLSCREEN:"fullscreen",FULLSCREEN_THRESHOLD:"fullscreen-threshold",TRIGGER:"trigger",MOVEABLE:"moveable",MOVE_TARGET:"move-target",POSITION_STRATEGY:"position-strategy",PLACEMENT:"placement",SIZE_STRATEGY:"size-strategy",LABEL:"label",DESCRIPTION:"description"},au=t1(w({},Qc),{ARIA_LABEL_ID:"forge-dialog-label",ARIA_DESCRIPTION_ID:"forge-dialog-description"}),ou={MOVED:"moved",MOVING:"moving"},ru={DIALOG:".forge-dialog",SURFACE:".surface",MOVE_HANDLE:".move-handle",AUTOFOCUS:":is([autofocus],[forge-dialog-focus])"},nu={BEFORE_CLOSE:`${ta}-before-close`,OPEN:`${ta}-open`,CLOSE:`${ta}-close`,MOVE_START:`${ta}-move-start`,MOVE:`${ta}-move`,MOVE_END:`${ta}-move-end`,FULLSCREEN_CHANGE:`${ta}-fullscreen-change`},iu={MODE:"modal",TYPE:"dialog",ANIMATION_TYPE:"zoom",PRESET:"dialog",SIZE_STRATEGY:"content",POSITION_STRATEGY:"viewport",PLACEMENT:"center",FULLSCREEN_THRESHOLD:599},O={elementName:ta,observedAttributes:Qc,classes:ou,attributes:au,selectors:ru,events:nu,defaults:iu},ls=Symbol("hideBackdrop"),vs=Symbol("showBackdrop"),w0=Symbol("dialogStack");var hs=class extends I{get moveHandleElement(){return this._moveHandleElement}get surfaceElement(){return this._surfaceElement}constructor(t){super(t),this._dialogElement=g(t,O.selectors.DIALOG),this._surfaceElement=g(t,O.selectors.SURFACE),this._moveHandleElement=g(t,O.selectors.MOVE_HANDLE),this._backdropElement=g(t,s2.elementName),this._backdropElement.shadowRoot||window.customElements.upgrade(this._backdropElement)}destroy(){this._forceClose()}show(){if(this._dialogElement.open)return;this._component.type!=="dialog"&&this._dialogElement.setAttribute("role",this._component.type);let t=this._component.mode==="modal"||this._component.mode==="inline-modal";t||this._dialogElement.setAttribute("aria-modal","false"),t&&(this._component.animationType==="none"?this._backdropElement.show():this._backdropElement.fadeIn()),this._component.mode==="modal"?this._dialogElement.showModal():this._dialogElement.show(),t&&this._hideBackdrops(),E1[w0].add(this._component)}_hideBackdrops(){E1[w0].forEach(t=>t[ls]())}_showBackdropMostRecent(){var t;(t=Array.from(E1[w0]).filter(e=>e.mode==="modal"||e.mode==="inline-modal").at(-1))==null||t[vs]()}async hide(){if(this._component.animationType==="none")return this._forceClose(),Promise.resolve();this._backdropElement.fadeOut(),await Rt(this._surfaceElement,s2.classes.EXITING),this._forceClose()}addDialogFormSubmitListener(t){this._dialogElement.addEventListener("submit",t)}removeDialogFormSubmitListener(t){this._dialogElement.removeEventListener("submit",t)}addBackdropDismissListener(t){this._backdropElement.addEventListener("click",t)}removeBackdropDismissListener(t){this._backdropElement.removeEventListener("click",t)}tryAutofocus(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{if(!this._component.matches(":focus-within")&&(this._component.mode==="modal"&&this._dialogElement.focus(),this._component.open&&this._dialogElement.isConnected)){let e=this._component.querySelector(O.selectors.AUTOFOCUS);e==null||e.focus()}})})}tryLocateTriggerElement(t){if(!t){this.triggerElement=null;return}let e=this._component.getRootNode();this.triggerElement=e.querySelector(`#${t}`)}addTriggerInteractionListener(t){var e;(e=this.triggerElement)==null||e.addEventListener("click",t)}removeTriggerInteractionListener(t){var e;(e=this.triggerElement)==null||e.removeEventListener("click",t)}hideBackdrop(){this._backdropElement.fadeOut()}showBackdrop(){this._backdropElement.fadeIn()}addSurfaceClass(t){this._surfaceElement.classList.add(t)}removeSurfaceClass(t){this._surfaceElement.classList.remove(t)}addFullscreenListener(t,e){this._fullscreenMediaQuery=window.matchMedia(`(max-width: ${t}px)`),this._fullscreenMediaQuery.addEventListener("change",a=>e(a.matches)),!this._component.fullscreen&&this._fullscreenMediaQuery.matches&&e(!0)}removeFullscreenListener(t){var e;(e=this._fullscreenMediaQuery)==null||e.removeEventListener("change",a=>t(a.matches)),this._fullscreenMediaQuery=void 0}setAccessibleLabel(t){var e,a;if(t!=null&&t.trim()){if(this._accessibleLabelElement=this._createOrUpdateVisuallyHiddenElement(O.attributes.ARIA_LABEL_ID,t),this._accessibleLabelElement.isConnected)return;this._dialogElement.appendChild(this._accessibleLabelElement),this._dialogElement.setAttribute("aria-labelledby",this._accessibleLabelElement.id)}else(e=this._accessibleLabelElement)!=null&&e.isConnected&&(this._dialogElement.removeAttribute("aria-labelledby"),(a=this._accessibleLabelElement)==null||a.remove(),this._accessibleLabelElement=void 0)}setAccessibleDescription(t){var e,a;if(t!=null&&t.trim()){if(this._accessibleDescriptionElement=this._createOrUpdateVisuallyHiddenElement(O.attributes.ARIA_DESCRIPTION_ID,t),this._accessibleDescriptionElement.isConnected)return;this._dialogElement.appendChild(this._accessibleDescriptionElement),this._dialogElement.setAttribute("aria-describedby",this._accessibleDescriptionElement.id)}else(e=this._accessibleDescriptionElement)!=null&&e.isConnected&&(this._dialogElement.removeAttribute("aria-describedby"),(a=this._accessibleDescriptionElement)==null||a.remove(),this._accessibleDescriptionElement=void 0)}_createOrUpdateVisuallyHiddenElement(t,e){let a=e.trim(),o=this._dialogElement.querySelector(`#${t}`);return o?(o.textContent=a,o):(o=document.createElement("div"),o.classList.add("visually-hidden"),o.id=t,o.textContent=a,o)}_forceClose(){this._surfaceElement.classList.remove(s2.classes.EXITING),this._dialogElement.close(),E1[w0].delete(this._component),this._showBackdropMostRecent()}};function Jc(r=class{}){class t extends r{constructor(){super(...arguments);this._isMoving=!1;this._activeElement=void 0;this._movePointerDownListener=this._onMoveTargetPointerDown.bind(this);this._movePointerMoveListener=this._onMoveTargetPointerMove.bind(this);this._movePointerUpListener=this._onMoveTargetPointerUp.bind(this)}stopMoveListener(){this._updatePosition(null,null),document.removeEventListener("pointermove",this._movePointerMoveListener),document.removeEventListener("pointerup",this._movePointerUpListener),this._isMoving=!1,this._moveContext=void 0,this._lastPosition=void 0,this._activeElement=void 0}_onMoveTargetPointerDown(o){o.preventDefault(),this._captureActiveElement();let n=this._getMoveableBounds();this._moveContext={top:o.pageY-n.top,left:o.pageX-n.left,height:n.height,width:n.width},document.addEventListener("pointermove",this._movePointerMoveListener),document.addEventListener("pointerup",this._movePointerUpListener)}_onMoveTargetPointerMove(o){o.preventDefault();let n=this._calculateOffsetPosition(o.pageX,o.pageY,this._moveContext);if(!this._isMoving&&(this._isMoving=!0,this._onMoveStart()))return;let i=this._clampPosition(n,this._moveContext);if((!this._lastPosition||i.x!==this._lastPosition.x||i.y!==this._lastPosition.y)&&!this._onMove(i)){this._lastPosition=w({},i);let h=this._normalizePositionValue(i.x),c=this._normalizePositionValue(i.y);this._updatePosition(h,c)}}_onMoveTargetPointerUp(o){this._isMoving&&this._onMoveEnd(),this._moveComplete()}_moveComplete(){this._tryRestoreActiveElement(),document.removeEventListener("pointermove",this._movePointerMoveListener),document.removeEventListener("pointerup",this._movePointerUpListener),this._lastPosition=void 0,this._moveContext=void 0,this._isMoving=!1}_captureActiveElement(){var o;this._activeElement=Se(),(o=this._activeElement)==null||o.blur()}_tryRestoreActiveElement(){var o;(o=this._activeElement)!=null&&o.isConnected&&this._activeElement.focus(),this._activeElement=void 0}_normalizePositionValue(o){return z2(o)?`${o}px`:Pt(o)?o:null}_calculateOffsetPosition(o,n,i){var l,h;return{x:o-((l=i==null?void 0:i.left)!=null?l:0),y:n-((h=i==null?void 0:i.top)!=null?h:0)}}_clampPosition({x:o,y:n},i){let l=0,h=0;return i&&(l=i.width,h=i.height),o<=0?o=0:o+l>=window.innerWidth&&(o=window.innerWidth-l),n<=0?n=0:n+h>=window.innerHeight&&(n=window.innerHeight-h),{x:o,y:n}}}return t}var cs=class extends Jc(Object){constructor(e){super();this._config=e;this._startMoveListener()}destroy(){this._stopMoveListener(),super.stopMoveListener()}_getMoveableBounds(){return this._config.surfaceElement.getBoundingClientRect()}_updatePosition(e,a){this._config.surfaceElement.style.top=a!=null?a:"",this._config.surfaceElement.style.left=e!=null?e:""}_onMoveStart(){return this._config.onMoveStart()}_onMove(e){return this._config.onMove(e)}_onMoveEnd(){this._config.onMoveEnd()}_startMoveListener(){this._config.handleElement.addEventListener("pointerdown",this._movePointerDownListener)}_stopMoveListener(){this._config.handleElement.removeEventListener("pointerdown",this._movePointerDownListener)}};var ps=class{constructor(t){this._adapter=t;this._open=!1;this._mode=O.defaults.MODE;this._type=O.defaults.TYPE;this._animationType=O.defaults.ANIMATION_TYPE;this._preset=O.defaults.PRESET;this._persistent=!1;this._fullscreen=!1;this._fullscreenThreshold=O.defaults.FULLSCREEN_THRESHOLD;this._trigger="";this._moveable=!1;this._label="";this._description="";this._sizeStrategy=O.defaults.SIZE_STRATEGY;this._placement=O.defaults.PLACEMENT;this._positionStrategy=O.defaults.POSITION_STRATEGY;this._escapeDismissListener=this._onEscapeDismiss.bind(this);this._backdropDismissListener=this._onBackdropDismiss.bind(this);this._dialogFormSubmitListener=this._onDialogFormSubmit.bind(this);this._triggerClickListener=this._onTriggerClick.bind(this);this._fullscreenListener=this._onFullscreenChange.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["mode","animationType","positionStrategy","sizeStrategy","persistent","moveable","fullscreenThreshold"]),this._trigger&&!this._adapter.triggerElement&&this._adapter.tryLocateTriggerElement(this._trigger),this._adapter.triggerElement&&this._adapter.addTriggerInteractionListener(this._triggerClickListener),this._open&&this._applyOpen()}destroy(){this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._moveController&&this._destroyMoveController(),this._release(),this._tryResetFullscreenValue(),this._adapter.destroy()}dispatchBeforeCloseEvent(){let t=new CustomEvent(O.events.BEFORE_CLOSE,{cancelable:!0,bubbles:!0,composed:!0});return this._adapter.dispatchHostEvent(t),!t.defaultPrevented}hideBackdrop(){this._adapter.hideBackdrop()}showBackdrop(){this._adapter.showBackdrop()}_show(){this._adapter.show(),this._adapter.addDialogFormSubmitListener(this._dialogFormSubmitListener),Vt.instance.add(this._adapter.hostElement),(this._mode==="modal"||this._mode==="inline-modal")&&this._adapter.addDocumentListener("keydown",this._escapeDismissListener),this._persistent||this._adapter.addBackdropDismissListener(this._backdropDismissListener),this._moveable&&!this._fullscreen&&this._initializeMoveController(),!this._fullscreen&&this._fullscreenThreshold>0&&(this._originalFullscreenValue=this._fullscreen,this._adapter.addFullscreenListener(this._fullscreenThreshold,this._fullscreenListener)),this._adapter.dispatchHostEvent(new CustomEvent(O.events.OPEN,{bubbles:!0,composed:!0}))}async _hide(){this._release(),await this._adapter.hide(),this._tryResetFullscreenValue(),this._moveController&&this._destroyMoveController(),this._adapter.dispatchHostEvent(new CustomEvent(O.events.CLOSE,{bubbles:!0,composed:!0}))}_release(){this._adapter.removeDialogFormSubmitListener(this._dialogFormSubmitListener),this._adapter.removeDocumentListener("keydown",this._escapeDismissListener),this._adapter.removeBackdropDismissListener(this._backdropDismissListener),Vt.instance.remove(this._adapter.hostElement)}_tryResetFullscreenValue(){typeof this._originalFullscreenValue=="boolean"&&(this.fullscreen=this._originalFullscreenValue),this._originalFullscreenValue=void 0}async _applyOpen(){this._open?(this._show(),this._adapter.tryAutofocus()):await this._hide(),this._adapter.toggleHostAttribute(O.attributes.VISIBLE,this._open),this._adapter.toggleHostAttribute(O.attributes.OPEN,this._open)}_onEscapeDismiss(t){t.key!=="Escape"||!Vt.instance.isMostRecent(this._adapter.hostElement)||(t.preventDefault(),this._persistent||this._tryClose())}_onBackdropDismiss(){this._tryClose()}_onDialogFormSubmit(t){var a,o;t.stopPropagation(),(((a=t.submitter)==null?void 0:a.getAttribute("formmethod"))==="dialog"||((o=t.target)==null?void 0:o.getAttribute("method"))==="dialog")&&this._tryClose()}_onFullscreenChange(t){this.fullscreen=t;let e=new CustomEvent(O.events.FULLSCREEN_CHANGE,{bubbles:!0,composed:!0,detail:t});this._adapter.dispatchHostEvent(e)}_tryClose(){this.dispatchBeforeCloseEvent()&&(this.open=!1)}_onTriggerClick(t){this.open=!this._open}_initializeMoveController(){if(this._moveController)return;let t=()=>{let i=new CustomEvent(O.events.MOVE_START,{cancelable:!0});return this._adapter.dispatchHostEvent(i),i.defaultPrevented},e=i=>{let l=new CustomEvent(O.events.MOVE,{detail:i,cancelable:!0});return this._adapter.dispatchHostEvent(l),l.defaultPrevented||(this._adapter.addSurfaceClass(O.classes.MOVED),this._adapter.addSurfaceClass(O.classes.MOVING)),l.defaultPrevented},a=()=>{let i=new CustomEvent(O.events.MOVE_END);this._adapter.removeSurfaceClass(O.classes.MOVING),this._adapter.dispatchHostEvent(i)},{moveHandleElement:o,surfaceElement:n}=this._adapter;this._moveController=new cs({handleElement:o,surfaceElement:n,onMoveStart:t,onMove:e,onMoveEnd:a})}_destroyMoveController(){var t;this._adapter.removeSurfaceClass(O.classes.MOVED),(t=this._moveController)==null||t.destroy(),this._moveController=void 0}_applyMoveable({enabled:t}={enabled:this._moveable}){t?this._initializeMoveController():this._destroyMoveController()}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&this._applyOpen())}get mode(){return this._mode}set mode(t){this._mode!==t&&(this._mode=t,this._adapter.setHostAttribute(O.attributes.MODE,this._mode))}get type(){return this._type}set type(t){this._type!==t&&(this._type=t,this._adapter.setHostAttribute(O.attributes.TYPE,this._type))}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._adapter.setHostAttribute(O.attributes.ANIMATION_TYPE,this._animationType))}get preset(){return this._preset}set preset(t){this._preset!==t&&(this._preset=t,this._adapter.setHostAttribute(O.attributes.PRESET,this._preset))}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._adapter.toggleHostAttribute(O.attributes.PERSISTENT,this._persistent))}get fullscreen(){return this._fullscreen}set fullscreen(t){t=!!t,this._fullscreen!==t&&(this._fullscreen=t,this._applyMoveable({enabled:!this._fullscreen}),this._adapter.toggleHostAttribute(O.attributes.FULLSCREEN,this._fullscreen))}get fullscreenThreshold(){return this._fullscreenThreshold}set fullscreenThreshold(t){this._fullscreenThreshold!==t&&(this._fullscreenThreshold=t,this._adapter.isConnected&&this._open&&!this._fullscreen&&this._fullscreenThreshold>0&&(this._adapter.removeFullscreenListener(this._fullscreenListener),this._adapter.addFullscreenListener(this._fullscreenThreshold,this._fullscreenListener)),this._adapter.setHostAttribute(O.attributes.FULLSCREEN_THRESHOLD,this._fullscreenThreshold.toString()))}get trigger(){var t;return(t=this._trigger)!=null?t:""}set trigger(t){this._trigger!==t&&(this._trigger=t,this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._adapter.isConnected&&(this._adapter.tryLocateTriggerElement(this._trigger),this._adapter.addTriggerInteractionListener(this._triggerClickListener)),this._adapter.setHostAttribute(O.attributes.TRIGGER,this._trigger))}get triggerElement(){return this._adapter.triggerElement}set triggerElement(t){this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._trigger&&(this._trigger=""),this._adapter.triggerElement=t,this._adapter.isConnected&&this._adapter.addTriggerInteractionListener(this._triggerClickListener)}get moveable(){return this._moveable}set moveable(t){t=!!t,this._moveable!==t&&(this._moveable=t,this._adapter.isConnected&&this._open&&this._applyMoveable(),this._adapter.toggleHostAttribute(O.attributes.MOVEABLE,this._moveable))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.setAccessibleLabel(this._label))}get description(){return this._description}set description(t){this._description!==t&&(this._description=t,this._adapter.setAccessibleDescription(this._description))}get positionStrategy(){return this._positionStrategy}set positionStrategy(t){this._positionStrategy!==t&&(this._positionStrategy=t,this._adapter.setHostAttribute(O.attributes.POSITION_STRATEGY,this._positionStrategy))}get sizeStrategy(){return this._sizeStrategy}set sizeStrategy(t){this._sizeStrategy!==t&&(this._sizeStrategy=t,this._adapter.setHostAttribute(O.attributes.SIZE_STRATEGY,this._sizeStrategy))}get placement(){return this._placement}set placement(t){this._placement!==t&&(this._placement=t,this._adapter.setHostAttribute(O.attributes.PLACEMENT,this._placement))}};var su='<template><dialog class="forge-dialog" part="root"><forge-backdrop exportparts="root:backdrop"></forge-backdrop><div class="surface" part="surface"><div class="move-handle-container" part="move-handle-container"><div class="move-handle" part="move-handle"><slot name="move-handle"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" part="move-handle-icon"><path d="M3 15v-2h2v2H3m0-4V9h2v2H3m4 4v-2h2v2H7m0-4V9h2v2H7m4 4v-2h2v2h-2m0-4V9h2v2h-2m4 4v-2h2v2h-2m0-4V9h2v2h-2m4 4v-2h2v2h-2m0-4V9h2v2h-2z"/></svg></slot></div></div><slot></slot></div></dialog></template>',lu="@keyframes forge-dialog-zoom-in{from{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}to{opacity:1;scale:1}}@keyframes forge-dialog-zoom-out{from{opacity:1;scale:1}to{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}}@keyframes forge-dialog-fade-in{from{opacity:var(--_dialog-fade-opacity)}to{opacity:1}}@keyframes forge-dialog-fade-out{from{opacity:1}to{opacity:var(--_dialog-fade-opacity)}}@keyframes forge-dialog-slide-in{from{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}to{opacity:1;translate:0 0}}@keyframes forge-dialog-slide-out{from{opacity:1;translate:0 0}to{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}}@layer base,nonmodal,animation,placement,size-strategy,preset,fullscreen,position-strategy,media; @layer base{:host{display:none;--forge-theme-surface:var(--forge-theme-surface-bright, #ffffff)}:host([hidden]){display:none}.forge-dialog{--_dialog-background:var(--forge-dialog-background, var(--forge-theme-surface-bright, #ffffff));--_dialog-shape:var(--forge-dialog-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_dialog-elevation:var(--forge-dialog-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));--_dialog-spacing:var(--forge-dialog-spacing, auto);--_dialog-block-start-spacing:var(--forge-dialog-block-start-spacing, var(--_dialog-spacing));--_dialog-block-end-spacing:var(--forge-dialog-block-end-spacing, var(--_dialog-spacing));--_dialog-inline-start-spacing:var(--forge-dialog-inline-start-spacing, var(--_dialog-spacing));--_dialog-inline-end-spacing:var(--forge-dialog-inline-end-spacing, var(--_dialog-spacing));--_dialog-padding:var(--forge-dialog-padding, 0);--_dialog-width:var(--forge-dialog-width, fit-content);--_dialog-height:var(--forge-dialog-height, fit-content);--_dialog-min-width:var(--forge-dialog-min-width, 0);--_dialog-max-width:var(--forge-dialog-max-width, calc(100% - var(--forge-spacing-xxlarge, 48px)));--_dialog-min-height:var(--forge-dialog-min-height, 0);--_dialog-max-height:var(--forge-dialog-max-height, calc(100% - var(--forge-spacing-xxlarge, 48px)));--_dialog-z-index:var(--forge-dialog-z-index, var(--forge-z-index-dialog, 8));--_dialog-move-handle-color:var(--forge-dialog-move-handle-color, currentColor);--_dialog-move-handle-size:var(--forge-dialog-move-handle-size, 24px);--_dialog-move-handle-hover-cursor:var(--forge-dialog-move-handle-hover-cursor, grab);--_dialog-move-handle-active-cursor:var(--forge-dialog-move-handle-active-cursor, grabbing);--_dialog-move-handle-spacing:var(--forge-dialog-move-handle-spacing, calc(var(--forge-spacing-xxsmall, 4px) * -1) 0 0);--_dialog-move-transition-duration:var(--forge-dialog-move-transition-duration, var(--forge-animation-duration-short4, 200ms));--_dialog-move-transition-easing:var(--forge-dialog-move-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_dialog-moving-opacity:var(--forge-dialog-moving-opacity, 0.54);--_dialog-enter-animation-duration:var(--forge-dialog-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-enter-animation-easing:var(--forge-dialog-enter-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_dialog-exit-animation-duration:var(--forge-dialog-exit-animation-duration, var(--forge-animation-duration-short2, 100ms));--_dialog-exit-animation-easing:var(--forge-dialog-exit-animation-easing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)));--_dialog-zoom-opacity:var(--forge-dialog-zoom-opacity, 0);--_dialog-zoom-scale:var(--forge-dialog-zoom-scale, 0.8);--_dialog-fade-opacity:var(--forge-dialog-fade-opacity, 0);--_dialog-slide-opacity:var(--forge-dialog-slide-opacity, 0);--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 -30%);--_dialog-backdrop-opacity:var(--forge-dialog-backdrop-opacity, var(--forge-backdrop-opacity, 0.54));--_dialog-nonmodal-elevation:var(--forge-dialog-nonmodal-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_dialog-fullscreen-enter-animation-duration:var(--forge-dialog-fullscreen-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-fullscreen-exit-animation-duration:var(--forge-dialog-fullscreen-exit-animation-duration, var(--forge-animation-duration-short2, 100ms));--_dialog-position-x:var(--forge-dialog-position-x, 0);--_dialog-position-y:var(--forge-dialog-position-y, 0);--_dialog-preset-sheet-enter-animation-duration:var(--forge-dialog-preset-sheet-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-preset-sheet-exit-animation-duration:var(--forge-dialog-preset-sheet-exit-animation-duration, var(--forge-animation-duration-short3, 150ms))}.forge-dialog{position:fixed;inset:0;z-index:var(--_dialog-z-index);background-color:transparent;color:inherit;border:none;width:auto;height:auto;padding:0;margin:0;overflow:visible;max-width:100%;max-height:100%;box-sizing:border-box}.container{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.surface{position:absolute;inset:0;display:flex;background:var(--_dialog-background);box-shadow:var(--_dialog-elevation);z-index:var(--_dialog-z-index);overflow:hidden;border-radius:var(--_dialog-shape);margin-block-start:var(--_dialog-block-start-spacing);margin-block-end:var(--_dialog-block-end-spacing);margin-inline-start:var(--_dialog-inline-start-spacing);margin-inline-end:var(--_dialog-inline-end-spacing);padding:var(--_dialog-padding);width:var(--_dialog-width);height:var(--_dialog-height);min-width:var(--_dialog-min-width);max-width:var(--_dialog-max-width);min-height:var(--_dialog-min-height);max-height:var(--_dialog-max-height);box-sizing:border-box}.visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:fixed;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}dialog.forge-dialog::backdrop{display:none}forge-backdrop{--forge-backdrop-opacity:var(--_dialog-backdrop-opacity);--forge-backdrop-enter-animation-duration:var(--_dialog-enter-animation-duration);--forge-backdrop-enter-animation-easing:var(--_dialog-enter-animation-easing);--forge-backdrop-exit-animation-duration:var(--_dialog-exit-animation-duration);--forge-backdrop-exit-animation-easing:var(--_dialog-exit-animation-easing)}:host(:not([moveable])) .move-handle{display:none}:host([moveable]:not([fullscreen])) .surface{user-select:none;transition-property:opacity;transition-duration:var(--_dialog-move-transition-duration);transition-timing-function:var(--_dialog-move-transition-easing)}:host([moveable]:not([fullscreen])) .surface:not(:hover) .move-handle-container{display:none}:host([moveable]:not([fullscreen])) .surface.moved{margin:0}:host([moveable]:not([fullscreen])) .surface.moving{opacity:var(--_dialog-moving-opacity)}:host([moveable]:not([fullscreen])) .move-handle-container{position:absolute;top:0;z-index:1;display:flex;justify-content:center;width:100%}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle{fill:var(--_dialog-move-handle-color);height:var(--_dialog-move-handle-size);width:var(--_dialog-move-handle-size);margin:var(--_dialog-move-handle-spacing);touch-action:none}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle:hover{cursor:var(--_dialog-move-handle-hover-cursor)}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle:active{cursor:var(--_dialog-move-handle-active-cursor)}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle svg{fill:currentColor}:host([visible]){display:contents}}@layer nonmodal{:host([mode=nonmodal]) .forge-dialog{pointer-events:none}:host([mode=nonmodal]) .container{display:contents}:host([mode=nonmodal]) .surface{--_dialog-elevation:var(--_dialog-nonmodal-elevation);pointer-events:all}:host([mode=nonmodal]) forge-backdrop{display:none}}@layer animation{:host([visible]:not([animation-type=none])) dialog.forge-dialog[open] .surface{animation-duration:var(--_dialog-enter-animation-duration);animation-timing-function:var(--_dialog-enter-animation-easing)}:host([visible]:not([animation-type=none])) dialog.forge-dialog[open] .surface.exiting{animation-duration:var(--_dialog-exit-animation-duration);animation-timing-function:var(--_dialog-exit-animation-easing)}:host([visible]:not([animation-type=none]):is(:not([animation-type]),[animation-type=zoom])) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-zoom-in}:host([visible]:not([animation-type=none]):is(:not([animation-type]),[animation-type=zoom])) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-zoom-out}:host([visible]:not([animation-type=none])[animation-type=fade]) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-fade-in}:host([visible]:not([animation-type=none])[animation-type=fade]) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-fade-out}:host([visible]:not([animation-type=none])[animation-type=slide]) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-slide-in}:host([visible]:not([animation-type=none])[animation-type=slide]) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-slide-out}}@layer placement{:host([placement=custom]) .surface{margin:0;top:var(--_dialog-position-x);left:var(--_dialog-position-y)}:host([placement=top]) .surface{--_dialog-block-start-spacing:var(--forge-dialog-block-start-spacing, 0);top:0;bottom:auto}:host([placement=top-right]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:0;left:auto;right:0;bottom:auto}:host([placement=top-left]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:0;left:0;right:auto;bottom:auto}:host([placement=bottom]) .surface{--_dialog-block-end-spacing:var(--forge-dialog-block-end-spacing, 0);top:auto;bottom:0}:host([placement=bottom-right]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:auto;left:auto;right:0;bottom:0}:host([placement=bottom-left]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:auto;left:0;right:auto;bottom:0}}@layer size-strategy{:host([size-strategy=container-inline]) .surface{width:100%}:host([size-strategy=container-block]) .surface{height:100%}}@layer preset{:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .forge-dialog{--_dialog-enter-animation-duration:var(--_dialog-preset-sheet-enter-animation-duration);--_dialog-exit-animation-duration:var(--_dialog-preset-sheet-exit-animation-duration)}:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface{animation-name:forge-dialog-slide-in}:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface.exiting{animation-name:forge-dialog-slide-out}:host(:is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface{--_dialog-max-width:var(--forge-dialog-max-width, none);--_dialog-max-height:var(--forge-dialog-max-height, none);inset:auto;display:inline-flex}:host([preset=left-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, -100% 0)}:host([preset=left-sheet]) .surface{left:0;bottom:0;top:0;height:100%;border-top-left-radius:0;border-bottom-left-radius:0}:host([preset=right-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 100% 0)}:host([preset=right-sheet]) .surface{right:0;bottom:0;top:0;height:100%;border-top-right-radius:0;border-bottom-right-radius:0}:host([preset=top-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 -100%)}:host([preset=top-sheet]) .surface{top:0;left:0;right:0;border-top-left-radius:0;border-top-right-radius:0}:host([preset=bottom-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 100%)}:host([preset=bottom-sheet]) .surface{bottom:0;left:0;right:0;border-bottom-left-radius:0;border-bottom-right-radius:0}}@layer fullscreen{:host([fullscreen]) .forge-dialog{--_dialog-enter-animation-duration:var(--_dialog-fullscreen-enter-animation-duration);--_dialog-exit-animation-duration:var(--_dialog-fullscreen-exit-animation-duration)}:host([fullscreen]) .surface{height:100%;width:100%;max-width:none;max-height:none;border-radius:0;box-shadow:none}:host([fullscreen]) forge-backdrop{display:none}}@layer position-strategy{:host([position-strategy=viewport]) .forge-dialog{position:fixed}:host([position-strategy=container]) .forge-dialog{position:absolute}:host([position-strategy=container][preset$=-sheet]) .forge-dialog{contain:content}}@layer media{@media (prefers-reduced-motion:reduce){.surface{animation-name:forge-dialog-fade-in}.surface.exiting{animation-name:forge-dialog-fade-out}}}",tp,E1=class extends L1(H1(M)){static get observedAttributes(){return Object.values(O.observedAttributes)}[(tp=w0,ls)](){this._core.hideBackdrop()}[vs](){this._core.showBackdrop()}[T0](t){return this._core.dispatchBeforeCloseEvent()}constructor(){super(),H(this,su,lu),this._core=new ps(new hs(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case O.observedAttributes.OPEN:this.open=p(a);break;case O.observedAttributes.MODE:this.mode=a!=null?a:O.defaults.MODE;break;case O.observedAttributes.TYPE:this.type=a!=null?a:O.defaults.TYPE;break;case O.observedAttributes.ANIMATION_TYPE:this.animationType=a!=null?a:O.defaults.ANIMATION_TYPE;break;case O.observedAttributes.PRESET:this.preset=a!=null?a:O.defaults.PRESET;break;case O.observedAttributes.PERSISTENT:this.persistent=p(a);break;case O.observedAttributes.FULLSCREEN:this.fullscreen=p(a);break;case O.observedAttributes.FULLSCREEN_THRESHOLD:this.fullscreenThreshold=a==null?O.defaults.FULLSCREEN_THRESHOLD:W(a);break;case O.observedAttributes.TRIGGER:this.trigger=a;break;case O.observedAttributes.MOVEABLE:this.moveable=p(a);break;case O.observedAttributes.POSITION_STRATEGY:this.positionStrategy=a!=null?a:O.defaults.POSITION_STRATEGY;break;case O.observedAttributes.SIZE_STRATEGY:this.sizeStrategy=a!=null?a:O.defaults.SIZE_STRATEGY;break;case O.observedAttributes.PLACEMENT:this.placement=a!=null?a:O.defaults.PLACEMENT;break;case O.observedAttributes.LABEL:this.label=a;break;case O.observedAttributes.DESCRIPTION:this.description=a;break}}show(){this.open=!0}hide(){this.open=!1}};E1[tp]=new Set,s([v()],E1.prototype,"open",2),s([v()],E1.prototype,"mode",2),s([v()],E1.prototype,"type",2),s([v()],E1.prototype,"animationType",2),s([v()],E1.prototype,"preset",2),s([v()],E1.prototype,"persistent",2),s([v()],E1.prototype,"fullscreen",2),s([v()],E1.prototype,"fullscreenThreshold",2),s([v()],E1.prototype,"trigger",2),s([v()],E1.prototype,"triggerElement",2),s([v()],E1.prototype,"moveable",2),s([v()],E1.prototype,"positionStrategy",2),s([v()],E1.prototype,"sizeStrategy",2),s([v()],E1.prototype,"placement",2),s([v()],E1.prototype,"label",2),s([v()],E1.prototype,"description",2),E1=s([y({name:O.elementName,dependencies:[We]})],E1);function ep(){x(E1)}var ap=`${b}bottom-sheet`,op={PERSISTENT:"persistent",MODE:"mode",OPEN:"open",FULLSCREEN:"fullscreen"},vu=w({},op),hu={DRAGGING:"dragging",FULLSCREEN:"fullscreen"},cu={DIALOG:O.elementName,SURFACE:".surface",CONTENT_BODY:"[forge-bottom-sheet-body]",INITIAL_FOCUS:`:is([autofocus], [${ap}-focus])`},pu={BEFORE_CLOSE:"forge-bottom-sheet-before-close",CLOSE:"forge-bottom-sheet-close",OPEN:"forge-bottom-sheet-open",READY:"forge-bottom-sheet-ready",DRAG_START:"forge-bottom-sheet-drag-start",DRAGGED:"forge-bottom-sheet-dragged",DRAG_END:"forge-bottom-sheet-drag-end",DRAG_CANCEL:"forge-bottom-sheet-drag-cancel",FULLSCREEN:"forge-bottom-sheet-fullscreen"},du={mode:"nonmodal"},A1={elementName:ap,observedAttributes:op,attributes:vu,classes:hu,selectors:cu,events:pu,defaults:du};var ds=class extends I{constructor(t){super(t),this._dialogElement=g(t,A1.selectors.DIALOG),this._surfaceElement=g(t,A1.selectors.SURFACE)}setDialogProperty(t,e){this._dialogElement[t]=e}addDialogListener(t,e){this._dialogElement.addEventListener(t,e)}removeDialogListener(t,e){this._dialogElement.removeEventListener(t,e)}initialize(){this._component[P]({role:"dialog",ariaModal:this._component.mode==="modal"||this._component.mode==="inline-modal"?"true":"false"},{setAttribute:!0})}open(){this._dialogElement.mode=this._component.mode,this._dialogElement.open=!0}close(){this._dialogElement.open=!1}trySetInitialFocus(){window.requestAnimationFrame(()=>{if(this._component.open&&this._component.isConnected){let t=this._component.querySelector(A1.selectors.INITIAL_FOCUS);t==null||t.focus()}})}isScrollable(){let t=this._getContentElement();return t?t.scrollHeight>t.offsetHeight:!1}isContentChild(t){var a;let e=this._getContentElement();return(a=e==null?void 0:e.contains(t))!=null?a:!1}setDragging(t){this._dialogElement.classList.toggle(A1.classes.DRAGGING,t)}setFullscreen(t){this._dialogElement.classList.toggle(A1.classes.FULLSCREEN,t)}isFullscreen(){return this._dialogElement.classList.contains(A1.classes.FULLSCREEN)}setContainerHeight(t){if(t!=null){let e=Math.min(100,100*t/window.innerHeight);this._dialogElement.style.setProperty("--forge-dialog-max-height",`${e}%`)}else this._dialogElement.style.removeProperty("--forge-dialog-max-height")}getContainerBounds(){return this._surfaceElement.getBoundingClientRect()}setDragTargetHandler(t,e){this._surfaceElement.addEventListener(t,e)}removeDragTargetHandler(t,e){this._surfaceElement.removeEventListener(t,e)}setBodyScrollHandler(t){let e=this._getContentElement();e==null||e.addEventListener("scroll",t)}_getContentElement(){var e;return(e=Array.from(Be(this._component,A1.selectors.CONTENT_BODY,!1))[0])!=null?e:null}setBodyListener(t,e,a){document.body.addEventListener(t,e,a)}removeBodyListener(t,e){document.body.removeEventListener(t,e)}};var ms=class{constructor(t){this._adapter=t;this._open=!1;this._mode=A1.defaults.mode;this._persistent=!1;this._fullscreen=!1;this._isDragging=!1;this._bodyScrollHandler=()=>this._onBodyScroll();this._dragStartHandler=this._onDragStart.bind(this);this._dragMoveHandler=this._onDragMove.bind(this);this._dragEndHandler=this._onDragEnd.bind(this);this._dragCancelHandler=this._onDragCancel.bind(this);this._dialogDismissListener=this._onDialogDismiss.bind(this);this._dialogBeforeCloseListener=this._onDialogBeforeClose.bind(this)}initialize(){this._adapter.initialize(),this._adapter.setDialogProperty("persistent",this._persistent),this._adapter.setDialogProperty("mode",this._mode),this._adapter.setDialogProperty("fullscreen",this._fullscreen),this._open&&this._openBottomSheet()}_openBottomSheet(){this._fullscreen&&this._adapter.setFullscreen(!0),this._adapter.addDialogListener(O.events.BEFORE_CLOSE,this._dialogBeforeCloseListener),this._adapter.addDialogListener(O.events.CLOSE,this._dialogDismissListener),this._adapter.open(),this._adapter.isScrollable()&&this._initScrollableHandlers(),this._adapter.trySetInitialFocus(),this._adapter.setBodyAttribute(A1.attributes.OPEN,"true"),this._adapter.dispatchHostEvent(new CustomEvent(A1.events.OPEN,{bubbles:!0}))}_closeBottomSheet(){this._adapter.removeDialogListener(O.events.BEFORE_CLOSE,this._dialogBeforeCloseListener),this._adapter.removeDialogListener(O.events.CLOSE,this._dialogDismissListener),this._adapter.close(),this._adapter.dispatchHostEvent(new CustomEvent(A1.events.CLOSE,{bubbles:!0})),this._open=!1,this._adapter.setFullscreen(!1)}_onDialogDismiss(){this._closeBottomSheet()}_onDialogBeforeClose(t){let e=new CustomEvent(A1.events.BEFORE_CLOSE,{bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(e),e.defaultPrevented&&t.preventDefault()}_initScrollableHandlers(){!this._adapter.isFullscreen()&&this._adapter.isScrollable()&&(this._adapter.setDragTargetHandler("mousedown",this._dragStartHandler),this._adapter.setDragTargetHandler("touchstart",this._dragStartHandler),this._adapter.setBodyScrollHandler(this._bodyScrollHandler))}_onBodyScroll(){!this._adapter.isFullscreen()&&!this._isDragging&&(this._adapter.setFullscreen(!0),this._adapter.dispatchHostEvent(new CustomEvent(A1.events.FULLSCREEN,{bubbles:!0,detail:!0})))}_onDragStart(t){if(this._adapter.isFullscreen()){let o=L2(t);if(this._adapter.isScrollable()&&this._adapter.isContentChild(o[0]))return}t.stopPropagation();let e=this._adapter.getContainerBounds(),a=t instanceof MouseEvent?t.clientY:t.touches[0].clientY;this._dragContext={top:a-e.top,height:e.height},this._adapter.setBodyListener("mousemove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("touchmove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("mouseup",this._dragEndHandler),this._adapter.setBodyListener("touchend",this._dragEndHandler),this._adapter.setBodyListener("touchcancel",this._dragCancelHandler)}_onDragMove(t){if(t.stopPropagation(),t.preventDefault(),!this._dragContext)return;let e=t instanceof MouseEvent?t.clientY:t.touches[0].clientY,a={y:window.innerHeight-e+this._dragContext.top};if(!this._isDragging){this._isDragging=!0;let n=new CustomEvent(A1.events.DRAG_START,{bubbles:!0,detail:a,cancelable:!0});if(this._adapter.dispatchHostEvent(n),n.defaultPrevented)return;this._adapter.setDragging(!0)}let o=this._adapter.isFullscreen()?a:{y:Math.max(a.y,this._dragContext.height)};if(!this._lastPosition||o.y!==this._lastPosition.y){let n=new CustomEvent(A1.events.DRAGGED,{bubbles:!0,detail:o,cancelable:!0});if(this._adapter.dispatchHostEvent(n),n.defaultPrevented)return;this._lastPosition=t1(w({},o),{clientY:e}),this._adapter.setContainerHeight(o.y)}}_onDragEnd(){if(this._lastPosition){let t=this._lastPosition.clientY,e=this._dragContext;if(e){let a=this._adapter.isFullscreen();a&&t>0?this._adapter.setFullscreen(!1):!a&&t<e.height+e.top&&this._adapter.setFullscreen(!0);let o=new CustomEvent(A1.events.FULLSCREEN,{bubbles:!0,detail:a});this._adapter.dispatchHostEvent(o)}}if(this._isDragging){let t=new CustomEvent(A1.events.DRAG_END,{bubbles:!0});this._adapter.dispatchHostEvent(t)}this._dragComplete()}_onDragCancel(){if(this._isDragging){let t=new CustomEvent(A1.events.DRAG_CANCEL,{bubbles:!0});this._adapter.dispatchHostEvent(t)}this._dragComplete()}_dragComplete(){this._adapter.setDragging(!1),this._adapter.removeBodyListener("mousemove",this._dragMoveHandler),this._adapter.removeBodyListener("touchmove",this._dragMoveHandler),this._adapter.removeBodyListener("mouseup",this._dragEndHandler),this._adapter.removeBodyListener("touchend",this._dragEndHandler),this._adapter.removeBodyListener("touchcancel",this._dragCancelHandler),this._adapter.setContainerHeight(null),this._lastPosition=void 0,this._dragContext=void 0,this._isDragging=!1}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&(this._open?this._openBottomSheet():this._closeBottomSheet()),this._adapter.toggleHostAttribute(A1.attributes.OPEN,t))}get mode(){return this._mode}set mode(t){if(t||(t=A1.defaults.mode),this._mode!==t){this._mode=t,this._adapter.setDialogProperty("mode",this._mode);let e=this._mode!==A1.defaults.mode;this._adapter.toggleHostAttribute(A1.attributes.MODE,e,this._mode)}}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._adapter.setDialogProperty("persistent",this._persistent),this._adapter.toggleHostAttribute(A1.attributes.PERSISTENT,this._persistent))}get fullscreen(){return this._fullscreen}set fullscreen(t){this._fullscreen!==t&&(this._fullscreen=t,this._adapter.setFullscreen(this._fullscreen),this._adapter.toggleHostAttribute(A1.attributes.FULLSCREEN,this._fullscreen))}};var mu='<template><forge-dialog class="dialog" preset="bottom-sheet" exportparts="surface" role="presentation"><div class="surface" part="root"><slot></slot></div></forge-dialog></template>',gu="@keyframes forge-dialog-zoom-in{from{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}to{opacity:1;scale:1}}@keyframes forge-dialog-zoom-out{from{opacity:1;scale:1}to{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}}@keyframes forge-dialog-fade-in{from{opacity:var(--_dialog-fade-opacity)}to{opacity:1}}@keyframes forge-dialog-fade-out{from{opacity:1}to{opacity:var(--_dialog-fade-opacity)}}@keyframes forge-dialog-slide-in{from{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}to{opacity:1;translate:0 0}}@keyframes forge-dialog-slide-out{from{opacity:1;translate:0 0}to{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}}:host{display:contents}:host([hidden]){display:none}.dialog{--_bottom-sheet-desktop-max-width:var(--forge-bottom-sheet-desktop-max-width, 50%);--_bottom-sheet-desktop-max-height:var(--forge-bottom-sheet-desktop-max-height, 50%);--_bottom-sheet-animation-duration:var(--forge-bottom-sheet-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_bottom-sheet-animation-timing:var(--forge-bottom-sheet-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.surface{width:100%;display:inline-flex;flex-direction:column}.dialog.dragging::part(surface){transition:none}:host([open]) forge-dialog.fullscreen{--forge-dialog-max-height:100%}:host([open]) forge-dialog.fullscreen::part(surface){transition:max-height var(--_bottom-sheet-animation-duration) var(--_bottom-sheet-animation-timing)}forge-dialog{--forge-dialog-width:var(--_bottom-sheet-desktop-max-width);--forge-dialog-max-height:var(--_bottom-sheet-desktop-max-height)}@media (max-width:600px){forge-dialog{--forge-dialog-shape:0;--forge-dialog-max-width:100vw;--forge-dialog-width:100vw}}",Ge=class extends H1(L1(M)){static get observedAttributes(){return Object.values(A1.observedAttributes)}constructor(){super(),H(this,mu,gu),this._core=new ms(new ds(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case A1.attributes.OPEN:this.open=p(a);break;case A1.attributes.MODE:this.mode=a;break;case A1.observedAttributes.PERSISTENT:this.persistent=p(a);break;case A1.attributes.FULLSCREEN:this.fullscreen=p(a);break}}};s([v()],Ge.prototype,"open",2),s([v()],Ge.prototype,"mode",2),s([v()],Ge.prototype,"persistent",2),s([v()],Ge.prototype,"fullscreen",2),Ge=s([y({name:A1.elementName,dependencies:[E1]})],Ge);function rp(){x(Ge)}var wu=`${b}button-area`,uu={DISABLED:"disabled",IGNORE:"data-forge-ignore",IGNORE_ALT:"forge-ignore"},O4={ROOT:"root",BUTTON_SLOT:"button",CONTENT_SLOT:"content"},_u={ROOT:"forge-button-area"},fu={ROOT:`#${O4.ROOT}`,BUTTON_SLOT:"slot[name=button]",CONTENT_SLOT:`#${O4.CONTENT_SLOT}`},Bt={elementName:wu,attributes:uu,ids:O4,classes:_u,selectors:fu};var gs=class extends I{constructor(t){super(t),this._rootElement=g(t,Bt.selectors.ROOT),this._buttonSlotElement=g(t,Bt.selectors.BUTTON_SLOT),this._contentSlotElement=g(t,Bt.selectors.CONTENT_SLOT),this._focusIndicatorElement=g(t,m1.elementName),this._stateLayerElement=g(t,M1.elementName)}destroy(){}setDisabled(t){var e;(e=this._buttonElement)==null||e.toggleAttribute(Bt.attributes.DISABLED,t),t?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}addListener(t,e,a){this._rootElement.addEventListener(t,e,{capture:a})}removeListener(t,e,a){this._rootElement.removeEventListener(t,e,{capture:a})}addButtonSlotListener(t,e){this._buttonSlotElement.addEventListener(t,e)}removeButtonSlotListener(t,e){this._buttonSlotElement.removeEventListener(t,e)}addContentSlotListener(t,e){this._contentSlotElement.addEventListener(t,e)}removeContentSlotListener(t,e){this._contentSlotElement.removeEventListener(t,e)}animateStateLayer(){this._stateLayerElement.playAnimation()}startButtonObserver(t){this._buttonElement&&(this._buttonObserver=new MutationObserver(t),this._buttonObserver.observe(this._buttonElement,{attributeFilter:[Bt.attributes.DISABLED]}))}stopButtonObserver(){this._buttonObserver&&(this._buttonObserver.disconnect(),this._buttonObserver=void 0)}detectSlottedButton(){this._buttonElement=this._buttonSlotElement.assignedElements()[0]}isButtonDisabled(){var t,e;return(e=(t=this._buttonElement)==null?void 0:t.disabled)!=null?e:!0}requestDisabledButtonFrame(){this._buttonElement&&(this._buttonElement.disabled=!0,requestAnimationFrame(()=>this._buttonElement.disabled=!1))}};var ws=class{constructor(t){this._adapter=t;this._disabled=!1;this._clickListener=this._handleClick.bind(this);this._keydownListener=this._handleKeydown.bind(this);this._pointerdownListener=this._handlePointerdown.bind(this);this._ignoreStateLayerListener=this._handleIgnoreStateLayer.bind(this);this._slotListener=this._handleSlotChange.bind(this)}initialize(){this._adapter.addListener("click",this._clickListener),this._adapter.addListener("keydown",this._keydownListener),this._adapter.addListener("pointerdown",this._pointerdownListener),this._adapter.addContentSlotListener("click",this._ignoreStateLayerListener.bind(this)),this._adapter.addContentSlotListener("pointerdown",this._ignoreStateLayerListener.bind(this)),this._adapter.addContentSlotListener("pointerup",this._ignoreStateLayerListener.bind(this)),this._adapter.addButtonSlotListener("slotchange",this._slotListener)}destroy(){this._adapter.removeListener("click",this._clickListener),this._adapter.removeListener("keydown",this._keydownListener),this._adapter.removeListener("pointerdown",this._pointerdownListener),this._adapter.removeContentSlotListener("click",this._ignoreStateLayerListener.bind(this)),this._adapter.removeContentSlotListener("pointerdown",this._ignoreStateLayerListener.bind(this)),this._adapter.removeContentSlotListener("pointerup",this._ignoreStateLayerListener.bind(this)),this._adapter.removeButtonSlotListener("slotchange",this._slotListener),this._adapter.destroy(),this._adapter.stopButtonObserver()}_handleClick(t){this._disabled&&t.stopPropagation();let e=window.getSelection();(e==null?void 0:e.type)==="Range"&&(e==null?void 0:e.toString().trim())!==""&&t.stopPropagation(),this._shouldIgnoreEvent(t)&&t.stopPropagation()}_handleKeydown(t){t.key!==" "&&t.key!=="Enter"||(this._shouldIgnoreEvent(t)?t.stopPropagation():this._adapter.animateStateLayer())}_handlePointerdown(t){this._disabled||this._shouldIgnoreEvent(t)&&this._adapter.requestDisabledButtonFrame()}_handleIgnoreStateLayer(t){this._disabled||this._shouldIgnoreEvent(t)&&t.stopPropagation()}_handleSlotChange(){this._adapter.stopButtonObserver(),this._adapter.detectSlottedButton(),this._adapter.startButtonObserver(()=>this._handleButtonDisabled()),this._adapter.isButtonDisabled()?this.disabled=!0:this._disabled&&this._adapter.setDisabled(!0)}_handleButtonDisabled(){this.disabled=this._adapter.isButtonDisabled()}_shouldIgnoreEvent(t){return L2(t).some(a=>a.nodeType===1&&(a.hasAttribute(Bt.attributes.IGNORE)||a.hasAttribute(Bt.attributes.IGNORE_ALT)))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(Bt.attributes.DISABLED,this._disabled))}};var xu='<template><div class="forge-button-area" id="root" part="root"><div class="button" id="button" part="button"><slot name="button"></slot></div><slot id="content"></slot><forge-state-layer target="root" exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator target="button" part="focus-indicator" inward></forge-focus-indicator></div></template>',bu=":host{display:block;position:relative}:host .forge-button-area{cursor:var(--_button-area-cursor)}:host([hidden]){display:none}:host([disabled]) .forge-button-area{cursor:var(--_button-area-disabled-cursor)}.forge-button-area{--_button-area-primary-color:var(--forge-button-area-primary-color, var(--forge-theme-primary, #3f51b5));--_button-area-cursor:var(--forge-button-area-cursor, pointer);--_button-area-disabled-cursor:var(--forge-button-area-disabled-cursor, not-allowed);--_button-area-focus-indicator-color:var(--forge-button-area-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_button-area-focus-indicator-offset:var(--forge-button-area-focus-indicator-offset, 4px)}.forge-button-area{position:relative;overflow:hidden;block-size:100%;inline-size:100%}.forge-button-area .button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:fixed;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}forge-focus-indicator{z-index:1;--forge-focus-indicator-color:var(--_button-area-focus-indicator-color);--forge-focus-indicator-outward-offset:var(--_button-area-focus-indicator-offset)}forge-state-layer{--forge-state-layer-color:var(--_button-area-primary-color);border-radius:inherit}",Aa=class extends M{static get observedAttributes(){return[Bt.attributes.DISABLED]}constructor(){super(),H(this,xu,bu),this._core=new ws(new gs(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case Bt.attributes.DISABLED:this.disabled=p(a);break}}};s([v()],Aa.prototype,"disabled",2),Aa=s([y({name:Bt.elementName,dependencies:[Q,r1]})],Aa);function np(){x(Aa)}var D4=`${b}calendar-menu`,yu={ANIMATION_TYPE:"animation-type",DATA_ANIMATION:"data-animation",DATA_VALUE:"data-value",POPOVER_CONTEXT:"forge-popover-context",PREVENT_FOCUS:"prevent-focus"},ea={BACKDROP:"forge-calendar-menu__backdrop",CLOSING:"forge-calendar-menu--closing",GRID:"forge-calendar-menu__grid",GRID_ITEM:"forge-calendar-menu__item--grid",GRID_FOUR_COL:"forge-calendar-menu__grid--four-col",GRID_THREE_COL:"forge-calendar-menu__grid--three-col",ITEM:"forge-calendar-menu__item",ITEM_FOCUSED:"forge-calendar-menu__item--focused",ITEM_SELECTED:"forge-calendar-menu__item--selected",LIST:"forge-calendar-menu__list",LIST_ITEM:"forge-calendar-menu__item--list",LIST_WRAPPER:"forge-calendar-menu__list__wrapper",OPEN:"forge-calendar-menu--open",REPLACING_VIEW:"forge-calendar-menu--replacing-view",SLIDE_LEFT:"forge-calendar-menu--slide-left",SLIDE_RIGHT:"forge-calendar-menu--slide-right",VIEW:"forge-calendar-menu__view"},P4={SCROLL_SPY_BOTTOM:"scroll-spy-bottom",SCROLL_SPY_TOP:"scroll-spy-top"},Mu={ITEM:"menu-item",ITEM_BUTTON:"menu-item-button",ITEM_CONTENT:"menu-item-content",MENU:"menu"},Hu={CONTAINER:".forge-calendar-menu",FOCUSED:`.${ea.ITEM_FOCUSED}`,GRID:`.${ea.GRID}`,ITEM:`.${ea.ITEM}`,LIST:`.${ea.LIST}`,LIST_WRAPPER:`.${ea.LIST_WRAPPER}`,SCROLL_SPY_BOTTOM:`#${P4.SCROLL_SPY_BOTTOM}`,SCROLL_SPY_TOP:`#${P4.SCROLL_SPY_TOP}`,SELECTED:`.${ea.ITEM_SELECTED}`,VIEW:`.${ea.VIEW}`},Lu={FOCUS_CHANGE:`${D4}-focus-change`,SELECT:`${D4}-select`},Iu={FOUR_COL:4,LARGE_ITEM_SET:13,LIST_SLICE_SIZE:20,THREE_COL:3},T={elementName:D4,attributes:yu,classes:ea,ids:P4,parts:Mu,selectors:Hu,events:Lu,numbers:Iu};function us(r){let t=document.createElement("div");t.setAttribute("part",T.parts.MENU),t.classList.add(T.classes.VIEW,T.classes.GRID);let e;return r.length>12?(t.classList.add(T.classes.GRID_FOUR_COL),e=ip(r)):(t.classList.add(T.classes.GRID_THREE_COL),e=ip(r)),e.forEach(a=>t.appendChild(a)),t}function ip(r){return r.map(t=>{let e=document.createElement("div");e.classList.add(T.classes.ITEM,T.classes.GRID_ITEM),e.innerText=t.label,e.setAttribute("role","button"),e.setAttribute("part",T.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute(T.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.add(T.classes.ITEM_SELECTED),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true");let a=document.createElement("forge-state-layer");e.appendChild(a);let o=document.createElement("forge-focus-indicator");return o.inward=!0,e.appendChild(o),e})}function lp(r){let t=document.createElement("div"),e=document.createElement("div");return t.classList.add(T.classes.VIEW,T.classes.LIST_WRAPPER),e.classList.add(T.classes.LIST),e.setAttribute("role","list"),e.appendChild(sp(T.ids.SCROLL_SPY_TOP)),_s(r).forEach(a=>e.appendChild(a)),e.appendChild(sp(T.ids.SCROLL_SPY_BOTTOM)),t.appendChild(e),t}function _s(r){return r.map(t=>{let e=document.createElement("div");e.innerText=t.label,e.classList.add(T.classes.ITEM,T.classes.LIST_ITEM),e.setAttribute("part",T.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute("role","listitem"),e.setAttribute(T.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.toggle(T.classes.ITEM_SELECTED,!0),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true");let a=document.createElement("forge-state-layer");e.appendChild(a);let o=document.createElement("forge-focus-indicator");return o.inward=!0,e.appendChild(o),e})}function sp(r){let t=document.createElement("div");return t.id=r,t.setAttribute("aria-hidden","true"),t}function ur(r){for(;r.childNodes.length>1;)r.firstChild&&r.removeChild(r.firstChild)}var fs=class extends I{constructor(e){super(e);this.component=e;this._container=g(e,T.selectors.CONTAINER)}registerClickListener(e){this._container.addEventListener("click",e)}unregisterClickListener(e){this._container.removeEventListener("click",e)}registerIntersectionObserver(e){let a=this._container.querySelector(T.selectors.LIST_WRAPPER);if(!a)return;let o={root:a};this._intersectionObserver=new IntersectionObserver(e,o);let n=this._container.querySelector(T.selectors.SCROLL_SPY_BOTTOM),i=this._container.querySelector(T.selectors.SCROLL_SPY_TOP);n&&this._intersectionObserver.observe(n),i&&this._intersectionObserver.observe(i)}unregisterIntersectionObserver(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0)}setAnimationType(e){this._container.setAttribute(T.attributes.DATA_ANIMATION,e)}setClosed(){this._container.classList.remove(T.classes.OPEN),this._container.classList.add(T.classes.CLOSING),Rt(this._container,T.classes.CLOSING,!0).then(()=>{r2(this._container),this.toggleHostAttribute("hidden",!0)})}setOpenAsGrid(e,a,o,n,i){let l=us(e);i&&Rt(this._container,T.classes.REPLACING_VIEW,!0).then(()=>{ur(this._container),this.setFocusAtIndex(a,o,n)}),this._container.appendChild(l),this.toggleHostAttribute("hidden",!1),this._container.classList.add(T.classes.OPEN),i||this.setFocusAtIndex(a,o,n)}setOpenAsList(e,a,o,n,i){let l=lp(e);i&&Rt(this._container,T.classes.REPLACING_VIEW,!0).then(()=>{ur(this._container),this.setFocusAtIndex(a,o,n)}),this._container.appendChild(l),this.toggleHostAttribute("hidden",!1),this._container.classList.add(T.classes.OPEN),this._scrollItemIntoView("selected"),i||this.setFocusAtIndex(a,o,n)}appendListItemsToStart(e){let a=this._container.querySelector(T.selectors.LIST_WRAPPER),o=this._container.querySelector(T.selectors.LIST),n=o==null?void 0:o.querySelector(T.selectors.ITEM);if(a&&o&&n){let i=a.scrollTop,l=a.scrollHeight-a.clientHeight;_s(e).forEach(c=>{o.insertBefore(c,n)});let h=a.scrollHeight-a.clientHeight;a.scrollTop=i+(h-l)}}appendListItemsToEnd(e){let a=this._container.querySelector(T.selectors.LIST),o=this._container.querySelector(T.selectors.SCROLL_SPY_BOTTOM);a&&o&&_s(e).forEach(n=>{a.insertBefore(n,o)})}animateInFromLeft(e,a){Rt(this._container,T.classes.SLIDE_RIGHT,!0).then(()=>{ur(this._container),a&&a()});let o=us(e);this._container.appendChild(o)}animateInFromRight(e,a){Rt(this._container,T.classes.SLIDE_LEFT,!0).then(()=>{ur(this._container),a&&a()});let o=us(e);this._container.appendChild(o)}setFocusAtIndex(e,a,o){var h;let n=this._container.querySelector(T.selectors.FOCUSED);n==null||n.classList.remove(T.classes.ITEM_FOCUSED),n==null||n.setAttribute("tabindex","-1");let i=n==null?void 0:n.querySelector("forge-focus-indicator");i&&(i.active=!1);let l=(h=this._container.querySelectorAll(T.selectors.ITEM))==null?void 0:h[e];if(l){if(l.classList.add(T.classes.ITEM_FOCUSED),l.setAttribute("tabindex",o?"-1":"0"),a&&!o)l.focus();else if(o){let c=l.querySelector("forge-focus-indicator");c&&(c.active=!0)}this._scrollItemIntoView("focused")}}_scrollItemIntoView(e){let a=this._container.querySelector(T.selectors.LIST),o=a==null?void 0:a.querySelector(e==="selected"?T.selectors.SELECTED:T.selectors.FOCUSED);a&&o&&Dr(a.parentElement,o,e==="selected"?"auto":"smooth",e==="selected"?"center":"nearest")}};var xs=class{constructor(t){this._adapter=t;this._animationType="scale";this._columnCount=3;this._focusedIndex=0;this._list=!1;this._open=!1;this._options=[];this._preventFocus=!1;this._sliceEnd=-1;this._sliceStart=-1;this._clickListener=e=>this._onClick(e),this._intersectionObserverCallback=e=>this._onIntersection(e)}initialize(){this._applyAnimationType(),this._applyPreventFocus(),this._adapter.setHostAttribute("exportparts",Object.values(T.parts).join(", ")),this._adapter.toggleHostAttribute("hidden",!0),this._adapter.registerClickListener(this._clickListener)}destroy(){this._adapter.unregisterClickListener(this._clickListener),this._adapter.unregisterIntersectionObserver()}openAsGrid(t,e){this._list=!1,this._options=t,this._focusedIndex=0,this._setColumnCount(),this._adapter.setOpenAsGrid(t,this._focusedIndex,e,this._preventFocus,this._open),this._setGridListeners(),this._open=!0,this._emitFocusChangeEvent()}openAsList(t,e){this._list=!0,this._options=t;let a=this._getOptionSliceIncludingSelected();this._focusedIndex=Math.max(t.findIndex(o=>o.selected),this._sliceStart),this._adapter.setOpenAsList(a,this._focusedIndex-this._sliceStart,e,this._preventFocus,this._open),this._setListListeners(),this._open=!0,this._emitFocusChangeEvent()}close(){this._open=!1,this._options=[],this._adapter.setClosed()}animateIn(t,e,a){let o=()=>{this._setFocusFromStoredIndex(a)};e==="left"?this._adapter.animateInFromLeft(t,o):this._adapter.animateInFromRight(t,o),this._options=t,this._setColumnCount()}selectFocusedItem(){var t;this._adapter.emitHostEvent(T.events.SELECT,(t=this._options[this._focusedIndex])==null?void 0:t.value)}moveFocusBackward(){if(this._list)return!0;let t=this._focusedIndex-1,e=t>=0&&t%this._columnCount!==this._columnCount-1;return this._focusedIndexAfterAnimation=e?void 0:t+this._columnCount,this._tryMoveFocus(t,e)}moveFocusDown(){if(this._list){let t=Math.min(this._focusedIndex+=1,this._options.length-1);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex+this._columnCount,e=t<this._options.length;this._focusedIndexAfterAnimation=e?void 0:t%this._columnCount,this._tryMoveFocus(t,e)}}moveFocusForward(){if(this._list)return!0;let t=this._focusedIndex+1,e=t<this._options.length&&t%this._columnCount!==0;return this._focusedIndexAfterAnimation=e?void 0:t-this._columnCount,this._tryMoveFocus(t,e)}moveFocusUp(){if(this._list){let t=Math.max(this._focusedIndex-=1,0);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex-this._columnCount,e=t>=0;this._focusedIndexAfterAnimation=e?void 0:this._options.length+t,this._tryMoveFocus(t,e)}}_tryMoveFocus(t,e){var a;return e&&!((a=this._options[t])!=null&&a.disabled)&&(this._focusedIndex=t,this._adapter.setFocusAtIndex(this._list?this._focusedIndex-this._sliceStart:this._focusedIndex,!0,this._preventFocus),this._emitFocusChangeEvent()),e}_setFocusFromStoredIndex(t){var e,a;this._focusedIndexAfterAnimation!==void 0&&(this._options[this._focusedIndexAfterAnimation]&&!((e=this._options[this._focusedIndexAfterAnimation])!=null&&e.disabled)?this._focusedIndex=this._focusedIndexAfterAnimation:(a=this._options[0])!=null&&a.disabled?this._focusedIndex=this._options.findIndex(o=>!o.disabled):this._focusedIndex=this._options.length-this._options.slice().reverse().findIndex(o=>!o.disabled)-1,this._focusedIndexAfterAnimation=void 0,this._adapter.setFocusAtIndex(this._focusedIndex,t,this._preventFocus),this._emitFocusChangeEvent())}_onClick(t){let e=L2(t).find(o=>o.classList&&o.classList.contains(T.classes.ITEM)),a=e==null?void 0:e.getAttribute(T.attributes.DATA_VALUE);k(a)&&this._adapter.emitHostEvent(T.events.SELECT,+a)}_onIntersection(t){this._sliceStart>0&&t.some(e=>e.target.id===T.ids.SCROLL_SPY_TOP&&e.isIntersecting)&&this._adapter.appendListItemsToStart(this._getPreviousOptionsSlice()),this._sliceEnd<this._options.length&&t.some(e=>e.target.id===T.ids.SCROLL_SPY_BOTTOM&&e.isIntersecting)&&this._adapter.appendListItemsToEnd(this._getNextOptionsSlice())}_setColumnCount(){this._columnCount=this._options.length>=T.numbers.LARGE_ITEM_SET?T.numbers.FOUR_COL:T.numbers.THREE_COL}_emitFocusChangeEvent(){var t;this._adapter.emitHostEvent(T.events.FOCUS_CHANGE,(t=this._options[this._focusedIndex])==null?void 0:t.value)}_setGridListeners(){this._adapter.unregisterIntersectionObserver()}_setListListeners(){this._adapter.unregisterIntersectionObserver(),this._adapter.registerIntersectionObserver(this._intersectionObserverCallback)}_getOptionSliceIncludingSelected(){if(this._options.length<=T.numbers.LIST_SLICE_SIZE)return this._sliceStart=0,this._sliceEnd=this._options.length,this._options.slice();let t=Math.max(this._options.findIndex(o=>o.selected),0),e=Math.max(Math.floor(t-T.numbers.LIST_SLICE_SIZE/2),0),a=e+T.numbers.LIST_SLICE_SIZE;return a>this._options.length&&(e=this._options.length-1-T.numbers.LIST_SLICE_SIZE,a=this._options.length),this._sliceStart=e,this._sliceEnd=a,this._options.slice(this._sliceStart,this._sliceEnd)}_getNextOptionsSlice(){let t=Math.min(this._sliceEnd+T.numbers.LIST_SLICE_SIZE,this._options.length),e=this._options.slice(this._sliceEnd,t);return this._sliceEnd=t,e}_getPreviousOptionsSlice(){let t=Math.max(this._sliceStart-T.numbers.LIST_SLICE_SIZE,0),e=this._options.slice(t,this._sliceStart);return this._sliceStart=t,e}_applyAnimationType(){this._adapter.setHostAttribute(T.attributes.ANIMATION_TYPE,this._animationType),this._adapter.setAnimationType(this._animationType)}_applyPreventFocus(){this._adapter.toggleHostAttribute(T.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setFocusAtIndex(this._focusedIndex,!1,this._preventFocus)}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._applyAnimationType())}get preventFocus(){return this._preventFocus}set preventFocus(t){this._preventFocus!==t&&(this._preventFocus=t,this._applyPreventFocus())}};var Vu='<template><div class="forge-calendar-menu" part="root"></div></template>',Eu='.forge-calendar-menu{background-color:var(--forge-theme-surface,#fff);position:relative;height:100%;width:100%;overflow:hidden}.forge-calendar-menu__view{position:absolute;top:0;left:0;height:100%;width:100%;background-color:inherit}.forge-calendar-menu__grid{max-height:var(--forge-calendar-menu-max-height,320px);display:grid;gap:16px;justify-items:center;align-items:center;padding:8px;box-sizing:border-box}.forge-calendar-menu__grid--three-col{grid-template-columns:repeat(3,1fr)}.forge-calendar-menu__grid--four-col{grid-template-columns:repeat(4,1fr)}.forge-calendar-menu__list{position:relative;background-color:inherit}.forge-calendar-menu__list__wrapper{position:relative;height:100%;overflow:auto}.forge-calendar-menu__list__wrapper::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-calendar-menu__item--grid{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:4px;overflow:hidden;font-weight:500;user-select:none}.forge-calendar-menu__item--grid:not([disabled]){border:1px solid var(--forge-theme-outline,#e0e0e0);cursor:pointer}.forge-calendar-menu__item--grid[disabled]{color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container, #d1d5ed)}.forge-calendar-menu__item--list{display:flex;align-items:center;justify-content:center;margin:0 4px;width:calc(100% - 8px);height:48px;border-radius:4px;overflow:hidden;text-align:center;cursor:pointer;position:relative}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container)}.forge-calendar-menu__item--focused,.forge-calendar-menu__item:focus{outline:0}.forge-calendar-menu--open{animation-duration:.2s;animation-name:scale-open;transform-origin:top center}.forge-calendar-menu--open[data-animation=fade]{animation-name:fade-in}.forge-calendar-menu--open[data-animation=none]{animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--open{animation-name:fade-in}}.forge-calendar-menu--closing{animation-duration:.2s;animation-name:scale-closed;transform-origin:top center}.forge-calendar-menu--closing[data-animation=fade]{animation-name:fade-out}.forge-calendar-menu--closing[data-animation=none]{animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--closing{animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:slide-out-to-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:slide-in-from-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{animation-name:fade-in}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:slide-out-to-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{animation-name:fade-out}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:slide-in-from-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{animation-name:fade-in}}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:fade-out}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:fade-in}#scroll-spy-bottom{position:absolute;bottom:0;height:48px;pointer-events:none}#scroll-spy-top{position:absolute;top:0;height:48px;pointer-events:none}@keyframes scale-open{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}@keyframes scale-closed{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.4)}}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-out{from{opacity:1}to{opacity:0}}@keyframes slide-in-from-left{from{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-in-from-right{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slide-out-to-left{from{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes slide-out-to-right{from{transform:translateX(0)}to{transform:translateX(100%)}}:host{display:block;position:absolute;top:0;left:0;height:100%;width:100%}:host([hidden]){display:none}:host([forge-popover-context=true]) .forge-calendar-menu{background-color:var(--forge-theme-surface-bright,#fff)}',Ye=class extends M{static get observedAttributes(){return[T.attributes.ANIMATION_TYPE,T.attributes.PREVENT_FOCUS]}constructor(){super(),H(this,Vu,Eu),this._core=new xs(new fs(this))}connectedCallback(){!this.hasAttribute(T.attributes.POPOVER_CONTEXT)&&Ra(this).some(t=>t.tagName.toLowerCase()==="forge-popover")&&this.setAttribute(T.attributes.POPOVER_CONTEXT,"true"),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case T.attributes.ANIMATION_TYPE:this.animationType=a;break;case T.attributes.PREVENT_FOCUS:this.preventFocus=p(a);break}}animateIn(t,e,a=!1){this._core.animateIn(t,e,a)}close(){this._core.close()}moveFocusDown(){this._core.moveFocusDown()}moveFocusBackward(){return this._core.moveFocusBackward()}moveFocusForward(){return this._core.moveFocusForward()}moveFocusUp(){this._core.moveFocusUp()}openAsGrid(t,e=!1){this._core.openAsGrid(t,e)}openAsList(t,e=!1){this._core.openAsList(t,e)}selectFocusedItem(){this._core.selectFocusedItem()}};s([v()],Ye.prototype,"animationType",2),s([v()],Ye.prototype,"preventFocus",2),Ye=s([y({name:T.elementName,dependencies:[r1,Q]})],Ye);function zl1(){x(Ye)}var _r=`${b}calendar`,Cu={ALLOW_SINGLE_DATE_RANGE:"allow-single-date-range",CLEAR_BUTTON:"clear-button",CONSTRAIN_TO_ENABLED:"constrain-to-enabled",FIRST_DAY_OF_WEEK:"first-day-of-week",FIXED_HEIGHT:"static-height",LIST_YEARS:"list-years",LOCALE:"locale",MAX:"max",MENU_ANIMATION:"menu-animation",MIN:"min",MODE:"mode",MONTH:"month",PREVENT_FOCUS:"prevent-focus",READONLY:"readonly",SELECTION_FOLLOWS_MONTH:"selection-follows-month",SHOW_HEADER:"show-header",SHOW_OTHER_MONTHS:"show-other-months",SHOW_TODAY:"show-today",TODAY_BUTTON:"today-button",VIEW:"view",YEAR:"year",YEAR_RANGE:"year-range"},zu=t1(w({},Cu),{DATA_DATE:"data-date",DATA_EVENT_THEME:"data-event-theme",POPOVER_CONTEXT:"forge-popover-context"}),he={ALLOW_SINGLE_DATE_RANGE:"forge-calendar--allow-single-date-range",DATE:"forge-calendar__date",DATE_GRID:"forge-calendar__date-grid",DATE_INNER:"forge-calendar__date__inner",DATE_OTHER_MONTH:"forge-calendar__date--other-month",DATE_SPACER:"forge-calendar__date-spacer",DATE_SELECTED:"forge-calendar__date--selected",DATE_TODAY:"forge-calendar__date--today",DATE_VIEW:"forge-calendar__date-view",DATE_VIEW_ROW:"forge-calendar__date-view__row",DATE_WRAPPER:"forge-calendar__date-wrapper",DAY:"forge-calendar__day",EVENT:"forge-calendar__event",EVENT_OVERFLOW:"forge-calendar__event--overflow",EVENT_WRAPPER:"forge-calendar__event__wrapper",FIXED_HEIGHT:"forge-calendar--fixed-height",FOOTER:"forge-calendar__footer",HEADER:"forge-calendar__header",MONTH_MENU_OPEN:"forge-calendar--month-menu-open",PREVENT_FOCUS:"forge-calendar--prevent-focus",RANGE:"forge-calendar__range",RANGE_END:"forge-calendar__range--end",RANGE_START:"forge-calendar__range--start",RANGE_TARGET:"forge-calendar__range__target",READONLY:"forge-calendar--readonly",RTL:"forge-calendar--rtl",SHOW_OTHER_MONTHS:"forge-calendar--show-other-months",SHOW_TODAY:"forge-calendar--show-today",VIEW:"forge-calendar__view",YEAR_MENU_OPEN:"forge-calendar--year-menu-open"},et={ACCESSIBLE_HEADER:"accessible-header",ACCESSIBLE_MONTH:"accessible-month",ACCESSIBLE_YEAR:"accessible-year",CLEAR_BUTTON:"clear-button",DATE_GRID:"date-grid",DATE_VIEW:"date-view",DAY_ROW:"day-row",FOOTER:"footer",HEADER:"header",MENU:"menu",MONTH_BUTTON:"month-button",NEXT_BUTTON:"next-button",NEXT_BUTTON_TOOLTIP:"next-button-tooltip",PREVIOUS_BUTTON:"previous-button",PREVIOUS_BUTTON_TOOLTIP:"previous-button-tooltip",TODAY_BUTTON:"today-button",YEAR_BUTTON:"year-button"},Au={PREVIOUS_MONTH_BUTTON_TEXT:"previous-month-button-text",NEXT_MONTH_BUTTON_TEXT:"next-month-button-text",PREVIOUS_YEAR_BUTTON_TEXT:"previous-year-button-text",NEXT_YEAR_BUTTON_TEXT:"next-year-button-text",PREVIOUS_YEARS_BUTTON_TEXT:"previous-years-button-text",NEXT_YEARS_BUTTON_TEXT:"next-years-button-text",TODAY_BUTTON_TEXT:"today-button-text",CLEAR_BUTTON_TEXT:"clear-button-text"},Bu={SUNDAY:"sunday",MONDAY:"monday",TUESDAY:"tuesday",WEDNESDAY:"wednesday",THURSDAY:"thursday",FRIDAY:"friday",SATURDAY:"saturday"},Tu=t1(w({},Bu),{CLEAR_BUTTON:"clear-button",DATE:"date",DATE_OTHER_MONTH:"date-other-month",DATE_VIEW:"date-view",DATE_WRAPPER:"date-wrapper",DAY:"day",EVENT:"event",EVENT_WRAPPER:"event-wrapper",FOOTER:"footer",HEADER:"header",MONTH_BUTTON:"month-button",MONTH_BUTTON_ELEMENT:"month-button-element",NEXT_BUTTON:"next-button",PREVIOUS_BUTTON:"previous-button",RANGE:"range",RANGE_END:"range-end",RANGE_START:"range-start",TODAY:"today",TODAY_BUTTON:"today-button",WEEKEND:"weekend",YEAR_BUTTON:"year-button",YEAR_BUTTON_ELEMENT:"year-button-element"}),Su={ACCESSIBLE_HEADER:`#${et.ACCESSIBLE_HEADER}`,ACCESSIBLE_MONTH:`#${et.ACCESSIBLE_MONTH}`,ACCESSIBLE_YEAR:`#${et.ACCESSIBLE_YEAR}`,CALENDAR:".forge-calendar",CLEAR_BUTTON:`#${et.CLEAR_BUTTON}`,DATE:`.${he.DATE}`,DATE_GRID:`#${et.DATE_GRID}`,DATE_INNER:`.${he.DATE_INNER}`,DATE_OTHER_MONTH:`.${he.DATE_OTHER_MONTH}`,DATE_SPACER:`.${he.DATE_SPACER}`,DATE_SELECTED:`.${he.DATE_SELECTED}`,DATE_TODAY:`.${he.DATE_TODAY}`,DATE_VIEW:`#${et.DATE_VIEW}`,DATE_WRAPPER:`.${he.DATE_WRAPPER}`,DAY_ROW:`#${et.DAY_ROW}`,EVENT_WRAPPER:`.${he.EVENT_WRAPPER}`,FOOTER:`#${et.FOOTER}`,HEADER:`#${et.HEADER}`,MENU:T.elementName,MONTH_BUTTON:`#${et.MONTH_BUTTON}`,NEXT_BUTTON:`#${et.NEXT_BUTTON}`,NEXT_BUTTON_TOOLTIP:`#${et.NEXT_BUTTON_TOOLTIP}`,PREVIOUS_BUTTON:`#${et.PREVIOUS_BUTTON}`,PREVIOUS_BUTTON_TOOLTIP:`#${et.PREVIOUS_BUTTON_TOOLTIP}`,RANGE:`.${he.RANGE}`,RANGE_END:`.${he.RANGE_END}`,RANGE_START:`.${he.RANGE_START}`,TODAY_BUTTON:`#${et.TODAY_BUTTON}`,TOOLTIP:o1.elementName,VIEW:"#view",YEAR_BUTTON:`#${et.YEAR_BUTTON}`},ku={DATE_SELECT:`${_r}-date-select`,FOCUS_CHANGE:`${_r}-focus-change`,MONTH_CHANGE:`${_r}-month-change`,VIEW_CHANGE:`${_r}-view-change`},Ou={DEFAULT_PREVIOUS_MONTH_BUTTON_TEXT:"Previous month",DEFAULT_NEXT_MONTH_BUTTON_TEXT:"Next month",DEFAULT_PREVIOUS_YEAR_BUTTON_TEXT:"Previous year",DEFAULT_NEXT_YEAR_BUTTON_TEXT:"Next year",DEFAULT_PREVIOUS_YEARS_BUTTON_TEXT:"Previous years",DEFAULT_NEXT_YEARS_BUTTON_TEXT:"Next years",DEFAULT_TODAY_BUTTON_TEXT:"Today",DEFAULT_CLEAR_BUTTON_TEXT:"Clear"},Du={DEFAULT_MAX_YEAR_OFFSET:50,DEFAULT_MIN_YEAR_OFFSET:50,FINAL_WEEK_BEGIN_INDEX:35,MONTH_LENGTH:42,PENULTIMATE_WEEK_BEGIN_INDEX:28,WEEK_LENGTH:7,YEARS_IN_VIEW:20},m={elementName:_r,attributes:zu,classes:he,ids:et,slots:Au,parts:Tu,selectors:Su,events:ku,strings:Ou,numbers:Du},fr=(l=>(l[l.Sunday=0]="Sunday",l[l.Monday=1]="Monday",l[l.Tuesday=2]="Tuesday",l[l.Wednesday=3]="Wednesday",l[l.Thursday=4]="Thursday",l[l.Friday=5]="Friday",l[l.Saturday=6]="Saturday",l))(fr||{}),vp=(a=>(a[a.First=1]="First",a[a.Last=2]="Last",a[a.Current=3]="Current",a))(vp||{});function N4(r,t,e){return e||(e=navigator.language),new Date(2017,0,r+1).toLocaleString(e,{weekday:t})}function hp(r,t,e){return e||(e=navigator.language),new Date(1970,0,r).toLocaleDateString(e,{day:t})}function aa(r,t,e){return e||(e=navigator.language),new Date(1970,r,1).toLocaleString(e,{month:t})}function u0(r,t,e){return e||(e=navigator.language),new Date(r,0,1).toLocaleDateString(e,{year:t})}function cp(r){r||(r=navigator.language);let t=r.match(/^([a-z]{2,3})(?:-([a-z]{3})(?=$|-))?(?:-([a-z]{4})(?=$|-))?(?:-([a-z]{2}|\d{3})(?=$|-))?/i);if(!t||!t.length)return 1;let e=t[1],a=t[4],o="AEAFBHDJDZEGIQIRJOKWLYOMQASDSY".match(/../g),n="AGARASAUBDBRBSBTBWBZCACNCODMDOETGTGUHKHNIDILINJMJPKEKHKRLAMHMMMOMTMXMZNINPPAPEPHPKPRPTPYSASGSVTHTTTWUMUSVEVIWSYEZAZW".match(/../g),i=["ar","arq","arz","fa"],l="amasbndzengnguhehiidjajvkmknkolomhmlmrmtmyneomorpapssdsmsnsutatethtnurzhzu".match(/../g);return a?n&&n.includes(a)?0:o&&o.includes(a)?6:1:l&&l.includes(e)?0:i&&i.includes(e)?6:1}function pp(r){switch(r||(r=navigator.language),r.split("-")[1]){case"DZ":case"BH":case"BD":case"EG":case"IQ":case"IL":case"JO":case"KW":case"LY":case"MV":case"MR":case"NP":case"OM":case"QA":case"SA":case"SD":case"SY":case"AE":case"YE":case"AF":case"IR":return[4,5];case"BN":return[0,5];default:return[0,6]}}function dp(r){return r||(r=navigator.language),["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","sd","ur","uz-AF","yi"].some(e=>r?r.startsWith(e):!1)}function Pu(r){return`d${r}`}function at(r){let t=String(r.getMonth()).padStart(2,"0"),e=String(r.getDate()).padStart(2,"0");return["d",r.getFullYear(),t,e].join("")}function R4(r){let t=String(r.getMonth()).padStart(2,"0"),e=String(r.getDate()).padStart(2,"0");return["e",r.getFullYear(),t,e].join("")}function mp(r,t){let e=document.createElement("div");return e.classList.add(m.classes.DAY),e.id=Pu(r),e.setAttribute("role","columnheader"),e.setAttribute("aria-label",N4(r,"long",t)),e.setAttribute("part",m.parts.DAY),e.textContent=N4(r,"short",t),e}function gp(r,t,e){var o;let a=document.createElement("div");return a.classList.add(m.classes.DATE_VIEW_ROW),a.setAttribute("role","row"),t>0&&!((o=r[0])!=null&&o.thisMonth)?(r.forEach(n=>a.appendChild(bs(n.date))),a.setAttribute("aria-hidden","true")):r.forEach(n=>{let i=n.thisMonth||e!=null&&e.showOtherMonths?F4(n,e==null?void 0:e.locale):bs(n.date);(n.thisMonth||e!=null&&e.showOtherMonths)&&(e!=null&&e.builder)&&(i=e.builder(n,i)),a.appendChild(i)}),a}function F4(r,t){let e=document.createElement("div"),a=document.createElement("div"),o=document.createElement("div"),n=document.createElement("forge-state-layer");n.disabled=r.disabled;let i=document.createElement("forge-focus-indicator");i.inward=!0;let l=r.date.getDay();e.id=at(r.date),e.tabIndex=-1,e.classList.add(m.classes.DATE),e.classList.toggle(m.classes.DATE_TODAY,r.today),e.classList.toggle(m.classes.DATE_SELECTED,r.selected),e.classList.toggle(m.classes.DATE_OTHER_MONTH,!r.thisMonth),e.setAttribute("role","gridcell"),e.setAttribute("aria-disabled",r.disabled.toString()),e.setAttribute("aria-label",`${r.today?"Today, ":""}${r.date.toLocaleDateString(t!=null?t:navigator.language,{weekday:"long",month:"long",day:"numeric",year:"numeric"})}`),e.setAttribute("aria-selected",r.selected.toString()),e.setAttribute(m.attributes.DATA_DATE,r.date.toDateString()),e.toggleAttribute("disabled",r.disabled),e.setAttribute("part",m.parts.DATE_WRAPPER);let h="";switch(l){case 0:h=m.parts.SUNDAY;break;case 1:h=m.parts.MONDAY;break;case 2:h=m.parts.TUESDAY;break;case 3:h=m.parts.WEDNESDAY;break;case 4:h=m.parts.THURSDAY;break;case 5:h=m.parts.FRIDAY;break;case 6:h=m.parts.SATURDAY;break}return Ua(o,"part",h),Ua(o,"part",m.parts.DATE),No(o,"part",m.parts.TODAY,r.today),No(o,"part",m.parts.DATE_OTHER_MONTH,!r.thisMonth),a.classList.add(m.classes.RANGE_TARGET),e.appendChild(a),o.textContent=hp(r.date.getDate(),"numeric",t),o.classList.add(m.classes.DATE_INNER),e.appendChild(o),e.appendChild(n),e.appendChild(i),e}function bs(r){let t=document.createElement("span");return t.classList.add(m.classes.DATE_SPACER),t.id=at(r),t}function wp(r){let t=document.createElement("div");return t.classList.add(m.classes.EVENT_WRAPPER),t.id=R4(r),t.setAttribute("part",m.parts.EVENT_WRAPPER),t}function up(r,t){let e=document.createElement("forge-icon");if(e.classList.add(m.classes.EVENT),e.setAttribute("part",m.parts.EVENT),t)e.classList.add(m.classes.EVENT_OVERFLOW),e.name="add";else{let a='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" stroke="var(--forge-calendar-event-stroke-color)" stroke-width="4px" paint-order="stroke"></path></svg>';e.src=a,e.setAttribute(m.attributes.DATA_EVENT_THEME,r.color)}return e}function _p(r){let t=document.createElement("forge-tooltip");return t.textContent=r,t}function U4(){let r=document.createElement("div");r.classList.add(m.classes.HEADER),r.id=m.ids.HEADER,r.setAttribute("part",m.parts.HEADER);let t=document.createElement("forge-icon-button"),e=document.createElement("forge-icon"),a=document.createElement("forge-tooltip");t.setAttribute("part",m.parts.PREVIOUS_BUTTON),t.id=m.ids.PREVIOUS_BUTTON,t.type="button",e.setAttribute("name","keyboard_arrow_left"),a.id=m.ids.PREVIOUS_BUTTON_TOOLTIP,a.setAttribute("aria-hidden","true"),a.type="label",a.innerText="Previous",t.appendChild(a),t.appendChild(e);let o=document.createElement("forge-icon-button"),n=document.createElement("forge-icon"),i=document.createElement("forge-tooltip");o.setAttribute("part",m.parts.NEXT_BUTTON),o.id=m.ids.NEXT_BUTTON,o.type="button",n.setAttribute("name","keyboard_arrow_right"),i.id=m.ids.NEXT_BUTTON_TOOLTIP,i.setAttribute("aria-hidden","true"),i.type="label",i.innerText="Next",o.appendChild(i),o.appendChild(n);let l=document.createElement("forge-button");l.setAttribute("part",m.parts.MONTH_BUTTON),l.id=m.ids.MONTH_BUTTON,l.type="button",l.setAttribute("aria-pressed","false");let h=document.createElement("forge-button");h.setAttribute("part",m.parts.YEAR_BUTTON),h.id=m.ids.YEAR_BUTTON,h.type="button",h.setAttribute("aria-pressed","false");let c=document.createElement("div");return c.setAttribute("aria-live","polite"),c.appendChild(l),c.appendChild(h),r.appendChild(t),r.appendChild(c),r.appendChild(o),r}function fp(r,t){let e=document.createElement("span"),a=document.createElement("forge-icon");return e.innerHTML=aa(r,"long",t),a.setAttribute("name","arrow_drop_down"),[e,a]}function xp(r,t){let e=document.createElement("span"),a=document.createElement("forge-icon");return e.innerHTML=u0(r,"numeric",t),a.setAttribute("name","arrow_drop_down"),[e,a]}function W4(){let r=document.createElement("div");r.id=m.ids.ACCESSIBLE_HEADER,r.setAttribute("aria-live","polite");let t=document.createElement("span");t.id=m.ids.ACCESSIBLE_MONTH;let e=document.createElement("span");return e.id=m.ids.ACCESSIBLE_YEAR,r.appendChild(t),r.appendChild(e),r}function bp(){let r=document.createElement("div");return r.id=m.ids.FOOTER,r.classList.add(m.classes.FOOTER),r.setAttribute("part",m.parts.FOOTER),r}function yp(){let r=document.createElement("forge-button");r.id=m.ids.CLEAR_BUTTON,r.setAttribute("part",m.parts.CLEAR_BUTTON),r.type="button";let t=document.createElement("slot");return t.name=m.slots.CLEAR_BUTTON_TEXT,t.innerText=m.strings.DEFAULT_CLEAR_BUTTON_TEXT,r.appendChild(t),r}function Mp(){let r=document.createElement("forge-button");r.id=m.ids.TODAY_BUTTON,r.setAttribute("part",m.parts.TODAY_BUTTON),r.type="button";let t=document.createElement("slot");return t.name=m.slots.TODAY_BUTTON_TEXT,t.innerText=m.strings.DEFAULT_TODAY_BUTTON_TEXT,r.appendChild(t),r}function xr(r,t){let e=L2(r).find(a=>a.classList&&a.classList.contains(m.classes.DATE));return!e||!t&&e.hasAttribute("disabled")?null:e}function Hp(r,t){let e=L2(r).find(a=>a.id===t);return e!=null?e:null}function G4(r,t,e,a){r.tabIndex=a?-1:t;let o=r.querySelector("forge-focus-indicator");o&&(o.active=!!a&&t>-1),t>-1&&e&&!a?r.focus():r.blur()}var l2=class r{constructor(t){t&&(this.from=t.from?new Date(t.from):void 0,this.to=t.to?new Date(t.to):void 0)}copy(){return new r(this)}};function Y4(r,t,e=0){let a=[],o=br(new Date(t,r,1),e),n=new Date(o);n.setDate(o.getDate()+m.numbers.MONTH_LENGTH);for(let i=o;i<n;i.setDate(i.getDate()+1))a.push(new Date(i));return a}function c41(r,t=0){let e=[],a=br(r,t),o=new Date(a);o.setDate(a.getDate()+7);for(let n=a;n<o;n.setDate(n.getDate()+1))e.push(new Date(n));return e}function br(r,t=0){let e=r.getDay(),a=new Date(r),o=e>=t?e-t:7+(e-t);return a.setDate(r.getDate()-o),a.setHours(0,0,0,0),a}function Lp(r,t=0){let e=br(r,t);return e.setDate(e.getDate()+6),e}function p41(r,t){return new Date(t,r,1).getDay()}function ys(r=0){let t=[],e=r;do t.push(e),e+=1,e%=7;while(e!==r);return t}function Ip(r){return f2(new Date,r)}function ht(r,t,e){return r.getMonth()===t&&r.getFullYear()===e}function Nu(r,t,e){return r>t&&r<e||f2(r,t)||f2(r,e)}function Ms(r){return r.sort((t,e)=>t.getTime()-e.getTime())}function Vp(r){let t=[];for(let e=0;e<r.length;e+=7){let a=r.slice(e,e+7);t.push(a)}return t}function Ba(r){if(!r.length)return new l2;if(r.length===1)return new l2({from:new Date(r[0])});let t=Hs(r);return new l2({from:t[0],to:t[t.length-1]})}function Ep(r){let t=[];return r.from&&t.push(new Date(r.from)),r.to&&t.push(new Date(r.to)),t}function Hs(r){if(!r.length)return[];if(r.length===1)return[new Date(r[0])];let t=Ms(r.slice().map(e=>new Date(e)));return[new Date(t[0]),new Date(t[t.length-1])]}function Ls(r,t,e){return!t||!e?[]:r.filter(a=>Nu(a,t,e))}function K4(r){let t=`${r.length} event${r.length===1?"":"s"}`,e=r.map(a=>a.label).join(", ");return e!=null&&e.length&&(t+=`: ${e}`),t}function Ru(r){var a,o;let t=new Date;return((o=(a=r.match(/-?[0-9]*[a-zA-Z]/g))==null?void 0:a.map(n=>n.trim()))!=null?o:[]).forEach(n=>{let i=n.slice(-1),l=+n.slice(0,-1);switch(i){case"y":t.setFullYear(t.getFullYear()+l);break;case"m":t.setMonth(t.getMonth()+l);break;case"w":t.setDate(t.getDate()+l*7);break;case"d":t.setDate(t.getDate()+l);break}}),t.setHours(0,0,0,0),t}function Cp(r){let t=r.split(":");if((t==null?void 0:t.length)<2)return{min:1970,max:1970};let e=new Date().getFullYear(),a=t.slice(0,2).map(o=>o.startsWith("-")?e-+o.substring(1):o.startsWith("+")?e+ +o.substring(1):+o);return{min:a[0],max:a[1]}}function zp(r){var n,i,l,h,c,d,u,_;let t=(i=(n=r.min)==null?void 0:n.getFullYear())!=null?i:0,e=(h=(l=r.max)==null?void 0:l.getFullYear())!=null?h:0,a=(d=(c=r.min)==null?void 0:c.getMonth())!=null?d:-1,o=(_=(u=r.max)==null?void 0:u.getMonth())!=null?_:12;return[...Array(12).keys()].map(L=>{let C=r.min?r.selectedYear<t||r.selectedYear===t&&L<a:!1,A=r.max?r.selectedYear>e||r.selectedYear===e&&L>o:!1;return{value:L,label:aa(L,"long",r.locale),selected:L===r.selectedMonth,disabled:C||A}})}function Ap(r){let t=[],e=r.yearInView%m.numbers.YEARS_IN_VIEW,a=r.yearInView-e;for(let o=a;o<a+m.numbers.YEARS_IN_VIEW;o++)t.push({value:o,label:u0(o,"numeric",r.locale),selected:o===r.selectedYear,disabled:o<r.min||o>r.max});return t}function Bp(r){let t=[];for(let e=r.min;e<=r.max;e++)t.push({value:e,label:u0(e,"numeric",r.locale),selected:e===r.selectedYear});return t}function uo(r,t){return t.some(e=>f2(e,r))}function ct(r,t){return!!(t.minDate&&r<t.minDate||t.maxDate&&r>t.maxDate||t.otherMonth||t.disabledDates.some(e=>f2(e,r))||t.disabledDaysOfWeek.includes(r.getDay())||t.builder&&t.builder(r))}function yr(r,t){return t.findIndex(e=>f2(e,r))}function Is(r,t,e){let a=t.filter(o=>f2(o.date,r));if(e){let o=e(r);o&&(rt(o)?a.push(...o):a.push(o))}return a}function Tp(r,t){if(!r.length)return[];let e=new Date(r[0]),a=r[r.length-1],o=[];for(;e<=a;)(!t||!ct(e,t))&&o.push(new Date(e)),e.setDate(e.getDate()+1);return o}function q4(r){let t=null;return typeof r=="string"&&!r.length&&(r=null),r!=null&&(gt(new Date(r))?t=new Date(r):r.length&&(t=Ru(r)),t==null||t.setHours(0,0,0,0)),t}function $4(r,t,e){return e||!L2(r).length||!!(t==="date"&&xr(r))||!!(t!=="date"&&Hp(r,m.ids.MENU))}var Vs=class extends I{constructor(t){super(t),this._container=g(t,m.selectors.CALENDAR),this._dateView=g(t,m.selectors.DATE_VIEW),this._dayRow=g(t,m.selectors.DAY_ROW),this._dateGrid=g(t,m.selectors.DATE_GRID),this._menu=g(t,m.selectors.MENU)}toggleContainerAttribute(t,e,a){K(this._container,t,e,a)}registerMonthButtonListener(t){let e=this._container.querySelector(m.selectors.MONTH_BUTTON);e==null||e.addEventListener("click",t)}unregisterMonthButtonListener(t){let e=this._container.querySelector(m.selectors.MONTH_BUTTON);e==null||e.removeEventListener("click",t)}registerYearButtonListener(t){let e=this._container.querySelector(m.selectors.YEAR_BUTTON);e==null||e.addEventListener("click",t)}unregisterYearButtonListener(t){let e=this._container.querySelector(m.selectors.YEAR_BUTTON);e==null||e.removeEventListener("click",t)}registerMenuListener(t){this._menu.addEventListener(T.events.SELECT,t)}unregisterMenuListener(t){this._menu.removeEventListener(T.events.SELECT,t)}registerMenuFocusChangeEventListener(t){this._menu.addEventListener(T.events.FOCUS_CHANGE,t)}unregisterMenuFocusChangeEventListener(t){this._menu.addEventListener(T.events.FOCUS_CHANGE,t)}registerNextButtonListener(t){let e=this._container.querySelector(m.selectors.NEXT_BUTTON);e==null||e.addEventListener("click",t)}unregisterNextButtonListener(t){let e=this._container.querySelector(m.selectors.NEXT_BUTTON);e==null||e.removeEventListener("click",t)}registerPreviousButtonListener(t){let e=this._container.querySelector(m.selectors.PREVIOUS_BUTTON);e==null||e.addEventListener("click",t)}unregisterPreviousButtonListener(t){let e=this._container.querySelector(m.selectors.PREVIOUS_BUTTON);e==null||e.removeEventListener("click",t)}registerClearButtonListener(t){let e=this._container.querySelector(m.selectors.CLEAR_BUTTON);e==null||e.addEventListener("click",t)}unregisterClearButtonListener(t){let e=this._container.querySelector(m.selectors.CLEAR_BUTTON);e==null||e.removeEventListener("click",t)}registerTodayButtonListener(t){let e=this._container.querySelector(m.selectors.TODAY_BUTTON);e==null||e.addEventListener("click",t)}unregisterTodayButtonListener(t){let e=this._container.querySelector(m.selectors.TODAY_BUTTON);e==null||e.removeEventListener("click",t)}registerDateClickListener(t){this._dateGrid.addEventListener("click",t)}unregisterDateClickListener(t){this._dateGrid.removeEventListener("click",t)}registerKeydownListener(t){this._container.addEventListener("keydown",t)}registerHoverListener(t){this._dateGrid.addEventListener("mouseover",t)}unregisterHoverListener(t){this._dateGrid.removeEventListener("mouseover",t)}registerPreventFocusListener(t){this._container.addEventListener("mousedown",t)}unregisterPreventFocusListener(t){this._container.removeEventListener("mousedown",t)}setContainerClass(t,e){this._container.classList.toggle(t,e)}setHeader(){let t=this._container.querySelector(m.selectors.ACCESSIBLE_HEADER);t==null||t.remove();let e=this._container.querySelector(m.selectors.HEADER);e?e.replaceWith(U4()):this._container.prepend(U4())}removeHeader(){let t=this._container.querySelector(m.selectors.HEADER);t==null||t.remove();let e=this._container.querySelector(m.selectors.ACCESSIBLE_HEADER);e?e.replaceWith(W4()):this._container.prepend(W4())}setNextButtonDisabled(t){let e=this._container.querySelector(m.selectors.NEXT_BUTTON);e==null||e.toggleAttribute("disabled",t)}setPreviousButtonDisabled(t){let e=this._container.querySelector(m.selectors.PREVIOUS_BUTTON);e==null||e.toggleAttribute("disabled",t)}setNextButtonLabel(t){let e="",a="";switch(t){case"date":e=m.strings.DEFAULT_NEXT_MONTH_BUTTON_TEXT,a=m.slots.NEXT_MONTH_BUTTON_TEXT;break;case"month":e=m.strings.DEFAULT_NEXT_YEAR_BUTTON_TEXT,a=m.slots.NEXT_YEAR_BUTTON_TEXT;break;case"year":e=m.strings.DEFAULT_NEXT_YEARS_BUTTON_TEXT,a=m.slots.NEXT_YEARS_BUTTON_TEXT;break}let o=this._container.querySelector(m.selectors.NEXT_BUTTON_TOOLTIP);if(o){let n=document.createElement("slot");n.name=a,n.innerText=e,o.innerHTML=n.outerHTML}}setPreviousButtonLabel(t){let e="",a="";switch(t){case"date":e=m.strings.DEFAULT_PREVIOUS_MONTH_BUTTON_TEXT,a=m.slots.PREVIOUS_MONTH_BUTTON_TEXT;break;case"month":e=m.strings.DEFAULT_PREVIOUS_YEAR_BUTTON_TEXT,a=m.slots.PREVIOUS_YEAR_BUTTON_TEXT;break;case"year":e=m.strings.DEFAULT_PREVIOUS_YEARS_BUTTON_TEXT,a=m.slots.PREVIOUS_YEARS_BUTTON_TEXT;break}let o=this._container.querySelector(m.selectors.PREVIOUS_BUTTON_TOOLTIP);if(o){let n=document.createElement("slot");n.name=a,n.innerText=e,o.innerHTML=n.outerHTML}}setMonthButtonPressed(t){let e=this._container.querySelector(m.selectors.MONTH_BUTTON);e&&(e.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(m.classes.MONTH_MENU_OPEN,t))}setYearButtonPressed(t){let e=this._container.querySelector(m.selectors.YEAR_BUTTON);e&&(e.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(m.classes.YEAR_MENU_OPEN,t))}setMonth(t,e){let a=this._container.querySelector(m.selectors.MONTH_BUTTON);if(a){let n=fp(t,e);a.replaceChildren(n[0],n[1]);return}let o=this._container.querySelector(m.selectors.ACCESSIBLE_MONTH);o&&(o.textContent=aa(t,"long",e))}setYear(t,e){let a=this._container.querySelector(m.selectors.YEAR_BUTTON);if(a){let n=xp(t,e);a.replaceChildren(n[0],n[1]);return}let o=this._container.querySelector(m.selectors.ACCESSIBLE_YEAR);o&&(o.textContent=u0(t,"numeric",e))}setFooter(){this._container.querySelector(m.selectors.FOOTER)||this._container.appendChild(bp())}removeFooter(){var e;let t=this._container.querySelector(m.selectors.FOOTER);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setClearButton(){let t=this._container.querySelector(m.selectors.FOOTER);if(!t)return;t.querySelector(m.selectors.CLEAR_BUTTON)||t.prepend(yp())}removeClearButton(){var e;let t=this._container.querySelector(m.selectors.CLEAR_BUTTON);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setTodayButton(){let t=this._container.querySelector(m.selectors.FOOTER);if(!t)return;t.querySelector(m.selectors.TODAY_BUTTON)||t.appendChild(Mp())}removeTodayButton(){var e;let t=this._container.querySelector(m.selectors.TODAY_BUTTON);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setDays(t,e){r2(this._dayRow),t.forEach(a=>{let o=mp(a,e==null?void 0:e.locale);e!=null&&e.builder&&(o=e.builder(a,o)),this._dayRow.appendChild(o)})}setDates(t,e){r2(this._dateGrid),Vp(t).forEach((a,o)=>{let n=gp(a,o,e);this._dateGrid.appendChild(n)})}replaceDate(t,e){let a=this._dateGrid.querySelector(`#${at(t.date)}`);if(a){let o=F4(t,e==null?void 0:e.locale);e!=null&&e.builder?a.replaceWith(e.builder(t,o)):a.replaceWith(o)}}replaceDateWithSpacer(t){let e=this._dateGrid.querySelector(`#${at(t)}`);e==null||e.replaceWith(bs(t))}setDateDisabled(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`);a&&(a.toggleAttribute("disabled",e),a.setAttribute("aria-disabled",e.toString()))}setDateSelected(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`);a&&(a.classList.toggle(m.classes.DATE_SELECTED,e),a.setAttribute("aria-selected",e.toString()))}setWeekend(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`),o=a==null?void 0:a.querySelector(m.selectors.DATE_INNER);o&&No(o,"part",m.parts.WEEKEND,e)}appendDateAttribute(t,e,a){let o=this._dateGrid.querySelector(`#${at(t)}`);o&&Ua(o,e,a)}setMultiple(t){this._dateView.setAttribute("aria-multiselectable",t.toString())}setDateViewHidden(t){K(this._dateView,t,"aria-hidden",t.toString()),this.setAllDatesUnfocusable()}setRange(t){this._dateGrid.querySelectorAll(m.selectors.RANGE).forEach(a=>a.classList.remove(m.classes.RANGE)),t&&t.forEach(a=>{let o=this._dateGrid.querySelector(`#${at(a)}`);o==null||o.classList.add(m.classes.RANGE)})}setRangeStart(t){let e=this._dateGrid.querySelector(m.selectors.RANGE_START);if(e==null||e.classList.remove(m.classes.RANGE_START),!t)return;let a=this._dateGrid.querySelector(`#${at(t)}`);a==null||a.classList.add(m.classes.RANGE_START)}setRangeEnd(t){let e=this._dateGrid.querySelector(m.selectors.RANGE_END);if(e==null||e.classList.remove(m.classes.RANGE_END),!t)return;let a=this._dateGrid.querySelector(`#${at(t)}`);a==null||a.classList.add(m.classes.RANGE_END)}setActiveDate(t,e,a){let o=t.toDateString();this._dateGrid.querySelectorAll(m.selectors.DATE).forEach(i=>{let l=i.getAttribute(m.attributes.DATA_DATE)===o;G4(i,l?0:-1,e,a)})}setAllDatesUnfocusable(){this._dateGrid.querySelectorAll(m.selectors.DATE).forEach(e=>G4(e,-1,!1,!0))}setDateDescription(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`);a&&K(a,!!e,e)}setDateTooltip(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`);if(!a)return;let o=a.querySelector(m.selectors.TOOLTIP);o?e!=null&&e.length?o.textContent=e:o.remove():e!=null&&e.length&&a.prepend(_p(e))}setEventWrapperOnDate(t,e){let a=this._dateGrid.querySelector(`#${at(t)}`);if(!a)return;let o=a.querySelector(m.selectors.EVENT_WRAPPER);o?e?r2(o):o.remove():e&&a.appendChild(wp(t))}setEvent(t,e){let a=this._dateGrid.querySelector(`#${R4(t.date)}`);a==null||a.appendChild(up(t,e))}openMenuAsGrid(t,e){this._menu.isConnected&&this._menu.openAsGrid(t,e)}openMenuAsList(t,e){this._menu.openAsList(t,e)}closeMenu(){this._menu.close()}setMenuAnimation(t){this._menu.animationType=t}animateIntoSelectionMenu(t,e,a){this._menu.animateIn(t,e,a)}moveMenuFocusDown(){this._menu.moveFocusDown()}moveMenuFocusBackward(){return this._menu.moveFocusBackward()}moveMenuFocusForward(){return this._menu.moveFocusForward()}moveMenuFocusUp(){this._menu.moveFocusUp()}selectFocusedMenuItem(){this._menu.selectFocusedItem()}setPreventFocusOnMenu(t){this._menu.preventFocus=t}};var Es=class{constructor(t){this._adapter=t;this._dates=[];this._month=new Date().getMonth();this._year=new Date().getFullYear();this._showToday=!0;this._showOtherMonths=!1;this._fixedHeight=!1;this._events=[];this._value=[];this._mode="single";this._readonly=!1;this._selectionFollowsMonth=!1;this._rangeSelectionState="none";this._allowSingleDateRange=!0;this._min=null;this._max=null;this._minAttribute=null;this._maxAttribute=null;this._disabledDates=[];this._disabledDaysOfWeek=[];this._constrainToEnabled=!0;this._showHeader=!0;this._clearButton=!1;this._todayButton=!1;this._view="date";this._menuAnimation="scale";this._menuYear=null;this._listYears=!0;this._menuIncludedYear=new Date().getFullYear();this._menuYearsInView=null;this._yearRange=`-${m.numbers.DEFAULT_MIN_YEAR_OFFSET}:+${m.numbers.DEFAULT_MAX_YEAR_OFFSET}`;this._weekendDays=null;this._localeFirstDayOfWeek=0;this._localeWeekendDays=[];this._rtl=!1;this._preventFocus=!1;this._isInitialized=!1;this._clearButtonListener=()=>this._onClearClicked(),this._dateClickListener=e=>this._onDateClick(e),this._keydownListener=e=>this._onKeydown(e),this._hoverListener=e=>this._onHover(e),this._menuFocusChangeListener=e=>this._onMenuFocusChange(e),this._menuListener=e=>this._onMenuSelect(e),this._monthButtonListener=()=>this._onMonthButtonClicked(),this._nextButtonListener=()=>this._onNextButtonClicked(),this._preventFocusListener=e=>e.preventDefault(),this._previousButtonListener=()=>this._onPreviousButtonClicked(),this._todayButtonListener=()=>this._onTodayClicked(),this._yearButtonListener=()=>this._onYearButtonClicked()}initialize(){this._adapter.registerMenuListener(this._menuListener),this._adapter.registerMenuFocusChangeEventListener(this._menuFocusChangeListener),this._adapter.registerKeydownListener(this._keydownListener),this._applyMin(),this._applyMax(),this._applyFixedHeight(),this._applyReadOnly(),this._applyShowToday(),this._applyPreventFocus(),this._applyShowHeader(),this._applyMonth(),this._applyYear(),this._applyListYears(),this._applyMenuAnimation(),this._applyLocale(),this._applyClearButton(),this._applyTodayButton(),this._applyFirstDayOfWeek(),this._applyShowOtherMonths(),this._createDateView(),this._applyConstrainToEnabled(),this._applyAllowSingleDateRange(),this._applyMode(),this._applyYearRange(),this._applySelectionFollowsMonth(),this._isInitialized=!0}destroy(){this._isInitialized=!1}_onMonthButtonClicked(){this._toggleMonthMenu()}_toggleMonthMenu(t=!1){this._view!=="month"?this._openMonthMenu(t):this._closeMenu(!1,t)}_onYearButtonClicked(){this._toggleYearMenu()}_toggleYearMenu(t=!1){this._view!=="year"?this._openYearMenu(t):this._closeMenu(!1,t)}_onMenuFocusChange(t){this._emitFocusChangeEvent(t.detail)}_onMenuSelect(t){switch(this._view){case"month":this._onMonthSelected(t.detail);break;case"year":this._onYearSelected(t.detail);break}}_onNextButtonClicked(){this._view==="date"?(this._goToNextMonth(),this._setFocusInMonth(1,!1)):this._view==="month"?this._goToNextYear():this._goToNextSetOfYears()}_onPreviousButtonClicked(){this._view==="date"?(this._goToPreviousMonth(),this._setFocusInMonth(2,!1)):this._view==="month"?this._goToPreviousYear():this._goToPreviousSetOfYears()}_onHover(t){if(this._mode==="range"){let e=xr(t,!1);if(!e)return;let a=new Date(Date.parse(e.getAttribute(m.attributes.DATA_DATE)));ht(a,this._month,this._year)&&this._setRangePreview(a)}}_onDateClick(t){let e=xr(t,!1);if(!e)return;let a=e.getAttribute(m.attributes.DATA_DATE);if(!a)return;let o=new Date(a);ht(o,this._month,this._year)&&(this._focusedDate=o,this._beforeDateSelected(o)),this._resumeTabindexOnDate(!1)}_onKeydown(t){switch(t.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this._handleArrowKey(t);break;case"Home":case"End":case"PageUp":case"PageDown":this._handleNavigationKey(t);break;case" ":case"Enter":this._handleEnterOrSpaceKey(t);break;case"m":case"M":t.preventDefault(),this._toggleMonthMenu(!0);break;case"y":case"Y":t.preventDefault(),this._toggleYearMenu(!0);break;case"t":case"T":case"n":case"N":t.preventDefault(),this.today();break;case"Delete":case"Backspace":t.preventDefault(),this._deselectAllDates();break;case"Escape":this._view!=="date"&&(t.preventDefault(),t.stopPropagation(),this._closeMenu(!1,!0));break}}_handleArrowKey(t){if(!$4(t,this._view,this._preventFocus))return;t.preventDefault();let e;switch(t.key){case"ArrowLeft":e=this._rtl?"next":"previous";break;case"ArrowRight":e=this._rtl?"previous":"next";break;case"ArrowUp":e="up";break;case"ArrowDown":e="down";break}switch(e){case"previous":this._view==="date"?this._moveFocusToPreviousDate(!0):!this._adapter.moveMenuFocusBackward()&&this._canGoBackward()&&(this._view==="month"?this._goToPreviousYear(!0):this._goToPreviousSetOfYears(!0));break;case"next":this._view==="date"?this._moveFocusToNextDate(!0):!this._adapter.moveMenuFocusForward()&&this._canGoForward()&&(this._view==="month"?this._goToNextYear(!0):this._goToNextSetOfYears(!0));break;case"up":this._view==="date"?this._moveFocusToPreviousWeek(!0):this._adapter.moveMenuFocusUp();break;case"down":this._view==="date"?this._moveFocusToNextWeek(!0):this._adapter.moveMenuFocusDown();break}this._mode==="range"&&this._setRangePreview(this._focusedDate)}_handleNavigationKey(t){switch(t.preventDefault(),t.key){case"Home":if(this._view!=="date")break;t.shiftKey?this._moveFocusToFirstOfMonth(!0):this._moveFocusToFirstOfWeek(!0);break;case"End":if(this._view!=="date")break;t.shiftKey?this._moveFocusToLastOfMonth(!0):this._moveFocusToLastOfWeek(!0);break;case"PageUp":this._view==="date"?t.shiftKey?this._moveFocusToPreviousYear(!0):this._moveFocusToPreviousMonth(!0):this._view==="month"&&!t.shiftKey&&this._canGoBackward()?this._goToPreviousYear(!0):this._view==="year"&&!t.shiftKey&&this._canGoBackward()&&this._goToPreviousSetOfYears(!0);break;case"PageDown":this._view==="date"?t.shiftKey?this._moveFocusToNextYear(!0):this._moveFocusToNextMonth(!0):this._view==="month"&&!t.shiftKey&&this._canGoForward()?this._goToNextYear(!0):this._view==="year"&&!t.shiftKey&&this._canGoForward()&&this._goToNextSetOfYears(!0);break}}_handleEnterOrSpaceKey(t){if($4(t,this._view,this._preventFocus))switch(t.preventDefault(),this._view){case"date":if(this._readonly)break;this._setSelectOnFocusedDate();break;case"month":case"year":this._adapter.selectFocusedMenuItem();break}}_onMonthSelected(t){this._year!==this._menuYear&&this._menuYear!=null&&(this._year=this._menuYear,this._setYear()),this._month=t,this._setMonth(!0),this._trySetValueMonthAndYear(this._month,this._year,"month"),this._closeMenu(!0)}_onYearSelected(t){this._year=t,this._setYear(!0),this._trySetValueMonthAndYear(this._month,this._year,"year"),this._closeMenu(!0)}_onClearClicked(){this.clear()}_onTodayClicked(){this.today()}_trySetValueMonthAndYear(t,e,a="date"){var i;if(!this.selectionFollowsMonth||this._mode!=="single"||!((i=this._value)!=null&&i.length))return;let o=new Date(this._value[0]),n=m3(t,e);o.setDate(Math.min(o.getDate(),n)),o.setFullYear(e),o.setMonth(t),!ct(o,this._getDisabledDateParams())&&this._beforeDateSelected(o,a)}_setInitialDateFocus(t=!1){let e=new Date;if(ht(e,this._month,this._year)&&!ct(e,this._getDisabledDateParams(!1))){this._setFocusedDate(e,t);return}let a=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(a,1,!1,!0,!0),t)}_resumeTabindexOnDate(t){return ht(this._focusedDate,this._month,this._year)?(this._adapter.setActiveDate(this._focusedDate,t,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate),!0):!1}_moveFocusToNextDate(t){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate),t)}_moveFocusToPreviousDate(t){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate),t)}_moveFocusToNextWeek(t){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate,7,!0),t)}_moveFocusToPreviousWeek(t){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate,7,!0),t)}_moveFocusToFirstOfWeek(t){this._setFocusedDate(this._getFirstEnabledDayOfWeek(this._focusedDate,!0),t)}_moveFocusToLastOfWeek(t){this._setFocusedDate(this._getLastEnabledDayOfWeek(this._focusedDate,!0),t)}_moveFocusToFirstOfMonth(t){let e=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(e,1,!1,!0),t)}_moveFocusToLastOfMonth(t){let e=new Date(this._year,this._month+1,0);this._setFocusedDate(this._getPreviousEnabledDate(e,1,!1,!0),t)}_moveFocusToNextMonth(t){let e=yr(this._focusedDate,this._dates),a=(this._month+1)%12,o=a===0?this._year+1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(e,a,o),t)}_moveFocusToPreviousMonth(t){let e=yr(this._focusedDate,this._dates),a=this._month===0?11:this._month-1,o=a===11?this._year-1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(e,a,o),t)}_moveFocusToNextYear(t){let e=yr(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(e,this._month,this._year+1),t)}_moveFocusToPreviousYear(t){let e=yr(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(e,this._month,this._year-1),t)}_setFocusInMonth(t,e){switch(t){case 1:this._moveFocusToFirstOfMonth(e);break;case 2:this._moveFocusToLastOfMonth(e);break;default:this._resumeTabindexOnDate(e);break}}_setSelectOnFocusedDate(){ht(this._focusedDate,this._month,this._year)&&!ct(this._focusedDate,this._getDisabledDateParams(!1))&&this._beforeDateSelected(this._focusedDate)}_emitFocusChangeEvent(t){let e={type:this._view,value:t};switch(this._view){case"date":e.selected=uo(t,this._value),e.text=t.toLocaleDateString(this.locale,{month:"long",day:"2-digit",year:"numeric"});break;case"month":e.selected=this._month===t,e.text=aa(t,"long");break;case"year":e.selected=this._year===t,e.text=u0(t,"numeric");break}this._adapter.emitHostEvent(m.events.FOCUS_CHANGE,e)}_getPreviousEnabledDate(t,e=1,a=!1,o=!1,n=!1){let i=this._getDisabledDateParams(),l=new Date(t);if(o&&!ct(l,i))return l;let h=t.getMonth(),c=!1;do l.setDate(l.getDate()-e),a&&(e=1),(n&&l.getMonth()!==h||this._min&&l<this._min)&&(c=!0);while(!c&&ct(l,i));return c?null:l}_getNextEnabledDate(t,e=1,a=!1,o=!1,n=!1){let i=this._getDisabledDateParams(),l=new Date(t);if(o&&!ct(l,i))return l;let h=t.getMonth(),c=!1;do l.setDate(l.getDate()+e),a&&(e=1),(n&&l.getMonth()!==h||this._max&&l>this._max)&&(c=!0);while(!c&&ct(l,i));return c?null:l}_getClosestEnabledDate(t,e=!1,a=!1){if(this._min&&t<this._min)return this._getFirstEnabledDate();if(this._max&&t>this._max)return this._getLastEnabledDate();let o=this._getDisabledDateParams();if(a&&!ct(t,o))return new Date(t);let n=t.getDate(),i,l=!1,h=!1,c=1;for(;!l||!h;){if(!l){if(i=new Date(t),i.setDate(n+c),l=!ht(i,t.getMonth(),t.getFullYear()),!l&&!ct(i,o))return i;this._max&&i>this._max&&(l=!0)}if(!h){if(i=new Date(t),i.setDate(n-c),h=!ht(i,t.getMonth(),t.getFullYear()),!h&&!ct(i,o))return i;this._min&&i<this._min&&(h=!0)}c+=1}return null}_getFirstEnabledDayOfWeek(t,e=!0){let a=br(t),o=this._getDisabledDateParams(e?a.getMonth()!==t.getMonth()||a.getFullYear()!==t.getFullYear():void 0),n=0;for(;n<7&&ct(a,o);)a.setDate(a.getDate()+1),o.otherMonth=e?a.getMonth()!==t.getMonth()||a.getFullYear()!==t.getFullYear():void 0,n+=1;return n<7?a:null}_getLastEnabledDayOfWeek(t,e=!0){let a=Lp(t),o=this._getDisabledDateParams(e?a.getMonth()!==t.getMonth()||a.getFullYear()!==t.getFullYear():void 0),n=0;for(;n<7&&ct(a,o);)a.setDate(a.getDate()-1),o.otherMonth=e?a.getMonth()!==t.getMonth()||a.getFullYear()!==t.getFullYear():void 0,n+=1;return n<7?a:null}_getDateAtIndexInMonth(t,e,a){var n;let o=Y4(e,a,(n=this._firstDayOfWeek)!=null?n:this._localeFirstDayOfWeek);return this._min&&o[t]<this._min?this._getFirstEnabledDate():this._max&&o[t]>this._max?this._getLastEnabledDate():ht(o[t],e,a)?this._getClosestEnabledDate(o[t],!0):t<20?this._getNextEnabledDate(o[t],7,!0):this._getPreviousEnabledDate(o[t],7,!0)}_getFirstEnabledDate(){return this._min?this._getNextEnabledDate(this._min,1,!1,!0):null}_getLastEnabledDate(){return this._max?this._getPreviousEnabledDate(this._max,1,!1,!0):null}_setFocusedDate(t,e){if(!t)return;let a=this._month!==t.getMonth(),o=this._year!==t.getFullYear();(a||o)&&(a&&(this._month=t.getMonth(),this._setMonth()),o&&(this._year=t.getFullYear(),this._setYear()),this._resetDateGrid()),this._focusedDate=t,this._adapter.setActiveDate(this._focusedDate,e,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_getDisabledDateParams(t){return{builder:this._disabledDateBuilder,disabledDates:this._disabledDates,disabledDaysOfWeek:this._disabledDaysOfWeek,maxDate:this._max,minDate:this._min,otherMonth:t}}_createDateView(){this._resetDateGrid(),(!this._focusedDate||!this._resumeTabindexOnDate(!1))&&this._setInitialDateFocus()}_openMonthMenu(t=!1){this._view="month",this._menuYear==null&&(this._menuYear=this._year),this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!0),this._adapter.setYearButtonPressed(!1)),this._adapter.openMenuAsGrid(this._getMonthsForMenu(),t),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(m.events.VIEW_CHANGE,this._view)}_openYearMenu(t=!1){var e;this._view="year",this._menuIncludedYear=(e=this._menuYear)!=null?e:this._year,this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!0)),this._listYears?this._adapter.openMenuAsList(this._getYearsForMenu(),t):this._adapter.openMenuAsGrid(this._getYearsForMenu(),t),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(m.events.VIEW_CHANGE,this._view)}_getMonthsForMenu(){var e;let t={locale:this._locale,max:this._max,min:this._min,selectedMonth:this._year===this._menuYear?this._month:-1,selectedYear:(e=this._menuYear)!=null?e:this._year};return zp(t)}_getYearsForMenu(){let t=this._min?this._min.getFullYear():this._minYear,e=this._max?this._max.getFullYear():this._maxYear,a={locale:this._locale,max:e,min:t,selectedYear:this._year,yearInView:this._menuIncludedYear},o=this._listYears?Bp(a):Ap(a);return this._menuYearsInView={min:o[0].value,max:o[o.length-1].value},o}_closeMenu(t,e=!1){this._view="date",this._menuYear=null,this._adapter.closeMenu(),this._adapter.setDateViewHidden(!1),this._adapter.setYear(this._year,this._locale),t&&this._resetDateGrid(),this._showHeader&&(this._setNavButtonLabels(),this._setNavigationButtonStates(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!1)),this._resumeTabindexOnDate(e)||this._setInitialDateFocus(e),this._adapter.emitHostEvent(m.events.VIEW_CHANGE,this._view)}_setNavButtonLabels(){this._adapter.setPreviousButtonLabel(this._view),this._adapter.setNextButtonLabel(this._view)}_resetDateGrid(){var e;this._dates=Y4(this._month,this._year,(e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek);let t=this._dates.map(a=>this._getDateConfig(a));this._adapter.setDates(t,{builder:this._dateBuilder,locale:this._locale,showOtherMonths:this._showOtherMonths}),this._setNavigationButtonStates(),this._applyWeekendDays(),this._applyEvents(),this._mode==="range"&&(this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_getDateConfig(t){let e=ht(t,this._month,this._year);return{date:new Date(t),selected:uo(t,this._value),today:Ip(t),thisMonth:e,disabled:ct(t,this._getDisabledDateParams(!e))}}_getCalendarDate(t){return{date:new Date(t),selected:uo(t,this._value),events:Is(t,this._events,this._eventBuilder)}}_setEventsOnDate(t){var o;if(!this._showOtherMonths&&!ht(t,this._month,this._year)){this._adapter.setEventWrapperOnDate(t,!1);return}let e=Is(t,this._events,this._eventBuilder);this._adapter.setEventWrapperOnDate(t,!!e.length),e.forEach((n,i)=>{i>2||this._adapter.setEvent(n,i===2&&e.length>3)});let a=e.length?K4(e):"";this._tooltipBuilder&&(a=(o=this._tooltipBuilder(this._getCalendarDate(t),a))!=null?o:""),this._adapter.setDateTooltip(t,a)}_beforeDateSelected(t,e="date"){this._dateSelectCallback?Promise.resolve(this._dateSelectCallback(this._getCalendarDate(t))).then(a=>{a&&this._onDateSelected(t,void 0,e)}):this._onDateSelected(t,void 0,e)}_onDateSelected(t,e,a="date"){if(this._mode==="range"&&this._emitRangeSelectionEvent(t)){this._applyRangeSelection(t),this._rangeSelectionStore=void 0;return}let o=uo(t,this._value),n={date:new Date(t),selected:o,type:a};this._adapter.emitHostEvent(m.events.DATE_SELECT,n,!0,!0)&&(this._rangeSelectionStore=void 0,this._mode==="single"?o&&!e||e===!1?this._deselectDate(t):(e===void 0||e===!0)&&(this._value.length&&this._deselectDate(this._value[0]),this._selectDate(t)):o&&!e||e===!1?this._deselectDate(t):(e===void 0||e===!0)&&this._selectDate(t),Ms(this._value))}_emitRangeSelectionEvent(t){let e={date:new Date(t),selected:uo(t,this._value),type:"date"};switch(this._rangeSelectionState){case"none":case"to":e.range=Ba([t]),e.rangeSelectionState="from";break;case"from":f2(t,this._value[0])?this._allowSingleDateRange?(e.range=Ba([this._value[0],t]),e.rangeSelectionState="to"):(e.range=Ba([]),e.rangeSelectionState="none"):t<this._value[0]?(e.range=Ba([t]),e.rangeSelectionState="from"):(e.range=Ba([this._value[0],t]),e.rangeSelectionState="to");break}return this._adapter.emitHostEvent(m.events.DATE_SELECT,e,!0,!0)}_applyRangeSelection(t){switch(this._rangeSelectionState){case"none":case"to":this._deselectAllDates(),this._selectDate(t),this._adapter.setRange(null),this._adapter.setRangeStart(t),this._rangeSelectionState="from";break;case"from":f2(t,this._value[0])?this._allowSingleDateRange?(this._value.push(t),this._rangeSelectionState="to"):(this._deselectDate(t),this._rangeSelectionState="none"):t<this._value[0]?(this._deselectDate(this._value[0]),this._selectDate(t),this._adapter.setRangeStart(t)):(this._selectDate(t),this._setRangePreview(t),this._rangeSelectionState="to");break}}_setRangePreview(t){switch(this._rangeSelectionState){case"from":if(!t)return;t<this._value[0]?this._adapter.setRange(null):(this._adapter.setRange(Ls(this._dates,this._value[0],t)),this._adapter.setRangeEnd(t));break;case"to":this._adapter.setRange(Ls(this._dates,this._value[0],this._value[1])),this._adapter.setRangeEnd(this._value[1]);break}}_clearRangePreview(){this._adapter.setRange(null),this._adapter.setRangeStart(null),this._adapter.setRangeEnd(null)}_selectDate(t){this._value.push(t),this._focusedDate=t,this._adapter.setDateSelected(t,!0)}_deselectDate(t){let e=this._value.findIndex(a=>f2(a,t));e>-1&&this._value.splice(e,1),this._adapter.setDateSelected(t,!1)}_deselectAllDates(){this._value.forEach(t=>this._adapter.setDateSelected(t,!1)),this._clearRangePreview(),this._value=[]}_goToDate(t,e){let a=t.getFullYear(),o=t.getMonth();this._focusedDate=t,this._month=o,this._setMonth(),this._year=a,this._setYear(),this._view!=="date"?this._closeMenu(!1,e):this._resetDateGrid(),this._adapter.setActiveDate(t,e,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_goToNextMonth(){this._month<11?this._month+=1:(this._month=0,this._year+=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToPreviousMonth(){this._month>0?this._month-=1:(this._month=11,this._year-=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToNextYear(t=!1){this._view==="month"?(this._menuYear&&(this._menuYear+=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"left":"right",t)):(this._year+=1,this._setYear(),this._resetDateGrid())}_goToPreviousYear(t=!1){this._view==="month"?(this._menuYear&&(this._menuYear-=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"right":"left",t)):(this._year-=1,this._setYear(),this._resetDateGrid())}_goToNextSetOfYears(t=!1){this._menuIncludedYear+=m.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"left":"right",t),this._setNavigationButtonStates()}_goToPreviousSetOfYears(t=!1){this._menuIncludedYear-=m.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"right":"left",t),this._setNavigationButtonStates()}_canGoBackward(t){var e;if(!t&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._min||this._min<new Date(this._year,this._month,1);case"month":let a=(e=this._min)==null?void 0:e.getFullYear();return this._menuYear!=null&&(a==null||a<this._menuYear);case"year":return!!this._menuYearsInView&&this._minYear<this._menuYearsInView.min;default:return!1}}_canGoForward(t){var e;if(!t&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._max||this._max>jl(this._month,this._year);case"month":let a=(e=this._max)==null?void 0:e.getFullYear();return this._menuYear!=null&&(a==null||a>this._menuYear);case"year":return!!this._menuYearsInView&&this._maxYear>this._menuYearsInView.max;default:return!1}}_setNavigationButtonStates(){if(this._showHeader){if(!this._constrainToEnabled){this._adapter.setPreviousButtonDisabled(!1),this._adapter.setNextButtonDisabled(!1);return}this._adapter.setPreviousButtonDisabled(!this._canGoBackward()),this._adapter.setNextButtonDisabled(!this._canGoForward())}}_setMonth(t){this._adapter.setMonth(this._month,this._locale),this._adapter.setHostAttribute(m.attributes.MONTH,this._month.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(m.events.MONTH_CHANGE,{month:this._month,userSelected:t!=null?t:!1,year:this._year}))}_setYear(t){this._adapter.setYear(this._year,this._locale),this._adapter.setHostAttribute(m.attributes.YEAR,this._year.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(m.events.MONTH_CHANGE,{month:this._month,userSelected:t!=null?t:!1,year:this._year}))}_setMenuYear(){this._menuYear!=null&&(this._setNavigationButtonStates(),this._adapter.setYear(this._menuYear,this._locale))}_applyAllowSingleDateRange(){this._adapter.toggleHostAttribute(m.attributes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange),this._adapter.setContainerClass(m.classes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange)}_applyClearButton(){this._adapter.toggleHostAttribute(m.attributes.CLEAR_BUTTON,!0,this._clearButton.toString()),this._clearButton?(this._adapter.setFooter(),this._adapter.setClearButton(),this._adapter.registerClearButtonListener(this._clearButtonListener)):(this._adapter.unregisterClearButtonListener(this._clearButtonListener),this._adapter.removeClearButton(),this._todayButton||this._adapter.removeFooter())}_applyConstrainToEnabled(){this._adapter.toggleHostAttribute(m.attributes.CONSTRAIN_TO_ENABLED,!0,this._constrainToEnabled.toString()),this._isInitialized&&this._setNavigationButtonStates()}_applyDateBuilder(){this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyDayBuilder(){var t;this._adapter.setDays(ys((t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale})}_applyDisabledDates(){switch(this._view){case"date":this._dates.forEach(t=>{let e=ht(t,this._month,this._year),a=this._getDisabledDateParams(!e);this._adapter.setDateDisabled(t,ct(t,a))});break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}this._setNavigationButtonStates()}_applyEvents(){this._view==="date"&&this._dates.forEach(t=>{this._setEventsOnDate(t)})}_applyFirstDayOfWeek(){var t,e;this._adapter.toggleHostAttribute(m.attributes.FIRST_DAY_OF_WEEK,k(this._firstDayOfWeek),((t=this._firstDayOfWeek)!=null?t:0).toString()),this._adapter.setDays(ys((e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyFixedHeight(){this._adapter.toggleHostAttribute(m.attributes.FIXED_HEIGHT,this._fixedHeight),this._adapter.setContainerClass(m.classes.FIXED_HEIGHT,this._fixedHeight)}_applyListYears(){this._adapter.toggleHostAttribute(m.attributes.LIST_YEARS,this._listYears),this._isInitialized&&this._view==="year"&&this._openYearMenu()}_applyLocale(){var t;if(this._adapter.toggleHostAttribute(m.attributes.LOCALE,!!this._locale,this._locale),this._adapter.toggleContainerAttribute(!!this._locale,"lang",this._locale),this._localeFirstDayOfWeek=cp(this._locale),this._localeWeekendDays=pp(this._locale),this._applyRtl(),this._isInitialized)switch(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._view){case"date":this._adapter.setDays(ys((t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._resetDateGrid(),this._resumeTabindexOnDate(!1);break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyMenuAnimation(){this._adapter.setHostAttribute(m.attributes.MENU_ANIMATION,this._menuAnimation),this._adapter.setMenuAnimation(this._menuAnimation)}_applyMin(){if(this._adapter.toggleHostAttribute(m.attributes.MIN,!!this._minAttribute,this._minAttribute),this._min){let t=new Date(this._min.getFullYear(),this._min.getMonth(),1),e=new Date(this._year,this._month,1);t>e&&(this._year=this._min.getFullYear(),this._month=this._min.getMonth())}if(this._isInitialized&&(this._applyDisabledDates(),this._min&&this._min>this._focusedDate)){let t=this._getFirstEnabledDate();t&&this._goToDate(t,!1)}}_applyMax(){if(this._adapter.toggleHostAttribute(m.attributes.MAX,!!this._maxAttribute,this._maxAttribute),this._max){let t=new Date(this._max.getFullYear(),this._max.getMonth(),1),e=new Date(this._year,this._month,1);t<e&&(this._year=this._max.getFullYear(),this._month=this._max.getMonth())}if(this._isInitialized&&(this._applyDisabledDates(),this._max&&this._max<this._focusedDate)){let t=this._getLastEnabledDate();t&&this._goToDate(t,!1)}}_applyMode(t){switch(this._mode){case"single":this._applySingleMode();break;case"multiple":this._applyMultipleMode(t==="range");break;case"range":this._applyRangeMode();break}this._mode!=="range"&&(this._rangeSelectionState="none",this._adapter.unregisterHoverListener(this._hoverListener),this._clearRangePreview())}_applySingleMode(){if(this._adapter.setHostAttribute(m.attributes.MODE,"single"),this._adapter.setMultiple(!1),this._value.length>1)for(let t=this._value.length-2;t>=0;t-=1)this._deselectDate(this._value[t])}_applyMultipleMode(t=!1){if(this._adapter.setHostAttribute(m.attributes.MODE,"multiple"),this._adapter.setMultiple(!0),t){let e=Tp(this._value,this._getDisabledDateParams());this._deselectAllDates(),e.forEach(a=>{this._selectDate(a)})}}_applyRangeMode(){var e,a;this._adapter.setHostAttribute(m.attributes.MODE,"range"),this._adapter.setMultiple(!1);let t=Hs(this._value);this._deselectAllDates(),t.forEach(o=>{this._selectDate(o)}),this._rangeSelectionState=this._value[0]?this._value[1]?"to":"from":"none",this._adapter.registerHoverListener(this._hoverListener),this._adapter.setRange(Ls(this._dates,this._value[0],this._value[1])),this._adapter.setRangeStart((e=this._value[0])!=null?e:null),this._adapter.setRangeEnd((a=this._value[1])!=null?a:null)}_applyMonth(){this._setMonth(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyPreventFocus(){this._adapter.toggleHostAttribute(m.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setContainerClass(m.classes.PREVENT_FOCUS,this._preventFocus),this._adapter.setPreventFocusOnMenu(this._preventFocus),this._preventFocus?this._adapter.registerPreventFocusListener(this._preventFocusListener):this._adapter.unregisterPreventFocusListener(this._preventFocusListener),this._isInitialized&&this._view==="date"&&this._resumeTabindexOnDate(!1)}_applyReadOnly(){this._adapter.toggleHostAttribute(m.attributes.READONLY,this._readonly),this._adapter.toggleHostAttribute("aria-readonly",this._readonly,"true"),this._adapter.setContainerClass(m.classes.READONLY,this._readonly),this._readonly?(this._adapter.unregisterDateClickListener(this._dateClickListener),this._adapter.unregisterHoverListener(this._hoverListener)):(this._adapter.registerDateClickListener(this._dateClickListener),this._mode==="range"&&this._adapter.registerHoverListener(this._hoverListener))}_applyRtl(){this._rtl=dp(this._locale),this._adapter.setContainerClass(m.classes.RTL,this._rtl),this._adapter.toggleContainerAttribute(this._rtl,"dir","rtl")}_applySelectionFollowsMonth(){this._adapter.setHostAttribute(m.attributes.SELECTION_FOLLOWS_MONTH,this._selectionFollowsMonth.toString())}_applyShowHeader(){this._adapter.toggleHostAttribute(m.attributes.SHOW_HEADER,this._showHeader,this._showHeader.toString()),this._showHeader?(this._adapter.setHeader(),this._adapter.registerMonthButtonListener(this._monthButtonListener),this._adapter.registerNextButtonListener(this._nextButtonListener),this._adapter.registerPreviousButtonListener(this._previousButtonListener),this._adapter.registerYearButtonListener(this._yearButtonListener),this._setNavButtonLabels()):(this._adapter.unregisterMonthButtonListener(this._monthButtonListener),this._adapter.unregisterNextButtonListener(this._nextButtonListener),this._adapter.unregisterPreviousButtonListener(this._previousButtonListener),this._adapter.unregisterYearButtonListener(this._yearButtonListener),this._adapter.removeHeader()),this._isInitialized&&(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._setNavigationButtonStates())}_applyShowOtherMonths(){if(this._adapter.toggleHostAttribute(m.attributes.SHOW_OTHER_MONTHS,this._showOtherMonths),this._isInitialized&&this._view==="date"){let t=!1;this._dates.forEach((e,a)=>{ht(e,this._month,this._year)||((a===m.numbers.PENULTIMATE_WEEK_BEGIN_INDEX||a===m.numbers.FINAL_WEEK_BEGIN_INDEX)&&(t=!0),this._showOtherMonths&&!t?this._adapter.replaceDate(this._getDateConfig(e),{builder:this._dateBuilder,locale:this._locale}):this._adapter.replaceDateWithSpacer(e),this._setEventsOnDate(e),this._applyWeekendDays())})}}_applyShowToday(){this._adapter.toggleHostAttribute(m.attributes.SHOW_TODAY,this._showToday),this._adapter.setContainerClass(m.classes.SHOW_TODAY,this._showToday)}_applyTodayButton(){this._adapter.toggleHostAttribute(m.attributes.TODAY_BUTTON,!0,this._todayButton.toString()),this._todayButton?(this._adapter.setFooter(),this._adapter.setTodayButton(),this._adapter.registerTodayButtonListener(this._todayButtonListener)):(this._adapter.unregisterTodayButtonListener(this._todayButtonListener),this._adapter.removeTodayButton(),this._clearButton||this._adapter.removeFooter())}_applyTooltipBuilder(){this._view==="date"&&this._dates.forEach(t=>{var o;if(!this._showOtherMonths&&!ht(t,this._month,this._year))return;let e=Is(t,this._events,this._eventBuilder),a=K4(e);this._tooltipBuilder&&(a=(o=this._tooltipBuilder(this._getCalendarDate(t),a))!=null?o:""),this._adapter.setDateTooltip(t,a)})}_applyWeekendDays(){var e;let t=(e=this._weekendDays)!=null?e:this._localeWeekendDays;this._view==="date"&&this._dates.forEach(a=>{let o=a.getDay();this._adapter.setWeekend(a,(this._showOtherMonths||ht(a,this._month,this._year))&&t.includes(o))})}_applyValue(t){t=t.map(e=>new Date(e)),Ms(t),this._deselectAllDates(),t.forEach(e=>this._selectDate(e)),this._mode==="range"&&(this._rangeSelectionState=this._value.length===2?"to":this._value.length===1?"from":"none",this._clearRangePreview(),this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_applyView(){switch(this._adapter.setHostAttribute(m.attributes.VIEW,this._view),this._view){case"date":this._closeMenu();break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyYear(){this._setYear(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyYearRange(){this._adapter.setHostAttribute(m.attributes.YEAR_RANGE,this._yearRange);let t=Cp(this._yearRange);this._minYear=t.min,this._maxYear=t.max,this._view==="year"&&(this._openYearMenu(),this._setNavigationButtonStates())}get activeDate(){return new Date(this._focusedDate)}get allowSingleDateRange(){return this._allowSingleDateRange}set allowSingleDateRange(t){this._allowSingleDateRange!==t&&(this._allowSingleDateRange=t,this._applyAllowSingleDateRange())}get clearButton(){return this._clearButton}set clearButton(t){this._clearButton!==t&&(this._clearButton=t,this._isInitialized&&this._applyClearButton())}get clearCallback(){return this._clearCallback}set clearCallback(t){this._clearCallback=t}get constrainToEnabled(){return this._constrainToEnabled}set constrainToEnabled(t){this._constrainToEnabled!==t&&(this._constrainToEnabled=t,this._isInitialized&&this._applyConstrainToEnabled())}get dateBuilder(){return this._dateBuilder}set dateBuilder(t){this._dateBuilder=t,this._isInitialized&&this._applyDateBuilder()}get dateSelectCallback(){return this._dateSelectCallback}set dateSelectCallback(t){this._dateSelectCallback=t}get dayBuilder(){return this.dayBuilder}set dayBuilder(t){this._dayBuilder=t,this._isInitialized&&this._applyDayBuilder()}get disabledDateBuilder(){return this._disabledDateBuilder}set disabledDateBuilder(t){this._disabledDateBuilder=t,this._isInitialized&&this._applyDisabledDates()}get disabledDates(){let t=this._disabledDates.map(e=>new Date(e));return t.length?t:null}set disabledDates(t){let e=t?rt(t)?t:[t]:[];this._disabledDates=e.map(a=>{let o=new Date(a);return o.setHours(0,0,0,0),o}),this._isInitialized&&this._applyDisabledDates()}get disabledDaysOfWeek(){return this._disabledDaysOfWeek.length?[...this._disabledDaysOfWeek]:null}set disabledDaysOfWeek(t){this._disabledDaysOfWeek=k(t)?rt(t)?t:[t]:[],this._isInitialized&&this._applyDisabledDates()}get eventBuilder(){return this._eventBuilder}set eventBuilder(t){this._eventBuilder=t,this._isInitialized&&this._applyEvents()}get events(){return this._events?[...this._events]:null}set events(t){this._events=t!=null&&t.length?[...t]:[],this._isInitialized&&this._applyEvents()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(t){this._firstDayOfWeek!==t&&(this._firstDayOfWeek=k(t)?+t:t,this._isInitialized&&this._applyFirstDayOfWeek())}get fixedHeight(){return this._fixedHeight}set fixedHeight(t){this._fixedHeight!==t&&(this._fixedHeight=t,this._isInitialized&&this._applyFixedHeight())}get listYears(){return this._listYears}set listYears(t){this._listYears!==t&&(this._listYears=t,this._applyListYears())}get locale(){return this._locale}set locale(t){typeof t=="string"&&!t.length&&(t=void 0),this._locale!==t&&(this._locale=t,this._isInitialized&&this._applyLocale())}get max(){return this._max}set max(t){var e;this._maxAttribute!==t&&(this._maxAttribute=(e=t==null?void 0:t.toString())!=null?e:null,this._max=q4(t),this._applyMax())}get menuAnimation(){return this._menuAnimation}set menuAnimation(t){this._menuAnimation!==t&&(this._menuAnimation=t,this._isInitialized&&this._applyMenuAnimation())}get min(){return this._min}set min(t){var e;this._minAttribute!==t&&(this._minAttribute=(e=t==null?void 0:t.toString())!=null?e:null,this._min=q4(t),this._applyMin())}get mode(){return this._mode}set mode(t){if(this._mode!==t){let e=this._mode;this._mode=t,this._isInitialized&&this._applyMode(e)}}get month(){return this._month}set month(t){if(this._month!==t){let e=isNaN(+t)?this._month:+t;if(this._month===e)return;this._month=+t,this._isInitialized&&this._applyMonth()}}get preventFocus(){return this._preventFocus}set preventFocus(t){this._preventFocus!==t&&(this._preventFocus=t,this._isInitialized&&this._applyPreventFocus())}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._isInitialized&&this._applyReadOnly())}get selectionFollowsMonth(){return this._selectionFollowsMonth}set selectionFollowsMonth(t){this._selectionFollowsMonth!==t&&(this._selectionFollowsMonth=t,this._isInitialized&&this._applySelectionFollowsMonth())}get showHeader(){return this._showHeader}set showHeader(t){this._showHeader!==t&&(this._showHeader=t,this._isInitialized&&this._applyShowHeader())}get showOtherMonths(){return this._showOtherMonths}set showOtherMonths(t){this._showOtherMonths!==t&&(this._showOtherMonths=t,this._isInitialized&&this._applyShowOtherMonths())}get showToday(){return this._showToday}set showToday(t){this._showToday!==t&&(this._showToday=t,this._isInitialized&&this._applyShowToday())}get todayButton(){return this._todayButton}set todayButton(t){this._todayButton!==t&&(this._todayButton=t,this._isInitialized&&this._applyTodayButton())}get todayCallback(){return this._todayCallback}set todayCallback(t){this._todayCallback=t}get tooltipBuilder(){return this._tooltipBuilder}set tooltipBuilder(t){this._tooltipBuilder=t,this._isInitialized&&this._applyTooltipBuilder()}get value(){var e;if(this._mode==="range")return(e=this._rangeSelectionStore)!=null?e:Ba(this._value);let t=this._value.map(a=>new Date(a));return this._mode==="multiple"?t:t.length?t[0]:null}set value(t){let e=[];if(this._rangeSelectionStore=void 0,!t||Array.isArray(t)&&!t.length)this._value=[];else if(Array.isArray(t))switch(this._mode){case"single":e=[t[0]];break;case"multiple":e=t;break;case"range":let a=Hs(t);e.push(a[0]),a.length>1&&e.push(a[1]);break}else gt(new Date(t))?e=[t]:(this._rangeSelectionStore=new l2(t),e=Ep(t));this._applyValue(e)}get view(){return this._view}set view(t){this._view!==t&&(this._view=t,this._applyView())}get weekendDays(){return this._weekendDays?[...this._weekendDays]:null}set weekendDays(t){var e;this._weekendDays=(e=t==null?void 0:t.map(a=>+a))!=null?e:null,this._isInitialized&&this._applyWeekendDays()}get year(){return this._year}set year(t){if(this._year!==t){let e=isNaN(+t)?this._year:+t;if(this._year===e)return;this._year=e,this._isInitialized&&this._applyYear()}}get yearRange(){return this._yearRange}set yearRange(t){this._yearRange!==t&&(this._yearRange=t,this._isInitialized&&this._applyYearRange())}clear(){this._deselectAllDates(),this._clearCallback&&this._clearCallback()}deselectDate(t,e){this._onDateSelected(t,!1),e&&(this._focusedDate=t,this._resumeTabindexOnDate(!0))}goToDate(t,e){this._goToDate(t,e!=null?e:!1)}handleExternalKeyEvent(t){this._onKeydown(t)}layout(){this._applyFirstDayOfWeek(),this._createDateView(),this._applyShowHeader(),this._applyConstrainToEnabled()}selectDate(t,e){this._onDateSelected(t,!0),e&&(this._focusedDate=t,this._resumeTabindexOnDate(!0))}setActiveDate(t,e){return this._dates.some(a=>f2(a,t)&&(this._showOtherMonths||ht(a,this._month,this._year)))?(this._goToDate(t,e!=null?e:!1),!0):!1}today(){let t=new Date;t.setHours(0,0,0,0),this._goToDate(t,!0),this._todayCallback&&this._todayCallback()}toggleDate(t,e){this._onDateSelected(t)}};var Fu='<template><div class="forge-calendar" part="root"><div id="view" class="forge-calendar__view" part="view"><div id="date-view" class="forge-calendar__date-view" role="grid" part="date-view"><div role="rowgroup" part="date-view-container"><div id="day-row" class="forge-calendar__date-view__row" role="row" part="date-view-row"></div></div><div id="date-grid" class="forge-calendar__date-grid" role="rowgroup" part="date-grid-container"></div></div><forge-calendar-menu id="menu" part="calendar-menu"></forge-calendar-menu></div></div></template>',Uu='.forge-calendar{width:var(--forge-calendar-width,100%);height:fit-content;position:relative}.forge-calendar__header{padding:var(--forge-calendar-controls-padding,0);display:flex;align-items:center;justify-content:space-between}.forge-calendar__footer{padding:var(--forge-calendar-controls-padding,0);display:flex;align-items:center;justify-content:space-between}.forge-calendar__view{position:relative}.forge-calendar__date-view{display:block}.forge-calendar__date-view__row{display:grid;grid-template-columns:repeat(7,1fr)}.forge-calendar__date-grid{display:grid}.forge-calendar__day{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);display:flex;justify-content:center;align-items:center;min-width:0;padding:0;font-weight:700;user-select:none}.forge-calendar__day::after{float:left;padding-top:100%;content:""}.forge-calendar__date{margin-top:var(--forge-calendar-row-gap,2px);min-width:0;padding:0;border-radius:50%;position:relative;outline:0;cursor:default;user-select:none}.forge-calendar__date::after{float:left;padding-top:100%;content:""}.forge-calendar__date forge-focus-indicator{--forge-focus-indicator-shape:50%}.forge-calendar__date__inner{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);position:absolute;width:calc(100% - 2px);height:calc(100% - 2px);top:calc(2px / 2);left:calc(2px / 2);display:flex;justify-content:center;align-items:center;border-radius:inherit;box-sizing:border-box}.forge-calendar--show-today .forge-calendar__date--today:not([disabled]){color:var(--forge-theme-primary,#3f51b5);border-color:var(--forge-theme-primary,#3f51b5)}.forge-calendar--show-today .forge-calendar__date--today .forge-calendar__date__inner{border-color:inherit;border-width:1px;border-style:solid;font-weight:700}.forge-calendar--show-today .forge-calendar__date--today.forge-calendar__date--selected{color:var(--forge-theme-on-primary,#fff)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]){cursor:pointer}.forge-calendar__date--selected:not([disabled]) .forge-calendar__date__inner{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar__date--selected[disabled] .forge-calendar__date__inner{background-color:var(--forge-theme-primary-container-minimum,#f7f8fc);color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar__date--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container)}.forge-calendar__date[disabled]{color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar__date-spacer{pointer-events:none}.forge-calendar--fixed-height .forge-calendar__date-spacer{margin-top:var(--forge-calendar-row-gap,2px)}.forge-calendar--fixed-height .forge-calendar__date-spacer::after{float:left;padding-top:100%;content:""}.forge-calendar__range:not(.forge-calendar__date-spacer) .forge-calendar__range__target{background-color:var(--forge-theme-primary,#3f51b5);position:absolute;width:100%;height:100%;opacity:.14;border-radius:0}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--start .forge-calendar__range__target{border-top-left-radius:50%;border-bottom-left-radius:50%}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--end .forge-calendar__range__target{border-top-right-radius:50%;border-bottom-right-radius:50%}.forge-calendar__range:not(.forge-calendar__range--start):first-of-type .forge-calendar__range__target{border-top-left-radius:4px;border-bottom-left-radius:4px}.forge-calendar__range:not(.forge-calendar__range--end):last-of-type .forge-calendar__range__target{border-top-right-radius:4px;border-bottom-right-radius:4px}.forge-calendar--allow-single-date-range .forge-calendar__range--start.forge-calendar__range--end .forge-calendar__range__target{transition:transform .2s;transform:scale(1.15);transform-origin:center}.forge-calendar__event{font-size:var(--forge-calendar-event-dot-size, 12px)}.forge-calendar__event[data-event-theme=primary]{color:var(--forge-calendar-theme-event-primary-accent,#3f51b5)}.forge-calendar__event[data-event-theme=secondary]{color:var(--forge-calendar-theme-event-secondary-accent,#ffc107)}.forge-calendar__event[data-event-theme=blue]{color:var(--forge-calendar-theme-event-blue-accent,#2196f3)}.forge-calendar__event[data-event-theme=light-green]{color:var(--forge-calendar-theme-event-light-green-accent,#8bc34a)}.forge-calendar__event[data-event-theme=cyan]{color:var(--forge-calendar-theme-event-cyan-accent,#00bcd4)}.forge-calendar__event[data-event-theme=teal]{color:var(--forge-calendar-theme-event-teal-accent,#009688)}.forge-calendar__event[data-event-theme=orange]{color:var(--forge-calendar-theme-event-orange-accent,#ff9800)}.forge-calendar__event[data-event-theme=blue-grey]{color:var(--forge-calendar-theme-event-blue-grey-accent,#607d8b)}.forge-calendar__event[data-event-theme=grey]{color:var(--forge-calendar-theme-event-grey-accent,#9e9e9e)}.forge-calendar__event[data-event-theme=red]{color:var(--forge-calendar-theme-event-red-accent,#f44336)}.forge-calendar__event[data-event-theme=pink]{color:var(--forge-calendar-theme-event-pink-accent,#e91e63)}.forge-calendar__event[data-event-theme=purple]{color:var(--forge-calendar-theme-event-purple-accent,#9c27b0)}.forge-calendar__event[data-event-theme=light-blue]{color:var(--forge-calendar-theme-event-light-blue-accent,#03a9f4)}.forge-calendar__event[data-event-theme=deep-purple]{color:var(--forge-calendar-theme-event-deep-purple-accent,#673ab7)}.forge-calendar__event[data-event-theme=green]{color:var(--forge-calendar-theme-event-green-accent,#4caf50)}.forge-calendar__event[data-event-theme=lime]{color:var(--forge-calendar-theme-event-lime-accent,#cddc39)}.forge-calendar__event[data-event-theme=yellow]{color:var(--forge-calendar-theme-event-yellow-accent,#ffeb3b)}.forge-calendar__event[data-event-theme=brown]{color:var(--forge-calendar-theme-event-brown-accent,#795548)}.forge-calendar__event[data-event-theme=deep-orange]{color:var(--forge-calendar-theme-event-deep-orange-accent,#ff5722)}.forge-calendar__date[disabled] .forge-calendar__event{opacity:.14}.forge-calendar__event--overflow{background-color:var(--forge-theme-surface,#fff);color:var(--forge-theme-on-surface,#000);border-radius:50%}.forge-calendar__event__wrapper{display:flex;justify-content:center;gap:2px;position:absolute;bottom:0;left:0;width:100%;padding-bottom:2px;pointer-events:none}.forge-calendar__date-spacer .forge-calendar__event__wrapper{display:none}.forge-calendar--rtl .forge-calendar__header forge-icon-button forge-icon{transform:rotate(180deg)}#accessible-header{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:fixed;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}#month-button forge-icon{transition:transform .2s}.forge-calendar--month-menu-open #month-button forge-icon{transform:rotate(180deg)}#year-button forge-icon{transition:transform .2s}.forge-calendar--year-menu-open #year-button forge-icon{transform:rotate(180deg)}:host{--forge-calendar-event-stroke-color:var(--forge-theme-surface, #ffffff);display:inline-block}:host([hidden]){display:none}:host([forge-popover-context=true]){--forge-calendar-event-stroke-color:var(--forge-theme-surface-bright, #ffffff)}',v1=class extends M{static get observedAttributes(){return[m.attributes.ALLOW_SINGLE_DATE_RANGE,m.attributes.CLEAR_BUTTON,m.attributes.CONSTRAIN_TO_ENABLED,m.attributes.FIRST_DAY_OF_WEEK,m.attributes.FIXED_HEIGHT,m.attributes.LIST_YEARS,m.attributes.LOCALE,m.attributes.MAX,m.attributes.MENU_ANIMATION,m.attributes.MIN,m.attributes.MODE,m.attributes.MONTH,m.attributes.PREVENT_FOCUS,m.attributes.READONLY,m.attributes.SELECTION_FOLLOWS_MONTH,m.attributes.SHOW_HEADER,m.attributes.SHOW_OTHER_MONTHS,m.attributes.SHOW_TODAY,m.attributes.TODAY_BUTTON,m.attributes.VIEW,m.attributes.YEAR,m.attributes.YEAR_RANGE]}constructor(){super(),q.define([s0,fe,C0,r3,Y5]),H(this,Fu,Uu),this._core=new Es(new Vs(this))}connectedCallback(){!this.hasAttribute(m.attributes.POPOVER_CONTEXT)&&Ra(this).some(t=>t.tagName.toLowerCase()==="forge-popover")&&this.setAttribute(m.attributes.POPOVER_CONTEXT,"true"),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case m.attributes.ALLOW_SINGLE_DATE_RANGE:this.allowSingleDateRange=p(a);break;case m.attributes.CLEAR_BUTTON:this.clearButton=p(a);break;case m.attributes.CONSTRAIN_TO_ENABLED:this.constrainToEnabled=p(a);break;case m.attributes.FIRST_DAY_OF_WEEK:this.firstDayOfWeek=W(a);break;case m.attributes.FIXED_HEIGHT:this.fixedHeight=p(a);break;case m.attributes.LIST_YEARS:this.listYears=p(a);break;case m.attributes.LOCALE:this.locale=a;break;case m.attributes.MAX:this.max=a;break;case m.attributes.MENU_ANIMATION:this.menuAnimation=a;break;case m.attributes.MIN:this.min=a;break;case m.attributes.MODE:this.mode=a;break;case m.attributes.MONTH:this.month=W(a);break;case m.attributes.PREVENT_FOCUS:this.preventFocus=p(a);break;case m.attributes.READONLY:this.readonly=p(a);break;case m.attributes.SELECTION_FOLLOWS_MONTH:this.selectionFollowsMonth=p(a);break;case m.attributes.SHOW_HEADER:this.showHeader=p(a);break;case m.attributes.SHOW_OTHER_MONTHS:this.showOtherMonths=p(a);break;case m.attributes.SHOW_TODAY:this.showToday=p(a);break;case m.attributes.TODAY_BUTTON:this.todayButton=p(a);break;case m.attributes.VIEW:this.view=a;break;case m.attributes.YEAR:this.year=W(a);break;case m.attributes.YEAR_RANGE:this.yearRange=a;break}}clear(){this._core.clear()}deselectDate(t){this._core.deselectDate(new Date(t))}goToDate(t,e){this._core.goToDate(new Date(t),e)}handleKey(t){this._core.handleExternalKeyEvent(t)}layout(){this._core.layout()}selectDate(t){this._core.selectDate(new Date(t))}setActiveDate(t,e){return this._core.setActiveDate(new Date(t),e)}today(){this._core.today()}toggleDate(t,e){this._core.toggleDate(new Date(t),e)}};s([v({set:!1})],v1.prototype,"activeDate",2),s([v()],v1.prototype,"allowSingleDateRange",2),s([v()],v1.prototype,"clearButton",2),s([v()],v1.prototype,"clearCallback",2),s([v()],v1.prototype,"constrainToEnabled",2),s([v()],v1.prototype,"dateBuilder",2),s([v()],v1.prototype,"dateSelectCallback",2),s([v()],v1.prototype,"dayBuilder",2),s([v()],v1.prototype,"disabledDateBuilder",2),s([v()],v1.prototype,"disabledDates",2),s([v()],v1.prototype,"disabledDaysOfWeek",2),s([v()],v1.prototype,"eventBuilder",2),s([v()],v1.prototype,"events",2),s([v()],v1.prototype,"firstDayOfWeek",2),s([v()],v1.prototype,"fixedHeight",2),s([v()],v1.prototype,"listYears",2),s([v()],v1.prototype,"locale",2),s([v()],v1.prototype,"max",2),s([v()],v1.prototype,"menuAnimation",2),s([v()],v1.prototype,"min",2),s([v()],v1.prototype,"mode",2),s([v()],v1.prototype,"month",2),s([v()],v1.prototype,"preventFocus",2),s([v()],v1.prototype,"readonly",2),s([v()],v1.prototype,"selectionFollowsMonth",2),s([v()],v1.prototype,"showHeader",2),s([v()],v1.prototype,"showOtherMonths",2),s([v()],v1.prototype,"showToday",2),s([v()],v1.prototype,"todayButton",2),s([v()],v1.prototype,"todayCallback",2),s([v()],v1.prototype,"tooltipBuilder",2),s([v()],v1.prototype,"value",2),s([v()],v1.prototype,"view",2),s([v()],v1.prototype,"weekendDays",2),s([v()],v1.prototype,"year",2),s([v()],v1.prototype,"yearRange",2),v1=s([y({name:m.elementName,dependencies:[V2,Ye,n1,X,p1,r1,Q]})],v1);var Sp=class extends X1{constructor(t){super(t)}_build(){return document.createElement(m.elementName)}onDateSelect(t){this._element.addEventListener(m.events.DATE_SELECT,t)}onFocusChange(t){this._element.addEventListener(m.events.FOCUS_CHANGE,t)}onMonthChange(t){this._element.addEventListener(m.events.MONTH_CHANGE,t)}onViewChange(t){this._element.addEventListener(m.events.VIEW_CHANGE,t)}};var Wu={POPUP:"forge-calendar-dropdown__popup"},kp={classes:Wu};var _o=class{constructor(t,e){this._popupClasses=[];this.targetElement=t,this.id=e}get isOpen(){var t,e;return(e=(t=this.dropdownElement)==null?void 0:t.open)!=null?e:!1}get popupClasses(){return this._popupClasses}set popupClasses(t){this._popupClasses=t?rt(t)?[...t]:[t]:[]}get locale(){var t;return(t=this.calendar)==null?void 0:t.locale}set locale(t){this.calendar&&(this.calendar.locale=t)}async close({force:t=!1}={}){var e;this.dropdownElement&&(t?this.dropdownElement.open=!1:await this.dropdownElement.hideAsync(),(e=this.dropdownElement)==null||e.remove(),this.dropdownElement=void 0,this.calendar=void 0)}destroy(){this.close({force:!0})}open(t){var o,n;this.calendar=this._createCalendar(t),this._announcerElement=Ar(),this._announcerElement.id=`${this.id}-activedescendant`,this.dropdownElement=this._createDropdown(),this.dropdownElement.appendChild(this.calendar),this.dropdownElement.appendChild(this._announcerElement),this.calendar.addEventListener(m.events.FOCUS_CHANGE,i=>{var h;let l=`${this.id}-activedescendent-`;switch(i.detail.type){case"date":l+=at(i.detail.value);break;case"month":l+=`month-${i.detail.value.toString()}`;break;case"year":l+=`year-${i.detail.value.toString()}`;break}(h=this.activeChangeCallback)==null||h.call(this,l),this._announcerElement&&(this._announcerElement.id=l,this._announcerElement.setAttribute("aria-selected",i.detail.selected.toString()),this._announcerElement.textContent=i.detail.text)});let e=(o=this.targetElement.ownerDocument)!=null?o:document;((n=Gr(Z.selectors.HOST,this.targetElement))!=null?n:e.body).appendChild(this.dropdownElement),this.dropdownElement.open=!0}propagateKeyboardEvent(t){var e;(e=this.calendar)==null||e.handleKey(t)}_createCalendar(t){let e=document.createElement(m.elementName);return Object.assign(e,t),e}_createDropdown(){let t=document.createElement("forge-popover");return t.anchorElement=this.targetElement,t.placement="bottom-start",t.persistent=!0,t.classList.add(kp.classes.POPUP),t.id=this.id,t.classList.add(...this._popupClasses),t.addEventListener(Z.events.TOGGLE,()=>{var e;return(e=this.closeCallback)==null?void 0:e.call(this)}),t}};function Op(){x(v1)}var Gu=`${b}card`,Dp={RAISED:"raised"},Yu=w({},Dp),Mr={elementName:Gu,observedAttributes:Dp,attributes:Yu};var Ku='<template><div class="forge-card" part="root"><slot></slot></div></template>',qu=":host{display:block}:host([hidden]){display:none}.forge-card{--_card-background:var(--forge-card-background, var(--forge-theme-surface, #ffffff));--_card-height:var(--forge-card-height, 100%);--_card-width:var(--forge-card-width, 100%);--_card-outline-color:var(--forge-card-outline-color, var(--forge-theme-outline, #e0e0e0));--_card-outline-width:var(--forge-card-outline-width, var(--forge-border-thin, 1px));--_card-outline-style:var(--forge-card-outline-style, solid);--_card-elevation:var(--forge-card-elevation, none);--_card-padding:var(--forge-card-padding, var(--forge-spacing-medium, 16px));--_card-shape:var(--forge-card-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_card-overflow:var(--forge-card-overflow, initial);--_card-raised-elevation:var(--forge-card-raised-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_card-raised-outline-width:var(--forge-card-raised-outline-width, 0)}.forge-card{background:var(--_card-background);border-color:var(--_card-outline-color);border-width:var(--_card-outline-width);border-style:var(--_card-outline-style);border-radius:var(--_card-shape);box-shadow:var(--_card-elevation);box-sizing:border-box;padding:var(--_card-padding);overflow:var(--_card-overflow);height:var(--_card-height);width:var(--_card-width);-webkit-tap-highlight-color:transparent}:host([raised]) .forge-card{--_card-elevation:var(--_card-raised-elevation);--_card-outline-width:var(--_card-raised-outline-width)}:host([no-padding]) .forge-card{--_card-padding:var(--forge-card-padding, 0)}",fo=class extends M{constructor(){super();this._raised=!1;H(this,Ku,qu)}static get observedAttributes(){return Object.values(Mr.observedAttributes)}attributeChangedCallback(e,a,o){switch(e){case Mr.attributes.RAISED:this.raised=p(o);break}}get raised(){return this._raised}set raised(e){e=!!e,this._raised!==e&&(this._raised=e,this.toggleAttribute(Mr.attributes.RAISED,this._raised))}};fo=s([y({name:Mr.elementName})],fo);function Pp(){x(fo)}var $u=`${b}circular-progress`,Xu={DETERMINATE:"determinate",PROGRESS:"progress",THEME:"theme",TRACK:"track"},ju={INDETERMINATE:"forge-circular-progress--indeterminate"},Zu={ROOT:".forge-circular-progress",DETERMINATE_PROGRESS_CIRCLE:".progress",TEMPLATES:"svg, .spinner"},C2={elementName:$u,attributes:Xu,classes:ju,selectors:Zu};var Qu='<svg viewBox="0 0 4800 4800"><circle class="track-background" pathLength="100"></circle></svg><div class="spinner"><div class="left"><div class="circle"></div></div><div class="right"><div class="circle"></div></div></div>',Ju='<svg viewBox="0 0 4800 4800"><circle class="track-background" pathLength="100"></circle><circle class="track" pathLength="100"></circle><circle class="progress" pathLength="100" stroke-dashoffset="100"></circle></svg>',Cs=class extends I{constructor(t){super(t),this._rootElement=g(this._component,C2.selectors.ROOT)}initialize(){this._component[P]({role:"progressbar",ariaValueMin:"0",ariaValueMax:"1"})}setDeterminate(t){this._tryResetTemplate(),this._rootElement.classList.toggle(C2.classes.INDETERMINATE,!t),t?(this._rootElement.insertAdjacentHTML("beforeend",Ju),this._determinateProgressCircleElement=g(this._component,C2.selectors.DETERMINATE_PROGRESS_CIRCLE)):(this._rootElement.insertAdjacentHTML("beforeend",Qu),this._component[P]({ariaValueNow:null}),this._determinateProgressCircleElement=void 0)}setProgress(t){var e;this._component[P]({ariaValueNow:`${t}`}),(e=this._determinateProgressCircleElement)==null||e.setAttribute("stroke-dashoffset",`${(1-t)*100}`)}_tryResetTemplate(){var e;let t=(e=this._component.shadowRoot)==null?void 0:e.querySelectorAll(C2.selectors.TEMPLATES);t==null||t.forEach(a=>a.remove())}};var zs=class{constructor(t){this._adapter=t;this._determinate=!1;this._progress=0;this._theme="primary";this._track=!1}initialize(){this._adapter.tryApplyGlobalConfiguration(["track"]),this._adapter.initialize(),this._applyDeterminate()}_applyDeterminate(){this._adapter.setDeterminate(this._determinate),this._determinate&&this._adapter.setProgress(this._progress)}get determinate(){return this._determinate}set determinate(t){t=!!t,this._determinate!==t&&(this._determinate=t,this._applyDeterminate(),this._adapter.toggleHostAttribute(C2.attributes.DETERMINATE,this._determinate))}get progress(){return this._progress}set progress(t){isNaN(t)&&(t=0),this._progress!==t&&(this._progress=t,this._determinate&&this._adapter.setProgress(this._progress),this._adapter.setHostAttribute(C2.attributes.PROGRESS,`${this._progress}`))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.toggleHostAttribute(C2.attributes.THEME,!!this._theme,this._theme))}get track(){return this._track}set track(t){t=!!t,this._track!==t&&(this._track=t,this._adapter.toggleHostAttribute(C2.attributes.TRACK,this._track))}};var t_='<template><div class="forge-circular-progress" part="progressbar"><slot class="center-content"></slot></div></template>',e_=":host{--_circular-progress-size:var(--forge-circular-progress-size, 48px)}:host{display:inline-flex;vertical-align:middle;block-size:var(--_circular-progress-size);inline-size:var(--_circular-progress-size);position:relative;align-items:center;justify-content:center;transition:background-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);contain:strict;content-visibility:auto}:host([hidden]){display:none}.forge-circular-progress{--_circular-progress-padding:var(--forge-circular-progress-padding, 0);--_circular-progress-track-width:var(--forge-circular-progress-track-width, 12);--_circular-progress-track-color:var(--forge-circular-progress-track-color, transparent);--_circular-progress-track-fill-color:var(--forge-circular-progress-track-fill-color, var(--forge-theme-tertiary-container, #d0d7ff));--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_circular-progress-arc-duration:var(--forge-circular-progress-arc-duration, 1333ms);--_circular-progress-theme-transition-duration:var(--forge-circular-progress-theme-transition-duration, var(--forge-animation-duration-short3, 150ms));--_circular-progress-theme-transition-timing:var(--forge-circular-progress-theme-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-circular-progress{flex:1;align-self:stretch;margin:var(--_circular-progress-padding)}.forge-circular-progress--indeterminate{will-change:transform;animation:linear infinite linear-rotate;animation-duration:calc(var(--_circular-progress-arc-duration) * 360 / 306)}.circle,.forge-circular-progress,.left,.right,.spinner,svg{position:absolute;inset:0}.center-content{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.left{overflow:hidden;inset:0 50% 0 0}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:calc(-.5 * var(--_circular-progress-arc-duration)),0s}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_circular-progress-size) * var(--_circular-progress-track-width)/ 100);border-color:var(--_circular-progress-indicator-color) var(--_circular-progress-indicator-color) transparent transparent;transition:border-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);will-change:transform;animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:var(--_circular-progress-arc-duration),calc(4 * var(--_circular-progress-arc-duration));animation-timing-function:cubic-bezier(0.4,0,0.2,1)}svg{transform:rotate(-90deg)}svg circle{cx:50%;cy:50%;r:calc(50% * (1 - var(--_circular-progress-track-width)/ 100));stroke-width:calc(var(--_circular-progress-track-width) * 1%);stroke-dasharray:100;fill:transparent}.progress{transition:stroke-dashoffset .5s cubic-bezier(0, 0, .2, 1),stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-indicator-color)}.track{stroke:transparent}.track-background{transition:stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-track-color)}.spinner{will-change:transform;animation:infinite both rotate-arc;animation-duration:calc(4 * var(--_circular-progress-arc-duration));animation-timing-function:cubic-bezier(0.4,0,0.2,1)}:host(:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--_circular-progress-track-fill-color)}:host([theme=primary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-primary, #3f51b5))}:host([theme=primary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-secondary, #ffc107))}:host([theme=secondary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-secondary-container, #fff0c3))}:host([theme=success]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-success, #2e7d32))}:host([theme=success]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=error]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-error, #b00020))}:host([theme=error]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=warning]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-warning, #d14900))}:host([theme=warning]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-warning-container, #f4d3c2))}:host([theme=info]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-info, #1565c0))}:host([theme=info]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-info-container, #c7daf0))}@media screen and (forced-colors:active){.progress{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}",Tt=class extends L1(H1(M)){static get observedAttributes(){return[C2.attributes.DETERMINATE,C2.attributes.PROGRESS,C2.attributes.THEME,C2.attributes.TRACK]}constructor(){super(),H(this,t_,e_),this._core=new zs(new Cs(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case C2.attributes.DETERMINATE:this.determinate=p(a);break;case C2.attributes.PROGRESS:this.progress=W(a);break;case C2.attributes.THEME:this.theme=a;break;case C2.attributes.TRACK:this.track=p(a);break}}};s([v()],Tt.prototype,"determinate",2),s([v()],Tt.prototype,"progress",2),s([v()],Tt.prototype,"theme",2),s([v()],Tt.prototype,"track",2),Tt=s([y({name:C2.elementName})],Tt);function Np(){x(Tt)}var Rp=`${b}color-picker`,a_={VALUE:"value",ALLOW_OPACITY:"allow-opacity",DEBOUNCE_CHANGE_EVENT:"debounce-change-event"},o_={SLIDER_THUMB_ACTIVE:"forge-color-picker__slider-thumb--active",GRADIENT_THUMB_ACTIVE:"forge-color-picker__gradient-thumb--active"},r_={GRADIENT:".forge-color-picker__gradient",GRADIENT_THUMB:".forge-color-picker__gradient-thumb",PREVIEW_COLOR:".forge-color-picker__color-preview",HEX_INPUT:"#forge-color-picker-hex-input",RGBA_INPUT:"#forge-color-picker-rgba-input",HSVA_INPUT:"#forge-color-picker-hsva-input",HUE_SLIDER:".forge-color-picker__hue-slider",HUE_SLIDER_THUMB:"#forge-color-picker-hue-thumb",OPACITY_SLIDER:".forge-color-picker__opacity-slider",OPACITY_SLIDER_THUMB:"#forge-color-picker-opacity-thumb",SLIDER:".forge-color-picker__slider",SLIDER_THUMB:".forge-color-picker__slider-thumb",COLOR_VALUE_HEX_CONTAINER:".forge-color-picker__color-hex",COLOR_VALUE_RGBA_CONTAINER:".forge-color-picker__color-rgba",COLOR_VALUE_HSVA_CONTAINER:".forge-color-picker__color-hsva",TYPE_BUTTON:"#forge-color-picker-type-button",COLOR_VALUE_RGBA_R:"#forge-color-picker-rgba-r-input",COLOR_VALUE_RGBA_G:"#forge-color-picker-rgba-g-input",COLOR_VALUE_RGBA_B:"#forge-color-picker-rgba-b-input",COLOR_VALUE_RGBA_A:"#forge-color-picker-rgba-a-input",COLOR_VALUE_HSVA_H:"#forge-color-picker-hsva-h-input",COLOR_VALUE_HSVA_S:"#forge-color-picker-hsva-s-input",COLOR_VALUE_HSVA_V:"#forge-color-picker-hsva-v-input",COLOR_VALUE_HSVA_A:"#forge-color-picker-hsva-a-input"},n_={CHANGE:`${Rp}-change`},i_={CHANGE_EVENT_DEBOUNCE_THRESHOLD:200},g1={elementName:Rp,attributes:a_,events:n_,classes:o_,selectors:r_,numbers:i_},X4="000000",j4=(n=>(n.HEX="hex",n.RGB="rgb",n.RGBA="rgba",n.HSV="hsv",n.HSVA="hsva",n))(j4||{});var As=class extends I{constructor(t){super(t),this._gradientElement=g(t,g1.selectors.GRADIENT),this._previewColorElement=g(t,g1.selectors.PREVIEW_COLOR),this._hexInputElement=g(t,g1.selectors.HEX_INPUT),this._rgbaInputRElement=g(t,g1.selectors.COLOR_VALUE_RGBA_R),this._rgbaInputGElement=g(t,g1.selectors.COLOR_VALUE_RGBA_G),this._rgbaInputBElement=g(t,g1.selectors.COLOR_VALUE_RGBA_B),this._rgbaInputAElement=g(t,g1.selectors.COLOR_VALUE_RGBA_A),this._hsvaInputHElement=g(t,g1.selectors.COLOR_VALUE_HSVA_H),this._hsvaInputSElement=g(t,g1.selectors.COLOR_VALUE_HSVA_S),this._hsvaInputVElement=g(t,g1.selectors.COLOR_VALUE_HSVA_V),this._hsvaInputAElement=g(t,g1.selectors.COLOR_VALUE_HSVA_A),this._hueSliderElement=g(t,g1.selectors.HUE_SLIDER),this._hueSliderThumbElement=g(t,g1.selectors.HUE_SLIDER_THUMB),this._opacitySliderElement=g(t,g1.selectors.OPACITY_SLIDER),this._opacitySliderThumbElement=g(t,g1.selectors.OPACITY_SLIDER_THUMB),this._hexValueContainerElement=g(t,g1.selectors.COLOR_VALUE_HEX_CONTAINER),this._rgbaValueContainerElement=g(t,g1.selectors.COLOR_VALUE_RGBA_CONTAINER),this._hsvaValueContainerElement=g(t,g1.selectors.COLOR_VALUE_HSVA_CONTAINER),this._typeButtonElement=g(t,g1.selectors.TYPE_BUTTON)}setPreviewColor(t){this._previewColorElement.style.backgroundColor=t}setHexInputValue(t){this._hexInputElement.value=t}setRgbaInputValue(t){this._rgbaInputRElement.value=t.r.toString(),this._rgbaInputGElement.value=t.g.toString(),this._rgbaInputBElement.value=t.b.toString(),this._rgbaInputAElement.value=t.a.toString()}setHsvaInputValue(t){this._hsvaInputHElement.value=t.h.toString(),this._hsvaInputSElement.value=t.s.toString(),this._hsvaInputVElement.value=t.v.toString(),this._hsvaInputAElement.value=t.a.toString()}updateA11y(t,e){this._hueSliderThumbElement.setAttribute("aria-valuenow",t.toString()),this._hueSliderThumbElement.setAttribute("aria-valuetext",t.toString()),this._opacitySliderThumbElement.setAttribute("aria-valuenow",e.toString()),this._opacitySliderThumbElement.setAttribute("aria-valuetext",e.toString())}setGradientColor(t){this._gradientElement.style.backgroundColor=t}getHueSliderElement(){return this._hueSliderElement}getOpacitySliderElement(){return this._opacitySliderElement}getGradientElement(){return this._gradientElement}setActiveValueType(t){switch(this._hexValueContainerElement.style.display="none",this._rgbaValueContainerElement.style.display="none",this._hsvaValueContainerElement.style.display="none",t){case"hex":this._hexValueContainerElement.style.removeProperty("display");break;case"rgba":this._rgbaValueContainerElement.style.removeProperty("display");break;case"hsva":this._hsvaValueContainerElement.style.removeProperty("display");break}}focusValueInput(t){switch(t){case"hex":this._hexInputElement.focus(),this._hexInputElement.select();break;case"rgba":this._rgbaInputRElement.focus(),this._rgbaInputRElement.select();break;case"hsva":this._hsvaInputHElement.focus(),this._hsvaInputHElement.select();break}}setTypeClickListener(t){this._typeButtonElement.addEventListener("click",t)}removeTypeClickListener(t){this._typeButtonElement.removeEventListener("click",t)}setHexInputListener(t,e){this._hexInputElement.addEventListener(t,e)}removeHexInputListener(t,e){this._hexInputElement.removeEventListener(t,e)}getHexInputValue(){return this._hexInputElement.value}setRgbaInputListener(t,e){this._rgbaInputRElement.addEventListener(t,e),this._rgbaInputGElement.addEventListener(t,e),this._rgbaInputBElement.addEventListener(t,e),this._rgbaInputAElement.addEventListener(t,e)}removeRgbaInputListener(t,e){this._rgbaInputRElement.removeEventListener(t,e),this._rgbaInputGElement.removeEventListener(t,e),this._rgbaInputBElement.removeEventListener(t,e),this._rgbaInputAElement.removeEventListener(t,e)}getRgbaInputValue(){return{r:parseInt(this._rgbaInputRElement.value,10),g:parseInt(this._rgbaInputGElement.value,10),b:parseInt(this._rgbaInputBElement.value,10),a:parseFloat(this._rgbaInputAElement.value)}}setHsvaInputListener(t,e){this._hsvaInputHElement.addEventListener(t,e),this._hsvaInputSElement.addEventListener(t,e),this._hsvaInputVElement.addEventListener(t,e),this._hsvaInputAElement.addEventListener(t,e)}removeHsvaInputListener(t,e){this._hsvaInputHElement.removeEventListener(t,e),this._hsvaInputSElement.removeEventListener(t,e),this._hsvaInputVElement.removeEventListener(t,e),this._hsvaInputAElement.removeEventListener(t,e)}getHsvaInputValue(){return{h:parseInt(this._hsvaInputHElement.value,10),s:parseInt(this._hsvaInputSElement.value,10),v:parseInt(this._hsvaInputVElement.value,10),a:parseFloat(this._hsvaInputAElement.value)}}toggleOpacityControls(t){t?(this._opacitySliderElement.style.removeProperty("display"),this._rgbaInputAElement.parentElement&&this._rgbaInputAElement.parentElement.style.removeProperty("display"),this._hsvaInputAElement.parentElement&&this._hsvaInputAElement.parentElement.style.removeProperty("display")):(this._opacitySliderElement.style.display="none",this._rgbaInputAElement.parentElement&&(this._rgbaInputAElement.parentElement.style.display="none"),this._hsvaInputAElement.parentElement&&(this._hsvaInputAElement.parentElement.style.display="none"))}};function Bs(r,t,e){let a=e.getBoundingClientRect(),o=r-a.left,n=t-a.top;return o>a.width?o=a.width:o<0&&(o=0),n>a.height?n=a.height:n<0&&(n=0),{x:o,y:n,height:a.height,width:a.width}}function Hr(r){let t,e,a,o=r.h/60,n=r.s/100,i=r.v/100;if(n===0)return t=e=a=i,{r:Math.round(t*255),g:Math.round(e*255),b:Math.round(a*255),a:r.a};let l=Math.floor(o),h=o-l,c=i*(1-n),d=i*(1-n*h),u=i*(1-n*(1-h));switch(l){case 0:t=i,e=u,a=c;break;case 1:t=d,e=i,a=c;break;case 2:t=c,e=i,a=u;break;case 3:t=c,e=d,a=i;break;case 4:t=u,e=c,a=i;break;default:t=i,e=c,a=d}return{r:Math.round(t*255),g:Math.round(e*255),b:Math.round(a*255),a:r.a}}function xo(r){return Z4(r.r)+Z4(r.g)+Z4(r.b)+(Math.round(r.a*255)+65536).toString(16).substr(-2)}function Z4(r){return("0"+r.toString(16)).slice(-2)}function Fp(r){let t=r.length===3||r.length===4,e=t?`${r.slice(0,1)}${r.slice(0,1)}`:r.slice(0,2),a=t?`${r.slice(1,2)}${r.slice(1,2)}`:r.slice(2,4),o=t?`${r.slice(2,3)}${r.slice(2,3)}`:r.slice(4,6),n=(t?`${r.slice(3,4)}${r.slice(3,4)}`:r.slice(6,8))||"ff";return{r:parseInt(e,16),g:parseInt(a,16),b:parseInt(o,16),a:parseFloat((parseInt(n,16)/255).toFixed(2))}}function Up(r){return`rgba(${r.r}, ${r.g}, ${r.b}, ${r.a})`}function Q4(r,t){let e=r.replace(/^#/,"");return t||(e.length===4?e=e.substring(0,3):e.length===8&&(e=e.substring(0,6))),`#${e}`}function Wp(r){let t=r.r/255,e=r.g/255,a=r.b/255,o=Math.max(t,e,a),n=Math.min(t,e,a),i=o,l=o,h=o,c=o-n;if(l=o===0?0:c/o,o===n)i=0;else{switch(o){case t:i=(e-a)/c+(e<a?6:0);break;case e:i=(a-t)/c+2;break;case a:i=(t-e)/c+4;break}i/=6}return{h:Math.round(i*360),s:Math.round(l*100),v:Math.round(h*100),a:r.a}}function J4(r){if(!r||typeof r!="string")return!1;switch(r.substring(0,1)==="#"&&(r=r.substring(1)),r.length){case 3:return/^[0-9A-F]{3}$/i.test(r);case 4:return/^[0-9A-F]{4}$/i.test(r);case 6:return/^[0-9A-F]{6}$/i.test(r);case 8:return/^[0-9A-F]{8}$/i.test(r);default:return!1}}function t5(r){return z2(r.r)&&r.r>=0&&r.r<=255&&z2(r.g)&&r.g>=0&&r.g<=255&&z2(r.b)&&r.b>=0&&r.b<=255&&z2(r.a)&&r.a>=0&&r.a<=1}function e5(r){return z2(r.h)&&r.h>=0&&r.h<=360&&z2(r.s)&&r.s>=0&&r.s<=100&&z2(r.v)&&r.v>=0&&r.v<=100&&z2(r.a)&&r.a>=0&&r.a<=1}var Ts=class{constructor(t,e){this._rootElement=t;this._changeListener=e;this._keydownListener=a=>this._onKeydown(a),this._downListener=a=>this._onDown(a),this._moveListener=a=>this._onMove(a),this._upListener=a=>this._onUp(a),this._initialize()}destroy(){this._unlisten()}setValue(t,e){window.requestAnimationFrame(()=>{let a=this._rootElement.getBoundingClientRect();this._xPercent=Math.round(a.width*(t/100)),this._yPercent=a.height-Math.round(a.height*(e/100)),this._setThumbPosition(this._xPercent,this._yPercent)})}_initialize(){this._thumbElement=this._rootElement.querySelector(g1.selectors.GRADIENT_THUMB),this._listen(),this._setThumbPosition(this._xPercent,this._yPercent)}_listen(){this._rootElement.addEventListener("keydown",this._keydownListener),this._rootElement.addEventListener("mousedown",this._downListener),this._rootElement.addEventListener("touchstart",this._downListener)}_unlisten(){this._rootElement.removeEventListener("keydown",this._keydownListener),this._rootElement.removeEventListener("mousedown",this._downListener),this._rootElement.removeEventListener("touchstart",this._downListener),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener)}_onKeydown(t){let e=t.key==="Enter"||t.keyCode===13,a=t.key==="ArrowLeft"||t.keyCode===37,o=t.key==="ArrowUp"||t.keyCode===38,n=t.key==="ArrowRight"||t.keyCode===39,i=t.key==="ArrowDown"||t.keyCode===40,l=this._rootElement.getBoundingClientRect();if(i)t.preventDefault(),this._yPercent++;else if(o)t.preventDefault(),this._yPercent--;else if(a)t.preventDefault(),this._xPercent--;else if(n)t.preventDefault(),this._xPercent++;else if(e)t.preventDefault();else return;this._xPercent>l.width?this._xPercent=l.width:this._xPercent<0&&(this._xPercent=0),this._yPercent>l.height?this._yPercent=l.height:this._yPercent<0&&(this._yPercent=0),this._setThumbPosition(this._xPercent,this._yPercent),this._notify()}_onDown(t){t.preventDefault(),document.addEventListener("mousemove",this._moveListener),document.addEventListener("touchmove",this._moveListener),document.addEventListener("mouseup",this._upListener),document.addEventListener("touchend",this._upListener),this._updateThumbPosition(t)}_onMove(t){t.preventDefault(),this._updateThumbPosition(t)}_onUp(t){document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener),this._updateThumbPosition(t),this._thumbElement.focus()}_updateThumbPosition(t){let e=/^mouse/.test(t.type),a=e?t.clientX:t.changedTouches[0].clientX,o=e?t.clientY:t.changedTouches[0].clientY,n=this._calculateSliderPercent(a,o);this._setThumbPosition(n.x,n.y),this._xPercent=parseInt((n.x/n.width*100).toString(),10),this._yPercent=Math.abs(parseInt((n.y/n.height*100).toString(),10)-100),this._notify()}_calculateSliderPercent(t,e){return Bs(t,e,this._rootElement)}_setThumbPosition(t,e){this._thumbElement.style.left=`${t}px`,this._thumbElement.style.top=`${e}px`}_notify(){typeof this._changeListener=="function"&&this._changeListener(this._xPercent,this._yPercent)}};var Lr=class{constructor(t,e){this._rootElement=t;this._changeListener=e;this._percent=1;this._min=0;this._max=1;this._step=.01;this._keydownListener=a=>this._onKeydown(a),this._downListener=a=>this._onDown(a),this._moveListener=a=>this._onMove(a),this._upListener=a=>this._onUp(a),this._initialize()}destroy(){this._unlisten()}setValue(t){this._percent=t,this._setThumbPosition(this._percent)}_initialize(){this._thumbElement=this._rootElement.querySelector(g1.selectors.SLIDER_THUMB),this._listen(),this._setThumbPosition(this._percent)}_listen(){this._thumbElement.addEventListener("keydown",this._keydownListener),this._rootElement.addEventListener("mousedown",this._downListener),this._rootElement.addEventListener("touchstart",this._downListener)}_unlisten(){this._thumbElement.removeEventListener("keydown",this._keydownListener),this._rootElement.removeEventListener("mousedown",this._downListener),this._rootElement.removeEventListener("touchstart",this._downListener),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener)}_onKeydown(t){let e=t.key==="ArrowLeft"||t.keyCode===37,a=t.key==="ArrowRight"||t.keyCode===39,o=t.key==="Home"||t.keyCode===36,n=t.key==="End"||t.keyCode===35;e?(t.preventDefault(),this._percent-=this._step):a?(t.preventDefault(),this._percent+=this._step):o?(t.preventDefault(),this._percent=this._min):n&&(t.preventDefault(),this._percent=this._max),this._percent<this._min?this._percent=this._min:this._percent>this._max&&(this._percent=this._max),this._setThumbPosition(this._percent),this._notify()}_onDown(t){t.preventDefault(),document.addEventListener("mousemove",this._moveListener),document.addEventListener("touchmove",this._moveListener),document.addEventListener("mouseup",this._upListener),document.addEventListener("touchend",this._upListener),this._updateThumbPosition(t)}_onMove(t){t.preventDefault(),this._thumbElement.classList.add(g1.classes.SLIDER_THUMB_ACTIVE),this._updateThumbPosition(t)}_onUp(t){this._thumbElement.classList.remove(g1.classes.SLIDER_THUMB_ACTIVE),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener),this._updateThumbPosition(t),this._thumbElement.focus()}_updateThumbPosition(t){let e=/^mouse/.test(t.type)?t.clientX:t.changedTouches[0].clientX;this._percent=this._calculateSliderPercent(e),this._setThumbPosition(this._percent),this._notify()}_calculateSliderPercent(t){let e=Bs(t,0,this._rootElement);return parseFloat((e.x/e.width).toFixed(2))}_setThumbPosition(t){this._thumbElement.style.left=`${t*100}%`}_notify(){typeof this._changeListener=="function"&&this._changeListener(this._percent)}};var Ss=class{constructor(t){this._adapter=t;this._value=null;this._allowOpacity=!0;this._hex=X4;this._hsva={h:0,s:0,v:0,a:1};this._rgba={r:0,g:0,b:0,a:1};this._debounceChangeEvent=!1;this._valueType="hex";this._initialized=!1;this._gradientSliderChangedListener=(e,a)=>this._onGradientSliderChanged(e,a),this._hueSliderChangedListener=e=>this._onHueSliderChanged(e),this._opacitySliderChangedListener=e=>this._onOpacitySliderChanged(e),this._typeClickListener=e=>this._onTypeClicked(e),this._hexInputChangedListener=e=>this._onHexInputChanged(),this._rgbaInputChangedListener=e=>this._onRgbaInputChanged(),this._hsvaInputChangedListener=e=>this._onHsvaInputChanged()}initialize(){this._initialized=!0,this._applyChangeEventTrigger(),this._adapter.setTypeClickListener(this._typeClickListener),this._adapter.setHexInputListener("input",this._hexInputChangedListener),this._adapter.setRgbaInputListener("input",this._rgbaInputChangedListener),this._adapter.setHsvaInputListener("input",this._hsvaInputChangedListener),this._gradientSlider=new Ts(this._adapter.getGradientElement(),this._gradientSliderChangedListener),this._hueSlider=new Lr(this._adapter.getHueSliderElement(),this._hueSliderChangedListener),this._opacitySlider=new Lr(this._adapter.getOpacitySliderElement(),this._opacitySliderChangedListener),this._initializeOpacity(),this._setColorFromHex(),this._adapter.setActiveValueType(this._valueType)}destroy(){this._adapter.removeTypeClickListener(this._typeClickListener),this._adapter.removeHexInputListener("input",this._hexInputChangedListener),this._adapter.removeRgbaInputListener("input",this._hexInputChangedListener),this._adapter.removeHsvaInputListener("input",this._hexInputChangedListener),this._gradientSlider.destroy(),this._hueSlider.destroy(),this._opacitySlider.destroy(),this._initialized=!1}_applyChangeEventTrigger(){this._debounceChangeEvent?this._triggerChangeEvent=Ae((t,e)=>{this._emitChangeEvent(t,e)},g1.numbers.CHANGE_EVENT_DEBOUNCE_THRESHOLD,!1):this._triggerChangeEvent=(t,e)=>this._emitChangeEvent(t,e)}_initializeOpacity(){this._hsva.a=1,this._adapter.toggleOpacityControls(this._allowOpacity),this._render()}_onTypeClicked(t){this._valueType==="hex"?this._valueType="rgba":this._valueType==="rgba"?this._valueType="hsva":this._valueType==="hsva"&&(this._valueType="hex"),this._adapter.setActiveValueType(this._valueType),this._adapter.focusValueInput(this._valueType)}_onHexInputChanged(){let t=this._adapter.getHexInputValue();J4(t)&&(this.value=t,this._triggerChangeEvent("input","hex"))}_onRgbaInputChanged(){let t=this._adapter.getRgbaInputValue();t5(t)&&(this.value=xo(t),this._triggerChangeEvent("input","rgba"))}_onHsvaInputChanged(){let t=this._adapter.getHsvaInputValue();e5(t)&&(this.value=xo(Hr(t)),this._triggerChangeEvent("input","hsva"))}_setColorFromHex(){this._rgba=Fp(this._hex),this._hsva=Wp(this._rgba),this._initialized&&(this._gradientSlider.setValue(this._hsva.s,this._hsva.v),this._hueSlider.setValue(parseFloat((this._hsva.h/360).toFixed(2))),this._opacitySlider.setValue(this._hsva.a),this._render())}_onGradientSliderChanged(t,e){this._hsva.s=t,this._hsva.v=e,this._syncColors(),this._render(),this._triggerChangeEvent("slider","gradient")}_onHueSliderChanged(t){this._hsva.h=parseInt((360*t).toString(),10),this._syncColors(),this._setGradientColor(),this._render(),this._triggerChangeEvent("slider","hue")}_onOpacitySliderChanged(t){this._hsva.a=t,this._syncColors(),this._render(),this._triggerChangeEvent("slider","opacity")}_setGradientColor(){let t=Hr({h:this._hsva.h,s:100,v:100,a:1});this._adapter.setGradientColor(`rgb(${t.r}, ${t.g}, ${t.b})`)}_syncColors(){this._rgba=Hr(this._hsva),this._hex=xo(this._rgba),this._value=this._hex||null}_render(){this._setGradientColor(),this._adapter.setPreviewColor(Up(this._rgba)),this._adapter.setHexInputValue(`#${this._hex}`),this._adapter.setRgbaInputValue(this._rgba),this._adapter.setHsvaInputValue(this._hsva),this._adapter.updateA11y(this._hsva.h,Math.round(this._hsva.a*100))}_emitChangeEvent(t,e){let a={type:t,source:e,hex:Q4(this._hex,!1).replace(/^#/,""),rgba:this._rgba,hsva:this._hsva};this._allowOpacity&&(a.alpha=this._hsva.a),this._adapter.emitHostEvent(g1.events.CHANGE,a)}get value(){return Q4(this._hex,!1)}set value(t){if(this._value!==t){if(this._value=t||X4,!J4(this._value))throw new Error("Invalid hex value provided.");this._hex=this._value.replace(/^#/,""),this._setColorFromHex(),this._adapter.setHostAttribute(g1.attributes.VALUE,this._value)}}get rgba(){return this._rgba?w({},this._rgba):null}set rgba(t){t?t5(t)&&(this.value=xo(t)):this.value=null}get hsva(){return this._hsva?w({},this._hsva):null}set hsva(t){t?e5(t)&&(this.value=xo(Hr(t))):this.value=null}get opacity(){return this._hsva?this._hsva.a:null}set opacity(t){this._hsva.a!==t&&t!=null&&this._allowOpacity&&(t>=0&&t<=1?(this._hsva.a=t,this._syncColors(),this._initialized&&(this._opacitySlider.setValue(this._hsva.a),this._render())):console.warn(`The provided opacity value (${t}) must be between 0 and 1.`))}get allowOpacity(){return this._allowOpacity}set allowOpacity(t){this._allowOpacity=t,this._initialized&&this._initializeOpacity()}get debounceChangeEvent(){return this._debounceChangeEvent}set debounceChangeEvent(t){this._debounceChangeEvent!==t&&(this._debounceChangeEvent=t,this._initialized&&this._applyChangeEventTrigger())}};var s_='<template><div class="forge-color-picker" part="root"><input type="color" tabindex="-1" class="forge-color-picker__input" spellcheck="false" autocomplete="off" aria-label="Color picker value" part="input"><div class="forge-color-picker__container" part="container"><div class="forge-color-picker__gradient" tabindex="0" part="gradient"><div class="forge-color-picker__gradient-color" part="gradient-color"></div><div class="forge-color-picker__gradient-thumb" part="gradient-thumb"></div></div><div class="forge-color-picker__control-preview" part="controls-preview-container"><div class="forge-color-picker__controls" part="controls-container"><div class="forge-color-picker__slider-control" part="hue-control-container"><div class="forge-color-picker__slider forge-color-picker__hue-slider" part="hue-control-slider"><div class="forge-color-picker__slider-thumb" id="forge-color-picker-hue-thumb" part="hue-control-slider-thumb" tabindex="0" role="slider" aria-label="Change hue" aria-valuemin="0" aria-valuemax="360" aria-valuenow="0" aria-orientation="horizontal" aria-valuetext="0"></div></div></div><div class="forge-color-picker__slider-control" part="opacity-control-container"><div class="forge-color-picker__canvas" part="opacity-control-canvas"><div class="forge-color-picker__slider forge-color-picker__opacity-slider" part="opacity-control-slider"><div class="forge-color-picker__slider-thumb" id="forge-color-picker-opacity-thumb" part="opacity-control-slider-thumb" tabindex="0" role="slider" aria-label="Change opacity" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-orientation="horizontal" aria-valuetext="0"></div></div></div></div></div><div class="forge-color-picker__color-preview-container forge-color-picker__canvas" part="color-preview-container"><div class="forge-color-picker__color-preview" part="color-preview"></div></div></div><div class="forge-color-picker__value" part="value-container"><div class="forge-color-picker__color-types" part="types-container"><div class="forge-color-picker__color-hex" part="hex-type-container"><div part="hex-type-label-wrapper"><label for="forge-color-picker-hex-input" part="hex-label">HEX</label></div><input type="text" id="forge-color-picker-hex-input" part="hex-input" style="width: 88px" maxlength="9" spellcheck="false" autocomplete="off" aria-label="HEX value"></div><div class="forge-color-picker__color-rgba" part="rgba-type-container"><div part="rgba-type-wrapper-r"><label for="forge-color-picker-rgba-r-input" part="rgba-type-label-r">R</label> <input type="number" id="forge-color-picker-rgba-r-input" part="rgba-type-input-r" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Red"></div><div part="rgba-type-wrapper-g"><label for="forge-color-picker-rgba-g-input" part="rgba-type-label-g">G</label> <input type="number" id="forge-color-picker-rgba-g-input" part="rgba-type-input-g" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Green"></div><div part="rgba-type-wrapper-b"><label for="forge-color-picker-rgba-b-input" part="rgba-type-label-b">B</label> <input type="number" id="forge-color-picker-rgba-b-input" part="rgba-type-input-b" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Blue"></div><div part="rgba-type-wrapper-a"><label for="forge-color-picker-rgba-a-input" part="rgba-type-label-a">A</label> <input type="number" id="forge-color-picker-rgba-a-input" part="rgba-type-input-a" min="0" max="1" step="0.1" maxlength="3" autocomplete="off" aria-label="Alpha"></div></div><div class="forge-color-picker__color-hsva" part="hsva-type-container"><div part="hsva-type-wrapper-h"><label for="forge-color-picker-hsva-h-input" part="hsva-type-label-h">H</label> <input type="number" id="forge-color-picker-hsva-h-input" part="hsva-type-input-h" min="0" max="360" maxlength="3" autocomplete="off" aria-label="Hue"></div><div part="hsva-type-wrapper-s"><label for="forge-color-picker-hsva-s-input" part="hsva-type-label-s">S</label> <input type="number" id="forge-color-picker-hsva-s-input" part="hsva-type-input-s" min="0" max="100" maxlength="3" autocomplete="off" aria-label="Saturation"></div><div part="hsva-type-wrapper-v"><label for="forge-color-picker-hsva-v-input" part="hsva-type-label-v">V</label> <input type="number" id="forge-color-picker-hsva-v-input" part="hsva-type-input-v" min="0" max="100" maxlength="3" autocomplete="off" aria-label="Value"></div><div part="hsva-type-wrapper-a"><label for="forge-color-picker-hsva-a-input" part="hsva-type-label-a">A</label> <input type="number" id="forge-color-picker-hsva-a-input" part="hsva-type-input-a" min="0" max="1" step="0.1" maxlength="3" autocomplete="off" aria-label="Alpha"></div></div></div><div class="forge-color-picker__type-button" part="type-container"><forge-icon-button part="type-button" id="forge-color-picker-type-button" aria-labelledby="type-button-tooltip" part="type-button-element"><forge-icon name="unfold_more" part="type-button-icon"></forge-icon></forge-icon-button><forge-tooltip placement="bottom" id="type-button-tooltip">Change color format</forge-tooltip></div></div></div></div></template>',l_='*{box-sizing:border-box}.forge-color-picker{width:var(--forge-color-picker-width,272px);position:relative;display:inline-block;overflow:hidden}.forge-color-picker__input{height:1px;opacity:0;position:absolute;width:1px}.forge-color-picker__gradient{position:relative;outline:0}.forge-color-picker__gradient-color{background:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);height:152px}.forge-color-picker__gradient-thumb{border:1px solid #fff;border-radius:50%;cursor:pointer;display:inline-block;height:10px;width:10px;margin-left:-5px;margin-top:-5px;position:absolute;touch-action:none;user-select:none;transition:left .2s cubic-bezier(.25, .8, .25, 1) 0s,top .2s cubic-bezier(.25, .8, .25, 1) 0s}.forge-color-picker__control-preview{display:flex;align-items:center;width:100%;padding:16px}.forge-color-picker__controls{flex:1;margin-right:16px}.forge-color-picker__slider{position:relative}.forge-color-picker__slider-thumb{outline:0;height:16px;width:16px;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);position:absolute;border-radius:50%;top:calc(50% - 8px);margin-left:-8px;transition:left .4s cubic-bezier(.25, .8, .25, 1)}.forge-color-picker__slider-thumb--active{transition:none}.forge-color-picker__slider-thumb:hover{cursor:pointer}.forge-color-picker__color-preview-container{border-radius:50%;box-shadow:0 0 2px 0 rgba(0,0,0,.54) inset,0 0 2px 0 rgba(0,0,0,.54);overflow:hidden}.forge-color-picker__color-preview{height:32px;width:32px;transition:background-color .2s cubic-bezier(.25, .8, .25, 1)}.forge-color-picker__value{display:flex;width:100%;align-items:center;padding:0 8px 16px 16px;font-size:12px}.forge-color-picker__color-types{flex:1}.forge-color-picker__color-types label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);color:var(--forge-theme-text-medium,rgba(0,0,0,.6))}.forge-color-picker__color-types input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-color-picker__color-types input[type=number],.forge-color-picker__color-types input[type=text]{border-color:var(--forge-theme-outline,#e0e0e0);color:var(--forge-theme-on-surface,#000);background-color:transparent;padding:4px 8px;border-width:1px;border-style:solid;border-radius:4px;box-sizing:border-box;outline:0;transition-property:box-shadow,border-colo;transition-duration:var(--forge-animation-duration-short4, 200ms);transition-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}.forge-color-picker__color-types input[type=number]:hover,.forge-color-picker__color-types input[type=text]:hover{border-color:var(--forge-theme-text-high,rgba(0,0,0,.87))}.forge-color-picker__color-types input[type=number]:focus,.forge-color-picker__color-types input[type=text]:focus{border-color:var(--forge-theme-primary,#3f51b5);box-shadow:0 0 0 1px inset var(--forge-theme-primary,#3f51b5)}.forge-color-picker__color-types input[type=number]{text-align:center;-moz-appearance:textfield}.forge-color-picker__color-types input[type=number]::-webkit-inner-spin-button,.forge-color-picker__color-types input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}.forge-color-picker__color-hex{display:flex;flex-direction:column;justify-content:center;align-items:space-between}.forge-color-picker__canvas{background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNnB4IiBoZWlnaHQ9IjZweCIgdmlld0JveD0iMCAwIDYgNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTAgKDU0OTgzKSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5Hcm91cCA5PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Ikdyb3VwLTkiPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTExIiBmaWxsPSIjRTBFMEUwIiB4PSIwIiB5PSIwIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMTEtQ29weS0yIiBmaWxsPSIjRkZGRkZGIiB4PSIwIiB5PSIzIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMTEtQ29weSIgZmlsbD0iI0ZGRkZGRiIgeD0iMyIgeT0iMCIgd2lkdGg9IjMiIGhlaWdodD0iMyI+PC9yZWN0PgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTExLUNvcHktMyIgZmlsbD0iI0UwRTBFMCIgeD0iMyIgeT0iMyIgd2lkdGg9IjMiIGhlaWdodD0iMyI+PC9yZWN0PgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+")}.forge-color-picker__hue-slider{height:8px;background:linear-gradient(to right,red 0,#ff0 16%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 84%,#ff0004 100%)}.forge-color-picker__opacity-slider{height:8px;margin-top:16px;background:linear-gradient(to right,rgba(255,0,0,0) 0,red 100%)}.forge-color-picker__color-hsva,.forge-color-picker__color-rgba{display:flex}.forge-color-picker__color-hsva div,.forge-color-picker__color-rgba div{margin-right:4px}.forge-color-picker__color-hsva label,.forge-color-picker__color-rgba label{display:block;text-align:center}.forge-color-picker__color-hsva input,.forge-color-picker__color-rgba input{width:44px}:host{display:inline-block}:host([hidden]){display:none}',ce=class extends M{static get observedAttributes(){return[g1.attributes.VALUE,g1.attributes.ALLOW_OPACITY,g1.attributes.DEBOUNCE_CHANGE_EVENT]}constructor(){super(),q.define(l3),H(this,s_,l_),this._core=new Ss(new As(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case g1.attributes.VALUE:this.value=a;break;case g1.attributes.ALLOW_OPACITY:this.allowOpacity=p(a);break;case g1.attributes.DEBOUNCE_CHANGE_EVENT:this.debounceChangeEvent=p(a);break}}};s([v()],ce.prototype,"value",2),s([v()],ce.prototype,"rgba",2),s([v()],ce.prototype,"hsva",2),s([v()],ce.prototype,"opacity",2),s([v()],ce.prototype,"allowOpacity",2),s([v()],ce.prototype,"debounceChangeEvent",2),ce=s([y({name:g1.elementName,dependencies:[n1,p1,X]})],ce);function Gp(){x(ce)}var v_={MIN:"min",MAX:"max",OPEN:"open",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",MASKED:"masked",MASK_FORMAT:"mask-format",SHOW_MASK_FORMAT:"show-mask-format",VALUE_MODE:"value-mode",ALLOW_INVALID_DATE:"allow-invalid-date",SHOW_TODAY:"show-today",SHOW_CLEAR:"show-clear",DISABLED_DAYS_OF_WEEK:"disabled-days-of-week",YEAR_RANGE:"year-range",LOCALE:"locale",CALENDAR_TEXT:"calendar-text"},h_={TOGGLE:"forge-date-picker-toggle"},c_={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},R1={observedAttributes:v_,attributes:h_,selectors:c_};var G1=class extends M{constructor(){super()}connectedCallback(){this.querySelector(R1.selectors.INPUT)?this._core.initialize():I0(this,R1.selectors.INPUT).then(()=>{this._core.initialize()})}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case R1.observedAttributes.MIN:this.min=a;break;case R1.observedAttributes.MAX:this.max=a;break;case R1.observedAttributes.OPEN:this.open=p(a);break;case R1.observedAttributes.POPUP_CLASSES:this.popupClasses=a;break;case R1.observedAttributes.DISABLED:this.disabled=p(a);break;case R1.observedAttributes.MASKED:this.masked=p(a);break;case R1.observedAttributes.SHOW_MASK_FORMAT:this.showMaskFormat=p(a);break;case R1.observedAttributes.MASK_FORMAT:this.maskFormat=a;break;case R1.observedAttributes.VALUE_MODE:this.valueMode=a;break;case R1.observedAttributes.ALLOW_INVALID_DATE:this.allowInvalidDate=p(a);break;case R1.observedAttributes.SHOW_TODAY:this.showToday=p(a);break;case R1.observedAttributes.SHOW_CLEAR:this.showClear=p(a);break;case R1.observedAttributes.DISABLED_DAYS_OF_WEEK:this.disabledDaysOfWeek=Tr(a);break;case R1.observedAttributes.YEAR_RANGE:this.yearRange=a;break;case R1.observedAttributes.LOCALE:this.locale=a;break;case R1.observedAttributes.CALENDAR_TEXT:this.calendarText=JSON.parse(a);break}}};s([v()],G1.prototype,"value",2),s([v()],G1.prototype,"min",2),s([v()],G1.prototype,"max",2),s([v()],G1.prototype,"disabledDates",2),s([v()],G1.prototype,"open",2),s([v()],G1.prototype,"popupClasses",2),s([v()],G1.prototype,"disabled",2),s([v()],G1.prototype,"masked",2),s([v()],G1.prototype,"maskFormat",2),s([v()],G1.prototype,"showMaskFormat",2),s([v()],G1.prototype,"valueMode",2),s([v()],G1.prototype,"notifyInputValueChanges",2),s([v()],G1.prototype,"allowInvalidDate",2),s([v()],G1.prototype,"showToday",2),s([v()],G1.prototype,"showClear",2),s([v()],G1.prototype,"parseCallback",2),s([v()],G1.prototype,"formatCallback",2),s([v()],G1.prototype,"prepareMaskCallback",2),s([v()],G1.prototype,"disabledDaysOfWeek",2),s([v()],G1.prototype,"disableDayCallback",2),s([v()],G1.prototype,"yearRange",2),s([v()],G1.prototype,"locale",2),s([v()],G1.prototype,"calendarText",2);function ks(r){let t=document.createElement("forge-icon-button");t.type="button",t.tabIndex=-1,t.setAttribute("aria-label","Toggle calendar"),t.slot="end",t.density="medium";let e=document.createElement("forge-icon");return e.name=r,t.appendChild(e),t}var bo=class extends I{constructor(e){super(e);this._valueChangeListeners=[];this._identifier=P2()}initialize(){this._initializeInput()}destroy(){var e;(e=this._calendarDropdown)==null||e.destroy(),this.destroyValueChangeListener()}destroyValueChangeListener(){this._valueChangeListeners.forEach(e=>e())}addToggleListener(e,a){var o;(o=this._toggleElement)==null||o.addEventListener(e,a)}removeToggleListener(e,a){var o;(o=this._toggleElement)==null||o.removeEventListener(e,a)}attachCalendar(e,a){var o,n,i;if((o=this._calendarDropdown)==null||o.destroy(),this._initializeCalendarDropdown(),!this._calendarDropdown)throw new Error("CalendarDropdown was not initialized.");a&&Object.assign(this._calendarDropdown,a),this._calendarDropdown.open(e),(n=this._calendarDropdown.dropdownElement)==null||n.style.setProperty("--forge-calendar-width","320px"),(i=this._calendarDropdown.calendar)==null||i.style.setProperty("margin","8px"),this.setCalendarText((a==null?void 0:a.calendarText)||{})}detachCalendar(){this._calendarDropdown&&this._calendarDropdown.isOpen&&this._calendarDropdown.close()}goToCalendarDate(e){var a,o;(o=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||o.goToDate(e,!0)}addCalendarListener(e,a){var o,n;(n=(o=this._calendarDropdown)==null?void 0:o.calendar)==null||n.addEventListener(e,a)}removeCalendarListener(e,a){var o,n;(n=(o=this._calendarDropdown)==null?void 0:o.calendar)==null||n.removeEventListener(e,a)}setCalendarValue(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.value=e)}setCalendarMinDate(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.min=e)}setCalendarMaxDate(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.max=e)}setCalendarDisabledDates(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDates=e)}setCalendarDisabledDaysOfWeek(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDaysOfWeek=e)}setCalendarDisableDayCallback(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDateBuilder=e)}setCalendarActiveDate(e){var a,o;(o=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||o.setActiveDate(e)}getCalendarActiveDate(){var e,a;return(a=(e=this._calendarDropdown)==null?void 0:e.calendar)==null?void 0:a.activeDate}setCalendarYearRange(e){var a,o;(o=(a=this._calendarDropdown)==null?void 0:a.calendar)!=null&&o.yearRange&&(this._calendarDropdown.calendar.yearRange=e)}setCalendarLocale(e){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.locale=e)}setCalendarText(e){var o;let a=(o=this._calendarDropdown)==null?void 0:o.calendar;if(a){if(e.today){let n=document.createElement("span");n.slot=m.slots.TODAY_BUTTON_TEXT,n.textContent=e.today,a.append(n)}if(e.clear){let n=document.createElement("span");n.slot=m.slots.CLEAR_BUTTON_TEXT,n.textContent=e.clear,a.append(n)}if(e.nextMonth){let n=document.createElement("span");n.slot=m.slots.NEXT_MONTH_BUTTON_TEXT,n.textContent=e.nextMonth,a.append(n)}if(e.previousMonth){let n=document.createElement("span");n.slot=m.slots.PREVIOUS_MONTH_BUTTON_TEXT,n.textContent=e.previousMonth,a.append(n)}if(e.nextYear){let n=document.createElement("span");n.slot=m.slots.NEXT_YEAR_BUTTON_TEXT,n.textContent=e.nextYear,a.append(n)}if(e.previousYear){let n=document.createElement("span");n.slot=m.slots.PREVIOUS_YEAR_BUTTON_TEXT,n.textContent=e.previousYear,a.append(n)}if(e.nextYears){let n=document.createElement("span");n.slot=m.slots.NEXT_YEARS_BUTTON_TEXT,n.textContent=e.nextYears,a.append(n)}if(e.previousYears){let n=document.createElement("span");n.slot=m.slots.PREVIOUS_YEARS_BUTTON_TEXT,n.textContent=e.previousYears,a.append(n)}}}propagateCalendarKey(e){var a,o;(o=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||o.handleKey(e)}tryCreateToggle(){let e=this._component.querySelector("forge-text-field"),a=this._component.querySelector(R1.selectors.TOGGLE);if(e){let o=e.querySelector(`${J.elementName}[slot=end]`);if(o||a){this._toggleElement=o||a;return}let n=this._createToggleElement();e.appendChild(n),this._toggleElement=n}else a&&(this._toggleElement=a)}_createToggleElement(){return ks("insert_invitation")}_getDefaultTargetElement(){let e=this._component.querySelector(V1.elementName);return e!=null&&e.popoverTargetElement?e.popoverTargetElement:this._component.querySelector("input")||this._component}};var Ir=`${b}date-picker`,p_={VALUE:"value"},d_={INPUT:"input,input[forge-date-picker-input]"},m_={CHANGE:`${Ir}-change`,OPEN:`${Ir}-open`,CLOSE:`${Ir}-close`,INPUT:`${Ir}-input`},ft={elementName:Ir,selectors:d_,events:m_,observedAttributes:p_};var Os=class extends bo{constructor(t){super(t),this._dropdownIdentifier=`forge-date-picker-${this._identifier}`}_initializeInput(){this._inputElement=this._component.querySelector(ft.selectors.INPUT)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new _o(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=new ga(this._inputElement,t)}destroyMask(){var t;(t=this._inputMask)==null||t.destroy(),this._inputMask=void 0}initializeAccessibility(){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-owns",this._dropdownIdentifier),Oe(),Zt(this._inputElement)}addInputListener(t,e,a){var o;(o=this._inputElement)==null||o.addEventListener(t,e,{capture:a})}removeInputListener(t,e,a){var o;(o=this._inputElement)==null||o.removeEventListener(t,e,{capture:a})}setInputValueChangedListener(t,e){this.destroyValueChangeListener();let a=a0(t,this._inputElement,"value",e);this._valueChangeListeners.push(a)}hasInputElement(){return!!this._inputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._inputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._inputElement&&(this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._inputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._inputElement.value!==t&&(this._inputElement.value=t,this._inputMask&&this._inputMask.updateMask(),e&&(this._inputElement.dispatchEvent(new Event("change")),this._inputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return Se(this._component.ownerDocument)===this._inputElement}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(t){this._inputElement.disabled=t,this._inputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t,this._toggleElement.tabIndex=-1))}tryFocusInput(){this._inputElement.focus()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}emitInputEvent(t,e){o0(this._inputElement,t,e)}};var yo=class{constructor(t){this._adapter=t;this._value=null;this._min=null;this._max=null;this._disabledDates=null;this._open=!1;this._disabled=!1;this._masked=!0;this._maskFormat=hn;this._showMaskFormat=!1;this._valueMode="object";this._notifyInputValueChanges=!0;this._allowInvalidDate=!1;this._showToday=!1;this._showClear=!1;this._yearRange="-50:+50";this._calendarText={};this._isInitialized=!1;this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputValueChangedListener=e=>this._onInputValueChanged(e),this._dropdownCloseListener=()=>this._onDropdownClose(),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._dateSelectListener=e=>this._onDateSelected(e.detail),this._monthChangeListener=e=>this._onMonthChanged(e),this._activeChangeListener=e=>this._onActiveDescendantChanged(e),this._todayListener=()=>this._onToday(),this._clearListener=()=>this._onClear()}initialize(){var t;if(this._adapter.initialize(),this._adapter.initializeAccessibility(),!this._adapter.hasInputElement())throw new Error("Unable to locate child <input> element.");(t=this._initializeState)==null||t.call(this),this._adapter.tryCreateToggle(),this._masked||this._setInputChangeListeners(),this._initializeListeners(),this._setFormattedInputValue(!0),this._applyDisabled(),this._applyMask(),this._initializeValueChangedListeners(),this._isInitialized=!0}destroy(){this._isInitialized=!1,this._destroyListeners(),this._masked&&this._adapter.destroyMask(),this._closeCalendar(),this._adapter.destroy()}_initializeListeners(){this._adapter.addToggleListener("mousedown",this._toggleMousedownListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener)}_initializeValueChangedListeners(){this._adapter.setInputValueChangedListener(this,this._inputValueChangedListener)}_setInputChangeListeners(){this._adapter.addInputListener("input",this._inputListener)}_removeInputChangeListeners(){this._adapter.removeInputListener("input",this._inputListener)}_destroyListeners(){this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._removeInputChangeListeners()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputFocus(t){this.masked&&this.showMaskFormat&&this._applyMask(),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this.showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeCalendar(!0)}_openCalendar(t=!1){this._formatInputValue();let e={mode:this._mode,value:this._getCurrentValue(),min:this._min,max:this._max,disabledDates:this._disabledDates,yearRange:this._yearRange,todayButton:this._showToday,clearButton:this._showClear,todayCallback:this._todayListener,clearCallback:this._clearListener,disabledDateBuilder:this._disableDayCallback,disabledDaysOfWeek:this._disabledDaysOfWeek,preventFocus:!0,menuAnimation:"fade",fixedHeight:!0,selectionFollowsMonth:!0,locale:this._locale},a={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener,calendarText:this._calendarText},o=new Date().getTime();this._min&&this._max&&this._max.getTime()<o&&(e.year=this._min.getFullYear(),e.month=this._min.getMonth()),this._adapter.attachCalendar(e,a),this._adapter.addCalendarListener(m.events.DATE_SELECT,this._dateSelectListener),this._adapter.addCalendarListener(m.events.MONTH_CHANGE,this._monthChangeListener),this._open=!0,this._adapter.setHostAttribute(R1.observedAttributes.OPEN),t&&this._emitOpenEvent()}_closeCalendar(t=!1){this._open=!1,this._adapter.removeHostAttribute(R1.observedAttributes.OPEN),this._adapter.removeCalendarListener(m.events.DATE_SELECT,this._dateSelectListener),this._adapter.removeCalendarListener(m.events.MONTH_CHANGE,this._monthChangeListener),this._adapter.detachCalendar(),t&&this._emitCloseEvent()}_onInputKeydown(t){if(t.shiftKey)switch(t.key){case"Delete":case"Backspace":t.preventDefault(),this._onClear(),this._open&&this._closeCalendar(!0);return;case"ArrowLeft":case"ArrowRight":case"m":case"M":case"y":case"Y":case"d":case"D":if(this._open){t.preventDefault(),this._adapter.propagateCalendarKey(t);return}break}switch(t.key){case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeCalendar(!0));break;case"ArrowDown":t.preventDefault(),this._open?this._adapter.propagateCalendarKey(t):(this._adapter.selectInputText(),this._openCalendar(!0));break;case"ArrowUp":this._open&&(t.preventDefault(),this._adapter.propagateCalendarKey(t));break;case"ArrowLeft":case"ArrowRight":case"Enter":case"Home":case"End":if(this._open){t.key==="Enter"&&t.stopPropagation(),t.preventDefault();let e=["ArrowLeft","ArrowRight"].includes(t.key);this._masked&&e&&t.stopImmediatePropagation(),this._adapter.propagateCalendarKey(t)}break;case"n":case"t":t.preventDefault(),this._onToday(),this._open&&this._closeCalendar(!0);break;case"PageUp":case"PageDown":this._open&&(t.preventDefault(),this._adapter.propagateCalendarKey(t));break;case"Tab":if(this._open){let e=this._adapter.getCalendarActiveDate();e&&this._onDateSelected({date:e,selected:!0,type:"date"})}break}}_getSanitizedDateString(t){return t.replace(/_|[a-z]|[A-Z]/g,"").replace(/\/$|\/\/$/,"")}_onToggleMousedown(t){this._disabled||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeCalendar(!0):($2.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openCalendar(!0))))}_onDropdownClose(){this._closeCalendar(!0)}_onMonthChanged(t){this._adapter.redispatchEvent(t)}_onActiveDescendantChanged(t){this._adapter.setActiveDescendant(t)}_formatInputValue(){let t=this._adapter.getInputValue();if(t){let e=this._parseDateString(t);if(gt(e)&&this._isDateValueAcceptable(e)){let a=this._formatDate(e);a&&a!==t&&this._adapter.setInputValue(a,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setInputValue("",this._notifyInputValueChanges)}}_formatDate(t){return gt(t)?typeof this._formatCallback=="function"?this._formatCallback(t):d3(t):""}_parseDateString(t){if(t=t.replace(/_|\s/g,""),!t||!t.length)return null;let e=typeof this._parseCallback=="function"?this._parseCallback(t):p3(t);return gt(e)?e:null}_coerceDateValue(t){return typeof t=="string"?this._parseDateString(t):t}_getTypedValue(t){switch(this._valueMode){case"object":return t;case"string":return this._formatDate(t);case"iso-string":return t&&t.setHours(0,0,0,0),t?t.toISOString():null;default:return t}}_isDateValueAcceptable(t){if(!t||this._allowInvalidDate)return!0;let e=()=>this._min&&!this._allowInvalidDate?this._min.getTime()<=t.getTime():!0,a=()=>this._max&&!this._allowInvalidDate?this._max.getTime()>=t.getTime():!0,o=()=>Array.isArray(this._disabledDates)?this._disabledDates:this._disabledDates?[this._disabledDates]:[],n=()=>!o().some(h=>h.getTime()===t.getTime()),i=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(t.getDay())),l=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(t);return e()&&a()&&n()&&i()&&l()}_initializeMask(){let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,a,o,n)=>this._prepareMaskCallback.call(null,e,a,o,n)),this._adapter.initializeMask(t)}_applyMask(){this._masked?this._initializeMask():(this._adapter.destroyMask(),this._formatInputValue())}_applyMin(){this._isInitialized&&this._adapter.setCalendarMinDate(this._min)}_applyMax(){this._isInitialized&&this._adapter.setCalendarMaxDate(this._max)}_applyDisableDayCallback(){this._adapter.setCalendarDisableDayCallback(this._disableDayCallback)}_applyDisabled(){this._adapter.setDisabled(this._disabled)}get valueMode(){return this._valueMode}set valueMode(t){if(this._valueMode!==t){if(!["object","string","iso-string"].includes(t))return;this._valueMode=t,this._emitChangeEvent(this._value),this._adapter.setHostAttribute(R1.observedAttributes.VALUE_MODE,this._valueMode)}}get min(){return this._min?new Date(this._min.getTime()):null}set min(t){if(this._min!==t){let e=this._coerceDateValue(t);this._min=e?new Date(e.getTime()):null,this._applyMin(),this._isInitialized&&this._open&&this._adapter.setCalendarMinDate(this._min)}}get max(){return this._max?new Date(this._max.getTime()):null}set max(t){this._max!==t&&(this._max=this._coerceDateValue(t),this._applyMax(),this._isInitialized&&this._open&&this._adapter.setCalendarMaxDate(this._max))}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openCalendar():this._closeCalendar())}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._isInitialized&&this._applyDisabled())}get disabledDates(){return this._disabledDates?Array.isArray(this._disabledDates)?this._disabledDates.map(t=>new Date(t.getTime())):new Date(this._disabledDates.getTime()):null}set disabledDates(t){t?Array.isArray(t)?this._disabledDates=t.map(e=>new Date(e.getTime())):this._disabledDates=new Date(t.getTime()):this._disabledDates=null,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDates(this._disabledDates),this._applyDisabledDates()}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=t}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._removeInputChangeListeners(),this._applyMask()):(this._adapter.destroyMask(),this._setInputChangeListeners(),this._formatInputValue())))}get maskFormat(){return this._maskFormat}set maskFormat(t){this._maskFormat!==t&&(this._maskFormat=t,this._isInitialized&&this._applyMask())}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get notifyInputValueChanges(){return this._notifyInputValueChanges}set notifyInputValueChanges(t){this._notifyInputValueChanges=t}get allowInvalidDate(){return this._allowInvalidDate}set allowInvalidDate(t){this._allowInvalidDate!==t&&(this._allowInvalidDate=t,this._adapter.toggleHostAttribute(R1.observedAttributes.ALLOW_INVALID_DATE,this._allowInvalidDate))}get disabledDaysOfWeek(){return this._disabledDaysOfWeek}set disabledDaysOfWeek(t){this._disabledDaysOfWeek!==t&&(this._disabledDaysOfWeek=t,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek),this._applyDisabledDaysOfWeek())}get disableDayCallback(){return this._disableDayCallback}set disableDayCallback(t){t!==this._disableDayCallback&&(this._disableDayCallback=t,this._applyDisableDayCallback())}get parseCallback(){return this._parseCallback}set parseCallback(t){this._parseCallback=t,this._isInitialized&&this._applyMask()}get formatCallback(){return this._formatCallback}set formatCallback(t){this._formatCallback=t,this._isInitialized&&this._applyMask()}get prepareMaskCallback(){return this._prepareMaskCallback}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get showToday(){return this._showToday}set showToday(t){this._showToday=t}get showClear(){return this._showClear}set showClear(t){this._showClear=t}get yearRange(){return this._yearRange}set yearRange(t){this._yearRange!==t&&(this._yearRange=t,this._isInitialized&&this._open&&this._adapter.setCalendarYearRange(this._yearRange))}get locale(){return this._locale}set locale(t){this._locale!==t&&(this._locale=t,this._isInitialized&&this._open&&this._adapter.setCalendarLocale(this._locale))}get calendarText(){return w({},this._calendarText)}set calendarText(t){JSON.stringify(this._calendarText)!==JSON.stringify(t)&&(this._calendarText=w({},t),this._adapter.setCalendarText(this._calendarText))}};var Ds=class extends yo{constructor(e){super(e);this._mode="single"}_initializeState(){this._value||(this._value=this._coerceDateValue(this._adapter.getInputValue()))}_emitChangeEvent(e,a){let o=this._getTypedValue(e);return this._adapter.emitHostEvent(ft.events.CHANGE,o,!0,!a)?(this._setValue(e),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(ft.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(ft.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;this._tryMergeCurrentTime(e),this._onDateSelected({date:e,selected:!0,type:"date"})}_onClear(){this._onDateSelected({date:null,selected:!1,type:"date"})}_getCurrentValue(){return this._value}_setFormattedInputValue(e){let a=this._formatDate(this._value);a?this._adapter.setInputValue(a,e?!1:this._notifyInputValueChanges):this._allowInvalidDate||this._adapter.setInputValue("",e?!1:this._notifyInputValueChanges)}_setValue(e){(!e||this._isDateValueAcceptable(e))&&(this._value=e)}_onDateSelected(e){let a=e.date;if(e.type==="date"&&this._closeCalendar(!0),this._tryMergeCurrentTime(a),!this._emitChangeEvent(a))return;let o=this._formatDate(a);this._adapter.setInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),$2.isMobile||this._adapter.selectInputText()}_openCalendar(e){super._openCalendar(e);let a=this._getCurrentValue();a&&this._adapter.goToCalendarDate(new Date(a))}_applyMin(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMin()}_applyMax(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMax()}_applyDisabledDates(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_applyDisabledDaysOfWeek(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_handleInput(e){let a=this._getSanitizedDateString(e),o=this._coerceDateValue(a);this._tryMergeCurrentTime(o),this._masked&&this._adapter.emitInputEvent(ft.events.INPUT,a),!f2(o,this._value)&&this._isDateValueAcceptable(o)&&this._emitChangeEvent(o)}_onInputValueChanged(e){let a=this._getSanitizedDateString(e);if(this._masked&&a)return;let o=this._coerceDateValue(a);!f2(o,this._value)&&this._isDateValueAcceptable(o)&&(this.value=o,this._emitChangeEvent(this._value))}_tryMergeCurrentTime(e){!e||!this._value||e.setHours(this._value.getHours(),this._value.getMinutes(),this._value.getSeconds(),this._value.getMilliseconds())}_applyValue(){this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(this._value)}get value(){let e=this._getTypedValue(this._value);return e?Na(e)?new Date(e.getTime()):e:null}set value(e){this._value!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&this._applyValue())}};var g_="<template><slot></slot></template>",w_=":host{display:block}:host([hidden]){display:none}",Mo=class extends G1{static get observedAttributes(){return[...Object.values(R1.observedAttributes),ft.observedAttributes.VALUE]}constructor(){super(),q.define(a3),H(this,g_,w_),this._core=new Ds(new Os(this))}attributeChangedCallback(t,e,a){switch(t){case ft.observedAttributes.VALUE:this.value=a;return}super.attributeChangedCallback(t,e,a)}};Mo=s([y({name:ft.elementName,dependencies:[P1,v1,n1,X]})],Mo);var Yp=class extends a2{constructor(t){super(t)}_build(){let t=document.createElement(ft.elementName);return this._attachTextField(t),t}getInputElement(){return this._textFieldDelegate.inputElement}getTextFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.masked?this._element.addEventListener(ft.events.INPUT,e=>t(e.target.value)):this.getInputElement().addEventListener("input",e=>t(e.target.value))}onInput(t){this._element.masked?this._element.addEventListener(ft.events.INPUT,e=>t(e.detail)):this._textFieldDelegate.inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var a,o,n,i;let e={props:w({},(o=(a=this._config.options)==null?void 0:a.textFieldDelegateConfig)==null?void 0:o.props),options:w({},(i=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:i.options)};this._textFieldDelegate=new J0(e),t.appendChild(this._textFieldDelegate.element)}};function Kp(){x(Mo)}var Vr=`${b}date-range-picker`,Ps=class r{constructor(t){t&&(this.from=t.from,this.to=t.to)}copy(){return new r(this)}},u_={FROM:"from",TO:"to",END_VALUE:"end-value"},__={INPUT:"input"},f_={CHANGE:`${Vr}-change`,OPEN:`${Vr}-open`,CLOSE:`${Vr}-close`,INPUT:`${Vr}-input`},k2={elementName:Vr,selectors:__,events:f_,observedAttributes:u_};var Ns=class extends bo{constructor(t){super(t),this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(k2.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(k2.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${k2.elementName} requires two inputs`);if(!this._component.querySelector(`[${V.attributes.MULTI_INPUT_SEPARATOR}]`)){let t=this._createInputSeparator();this._fromInputElement.insertAdjacentElement("afterend",t)}}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new _o(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new ga(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new ga(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier)),this._toInputElement.hasAttribute("aria-label")||this._toInputElement.setAttribute("aria-label","To date"),Oe(),this._applyToInputs(t=>Zt(t))}addInputListener(t,e,a){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:a})}addToInputListener(t,e,a){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:a})}removeInputListener(t,e){var a;(a=this._fromInputElement)==null||a.removeEventListener(t,e)}removeToInputListener(t,e){var a;(a=this._toInputElement)==null||a.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let a=a0(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(a)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=a0(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=Se(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t,this._toggleElement.tabIndex=-1))}emitInputEvent(t,e){o0(this._fromInputElement,t,e)}emitToInputEvent(t,e){o0(this._toInputElement,t,e)}_createToggleElement(){return ks("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}_createInputSeparator(){let t=document.createElement("span");return K(t,!0,V.attributes.MULTI_INPUT_SEPARATOR),t.setAttribute("aria-hidden","true"),t.textContent="-",t}};var Rs=class extends yo{constructor(e){super(e);this._mode="range";this._from=null;this._to=null;this._toInputListener=a=>this._onToInput(a),this._toInputValueChangedListener=a=>this._onToInputValueChanged(a),this._toInputKeydownListener=a=>this._onInputKeydown(a),this._toInputFocusListener=a=>this._onToInputFocus(),this._toInputBlurListener=a=>this._onToInputBlur(a)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(e){this._formatToInputValue(),super._openCalendar(e);let a=this._getCurrentValue();a!=null&&a.to?this._adapter.goToCalendarDate(new Date(a.to)):a!=null&&a.from&&this._adapter.goToCalendarDate(new Date(a.from))}_emitChangeEvent(e,a){let o=this._getTypedValue(e&&e.from||null),n=this._getTypedValue(e&&e.to||null),i=new Ps({from:o,to:n});return this._adapter.emitHostEvent(k2.events.CHANGE,i,!0,!a)?(this._setValue(this._coerceDateValue(e&&e.from||null)),this._setToValue(this._coerceDateValue(e&&e.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(k2.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(k2.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;this._tryMergeCurrentTime({from:e});let a=this._open?new l2({from:this._from||e,to:this._to||void 0}):new l2({from:e});this._isDateRangeAcceptable(a)&&(this.value=a,this._onDateSelected({date:e,range:a,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(e))}_onClear(){this._onDateSelected({date:null,range:new l2,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let e=this._adapter.getToInputValue();if(e){let a=this._parseDateString(e);if(gt(a)&&this._isDateValueAcceptable(a)){let o=this._formatDate(a);o&&this._adapter.setToInputValue(o,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(e){let a=this._formatDate(this._from);!a&&!this._allowInvalidDate&&(a=""),this._adapter.setInputValue(a,e?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(e){let a=this._formatDate(this._to);!a&&!this._allowInvalidDate&&(a=""),this._adapter.setToInputValue(a,e?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(e){if(!(e!=null&&e.to))return!0;let a=()=>this._isDateValueAcceptable(e.from),o=()=>this._isDateValueAcceptable(e.to),n=()=>e!=null&&e.from&&(e!=null&&e.to)?e.from.getTime()<=e.to.getTime():!0;return a()&&o()&&n()}_setValue(e){this._isDateValueAcceptable(e)&&(this._from=e||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(e){this._isDateValueAcceptable(e)&&(this._to=e||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(e){let a=e.range;if(e.rangeSelectionState==="to"&&this._closeCalendar(!0),this._tryMergeCurrentTime(a),!this._emitChangeEvent(a!=null?a:null))return;let o=this._formatDate(a&&a.from||null),n=this._formatDate(a&&a.to||null);this._adapter.setInputValue(o,this._notifyInputValueChanges),this._adapter.setToInputValue(n,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=a&&a.from||null,this._to=a&&a.to||null,$2.isMobile||(n?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeToMask(){if(!this._masked)return;let e={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:a=>this._handleToInput(a)};this._prepareMaskCallback&&(e.prepareCallback=(a,o,n,i)=>this._prepareMaskCallback.call(null,a,o,n,i)),this._adapter.initializeToMask(e)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(e){this._handleInput(this._adapter.getInputValue())}_handleInput(e){let a=this._getSanitizedDateString(e),o=this._coerceDateValue(a);this._tryMergeCurrentTime({from:o}),this._masked&&this._adapter.emitInputEvent(k2.events.INPUT,a),!f2(o,this._from)&&this._isDateValueAcceptable(o)&&this._emitChangeEvent(new l2({from:o||void 0,to:this._to||void 0}))}_handleToInput(e){let a=this._getSanitizedDateString(e),o=this._coerceDateValue(a);this._tryMergeCurrentTime({to:o}),this._masked&&this._adapter.emitToInputEvent(k2.events.INPUT,a),!f2(o,this._to)&&this._isDateValueAcceptable(o)&&this._emitChangeEvent(new l2({from:this._from||void 0,to:o||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(e){this._masked&&!this._adapter.isInputFocused(e.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(e){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(e){this.masked&&!this._adapter.isInputFocused(e.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(e.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(e){if(this._masked)return;let a=this._getSanitizedDateString(e),o=this._coerceDateValue(a);f2(o,this._from)||(this.from=o,this._emitChangeEvent(new l2({from:o||void 0,to:this._to||void 0})))}_onToInputValueChanged(e){if(this._masked)return;let a=this._getSanitizedDateString(e),o=this._coerceDateValue(a);f2(o,this._to)||(this.to=o,this._emitChangeEvent(new l2({from:this._from||void 0,to:o||void 0})))}_tryMergeCurrentTime(e){!e||!this._value||!this._value.from&&!this._value.to||(e.from&&this._value.from&&this._value.from instanceof Date&&e.from.setHours(this._value.from.getHours(),this._value.from.getMinutes(),this._value.from.getSeconds(),this._value.from.getMilliseconds()),e.to&&this._value.to&&this._value.to instanceof Date&&e.to.setHours(this._value.to.getHours(),this._value.to.getMinutes(),this._value.to.getSeconds(),this._value.to.getMilliseconds()))}get value(){return{from:this.from,to:this.to}}set value(e){e||(e={from:null,to:null}),e.from===void 0&&(e.from=null),e.to===void 0&&(e.to=null),this.from=e.from,this.to=e.to,this._value={from:this.from,to:this.to}}get from(){let e=this._getTypedValue(this._from);return e?Na(e)?new Date(e.getTime()):e:null}set from(e){this._from!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new l2({from:this._coerceDateValue(e)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let e=this._getTypedValue(this._to);return e?Na(e)?new Date(e.getTime()):e:null}set to(e){this._to!==e&&(this._setToValue(this._coerceDateValue(e)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new l2({to:this._coerceDateValue(e)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var x_="<template><slot></slot></template>",b_=":host{display:block}:host([hidden]){display:none}",oa=class extends G1{static get observedAttributes(){return[...Object.values(R1.observedAttributes),k2.observedAttributes.FROM,k2.observedAttributes.TO]}constructor(){super(),q.define(Q5),H(this,x_,b_),this._core=new Rs(new Ns(this))}attributeChangedCallback(t,e,a){switch(t){case k2.observedAttributes.FROM:this.from=a;return;case k2.observedAttributes.TO:this.to=a;return}super.attributeChangedCallback(t,e,a)}};s([v()],oa.prototype,"from",2),s([v()],oa.prototype,"to",2),oa=s([y({name:k2.elementName,dependencies:[P1,v1,n1,X]})],oa);var qp=class extends a2{constructor(t){super(t)}_build(){let t=document.createElement(k2.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector("input:first-of-type")}get toInput(){return this._textField.querySelector("input:last-of-type")}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(k2.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var a,o,n,i,l;this._textField=document.createElement(V1.elementName),(a=this._config.options)!=null&&a.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((n=this._config.options)==null?void 0:n.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((i=this._config.options)==null?void 0:i.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((l=this._config.options)==null?void 0:l.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function $p(){x(oa)}var Xp={OPEN:"open",DIRECTION:"direction"},y_=w({},Xp),jp={DRAWER:"forge-drawer",LEFT:"left",RIGHT:"right",CLOSING:"closing",CLOSED:"closed",NO_TRANSITION:"no-transition"},M_={DRAWER:`.${jp.DRAWER}`},H_={AFTER_OPEN:"forge-drawer-after-open",AFTER_CLOSE:"forge-drawer-after-close"},Z1={observedAttributes:Xp,attributes:y_,classes:jp,selectors:M_,events:H_};var ra=class extends I{constructor(e){super(e);this._component=e;this._drawerElement=g(this._component,Z1.selectors.DRAWER)}proxyScrollEvent(){this.tryUnproxyScrollEvent(),this._unproxyScrollEventCb=x3(this._component.shadowRoot,this._component)}tryUnproxyScrollEvent(){this._unproxyScrollEventCb&&this._unproxyScrollEventCb()}setDirection(e){switch(e){case"left":this._drawerElement.classList.remove(Z1.classes.RIGHT),this._drawerElement.classList.add(Z1.classes.LEFT);break;case"right":this._drawerElement.classList.remove(Z1.classes.LEFT),this._drawerElement.classList.add(Z1.classes.RIGHT);break}}removeDrawerClass(e){we(e,this._drawerElement)}setDrawerClass(e){y1(e,this._drawerElement)}listenTransitionComplete(e){this._activeTransitionListener&&this._drawerElement.removeEventListener("transitionend",this._activeTransitionListener),this._activeTransitionListener=a=>{a.propertyName==="transform"&&(this._activeTransitionListener&&(this._drawerElement.removeEventListener("transitionend",this._activeTransitionListener),this._activeTransitionListener=void 0),e())},this._drawerElement.addEventListener("transitionend",this._activeTransitionListener)}};var na=class{constructor(t){this._adapter=t;this._open=!0;this._direction="left";this._openAnimationListener=()=>this._onOpenComplete(),this._closeAnimationListener=()=>this._onCloseComplete()}initialize(){this._open?this._setOpened():this._setClosed(),this._applyDirection(),this._adapter.proxyScrollEvent()}destroy(){this._adapter.tryUnproxyScrollEvent()}_applyDirection(){this._adapter.setDirection(this._direction),this._adapter.setHostAttribute(Z1.attributes.DIRECTION,k(this._direction)?this._direction.toString():"")}_onOpenComplete(){if(!this._open)return;this._setOpened();let t=new CustomEvent(Z1.events.AFTER_OPEN,{bubbles:!0,composed:!0});this._adapter.dispatchHostEvent(t)}_onCloseComplete(){if(this._open)return;this._setClosed();let t=new CustomEvent(Z1.events.AFTER_CLOSE,{bubbles:!0,composed:!0});this._adapter.dispatchHostEvent(t)}_setOpened(){this._adapter.removeDrawerClass([Z1.classes.CLOSED,Z1.classes.CLOSING]),this._adapter.setHostAttribute(Z1.attributes.OPEN)}_setClosed(){this._adapter.removeDrawerClass([Z1.classes.CLOSING,Z1.classes.NO_TRANSITION]),this._adapter.setDrawerClass(Z1.classes.CLOSED),this._adapter.removeHostAttribute(Z1.attributes.OPEN)}_applyOpen(){this._open?(this._triggerDrawerOpen(),this._adapter.setHostAttribute(Z1.attributes.OPEN)):(this._triggerDrawerClose(),this._adapter.removeHostAttribute(Z1.attributes.OPEN))}async _triggerDrawerOpen(){this._adapter.listenTransitionComplete(this._openAnimationListener),await Ko(),this._adapter.removeDrawerClass([Z1.classes.CLOSED,Z1.classes.CLOSING])}async _triggerDrawerClose(){this._adapter.listenTransitionComplete(this._closeAnimationListener),await Ko(),this._adapter.setDrawerClass(Z1.classes.CLOSING)}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&this._applyOpen())}get direction(){return this._direction}set direction(t){this._direction!==t&&(this._direction=t,this._adapter.isConnected&&this._applyDirection())}};var Ke=class extends M{static get observedAttributes(){return Object.values(Z1.observedAttributes)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case Z1.observedAttributes.OPEN:this.open=p(a);break;case Z1.observedAttributes.DIRECTION:this.direction=a;break}}};s([v()],Ke.prototype,"open",2),s([v()],Ke.prototype,"direction",2);var L_=`${b}drawer`,Zp={elementName:L_};var I_='<template><div class="forge-drawer" part="root"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></template>',V_=':host{display:grid;box-sizing:border-box;height:100%;overflow:hidden!important;--forge-divider-margin:4px 0}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}:host([open]){transform:translateZ(0)}',Ho=class extends Ke{constructor(){super(),H(this,I_,V_),this._core=new na(new ra(this))}};Ho=s([y({name:Zp.elementName})],Ho);function Qp(){x(Ho)}var Fs=class extends ra{constructor(e){super(e);this._component=e;this._backdropElement=g(this._component,s2.elementName)}setBackdropCloseListener(e){this._backdropElement.addEventListener("click",e)}setBackdropVisibility(e,{immediate:a}){return this._backdropElement.toggleAttribute("hidden",!e),!this._backdropElement.fadeIn||!this._backdropElement.fadeOut?(a&&this._backdropElement.toggleAttribute(s2.attributes.VISIBLE,e),Promise.resolve()):a?Promise.resolve(e?this._backdropElement.show():this._backdropElement.hide()):e?this._backdropElement.fadeIn():this._backdropElement.fadeOut()}toggleBackdropClass(e,a){_2(this._backdropElement,e,a)}};var Jp=`${b}modal-drawer`,E_={DISPLAY_NONE:"display-none",SCRIM_CLOSED:"closed"},C_={CLOSE:`${Jp}-close`},Lo={elementName:Jp,classes:E_,events:C_};var Us=class extends na{constructor(e){super(e);this._adapter=e;this._open=!1;this._backdropClickListener=this._onBackdropClick.bind(this)}initialize(){super.initialize(),this._adapter.setBackdropCloseListener(this._backdropClickListener),this._setBackdrop(this._open,{immediate:!0})}async _triggerDrawerOpen(){super._triggerDrawerOpen(),this._setBackdrop(!0)}async _triggerDrawerClose(){super._triggerDrawerClose(),this._setBackdrop(!1)}_onBackdropClick(e){this._adapter.emitHostEvent(Lo.events.CLOSE,void 0,!0,!0)&&(this.open=!1)}async _setBackdrop(e,{immediate:a=!1}={}){e?(this._adapter.toggleBackdropClass(!1,Lo.classes.SCRIM_CLOSED),this._adapter.setBackdropVisibility(!0,{immediate:a})):this._adapter.isConnected&&(await this._adapter.setBackdropVisibility(!1,{immediate:a}),this._open||this._adapter.toggleBackdropClass(!0,Lo.classes.SCRIM_CLOSED))}};var z_='<template><forge-backdrop class="scrim" hidden exportparts="root:backdrop"></forge-backdrop><div class="forge-drawer modal" part="root"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></template>',A_=':host{--forge-divider-margin:4px 0}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}.forge-drawer.modal{position:absolute;top:0;z-index:var(--forge-z-index-dialog,8);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);max-width:80%}.forge-drawer.modal.closed,.forge-drawer.modal.closing{box-shadow:none}.forge-drawer.modal.closing.right{transform:translateX(100%)}.forge-drawer.right{right:0}.forge-drawer.display-none{display:none!important}.scrim{z-index:var(--forge-z-index-dialog,8)}.scrim.closed{display:none}',Io=class extends Ke{constructor(){super(),H(this,z_,A_),this._core=new Us(new Fs(this))}};Io=s([y({name:Lo.elementName,dependencies:[We]})],Io);function td(){x(Io)}var B_=`${b}mini-drawer`,T_={HOVER:"hover"},ed={elementName:B_,attributes:T_};var S_='<template><div class="root" part="root"><div class="forge-drawer mini" part="container"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></div></template>',k_=':host{--_mini-drawer-width:var(--forge-mini-drawer-width, 56px);--_mini-drawer-min-width:var(--forge-mini-drawer-min-width, var(--_mini-drawer-width));--_mini-drawer-hover-width:var(--forge-mini-drawer-hover-width, var(--forge-drawer-width, 256px));--_mini-drawer-transition-duration:var(--forge-mini-drawer-transition-duration, var(--forge-animation-duration-short4, 200ms));--_mini-drawer-transition-easing:var(--forge-mini-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_mini-drawer-transition-delay:var(--forge-mini-drawer-transition-delay, 300ms);--_mini-drawer-hover-transition-duration:var(--forge-mini-drawer-hover-transition-duration, var(--forge-animation-duration-medium2, 300ms));--_mini-drawer-hover-transition-easing:var(--forge-mini-drawer-hover-transition-easing, var(--_mini-drawer-transition-easing));--_mini-drawer-hover-transition-delay:var(--forge-mini-drawer-hover-transition-delay, var(--forge-animation-duration-medium2, 300ms))}:host{display:grid;box-sizing:border-box;height:100%;overflow:hidden!important;width:var(--_mini-drawer-width);overflow:visible!important;--forge-divider-margin:4px 0}:host([direction=right]){min-width:var(--_mini-drawer-width);width:auto}:host([direction=right]) .root{position:relative}:host(:not([open])){display:none}:host([hover]) .right{position:absolute;right:0}:host([hover]) .forge-drawer:hover{width:var(--_mini-drawer-hover-width)!important;transition:width var(--_mini-drawer-hover-transition-duration) var(--_mini-drawer-hover-transition-easing) var(--_mini-drawer-hover-transition-delay)}:host([hover]) .forge-drawer:hover .content{overflow:auto;overflow:overlay}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}.root{z-index:var(--forge-z-index-surface,1);height:100%;min-width:var(--_mini-drawer-min-width)}.forge-drawer.mini{width:var(--_mini-drawer-width);z-index:var(--forge-z-index-surface,1);transition:width var(--_mini-drawer-transition-duration) var(--_mini-drawer-transition-easing)}.forge-drawer.mini .content{overflow:hidden}.forge-drawer.closed{width:0}',Vo=class extends Ke{constructor(){super(),H(this,S_,k_),this._core=new na(new ra(this))}get hover(){return this.hasAttribute("hover")}set hover(t){this.toggleAttribute("hover",t)}};Vo=s([y({name:ed.elementName})],Vo);function ad(){x(Vo)}var od=`${b}file-picker`,O_={ACCEPT:"accept",MAX_SIZE:"max-size",CAPTURE:"capture",MULTIPLE:"multiple",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},D_={HIGHLIGHT:"highlight",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},P_={CONTAINER:"container",BUTTON:"button",INPUT:"input"},N_={CONTAINER:"#container",BUTTON:"#button",INPUT:"#input",BUTTON_SLOT:"#button-slot"},R_={FILES_CHANGED:`${od}-change`},w1={elementName:od,attributes:O_,classes:D_,ids:P_,selectors:N_,events:R_};var Ws=class extends I{constructor(t){super(t),this._container=g(t,w1.selectors.CONTAINER),this._buttonSlot=g(t,w1.selectors.BUTTON_SLOT),this._input=g(t,w1.selectors.INPUT),this._inputEventListener=()=>{this._input.value="",this._input.click()},this._container.addEventListener("click",this._inputEventListener)}destroy(){this._inputEventListener&&(this._container.removeEventListener("click",this._inputEventListener),this._inputEventListener=void 0)}registerButtonSlotListener(t){this._buttonSlot.addEventListener("slotchange",t)}registerInputChangeListener(t){this._input.addEventListener("change",t)}registerDragEnterListener(t){this._container.addEventListener("dragenter",t)}registerDragLeaveListener(t){this._container.addEventListener("dragleave",t)}registerDragOverListener(t){this._container.addEventListener("dragover",t)}registerDropListener(t){this._container.addEventListener("drop",t)}removeDragEnterListener(t){this._container.removeEventListener("dragenter",t)}removeDragLeaveListener(t){this._container.removeEventListener("dragleave",t)}removeDragOverListener(t){this._container.removeEventListener("dragover",t)}removeDropListener(t){this._container.removeEventListener("drop",t)}initializeButton(){let t=this._component.querySelector("forge-button");this._button=t||void 0}setHighlightState(t){this._container.classList.contains(w1.classes.HIGHLIGHT)!==t&&this._container.classList.toggle(w1.classes.HIGHLIGHT)}setAccept(t){t?this._input.setAttribute("accept",t):this._input.removeAttribute("accept")}setCapture(t){t?this._input.setAttribute("capture",t):this._input.removeAttribute("capture")}setMultiple(t){t?this._input.setAttribute("multiple",""):this._input.removeAttribute("multiple")}setDisabled(t){var e,a;t?(this._container.removeEventListener("click",this._inputEventListener),(e=this._button)==null||e.setAttribute("disabled",""),this._container.setAttribute("disabled","")):(this._container.addEventListener("click",this._inputEventListener),(a=this._button)==null||a.removeAttribute("disabled"),this._container.removeAttribute("disabled"))}setCompact(t){this._container.classList.contains(w1.classes.COMPACT)!==t&&this._container.classList.toggle(w1.classes.COMPACT)}setBorderless(t){this._container.classList.contains(w1.classes.BORDERLESS)!==t&&this._container.classList.toggle(w1.classes.BORDERLESS)}};var Gs=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._accept=null;this._maxSize=null;this._capture=null;this._multiple=!1;this._disabled=!1;this._compact=!1;this._borderless=!1;this._buttonSlotListener=e=>this._onButtonSlotChanged(e),this._inputChangeListener=e=>this._onInputChange(e),this._dragEnterListener=e=>this._onDragEnter(e),this._dragLeaveListener=e=>this._onDragLeave(e),this._dragOverListener=e=>this._onDragOver(e),this._dropListener=e=>this._onDrop(e),this._adapter.registerButtonSlotListener(this._buttonSlotListener),this._adapter.registerInputChangeListener(this._inputChangeListener),this._compact||this._registerDragListeners()}initialize(){this._adapter.initializeButton(),this._adapter.setDisabled(this._disabled),this._isInitialized=!0}destroy(){this._adapter.destroy(),this._isInitialized=!1}_onButtonSlotChanged(t){this._adapter.initializeButton()}_onInputChange(t){let e=t.target.files;e&&this._handleFiles(e)}_onDragEnter(t){this._handleDragEvent(t,!0)}_onDragLeave(t){this._handleDragEvent(t,!1)}_onDragOver(t){this._handleDragEvent(t,!0)}_onDrop(t){if(this._handleDragEvent(t,!1),!this._disabled){let e=t.dataTransfer;if(e){let a=e.files;this._handleFiles(a)}}}_registerDragListeners(){this._adapter.registerDragEnterListener(this._dragEnterListener),this._adapter.registerDragLeaveListener(this._dragLeaveListener),this._adapter.registerDragOverListener(this._dragOverListener),this._adapter.registerDropListener(this._dropListener)}_removeDragListeners(){this._adapter.removeDragEnterListener(this._dragEnterListener),this._adapter.removeDragLeaveListener(this._dragLeaveListener),this._adapter.removeDragOverListener(this._dragOverListener),this._adapter.removeDropListener(this._dropListener)}_handleFiles(t){let e={};if(t){let a=this._sortFiles(t),o=a.legalFiles||null;!this._multiple&&o&&o.length>1&&(o=o.splice(1)),e=a}this._adapter.emitHostEvent(w1.events.FILES_CHANGED,e)}_sortFiles(t){let e=[],a=[];if(!this._accept&&!this.maxSize)return e=Array.from(t),{legalFiles:e,illegalFiles:a};let o=this._accept?this._accept.split(",").map(n=>n.trim().toLowerCase()):[""];for(let n=0;n<t.length;n++)!o.some(i=>t[n].type.toLowerCase().match(i)||t[n].name.toLowerCase().match("\\"+i))||this._maxSize&&t[n].size>this._maxSize?a.push(t[n]):e.push(t[n]);return{legalFiles:e,illegalFiles:a}}_handleDragEvent(t,e){this._disabled||(t.preventDefault(),t.stopPropagation(),this._adapter.setHighlightState(e))}get accept(){return this._accept}set accept(t){this._accept!==t&&(this._accept=t,this._adapter.setAccept(t),this._adapter.toggleHostAttribute(w1.attributes.ACCEPT,!!t,String(t)))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize!==t&&(this._maxSize=t,this._adapter.toggleHostAttribute(w1.attributes.MAX_SIZE,!!t,String(t)))}get capture(){return this._capture}set capture(t){this._capture!==t&&(this._capture=t,this._adapter.setCapture(t),this._adapter.toggleHostAttribute(w1.attributes.CAPTURE,!!t,String(t)))}get multiple(){return this._multiple}set multiple(t){this._multiple!==t&&(this._multiple=t,this._adapter.setMultiple(t),this._adapter.toggleHostAttribute(w1.attributes.MULTIPLE,t))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._isInitialized&&this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(w1.attributes.DISABLED,t))}get compact(){return this._compact}set compact(t){this._compact!==t&&(this._compact=t,this._adapter.setCompact(t),t?this._removeDragListeners():this._registerDragListeners(),this._adapter.toggleHostAttribute(w1.attributes.COMPACT,t))}get borderless(){return this._borderless}set borderless(t){this._borderless!==t&&(this._borderless=t,this._adapter.setBorderless(t),this._adapter.toggleHostAttribute(w1.attributes.BORDERLESS,t))}};var F_='<template><form class="forge-file-picker" id="container" part="form"><div class="primary" id="primary" part="primary"><slot name="primary"></slot></div><slot id="button-slot"></slot><div class="secondary" id="secondary" part="secondary"><slot name="secondary"></slot></div><input type="file" class="input" id="input" part="input"></form><div class="helper-text" part="helper-text-container"><slot name="helper-text"></slot></div></template>',U_=':host{--_file-picker-background:var(--forge-file-picker-background, var(--forge-theme-surface-dim, #fafafa));--_file-picker-width:var(--forge-file-picker-width, auto);--_file-picker-height:var(--forge-file-picker-height, auto);--_file-picker-max-width:var(--forge-file-picker-max-width, auto);--_file-picker-border-width:var(--forge-file-picker-border-width, var(--forge-border-thin, 1px));--_file-picker-border-style:var(--forge-file-picker-border-style, dashed);--_file-picker-border-color:var(--forge-file-picker-border-color, var(--forge-theme-outline-low, #9e9e9e));--_file-picker-gap:var(--forge-file-picker-gap, var(--forge-spacing-medium, 16px));--_file-picker-padding:var(--forge-file-picker-padding, var(--forge-spacing-medium, 16px));--_file-picker-padding-block:var(--forge-file-picker-padding-block, 0);--_file-picker-padding-inline:var(--forge-file-picker-padding-inline, var(--_file-picker-padding));--_file-picker-disabled-opacity:var(--forge-file-picker-disabled-opacity, 0.38);--_file-picker-highlight-background:var(--forge-file-picker-highlight-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_file-picker-highlight-border-color:var(--forge-file-picker-highlight-border-color, var(--forge-theme-primary, #3f51b5))}:host{display:block;height:100%;width:100%}:host([hidden]){display:none}:host([compact]){display:inline-block}.forge-file-picker{--_file-picker-background:var(--forge-file-picker-background, var(--forge-theme-surface-dim, #fafafa));--_file-picker-width:var(--forge-file-picker-width, auto);--_file-picker-height:var(--forge-file-picker-height, auto);--_file-picker-max-width:var(--forge-file-picker-max-width, auto);--_file-picker-border-width:var(--forge-file-picker-border-width, var(--forge-border-thin, 1px));--_file-picker-border-style:var(--forge-file-picker-border-style, dashed);--_file-picker-border-color:var(--forge-file-picker-border-color, var(--forge-theme-outline-low, #9e9e9e));--_file-picker-gap:var(--forge-file-picker-gap, var(--forge-spacing-medium, 16px));--_file-picker-padding:var(--forge-file-picker-padding, var(--forge-spacing-medium, 16px));--_file-picker-padding-block:var(--forge-file-picker-padding-block, 0);--_file-picker-padding-inline:var(--forge-file-picker-padding-inline, var(--_file-picker-padding));--_file-picker-disabled-opacity:var(--forge-file-picker-disabled-opacity, 0.38);--_file-picker-highlight-background:var(--forge-file-picker-highlight-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_file-picker-highlight-border-color:var(--forge-file-picker-highlight-border-color, var(--forge-theme-primary, #3f51b5))}.forge-file-picker{display:grid;justify-content:center;align-content:center;gap:var(--_file-picker-gap);box-sizing:border-box;padding:var(--_file-picker-padding);height:var(--_file-picker-height);width:var(--_file-picker-width);max-width:var(--_file-picker-max-width);text-align:center;background:var(--_file-picker-background);cursor:pointer;border-width:var(--_file-picker-border-width);border-style:var(--_file-picker-border-style);border-color:var(--_file-picker-border-color)}.forge-file-picker[disabled]{opacity:var(--_file-picker-disabled-opacity);cursor:unset}.forge-file-picker:not(.compact).highlight{--_file-picker-border-color:var(--_file-picker-highlight-border-color);--_file-picker-background:var(--_file-picker-highlight-background)}.primary{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);color:var(--forge-theme-text-high,rgba(0,0,0,.87));max-width:var(--_file-picker-max-width)}.secondary{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);color:var(--forge-theme-text-high,rgba(0,0,0,.87));max-width:var(--_file-picker-max-width)}.input{display:none}.helper-text ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);text-align:start}.borderless{--_file-picker-width:var(--forge-file-picker-width, 100%);border:none}.borderless:not(.compact).highlight{border:none}.borderless+.helper-text{display:none}.compact{--_file-picker-height:var(--forge-file-picker-height, fit-content);--_file-picker-width:var(--forge-file-picker-width, fit-content);--_file-picker-background-color:var(--forge-file-picker-background-color, transparent);--_file-picker-padding:var(--forge-file-picker-padding, 0);border:none}.compact .primary,.compact .secondary{display:none}.compact .button{--_file-picker-width:var(--forge-file-picker-width, auto);background-color:transparent}',Gt=class extends M{static get observedAttributes(){return[w1.attributes.ACCEPT,w1.attributes.MAX_SIZE,w1.attributes.CAPTURE,w1.attributes.MULTIPLE,w1.attributes.DISABLED,w1.attributes.COMPACT,w1.attributes.BORDERLESS]}constructor(){super(),H(this,F_,U_),this._core=new Gs(new Ws(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case w1.attributes.ACCEPT:this.accept=a;break;case w1.attributes.MAX_SIZE:this.maxSize=W(a);break;case w1.attributes.CAPTURE:this.capture=a;break;case w1.attributes.MULTIPLE:this.multiple=p(a);break;case w1.attributes.DISABLED:this.disabled=p(a);break;case w1.attributes.COMPACT:this.compact=p(a);break;case w1.attributes.BORDERLESS:this.borderless=p(a);break}}};s([v()],Gt.prototype,"accept",2),s([v()],Gt.prototype,"maxSize",2),s([v()],Gt.prototype,"capture",2),s([v()],Gt.prototype,"multiple",2),s([v()],Gt.prototype,"disabled",2),s([v()],Gt.prototype,"compact",2),s([v()],Gt.prototype,"borderless",2),Gt=s([y({name:w1.elementName,dependencies:[V2]})],Gt);var rd=class extends X1{constructor(t){super(t)}_build(){return document.createElement(w1.elementName)}_configure(){var t,e,a,o;if((t=this._config.options)!=null&&t.primaryText){let n=document.createElement("span");n.slot="primary",n.textContent=this._config.options.primaryText,this._element.appendChild(n)}if((e=this._config.options)!=null&&e.secondaryText){let n=document.createElement("span");n.slot="secondary",n.textContent=this._config.options.secondaryText,this._element.appendChild(n)}if((a=this._config.options)!=null&&a.buttonText&&new xi({options:{parent:this._element,text:this._config.options.buttonText},props:{variant:"outlined"}}),(o=this._config.options)!=null&&o.helperText){let n=document.createElement("span");n.slot="helper-text",n.textContent=this._config.options.helperText,this._element.appendChild(n)}}onChange(t){this._element.addEventListener(w1.events.FILES_CHANGED,e=>t(e.detail))}};function nd(){x(Gt)}var id=`${b}fab`,sd={THEME:"theme",DENSITY:"density",ELEVATION:"elevation"},W_=w({},sd),G_={LABEL_SLOT:"slot[name=label]"},Y_={EXTENDED:`${id}--extended`},K_={DEFAULT_THEME:"secondary",DEFAULT_DENSITY:"medium",DEFAULT_ELEVATION:"raised"},Q1={elementName:id,observedAttributes:sd,attributes:W_,selectors:G_,classes:Y_,defaults:K_};var Ys=class extends R0{constructor(t){super(t),this._labelSlotElement=g(this._component,Q1.selectors.LABEL_SLOT)}initialize(){super.initialize(),this._extendedObserver||this._startExtendedWatcher(),this._detectExtendedState()}destroy(){var t;(t=this._extendedObserver)==null||t.disconnect(),this._extendedObserver=void 0}toggleDefaultPopoverIcon(t){super.toggleDefaultPopoverIcon(t),this._detectExtendedState()}_startExtendedWatcher(){this._extendedObserver=new MutationObserver(()=>this._detectExtendedState()),this._extendedObserver.observe(this._component,{childList:!0,subtree:!0,characterData:!0})}_detectExtendedState(){if(this._labelSlotElement.assignedNodes().length>0){this._rootElement.classList.add(Q1.classes.EXTENDED);return}this._rootElement.classList.remove(Q1.classes.EXTENDED),this._component.clientWidth>this._component.clientHeight&&this._rootElement.classList.add(Q1.classes.EXTENDED)}};var Ks=class extends N0{constructor(e){super(e);this._theme=Q1.defaults.DEFAULT_THEME;this._density=Q1.defaults.DEFAULT_DENSITY;this._elevation=Q1.defaults.DEFAULT_ELEVATION}destroy(){this._adapter.destroy()}get theme(){return this._theme}set theme(e){if(this._theme!==e){this._theme=e!=null?e:Q1.defaults.DEFAULT_THEME;let a=this._theme!==Q1.defaults.DEFAULT_THEME;this._adapter.toggleHostAttribute(Q1.attributes.THEME,a,this._theme)}}get density(){return this._density}set density(e){if(this._density!==e){this._density=e!=null?e:Q1.defaults.DEFAULT_DENSITY;let a=this._density!==Q1.defaults.DEFAULT_DENSITY;this._adapter.toggleHostAttribute(Q1.attributes.DENSITY,a,this._density)}}get elevation(){return this._elevation}set elevation(e){if(this._elevation!==e){this._elevation=e!=null?e:Q1.defaults.DEFAULT_ELEVATION;let a=this._elevation!==Q1.defaults.DEFAULT_ELEVATION;this._adapter.toggleHostAttribute(Q1.attributes.ELEVATION,a,this._elevation)}}};var q_='<template><div class="forge-fab" part="root"><slot name="start"></slot><slot></slot><slot name="label"></slot><slot name="end"></slot><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div></template>',$_=':host{--_fab-display:var(--forge-fab-display, inline-flex);--_fab-disabled-cursor:var(--forge-fab-disabled-cursor, not-allowed)}:host{display:var(--_fab-display);position:relative;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-fab{--_fab-gap:var(--forge-fab-gap, var(--forge-spacing-xsmall, 8px));--_fab-background:var(--forge-fab-background, var(--forge-theme-secondary, #ffc107));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-secondary, #000000));--_fab-size:var(--forge-fab-size, 56px);--_fab-padding:var(--forge-fab-padding, var(--forge-spacing-xsmall, 8px));--_fab-shadow:var(--forge-fab-shadow, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_fab-hover-shadow:var(--forge-fab-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_fab-active-shadow:var(--forge-fab-active-shadow, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-shadow:var(--forge-fab-lowered-shadow, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-hover-shadow:var(--forge-fab-lowered-hover-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-active-shadow:var(--forge-fab-lowered-active-shadow, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_fab-transition-duration:var(--forge-fab-transition-duration, var(--forge-animation-duration-short3, 150ms));--_fab-transition-timing:var(--forge-fab-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_fab-shape:var(--forge-fab-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_fab-shape-start-start:var(--forge-fab-shape-start-start, var(--_fab-shape));--_fab-shape-start-end:var(--forge-fab-shape-start-end, var(--_fab-shape));--_fab-shape-end-start:var(--forge-fab-shape-end-start, var(--_fab-shape));--_fab-shape-end-end:var(--forge-fab-shape-end-end, var(--_fab-shape));--_fab-extended-padding:var(--forge-fab-extended-padding, var(--forge-spacing-medium-large, 20px));--_fab-extended-min-width:var(--forge-fab-extended-min-width, 96px);--_fab-density-small-size:var(--forge-fab-density-small-size, 40px);--_fab-density-medium-size:var(--forge-fab-density-medium-size, var(--_fab-size));--_fab-density-large-size:var(--forge-fab-density-large-size, 96px);--_fab-disabled-background:var(--forge-fab-disabled-background, var(--forge-theme-surface-container, #e0e0e0));--_fab-disabled-color:var(--forge-fab-disabled-color, var(--forge-theme-on-surface-container, #000000));--_fab-disabled-opacity:var(--forge-fab-disabled-opacity, 0.38)}.forge-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:inline-flex;justify-content:center;align-items:center;gap:var(--_fab-gap);z-index:0;background:var(--_fab-background);color:var(--_fab-color);cursor:pointer;box-shadow:var(--_fab-shadow);box-sizing:border-box;height:var(--_fab-density-medium-size);min-width:var(--_fab-density-medium-size);padding-inline:var(--_fab-padding);border-width:medium;border-style:none;border-color:currentColor;border-top-left-radius:var(--_fab-shape-start-start);border-top-right-radius:var(--_fab-shape-start-end);border-bottom-left-radius:var(--_fab-shape-end-start);border-bottom-right-radius:var(--_fab-shape-end-end);user-select:none;white-space:nowrap;transition-property:box-shadow,background,color;transition-duration:var(--_fab-transition-duration);transition-timing-function:var(--_fab-transition-timing)}.forge-fab:hover{--_fab-shadow:var(--_fab-hover-shadow)}.forge-fab:active{--_fab-shadow:var(--_fab-active-shadow)}.forge-fab--extended{--_fab-padding:var(--_fab-extended-padding);min-width:var(--_fab-extended-min-width)}.with-anchor{padding-inline:0}::slotted(a){height:100%;width:100%;outline:0;border-radius:var(--_fab-shape);padding-inline:var(--_fab-padding);display:flex;align-items:center;justify-content:center;gap:var(--_fab-gap);color:var(--_fab-color);text-decoration:none}forge-focus-indicator{--forge-focus-indicator-color:var(--_fab-background);--forge-focus-indicator-shape-start-start:var(--_fab-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_fab-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_fab-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_fab-shape-end-end)}forge-state-layer{--forge-state-layer-color:var(--_fab-color)}:host(:is([dense],[density=small])) .forge-fab{--_fab-size:var(--_fab-density-small-size)}:host([density=large]) .forge-fab{--_fab-size:var(--_fab-density-large-size);--_fab-shape:var(--forge-fab-shape, calc(var(--forge-shape-extra-large, 16px) * var(--forge-shape-factor, 1)))}:host([elevation=lowered]) .forge-fab{--_fab-shadow:var(--_fab-lowered-shadow)}:host([elevation=lowered]) .forge-fab:hover{--_fab-shadow:var(--_fab-lowered-hover-shadow)}:host([elevation=lowered]) .forge-fab:active{--_fab-shadow:var(--_fab-lowered-active-shadow)}:host([disabled]){cursor:var(--_fab-disabled-cursor)}:host([disabled]) .forge-fab{--_fab-background:var(--_fab-disabled-background);--_fab-color:var(--_fab-disabled-color);pointer-events:none;opacity:var(--_fab-disabled-opacity)}:host([theme=primary]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-primary, #3f51b5));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-primary, #ffffff))}:host([theme=tertiary]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-tertiary, #3d5afe));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=success]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-success, #2e7d32));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-success, #ffffff))}:host([theme=error]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-error, #b00020));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-error, #ffffff))}:host([theme=warning]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-warning, #d14900));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=info]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-info, #1565c0));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-info, #ffffff))}',_0=class extends Wt{static get observedAttributes(){return[...Object.values(v2.observedAttributes),...Object.values(Q1.observedAttributes)]}constructor(){super(),H(this,q_,$_),this._core=new Ks(new Ys(this))}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case Q1.attributes.THEME:this.theme=a;return;case Q1.attributes.DENSITY:this.density=a;return;case Q1.attributes.ELEVATION:this.elevation=a;return}super.attributeChangedCallback(t,e,a)}};s([v()],_0.prototype,"theme",2),s([v()],_0.prototype,"density",2),s([v()],_0.prototype,"elevation",2),_0=s([y({name:Q1.elementName,dependencies:[Q,r1,X]})],_0);var ld=class extends X1{constructor(t){super(t)}_build(){var e,a,o,n,i;let t=document.createElement(Q1.elementName);if((e=this._config.options)!=null&&e.theme&&(t.theme=this._config.options.theme),(a=this._config.options)!=null&&a.density&&(t.density=this._config.options.density),(o=this._config.options)!=null&&o.elevation&&(t.elevation=this._config.options.elevation),(i=(n=this._config.options)==null?void 0:n.label)!=null&&i.trim().length){let l=document.createElement("span");l.slot="label",t.textContent=this._config.options.label,t.appendChild(l)}return t}_configure(){this._configureIcon()}_configureIcon(){var e,a;if(!((e=this._config.options)!=null&&e.iconName))return;switch(((a=this._config.options)==null?void 0:a.iconType)||"component"){case"font":let o=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[ke];y1(o,this._element),this._element.textContent=this._config.options.iconName;break;case"component":this._iconElement=document.createElement(h1.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&y1(this._config.options.iconClass,this._iconElement),this._element.appendChild(this._iconElement);break}}get iconElement(){return this._iconElement}get disabled(){return!!this._element.disabled}set disabled(t){this._element.disabled=t}onClick(t){this._element.addEventListener("click",t)}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}};function vd(){x(_0)}var X_=`${b}inline-message`,j_={THEME:"theme"},Z_={THEME:"info"},Eo={elementName:X_,attributes:j_,defaults:Z_};var Q_='<template><div class="forge-inline-message" part="root"><slot name="icon"></slot><div class="container" part="container"><slot name="title"></slot><slot></slot></div></div></template>',J_=':host{display:block}:host([hidden]){display:none}.forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-info-container-low, #e3edf7));--_inline-message-color:var(--forge-inline-message-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_inline-message-shape:var(--forge-inline-message-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_inline-message-padding:var(--forge-inline-message-padding, var(--forge-spacing-small, 12px));--_inline-message-padding-inline:var(--forge-inline-message-padding-inline, var(--_inline-message-padding));--_inline-message-padding-block:var(--forge-inline-message-padding-block, var(--_inline-message-padding));--_inline-message-border-width:var(--forge-inline-message-border-width, var(--forge-border-thin, 1px));--_inline-message-border-style:var(--forge-inline-message-border-style, none);--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-info-container, #c7daf0));--_inline-message-gap:var(--forge-inline-message-gap, var(--forge-spacing-small, 12px));--_inline-message-icon-gap:var(--forge-inline-message-icon-gap, var(--_inline-message-gap));--_inline-message-content-gap:var(--forge-inline-message-content-gap, var(--_inline-message-gap));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-info-container-low, #0b3768))}.forge-inline-message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);background:var(--_inline-message-background);color:var(--_inline-message-color);border-radius:var(--_inline-message-shape);border-width:var(--_inline-message-border-width);border-style:var(--_inline-message-border-style);border-color:var(--_inline-message-border-color);display:flex;align-items:center;gap:var(--_inline-message-icon-gap);box-sizing:border-box;padding-inline:var(--_inline-message-padding-inline);padding-block:var(--_inline-message-padding-block)}.forge-inline-message .container{display:flex;flex-direction:column;gap:var(--_inline-message-content-gap)}::slotted(*){margin:0}::slotted([slot=title]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-font-size-scale, .875)));font-weight:var(--forge-typography-heading1-font-weight,500);line-height:var(--forge-typography-heading1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-heading1-letter-spacing, .0178571429em);text-transform:var(--forge-typography-heading1-text-transform,inherit);text-decoration:var(--forge-typography-heading1-text-decoration,inherit)}::slotted([slot=icon]){color:var(--_inline-message-icon-color);align-self:start}:host([theme=primary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-primary-container-low, #e8eaf6));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-primary-container-low, #222c62));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-secondary-container, #fff0c3));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-secondary-container, #8a6804));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-secondary, #ffc107))}:host([theme=tertiary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-tertiary-container-low, #213189));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-tertiary-container, #d0d7ff))}:host([theme=success]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-success-container-low, #e6efe6));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-success-container-low, #19441b));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=warning]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-warning-container-low, #f9e9e0));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-warning-container-low, #712700));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-warning-container, #f4d3c2))}:host(:is([theme=error],[theme=danger])) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-error-container-low, #f6e0e4));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-error-container-low, #5f0011));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=info-secondary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-surface-container-low, #ebebeb));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-surface-container-low, #000000));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-surface-container, #e0e0e0))}',Co=class extends M{constructor(){super(),H(this,Q_,J_)}get theme(){var t;return(t=this.getAttribute(Eo.attributes.THEME))!=null?t:Eo.defaults.THEME}set theme(t){K(this,t!==Eo.defaults.THEME,Eo.attributes.THEME,t)}};Co=s([y({name:Eo.elementName})],Co);function hd(){x(Co)}var tf=":host{display:block}.forge-key{--_key-gap:var(--forge-key-gap, var(--forge-spacing-medium, 16px));--_key-direction:var(--forge-key-direction, row)}.forge-key{box-sizing:border-box;display:flex;flex-direction:var(--_key-direction);gap:var(--_key-gap);flex-wrap:wrap}",Ta=class extends st{constructor(){super(),this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),Ut(this,this._internals,{role:"list"})}render(){return re`<div part="root" class="forge-key"><slot></slot></div>`}};Ta.styles=oe(tf),Ta=s([Re("forge-key")],Ta);function cd(){ue("forge-key",Ta)}var ef=':host{display:inline}.forge-key-item{--_key-item-icon-color:var(--forge-key-item-icon-color, var(--forge-theme-tertiary, #3d5afe));--_key-item-label-color:var(--forge-key-item-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_key-item-value-color:var(--forge-key-item-value-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_key-item-gap:var(--forge-key-item-gap, var(--forge-spacing-xsmall, 8px));--_key-item-icon-size:var(--forge-key-item-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1))}.forge-key-item{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);box-sizing:border-box;display:grid;grid-template:"icon label" "icon value";column-gap:var(--_key-item-gap);inline-size:fit-content;line-height:normal}.forge-key-item.inline{grid-template:"icon label value";grid-template-columns:auto 1fr auto;align-items:center;inline-size:auto}.forge-key-item.no-value{grid-template:"icon label";align-items:center}.forge-key-item.no-value .value{display:none}.forge-key-item:not(.inline,.no-value) .label{padding-block-start:1px}.icon{--forge-icon-size:var(--_key-item-icon-size);grid-area:icon;color:var(--_key-item-icon-color)}.label{grid-area:label;color:var(--_key-item-label-color)}.value{grid-area:value;color:var(--_key-item-value-color)}.default-icon{block-size:calc(var(--_key-item-icon-size) - 1px);inline-size:calc(var(--_key-item-icon-size) - 1px);border-radius:50%;background:currentColor}',qe=class extends st{constructor(){super();this.inline=!1;this._hasValue=!1;this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),Ut(this,this._internals,{role:"listitem"}),this._handleSlotChange()}render(){return re`
|
|
17
17
|
<div part="root" class=${ie({"forge-key-item":!0,inline:this.inline,"no-value":!this._hasValue})}>
|
|
18
18
|
<div part="icon" class="icon">
|
|
19
19
|
<slot name="icon">
|
|
@@ -58,7 +58,7 @@ var m5=Object.defineProperty,K6=Object.defineProperties,q6=Object.getOwnProperty
|
|
|
58
58
|
<slot @slotchange=${this._debounceMeterChange}></slot>
|
|
59
59
|
</div>
|
|
60
60
|
</div>
|
|
61
|
-
`}_syncMeters(){this._meters.forEach(e=>{e.direction=this.direction,e.min=this.min,e.max=this.max})}_handleMeterChange(e){e.stopPropagation(),this._meters.reduce((a,o,n,i)=>(o.style.setProperty("--_meter-z-index",`${i.length-n}`),o.style.setProperty("--_meter-inset",`${a}%`),a+o.percentage),0)}_handleHeadingSlotChange(){let e=[...this._labelNodes,...this._valueNodes].filter(a=>{var o;return!!((o=a.textContent)!=null&&o.trim())});this._hasSlottedHeadingContent=!!e.length}};O2.styles=oe(mf),O2.formAssociated=!0,s([S1({type:Number})],O2.prototype,"min",2),s([S1({type:Number})],O2.prototype,"max",2),s([S1({type:Boolean})],O2.prototype,"tickmarks",2),s([S1()],O2.prototype,"direction",2),s([S1()],O2.prototype,"density",2),s([S1()],O2.prototype,"shape",2),s([S1({attribute:"inner-shape"})],O2.prototype,"innerShape",2),s([ne()],O2.prototype,"_hasSlottedHeadingContent",2),s([j0({slot:"label"})],O2.prototype,"_labelNodes",2),s([j0({slot:"value"})],O2.prototype,"_valueNodes",2),s([tc({selector:"forge-meter"})],O2.prototype,"_meters",2),O2=s([Re("forge-meter-group")],O2);function Hd(){ue("forge-meter-group",O2)}var gf=`${b}page-state`,Ld={elementName:gf};var wf='<template><div class="forge-page-state" part="root"><div class="graphic" part="graphic-container"><slot name="graphic"></slot></div><div class="title" part="title-container"><slot name="title"></slot></div><div class="message" part="message-container"><slot name="message"></slot></div><div class="actions" part="actions-container"><slot name="action"></slot></div></div></template>',uf=':host{--_page-state-width:var(--forge-page-state-width, 576px);--_page-state-height:var(--forge-page-state-height, auto);--_page-state-spacing:var(--forge-page-state-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-mobile-width:var(--forge-page-state-mobile-width, 70%);--_page-state-graphic-height:var(--forge-page-state-graphic-height, 296px);--_page-state-graphic-spacing:var(--forge-page-state-graphic-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-mobile-graphic-height:var(--forge-page-state-mobile-graphic-height, auto);--_page-state-title-color:var(--forge-page-state-title-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_page-state-title-spacing:var(--forge-page-state-title-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-title-spacing-mobile:var(--forge-page-state-title-spacing-mobile, var(--forge-spacing-large, 24px));--_page-state-message-color:var(--forge-page-state-message-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_page-state-message-spacing:var(--forge-page-state-message-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-message-spacing-mobile:var(--forge-page-state-message-spacing-mobile, var(--forge-spacing-large, 24px));--_page-state-actions-spacing:var(--forge-page-state-actions-spacing, 16px)}:host{display:flex;justify-content:center;align-items:center;width:100%;container-type:inline-size}:host([hidden]){display:none}.forge-page-state{width:var(--_page-state-width);margin-block:var(--_page-state-spacing);text-align:center}.forge-page-state .graphic{display:flex;justify-content:center;align-items:center;height:var(--_page-state-graphic-height);width:100%;margin-block-end:var(--_page-state-graphic-spacing)}.forge-page-state .graphic ::slotted([slot=graphic]){height:100%;width:100%}.forge-page-state .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading8-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading8-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading8-font-size-scale, 2.25)));font-weight:var(--forge-typography-heading8-font-weight,500);line-height:var(--forge-typography-heading8-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading8-line-height-scale, 2.625)));letter-spacing:var(--forge-typography-heading8-letter-spacing, -.0027777778em);text-transform:var(--forge-typography-heading8-text-transform,inherit);text-decoration:var(--forge-typography-heading8-text-decoration,inherit);--_page-state-title-spacing:var(--_page-state-title-spacing-mobile);color:var(--_page-state-title-color);margin-block:var(--_page-state-title-spacing)}.forge-page-state .message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body4-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body4-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1.25)));font-weight:var(--forge-typography-body4-font-weight,400);line-height:var(--forge-typography-body4-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.75)));letter-spacing:var(--forge-typography-body4-letter-spacing, .005em);text-transform:var(--forge-typography-body4-text-transform,inherit);text-decoration:var(--forge-typography-body4-text-decoration,inherit);--_page-state-message-spacing:var(--_page-state-message-spacing-mobile);color:var(--_page-state-message-color);margin-block-end:var(--_page-state-message-spacing)}.forge-page-state .actions{display:grid;justify-content:center;grid-auto-flow:column;gap:var(--_page-state-actions-spacing)}@container (max-width:599px){.forge-page-state{--_page-state-width:var(--_page-state-mobile-width)}.forge-page-state .graphic{--_page-state-graphic-height:var(--_page-state-mobile-graphic-height);--_page-state-graphic-spacing:var(--forge-page-state-graphic-spacing, 0)}.forge-page-state .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading5-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading5-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading5-font-size-scale, 1.5)));font-weight:var(--forge-typography-heading5-font-weight,500);line-height:var(--forge-typography-heading5-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading5-line-height-scale, 1.75)));letter-spacing:var(--forge-typography-heading5-letter-spacing, 0);text-transform:var(--forge-typography-heading5-text-transform,inherit);text-decoration:var(--forge-typography-heading5-text-decoration,inherit)}.forge-page-state .message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit)}.forge-page-state .actions{grid-auto-flow:row}}',Ao=class extends M{constructor(){super(),H(this,wf,uf)}};Ao=s([y({name:Ld.elementName})],Ao);function Id(){x(Ao)}var Vd=`${b}paginator`,Ed={PAGE_INDEX:"page-index",PAGE_SIZE:"page-size",OFFSET:"offset",TOTAL:"total",PAGE_SIZE_OPTIONS:"page-size-options",LABEL:"label",FIRST_LAST:"first-last",FIRST:"first",DISABLED:"disabled",ALTERNATIVE:"alternative"},_f=w({},Ed),ff={LABEL:".label > slot[name=label]",PAGE_SIZE_SELECT:".page-size-options",RANGE_LABEL:".range-label > slot[name=range-label]",FIRST_PAGE_BUTTON:".first-page",FIRST_PAGE_CONTAINER:"#first-page-container",PREVIOUS_PAGE_BUTTON:".previous-page",PREVIOUS_PAGE_CONTAINER:"#previous-page-container",NEXT_PAGE_BUTTON:".next-page",NEXT_PAGE_CONTAINER:"#next-page-container",LAST_PAGE_BUTTON:".last-page",LAST_PAGE_CONTAINER:"#last-page-container",RANGE_LABEL_ALTERNATIVE:".alternative-range-label > slot[name=alternative-range-label]"},xf={CHANGE:`${Vd}-change`},bf={DEFAULT_PAGE_INDEX:0,DEFAULT_TOTAL:0,DEFAULT_PAGE_SIZE:25,DEFAULT_PAGE_SIZE_OPTIONS:[5,15,25,50,100]},yf={DEFAULT_LABEL:"Rows per page:",RANGE_SEPARATOR_LABEL:"of"},$={elementName:Vd,observedAttributes:Ed,attributes:_f,selectors:ff,events:xf,numbers:bf,strings:yf};var Xs=class{constructor(t){this._adapter=t;this._pageIndex=$.numbers.DEFAULT_PAGE_INDEX;this._pageSize=$.numbers.DEFAULT_PAGE_SIZE;this._offset=0;this._total=$.numbers.DEFAULT_TOTAL;this._pageSizeOptions=$.numbers.DEFAULT_PAGE_SIZE_OPTIONS.map(t=>({label:`${t}`,value:`${t}`}));this._label=$.strings.DEFAULT_LABEL;this._firstLast=!1;this._first=!1;this._disabled=!1;this._alternative=!1;this._firstPageListener=this._onFirstPage.bind(this);this._previousPageListener=this._onPreviousPage.bind(this);this._nextPageListener=this._onNextPage.bind(this);this._lastPageListener=this._onLastPage.bind(this);this._pageSizeListener=this._onPageSizeChanged.bind(this)}initialize(){this._updateRangeLabel(),this._adapter.setLabel(this._label),this._adapter.setPageSizeOptions(this._pageSizeOptions),this._adapter.setPageSize(this._pageSize),this._attachListeners(),this._toggleFirstLastButtons(),this._syncInteractionState()}focus(t){this._adapter.setFocus(t)}_attachListeners(){this._adapter.attachPageSizeChangeListener(this._pageSizeListener),this._adapter.attachFirstPageListener(this._firstPageListener),this._adapter.attachPreviousPageListener(this._previousPageListener),this._adapter.attachNextPageListener(this._nextPageListener),this._adapter.attachLastPageListener(this._lastPageListener)}_onFirstPage(t){if(t.stopPropagation(),!this._hasFirstPage())return;let e=0;this._dispatchChangeEvent("first-page",{pageIndex:e})&&this._applyPageIndex(e)}_onPreviousPage(t){if(t.stopPropagation(),!this._hasPreviousPage())return;let e=this._pageIndex-1;this._dispatchChangeEvent("previous-page",{pageIndex:e})&&this._applyPageIndex(e)}_onNextPage(t){if(t.stopPropagation(),!this._hasNextPage())return;let e=this._pageIndex+1;this._dispatchChangeEvent("next-page",{pageIndex:e})&&this._applyPageIndex(e)}_onLastPage(t){if(t.stopPropagation(),!this._hasLastPage())return;let e=this._getMaxPages();this._dispatchChangeEvent("last-page",{pageIndex:e})&&this._applyPageIndex(e)}_onPageSizeChanged(t){t.stopPropagation();let e=Number(t.detail);this._dispatchChangeEvent("page-size",{pageIndex:0,pageSize:e})?(this._applyPageIndex(0),this._applyPageSize(e)):t.preventDefault()}_dispatchChangeEvent(t,{pageSize:e=this._pageSize,pageIndex:a=this._pageIndex}={}){let o=a*e,n={type:t,pageSize:e,pageIndex:a,offset:o},i=new CustomEvent($.events.CHANGE,{detail:n,bubbles:!0,cancelable:!0});return this._adapter.dispatchHostEvent(i),!i.defaultPrevented}_getMaxPages(){return Math.ceil(this._total/this._pageSize)-1}_updateRangeLabel(){let t;if(typeof this._rangeLabelCallback=="function"){let e={pageSize:this._pageSize,pageIndex:this._pageIndex,offset:this._offset,pageStart:this._pageIndex*this._pageSize+1,pageEnd:Math.min((this._pageIndex+1)*this._pageSize,this._total),total:this._total};t=this._rangeLabelCallback.call(null,e)}else if(this.pageSize>1){let e=this._pageIndex*this._pageSize,o=(Math.floor(e/this._pageSize)||0)*this._pageSize+1,n=e<this._total?Math.min(e+this._pageSize,this._total):e+this._pageSize;t=`${o}-${n} ${$.strings.RANGE_SEPARATOR_LABEL} ${this._total}`}else t=`${this._pageIndex+1} ${$.strings.RANGE_SEPARATOR_LABEL} ${this._total}`;this._adapter.setRangeLabel(t)}_syncInteractionState(){if(this._disabled)return;this._adapter.setFirstPageButtonEnabled(!0),this._adapter.setPreviousPageButtonEnabled(!0),this._adapter.setNextPageButtonEnabled(!0),this._adapter.setLastPageButtonEnabled(!0);let t=[];this._hasFirstPage()||t.push("first"),this._hasPreviousPage()||t.push("previous"),this._hasNextPage()||t.push("next"),this._hasLastPage()||t.push("last"),this._adapter.tryDisableFields(t)}_toggleFirstLastButtons(){this._toggleFirstButton(),this._firstLast?this._adapter.hasLastPageButton()||this._adapter.showLastPageButton():this._adapter.hasLastPageButton()&&this._adapter.hideLastPageButton()}_toggleFirstButton(){this._first||this._firstLast?this._adapter.hasFirstPageButton()||this._adapter.showFirstPageButton():this._adapter.hasFirstPageButton()&&this._adapter.hideFirstPageButton()}_hasFirstPage(){return this._hasPreviousPage()}_hasPreviousPage(){return this._pageIndex>0&&this._pageSize>0}_hasNextPage(){let t=this._getMaxPages();return this._pageIndex<t&&this._pageSize>0}_hasLastPage(){return this._hasNextPage()}_computePageIndexFromOffset(t){t>=this._total&&(this._total>=this._pageSize?t=this._total-this._pageSize:t=0);let e=Math.min(Math.max(t,0),this._total),a=Math.floor(e/this._pageSize);this._applyPageIndex(a)}_computeOffset(){this._total>0&&(this._offset=this._pageIndex*this._pageSize)}_applyPageIndex(t){this._pageIndex=t,this._computeOffset(),this._updateRangeLabel(),this._syncInteractionState(),this._adapter.toggleHostAttribute($.attributes.PAGE_INDEX,this._pageIndex!=null,this._pageIndex.toString())}_applyPageSize(t){this._pageSize=t,this._adapter.setPageSize(this._pageSize),this._computeOffset(),this._updateRangeLabel(),this._syncInteractionState()}_applyTotal(t){this._total=t,this._updateRangeLabel(),this._offset>0&&this._total>0&&this._computePageIndexFromOffset(this._offset),this._syncInteractionState()}_applyDisabled(t){this._disabled=t,t?(this._adapter.setPageSizeSelectEnabled(!1),this._adapter.setFirstPageButtonEnabled(!1),this._adapter.setPreviousPageButtonEnabled(!1),this._adapter.setNextPageButtonEnabled(!1),this._adapter.setLastPageButtonEnabled(!1)):(this._adapter.setPageSizeSelectEnabled(!0),this._syncInteractionState())}get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex!==t&&(k(t)?this._applyPageIndex(t):this._adapter.removeHostAttribute($.attributes.PAGE_INDEX))}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize!==t&&(this._applyPageSize(t),this._adapter.setHostAttribute($.attributes.PAGE_SIZE,`${this._pageSize}`))}get offset(){return this._offset}set offset(t){this._offset!==t&&(this._offset=t,this._computePageIndexFromOffset(t))}get total(){return this._total}set total(t){this._total!==t&&(this._applyTotal(t),this._adapter.setHostAttribute($.attributes.TOTAL,`${this._total}`))}get pageSizeOptions(){return this._pageSizeOptions.map(t=>Number(t.value))}set pageSizeOptions(t){if(rt(t)&&t.length){if(this._pageSizeOptions=t.map(e=>({label:e.toString(),value:e.toString()})).sort((e,a)=>W(e.value)-W(a.value)),this._adapter.setPageSizeOptions(this._pageSizeOptions),this._adapter.attachPageSizeChangeListener(this._pageSizeListener),this._adapter.setPageSizeVisibility(!0),k(this._pageSize)&&this._pageSizeOptions.length&&!this._pageSizeOptions.find(e=>W(e.value)===this._pageSize)){let e=W(this._pageSizeOptions[0].value);this._applyPageSize(e)}}else t!=null&&t.length||(this._adapter.detachPageSizeChangeListener(this._pageSizeListener),this._adapter.setPageSizeVisibility(!1))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.setLabel(this._label),k(this._label)&&this._label.length?this._adapter.setHostAttribute($.attributes.LABEL,String(this._label)):this._adapter.removeHostAttribute($.attributes.LABEL))}get firstLast(){return this._firstLast}set firstLast(t){t=!!t,this._firstLast!==t&&(this._firstLast=t,this._toggleFirstLastButtons(),this._adapter.toggleHostAttribute($.attributes.FIRST_LAST,this._firstLast))}get first(){return this._first}set first(t){t=!!t,this._first!==t&&(this._first=t,this._toggleFirstButton(),this._adapter.toggleHostAttribute($.attributes.FIRST,this._first))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._applyDisabled(t),this._adapter.toggleHostAttribute($.attributes.DISABLED,this._disabled))}get alternative(){return this._alternative}set alternative(t){t=!!t,t!==this._alternative&&(this._alternative=t,this._adapter.toggleHostAttribute($.attributes.ALTERNATIVE,this._alternative))}get rangeLabelCallback(){return this._rangeLabelCallback}set rangeLabelCallback(t){this._rangeLabelCallback=t,this._updateRangeLabel()}};var js=class extends I{constructor(t){super(t),this._labelElement=g(t,$.selectors.LABEL),this._pageSizeSelect=g(t,$.selectors.PAGE_SIZE_SELECT),this._rangeLabel=g(t,$.selectors.RANGE_LABEL),this._rangeLabelAlternative=g(t,$.selectors.RANGE_LABEL_ALTERNATIVE),this._firstPageButton=g(t,$.selectors.FIRST_PAGE_BUTTON),this._firstPageContainer=g(t,$.selectors.FIRST_PAGE_CONTAINER),this._previousPageButton=g(t,$.selectors.PREVIOUS_PAGE_BUTTON),this._previousPageContainer=g(t,$.selectors.PREVIOUS_PAGE_CONTAINER),this._nextPageButton=g(t,$.selectors.NEXT_PAGE_BUTTON),this._nextPageContainer=g(t,$.selectors.NEXT_PAGE_CONTAINER),this._lastPageButton=g(t,$.selectors.LAST_PAGE_BUTTON),this._lastPageContainer=g(t,$.selectors.LAST_PAGE_CONTAINER)}setLabel(t){this._labelElement.textContent=t}setPageSizeOptions(t){r2(this._pageSizeSelect),this._pageSizeSelect.options=t}setPageSize(t){this._pageSizeSelect.value=t.toString()}setRangeLabel(t){this._rangeLabel.innerText=t,this._rangeLabelAlternative.innerText=t}hasFirstPageButton(){return!!g(this._component,$.selectors.FIRST_PAGE_BUTTON)}showFirstPageButton(){this._firstPagePlaceholder=Uo(this._component,!0,$.elementName,$.selectors.FIRST_PAGE_CONTAINER,this._firstPageContainer,this._firstPagePlaceholder)}hideFirstPageButton(){this._firstPagePlaceholder=Uo(this._component,!1,$.elementName,$.selectors.FIRST_PAGE_CONTAINER,this._firstPageContainer,this._firstPagePlaceholder)}hasLastPageButton(){return!!g(this._component,$.selectors.LAST_PAGE_BUTTON)}showLastPageButton(){this._lastPagePlaceholder=Uo(this._component,!0,$.elementName,$.selectors.LAST_PAGE_CONTAINER,this._lastPageContainer,this._lastPagePlaceholder)}hideLastPageButton(){this._lastPagePlaceholder=Uo(this._component,!1,$.elementName,$.selectors.LAST_PAGE_CONTAINER,this._lastPageContainer,this._lastPagePlaceholder)}attachPageSizeChangeListener(t){this._pageSizeSelect.addEventListener("change",t)}detachPageSizeChangeListener(t){this._pageSizeSelect.removeEventListener("change",t)}attachFirstPageListener(t){this._firstPageButton.addEventListener("click",t)}attachPreviousPageListener(t){this._previousPageButton.addEventListener("click",t)}attachNextPageListener(t){this._nextPageButton.addEventListener("click",t)}attachLastPageListener(t){this._lastPageButton.addEventListener("click",t)}setFirstPageButtonEnabled(t){this._firstPageButton.disabled=!t}setPreviousPageButtonEnabled(t){this._previousPageButton.disabled=!t}setNextPageButtonEnabled(t){this._nextPageButton.disabled=!t}setLastPageButtonEnabled(t){this._lastPageButton.disabled=!t}setPageSizeSelectEnabled(t){this._pageSizeSelect.disabled=!t}setPageSizeVisibility(t){this._pageSizeSelect.hidden=!t}setFocus(t){this._tryFocus([this._pageSizeSelect,this._firstPageButton,this._previousPageButton,this._nextPageButton,this._lastPageButton],t)}tryDisableFields(t){let e={first:()=>this.setFirstPageButtonEnabled(!1),last:()=>this.setLastPageButtonEnabled(!1),previous:()=>this.setPreviousPageButtonEnabled(!1),next:()=>this.setNextPageButtonEnabled(!1)};t.forEach(a=>{var o;return(o=e[a])==null?void 0:o.call(e)})}_tryFocus(t,e){let a=typeof(e==null?void 0:e.preventScroll)=="boolean"?e.preventScroll:!0;for(let o of t)if(o&&o.isConnected&&!o.disabled&&o.style.display!=="none"){o.focus(t1(w({},e),{preventScroll:a}));return}}};function Cd(r){class t extends r{constructor(...a){super(...a)}initializeFieldInstance(a){this._fieldElement=a,this._fieldElement.shadowRoot||window.customElements.upgrade(this._fieldElement)}attributeChangedCallback(a,o,n){var i;switch(a){case F.observedAttributes.LABEL_POSITION:this.labelPosition=n;return;case F.observedAttributes.LABEL_ALIGNMENT:this.labelAlignment=n;return;case F.observedAttributes.INVALID:this.invalid=p(n);return;case F.observedAttributes.REQUIRED:this.required=p(n);return;case F.observedAttributes.OPTIONAL:this.optional=p(n);return;case F.observedAttributes.DISABLED:this.disabled=p(n);return;case F.observedAttributes.FLOAT_LABEL:this.floatLabel=p(n);return;case F.observedAttributes.VARIANT:this.variant=n;return;case F.observedAttributes.THEME:this.theme=n;return;case F.observedAttributes.SHAPE:this.shape=n;return;case F.observedAttributes.DENSITY:this.density=n;return;case F.observedAttributes.DENSE:this.dense=p(n);return;case F.observedAttributes.POPOVER_ICON:this.popoverIcon=p(n);return;case F.observedAttributes.SUPPORT_TEXT_INSET:this.supportTextInset=n;return}(i=super.attributeChangedCallback)==null||i.call(this,a,o,n)}get labelPosition(){return this._fieldElement.labelPosition}set labelPosition(a){this._fieldElement.labelPosition!==a&&(this._fieldElement.labelPosition=a,this.setAttribute(V.attributes.LABEL_POSITION,a))}get labelAlignment(){return this._fieldElement.labelAlignment}set labelAlignment(a){this._fieldElement.labelAlignment!==a&&(this._fieldElement.labelAlignment=a,this.setAttribute(V.attributes.LABEL_ALIGNMENT,a))}get invalid(){return this._fieldElement.invalid}set invalid(a){this._fieldElement.invalid!==a&&(this._fieldElement.invalid=a,this.toggleAttribute(V.attributes.INVALID,a))}get required(){return this._fieldElement.required}set required(a){this._fieldElement.required!==a&&(this._fieldElement.required=a,this.toggleAttribute(V.attributes.REQUIRED,a))}get optional(){return this._fieldElement.optional}set optional(a){this._fieldElement.optional!==a&&(this._fieldElement.optional=a,this.toggleAttribute(V.attributes.OPTIONAL,a))}get disabled(){return this._fieldElement.disabled}set disabled(a){this._fieldElement.disabled!==a&&(this._fieldElement.disabled=a,this.toggleAttribute(V.attributes.DISABLED,a))}get floatLabel(){return this._fieldElement.floatLabel}set floatLabel(a){this._fieldElement.floatLabel!==a&&(this._fieldElement.floatLabel=a,this.toggleAttribute(V.attributes.FLOAT_LABEL,a))}get variant(){return this._fieldElement.variant}set variant(a){this._fieldElement.variant!==a&&(this._fieldElement.variant=a,this.setAttribute(V.attributes.VARIANT,a))}get theme(){return this._fieldElement.theme}set theme(a){this._fieldElement.theme!==a&&(this._fieldElement.theme=a,this.setAttribute(V.attributes.THEME,a))}get shape(){return this._fieldElement.shape}set shape(a){this._fieldElement.shape!==a&&(this._fieldElement.shape=a,this.setAttribute(V.attributes.SHAPE,a))}get density(){return this._fieldElement.density}set density(a){this._fieldElement.density!==a&&(this._fieldElement.density=a,this.setAttribute(V.attributes.DENSITY,a))}get dense(){return this._fieldElement.dense}set dense(a){this._fieldElement.dense!==a&&(this._fieldElement.dense=a,this.toggleAttribute(V.attributes.DENSE,a))}get popoverIcon(){return this._fieldElement.popoverIcon}set popoverIcon(a){this._fieldElement.popoverIcon!==a&&(this._fieldElement.popoverIcon=a,this.toggleAttribute(V.attributes.POPOVER_ICON,a))}get supportTextInset(){return this._fieldElement.supportTextInset}set supportTextInset(a){this._fieldElement.supportTextInset!==a&&(this._fieldElement.supportTextInset=a,this.setAttribute(V.attributes.SUPPORT_TEXT_INSET,a))}floatLabelWithoutAnimation(a){this._fieldElement.floatLabelWithoutAnimation(a)}}return t}var Mf=`${b}scaffold`,zd={VIEWPORT:"viewport"},Hf=w({},zd),Bo={elementName:Mf,observedAttributes:zd,attributes:Hf};var Lf='<template><div class="forge-scaffold" part="root"><slot name="left"></slot><div class="header" part="header"><slot name="header"></slot></div><div class="body" part="body"><slot name="body-left"></slot><slot name="body-header"></slot><slot name="body"></slot><slot name="body-footer"></slot><slot name="body-right"></slot></div><slot name="footer"></slot><slot name="right"></slot></div></template>',If=':host{--_scaffold-height:var(--forge-scaffold-height, 100%);--_scaffold-width:var(--forge-scaffold-width, 100%)}:host{display:block;width:var(--_scaffold-width);height:var(--_scaffold-height)}:host([hidden]){display:none}.forge-scaffold{--_scaffold-overflow:var(--forge-scaffold-overflow, initial);--_scaffold-body-position:var(--forge-scaffold-body-position, relative)}.forge-scaffold{position:relative;display:grid;grid-template-areas:"left header right" "left body right" "left footer right";grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr auto;height:var(--_scaffold-height);width:var(--_scaffold-width);overflow:var(--_scaffold-overflow)}.header{grid-area:header;min-width:0;min-height:0}.body{position:var(--_scaffold-body-position);display:grid;grid-area:body;grid-template-areas:"body-left body-header body-right" "body-left body-inner body-right" "body-left body-footer body-right";grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr auto;width:var(--_scaffold-width);min-width:0;min-height:0;overflow:var(--_scaffold-overflow)}::slotted(*){min-width:0;min-height:0}::slotted([slot=left]){grid-area:left}::slotted([slot=right]){grid-area:right}::slotted([slot=body-left]){grid-area:body-left}::slotted([slot=body-right]){grid-area:body-right}::slotted([slot=body-header]){grid-area:body-header}::slotted([slot=body]){overflow:auto;grid-area:body-inner}::slotted([slot=body-footer]){grid-area:body-footer}::slotted([slot=footer]){grid-area:footer}::slotted([slot=body-left]),::slotted([slot=body-right]),::slotted([slot=body]),::slotted([slot=left]),::slotted([slot=right]){overflow:auto}:host([viewport]){--_scaffold-height:var(--forge-scaffold-height, 100dvh);--_scaffold-width:var(--forge-scaffold-width, 100dvw)}',$e=class extends M{static get observedAttributes(){return Object.values(Bo.observedAttributes)}constructor(){super(),H(this,Lf,If)}attributeChangedCallback(t,e,a){switch(t){case Bo.observedAttributes.VIEWPORT:this.viewport=a!==null;break}}get viewport(){return this.hasAttribute(Bo.attributes.VIEWPORT)}set viewport(t){this.toggleAttribute(Bo.attributes.VIEWPORT,!!t)}};$e=s([y({name:Bo.elementName})],$e);function Ad(){x($e)}var Zs=class extends I{constructor(t){super(t)}};var Bd=`${b}option`,Vf={DISABLED:"disabled",DIVIDER:"divider",LABEL:"label",SECONDARY_LABEL:"secondary-label",LEADING_ICON_CLASS:"leading-icon-class",LEADING_ICON_TYPE:"leading-icon-type",LEADING_ICON:"leading-icon",OPTION_CLASS:"option-class",TRAILING_ICON_CLASS:"trailing-icon-class",TRAILING_ICON_TYPE:"trailing-icon-type",TRAILING_ICON:"trailing-icon",VALUE:"value"},Ef={VALUE_CHANGE:`${Bd}-value-change`},N={elementName:Bd,attributes:Vf,events:Ef};var Qs=class{constructor(t){this._adapter=t;this._disabled=!1;this._divider=!1;this._optionClass=[]}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.emitHostEvent(N.events.VALUE_CHANGE,this._value))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.toggleHostAttribute(N.attributes.LABEL,!!this._label,this._label))}get secondaryLabel(){return this._secondaryLabel}set secondaryLabel(t){this._secondaryLabel!==t&&(this._secondaryLabel=t,this._adapter.toggleHostAttribute(N.attributes.SECONDARY_LABEL,!!this._secondaryLabel,this._secondaryLabel))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.toggleHostAttribute(N.attributes.DISABLED,this._disabled))}get divider(){return this._divider}set divider(t){this._divider!==t&&(this._divider=t,this._adapter.toggleHostAttribute(N.attributes.DIVIDER,this._divider))}get optionClass(){return this._optionClass}set optionClass(t){t?typeof t=="string"&&(t=t.split(" ")):t=[],t=t.filter(e=>e&&!/\s+/.test(e)),this._optionClass.toString()!==t.toString()&&(this._optionClass=t,this._adapter.toggleHostAttribute(N.attributes.OPTION_CLASS,this._optionClass&&!!this._optionClass.length,this._optionClass.join(" ")))}get leadingIcon(){return this._leadingIcon}set leadingIcon(t){this._leadingIcon!==t&&(this._leadingIcon=t,this._adapter.toggleHostAttribute(N.attributes.LEADING_ICON,!!this._leadingIcon,this._leadingIcon))}get leadingIconClass(){return this._leadingIconClass}set leadingIconClass(t){this._leadingIconClass!==t&&(this._leadingIconClass=t,this._adapter.toggleHostAttribute(N.attributes.LEADING_ICON_CLASS,!!this._leadingIconClass,this._leadingIconClass))}get leadingIconType(){return this._leadingIconType}set leadingIconType(t){this._leadingIconType!==t&&(this._leadingIconType=t,this._adapter.toggleHostAttribute(N.attributes.LEADING_ICON_TYPE,!!this._leadingIconType,this._leadingIconType))}get leadingIconComponentProps(){return this._leadingIconComponentProps}set leadingIconComponentProps(t){this._leadingIconComponentProps!==t&&(this._leadingIconComponentProps=t)}get trailingIcon(){return this._trailingIcon}set trailingIcon(t){this._trailingIcon!==t&&(this._trailingIcon=t,this._adapter.toggleHostAttribute(N.attributes.TRAILING_ICON,!!this._trailingIcon,this._trailingIcon))}get trailingIconClass(){return this._trailingIconClass}set trailingIconClass(t){this._trailingIconClass!==t&&(this._trailingIconClass=t,this._adapter.toggleHostAttribute(N.attributes.TRAILING_ICON_CLASS,!!this._trailingIconClass,this._trailingIconClass))}get trailingIconType(){return this._trailingIconType}set trailingIconType(t){this._trailingIconType!==t&&(this._trailingIconType=t,this._adapter.toggleHostAttribute(N.attributes.TRAILING_ICON_TYPE,!!this._trailingIconType,this._trailingIconType))}get trailingIconComponentProps(){return this._trailingIconComponentProps}set trailingIconComponentProps(t){this._trailingIconComponentProps!==t&&(this._trailingIconComponentProps=t)}get leadingBuilder(){return this._leadingBuilder}set leadingBuilder(t){this._leadingBuilder!==t&&(this._leadingBuilder=t)}get trailingBuilder(){return this._trailingBuilder}set trailingBuilder(t){this._trailingBuilder!==t&&(this._trailingBuilder=t)}};var J1=class extends M{static get observedAttributes(){return[N.attributes.VALUE,N.attributes.LABEL,N.attributes.SECONDARY_LABEL,N.attributes.DISABLED,N.attributes.DIVIDER,N.attributes.OPTION_CLASS,N.attributes.LEADING_ICON,N.attributes.LEADING_ICON_CLASS,N.attributes.LEADING_ICON_TYPE,N.attributes.TRAILING_ICON,N.attributes.TRAILING_ICON_CLASS,N.attributes.TRAILING_ICON_TYPE]}constructor(){super(),this._core=new Qs(new Zs(this))}attributeChangedCallback(t,e,a){switch(t){case N.attributes.VALUE:this.value=a;break;case N.attributes.LABEL:this.label=a;break;case N.attributes.SECONDARY_LABEL:this.secondaryLabel=a;break;case N.attributes.DISABLED:this.disabled=p(a);break;case N.attributes.DIVIDER:this.divider=this.hasAttribute(N.attributes.DIVIDER);break;case N.attributes.OPTION_CLASS:this.optionClass=a;break;case N.attributes.LEADING_ICON:this.leadingIcon=a;break;case N.attributes.LEADING_ICON_CLASS:this.leadingIconClass=a;break;case N.attributes.LEADING_ICON_TYPE:this.leadingIconType=a;break;case N.attributes.TRAILING_ICON:this.trailingIcon=a;break;case N.attributes.TRAILING_ICON_CLASS:this.trailingIconClass=a;break;case N.attributes.TRAILING_ICON_TYPE:this.trailingIconType=a;break}}};s([v()],J1.prototype,"value",2),s([v()],J1.prototype,"label",2),s([v()],J1.prototype,"secondaryLabel",2),s([v()],J1.prototype,"disabled",2),s([v()],J1.prototype,"divider",2),s([v()],J1.prototype,"optionClass",2),s([v()],J1.prototype,"leadingIcon",2),s([v()],J1.prototype,"leadingIconClass",2),s([v()],J1.prototype,"leadingIconType",2),s([v()],J1.prototype,"leadingIconComponentProps",2),s([v()],J1.prototype,"trailingIcon",2),s([v()],J1.prototype,"trailingIconClass",2),s([v()],J1.prototype,"trailingIconType",2),s([v()],J1.prototype,"trailingIconComponentProps",2),s([v()],J1.prototype,"leadingBuilder",2),s([v()],J1.prototype,"trailingBuilder",2),J1=s([y({name:N.elementName})],J1);function Td(){x(J1)}var Cf=`${b}option-group`,zf={LABEL:"label"},ia={elementName:Cf,attributes:zf};var Xe=class extends M{static get observedAttributes(){return[ia.attributes.LABEL]}constructor(){super()}attributeChangedCallback(t,e,a){switch(t){case ia.attributes.LABEL:this.label=a;break}}get label(){return this._label}set label(t){this._label!==t&&(this._label=t||"",this.setAttribute(ia.attributes.LABEL,this._label))}get text(){return this._label}set text(t){this.label=t}};Xe=s([y({name:ia.elementName})],Xe);function Sd(){x(Xe)}var kd=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(kd||{});function a5(r,t){let e=r.some(o=>o5(o)),a=r.some(o=>Af(o));return e&&t===1||a&&t===0}function o5(r){return k(r)&&nt(r)&&r.hasOwnProperty("options")}function Af(r){return k(r)&&nt(r)&&r.hasOwnProperty("label")&&r.hasOwnProperty("value")}var To=class extends I{constructor(t){super(t)}get popupElement(){var t;return(t=this._listDropdown)==null?void 0:t.dropdownElement}getOptions(){let t=Array.from(this._component.querySelectorAll(ia.elementName));if(t.length)return t.map(e=>{let a=Array.from(e.querySelectorAll(N.elementName)),o=this._createOptionsFromElements(a);return{text:e.label,builder:e.builder,value:e.value,options:o}});{let e=Array.from(this._component.querySelectorAll(N.elementName));return this._createOptionsFromElements(e)}}_createOptionsFromElements(t){return t.map(e=>{let a=e.hasAttribute(N.attributes.OPTION_CLASS)?e.getAttribute(N.attributes.OPTION_CLASS):e.optionClass;return typeof a=="string"&&(a=a.split(" ")),{label:e.hasAttribute(N.attributes.LABEL)?e.getAttribute(N.attributes.LABEL):k(e.label)?e.label:e.innerText,secondaryLabel:e.hasAttribute(N.attributes.SECONDARY_LABEL)?e.getAttribute(N.attributes.SECONDARY_LABEL):k(e.secondaryLabel)?e.secondaryLabel:void 0,value:e.hasAttribute(N.attributes.VALUE)?e.getAttribute(N.attributes.VALUE):e.value,disabled:e.hasAttribute(N.attributes.DISABLED),divider:e.hasAttribute(N.attributes.DIVIDER),optionClass:a,leadingIcon:e.hasAttribute(N.attributes.LEADING_ICON)?e.getAttribute(N.attributes.LEADING_ICON):e.leadingIcon,leadingIconClass:e.hasAttribute(N.attributes.LEADING_ICON_CLASS)?e.getAttribute(N.attributes.LEADING_ICON_CLASS):e.leadingIconClass,leadingIconType:e.hasAttribute(N.attributes.LEADING_ICON_TYPE)?e.getAttribute(N.attributes.LEADING_ICON_TYPE):e.leadingIconType,leadingIconComponentProps:e.leadingIconComponentProps,trailingIcon:e.hasAttribute(N.attributes.TRAILING_ICON)?e.getAttribute(N.attributes.TRAILING_ICON):e.trailingIcon,trailingIconClass:e.hasAttribute(N.attributes.TRAILING_ICON_CLASS)?e.getAttribute(N.attributes.TRAILING_ICON_CLASS):e.trailingIconClass,trailingIconType:e.hasAttribute(N.attributes.TRAILING_ICON_TYPE)?e.getAttribute(N.attributes.TRAILING_ICON_TYPE):e.trailingIconType,trailingIconComponentProps:e.trailingIconComponentProps,leadingBuilder:e.leadingBuilder,trailingBuilder:e.trailingBuilder}})}open(t){var e;if(this._listDropdown=new Pe(this._targetElement,t),this._listDropdown.open(),this._component.id){let a=(e=this._listDropdown.dropdownElement)==null?void 0:e.querySelector("forge-list");a==null||a.setAttribute("aria-labelledby",this._component.id)}}async close(){this._listDropdown&&(await this._listDropdown.close(),this.destroyListDropdown())}destroyListDropdown(){var t;(t=this._listDropdown)==null||t.destroy(),this._listDropdown=void 0}setDismissListener(t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(Z.events.TOGGLE,t)}toggleOptionMultiple(t,e){var a;(a=this._listDropdown)==null||a.toggleOptionMultiple(t,e)}getActiveOptionIndex(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:-1}activateSelectedOption(){var t;(t=this._listDropdown)==null||t.activateSelectedOption()}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}highlightActiveOption(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}patchSelectedValues(t){var e;(e=this._listDropdown)==null||e.setSelectedValues(t)}setOptionsListener(t){let e=o=>{o.stopPropagation(),t(this.getOptions())};this._component.addEventListener(N.events.VALUE_CHANGE,e);let a=new MutationObserver(()=>t(this.getOptions()));return a.observe(this._component,{childList:!0,subtree:!0}),()=>{this._component.removeEventListener(N.events.VALUE_CHANGE,e),a.disconnect()}}setOptions(t,e=!0){e&&this._clearOptions();for(let a of t)if(o5(a)){let o=this._createOptionGroupElement(a);for(let n of a.options){let i=this._createOptionElement(n);o.appendChild(i)}this._component.appendChild(o)}else{let o=this._createOptionElement(a);this._component.appendChild(o)}}appendDropdownOptions(t){var e;(e=this._listDropdown)==null||e.appendOptions(t)}setDropdownOptions(t){var e;(e=this._listDropdown)==null||e.setOptions(t)}scrollSelectedOptionIntoView(){var t;(t=this._listDropdown)==null||t.scrollSelectedOptionIntoView()}isFocusWithinPopup(t){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(t)}queueDropdownPositionUpdate(){this.popupElement&&window.requestAnimationFrame(()=>{let t=this.popupElement;t==null||t.position()})}_clearOptions(){Array.from(this._component.querySelectorAll(ia.elementName)).forEach(a=>Te(a)),Array.from(this._component.querySelectorAll(N.elementName)).forEach(a=>Te(a))}_createOptionGroupElement(t){let e=document.createElement("forge-option-group");return Object.assign(e,t),e}_createOptionElement(t){let e=document.createElement("forge-option");return Object.assign(e,t),e.textContent=t.label,t.elementAttributes&&t.elementAttributes.forEach((a,o)=>{e.setAttribute(o,a)}),e}};var Od={VALUE:"value",MULTIPLE:"multiple",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",SYNC_POPUP_WIDTH:"sync-popup-width",CONSTRAIN_POPUP_WIDTH:"constrain-popup-width",WRAP_OPTION_TEXT:"wrap-option-text"},Bf=w({},Od),Tf={CHANGE:"change"},bt={observedAttributes:Od,attributes:Bf,events:Tf};var So=class extends K0{constructor(e){super();this._adapter=e;this._options=[];this._value=[];this._multiple=!1;this._open=!1;this._selectedValues=[];this._selectedLabels=[];this._selectedIndexes=[];this._filterString="";this._focusListener=a=>this._onFocus(a),this._blurListener=a=>this._onBlur(a),this._clickListener=a=>this._onClick(a),this._keydownListener=a=>this._onKeydown(a),this._optionsChangedListener=a=>this._onOptionsChanged(a),this._activeChangeListener=a=>this._onActiveOptionChanged(a),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dismissListener=()=>this._onDismiss(),this._identifier=P2()}_onFocus(e){}initialize(){this._optionListenerDestructor&&this._optionListenerDestructor(),this._optionListenerDestructor=this._adapter.setOptionsListener(this._optionsChangedListener),this._initializeValue()}initializeTarget(){this._adapter.initializeAccessibility(),this._adapter.addClickListener(this._clickListener),this._adapter.addTargetListener("blur",this._blurListener),this._adapter.addTargetListener("focus",this._focusListener),this._adapter.addTargetListener("keydown",this._keydownListener)}destroy(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeTargetListener("blur",this._blurListener),this._adapter.removeTargetListener("focus",this._focusListener),this._adapter.removeTargetListener("keydown",this._keydownListener),this._optionListenerDestructor&&this._optionListenerDestructor(),this._open=!1,this._adapter.destroyListDropdown()}appendOptions(e){this._adapter.setOptions(e,!1),this._open&&this._adapter.appendDropdownOptions(e)}selectAll(){this._multiple&&(this.value=this._flatOptions.map(e=>e.value))}deselectAll(){this._multiple&&(this.value=[])}get _flatOptions(){return a5(this._options,1)?[].concat.apply([],this._options.map(e=>e.options)):this._options}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}_initializeValue(){let e=this._options.length&&this._options||this._adapter.getOptions();k(this._value)&&e.length&&this._applyValue(this._value)}_onClick(e){e.button===0&&(this._open?this._closeDropdown():this._openDropdown())}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._open&&this._closeDropdown()}_openDropdown(){if(this._options=this._adapter.getOptions(),!this._flatOptions.length)return;this._open=!0;let e={options:this._options,referenceElement:this._adapter.hostElement,multiple:this._multiple,selectedValues:[...this._selectedValues],id:this._identifier,optionBuilder:this._optionBuilder,syncWidth:this._syncPopupWidth,constrainViewportWidth:this._constrainPopupWidth,wrapOptionText:this._wrapOptionText,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,popupClasses:this._popupClasses,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,closeCallback:()=>this._closeDropdown(),selectCallback:a=>{let o=this._flatOptions,n=o.find(i=>i.value===a);if(n){let i=o.indexOf(n);this._onSelect(n,i,!0)}}};this._adapter.open(e),this._adapter.setDismissListener(this._dismissListener)}_closeDropdown(){this._open=!1,this._adapter.close()}async _onSelect(e,a,o=!0){return new Promise(async n=>{if(this._valueChanging)return Promise.resolve(!1);let i=e?e.value:"",l=e?e.label:"",h=[...this._value],c=[...this._selectedValues],d=[...this._selectedLabels],u=[...this._selectedIndexes];if(this._multiple)if(this._selectedValues.includes(i)){let z=this._selectedValues.indexOf(i);this._selectedValues.splice(z,1),this._selectedLabels.splice(z,1),this._selectedIndexes.splice(z,1)}else this._selectedValues.push(i),this._selectedLabels.push(l),this._selectedIndexes.push(a);else k(i)?(this._selectedValues[0]=i,this._selectedLabels[0]=l,this._selectedIndexes[0]=a):(this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]);this._value=[...this._selectedValues];let _=()=>{this._selectedValues=[...c],this._selectedLabels=[...d],this._selectedIndexes=[...u],this._value=[...h]},L=()=>{if(this._multiple){let z=this._selectedIndexes.includes(a);this._adapter.toggleOptionMultiple(a,z)}this._applySelection()},C=this.multiple?[...this._selectedValues]:this._selectedValues[0];if(this._open&&o&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"){this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,C));let z=await this._valueChanging;if(this._valueChanging=void 0,!z)return _(),this._tryUpdateDropdownPosition(),n(!1)}let A=!this._adapter.emitHostEvent(bt.events.CHANGE,C,!0,!0);A?_():L(),this._tryUpdateDropdownPosition(),n(!A)})}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._onSelect(this._nonDividerOptions[e],e)}_tryUpdateDropdownPosition(){this._open&&this._adapter.queueDropdownPositionUpdate()}_reset(){this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]}_applyValue(e){this._selectedValues=[],this._selectedLabels=[],this._options=this._adapter.getOptions(),Array.isArray(e)||(e=[e]),this._value=[];for(let a of e){this._value.includes(a)||this._value.push(a);let o=this._flatOptions.find(n=>Nt(n.value,a));o&&(this._selectedValues.push(o.value),this._selectedLabels.push(o.label))}this._selectedIndexes=this._selectedValues.map(a=>this._flatOptions.findIndex(o=>o.value===a)),this._adapter.patchSelectedValues(this._selectedValues)}_onDismiss(){this._closeDropdown()}_getSelectedText(){if(typeof this._selectedTextBuilder=="function"){let e=this._flatOptions.filter(a=>this._selectedValues.includes(a.value));return this._selectedTextBuilder(e)}return this._multiple?this._selectedLabels.length?this._selectedLabels.length===1?this._selectedLabels[0]:`${this._selectedLabels.length} options selected`:"":this._selectedLabels.filter(e=>e&&e.length).join(" ").trim()}_onKeydown(e){let a=e.key==="Escape"||e.keyCode===27,o=e.key==="Enter"||e.keyCode===13,n=e.key==="Space"||e.keyCode===32,i=e.key==="ArrowDown"||e.keyCode===40,l=e.key==="ArrowUp"||e.keyCode===38,h=e.keyCode>=48&&e.keyCode<=90,c=e.key==="Home"||e.keyCode===36,d=e.key==="End"||e.keyCode===35;if(e.key==="Tab"&&this._open&&!this._multiple){this._selectActiveOption();return}if(!h&&this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterString="",this._filterTimeout=void 0),a&&(e.preventDefault(),e.stopPropagation(),this._open)){this._closeDropdown();return}if(n)e.preventDefault(),e.stopPropagation(),this._open?this._closeDropdown():this._openDropdown();else if(o)this._open&&(e.stopPropagation(),e.preventDefault(),this._options=this._adapter.getOptions(),this._selectActiveOption());else if(l||i){if(e.preventDefault(),!this._open){this._openDropdown(),this._adapter.activateFirstOption();return}if(this._flatOptions.length===0)return;let _=0;this._open?(_=this._adapter.getActiveOptionIndex(),_===-1&&(_=this._getFirstSelectedOptionIndex())):_=this._getFirstSelectedOptionIndex(),l?_=this._getPreviousHighlightableOptionIndex(_,this._nonDividerOptions):_=this._getNextHighlightableOptionIndex(_,this._nonDividerOptions),this._adapter.highlightActiveOption(_)}else if(c)this._open&&(e.preventDefault(),this._adapter.highlightActiveOption(this._nonDividerOptions.findIndex(_=>!_.disabled)));else if(d){if(this._open){e.preventDefault();let _=this._nonDividerOptions;for(let L=_.length-1;L>=0;L--)if(!_[L].disabled){this._adapter.highlightActiveOption(L);break}}}else h&&this._filter(e.key)}_getFirstSelectedOptionIndex(){return this._nonDividerOptions.findIndex(e=>this._selectedValues.includes(e.value))}_getPreviousHighlightableOptionIndex(e,a){let o=e;return o<=0?o=a.length-1:o--,a[o].disabled?this._getPreviousHighlightableOptionIndex(o,a):o}_getNextHighlightableOptionIndex(e,a){let o=e;return o===a.length-1?o=0:o++,a[o].disabled?this._getNextHighlightableOptionIndex(o,a):o}_filter(e){this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterTimeout=void 0),this._filterString+=e,this._filterTimeout=window.setTimeout(()=>{this._filterString="",this._filterTimeout=void 0},300),this._options=this._adapter.getOptions();let a=this._flatOptions.find(({disabled:o,label:n})=>!o&&n.trim().toLowerCase().startsWith(this._filterString.trim().toLowerCase()));if(a){let o=this._flatOptions.indexOf(a);this._open?this._adapter.highlightActiveOption(o):this._multiple||this._onSelect(a,o,!1)}}_onOptionsChanged(e){this._options=e,this._applyValue(this._value)}_onActiveOptionChanged(e){this._adapter.updateActiveDescendant(e)}get value(){return this._multiple?[...this._value]:this._value[0]}set value(e){let a;Array.isArray(e)?a=[...e]:a=e,this._applyValue(a)}get selectedIndex(){return this._multiple?[...this._selectedIndexes]:this._selectedIndexes[0]}set selectedIndex(e){this._options=this._adapter.getOptions();let a;if(Array.isArray(e)?a=[...e]:a=[e],a.sort(),this.multiple)this.value=a.map(o=>this._flatOptions[o]).filter(o=>o).map(o=>o.value);else{let o=this._flatOptions[a[a.length-1]];if(!o)return;this.value=o.value}}get options(){return this._adapter.getOptions()}set options(e){let a;a5(e,1)?a=e.map(o=>w({},o)):a=e.map(o=>w({},o)),this._options=a,this._adapter.setOptions(a),this._initializeValue(),this._open&&this._adapter.setDropdownOptions(a)}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._reset(),this._open&&this._closeDropdown())}get open(){return this._open}set open(e){this._open!==e&&(e?this._openDropdown():this._closeDropdown())}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit=e}get popupClasses(){return this._popupClasses}set popupClasses(e){this._popupClasses=e}get popupHeaderBuilder(){return this._popupHeaderBuilder}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}get popupFooterBuilder(){return this._popupFooterBuilder}set popupFooterBuilder(e){this._popupFooterBuilder=e}get popupElement(){return this._adapter.popupElement}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){this._beforeValueChange=e}};var yt=class extends R2{constructor(){super()}attributeChangedCallback(t,e,a){switch(super.attributeChangedCallback(t,e,a),t){case bt.attributes.MULTIPLE:this.multiple=p(a);break;case bt.attributes.VALUE:this.value=a;break}}appendOptions(t){this._core.appendOptions(t)}selectAll(){this._core.selectAll()}deselectAll(){this._core.deselectAll()}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}};s([v()],yt.prototype,"value",2),s([v()],yt.prototype,"selectedIndex",2),s([v()],yt.prototype,"options",2),s([v()],yt.prototype,"multiple",2),s([v()],yt.prototype,"open",2),s([v()],yt.prototype,"optionBuilder",2),s([v()],yt.prototype,"selectedTextBuilder",2),s([v()],yt.prototype,"beforeValueChange",2),s([v({set:!1})],yt.prototype,"popupElement",2);var Dd=`${b}select`,Sf={FIELD:"#field",SELECTED_TEXT:"#selected-text",LABEL:"#select-label"},Pd={OPEN:"open",TYPE:"type",VALUE:"value",LABEL:"label",MULTIPLE:"multiple",DISABLED:"disabled",PLACEHOLDER:"placeholder",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},kf=w({},Pd),Of={SCROLLED_BOTTOM:`${Dd}-scrolled-bottom`},G2={elementName:Dd,observedAttributes:Pd,attributes:kf,selectors:Sf,events:Of};var Js=class extends To{constructor(t){super(t),this._fieldElement=g(t,G2.selectors.FIELD),this._labelElement=g(t,G2.selectors.LABEL),this._selectedTextElement=g(t,G2.selectors.SELECTED_TEXT),this._fieldElement.setAttribute("exportparts",Object.values(V.parts).join(", ")),this._fieldElement.focusIndicatorTargetElement=this._component}get fieldElement(){return this._fieldElement}initializeAccessibility(){this._component.setAttribute("role","combobox"),this._component.setAttribute("aria-haspopup","true"),this._component.setAttribute("aria-expanded","false"),Oe(),Zt(this._component),this.fieldElement.required&&this.setHostAttribute("aria-required","true"),this.fieldElement.disabled&&this.setHostAttribute("aria-disabled","true"),this.fieldElement.invalid&&this.setHostAttribute("aria-invalid","true"),this._component[$1]=!this._component.disabled}setLabel(t){let a=!(this._fieldElement.labelPosition==="inset"&&(this._fieldElement.density==="extra-small"||this._fieldElement.dense))&&!!(t!=null&&t.trim());(!this._component.hasAttribute("aria-label")||this._component.getAttribute("aria-label")===this._labelElement.textContent)&&this._component.setAttribute("aria-label",t),a?(this._labelElement.isConnected||this._fieldElement.insertAdjacentElement("afterbegin",this._labelElement),this._labelElement.textContent=t):this._labelElement.remove()}setPlaceholderText(t){K(this._selectedTextElement,!!(t!=null&&t.trim()),"placeholder",t)}open(t){this._targetElement||(this._targetElement=g(this._fieldElement,V.selectors.POPOVER_TARGET)),super.open(t),this._component.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._component.setAttribute("aria-expanded","true"),this._fieldElement.popoverExpanded=!0}close(){return this._component.setAttribute("aria-expanded","false"),this._component.removeAttribute("aria-activedescendant"),Zt(this._component),this._fieldElement.popoverExpanded=!1,super.close()}floatLabel(t){this._fieldElement.floatLabel=t}updateActiveDescendant(t){K(this._component,!!t,"aria-activedescendant",t)}setSelectedText(t){this._selectedTextElement.textContent=t}setDisabled(t){this._component[$1]=!t,K(this._component,t,"aria-disabled","true")}setRequired(){this._component[wt]()}addClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}addTargetListener(t,e){this._component.addEventListener(t,e)}removeTargetListener(t,e){this._component.removeEventListener(t,e)}syncValue(t){let a=(Array.isArray(t)?!t.length||!t.some(n=>n!=null):t==null)?null:new FormData,o=JSON.stringify(t);a&&t&&a.append(this._component.name,o),this._component.setFormValue(a,o),this._component[wt]()}};var tl=class extends So{constructor(e){super(e);this._label="";this._required=!1;this._permanentlyFloatLabel=!1;this._mousedownListener=this._onMouseDown.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),super.initialize(),super.initializeTarget(),this._initializeLabel(),this._initializeAccessibility(),this._adapter.addTargetListener("mousedown",this._mousedownListener)}destroy(){super.destroy(),this._adapter.removeTargetListener("mousedown",this._mousedownListener)}syncFloatingLabelState({force:e}={}){e!==void 0&&(this._permanentlyFloatLabel=e),this._updateLabel(),this._tryFloatLabel()}setDisabled(e){this._adapter.setDisabled(e)}_initializeLabel(){this._updateLabel(),this._tryFloatLabel()}_initializeValue(){super._initializeValue(),this._tryFloatLabel()}_initializeAccessibility(){this._adapter.initializeAccessibility()}_onMouseDown(e){e.preventDefault()}_onClick(e){this._adapter.fieldElement.disabled||e.composedPath().find(o=>{var n;return(n=o.matches)==null?void 0:n.call(o,"slot[name=accessory]")})||(this._adapter.focusHost(),super._onClick(e))}_openDropdown(){super._openDropdown(),this._open&&this._adapter.toggleHostAttribute(G2.attributes.OPEN,!0)}_closeDropdown(){super._closeDropdown(),this._open||this._adapter.toggleHostAttribute(G2.attributes.OPEN,!1)}_onDismiss(){super._onDismiss()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(G2.events.SCROLLED_BOTTOM)}async _onSelect(e,a,o=!0){let n=await super._onSelect(e,a,o);return n&&(this._adapter.setSelectedText(this._getSelectedText()),o&&!this._multiple&&this._adapter.focusHost()),this._tryFloatLabel(),this._adapter.syncValue(this._value),n}_reset(){super._reset(),this._adapter.setSelectedText(""),this._tryFloatLabel()}_tryFloatLabel(){if(this._permanentlyFloatLabel){this._adapter.floatLabel(!0);return}let e=!!this._getSelectedText()||!!this._selectedValues.length,a=!!this._placeholder;this._adapter.floatLabel(e||a)}_updateLabel(){this._adapter.setLabel(this._label)}_applyValue(e){super._applyValue(e),this._adapter.syncValue(this._value);let a=this._getSelectedText();this._adapter.setSelectedText(a),this._open||this._tryFloatLabel()}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._updateLabel(),this._label&&this._initializeLabel(),this._adapter.toggleHostAttribute(G2.attributes.LABEL,!!this._label,this._label))}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder!==e&&(this._placeholder=e,this._adapter.setPlaceholderText(this._placeholder),this._initializeLabel())}get multiple(){return super.multiple}set multiple(e){this._multiple!==e&&(super.multiple=e,this._adapter.toggleHostAttribute(G2.attributes.MULTIPLE,e))}set required(e){this._required!==e&&this._adapter.setRequired()}};var Df='<template><forge-field id="field" popover-icon focus-indicator-allow-focus focus-indicator-focus-mode="focus"><label id="select-label" aria-hidden="true" part="label" slot="label"></label><slot slot="start" name="start"></slot><div data-forge-field-input class="selected-text-container" part="text-container" aria-live="assertive" aria-atomic="true"><slot name="value"><span id="selected-text" class="selected-text" part="text"></span></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',Pf=":host{display:block;outline:0}:host([hidden]){display:none}forge-field{--_select-placeholder-color:var(--forge-select-placeholder-color, var(--forge-field-placeholder-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6))))}.selected-text-container{display:grid;align-items:center;cursor:pointer}.selected-text,::slotted([slot=value]){white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.selected-text:empty::before{content:attr(placeholder);color:var(--_select-placeholder-color);font-size:inherit}:host([disabled]) .selected-text-container{cursor:not-allowed}forge-field{display:contents}",Ee=class extends Ue(it(Fe(L1(H1(Cd(yt)))))){static get observedAttributes(){return[...Object.values(F.observedAttributes),...Object.values(G2.observedAttributes),...Object.values(bt.observedAttributes)]}constructor(){var e;super(),q.define([A0,z0]),H(this,Df,Pf);let t=(e=this.shadowRoot)==null?void 0:e.querySelector(V.elementName);this.initializeFieldInstance(t),this[jt]="select",this._core=new tl(new Js(this))}connectedCallback(){super.connectedCallback(),this[P]({role:"combobox",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"})}attributeChangedCallback(t,e,a){switch(t){case G2.observedAttributes.OPEN:this.open=p(a);return;case G2.observedAttributes.LABEL:this.label=a;return;case G2.observedAttributes.PLACEHOLDER:this.placeholder=a;return}super.attributeChangedCallback(t,e,a)}[Lt](){return this.value}[wt](){this[a1].setValidity({valueMissing:this.required&&!this.value},this[Xt]({required:this.required,value:this.value}))}formResetCallback(){this.value=null}formStateRestoreCallback(t){this.value=JSON.parse(t)}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[P]({ariaLabel:t})}setFormValue(t,e){this[a1].setFormValue(t,e)}get floatLabel(){return super.floatLabel}set floatLabel(t){this._core.syncFloatingLabelState({force:t})}get density(){return super.density}set density(t){super.density=t,this._core.syncFloatingLabelState()}get dense(){return super.dense}set dense(t){super.dense=t,this._core.syncFloatingLabelState()}get disabled(){return super.disabled}set disabled(t){super.disabled=t,this._core.setDisabled(t)}get required(){return super.required}set required(t){super.required=t,this._core.required=t}get labelPosition(){return super.labelPosition}set labelPosition(t){super.labelPosition=t,this._core.syncFloatingLabelState()}};s([v()],Ee.prototype,"label",2),s([v()],Ee.prototype,"placeholder",2),s([v()],Ee.prototype,"readonly",2),Ee=s([y({name:G2.elementName,dependencies:[k1,J1,Xe,P1,h2,j1,Tt,X,$e,se,n1]})],Ee);function Nd(){x(Ee)}var Nf='<template><div class="forge-paginator" part="root" forge-popover-host><div class="container" part="container"><div class="label" part="label" id="label"><slot name="label"></slot></div><forge-select class="page-size-options" aria-labelledby="label" label-position="none" density="extra-small" part="page-size-options"></forge-select><div class="range-label" part="range-label"><slot name="range-label"></slot></div></div><div class="actions" part="actions"><div id="first-page-container"><forge-icon-button class="first-page" part="first-page-button" part="first-page-button-element"><forge-icon name="first_page" part="first-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="first-page-tooltip">Go to the first page</slot></forge-tooltip></div><div id="previous-page-container"><forge-icon-button class="previous-page" part="previous-page-button" part="previous-page-button-element"><forge-icon name="keyboard_arrow_left" part="previous-page-button-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="previous-page-tooltip">Go to the previous page</slot></forge-tooltip></div><div class="alternative-range-label" part="alternative-range-label"><slot name="alternative-range-label"></slot></div><div id="next-page-container"><forge-icon-button class="next-page" part="next-page-button" part="next-page-button-element"><forge-icon name="keyboard_arrow_right" part="next-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="next-page-tooltip">Go to the next page</slot></forge-tooltip></div><div id="last-page-container"><forge-icon-button class="last-page" part="last-page-button" part="last-page-button-element"><forge-icon name="last_page" part="last-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="last-page-tooltip">Go to the last page</slot></forge-tooltip></div></div></div></template>',Rf=':host{display:block}:host([hidden]){display:none}.forge-paginator{display:flex;gap:var(--forge-spacing-xsmall,8px)}.container{display:flex;gap:var(--forge-spacing-medium,16px);align-items:center}.alternative-range-label,.label,.range-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit)}.actions{display:flex;align-items:center}.alternative-range-label{display:none}:host([alternative]) .alternative-range-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);display:inline-block}:host([alternative]) .container{display:none}:host([alternative]) .actions{width:100%;justify-content:var(--forge-paginator-alternative-alignment,start)}',ot=class extends M{static get observedAttributes(){return Object.values($.observedAttributes)}constructor(){super(),q.define([t3,s0,fe,o3]),H(this,Nf,Rf),this._core=new Xs(new js(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){var o,n,i,l;switch(t){case $.observedAttributes.PAGE_INDEX:this.pageIndex=(o=W(a))!=null?o:$.numbers.DEFAULT_PAGE_INDEX;break;case $.observedAttributes.PAGE_SIZE:this.pageSize=(n=W(a))!=null?n:$.numbers.DEFAULT_PAGE_SIZE;break;case $.observedAttributes.OFFSET:this.offset=W(a);break;case $.observedAttributes.TOTAL:this.total=(i=W(a))!=null?i:$.numbers.DEFAULT_TOTAL;break;case $.observedAttributes.PAGE_SIZE_OPTIONS:this.pageSizeOptions=(l=Tr(a))!=null?l:$.numbers.DEFAULT_PAGE_SIZE_OPTIONS;break;case $.observedAttributes.LABEL:this.label=a;break;case $.observedAttributes.FIRST_LAST:this.firstLast=p(a);break;case $.observedAttributes.FIRST:this.first=p(a);break;case $.observedAttributes.DISABLED:this.disabled=p(a);break;case $.observedAttributes.ALTERNATIVE:this.alternative=p(a);break}}focus(t){this._core.focus(t)}};s([v()],ot.prototype,"pageIndex",2),s([v()],ot.prototype,"pageSize",2),s([v()],ot.prototype,"offset",2),s([v()],ot.prototype,"total",2),s([v()],ot.prototype,"pageSizeOptions",2),s([v()],ot.prototype,"label",2),s([v()],ot.prototype,"firstLast",2),s([v()],ot.prototype,"first",2),s([v()],ot.prototype,"disabled",2),s([v()],ot.prototype,"alternative",2),s([v()],ot.prototype,"rangeLabelCallback",2),ot=s([y({name:$.elementName,dependencies:[n1,Ee,p1]})],ot);function Rd(){x(ot)}var Fd=`${b}select-dropdown`,Ff={TARGET:"target",SELECTED_TEXT_TARGET:"selected-text-target",SYNC_SELECTED_TEXT:"sync-selected-text"},Uf=w({},Ff),Wf={SCROLLED_BOTTOM:`${Fd}-scrolled-bottom`},je={elementName:Fd,attributes:Uf,events:Wf};var el=class extends So{constructor(e){super(e);this._syncSelectedText=!1;this._originalTargetText="";this._targetDisconnectedListener=()=>this._onTargetDisconnected()}initialize(){this._tryAttach(),super.initialize()}destroy(){super.destroy(),this._adapter.isAttached()&&this._detach()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(je.events.SCROLLED_BOTTOM)}_applyValue(e){super._applyValue(e),this._applySelection()}_applySelection(){if(super._applySelection(),this._syncSelectedText||typeof this._selectedTextBuilder=="function"){let e=this._getSelectedText();e||(e=this._originalTargetText),this._adapter.setTargetText(e||"",this._selectedTextTarget)}}_tryAttach(){this._adapter.attach(this._target),this._adapter.isAttached()&&(this._targetDisconnectedDestructor=this._adapter.setTargetDisconnectedListener(this._targetDisconnectedListener),this._originalTargetText=this._adapter.getTargetText(this._selectedTextTarget),this.initializeTarget())}_detach(){this._adapter.detach(),this._targetDisconnectedDestructor&&(this._targetDisconnectedDestructor(),this._targetDisconnectedDestructor=void 0)}_onTargetDisconnected(){this._adapter.detach()}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this._adapter.isAttached()&&this._detach(),this._tryAttach())}get selectedTextTarget(){return this._selectedTextTarget}set selectedTextTarget(e){this._selectedTextTarget!==e&&(this._selectedTextTarget=e)}get syncSelectedText(){return this._syncSelectedText}set syncSelectedText(e){this._syncSelectedText!==e&&(this._syncSelectedText=e)}};var al=class extends To{constructor(t){super(t)}initializeAccessibility(){this._targetElement.setAttribute("role","combobox"),this._targetElement.setAttribute("aria-live","polite"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this.setAriaControls()}addClickListener(t){this._targetElement.addEventListener("click",t)}removeClickListener(t){this._targetElement&&this._targetElement.removeEventListener("click",t)}addTargetListener(t,e){let a,o;t==="keydown"&&(a=!1,o=!0),this._targetElement.addEventListener(t,e,{passive:a,capture:o})}removeTargetListener(t,e){this._targetElement&&this._targetElement.removeEventListener(t,e)}updateActiveDescendant(t){t?this._targetElement.setAttribute("aria-activedescendant",t):this._targetElement.removeAttribute("aria-activedescendant")}open(t){super.open(t),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._targetElement.setAttribute("aria-expanded","true")}close(){return this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.removeAttribute("aria-activedescendant"),this.setAriaControls(),super.close()}attach(t){let o=(this._component.getRootNode()||HTMLDocument||this._component.ownerDocument||document).querySelector(t);o&&(this._targetElement=o)}detach(){this._targetElement=void 0}setTargetDisconnectedListener(t){if(!this._targetElement||!this._targetElement.parentElement)return()=>{};let e=new MutationObserver(a=>{a.some(n=>Array.from(n.removedNodes).some(i=>i===this._targetElement))&&(e.disconnect(),t())});return e.observe(this._targetElement.parentElement,{childList:!0}),()=>e.disconnect()}isAttached(){return!!this._targetElement}setTargetText(t,e){let a=this._targetElement;if(e){let o=this._getElementBySelector(e);o&&(a=o)}a&&(a.textContent=t)}getTargetText(t){let e=t?this._getElementBySelector(t):this._targetElement;return e?e.innerText:""}_getElementBySelector(t){return this._targetElement.querySelector(t)||this._getRootNode().querySelector(t)}_getRootNode(){var t,e;return(e=(t=this._component.getRootNode())!=null?t:this._component.ownerDocument)!=null?e:document}setAriaControls(){let t=this._component.querySelector("[data-forge-aria-controls-placeholder]");if(t){this._targetElement.setAttribute("aria-controls",t.id);return}t=document.createElement("div"),t.id=`forge-select-dropdown-temp-${P2(10)}`,t.setAttribute("data-forge-aria-controls-placeholder",""),this._targetElement.setAttribute("aria-controls",t.id),this._component.appendChild(t)}};var Gf="<template></template>",Yf=":host{display:none}",f0=class extends yt{static get observedAttributes(){return[je.attributes.TARGET,je.attributes.SELECTED_TEXT_TARGET,je.attributes.SYNC_SELECTED_TEXT,bt.attributes.VALUE,bt.attributes.MULTIPLE,bt.attributes.OBSERVE_SCROLL,bt.attributes.OBSERVE_SCROLL_THRESHOLD,bt.attributes.POPUP_CLASSES,bt.attributes.OPTION_LIMIT,bt.attributes.SYNC_POPUP_WIDTH]}constructor(){super(),H(this,Gf,Yf),this._core=new el(new al(this))}attributeChangedCallback(t,e,a){switch(t){case je.attributes.TARGET:this.target=a;return;case je.attributes.SELECTED_TEXT_TARGET:this.selectedTextTarget=a;return;case je.attributes.SYNC_SELECTED_TEXT:this.syncSelectedText=p(a);return}super.attributeChangedCallback(t,e,a)}};s([v()],f0.prototype,"target",2),s([v()],f0.prototype,"selectedTextTarget",2),s([v()],f0.prototype,"syncSelectedText",2),f0=s([y({name:je.elementName,dependencies:[J1,Xe,P1,h2,j1,Tt,$e,se,n1]})],f0);function Ud(){x(f0)}var Wd=class extends a2{constructor(t){super(t)}_build(){return document.createElement(G2.elementName)}_configure(){var t;typeof((t=this._config.options)==null?void 0:t.helperText)=="string"&&this.setHelperText(this._config.options.helperText)}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}onChange(t){this._element.addEventListener("change",e=>t(e.detail))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&this._helperTextElement.isConnected&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}};var Kf=`${b}skip-link`,Gd={TARGET:"target",THEME:"theme",MUTED:"muted",PERSISTENT:"persistent",INLINE:"inline",SKIP_URL_CHANGE:"skip-url-change"},qf=w({},Gd),$f={ANCHOR:"a"},pt={elementName:Kf,observedAttributes:Gd,attributes:qf,selectors:$f};var Xf='<template><a class="forge-skip-link" part="anchor"><slot>Skip to main content</slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></a></template>',jf=':host{--_skip-link-inset:var(--forge-skip-link-inset, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-medium, 16px));--_skip-link-z-index:var(--forge-skip-link-z-index, var(--forge-z-index-popup, 10));--_skip-link-transition-duration:var(--forge-skip-link-transition-duration, var(--forge-animation-duration-short4, 200ms));--_skip-link-transition-timing-function:var(--forge-skip-link-transition-timing-function, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}:host{transition-property:opacity,transform;transition-duration:var(--_skip-link-transition-duration);transition-timing-function:var(--_skip-link-transition-timing-function);display:block;position:fixed;inset:var(--_skip-link-inset);z-index:var(--_skip-link-z-index);block-size:fit-content;inline-size:fit-content;opacity:0;transform:translateY(-100%)}:host([hidden]){display:none}:host(:where(:focus-within,[persistent])){transition-property:opacity,transform;transition-duration:var(--_skip-link-transition-duration);transition-timing-function:var(--_skip-link-transition-timing-function);transform:translateY(0);opacity:1}.forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary, #ffc107));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary, #000000));--_skip-link-shape:var(--forge-skip-link-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_skip-link-elevation:var(--forge-skip-link-elevation, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12));--_skip-link-padding-block:var(--forge-skip-link-padding-block, var(--forge-spacing-xsmall, 8px));--_skip-link-padding-inline:var(--forge-skip-link-padding-inline, var(--forge-spacing-medium, 16px));--_skip-link-focus-indicator-color:var(--forge-skip-link-focus-indicator-color, var(--_skip-link-background))}.forge-skip-link{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);display:block;outline:0;box-shadow:var(--_skip-link-elevation);border-radius:var(--_skip-link-shape);background:var(--_skip-link-background);padding-block:var(--_skip-link-padding-block);padding-inline:var(--_skip-link-padding-inline);cursor:pointer;color:var(--_skip-link-color);text-decoration:underline}:host([theme=primary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-primary, #3f51b5));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-primary, #ffffff))}:host([theme=primary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-primary-container-high, #b6bde3));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-primary-container-high, #000000))}:host([theme=secondary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary, #ffc107));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary, #000000))}:host([theme=secondary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary-container-high, #ffe7a1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary-container-high, #000000))}:host([theme=tertiary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-tertiary, #3d5afe));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=tertiary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-tertiary-container-high, #b5c0ff));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-tertiary-container-high, #000000))}:host([theme=success]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-success, #2e7d32));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-success, #ffffff))}:host([theme=success][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-success-container-high, #b0ceb1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-success-container-high, #000000))}:host([theme=error]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-error, #b00020));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-error, #ffffff))}:host([theme=error][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-error-container-high, #e19eaa));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-error-container-high, #000000))}:host([theme=warning]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-warning, #d14900));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=warning][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-warning-container-high, #eeba9e));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-warning-container-high, #000000))}:host([theme=info]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-info, #1565c0));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-info, #ffffff))}:host([theme=info][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-info-container-high, #a6c4e7));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-info-container-high, #000000))}:host(:where(:not([theme]),[theme=default])[muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary-container-high, #ffe7a1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary-container-high, #000000))}:host([inline]){position:absolute;transform:none}forge-focus-indicator{--forge-focus-indicator-color:var(--_skip-link-focus-indicator-color);--forge-focus-indicator-shape:var(--_skip-link-shape)}@media (prefers-reduced-motion:reduce){:host{--_skip-link-transition-duration:var(--forge-skip-link-transition-duration, 0s)}}',ko=class extends M{constructor(){super();this._target="";this._theme="default";this._muted=!1;this._persistent=!1;this._inline=!1;this._skipUrlChange=!1;this._clickListener=e=>this._handleClick(e);H(this,Xf,jf),this._anchorElement=g(this,pt.selectors.ANCHOR)}static get observedAttributes(){return Object.values(pt.observedAttributes)}attributeChangedCallback(e,a,o){switch(e){case pt.observedAttributes.TARGET:this.target=o;break;case pt.observedAttributes.THEME:this.theme=o;break;case pt.observedAttributes.MUTED:this.muted=p(o);break;case pt.observedAttributes.PERSISTENT:this.persistent=p(o);break;case pt.observedAttributes.INLINE:this.inline=p(o);break;case pt.observedAttributes.SKIP_URL_CHANGE:this.skipUrlChange=p(o);break}}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this.setAttribute(pt.attributes.TARGET,this._target),this._anchorElement.href=`#${this._target}`)}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this.setAttribute(pt.attributes.THEME,this._theme))}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this.toggleAttribute(pt.attributes.MUTED,this._muted))}get persistent(){return this._persistent}set persistent(e){this._persistent!==e&&(this._persistent=e,this.toggleAttribute(pt.attributes.PERSISTENT,this._persistent))}get inline(){return this._inline}set inline(e){this._inline!==e&&(this._inline=e,this.toggleAttribute(pt.attributes.INLINE,this._inline))}get skipUrlChange(){return this._skipUrlChange}set skipUrlChange(e){if(this._skipUrlChange!==e){if(this._skipUrlChange=e,this.toggleAttribute(pt.attributes.SKIP_URL_CHANGE,this._skipUrlChange),this._skipUrlChange){this._anchorElement.addEventListener("click",this._clickListener);return}this._anchorElement.removeEventListener("click",this._clickListener)}}_handleClick(e){e.preventDefault();let a=document.getElementById(this._target);a==null||a.focus(),a==null||a.scrollIntoView({behavior:"smooth"})}};ko=s([y({name:pt.elementName,dependencies:[Q,r1]})],ko);function Yd(){x(ko)}var Er=class extends M{};Er.formAssociated=!0;var Zf=`${b}slider`,Qf={ARIA_LABEL:"data-aria-label",ARIA_LABEL_START:"data-aria-label-start",ARIA_LABEL_END:"data-aria-label-end",VALUE:"value",VALUE_START:"value-start",VALUE_END:"value-end",LABEL:"label",LABEL_START:"label-start",LABEL_END:"label-end",MIN:"min",MAX:"max",STEP:"step",TICKMARKS:"tickmarks",LABELED:"labeled",RANGE:"range",DISABLED:"disabled",READONLY:"readonly"},Jf={ROOT:".forge-slider",TRACK:".track",HANDLE_CONTAINER:".handle-container",START_INPUT:"input.start",END_INPUT:"input.end",START_HANDLE:".handle.start",START_HANDLE_THUMB:".handle.start .handle-thumb",END_HANDLE:".handle.end",END_HANDLE_THUMB:".handle.end .handle-thumb",START_LABEL:".handle.start .handle-label",START_LABEL_CONTENT:".handle.start .handle-label-content",END_LABEL:".handle.end .handle-label",END_LABEL_CONTENT:".handle.end .handle-label-content",LABEL:".handle-label",INPUT:"input[type=range]"},tx={RANGE:"range",TICKMARKS:"tickmarks",ON_TOP:"on-top",OVERLAPPING:"overlapping",HOVER:"hover",HANDLE:"handle",HANDLE_THUMB:"handle-thumb",HANDLE_START:"start",HANDLE_LABEL:"handle-label",LABEL:"handle-label",LABEL_CONTENT:"handle-label-content"},ex={INPUT:"forge-slider-input",CHANGE:"forge-slider-change",RANGE_INPUT:"forge-slider-range-input",RANGE_CHANGE:"forge-slider-range-change"},ax={START_FRACTION:"--_slider-start-fraction",END_FRACTION:"--_slider-end-fraction",TICK_COUNT:"--_slider-tick-count"},ox={DEFAULT_STEP:1,DEFAULT_VALUE:50,DEFAULT_START_VALUE:33,DEFAULT_END_VALUE:67},E={elementName:Zf,attributes:Qf,selectors:Jf,classes:tx,events:ex,numbers:ox,cssCustomProperties:ax};function Kd(r){let t=document.createElement("input");return t.type="range",t.id="start",t.min=String(r.min),t.max=String(r.max),t.step=String(r.step),t.valueAsNumber=r.valueStart,t.disabled=r.disabled,t.classList.add("start"),r.hasAttribute(E.attributes.ARIA_LABEL_START)&&t.setAttribute("aria-label",r.getAttribute(E.attributes.ARIA_LABEL_START)),t.setAttribute("aria-valuetext",String(r.valueStart)),t}function qd(r){let t=document.createElement("div");t.classList.add(E.classes.HANDLE,E.classes.HANDLE_START),t.setAttribute("part","handle-start");let e=document.createElement("forge-state-layer");e.target="start",t.appendChild(e);let a=document.createElement("forge-focus-indicator");a.target="start",t.appendChild(a);let o=document.createElement("div");o.classList.add(E.classes.HANDLE_THUMB),o.setAttribute("part","handle-start-thumb"),t.appendChild(o);let n=document.createElement("div");n.classList.add(E.classes.HANDLE_LABEL),n.setAttribute("part","handle-start-label"),t.appendChild(n);let i=document.createElement("span");return i.textContent=r,i.classList.add(E.classes.LABEL_CONTENT),i.setAttribute("part","handle-start-label-content"),n.appendChild(i),t}function r5(r){let t=document.createElement("div");t.classList.add(E.classes.LABEL);let e=document.createElement("span");return e.textContent=r,e.classList.add(E.classes.LABEL_CONTENT),t.appendChild(e),t}var ol=class extends I{constructor(t){super(t),this._rootElement=g(t,E.selectors.ROOT),this._trackElement=g(t,E.selectors.TRACK),this._handleContainerElement=g(t,E.selectors.HANDLE_CONTAINER),this._endInputElement=g(t,E.selectors.END_INPUT),this._endHandleElement=g(t,E.selectors.END_HANDLE),this._endHandleThumbElement=g(t,E.selectors.END_HANDLE_THUMB),this._endLabelContentElement=g(t,E.selectors.END_LABEL_CONTENT)}addInputListener(t,e){this._getInputs().forEach(o=>o.addEventListener(t,e))}update({startFraction:t,endFraction:e,tickCount:a}){this._rootElement.style.setProperty(E.cssCustomProperties.START_FRACTION,String(t)),this._rootElement.style.setProperty(E.cssCustomProperties.END_FRACTION,String(e)),this._rootElement.style.setProperty(E.cssCustomProperties.TICK_COUNT,String(a))}updateLabels(t,e){var a;this._startLabelContentElement&&(this._startLabelContentElement.textContent=t),this._endLabelContentElement&&(this._endLabelContentElement.textContent=e),(a=this._startInputElement)==null||a.setAttribute("aria-valuetext",t),this._endInputElement.setAttribute("aria-valuetext",e)}updateHandleLayering(){let t=this._endInputElement.matches(":focus");this._startHandleElement&&_2(this._startHandleElement,!t,E.classes.ON_TOP),_2(this._endHandleElement,t,E.classes.ON_TOP)}tryHoverStartHandle(t){var e,a,o;this._startHandleThumbElement&&Ql(t,this._startHandleThumbElement)?(this._handleContainerElement.classList.add(E.classes.HOVER),(e=this._startHandleElement)==null||e.classList.add(E.classes.HOVER)):(a=this._startInputElement)!=null&&a.matches(":focus")||(this._handleContainerElement.classList.remove(E.classes.HOVER),(o=this._startHandleElement)==null||o.classList.remove(E.classes.HOVER))}tryHoverEndHandle(t){Ql(t,this._endHandleThumbElement)?(this._handleContainerElement.classList.add(E.classes.HOVER),this._endHandleElement.classList.add(E.classes.HOVER)):this._endInputElement.matches(":focus")||(this._handleContainerElement.classList.remove(E.classes.HOVER),this._endHandleElement.classList.remove(E.classes.HOVER))}tryDetectOverlap(){if(this._startHandleElement){let t=_3(this._startHandleElement,this._endHandleElement);_2(this._endHandleElement,t,E.classes.OVERLAPPING),_2(this._startHandleElement,t,E.classes.OVERLAPPING)}}leaveHandleContainer(){this._handleContainerElement.classList.remove(E.classes.HOVER)}syncInputValues(t,e){if(this._startInputElement&&(this._startInputElement.valueAsNumber=t),this._endInputElement.valueAsNumber=e,this._startInputElement){let a=new FormData;a.append(this._component.nameStart,String(t)),a.append(this._component.nameEnd,String(e)),this._component[a1].setFormValue(a)}else this._component[a1].setFormValue(String(e))}setRange(t){var e,a;if(this._rootElement.classList.toggle(E.classes.RANGE,t),t){this._startInputElement=Kd(this._component),this._rootElement.insertAdjacentElement("afterbegin",this._startInputElement),this._endInputElement.valueAsNumber=this._component.valueEnd;let o=this._startInputElement.value;this._startHandleElement=qd(o),this._handleContainerElement.insertAdjacentElement("afterbegin",this._startHandleElement),this._startHandleThumbElement=g(this._component,E.selectors.START_HANDLE_THUMB),this._startLabelContentElement=g(this._component,E.selectors.START_LABEL_CONTENT)}else(e=this._startInputElement)==null||e.remove(),(a=this._startHandleElement)==null||a.remove(),this._startInputElement=void 0,this._startHandleElement=void 0,this._startHandleThumbElement=void 0,this._startLabelContentElement=void 0}setTickmarks(t){this._trackElement.classList.toggle(E.classes.TICKMARKS,t)}setStep(t){this._getInputs().forEach(a=>a.step=String(t))}setMin(t){this._getInputs().forEach(a=>a.min=String(t))}setMax(t){this._getInputs().forEach(a=>a.max=String(t))}setDisabled(t){this._getInputs().forEach(o=>o.disabled=t),this._rootElement.querySelectorAll(M1.elementName).forEach(o=>o.disabled=t)}setReadonly(t){this._getInputs().forEach(a=>a.readOnly=t)}toggleLabels(t){var a;if(this._rootElement.querySelectorAll(E.selectors.LABEL).forEach(o=>o.remove()),this._endLabelContentElement=void 0,this._startLabelContentElement=void 0,t){let o=r5(this._endInputElement.value);if(this._endHandleElement.insertAdjacentElement("beforeend",o),this._endLabelContentElement=g(this._component,E.selectors.END_LABEL_CONTENT),this._startInputElement){let n=r5(this._startInputElement.value);(a=this._startHandleElement)==null||a.insertAdjacentElement("beforeend",n),this._startLabelContentElement=g(this._component,E.selectors.START_LABEL_CONTENT)}}}setStartAriaLabel(t){this._startInputElement&&K(this._startInputElement,!!t,"aria-label",t)}setEndAriaLabel(t){K(this._endInputElement,!!t,"aria-label",t)}_getInputs(){let t=[];return this._startInputElement&&t.push(this._startInputElement),[...t,this._endInputElement]}};var rl=class{constructor(t){this._adapter=t;this._value=E.numbers.DEFAULT_VALUE;this._valueStart=E.numbers.DEFAULT_START_VALUE;this._valueEnd=E.numbers.DEFAULT_END_VALUE;this._min=0;this._max=100;this._step=E.numbers.DEFAULT_STEP;this._tickmarks=!1;this._labeled=!0;this._range=!1;this._disabled=!1;this._readonly=!1;this._pointerEnterListener=e=>this._handlePointerEnter(e),this._pointerMoveListener=e=>this._handlePointerMove(e),this._pointerLeaveListener=e=>this._handlePointerLeave(e),this._changeUpdateListener=e=>this._handleInputUpdate(e),this._focusListener=e=>this._handleFocus(e)}initialize(){this._applyInputListeners(),this._update()}_update(){var _,L;let{value:t,valueStart:e,valueEnd:a}=this._clampMinMax(),o=this._step<=0?1:this._step,n=Math.max(this._max-this._min,o),i=this._range?((e!=null?e:this._min)-this._min)/n:0,l=this._range?a:t,h=((l!=null?l:this.min)-this.min)/n,c=n/o;this._adapter.update({startFraction:i,endFraction:h,tickCount:c}),this._adapter.syncInputValues(e,this._range?a:t),this._range&&this._adapter.tryDetectOverlap();let d=(_=this._labelStart)!=null?_:String(e),u=(L=this._labelEnd)!=null?L:String(this._range?a:t);typeof this._labelBuilder=="function"&&(this._range?(d=this._labelBuilder(e,"start"),u=this._labelBuilder(a,"end")):u=this._labelBuilder(t)),this._adapter.updateLabels(d,u)}_clampMinMax(){let t=this._value,e=this._valueStart,a=this._valueEnd;return this._range?(e>this._max?e=this._max:e<this._min&&(e=this._min),a>this._max?a=this._max:a<this._min&&(a=this._min)):t>this._max?t=this._max:this._value<this._min&&(t=this._min),{value:t,valueStart:e,valueEnd:a}}_applyInputListeners(){this._adapter.addInputListener("pointerenter",this._pointerEnterListener),this._adapter.addInputListener("pointermove",this._pointerMoveListener),this._adapter.addInputListener("pointerleave",this._pointerLeaveListener),this._adapter.addInputListener("input",this._changeUpdateListener),this._adapter.addInputListener("change",this._changeUpdateListener),this._adapter.addInputListener("focus",this._focusListener)}_handlePointerEnter(t){this._handlePointerMove(t)}_handlePointerMove({target:t,x:e,y:a}){t.id==="start"?this._adapter.tryHoverStartHandle({x:e,y:a}):this._adapter.tryHoverEndHandle({x:e,y:a})}_handlePointerLeave(t){this._adapter.leaveHandleContainer()}_handleInputUpdate(t){if(t.stopPropagation(),this._disabled||this._readonly){this._adapter.syncInputValues(this._valueStart,this._range?this._valueEnd:this._value);return}let e=t.target;if(this._range){let l=e.id==="start";if(l?this._valueStart=e.valueAsNumber:this._valueEnd=e.valueAsNumber,this._canClamp()){l?this._valueStart=this._valueEnd:this._valueEnd=this._valueStart,this._adapter.syncInputValues(this._valueStart,this._valueEnd),this._update();return}}else this._value=e.valueAsNumber;let a={default:{change:E.events.CHANGE,input:E.events.INPUT},range:{change:E.events.RANGE_CHANGE,input:E.events.RANGE_INPUT}},o=this._range?a.range[t.type]:a.default[t.type],n=this._range?{valueStart:this._valueStart,valueEnd:this._valueEnd}:{value:this._value},i=new CustomEvent(o,{detail:n,bubbles:!0});this._adapter.dispatchHostEvent(i),this._update()}_handleFocus(t){this._adapter.updateHandleLayering()}_canClamp(){return this._valueStart>this._valueEnd||this._valueEnd<this._valueStart}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._update())}get valueStart(){return this._valueStart}set valueStart(t){this._valueStart!==t&&(this._valueStart=t,this._update())}get valueEnd(){return this._valueEnd}set valueEnd(t){this._valueEnd!==t&&(this._valueEnd=t,this._update())}get label(){return this.labelEnd}set label(t){this.labelEnd=t}get labelStart(){return this._labelStart}set labelStart(t){this._labelStart!==t&&(this._labelStart=t,this._adapter.updateLabels(this._labelStart,this._labelEnd))}get labelEnd(){return this._labelEnd}set labelEnd(t){this._labelEnd!==t&&(this._labelEnd=t,this._adapter.updateLabels(this._labelStart,this._labelEnd))}get labelBuilder(){return this._labelBuilder}set labelBuilder(t){this._labelBuilder=t,this._update()}get min(){return this._min}set min(t){this._min!==t&&(this._min=t,this._adapter.setMin(this._min),this._update(),this._adapter.setHostAttribute(E.attributes.MIN,String(this._min)))}get max(){return this._max}set max(t){this._max!==t&&(this._max=t,this._adapter.setMax(this._max),this._update(),this._adapter.setHostAttribute(E.attributes.MAX,String(this._max)))}get step(){return this._step}set step(t){this._step!==t&&(this._step=t,this._adapter.setStep(this._step),this._update(),this._adapter.setHostAttribute(E.attributes.STEP,String(this._step)))}get tickmarks(){return this._tickmarks}set tickmarks(t){this._tickmarks!==t&&(this._tickmarks=t,this._adapter.setTickmarks(this._tickmarks),this._adapter.toggleHostAttribute(E.attributes.TICKMARKS,this._tickmarks))}get labeled(){return this._labeled}set labeled(t){this._labeled!==t&&(this._labeled=t,this._adapter.toggleLabels(this._labeled),this._update(),this._adapter.toggleHostAttribute(E.attributes.LABELED,this._labeled))}get range(){return this._range}set range(t){this._range!==t&&(this._range=t,this._adapter.setRange(this._range),this._range&&this._applyInputListeners(),this._update(),this._adapter.toggleHostAttribute(E.attributes.RANGE,this._range))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(E.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(t),this._adapter.toggleHostAttribute(E.attributes.READONLY,this._readonly))}set ariaLabel(t){this.ariaLabelEnd=t}set ariaLabelStart(t){this._adapter.setStartAriaLabel(t)}set ariaLabelEnd(t){this._adapter.setEndAriaLabel(t)}};var rx='<template><div part="root" class="forge-slider"><input type="range" class="end" id="end" min="0" max="100" step="1" aria-valuetext="0"><div class="track" part="track"></div><div class="handle-container-padded"><div class="handle-container-block"><div class="handle-container"><div class="handle end" part="handle-end"><forge-state-layer exportparts="surface:state-layer" target="end"></forge-state-layer><forge-focus-indicator part="focus-indicator" target="end"></forge-focus-indicator><div class="handle-thumb" part="handle-end-thumb"></div><div class="handle-label" part="handle-end-label"><span class="handle-label-content" part="handle-end-label-content"></span></div></div></div></div></div></div></template>',nx=':host{display:inline-flex;vertical-align:middle;min-inline-size:100%}:host([hidden]){display:none}.forge-slider{--_slider-start-fraction:0;--_slider-end-fraction:0;--_slider-tick-count:100;--_slider-track-height:var(--forge-slider-track-height, 4px);--_slider-active-track-color:var(--forge-slider-active-track-color, var(--forge-theme-primary, #3f51b5));--_slider-active-track-height:var(--forge-slider-active-track-height, var(--_slider-track-height));--_slider-active-track-shape:var(--forge-slider-active-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-disabled-active-track-color:var(--forge-slider-disabled-active-track-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-active-track-opacity:var(--forge-slider-disabled-active-track-opacity, 0.38);--_slider-disabled-handle-color:var(--forge-slider-disabled-handle-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-inactive-track-color:var(--forge-slider-disabled-inactive-track-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-inactive-track-opacity:var(--forge-slider-disabled-inactive-track-opacity, 0.12);--_slider-focus-handle-color:var(--forge-slider-focus-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-handle-color:var(--forge-slider-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-handle-height:var(--forge-slider-handle-height, 20px);--_slider-handle-shape:var(--forge-slider-handle-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_slider-handle-width:var(--forge-slider-handle-width, 20px);--_slider-hover-handle-color:var(--forge-slider-hover-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-inactive-track-color:var(--forge-slider-inactive-track-color, var(--forge-theme-primary-container, #d1d5ed));--_slider-inactive-track-height:var(--forge-slider-inactive-track-height, var(--_slider-track-height));--_slider-inactive-track-shape:var(--forge-slider-inactive-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-label-container-shape:var(--forge-slider-label-container-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-label-container-color:var(--forge-slider-label-container-color, var(--forge-theme-primary, #3f51b5));--_slider-label-container-height:var(--forge-slider-label-container-height, 28px);--_slider-label-text-color:var(--forge-slider-label-text-color, var(--forge-theme-on-primary, #ffffff));--_slider-pressed-handle-color:var(--forge-slider-pressed-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-state-layer-size:var(--forge-slider-state-layer-size, 40px);--_slider-with-overlap-handle-outline-color:var(--forge-slider-with-overlap-handle-outline-color, var(--forge-theme-on-primary, #ffffff));--_slider-with-overlap-handle-outline-width:var(--forge-slider-with-overlap-handle-outline-width, 1px);--_slider-with-tick-marks-active-container-color:var(--forge-slider-with-tick-marks-active-container-color, var(--forge-theme-on-primary, #ffffff));--_slider-with-tick-marks-container-size:var(--forge-slider-with-tick-marks-container-size, 2px);--_slider-with-tick-marks-disabled-active-container-color:var(--forge-slider-with-tick-marks-disabled-active-container-color, var(--forge-theme-on-surface-container-high, #000000));--_slider-with-tick-marks-disabled-inactive-container-color:var(--forge-slider-with-tick-marks-disabled-inactive-container-color, var(--forge-theme-on-surface-container-high, #000000));--_slider-with-tick-marks-inactive-container-color:var(--forge-slider-with-tick-marks-inactive-container-color, var(--forge-theme-primary, #3f51b5))}.forge-slider{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_slider-state-layer-size);pointer-events:none;touch-action:none}.forge-slider.range :host-context([dir=rtl]) input.start{clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range :host([dir=rtl]) input.start{clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range input.start{clip-path:inset(0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))) 0 0)}.forge-slider.range input.end{clip-path:inset(0 0 0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)))}.forge-slider.range :host-context([dir=rtl]) input.end{clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.forge-slider.range :host([dir=rtl]) input.end{clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.forge-slider.range input.end:dir(rtl){clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.track{position:absolute;inset:0;display:flex;align-items:center}.track::after,.track::before{content:"";position:absolute;inset-inline-start:calc(var(--_slider-state-layer-size)/ 2 - var(--_slider-with-tick-marks-container-size));inset-inline-end:calc(var(--_slider-state-layer-size)/ 2 - var(--_slider-with-tick-marks-container-size));background-size:calc((100% - var(--_slider-with-tick-marks-container-size) * 2)/ var(--_slider-tick-count)) 100%}.track::before{block-size:var(--_slider-inactive-track-height);border-radius:var(--_slider-inactive-track-shape);background-color:var(--_slider-inactive-track-color)}.track::after{block-size:var(--_slider-active-track-height);border-radius:var(--_slider-active-track-shape);clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)));background-color:var(--_slider-active-track-color)}.track.tickmarks::before{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-inactive-container-color) 0,var(--_slider-with-tick-marks-inactive-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}.track.tickmarks::after{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-active-container-color) 0,var(--_slider-with-tick-marks-active-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}.handle-container-block,.handle-container-padded{position:relative;block-size:100%;inline-size:100%}.handle-container-padded{padding-inline:calc(var(--_slider-state-layer-size)/ 2)}.handle-container{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100% * var(--_slider-start-fraction));inline-size:calc(100% * (var(--_slider-end-fraction) - var(--_slider-start-fraction)))}.handle{position:absolute;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);border-radius:var(--_slider-handle-shape);display:grid;place-items:center}.handle.start{inset-inline-start:calc(0px - var(--_slider-state-layer-size)/ 2)}.handle.end{inset-inline-end:calc(0px - var(--_slider-state-layer-size)/ 2)}.handle-thumb{box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);position:absolute;height:var(--_slider-handle-height);width:var(--_slider-handle-width);border-radius:var(--_slider-handle-shape);background:var(--_slider-handle-color)}.handle-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);position:absolute;box-sizing:border-box;display:grid;padding:4px;place-items:center;border-radius:var(--_slider-label-container-shape);color:var(--_slider-label-text-color);font-weight:500;white-space:nowrap;inset-block-end:100%;min-inline-size:var(--_slider-label-container-height);min-block-size:var(--_slider-label-container-height);background:var(--_slider-label-container-color);transition:transform var(--forge-animation-duration-short2, 100ms) var(--forge-animation-easing-standard, cubic-bezier(.2, 0, 0, 1));transform-origin:center bottom;transform:scale(0)}.handle-label::after,.handle-label::before{content:"";position:absolute;display:block;background:inherit}.handle-label::before{inline-size:calc(var(--_slider-label-container-height)/ 2);block-size:calc(var(--_slider-label-container-height)/ 2);bottom:calc(var(--_slider-label-container-height)/ -10);transform:rotate(45deg)}.handle-label::after{inset:0;border-radius:inherit}.handle-label-content{z-index:1}.handle-container.hover .handle-thumb{background:var(--_slider-hover-handle-color)}:host(:not([disabled])) input.end:active~.handle-container-padded .handle.end>.handle-thumb,:host(:not([disabled])) input.start:active~.handle-container-padded .handle.start>.handle-thumb{background:var(--_slider-pressed-handle-color)}:host([disabled]) .handle-thumb{box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);background:var(--_slider-disabled-handle-color)}:host([disabled]) .handle-label{background:var(--_slider-disabled-handle-color)}:host([disabled]) .track::before{opacity:calc(1 / var(--_slider-disabled-active-track-opacity) * var(--_slider-disabled-inactive-track-opacity));background-color:var(--_slider-disabled-inactive-track-color)}:host([disabled]) .track::after{background-color:var(--_slider-disabled-active-track-color)}:host([disabled]) .track.tickmarks::before{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-disabled-inactive-container-color) 0,var(--_slider-with-tick-marks-disabled-inactive-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}:host([disabled]) .track.tickmarks::after{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-disabled-active-container-color) 0,var(--_slider-with-tick-marks-disabled-active-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}:host([disabled]) input[type=range]{cursor:not-allowed}:host-context([dir=rtl]) .track::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}:host([dir=rtl]) .track::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}.track:dir(rtl)::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}input.end:focus~.handle-container-padded .handle.end>.handle-thumb,input.start:focus~.handle-container-padded .handle.start>.handle-thumb{background:var(--_slider-focus-handle-color)}.on-top.overlapping .handle-label,.on-top.overlapping .handle-label::before,.on-top.overlapping .handle-thumb{border:var(--_slider-with-overlap-handle-outline-color) solid var(--_slider-with-overlap-handle-outline-width)}.handle-container.hover .handle-label,:host(:focus-within) .handle-label,:where(:has(input:active)) .handle-label{transform:scale(1)}input[type=range]{opacity:0;-webkit-tap-highlight-color:transparent;position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:0 0;cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:0}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none}input[type=range]::-moz-range-track{appearance:none}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);transform:scaleX(0);opacity:0;z-index:2}input[type=range]::-moz-range-thumb{appearance:none;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.on-top{z-index:1}@media (prefers-reduced-motion){.handle-label{transition-duration:0}}forge-focus-indicator{--forge-focus-indicator-shape:50%;--forge-focus-indicator-outward-offset:0px}forge-state-layer{--forge-state-layer-color:var(--_slider-handle-color)}',$d,w2=class extends($d=Er,a1,$d){static get observedAttributes(){return[E.attributes.ARIA_LABEL,E.attributes.ARIA_LABEL_START,E.attributes.ARIA_LABEL_END,E.attributes.VALUE,E.attributes.VALUE_START,E.attributes.VALUE_END,E.attributes.LABEL,E.attributes.LABEL_START,E.attributes.LABEL_END,E.attributes.MAX,E.attributes.MIN,E.attributes.STEP,E.attributes.TICKMARKS,E.attributes.LABELED,E.attributes.RANGE,E.attributes.DISABLED,E.attributes.READONLY]}get form(){return this[a1].form}get labels(){return this[a1].labels}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}set name(t){K(this,!!t,"name",t!=null?t:"")}get nameStart(){var t;return(t=this.getAttribute("name-start"))!=null?t:this.name}set nameStart(t){K(this,!!t,"name-start",t!=null?t:"")}get nameEnd(){var t;return(t=this.getAttribute("name-end"))!=null?t:this.nameStart}set nameEnd(t){K(this,!!t,"name-end",t!=null?t:"")}constructor(){super(),H(this,rx,nx),this[a1]=this.attachInternals(),this._core=new rl(new ol(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case E.attributes.ARIA_LABEL:this._core.ariaLabel=a;break;case E.attributes.ARIA_LABEL_START:this._core.ariaLabelStart=a;break;case E.attributes.ARIA_LABEL_END:this._core.ariaLabelEnd=a;break;case E.attributes.VALUE:this.value=W(a);break;case E.attributes.VALUE_START:this.valueStart=W(a);break;case E.attributes.VALUE_END:this.valueEnd=W(a);break;case E.attributes.LABEL:this.label=a;break;case E.attributes.LABEL_START:this.labelStart=a;break;case E.attributes.LABEL_END:this.labelEnd=a;break;case E.attributes.MIN:this.min=W(a);break;case E.attributes.MAX:this.max=W(a);break;case E.attributes.STEP:this.step=W(a);break;case E.attributes.TICKMARKS:this.tickmarks=p(a);break;case E.attributes.LABELED:this.labeled=p(a);break;case E.attributes.RANGE:this.range=p(a);break;case E.attributes.DISABLED:this.disabled=p(a);break;case E.attributes.READONLY:this.readonly=p(a);break}}formResetCallback(){if(this._core.range){let e=this.getAttribute("value-start");this.valueStart=e!==null?Number(e):E.numbers.DEFAULT_START_VALUE;let a=this.getAttribute("value-end");this.valueEnd=a!==null?Number(a):E.numbers.DEFAULT_END_VALUE;return}let t=this.getAttribute("value");this.value=t!==null?Number(t):E.numbers.DEFAULT_VALUE}formStateRestoreCallback(t){if(t&&t[0]instanceof FormData){let e=Array.from(t[0]),[[,a],[,o]]=e;this.valueStart=Number(a),this.valueEnd=Number(o),this.range=!0;return}this.value=Number(t),this.range=!1}formDisabledCallback(t){this.disabled=t}};w2.formAssociated=!0,s([v()],w2.prototype,"value",2),s([v()],w2.prototype,"valueStart",2),s([v()],w2.prototype,"valueEnd",2),s([v()],w2.prototype,"label",2),s([v()],w2.prototype,"labelStart",2),s([v()],w2.prototype,"labelEnd",2),s([v()],w2.prototype,"labelBuilder",2),s([v()],w2.prototype,"min",2),s([v()],w2.prototype,"max",2),s([v()],w2.prototype,"step",2),s([v()],w2.prototype,"tickmarks",2),s([v()],w2.prototype,"labeled",2),s([v()],w2.prototype,"range",2),s([v()],w2.prototype,"disabled",2),s([v()],w2.prototype,"readonly",2),w2=s([y({name:E.elementName,dependencies:[Q,r1]})],w2);var Xd=class extends a2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get valueStart(){return this._element.valueStart}set valueStart(t){this._element.valueStart=t}get valueEnd(){return this._element.valueEnd}set valueEnd(t){this._element.valueEnd=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get min(){return this._element.min}set min(t){this._element.min=t}get max(){return this._element.max}set max(t){this._element.max=t}get step(){return this._element.step}get range(){return this._element.range}set range(t){this._element.range=t}get tickmarks(){return this._element.tickmarks}set tickmarks(t){this._element.tickmarks=t}get labeled(){return this._element.labeled}set labeled(t){this._element.labeled=t}get labelBuilder(){return this._element.labelBuilder}set labelBuilder(t){this._element.labelBuilder=t}onInput(t){this._element.addEventListener("forge-slider-input",({detail:e})=>t(e))}onChange(t){this._element.addEventListener("forge-slider-change",({detail:e})=>t(e))}onRangeInput(t){this._element.addEventListener("forge-slider-range-input",({detail:e})=>t(e))}onRangeChange(t){this._element.addEventListener("forge-slider-range-change",({detail:e})=>t(e))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}_build(){return document.createElement(E.elementName)}};function jd(){x(w2)}var Zd={name:"clock_outline",data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 20a8 8 0 008-8 8 8 0 00-8-8 8 8 0 00-8 8 8 8 0 008 8m0-18a10 10 0 0110 10 10 10 0 01-10 10C6.47 22 2 17.5 2 12A10 10 0 0112 2m.5 5v5.25l4.5 2.67-.75 1.23L11 13V7h1.5z"/></svg>'};var Qd={name:"drag_vertical_variant",data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 21H9V3h2v18m4-18h-2v18h2V3z"/></svg>'};var x0=`${b}split-view-panel`,ix={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},sx={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled",OVERLAY:"forge-split-view-panel-overlay"},Oo={ROOT:"root",HANDLE:"handle",ICON:"icon",STATE_LAYER:"state-layer",CONTENT:"content"},lx={ROOT:`#${Oo.ROOT}`,HANDLE:`#${Oo.HANDLE}`,ICON:`#${Oo.ICON}`,STATE_LAYER:`#${Oo.STATE_LAYER}`,CONTENT:`#${Oo.CONTENT}`},vx={WILL_RESIZE:`${x0}-will-resize`,RESIZE_START:`${x0}-resize-start`,RESIZE_END:`${x0}-resize-end`,RESIZE:`${x0}-resize`,DID_OPEN:`${x0}-did-open`,DID_CLOSE:`${x0}-did-close`,WILL_OPEN:`${x0}-will-open`,WILL_CLOSE:`${x0}-will-close`},hx={STATE_LAYER_ACTIVATION_WAIT:200},cx={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},D={elementName:x0,attributes:ix,classes:sx,ids:Oo,selectors:lx,events:vx,numbers:hx,customCssProperties:cx},Jd=(a=>(a[a.Under=1]="Under",a[a.Active=2]="Active",a[a.Above=3]="Above",a))(Jd||{});function t6(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function e6(r,t){let e=r.getContentSize(t.orientation);return t1(w({},t),{currentSize:e,startSize:e,availableSpace:r.getAvailableSpace(t.orientation,t.resizable),siblingSize:r.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function a6(r){return t1(w({},r),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function o6(r,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let a=e.currentSize,o=e.orientation==="horizontal"?t.clientX:t.clientY,n=e.startPoint-o;e.resizable==="start"&&(n*=-1);let i=e.startSize-n;e.currentSize=nl(i,e),r.setContentSize(e.currentSize),il(r,e,"pointer"),r.setValuenow(sl(e.currentSize,e));let l=i-e.currentSize+n;return s6(r,l,e),a!==e.currentSize}function r6(r,t,e){if(e.startSize===void 0)return!1;let a=e.currentSize;e.keyboardDelta+=t;let o=e.startSize+e.keyboardDelta;e.currentSize=nl(o,e),r.setContentSize(e.currentSize),il(r,e,"keyboard"),r.setValuenow(sl(e.currentSize,e));let n=o-e.currentSize+e.keyboardDelta*-1;return s6(r,n,e),a!==e.currentSize}function n6(r,t){return r.setContentSize(t.min),t.min}function i6(r,t){let e=r.getAvailableSpace(t.orientation,t.resizable),a=B0(t.max,e);return r.setContentSize(a),a}function s6(r,t,e){if(e.siblingSize!==void 0){let a=e.siblingSize+t;r.setSiblingContentSize(a)}}function nl(r,t){return r=Math.max(r,t.min),r=B0(r,t.max,t.availableSpace),r}function il(r,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(r.animateStateLayer(e==="pointer"),e==="pointer"&&r.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let a=B0(t.max,t.availableSpace);return t.currentSize>=a?(t.isAtMax||(r.animateStateLayer(e==="pointer"),e==="pointer"&&r.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&r.setBodyCursor(t.orientation),!1)}function l6(r,t,e){if(t<=e.min)return r.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let a=B0(e.max,e.availableSpace);return t>=a?(r.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(r.setHandleCursor(e.orientation),!1)}function sl(r,t){if(!t.availableSpace&&!t.max)return 100;let e=B0(t.max,t.availableSpace);return tn(r,t.min,e)}function n5(r,t){if(r==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function v6(r){return r==="horizontal"?"drag_vertical_variant":"drag_handle"}function ll(r){let t=r.resizable;if(t==="off")return;let e=r;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof H2&&!e.open);if(e instanceof H2)return e}function px(r){var n,i;if(!isNaN(+r))return{amount:+r,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=r.match(t),a=e!=null&&e[1]?+e[1]:-1,o=(i=(n=e==null?void 0:e[2])==null?void 0:n.toLowerCase())!=null?i:"";return{amount:a,unit:o}}function Sa(r,t){let e=px(r);return e.unit==="%"?u3(e.amount,t):e.amount}function h6(){let r=document.createElement("div");return r.classList.add(D.classes.OVERLAY),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100vw",r.style.height="100vh",r.style.zIndex="9999",r}var vl=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=t6();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}destroy(){this._adapter.tryRemoveOverlay(),this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):t4(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){t4(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){this._appliedAllowClose&&(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=n6(this._adapter,this._state);this._adapter.emitHostEvent(D.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=i6(this._adapter,this._state);this._adapter.emitHostEvent(D.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){r6(this._adapter,t,this._state)&&this._adapter.emitHostEvent(D.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,il(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._endResize()}_handlePointermove(t){o6(this._adapter,t,this._state)&&this._adapter.emitHostEvent(D.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(D.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=e6(this._adapter,this._state),this._adapter.emitHostEvent(D.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(D.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=a6(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,a=!1){let o=t?D.events.WILL_OPEN:D.events.WILL_CLOSE,n={auto:e,userInitiated:a};this._adapter.emitHostEvent(o,n,!0,!0)&&(this._open=t,this._applyOpen(n))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let a=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=a,this._applyParentAutoClose();let o=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=o,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(D.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=Sa(this._size,t);this._adapter.setHostAttribute(D.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let a=this._adapter.getAvailableSpace(this._orientation,this._resizable),o=B0(this._pixelMax,a),n=tn(e,this._pixelMin,o);this._adapter.setValuenow(n),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(D.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=Sa(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var a;if(this._adapter.toggleHostAttribute(D.attributes.MAX,this._max!==void 0,(a=this._max)==null?void 0:a.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=Sa(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(D.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(D.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(D.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!k(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(D.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(D.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!k(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(D.attributes.AUTO_CLOSE_THRESHOLD,k(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!k(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=Sa(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=nl(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(D.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(k(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),k(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),k(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,k(this._autoClose)||this._applyAutoClose()),k(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,k(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size&&this.open){let o=this._adapter.getParentSize(this._orientation);this._pixelMin=Sa(this._min,o),this._pixelMax=k(this._max)?Sa(this._max,o):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),a=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let o=sl(e,t1(w({},this._state),{availableSpace:a}));this._adapter.setValuenow(o)}t.cursor&&l6(this._adapter,e,t1(w({},this._state),{availableSpace:a}))}};var dx=`${b}split-view`,mx={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},gx={ROOT:"forge-split-view"},c6={ROOT:"root"},wx={ROOT:`#${c6.ROOT}`,PANEL:D.elementName},ux={RESIZE_THROTTLE_THRESHOLD:200},_x={ANIMATING_LAYER:"--forge-split-view-animating-layer"},t2={elementName:dx,attributes:mx,classes:gx,ids:c6,selectors:wx,numbers:ux,customCssProperties:_x};var hl=class extends I{constructor(t){super(t),this._root=g(t,D.selectors.ROOT),this._handle=g(t,D.selectors.HANDLE),this._icon=g(t,D.selectors.ICON),this._stateLayer=g(t,D.selectors.STATE_LAYER),this._content=g(t,D.selectors.CONTENT)}initialize(){let t=this._component.parentElement;(t==null?void 0:t.tagName.toLowerCase())===t2.elementName&&(this._parent=t)}tryRemoveOverlay(){var t;(t=this._overlay)==null||t.remove(),this._overlay=void 0}setPointerdownListener(t){this._handle.addEventListener("pointerdown",t)}setPointerupListener(t){document.addEventListener("pointerup",t)}removePointerupListener(t){document.removeEventListener("pointerup",t)}setPointermoveListener(t){document.addEventListener("pointermove",t)}removePointermoveListener(t){document.removeEventListener("pointermove",t)}setKeydownListener(t){this._handle.addEventListener("keydown",t)}setKeyupListener(t){this._handle.addEventListener("keyup",t)}removeKeyupListener(t){this._handle.removeEventListener("keyup",t)}getParentProperty(t){var e;return(e=this._parent)==null?void 0:e[t]}setAccessibleLabel(t){this._handle.setAttribute("aria-label",t)}setDisabled(t){this._root.classList.toggle(D.classes.DISABLED,t),this._handle&&(this._handle.setAttribute("tabindex",t?"-1":"0"),K(this._handle,t,"aria-disabled","true"))}setResizable(t){this._root.setAttribute(D.attributes.RESIZABLE,t.toString()),K(this._handle,t!=="off","aria-valuemin","0"),K(this._handle,t!=="off","aria-valuemax","100"),t!=="off"&&(this._handle.remove(),t==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(t){this._root.setAttribute(D.attributes.ORIENTATION,t),this._handle.setAttribute("aria-orientation",t==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",v6(t))}setOpen(t,e=!0,a){var n,i;let o=()=>{var l,h;t||this._root.classList.add(D.classes.CLOSED),a&&this.emitHostEvent(t?D.events.DID_OPEN:D.events.DID_CLOSE,a),(l=this._parent)==null||l.unlayerSlottedPanels(),(h=this._parent)==null||h.update({accessibility:!0,cursor:!0})};if(t&&this._root.classList.contains(D.classes.CLOSED)){if(this._root.classList.remove(D.classes.CLOSED),!e){o();return}(n=this._parent)==null||n.layerSlottedPanels(this._component),Rt(this._root,D.classes.OPENING,!0).then(()=>{o()})}else if(!t&&!this._root.classList.contains(D.classes.CLOSED)){if(!e){o();return}(i=this._parent)==null||i.layerSlottedPanels(this._component),Rt(this._root,D.classes.CLOSING,!0).then(()=>{o()})}}setGrabbed(t){var e;this._root.classList.toggle(D.classes.GRABBED,t),this._handle.setAttribute("aria-grabbed",t.toString()),t?(this._overlay||(this._overlay=h6()),document.body.append(this._overlay)):(e=this._overlay)==null||e.remove()}setHandleCursor(t,e){t?this._root.style.setProperty(D.customCssProperties.CURSOR,n5(t,e)):this._root.style.removeProperty(D.customCssProperties.CURSOR)}setBodyCursor(t,e){var a;(a=this._overlay)==null||a.style.setProperty("cursor",n5(t,e))}getContentSize(t){return t==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(t){this._component.style.setProperty(D.customCssProperties.SIZE,`${t}px`)}setValuenow(t){this._handle.setAttribute("aria-valuenow",t.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(t,e){if(e==="off")return-1;let a=ll(this._component);return a?a.getCollapsibleSize()+this.getContentSize(t):this.getParentSize(t)}getSiblingContentSize(){var e;let t=ll(this._component);return(e=t==null?void 0:t.getContentSize())!=null?e:0}setSiblingContentSize(t){let e=ll(this._component);e==null||e.setContentSize(t)}animateStateLayer(t){t?window.setTimeout(()=>{this._stateLayer.playAnimation()},D.numbers.STATE_LAYER_ACTIVATION_WAIT):this._stateLayer.playAnimation()}getParentSize(t){var a,o;let e=t==="horizontal"?(a=this._parent)==null?void 0:a.clientWidth:(o=this._parent)==null?void 0:o.clientHeight;return e!=null?e:0}updateParent(t){var e;(e=this._parent)==null||e.update(t)}};var fx='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-state-layer target="handle" id="state-layer" exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator inward target="handle" part="focus-indicator"></forge-focus-indicator></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',xx=".forge-split-view-panel{display:flex;width:100%;height:100%;overflow:hidden}.forge-split-view-panel__handle{color:var(--forge-theme-text-medium,rgba(0,0,0,.6));background-color:var(--forge-theme-outline,#e0e0e0);position:relative;display:flex;flex-shrink:0;justify-content:center;align-items:center;outline:0}.forge-split-view-panel__content{flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:u9e6ka3;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u9e6ka3{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;animation-name:u9e6kah;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u9e6kah{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:u9e6kau;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u9e6kau{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;animation-name:u9e6kbu;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u9e6kbu{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:u9e6kcn;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u9e6kcn{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;animation-name:u9e6kcs;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u9e6kcs{from{transform:none}to{transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:u9e6kdd;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u9e6kdd{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;animation-name:u9e6kdt;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u9e6kdt{from{transform:none}to{transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}forge-focus-indicator{--forge-focus-indicator-active-width:2px}",H2=class extends M{static get observedAttributes(){return[D.attributes.RESIZABLE,D.attributes.SIZE,D.attributes.MIN,D.attributes.MAX,D.attributes.ACCESSIBLE_LABEL,D.attributes.OPEN,D.attributes.DISABLED,D.attributes.ALLOW_CLOSE,D.attributes.AUTO_CLOSE,D.attributes.AUTO_CLOSE_THRESHOLD]}constructor(){super(),q.define([Qd,J5]),H(this,fx,xx),this._core=new vl(new hl(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case D.attributes.RESIZABLE:this.resizable=a;break;case D.attributes.SIZE:this.size=a;break;case D.attributes.MIN:this.min=a;break;case D.attributes.MAX:a?this.max=a:this.max=void 0;break;case D.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=a;break;case D.attributes.OPEN:this.open=p(a);break;case D.attributes.DISABLED:this.hasAttribute(t)?this.disabled=p(a):this.disabled=void 0;break;case D.attributes.ALLOW_CLOSE:this.hasAttribute(t)?this.allowClose=p(a):this.allowClose=void 0;break;case D.attributes.AUTO_CLOSE:this.hasAttribute(t)?this.autoClose=p(a):this.autoClose=void 0;break;case D.attributes.AUTO_CLOSE_THRESHOLD:a?this.autoCloseThreshold=W(a):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._core.getContentSize()}getCollapsibleSize(){return this._core.getCollapsibleSize()}setContentSize(t){this._core.setContentSize(t)}update(t){this._core.update(t)}};s([v()],H2.prototype,"resizable",2),s([v()],H2.prototype,"size",2),s([v()],H2.prototype,"min",2),s([v()],H2.prototype,"max",2),s([v()],H2.prototype,"accessibleLabel",2),s([v()],H2.prototype,"open",2),s([v()],H2.prototype,"disabled",2),s([v()],H2.prototype,"allowClose",2),s([v()],H2.prototype,"autoClose",2),s([v()],H2.prototype,"autoCloseThreshold",2),H2=s([y({name:D.elementName,dependencies:[X,r1,Q]})],H2);function ub1(){x(H2)}var cl=class extends I{constructor(t){super(t),this._root=g(t,t2.selectors.ROOT)}registerSlotListener(t){this._root.addEventListener("slotchange",t)}registerDidOpenListener(t){this._root.addEventListener(D.events.DID_OPEN,t)}registerDidCloseListener(t){this._root.addEventListener(D.events.DID_CLOSE,t)}observeResize(t){E0.observe(this._root,t)}unobserveResize(){E0.unobserve(this._root)}getSlottedPanels(){let t=this._component.querySelectorAll(t2.selectors.PANEL);return Array.from(t).filter(o=>o.parentElement===this._component)}refitSlottedPanels(t){let e=t==="horizontal"?this._root.clientWidth:this._root.clientHeight,a=this.getSlottedPanels(),o=a.map(i=>{var c;let l=(c=i.shadowRoot)==null?void 0:c.querySelector(D.selectors.ROOT),h=t==="horizontal"?l==null?void 0:l.clientWidth:l==null?void 0:l.clientHeight;return h!=null?h:0}).reduce((i,l)=>i+l,0);if(o<=e)return;let n=o-e;a.slice().reverse().filter(i=>i.open).forEach(i=>{if(n<=0)return;let l=i.getContentSize(),h=i.getCollapsibleSize(),c=Math.min(n,h),d=l-c;i.setContentSize(d),n-=c})}};var pl=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=Sr(e=>this._onResize(e),t2.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}destroy(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(t2.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(t2.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(t2.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(t2.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(t2.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),a=t.resizable==="start"?1:-1,o=t.resizable==="start"?1:3;e.forEach(n=>{(n===t||o===2)&&(o+=a),n.style.setProperty(t2.customCssProperties.ANIMATING_LAYER,o.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(t2.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(a=>{a.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var bx='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',yx=".forge-split-view{display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{flex-direction:row}:host([orientation=vertical]) .forge-split-view{flex-direction:column}",Ce=class extends M{static get observedAttributes(){return[t2.attributes.ORIENTATION,t2.attributes.DISABLED,t2.attributes.ALLOW_CLOSE,t2.attributes.AUTO_CLOSE,t2.attributes.AUTO_CLOSE_THRESHOLD]}constructor(){super(),H(this,bx,yx),this._core=new pl(new cl(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case t2.attributes.ORIENTATION:this.orientation=a;break;case t2.attributes.DISABLED:this.disabled=p(a);break;case t2.attributes.ALLOW_CLOSE:this.allowClose=p(a);break;case t2.attributes.AUTO_CLOSE:this.autoClose=p(a);break;case t2.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=W(a);break}}layerSlottedPanels(t){this._core.layerSlottedPanels(t)}unlayerSlottedPanels(){this._core.unlayerSlottedPanels()}update(t){this._core.update(t)}refit(){this._core.refitSlottedPanels()}};s([v()],Ce.prototype,"orientation",2),s([v()],Ce.prototype,"disabled",2),s([v()],Ce.prototype,"allowClose",2),s([v()],Ce.prototype,"autoClose",2),s([v()],Ce.prototype,"autoCloseThreshold",2),Ce=s([y({name:t2.elementName,dependencies:[H2]})],Ce);function p6(){x(Ce)}var Mx=`${b}stack`,d6={DEFAULT:"forge-stack"},Hx={ROOT:`.${d6.DEFAULT}`},m6={INLINE:"inline",WRAP:"wrap",STRETCH:"stretch",GAP:"gap",ALIGNMENT:"alignment",JUSTIFY:"justify"},Lx=w({},m6),Ix={DEFAULT_GAP:"16"},D2={elementName:Mx,classes:d6,observedAttributes:m6,attributes:Lx,selectors:Hx,strings:Ix};var dl=class extends I{constructor(t){super(t),this._rootElement=g(t,D2.selectors.ROOT)}setGap(t){let e=/^\d+$/.test(t)?`${t}px`:t;this._rootElement.style.gap=`var(--forge-stack-gap, ${e})`}};var ml=class{constructor(t){this._adapter=t;this._inline=!1;this._wrap=!1;this._stretch=!1;this._gap=D2.strings.DEFAULT_GAP;this._alignment="start";this._justify="start"}get inline(){return this._inline}set inline(t){t=!!t,this._inline!==t&&(this._inline=t,this._adapter.toggleHostAttribute(D2.attributes.INLINE,this._inline))}get wrap(){return this._wrap}set wrap(t){t=!!t,this._wrap!==t&&(this._wrap=t,this._adapter.toggleHostAttribute(D2.attributes.WRAP,this._wrap))}get stretch(){return this._stretch}set stretch(t){t=!!t,this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(D2.attributes.STRETCH,this._stretch))}get gap(){return this._gap}set gap(t){this._gap!==t&&(this._gap=t,this._adapter.setGap(this._gap),this._adapter.setHostAttribute(D2.attributes.GAP,this._gap))}get alignment(){return this._alignment}set alignment(t){this._alignment!==t&&(this._alignment=t,this._adapter.setHostAttribute(D2.attributes.ALIGNMENT,this._alignment))}get justify(){return this._justify}set justify(t){this._justify!==t&&(this._justify=t,this._adapter.setHostAttribute(D2.attributes.JUSTIFY,this._justify))}};var Vx='<template><div class="forge-stack" part="root"><slot></slot></div></template>',Ex=".forge-stack{display:flex;flex-direction:column;align-items:var(--_stack-alignment);justify-content:var(--_stack-justify);gap:var(--_stack-gap);height:var(--_stack-height);width:100%;--_stack-gap:var(--forge-stack-gap, var(--forge-spacing-medium, 16px));--_stack-height:var(--forge-stack-height);--_stack-stretch:var(--forge-stack-stretch, initial);--_stack-alignment:var(--forge-stack-alignment, normal);--_stack-justify:var(--forge-stack-justify, normal);--_stack-wrap:var(--forge-stack-wrap, wrap)}.forge-stack ::slotted(*){flex:var(--_stack-stretch)}:host([inline]) .forge-stack{flex-direction:row}:host([inline][wrap]) .forge-stack{flex-wrap:wrap}:host(:not([inline])) .forge-stack{--_stack-height:var(--forge-stack-height, 100%)}:host([stretch]) ::slotted(*){--_stack-stretch:var(--forge-stack-stretch, 1)}:host([alignment=start]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, start)}:host([alignment=center]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, center)}:host([alignment=end]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, end)}:host([justify=start]) .forge-stack{--_stack-justify:var(--forge-stack-justify, start)}:host([justify=center]) .forge-stack{--_stack-justify:var(--forge-stack-justify, center)}:host([justify=end]) .forge-stack{--_stack-justify:var(--forge-stack-justify, end)}",de=class extends M{static get observedAttributes(){return Object.values(D2.observedAttributes)}constructor(){super(),H(this,Vx,Ex),this._core=new ml(new dl(this))}attributeChangedCallback(t,e,a){switch(t){case D2.observedAttributes.INLINE:this.inline=p(a);break;case D2.observedAttributes.WRAP:this.wrap=p(a);break;case D2.observedAttributes.STRETCH:this.stretch=p(a);break;case D2.observedAttributes.GAP:this.gap=a;break;case D2.observedAttributes.ALIGNMENT:this.alignment=a;break;case D2.observedAttributes.JUSTIFY:this.justify=a;break}}};s([v()],de.prototype,"inline",2),s([v()],de.prototype,"wrap",2),s([v()],de.prototype,"stretch",2),s([v()],de.prototype,"gap",2),s([v()],de.prototype,"alignment",2),s([v()],de.prototype,"justify",2),de=s([y({name:D2.elementName})],de);function g6(){x(de)}var gl=`${b}step`,sa={STEP:"forge-step",STEP_CONTAINER:"container",ERROR:"error",SELECTED:"selected",COMPLETED:"completed",EDITABLE:"editable",ALTERNATIVE:"alternative",ICON_CONTENT:"icon-content",ICON:"icon",LABEL_CONTAINER:"label-container",LABEL:"label",OPTIONAL_LABEL:"optional-label",INDEX:"index",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",EXPANSION_PANEL:"expansion-panel",EXPANSION_ICON:"expanded-icon",EXPANSION_ICON_EXPANDED:"expanded-icon--expanded",EXPANSION_CONTENT:"expansion-content"},Cx={SELECTED:"selected",INDEX:"index",EDITABLE:"editable",COMPLETED:"completed",ERROR:"error",ALTERNATIVE:"alternative",FIRST:"first",LAST:"last",ARIA_SELECTED:"aria-selected",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",IGNORE_USER_EXPANSION:"ignore-user-expansion"},zx={STEP:`.${sa.STEP}`,STEP_CONTAINER:`.${sa.STEP_CONTAINER}`,INDEX:`.${sa.INDEX}`,ICON:`.${sa.ICON}`,ICON_CONTENT:`.${sa.ICON_CONTENT}`,EXPANSION_SLOT:'slot[name="expansion-content"]',EXPANSION_PANEL:`.${sa.EXPANSION_PANEL}`,EXPANSION_ICON:`.${sa.EXPANSION_ICON}`},Ax={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",EXPANSION_CONTENT_SLOT_NAME:"expansion-content"},Bx={SELECT:`${gl}-select`,EXPANDED_CONTENT_FOCUSIN:`${gl}-expanded-content-focusin`,EXPANDED_CONTENT_FOCUSOUT:`${gl}-expanded-content-focusout`},S={elementName:gl,classes:sa,selectors:zx,attributes:Cx,events:Bx,strings:Ax};var wl=class extends I{constructor(t){super(t),this._stepContainer=g(t,S.selectors.STEP),this._container=g(t,S.selectors.STEP_CONTAINER),this._stateLayerElement=g(this._component,M1.elementName)}get component(){return this._component}initialize(){this._component.hasAttribute("role")||this._component.setAttribute("role","tab")}setIndex(t){this._stepContainer.querySelector(S.selectors.INDEX).innerHTML=(t+1||"").toString()}toggleRootClass(t,e){_2(this._stepContainer,e,t)}toggleDisabled(t){_2(this._stepContainer,t,S.classes.DISABLED),K(this._component,t,"aria-disabled"),this._stateLayerElement.disabled=t}toggleIcon(t,e){let a=this._stepContainer.querySelector(S.selectors.INDEX),o=this._stepContainer.querySelector(S.selectors.ICON);if(!e){a.style.display="inherit",o.style.display="none";return}a.style.display="none",o.style.display="inherit",o.name=t}slotHasContent(){return this._expansionSlot.assignedElements({flatten:!0}).length>0}setClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}setSlotListener(t){this._expansionSlot.addEventListener("slotchange",t)}removeSlotListener(t){this._expansionSlot&&this._expansionSlot.removeEventListener("slotchange",t)}setExpanded(t){this._expansionPanel&&(this._expansionPanel.open=t,K(this._expansionPanel,!t,"tabindex","-1")),_2(this._stepContainer,t,S.classes.EXPANDED)}setExpansionPanelAnimations(t){this._expansionPanel.animationType=t?"default":"none"}addExpansionPanel(){this._container.querySelector(S.selectors.EXPANSION_PANEL)||(this._expansionPanel=this._container.appendChild(this._createExpansionPanel()),this._expansionSlot=this._expansionPanel.querySelector(S.selectors.EXPANSION_SLOT))}removeExpansionPanel(){let t=this._container.querySelector(S.selectors.EXPANSION_PANEL);t&&this._container.removeChild(t)}addExpansionIcon(){this._stepContainer.querySelector(S.selectors.EXPANSION_ICON)||this._stepContainer.appendChild(this._createExpansionIcon())}removeExpansionIcon(){let t=this._stepContainer.querySelector(S.selectors.EXPANSION_ICON);t&&this._stepContainer.removeChild(t)}addExpansionPanelListener(t,e){this._expansionPanel.addEventListener(t,e)}removeExpansionPanelListener(t,e){this._expansionPanel&&this._expansionPanel.removeEventListener(t,e)}isExpandedContentInFocus(t){return this._expansionSlot.assignedElements().some(e=>e.contains(t||document.activeElement))}_createExpansionPanel(){let t=document.createElement("forge-expansion-panel");t.animationType="none",t.setAttribute("part","expansion-panel"),y1(S.classes.EXPANSION_PANEL,t);let e=document.createElement("slot");return e.setAttribute("name","expansion-content"),y1(S.classes.EXPANSION_CONTENT,e),t.appendChild(e),t}_createExpansionIcon(){let t=document.createElement("forge-icon");return y1(S.classes.EXPANSION_ICON,t),t.name="keyboard_arrow_down",t.setAttribute("part","expanded-icon"),t}};var ul=class{constructor(t){this._adapter=t;this._clickListener=()=>this._onClickListener(),this._expansionContentSlotChangeListener=e=>this._onExpansionContentSlotChange(e),this._expansionContentFocusInListener=e=>this._onExpansionContentFocusIn(e),this._expansionContentFocusOutListener=e=>this._onExpansionContentFocusOut(e)}initialize(){this._adapter.initialize(),this._applySelected(),this._toggleIcon(),this._vertical&&(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener),this._adapter.addExpansionPanelListener("focusin",this._expansionContentFocusInListener),this._adapter.addExpansionPanelListener("focusout",this._expansionContentFocusOutListener)),this._initialized=!0}destroy(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanelListener("focusin",this._onExpansionContentFocusIn),this._adapter.removeExpansionPanelListener("focusout",this._onExpansionContentFocusOut)}get index(){return this._index}set index(t){this._index!==t&&(this._index=t,this._applyIndex(),this._adapter.setHostAttribute(S.attributes.INDEX,t.toString()))}get editable(){return this._editable}set editable(t){this._editable!==t&&(this._editable=t,this._adapter.toggleHostAttribute(S.attributes.EDITABLE,t),this._applyEditable())}get completed(){return this._completed}set completed(t){this._completed!==t&&(this._completed=t,this._adapter.toggleHostAttribute(S.attributes.COMPLETED,t),this._applyCompleted())}get error(){return this._error}set error(t){this._error!==t&&(this._error=t,this._adapter.toggleHostAttribute(S.attributes.ERROR,t),this._applyError())}get selected(){return this._selected}set selected(t){this._selected!==t&&(this._selected=t,this._adapter.toggleHostAttribute(S.attributes.SELECTED,t),this._applySelected())}get alternative(){return this._alternative}set alternative(t){this._alternative!==t&&(this._alternative=t,this._adapter.toggleHostAttribute(S.attributes.ALTERNATIVE,t),this._applyAlternative())}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._applyDisabled()}get vertical(){return this._vertical}set vertical(t){t!==this._vertical&&(this._vertical=t,this._applyVertical(),this._initialized&&(this._vertical?(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener)):(this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanel(),this._adapter.removeExpansionIcon())))}get expanded(){return this._expanded}set expanded(t){t!==this._expanded&&(this._expanded=t,this._adapter.toggleHostAttribute(S.attributes.EXPANDED,this._expanded),this._initialized&&this._applyExpanded())}get ignoreUserExpansion(){return this._ignoreUserExpansion}set ignoreUserExpansion(t){t!==this._ignoreUserExpansion&&(this._ignoreUserExpansion=t)}_applyExpanded(){this._adapter.setExpanded(this._expanded)}_applyVertical(){this._adapter.toggleHostAttribute(S.attributes.VERTICAL,this._vertical),this._adapter.toggleRootClass(S.classes.VERTICAL,this._vertical)}_applyAlternative(){this._adapter.toggleRootClass(S.classes.ALTERNATIVE,this._alternative)}_applySelected(){this._adapter.toggleRootClass(S.classes.SELECTED,this._selected),this._adapter.setHostAttribute(S.attributes.ARIA_SELECTED,(this._selected||!1).toString()),this._adapter.hostElement.tabIndex=this._selected?0:-1,this._toggleIcon()}_applyIndex(){this._adapter.setIndex(this._index)}_applyEditable(){this._adapter.toggleRootClass(S.classes.EDITABLE,this._editable),this._toggleIcon()}_applyCompleted(){this._adapter.toggleRootClass(S.classes.COMPLETED,this._completed),this._toggleIcon()}_applyError(){this._adapter.toggleRootClass(S.classes.ERROR,this._error),this._toggleIcon()}_applyDisabled(){this._adapter.toggleDisabled(this._disabled),this._toggleIcon()}_getIconState(){return this._error?"warning":this._completed?this._editable?"mode_edit":"check":this._editable&&this._selected&&!this._disabled?"mode_edit":this._disabled?"block":""}_toggleIcon(){this._iconState=this._getIconState(),this._adapter.toggleIcon(this._iconState,this._iconState!=="")}_toggleExpanded(){this._adapter.slotHasContent()&&(this._expanded=!this._expanded,this._applyExpanded(),this._adapter.toggleHostAttribute(S.attributes.EXPANDED,this._expanded))}_onClickListener(){this._vertical&&!this._ignoreUserExpansion&&this._toggleExpanded()}_onExpansionContentSlotChange(t){let e=this._adapter.slotHasContent();e?(this._adapter.setHostAttribute(S.attributes.EXPANDABLE),this._applyExpanded(),this._adapter.setExpansionPanelAnimations(!0)):(this._adapter.removeHostAttribute(S.attributes.EXPANDABLE),this._adapter.setExpansionPanelAnimations(!1)),this._adapter.toggleRootClass(S.classes.EXPANDABLE,e)}_onExpansionContentFocusIn(t){!this._expandedContentFocused&&this._adapter.isExpandedContentInFocus(t.target)&&(this._adapter.emitHostEvent(S.events.EXPANDED_CONTENT_FOCUSIN,this._adapter.component),this._expandedContentFocused=!0)}_onExpansionContentFocusOut(t){t.relatedTarget&&!this._adapter.isExpandedContentInFocus(t.relatedTarget)&&(this._adapter.emitHostEvent(S.events.EXPANDED_CONTENT_FOCUSOUT,this._adapter.component),this._expandedContentFocused=!1)}};var Tx='<template><div class="container" part="root"><div class="forge-step" part="step"><div class="before" part="before"></div><div class="icon-container" part="icon-container"><div class="icon-content" part="icon-content"><span class="index" part="index"></span><forge-icon class="icon" part="icon"></forge-icon></div></div><div class="text-container" part="text-container"><div class="title" part="title-container"><slot></slot></div><div class="subtitle" part="subtitle-container"><slot name="optional"></slot></div></div><div class="after" part="after"></div><forge-state-layer exportparts="surface:state-layer" target=":host"></forge-state-layer><forge-focus-indicator part="focus-indicator" target=":host" inward></forge-focus-indicator></div></div></template>',Sx=':host{--_step-primary-color:var(--forge-step-primary-color, var(--forge-theme-primary, #3f51b5));--_step-text-color:var(--forge-step-text-color, var(--forge-theme-on-primary, #ffffff));--_step-border-radius:var(--forge-step-border-radius, calc(var(--forge-shape-extra-large, 16px) * var(--forge-shape-factor, 1)));--_step-border-radius-vertical:var(--forge-step-border-radius-vertical, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_step-disabled-text-color:var(--forge-step-disabled-text-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_step-disabled-color:var(--forge-step-disabled-color, var(--forge-theme-surface-container-minimum, #f5f5f5));--_step-icon-fill:var(--forge-step-icon-fill, unset);--_step-icon-fill-active:var(--forge-step-icon-fill-active, var(--_step-primary-color));--_step-icon-text-color:var(--forge-step-icon-text-color, var(--forge-theme-primary, #3f51b5));--_step-icon-text-color-active:var(--forge-step-icon-text-color-active, var(--forge-theme-on-primary, #ffffff));--_step-icon-content-size:var(--forge-step-icon-content-size, 24px);--_step-icon-size:var(--forge-step-icon-size, calc(var(--forge-typography-font-size, 1rem) * 0.875));--_step-icon-transition-duration:var(--forge-step-icon-transition-duration, var(--forge-animation-duration-medium4, 400ms));--_step-icon-transition-easing:var(--forge-step-icon-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_step-line-color:var(--forge-step-line-color, var(--forge-theme-outline, #e0e0e0));--_step-line-min-width:var(--forge-step-line-min-width, 10px);--_step-line-min-width-clustered:var(--forge-step-line-min-width-clustered, 25px);--_step-label-color:var(--forge-step-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_step-sub-label-color:var(--forge-step-sub-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_step-error-color:var(--forge-step-error-color, var(--forge-theme-error, #b00020));--_step-error-text-color:var(--forge-step-error-text-color, var(--forge-theme-on-error, #ffffff));--_step-expansion-panel-border-left-width:var(--forge-step-expansion-panel-border-left-width, 1px);--_step-expansion-panel-margin-bottom:var(--forge-step-expansion-panel-margin-bottom, 4px);--_step-expansion-panel-margin-left:var(--forge-step-expansion-panel-margin-left, 60px);--_step-expansion-panel-margin-top:var(--forge-step-expansion-panel-margin-top, 4px);--_step-expansion-panel-icon-color:var(--forge-step-expansion-panel-icon-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}:host(:focus){outline:0}:host([error]){--forge-state-layer-color:var(--_step-error-color)}:host(:first-child[alternative])::after{align-self:flex-start;top:22px;margin:0}:host(:last-child[alternative])::before{align-self:flex-start;top:22px;margin:0}:host(:not(:first-child):not(:last-child)[alternative])::after,:host(:not(:first-child):not(:last-child)[alternative])::before{align-self:flex-start;top:22px;min-width:7px;margin:0}:host(:not(:last-child)[alternative]) .after{align-self:flex-start;top:22px;position:absolute;width:calc(50% - 18px);left:calc(50% + 18px);height:0;right:0}:host(:not(:first-child)[alternative]) .before{align-self:flex-start;top:22px;position:absolute;left:0;width:calc(50% - 18px);height:0}:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::after,:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::before{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host(:last-child):host(:not([vertical]))::before{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px 0 0}:host(:is(:first-child)):host(:not([vertical]))::after{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host([vertical]){flex-direction:column}:host([vertical])::after{content:none}:host([vertical])::before{content:none}:host([vertical]) .forge-step{--_step-border-radius:var(--_step-border-radius-vertical);width:100%;min-height:52px}:host([vertical]) .forge-step .text-container{white-space:normal}:host([vertical]) .icon-container .icon-content{margin:0 16px 0 0}:host([vertical]) .expansion-panel{display:none}:host([vertical]) .expanded-icon{color:var(--_step-expansion-panel-icon-color);display:none;margin-left:auto}:host([vertical][expandable]) .expansion-panel{display:block}:host([ignore-user-expansion]) .forge-step .expanded-icon{display:none}forge-expansion-panel::part(root){border-color:var(--_step-line-color);margin-left:var(--_step-expansion-panel-margin-left);margin-top:var(--_step-expansion-panel-margin-top);margin-bottom:var(--_step-expansion-panel-margin-bottom);border-left-width:var(--_step-expansion-panel-border-left-width);border-left-style:solid}forge-focus-indicator{--forge-focus-indicator-color:var(--_step-primary-color);--forge-focus-indicator-shape:16px}.container{display:contents}.forge-step{-webkit-tap-highlight-color:transparent;padding:12px 16px;outline:0;background:0 0;border:none;border-radius:var(--_step-border-radius);position:relative;display:flex;overflow:hidden;align-items:center;box-sizing:border-box;cursor:pointer}.forge-step:focus{outline:0}.forge-step::-moz-focus-inner,.forge-step::-moz-focus-outer{padding:0;border:0}.forge-step.error forge-focus-indicator{--forge-focus-indicator-color:var(--_step-error-color)}.forge-step.vertical forge-focus-indicator{--forge-focus-indicator-shape:4px}.forge-step.selected:not(.disabled){--forge-state-layer-color:var(--_step-primary-color)}.forge-step.selected:not(.disabled)::before{background-color:var(--_step-primary-color);content:"";position:absolute;inset:0;opacity:.08;height:100%;width:100%}.forge-step.selected:not(.disabled).error{--_step-primary-color:var(--_step-error-color)}.forge-step .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);color:var(--_step-label-color);text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step .subtitle{text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step .subtitle ::slotted(*){color:var(--_step-sub-label-color);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit)}.forge-step .icon-container .icon-content{color:var(--_step-icon-text-color);background-color:var(--_step-icon-fill);height:var(--_step-icon-content-size);width:var(--_step-icon-content-size);border-style:solid;border-width:2px;border-color:transparent;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background-color var(--_step-icon-transition-duration) var(--_step-icon-transition-easing);margin:0 8px 0 0;flex:none}.forge-step .icon-container .icon-content forge-icon{font-size:var(--_step-icon-size)}.forge-step.disabled{color:var(--_step-disabled-text-color);cursor:not-allowed}.forge-step.disabled.forge-step .icon-container .icon-content{--_step-icon-fill:var(--_step-disabled-color);--_step-icon-text-color:var(--_step-disabled-text-color)}.forge-step.disabled .text-container .title{color:var(--_step-disabled-text-color)}.forge-step.disabled .text-container .subtitle ::slotted(*){color:var(--_step-disabled-text-color)}.forge-step.alternative{flex-direction:column}.forge-step.alternative .icon-container .icon-content{margin:0}.forge-step.alternative .text-container{margin-top:8px;place-items:center}.forge-step:not(.selected):not(.disabled).editable:not(.completed):not(.error) .icon-content,.forge-step:not(.selected):not(.disabled):not(.editable):not(.completed):not(.error) .icon-content{border-color:var(--_step-primary-color)}.forge-step:not(.selected):not(.disabled).editable:not(.completed):not(.error) .icon-content .index,.forge-step:not(.selected):not(.disabled):not(.editable):not(.completed):not(.error) .icon-content .index{color:var(--_step-primary-color)}.forge-step.selected.disabled .icon-content{--_step-icon-fill:var(--_step-disabled-color);--_step-icon-text-color:var(--_step-disabled-text-color)}.forge-step.selected:not(.disabled) .icon-container .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.selected:not(.disabled) .title{color:var(--_step-primary-color);font-weight:500}.forge-step.selected:not(.disabled) .subtitle ::slotted(*){color:var(--_step-primary-color);font-weight:500}.forge-step.error:not(.disabled) .title{color:var(--_step-error-color)}.forge-step.error:not(.disabled) .subtitle ::slotted(*){color:var(--_step-error-color)}.forge-step.error:not(.disabled) .icon-container .icon-content{--_step-icon-fill:var(--_step-error-color);--_step-icon-text-color:var(--_step-error-text-color)}.forge-step.completed:not(.disabled):not(.error):not(.editable) .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.completed:not(.disabled):not(.error).editable .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.expandable .expanded-icon{display:inline-block;transition:transform .3s ease-in-out}.forge-step.expandable.expanded .expanded-icon{transform:rotate(180deg)}.forge-step.expandable .icon-container .icon-content{margin:0 16px 0 0}.forge-step .text-container{display:flex;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(:not(:last-child)[clustered])::after{--_step-line-min-width:var(--_step-line-min-width-clustered)}:host(:last-child[clustered])::before{--_step-line-min-width:var(--_step-line-min-width-clustered)}:host(:not(:first-child):not(:last-child)[clustered])::after,:host(:not(:first-child):not(:last-child)[clustered])::before{--_step-line-min-width:var(--_step-line-min-width-clustered)}',Y2=class extends M{static get observedAttributes(){return[S.attributes.COMPLETED,S.attributes.EDITABLE,S.attributes.ERROR,S.attributes.INDEX,S.attributes.SELECTED,S.attributes.ALTERNATIVE,S.attributes.DISABLED,S.attributes.VERTICAL,S.attributes.EXPANDED,S.attributes.IGNORE_USER_EXPANSION]}constructor(){super(),q.define([n3,j5,v3,$5,i0]),H(this,Tx,Sx),this._core=new ul(new wl(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case S.attributes.INDEX:this.index=W(a);break;case S.attributes.COMPLETED:this.completed=p(a);break;case S.attributes.EDITABLE:this.editable=p(a);break;case S.attributes.ERROR:this.error=p(a);break;case S.attributes.SELECTED:this.selected=p(a);break;case S.attributes.ALTERNATIVE:this.alternative=p(a);break;case S.attributes.DISABLED:this.disabled=p(a);break;case S.attributes.VERTICAL:this.vertical=p(a);break;case S.attributes.EXPANDED:this.expanded=p(a);break;case S.attributes.IGNORE_USER_EXPANSION:this.ignoreUserExpansion=p(a);break}}};s([v()],Y2.prototype,"alternative",2),s([v()],Y2.prototype,"index",2),s([v()],Y2.prototype,"editable",2),s([v()],Y2.prototype,"completed",2),s([v()],Y2.prototype,"error",2),s([v()],Y2.prototype,"selected",2),s([v()],Y2.prototype,"disabled",2),s([v()],Y2.prototype,"vertical",2),s([v()],Y2.prototype,"expanded",2),s([v()],Y2.prototype,"ignoreUserExpansion",2),Y2=s([y({name:S.elementName,dependencies:[X,_t,r1,Q]})],Y2);function w6(){x(Y2)}var kx=`${b}stepper`,u6={STEPPER:"forge-stepper",LINEAR:"linear",ALTERNATIVE:"alternative",CLUSTERED:"clustered",FIXED:"fixed",ALIGN_LEFT:"align-left",ALIGN_CENTER:"align-center",ALIGN_RIGHT:"align-right",VERTICAL:"vertical",FOCUSED:"focused"},Ox={STEPPER:`.${u6.STEPPER}`},Dx={SELECTED_INDEX:"selected-index",LINEAR:"linear",ALTERNATIVE:"alternative",LAYOUT_MODE:"layout-mode",LAYOUT_ALIGN:"layout-align",DISABLED:"disabled",VERTICAL:"vertical"},dt={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_KEY:"Tab"},ka={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,HOME_KEYCODE:36,ENTER_KEYCODE:13,SPACE_KEYCODE:32},Px=[dt.ARROW_LEFT_KEY,dt.ARROW_RIGHT_KEY,dt.ARROW_DOWN_KEY,dt.ARROW_UP_KEY,dt.END_KEY,dt.HOME_KEY,dt.ENTER_KEY,dt.SPACE_KEY,dt.TAB_KEY],Nx={[ka.ARROW_LEFT_KEYCODE]:dt.ARROW_LEFT_KEY,[ka.ARROW_RIGHT_KEYCODE]:dt.ARROW_RIGHT_KEY,[ka.END_KEYCODE]:dt.END_KEY,[ka.HOME_KEYCODE]:dt.HOME_KEY,[ka.ENTER_KEYCODE]:dt.ENTER_KEY,[ka.SPACE_KEYCODE]:dt.SPACE_KEY},R={elementName:kx,classes:u6,selectors:Ox,attributes:Dx,numbers:ka,strings:dt,ACCEPTABLE_KEYS:Px,KEYCODE_MAP:Nx};var b0=class r{static createStepElement(t,e,a){var n,i;let o=document.createElement(S.elementName);return o.index=e,o.completed=t.completed||!1,o.editable=t.editable||!1,o.selected=a.selectedIndex===e,o.alternative=a.alternative,o.error=t.error||!1,o.disabled=t.disabled||!1,o.vertical=(i=(n=t.vertical)!=null?n:a.vertical)!=null?i:!1,o.ignoreUserExpansion=t.ignoreUserExpansion||!1,o.expanded=t.expanded||!1,a.linear&&e>a.selectedIndex&&(o.tabIndex=-1),o.textContent=t.label,t.optionalLabel&&o.appendChild(this.createStepOptionalLabel(t.optionalLabel)),o}static createStepOptionalLabel(t){let e=document.createElement("span");return e.slot="optional",e.textContent=t||"",e}static setLinearState(t,e){let a=t.classList.contains(R.classes.LINEAR);a&&!e&&(t.classList.remove(R.classes.LINEAR),a=!1),!a&&e&&t.classList.add(R.classes.LINEAR)}static setAlternativeState(t,e){let a=t.classList.contains(R.classes.ALTERNATIVE);a&&!e&&(t.classList.remove(R.classes.ALTERNATIVE),a=!1),!a&&e&&t.classList.add(R.classes.ALTERNATIVE)}static setLayoutMode(t,e){switch(e){case"clustered":t.classList.contains(R.classes.FIXED)&&t.classList.remove(R.classes.FIXED),t.classList.add(R.classes.CLUSTERED);break;case"fixed":t.classList.contains(R.classes.CLUSTERED)&&t.classList.remove(R.classes.CLUSTERED),t.classList.add(R.classes.FIXED);break}}static setLayoutAlign(t,e){switch(t.classList.contains(R.classes.ALIGN_LEFT)&&t.classList.remove(R.classes.ALIGN_LEFT),t.classList.contains(R.classes.ALIGN_CENTER)&&t.classList.remove(R.classes.ALIGN_CENTER),t.classList.contains(R.classes.ALIGN_RIGHT)&&t.classList.remove(R.classes.ALIGN_RIGHT),e){case"left":t.classList.add(R.classes.ALIGN_LEFT);break;case"center":t.classList.add(R.classes.ALIGN_CENTER);break;case"right":t.classList.add(R.classes.ALIGN_RIGHT);break}}static createSteps(t){let e=[];return t.steps.forEach((a,o)=>{let n=r.createStepElement(a,o,t);e.push(n)}),e[0].setAttribute(S.attributes.FIRST,""),e[e.length-1].setAttribute(S.attributes.LAST,""),e}};var _l=class extends I{constructor(t){super(t),this._rootElement=g(t,R.selectors.STEPPER),this._slotElement=this._rootElement.querySelector("slot")}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","tablist")}patchSafari(){this._applyToSteps(t=>t.setAttribute("safari",""))}addSlotChangeListener(t){this._slotElement.addEventListener("slotchange",t)}removeSlotChangeListener(t){this._slotElement.addEventListener("slotchange",t)}getLastStep(){let t=this._getSteps();return t.item(t.length-1)}setSelected(t){this._getSteps().forEach(e=>{e===t?e.selected=!0:e.selected=!1})}assignIndices(){this._getSteps().forEach((e,a)=>{e.index=a})}assignFirstLastStep(){let t=this._getSteps();t&&t.length>1&&(t[0].setAttribute("first",""),t[t.length-1].setAttribute("last",""))}setLayoutAlign(t){b0.setLayoutAlign(this._rootElement,t)}setLayoutMode(t){b0.setLayoutMode(this._rootElement,t),this._applyToSteps(e=>e.setAttribute(S.attributes.CLUSTERED,""))}setAlternativeState(t){b0.setAlternativeState(this._rootElement,t),this._applyToSteps(e=>e.alternative=t)}setVertical(t){_2(this._rootElement,t,R.classes.VERTICAL),this._applyToSteps(e=>e.vertical=t)}setLinearState(t){b0.setLinearState(this._rootElement,t)}removeRootListener(t,e){this._rootElement.removeEventListener("click",e)}addRootListener(t,e){this._rootElement.addEventListener(t,e)}setSelectedByIndex(t){this._applyToSteps(e=>{e.selected&&e.index!==t&&(e.selected=!1),e.index===t&&(e.selected=!0)})}applyConfiguredSteps(t){this._component.querySelectorAll(S.elementName).forEach(e=>{this._component.removeChild(e)}),t.forEach(e=>this._component.appendChild(e))}tryGetFocusedStep(){let t;return this._applyToSteps(e=>{e.matches(":focus-within")&&(t=e)}),t}getFocusedOrSelectedStep(){let t=this.tryGetFocusedStep();return t||(t=this._getSteps()[0],t.focus()),t}getStep(t){let e=0,a=this._getSteps();return t<0?a.item(a.length-1):(a.length>t&&(e=t),a.item(e))}toggleDisabled(t){this._applyToSteps(e=>e.disabled=t)}toggleRootClass(t,e){_2(this._rootElement,e,t)}isStepperFocused(){return this._rootElement.classList.contains(R.classes.FOCUSED)}setStepsListener(t,e){this._applyToSteps(a=>a.addEventListener(t,e))}removeStepsListener(t,e){this._applyToSteps(a=>a.removeEventListener(t,e))}_applyToSteps(t){this._getSteps().forEach(t)}_getSteps(){return this._component.querySelectorAll(S.elementName)}};var fl=class{constructor(t){this._adapter=t;this._steps=[];this._selectedIndex=0;this._linear=!1;this._alternative=!1;this._layoutMode="fixed";this._layoutAlign="center";this._initialize=!1;this._clickListener=e=>this._handleClick(e),this._keyListener=e=>this._onKeydown(e),this._stepFocusListener=()=>this._onStepFocus(),this._stepBlurListener=()=>this._onStepBlur(),this._stepExpandedContentFocusInListener=e=>this._onStepExpandedContentFocusIn(e),this._stepExpandedContentFocusOutListener=e=>this._onStepExpandedContentFocusOut(e),this._slotChangeListener=e=>this._onSlotChange(e)}initialize(){this._adapter.initializeAccessibility(),this._adapter.assignIndices(),this._adapter.setLinearState(this._linear),this._adapter.setAlternativeState(this._alternative),this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setLayoutMode(this._layoutMode),this._adapter.addRootListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keyListener),this._adapter.assignFirstLastStep(),this._adapter.addRootListener(S.events.EXPANDED_CONTENT_FOCUSIN,this._stepExpandedContentFocusInListener),this._adapter.addRootListener(S.events.EXPANDED_CONTENT_FOCUSOUT,this._stepExpandedContentFocusOutListener),this._applySelectedIndex(),this._patchBrowser(),this._adapter.setStepsListener("blur",this._stepBlurListener),this._adapter.setStepsListener("focus",this._stepFocusListener),this._initialize||this._adapter.addSlotChangeListener(this._slotChangeListener),this._initialize=!0}destroy(){this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeHostListener("keydown",this._keyListener),this._adapter.removeSlotChangeListener(this._slotChangeListener),this._adapter.removeStepsListener("blur",this._stepBlurListener),this._adapter.removeStepsListener("focus",this._stepFocusListener)}get steps(){return this._steps.map(t=>w({},t))}set steps(t){if(Array.isArray(t)&&t.length>0)this._steps=[...t.map(e=>w({},e))];else{this._steps=[];return}this._renderConfiguration()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){if(!k(t))t=0;else if(!z2(t)){let e=Number(t);t=isNaN(e)?0:e}this._selectedIndex!==t&&(this._selectedIndex=t,this._adapter.setHostAttribute(R.attributes.SELECTED_INDEX,this._selectedIndex.toString()),this._applySelectedIndex())}get linear(){return this._linear}set linear(t){t=!!t,this._linear!==t&&(this._linear=t,this._adapter.setLinearState(this._linear),this._adapter.setHostAttribute(R.attributes.LINEAR,this._linear.toString()))}get alternative(){return this._alternative}set alternative(t){t=!!t,this._alternative!==t&&(this._alternative=t,this._adapter.setAlternativeState(this._alternative),this._adapter.setHostAttribute(R.attributes.ALTERNATIVE,this._alternative.toString()))}get layoutMode(){return this._layoutMode}set layoutMode(t){/^(fixed|clustered)$/.test(t)&&this._layoutMode!==t&&(this._layoutMode=t,this._adapter.setHostAttribute(R.attributes.LAYOUT_MODE,this._layoutMode),this._adapter.setLayoutMode(this._layoutMode))}get layoutAlign(){return this._layoutAlign}set layoutAlign(t){/^(left|center|right)$/.test(t)&&this._layoutAlign!==t&&(this._layoutAlign=t,this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setHostAttribute(R.attributes.LAYOUT_ALIGN,this._layoutAlign))}get disabled(){return this._disabled}set disabled(t){t!==this._disabled&&(this._disabled=t,this._applyDisabled())}get vertical(){return this._vertical}set vertical(t){t!==this._vertical&&(this._vertical=t,this._applyVertical(),this._adapter.toggleHostAttribute(R.attributes.VERTICAL,this._vertical))}_applyVertical(){this._adapter.setVertical(this._vertical)}_applyDisabled(){this._disabled?this._adapter.setHostAttribute(R.attributes.DISABLED,"disabled"):this._adapter.removeHostAttribute(R.attributes.DISABLED),this._adapter.toggleDisabled(this._disabled)}_applySelectedIndex(){this._adapter.setSelectedByIndex(this._selectedIndex)}_handleClick(t){if(t.preventDefault(),this._linear)return;let a=L2(t).filter(o=>o.nodeType===Node.ELEMENT_NODE).find(o=>o.matches(S.elementName));a&&!a.selected&&!a.disabled&&this._adapter.emitHostEvent(S.events.SELECT,a.index,!0,!0)&&(this._adapter.setSelected(a),this.selectedIndex=a.index)}_renderConfiguration(){let t=b0.createSteps({steps:this._steps,vertical:this._vertical,selectedIndex:this._selectedIndex,alternative:this._alternative,layoutAlign:this._layoutAlign,layoutMode:this._layoutMode,linear:this._linear});this.destroy(),this._adapter.applyConfiguredSteps(t),this.initialize()}_onKeydown(t){var o;if(this._linear)return;let e=this._getKeyFromEvent(t);if(!this._adapter.isStepperFocused()||!e)return;if([S.strings.HOME_KEY,S.strings.END_KEY,S.strings.ARROW_DOWN_KEY,R.strings.ARROW_UP_KEY,R.strings.ENTER_KEY,R.strings.SPACE_KEY].includes(e)&&t.preventDefault(),[R.strings.ENTER_KEY,R.strings.SPACE_KEY].includes(e)){(o=this._adapter.getFocusedOrSelectedStep())==null||o.click();return}let a=this._vertical?this._determineVerticalMoveTarget(e):this._determineMoveTarget(e);a&&this._moveFocusTo(a)}_moveFocusTo(t){t.focus()}_getKeyFromEvent(t){return R.ACCEPTABLE_KEYS.includes(t.key)?t.key:R.KEYCODE_MAP[t.keyCode]}_determineMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case R.strings.ARROW_RIGHT_KEY:return this._adapter.getStep(e.index+1);case R.strings.ARROW_LEFT_KEY:return this._adapter.getStep(e.index-1);case R.strings.HOME_KEY:return this._adapter.getStep(0);case R.strings.END_KEY:return this._adapter.getLastStep()}return e}_determineVerticalMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case R.strings.ARROW_DOWN_KEY:return this._adapter.getStep(e.index+1);case R.strings.ARROW_UP_KEY:return this._adapter.getStep(e.index-1);case R.strings.HOME_KEY:return this._adapter.getStep(0);case R.strings.END_KEY:return this._adapter.getLastStep()}return e}_onSlotChange(t){this.destroy(),this.initialize()}_onStepExpandedContentFocusIn(t){let e=this._adapter.getStep(t.detail.index+1);e&&(e.tabIndex=0),t.detail.tabIndex=0}_onStepExpandedContentFocusOut(t){let e=t.target,a=this._adapter.getStep(e.index+1);a&&(a.tabIndex=-1),e.tabIndex=-1}_onStepFocus(){this._adapter.toggleRootClass(R.classes.FOCUSED,!0)}_onStepBlur(){this._adapter.toggleRootClass(R.classes.FOCUSED,!1)}_patchBrowser(){new $2().SAFARI()&&this._adapter.patchSafari()}};var Rx='<template><div class="forge-stepper" part="root"><slot></slot></div></template>',Fx=":host{display:block}:host([hidden]){display:none}:host([vertical]) .forge-stepper{display:unset;align-items:unset;white-space:unset;overflow:unset}.forge-stepper{display:flex;align-items:center;white-space:nowrap;overflow:hidden}.forge-stepper:not(.vertical) ::slotted(*){display:flex;align-items:center;position:relative;min-width:112px}.forge-stepper.fixed ::slotted(*){flex:1}.forge-stepper.alternative{align-items:flex-start}.forge-stepper.alternative ::slotted(*){min-width:160px}.forge-stepper.align-left{justify-content:flex-start}.forge-stepper.align-center{justify-content:center}.forge-stepper.align-right{justify-content:flex-end}",St=class extends M{static get observedAttributes(){return[R.attributes.SELECTED_INDEX,R.attributes.LINEAR,R.attributes.ALTERNATIVE,R.attributes.LAYOUT_MODE,R.attributes.LAYOUT_ALIGN,R.attributes.DISABLED,R.attributes.VERTICAL]}constructor(){super(),H(this,Rx,Fx),this._core=new fl(new _l(this))}async connectedCallback(){await Fa(this),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case R.attributes.SELECTED_INDEX:this.selectedIndex=Number(a)||0;break;case R.attributes.LINEAR:this.linear=p(a);break;case R.attributes.ALTERNATIVE:this.alternative=p(a);break;case R.attributes.LAYOUT_MODE:this.layoutMode=a;break;case R.attributes.LAYOUT_ALIGN:this.layoutAlign=a;break;case R.attributes.DISABLED:this.disabled=p(a);break;case R.attributes.VERTICAL:this.vertical=p(a);break}}};s([v()],St.prototype,"steps",2),s([v()],St.prototype,"selectedIndex",2),s([v()],St.prototype,"linear",2),s([v()],St.prototype,"alternative",2),s([v()],St.prototype,"layoutMode",2),s([v()],St.prototype,"layoutAlign",2),s([v()],St.prototype,"disabled",2),s([v()],St.prototype,"vertical",2),St=s([y({name:R.elementName,dependencies:[Y2]})],St);function _6(){x(St)}var y0=`${b}table`,f6={TABLE:"forge-table",TABLE_DENSE:"forge-table--dense",TABLE_ROOMY:"forge-table--roomy",TABLE_RESIZABLE:"forge-table--resizable",TABLE_RESIZING:"forge-table--resizing",TABLE_RESIZE_HANDLE:"forge-table__resize-handle",TABLE_NO_WRAP_CONTENT:"forge-table--no-wrap-content",TABLE_LAYOUT_FIXED:"forge-table--layout-fixed",TABLE_FILTER_VISIBLE:"forge-table--filter-visible",TABLE_FIXED:"forge-table--fixed",TABLE_HEAD:"forge-table-head",TABLE_HEAD_ROW:"forge-table-head__row",TABLE_HEAD_ROW_FILTER:"forge-table-head__row__filter",TABLE_HEAD_CELL:"forge-table-head__cell",TABLE_HEAD_CELL_CONTAINER:"forge-table-head__cell-container",TABLE_HEAD_CELL_SORTABLE:"forge-table-head__cell--sortable",TABLE_HEAD_CELL_SORT_ICON:"forge-table-head__cell-sort-icon",TABLE_HEAD_CELL_TEXT:"forge-table-head__cell-text",TABLE_HEAD_CELL_SORT_ICON_ACTIVE:"forge-table-head__cell-sort-icon--active",TABLE_HEAD_CELL_SORTED_ASCENDING:"forge-table-head__cell--sorted-ascending",TABLE_HEAD_CELL_SORTED_DESCENDING:"forge-table-head__cell--sorted-descending",TABLE_HEAD_CELL_SORT_ORDER:"forge-table-head__cell__sort-order",TABLE_HEAD_CELL_SORT_ORDER_HIDDEN:"forge-table-head__cell__sort-order--hidden",TABLE_BODY:"forge-table-body",TABLE_BODY_ROW:"forge-table-body__row",TABLE_BODY_ROW_SELECTED:"forge-table-body__row--selected",TABLE_BODY_ROW_CLICKABLE:"forge-table-body__row--clickable",TABLE_BODY_CELL:"forge-table-body__cell",TABLE_ROW:"forge-table-row",TABLE_ROW_EXPANDED:"forge-table-row--expanded",TABLE_ROW_EXPANDABLE_CONTENT:"forge-table-row__expandable-content",TABLE_ROW_EXPANDABLE_CONTENT_CELL:"forge-table-row__expandable-content-cell",TABLE_CELL:"forge-table-cell",TABLE_CELL_SELECT:"forge-table-cell__select",TABLE_CELL_SELECT_CHECKBOX:"forge-table-cell__select-checkbox",TABLE_CELL_SELECT_CHECKBOX_CONTAINER:"forge-table-cell__select-checkbox-container",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT:"forge-table-cell__select-checkbox-container--align-right",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT:"forge-table-cell__select-checkbox-container--align-left",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER:"forge-table-cell__select-checkbox-container--align-center",TABLE_CELL_CONTAINER:"forge-table-cell__container",TABLE_CELL_CONTAINER_TEXT:"forge-table-cell__container-text",TABLE_CELL_CENTER:"forge-table-cell--center",TABLE_CELL_RIGHT:"forge-table-cell--right",TABLE_CELL_RESIZABLE:"forge-table-cell--resizing"},Ux={TABLE:".forge-table",CHECKBOX_INPUT:":is(forge-checkbox,input[type=checkbox]):not([forge-ignore])",SELECT_ALL_TEMPLATE_CHECKBOX_INPUT:":is(forge-checkbox,input[type=checkbox]):not([forge-ignore])",ROW_SELECTED:`.${f6.TABLE_BODY_ROW_SELECTED}`},Wx={SELECT:"select",MULTISELECT:"multiselect",SELECT_KEY:"select-key",DENSE:"dense",ROOMY:"roomy",FILTER:"filter",FIXED_HEADERS:"fixed-headers",LAYOUT_TYPE:"layout-type",WRAP_CONTENT:"wrap-content",RESIZABLE:"resizable",MIN_RESIZE_WIDTH:"min-resize-width",ALLOW_ROW_CLICK:"allow-row-click",MULTI_COLUMN_SORT:"multi-column-sort",SELECT_CHECKBOX_ALIGNMENT:"select-checkbox-alignment",TOOLTIP_SELECT:"tooltip-select",TOOLTIP_SELECT_ALL:"tooltip-select-all",CHECKBOX_TYPE:"forge-checkbox-type",CUSTOM_CELL_TEMPLATE:"data-cell-template",CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION:"data-cell-template-stop-propagation",SELECT_CHECKBOX:"forge-table-row-select-checkbox"},Gx={ROW_CLICK:`${y0}-row-click`,SELECT:`${y0}-select`,SELECT_DOUBLE:`${y0}-select-double`,SELECT_ALL:`${y0}-select-all`,SORT:`${y0}-sort`,FILTER:`${y0}-filter`,INITIALIZED:`${y0}-initialized`,COLUMN_RESIZE:`${y0}-column-resize`},Yx={SELECT_ALL:"select-all",SELECT_ROW:"select-row",DEFAULT_LAYOUT_TYPE:"auto"},Kx={SORT_DOWN:"arrow_downward"},qx={DEFAULT_FILTER_DEBOUNCE_TIME:750,MIN_RESIZE_WIDTH:100,RESIZE_HOVER_DURATION:150},f={elementName:y0,classes:f6,selectors:Ux,attributes:Wx,events:Gx,strings:Yx,icons:Kx,numbers:qx};var xl=(a=>(a.Left="left",a.Right="right",a.Center="center",a))(xl||{}),bl=(a=>(a.Ascending="ASC",a.Descending="DESC",a.Unset="UNSET",a))(bl||{}),$x=(i=>(i.InputText="text",i.InputNumber="number",i.Select="select",i.SelectMultiple="select-multiple",i.Date="date",i.DateRange="date-range",i))($x||{});function x6(r){return r&&typeof r=="object"&&"content"in r}var C1=class r{static createTable(t){r._resetTable(t.tableElement);let e=r._createTableHead(t),a=r._createTableBody(t);t.clickListener&&(r._attachRowClickListeners(a,t.clickListener,t.doubleClickListener),r._addRowClickAttributes(a)),t.fixedHeaders&&r.setFixedHeaders(t),t.resizable&&r.setResizable(t),t.dense&&r.setDenseState(t.tableElement,t.dense),t.wrapContent&&r.setWrapContentState(t.tableElement,t.wrapContent),t.selectListener&&r._addSelectColumn(e,a,t.selectListener,t.selectAllListener,t.selectAllTemplate,t.selectCheckboxAlignment,t.data,t.tooltipSelect,t.tooltipSelectAll),(t.resizable||t.columnConfigurations.some(o=>!!o.sortable))&&(r._attachHeadRowMouseDownListener(e,t.headRowMouseDownListener),r._isMac()&&r._attachHeadRowContextMenuListener(e,t.headRowContextMenuListener)),r.setLayoutType(t),r._setTableHead(t.tableElement,e),t.filter&&r.setFilterRow(t),r._setTableBody(t.tableElement,a)}static _setTableHead(t,e){t.tHead?e0(e,t.tHead):t.appendChild(e)}static _setTableBody(t,e){t.tBodies.length?e0(e,t.tBodies[0]):t.appendChild(e)}static recreateTableBody(t){let e=r._createTableBody(t);t.clickListener&&(r._attachRowClickListeners(e,t.clickListener,t.doubleClickListener),r._addRowClickAttributes(e)),t.selectListener&&(r._createBodySelectColumn(e,t.selectCheckboxAlignment,t.data,t.tooltipSelect,t.tooltipSelectAll),r._attachRowSelectListeners(e,t.selectListener)),r._setTableBody(t.tableElement,e)}static _resetTable(t){r2(t)}static _createMultisortTooltip(){let t=document.createElement("forge-tooltip");return t.textContent="Ctrl + click to sort multiple columns",t.placement="bottom",t.delay=0,t}static _createTableHead(t){let e=document.createElement("thead"),a=e.insertRow();y1([f.classes.TABLE_ROW,f.classes.TABLE_HEAD_ROW],a);let o=!1;for(let n=0;n<t.columnConfigurations.length;n++){let i=t.columnConfigurations[n],l=document.createElement("th");l.scope="col",y1([f.classes.TABLE_CELL,f.classes.TABLE_HEAD_CELL],l);let h;if(i.sortable?(h=document.createElement("button"),h.type="button",h.addEventListener("keydown",t.sortableHeadCellKeydownListener)):h=document.createElement("div"),h.classList.add(f.classes.TABLE_HEAD_CELL_CONTAINER),t.multiColumnSort){let c=r._createMultisortTooltip();h.appendChild(c)}if(i.align&&r._setCellAlignmentClass(h,i.align),k(i.width)){let c=Ul(i.width);c&&(l.style.width=c)}if(t.resizable&&i.resizable!==!1){let c=document.createElement("div");c.classList.add(f.classes.TABLE_RESIZE_HANDLE),l.appendChild(c)}if(k(i.headerCellStyle)&&nt(i.headerCellStyle)&&(Object.assign(l.style,i.headerCellStyle),Object.assign(h.style,i.headerCellStyle)),i.sortable){l.classList.add(f.classes.TABLE_HEAD_CELL_SORTABLE);let c=document.createElement("span");y1([f.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,f.classes.TABLE_HEAD_CELL_SORT_ORDER],c);let d=document.createElement(h1.elementName);d.name=f.icons.SORT_DOWN,y1([f.classes.TABLE_HEAD_CELL_SORT_ICON],d),t.multiColumnSort?typeof i.initialSort=="object"&&i.initialSort.sortOrder&&(c.textContent=i.initialSort.sortOrder.toString(),t.columnConfigurations.filter(u=>typeof u.initialSort=="object").length>1&&we(f.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,c),l.classList.add(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),d.classList.add(f.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),r._setColumnSortDirection(l,i.initialSort.direction)):t.sortedColumn===n&&!o&&!t.multiColumnSort&&(l.classList.add(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),d.classList.add(f.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),r._setColumnSortDirection(l,t.sortDirection),o=!0),h.appendChild(d),h.appendChild(c)}if(typeof i.headerTemplate=="function")Promise.resolve(i.headerTemplate(n,h,i)).then(c=>{if(c){let d=document.createElement("div");y1(f.classes.TABLE_CELL_CONTAINER,d),typeof c=="string"?d.innerHTML=c:r._prepend(c,d),d.setAttribute(f.attributes.CUSTOM_CELL_TEMPLATE,""),r._prepend(d,h)}});else{let c=document.createElement("span");c.classList.add(f.classes.TABLE_HEAD_CELL_TEXT),c.textContent=i.header&&typeof i.header=="string"?i.header.trim():"",c.textContent.trim().length===0&&l.setAttribute("aria-hidden","true"),r._prepend(c,h)}l.appendChild(h),a.appendChild(l)}return e}static setSortDirection(t,e,a){let o=r._getHeaderCellByIndex(t,e);t.querySelectorAll("th[aria-sort]").forEach(n=>n.removeAttribute("aria-sort")),r._setColumnSortDirection(o,a)}static _setColumnSortDirection(t,e){t.classList.contains(f.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&t.classList.remove(f.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),t.classList.contains(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&t.classList.remove(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),!e||e==="DESC"?(t.setAttribute("aria-sort","descending"),t.classList.add(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)):(t.setAttribute("aria-sort","ascending"),t.classList.add(f.classes.TABLE_HEAD_CELL_SORTED_ASCENDING))}static _createTableBody(t){let e=document.createElement("tbody");return r._getOrderedRowData(t.columnConfigurations,t.data).forEach((o,n)=>{let i=e.insertRow();y1([f.classes.TABLE_ROW,f.classes.TABLE_BODY_ROW],i),r._populateRowCells(t,i,o,n),typeof t.rowCreatedCallback=="function"&&t.rowCreatedCallback(i,n,w({},t.data[n].data))}),e}static _populateRowCells(t,e,a,o){for(let n=0;n<a.length;n++){let i=t.columnConfigurations[n],l=e.insertCell();if(y1([f.classes.TABLE_CELL,f.classes.TABLE_BODY_CELL],l),k(i.width)){let c=Ul(i.width);c&&(l.style.width=c)}let h=document.createElement("div");if(h.classList.add(f.classes.TABLE_CELL_CONTAINER),k(i.cellStyle)&&nt(i.cellStyle)&&(Object.assign(l.style,i.cellStyle),Object.assign(h.style,i.cellStyle)),i.template&&typeof i.template=="function"){let c=t.data[o]?t.data[o].data:void 0;Promise.resolve(i.template(o,h,c,n)).then(d=>{let u=x6(d)?d:{content:d,stopClickPropagation:i.stopCellTemplateClickPropagation};u.content&&(typeof u.content=="string"?h.innerHTML=u.content:h.appendChild(u.content),h.setAttribute(f.attributes.CUSTOM_CELL_TEMPLATE,""),u.stopClickPropagation&&h.setAttribute(f.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION,""))})}else if(i.property){let c=document.createElement("span");c.classList.add(f.classes.TABLE_CELL_CONTAINER_TEXT),h.appendChild(c),i.transform&&typeof i.transform=="function"?Promise.resolve(i.transform(a[n])).then(d=>c.textContent=d):a[n]==null?c.textContent="":c.textContent=a[n].toString()}if(i.align&&r._setCellAlignmentClass(h,i.align),l.appendChild(h),k(i.columnSpan)){if(i.columnSpan==="all"){l.colSpan=a.length-n;break}else if(typeof i.columnSpan=="number"&&i.columnSpan>0){let c=i.columnSpan;i.columnSpan>a.length-n&&(c=a.length),l.colSpan=c,n=n+(c-1)}}typeof t.cellCreatedCallback=="function"&&t.cellCreatedCallback(l,o,n)}}static _setCellAlignmentClass(t,e){switch(e){case"center":t.classList.add(f.classes.TABLE_CELL_CENTER);break;case"right":t.classList.add(f.classes.TABLE_CELL_RIGHT);break}}static _getNonExpandedRows(t){return Array.from(t).filter(e=>!e.classList.contains(f.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _getExpandedRows(t){return Array.from(t).filter(e=>e.classList.contains(f.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _createColumnDataMap(t,e){return t.map(a=>({config:a,data:e.map(o=>{if(a.property){let n=y5(o.data,a.property);return k(n)?n:null}return null})}))}static _getOrderedRowData(t,e){let a=r._createColumnDataMap(t,e),o=[];for(let n of a)for(let i=0;i<n.data.length;i++)o[i]||(o[i]=[]),o[i].push(n.data[i]);return o}static _attachRowClickListeners(t,e,a){r._getNonExpandedRows(t.rows).forEach(n=>{n.addEventListener("click",e),a&&n.addEventListener("dblclick",a)})}static _addRowClickAttributes(t){r._getNonExpandedRows(t.rows).forEach(a=>{a.classList.add(f.classes.TABLE_BODY_ROW_CLICKABLE)})}static _removeRowClickAttributes(t){r._getNonExpandedRows(t.rows).forEach(a=>{a.classList.remove(f.classes.TABLE_BODY_ROW_CLICKABLE)})}static _attachRowSelectListeners(t,e){r._getNonExpandedRows(t.rows).forEach(o=>r._attachRowSelectListener(o,e))}static _attachRowSelectListener(t,e){let a=r._getCheckboxElement(t);a==null||a.addEventListener("click",e)}static _detachRowSelectListeners(t,e){Array.from(t.rows).forEach(a=>{let o=r._getCheckboxElement(a);o==null||o.removeEventListener("click",e)})}static _detachRowClickListeners(t,e,a){Array.from(t.rows).forEach(o=>{o.removeEventListener("click",e),o.removeEventListener("dblclick",a)})}static _attachSelectAllListener(t,e){let a=t.rows[t.rows.length-1],o=r._getCheckboxElement(a);if(!o)throw new Error("Checkbox element not found.");o.addEventListener("change",e)}static _tryAttachSelectAllTemplateListener(t,e){let a=t.rows[t.rows.length-1],o=r._tryGetSelectAllCheckboxElement(a);o&&o.addEventListener("change",e)}static _detachSelectAllListener(t,e){let a=t.rows[t.rows.length-1],o=r._tryGetSelectAllCheckboxElement(a);o&&o.removeEventListener("change",e)}static _attachHeadRowMouseDownListener(t,e){let a=t.rows[0];if(!a)throw new Error("Missing table header row. Unable to attach sort listener.");a.addEventListener("mousedown",e)}static _attachHeadRowContextMenuListener(t,e){let a=t.rows[0];if(!a)throw new Error("Missing table header row. Unable to attach sort listener.");a.addEventListener("contextmenu",e)}static _createSelectColumn(t,e,a,o,n,i,l,h,c){t&&r._createHeadSelectColumn(t,a,o,n,i,c),e&&r._createBodySelectColumn(e,i,l,h,c)}static _createHeadSelectColumn(t,e,a,o,n,i){var l;if(Array.from(t.rows).forEach(h=>{let c=document.createElement("th");y1([f.classes.TABLE_CELL,f.classes.TABLE_HEAD_CELL],c),h.insertBefore(c,h.cells.item(0))}),e){let h=(l=t.rows.item(t.rows.length-1))==null?void 0:l.cells.item(0);h.classList.add(f.classes.TABLE_CELL_SELECT),typeof a=="function"?r._renderSelectAllTemplate(a,t).then(()=>{typeof o=="function"&&o()}):h==null||h.appendChild(r._createCheckboxElement(!0,n,null,null,null,i))}}static _createBodySelectColumn(t,e,a,o,n){if(r._getNonExpandedRows(t.rows).forEach((l,h)=>r._addRowSelectColumn(l,e,h,a[h],o,n)),t.rows.length){let l=t.rows.item(0);l&&r._updateExpandedRowColspan(t.rows,l.cells.length)}}static _addRowSelectColumn(t,e,a,o,n,i){let l=t.insertCell(0);y1([f.classes.TABLE_CELL,f.classes.TABLE_BODY_CELL,f.classes.TABLE_CELL_SELECT],l),l.appendChild(r._createCheckboxElement(!1,e,a,o,n,i))}static _destroySelectColumn(t,e){let a=r._getNonExpandedRows(e.rows);if(Array.from(t.rows).forEach(o=>o.removeChild(o.cells.item(0))),Array.from(a).forEach(o=>o.removeChild(o.cells.item(0))),e.rows.length){let o=e.rows.item(0);o&&r._updateExpandedRowColspan(e.rows,o.cells.length)}}static _hasSelectColumn(t,e){return[...Array.from(t.rows),...Array.from(e.rows)].some(o=>o.cells.item(0).classList.contains(f.classes.TABLE_CELL_SELECT))}static _createCheckboxElement(t,e,a,o,n,i){let l=document.createElement("div");if(l.classList.add(f.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER),e)switch(e){case"center":l.classList.add(f.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER);break;case"left":l.classList.add(f.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT);break;case"right":l.classList.add(f.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT);break}let h=document.createElement(z1.elementName);h.setAttribute(f.attributes.SELECT_CHECKBOX,""),l.appendChild(h);let c=d=>{let u=document.createElement("forge-tooltip");return u.placement="left",u.type="label",u.textContent=d,u};if(t)if(typeof i=="string"&&i.length){let u=c(i);l.appendChild(u)}else h.setAttribute("aria-label","Select all rows");else{let d=n||"";if(o&&typeof n=="function"&&(d=n.call(null,a,o.data)),typeof d=="string"&&d.length){let u=c(d);l.appendChild(u)}else h.setAttribute("aria-label","Select row")}return l}static _getCheckboxElement(t){let e=t.querySelector(`.${f.classes.TABLE_CELL_SELECT}`);return e?e.querySelector(f.selectors.CHECKBOX_INPUT):null}static _tryGetSelectAllCheckboxElement(t){let e=t.querySelector(`.${f.classes.TABLE_CELL_SELECT}`);return e?e.querySelector(f.selectors.CHECKBOX_INPUT)||e.querySelector(f.selectors.SELECT_ALL_TEMPLATE_CHECKBOX_INPUT):null}static _setSelectedCheckboxState(t,e){t&&(t.checked=e)}static _setIndeterminateCheckboxState(t,e){t&&(t.indeterminate=e)}static _setRowSelectedState(t,e){e?t.classList.contains(f.classes.TABLE_BODY_ROW_SELECTED)||t.classList.add(f.classes.TABLE_BODY_ROW_SELECTED):t.classList.remove(f.classes.TABLE_BODY_ROW_SELECTED)}static _updateExpandedRowColspan(t,e){r._getExpandedRows(t).forEach(o=>{let n=o.cells.item(0);n&&(n.colSpan=e)})}static updateSelectedState(t,e){r._setRowSelectedState(t,e);let a=r._getCheckboxElement(t);a&&r._setSelectedCheckboxState(a,e)}static getRowByIndex(t,e){return r._getNonExpandedRows(t.tBodies[0].rows)[e]}static updateSelectAllState(t,e,a){if(!t.tHead)return;let o=t.tHead.rows[t.tHead.rows.length-1],n=r._tryGetSelectAllCheckboxElement(o);n&&(r._setSelectedCheckboxState(n,e),r._setIndeterminateCheckboxState(n,!!a))}static setSelectedRows(t,e,a,o,n=!1){if(!t.tBodies.length)return;n||r.clearSelectedRows(t);let i=t.tBodies[0].rows,l=0;o.length&&Array.from(i).forEach((h,c)=>{let d=a[c];if(Pr(o,ha(e,d))){r._setRowSelectedState(h,!0);let _=r._getCheckboxElement(h);_&&r._setSelectedCheckboxState(_,!0),l++}}),r.updateSelectAllState(t,l>0&&i.length===l)}static clearSelectedRows(t){if(!t.tBodies.length)return;r._getNonExpandedRows(t.tBodies[0].rows).forEach(a=>{r._setRowSelectedState(a,!1);let o=r._getCheckboxElement(a);o&&r._setSelectedCheckboxState(o,!1)})}static setSortedColumn(t,e,a){let o=r._getHeaderCellByIndex(t,e);r._getSortIconElementFromHeaderCell(o).classList.add(f.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),r._setColumnSortDirection(o,a)}static setMultiSortColumnSortNumber(t,e,a,o){let l=r._getHeaderCellByIndex(t,a).querySelector(`.${f.classes.TABLE_HEAD_CELL_CONTAINER}`).querySelector(`.${f.classes.TABLE_HEAD_CELL_SORT_ORDER}`);l&&(_2(l,typeof o!="number"||!e,f.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN),o&&(l.textContent=o.toString()))}static removeColumnSort(t,e){let a=r._getHeaderCellByIndex(t,e);a.removeAttribute("aria-sort"),a.classList.contains(f.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&a.classList.remove(f.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),a.classList.contains(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&a.classList.remove(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);let o=r._getSortIconElementFromHeaderCell(a);o&&o.classList.contains(f.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)&&o.classList.remove(f.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)}static _getHeaderCellByIndex(t,e){if(!t.tHead)throw new Error("Table head element cannot be null.");return t.tHead.rows.item(0).cells.item(e)}static _getSortIconElementFromHeaderCell(t){return t.querySelector(`.${f.classes.TABLE_HEAD_CELL_SORT_ICON}`)}static setSelectColumnVisibility(t,e,a,o,n,i,l,h,c){let d=t.tHead,u=t.tBodies[0];!d||!u||(e?r._addSelectColumn(d,u,a,o,n,i,l,h,c):r._hasSelectColumn(d,u)&&(a&&r._detachRowSelectListeners(u,a),o&&r._detachSelectAllListener(d,o),r._destroySelectColumn(d,u)))}static _addSelectColumn(t,e,a,o,n,i,l,h,c){r._createSelectColumn(t,e,!!o,n,()=>{o&&r._tryAttachSelectAllTemplateListener(t,o)},i,l,h,c),a&&r._attachRowSelectListeners(e,a),o&&!n&&r._tryAttachSelectAllTemplateListener(t,o)}static setDenseState(t,e){t.classList.contains(f.classes.TABLE_DENSE)&&t.classList.remove(f.classes.TABLE_DENSE),e&&t.classList.add(f.classes.TABLE_DENSE)}static setRoomyState(t,e){t.classList.contains(f.classes.TABLE_ROOMY)&&t.classList.remove(f.classes.TABLE_ROOMY),e&&t.classList.add(f.classes.TABLE_ROOMY)}static setResizable(t){let e=t.tableElement.tHead;t.resizable?(t.tableElement.classList.add(f.classes.TABLE_RESIZABLE),r._addResizeHandles(e,t)):(t.tableElement.classList.remove(f.classes.TABLE_RESIZABLE),r._removeResizeHandles(e,t))}static _addResizeHandles(t,e){if(!t)return;let a=t.rows.item(0);if(a){let o=Array.from(a.cells);e.selectListener&&(o=o.slice(1));for(let n of o){let i=o.indexOf(n);if(e.columnConfigurations[i].resizable!==!1){let h=document.createElement("div");h.classList.add(f.classes.TABLE_RESIZE_HANDLE),n.appendChild(h)}}}}static _removeResizeHandles(t,e){if(!t)return;let a=t.rows.item(0);if(a){let o=Array.from(a.cells);e.selectListener&&(o=o.slice(1));for(let n of o){let i=document.querySelector(`.${f.classes.TABLE_RESIZE_HANDLE}`);i&&n.removeChild(i)}}}static setWrapContentState(t,e){e?t.classList.remove(f.classes.TABLE_NO_WRAP_CONTENT):t.classList.add(f.classes.TABLE_NO_WRAP_CONTENT)}static setSelectAllVisibility(t,e,a,o,n,i){let l=t.tHead;if(!l)return;!e&&a&&r._detachSelectAllListener(l,a);let c=l.rows[l.rows.length-1].cells.item(0);e?c.childElementCount||(c.classList.add(f.classes.TABLE_CELL_SELECT),o?r._renderSelectAllTemplate(o,l).then(()=>{a&&r._tryAttachSelectAllTemplateListener(l,a)}):c.appendChild(r._createCheckboxElement(!0,n||null,null,null,null,i)),a&&!o&&r._attachSelectAllListener(l,a)):(a&&r._detachSelectAllListener(l,a),r2(c))}static setFilterRow(t){if(!t.tableElement.tHead)return;let e=r._getFilterRowElement(t.tableElement.tHead),a;if(t.filter?t.tableElement.classList.add(f.classes.TABLE_FILTER_VISIBLE):t.tableElement.classList.remove(f.classes.TABLE_FILTER_VISIBLE),t.filter&&!e){if(t.columnConfigurations.every(n=>!n.filter))return;t.selectListener&&t.selectAllListener&&(a=t.tableElement.tHead.rows[t.tableElement.tHead.rows.length-1].cells.item(0));let o=r._createFilterRowElement(t);o&&a&&Array.from(a.children).forEach(n=>{var i;(i=o.cells.item(0))==null||i.appendChild(n)})}else if(!t.filter&&e){if(t.selectListener&&t.selectAllListener){a=e.cells.item(0);let o=Array.from(t.tableElement.tHead.rows).indexOf(e)-1,n=t.tableElement.tHead.rows.item(o);n&&Array.from(a.children).forEach(i=>{var l;(l=n.cells.item(0))==null||l.appendChild(i)})}Te(e)}}static _createFilterRowElement(t){if(!t.tableElement.tHead)throw new Error("Table head element cannot be null.");let e=t.tableElement.tHead.insertRow();if(y1([f.classes.TABLE_ROW,f.classes.TABLE_HEAD_ROW_FILTER],e),t.selectListener){let a=document.createElement("th");y1([f.classes.TABLE_CELL,f.classes.TABLE_HEAD_CELL],a),e.insertBefore(a,e.cells[0]),a.classList.add(f.classes.TABLE_CELL_SELECT)}return t.columnConfigurations.forEach((a,o)=>{let n=document.createElement("th");if(y1([f.classes.TABLE_CELL,f.classes.TABLE_HEAD_CELL],n),a.filter&&k(a.filterDelegate)){let i=document.createElement("div");i.classList.add(f.classes.TABLE_HEAD_CELL_CONTAINER),a.align&&r._setCellAlignmentClass(i,a.align);let l=r._createFilterElement(a,o,t.filterListener);i.appendChild(l),n.appendChild(i)}e.appendChild(n)}),e}static _createFilterElement(t,e,a){let o;if(t0(t.filterDelegate))o=t.filterDelegate();else if(t.filterDelegate instanceof a2||t.filterDelegate instanceof X1)o=t.filterDelegate;else throw new Error("Invalid filter delegate.");if(a&&o instanceof a2&&t0(o.onChange))if(!k(t.filterDebounceTime)||z2(t.filterDebounceTime)){let n=k(t.filterDebounceTime)?t.filterDebounceTime:f.numbers.DEFAULT_FILTER_DEBOUNCE_TIME;o.onChange(Ae(i=>a(i,e),n))}else o.onChange(n=>a(n,e));return o.element}static _getFilterRowElement(t){if(t)return Array.from(t.rows).find(e=>e.classList.contains(f.classes.TABLE_HEAD_ROW_FILTER))}static async expandRow(t,e,a){let o=t.tableElement.tBodies[0],i=r._getNonExpandedRows(o.rows)[e];i.classList.add(f.classes.TABLE_ROW_EXPANDED);let l=Array.from(o.rows).indexOf(i),h=o.insertRow(l+1);y1([f.classes.TABLE_ROW,f.classes.TABLE_BODY_ROW,f.classes.TABLE_ROW_EXPANDABLE_CONTENT],h);let c=h.insertCell();c.setAttribute("colspan",i.cells.length.toString()),c.classList.add(f.classes.TABLE_ROW_EXPANDABLE_CONTENT_CELL);let d=document.createElement("div"),u=document.createElement(D1.elementName);u.appendChild(d),c.appendChild(u);let _=a;if(t0(a)){let L=t.data[e]?t.data[e].data:void 0,C=a(e,d,L);try{let A=await Promise.resolve(C);_=x6(A)?A.content:A}catch(A){console.error("Failed to load row template "+A.message),_=""}}_&&r._setRowTemplate(d,_),window.requestAnimationFrame(()=>u.open=!0)}static _setRowTemplate(t,e){Pt(e)?t.innerHTML=e:t.appendChild(e)}static collapseRow(t,e){if(!t.tableElement||!t.tableElement.tBodies.length||!t.tableElement.tBodies[0].rows.length)return Promise.resolve();let a=t.tableElement.tBodies[0],n=r._getNonExpandedRows(a.rows)[e],i=Array.from(a.rows).indexOf(n);if(n&&n.classList.contains(f.classes.TABLE_ROW_EXPANDED)){let l=a.rows[i+1],h=l.querySelector(D1.elementName);if(h&&h.open){let c=new Promise(d=>{h.addEventListener(D1.events.ANIMATION_COMPLETE,()=>{n.classList.remove(f.classes.TABLE_ROW_EXPANDED),Te(l),d()},{once:!0})});return h.open=!1,c}}return Promise.resolve()}static isRowExpanded(t,e){let a=t.tableElement.tBodies[0],n=r._getNonExpandedRows(a.rows)[e];return n&&n.classList.contains(f.classes.TABLE_ROW_EXPANDED)}static setFixedHeaders(t){t.fixedHeaders?t.tableElement.classList.add(f.classes.TABLE_FIXED):t.tableElement.classList.remove(f.classes.TABLE_FIXED)}static setLayoutType(t){t.layoutType==="fixed"?t.tableElement.classList.add(f.classes.TABLE_LAYOUT_FIXED):t.tableElement.classList.remove(f.classes.TABLE_LAYOUT_FIXED)}static normalizeColumnWidths(t){let e=t.tableElement;if(e.tHead&&e.tHead.rows.length){let a=Array.from(e.tHead.rows[0].cells);for(let o of a){let n=getComputedStyle(o).width;o.style.width&&o.style.width!==n&&(o.style.width=n)}}}static setColumnResizeIndicatorVisibility(t,e,a){let o=t.tableElement;if(o.tHead&&o.tHead.rows.length){let n=Array.from(o.tHead.rows);for(let i of n){let l=i.cells[e];l&&(a?l.classList.add(f.classes.TABLE_CELL_RESIZABLE):l.classList.remove(f.classes.TABLE_CELL_RESIZABLE))}}if(o.tBodies.length){let n=Array.from(o.tBodies[0].rows);for(let i of n){let l=i.cells[e];l&&(a?l.classList.add(f.classes.TABLE_CELL_RESIZABLE):l.classList.remove(f.classes.TABLE_CELL_RESIZABLE))}}}static setRowClickListeners(t,e,a,o){let n=t.tBodies[0];n&&(e?r._attachRowClickListeners(n,a,o):r._detachRowClickListeners(n,a,o))}static setRowClickAttributes(t,e){let a=t.tBodies[0];a&&(e?r._addRowClickAttributes(a):r._removeRowClickAttributes(a))}static getOwnerDocument(t){return t.ownerDocument||document}static _prepend(t,e){let a=e.childNodes.item(0);a?e.insertBefore(t,a):e.appendChild(t)}static _isMac(){return!!(navigator&&navigator.platform&&navigator.platform.substr(0,3)==="Mac")}static _renderSelectAllTemplate(t,e){return Promise.resolve(t()).then(a=>{let o=e.rows.item(e.rows.length-1);if(!o)return;let n=o.cells.item(0);a&&n&&(typeof a=="string"?n.innerHTML=a:a instanceof HTMLElement&&n.appendChild(a),n.setAttribute(f.attributes.CUSTOM_CELL_TEMPLATE,""))})}};var yl=class extends I{constructor(t){super(t)}initialize(){this._tableElement||(this._tableElement=document.createElement("table"),this._tableElement.classList.add(f.classes.TABLE),this._component.children.length&&r2(this._component),this._component.appendChild(this._tableElement))}getTableElement(){return this._tableElement||this.initialize(),this._tableElement}createTable(t){return C1.createTable(t)}recreateTableBody(t){C1.recreateTableBody(t)}setSelectedRows(t,e,a,o,n=!1){C1.setSelectedRows(t,e,a,o,n)}clearSelectedRows(t){C1.clearSelectedRows(t)}updateSelectedState(t,e){C1.updateSelectedState(t,e)}updateSelectAllState(t,e,a){C1.updateSelectAllState(t,e,a)}setSortedColumn(t,e,a){C1.setSortedColumn(t,e,a)}removeColumnSort(t,e){C1.removeColumnSort(t,e)}setSortDirection(t,e,a){C1.setSortDirection(t,e,a)}setSelectColumnVisibility(t,e,a,o,n,i,l,h,c){C1.setSelectColumnVisibility(t,e,a,o||null,n||null,i||null,l||[],h||null,c||null)}setDense(t,e){C1.setDenseState(t,e)}setRoomy(t,e){C1.setRoomyState(t,e)}setResizable(t){C1.setResizable(t)}setSelectAllVisibility(t,e,a,o,n,i=null){C1.setSelectAllVisibility(t,e,a,o,n||null,i||null)}setFilterRow(t){C1.setFilterRow(t)}expandRow(t,e,a){return C1.expandRow(t,e,a)}collapseRow(t,e){return C1.collapseRow(t,e)}isRowExpanded(t,e){return C1.isRowExpanded(t,e)}setFixedHeaders(t){C1.setFixedHeaders(t)}setTableLayoutType(t){C1.setLayoutType(t)}setWrapContentState(t){C1.setWrapContentState(t.tableElement,t.wrapContent)}addDocumentListener(t,e){C1.getOwnerDocument(this._component).addEventListener(t,e)}removeDocumentListener(t,e){C1.getOwnerDocument(this._component).removeEventListener(t,e)}normalizeColumnWidths(t){C1.normalizeColumnWidths(t)}setResizeColumnVisibility(t,e,a){C1.setColumnResizeIndicatorVisibility(t,e,a)}addTableClass(t){y1(t,this._tableElement)}removeTableClass(t){we(t,this._tableElement)}setRowClickListeners(t,e,a,o){C1.setRowClickListeners(t,e,a,o)}setRowClickAttributes(t,e){C1.setRowClickAttributes(t,e)}};var Ml=class{constructor(){this._sortedColumns=[]}get sortedColumns(){return[...this._sortedColumns.map(t=>w({},t))]}addSortColumn(t){this._sortedColumns.push(w({},t)),this._updateSortNumbers()}updateSortColumn(t){let e=this._sortedColumns.find(a=>a.columnIndex===t.columnIndex);if(e)switch(e.direction){case"ASC":this.removeSortColumn(t);break;case"DESC":e.direction="ASC";break;case"UNSET":e.direction="DESC";break}}setSortColumns(t){this._sortedColumns=[...t.map(e=>w({},e))]}removeSortColumn(t){typeof t=="number"?this._sortedColumns.splice(t,1):this._sortedColumns.splice(this._sortedColumns.indexOf(t),1),this._updateSortNumbers()}isSortColumn(t){return typeof t=="number"?this._sortedColumns.some(e=>e.columnIndex===t):this._sortedColumns.includes(t)}clearMultiSort(){this._sortedColumns=[]}getSortColumn(t){return this._sortedColumns.find(e=>e.columnIndex===t)}_updateSortNumbers(){this._sortedColumns.every(t=>typeof t.sortOrder=="number")&&this._sortedColumns.sort((t,e)=>t.sortOrder-e.sortOrder),this._sortedColumns.forEach((t,e)=>t.sortOrder=e+1)}};var Hl=class{constructor(t,e=!1){this.data=t;this.selected=e}};var Ll=class{constructor(t){this._adapter=t;this._tableRows=[];this._data=[];this._columnConfigurations=[];this._select=!1;this._multiselect=!0;this._dense=!1;this._roomy=!1;this._filter=!1;this._fixedHeaders=!1;this._layoutType=f.strings.DEFAULT_LAYOUT_TYPE;this._wrapContent=!0;this._resizable=!1;this._minResizeWidth=f.numbers.MIN_RESIZE_WIDTH;this._multiColumnSort=!1;this._selectCheckboxAlignment="center";this._isAllSelected=!1;this._sortedColumnIndex=-1;this._rendered=!1;this._allowRowClick=!1;this._multiSortManager=new Ml;this._rowClickListener=e=>this._onRowClick(e),this._rowDoubleClickListener=e=>this._onRowDoubleClick(e),this._selectRowListener=e=>this._onRowSelected(e),this._selectAllListener=e=>this._onSelectAll(e),this._sortableHeadCellKeydownListener=e=>this._onSortableHeadCellKeydown(e),this._headRowMouseDownListener=e=>this._onHeadRowMouseDown(e),this._headRowContextMenuListener=e=>this._onHeadRowContextMenu(e),this._documentMouseMoveListener=e=>this._onMouseMove(e),this._documentMouseUpListener=e=>this._onMouseUp(e),this._filterListener=(e,a)=>this._onFilter(e,a),this._selectionManager=new Ro(this._selectKey),this._hiddenColumnManager=new Ro}initialize(){this._adapter.initialize(),this._adapter.setHostAttribute(f.attributes.SELECT,this._select.toString()),this._adapter.setHostAttribute(f.attributes.MULTISELECT,this._multiselect.toString()),this._adapter.setHostAttribute(f.attributes.DENSE,this._dense.toString()),this._adapter.setHostAttribute(f.attributes.ROOMY,this._roomy.toString()),this._adapter.setHostAttribute(f.attributes.FILTER,this._filter.toString()),this._adapter.emitHostEvent(f.events.INITIALIZED,void 0,!1)}destroy(){this._resizeDescriptor=void 0,this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener)}set data(t){Array.isArray(t)&&t.length>0?nt(t[0])?this._data=t.map(e=>w({},e)):this._data=[...t]:this._data=[],this._tableRows=this._data.map(e=>new Hl(e,this._selectionManager.exists(e))),this._renderBody()}get data(){return this._data.map(t=>w({},t))}set columnConfigurations(t){this._columnConfigurations=t.map(e=>w({},e)),this._hiddenColumnManager.clear(),this._columnConfigurations.forEach(e=>{e.hidden&&this._hiddenColumnManager.add(e)}),this._refreshTableSort(),this.render()}get columnConfigurations(){return this._columnConfigurations.map(t=>w({},t))}get _visibleColumnConfigurations(){return this._columnConfigurations.filter(t=>!this._hiddenColumnManager.exists(t))}get _tableConfiguration(){return{tableElement:this._adapter.getTableElement(),columnConfigurations:this._visibleColumnConfigurations,data:this._tableRows,clickListener:this._allowRowClick?this._rowClickListener:null,doubleClickListener:this._allowRowClick?this._rowDoubleClickListener:null,selectListener:this._select?this._selectRowListener:null,selectAllListener:this._multiselect?this._selectAllListener:null,sortableHeadCellKeydownListener:this._sortableHeadCellKeydownListener,headRowMouseDownListener:this._headRowMouseDownListener,headRowContextMenuListener:this._headRowContextMenuListener,filterListener:this._filter?this._filterListener:null,sortDirection:this._sortDirection,sortedColumn:this._sortedColumnIndex,multiColumnSort:this._multiColumnSort,filter:this._filter,wrapContent:this._wrapContent,fixedHeaders:this._fixedHeaders,layoutType:this._layoutType,dense:this._dense,resizable:this._resizable,rowCreatedCallback:this._rowCreatedCallback,cellCreatedCallback:this._cellCreatedCallback,selectAllTemplate:this._selectAllTemplate,selectCheckboxAlignment:this._selectCheckboxAlignment,tooltipSelect:this._tooltipSelect,tooltipSelectAll:this._tooltipSelectAll}}set select(t){this._select!==t&&(this._select=t,this._adapter.setSelectColumnVisibility(this._adapter.getTableElement(),this._select,this._selectRowListener,this._multiselect?this._selectAllListener:void 0,this._multiselect?this._selectAllTemplate:null,this._selectCheckboxAlignment,this._tableRows,this._tooltipSelect,this._tooltipSelectAll),this._updateSelections(!0),this._select?this._adapter.setHostAttribute(f.attributes.SELECT,this._select.toString()):this._adapter.removeHostAttribute(f.attributes.SELECT))}get select(){return this._select}set multiselect(t){this._multiselect!==t&&(this._multiselect=t,this._select&&(this._adapter.setSelectAllVisibility(this._adapter.getTableElement(),this._multiselect,this._multiselect?this._selectAllListener:null,this._multiselect?this.selectAllTemplate:null,this._selectCheckboxAlignment,this._tooltipSelectAll),this._updateSelections(!0)),this._adapter.setHostAttribute(f.attributes.MULTISELECT,this._multiselect.toString()))}get multiselect(){return this._multiselect}get selectKey(){return Array.isArray(this._selectKey)?[...this._selectKey]:this._selectKey}set selectKey(t){this._originalSelectKey!==t&&(Array.isArray(t)?(this._originalSelectKey=[...t],this._selectKey=[...t]):(this._originalSelectKey=t,this._selectKey=[t]),this._selectionManager.setKey(this._selectKey),this._updateSelections(!1))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setDense(this._adapter.getTableElement(),this._dense),this._adapter.setHostAttribute(f.attributes.DENSE,this._dense.toString()))}get roomy(){return this._roomy}set roomy(t){t!==this._roomy&&(this._roomy=t,this._applyRoomy())}set filter(t){this._filter!==t&&(this._filter=t,this._adapter.setFilterRow(this._tableConfiguration),this._adapter.setHostAttribute(f.attributes.FILTER,this._filter.toString()))}get filter(){return this._filter}set fixedHeaders(t){this._fixedHeaders!==t&&(this._fixedHeaders=t,this._adapter.setFixedHeaders(this._tableConfiguration))}get fixedHeaders(){return this._fixedHeaders}get layoutType(){return this._layoutType}set layoutType(t){this._layoutType!==t&&(this._layoutType=t,this._adapter.setTableLayoutType(this._tableConfiguration))}get wrapContent(){return this._wrapContent}set wrapContent(t){this._wrapContent!==t&&(this._wrapContent=t,this._adapter.setWrapContentState(this._tableConfiguration))}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._adapter.setResizable(this._tableConfiguration))}get minResizeWidth(){return this._minResizeWidth}set minResizeWidth(t){this._minResizeWidth!==t&&(this._minResizeWidth=t,z2(this._minResizeWidth)?this._minResizeWidth<0&&(this._minResizeWidth=0):this._minResizeWidth=f.numbers.MIN_RESIZE_WIDTH)}get allowRowClick(){return this._allowRowClick}set allowRowClick(t){this._allowRowClick!==t&&(this._allowRowClick=t,this._rendered&&(this._adapter.setRowClickListeners(this._adapter.getTableElement(),this._allowRowClick,this._rowClickListener,this._rowDoubleClickListener),this._adapter.setRowClickAttributes(this._adapter.getTableElement(),this._allowRowClick)))}get multiColumnSort(){return this._multiColumnSort}set multiColumnSort(t){t!==this._multiColumnSort&&(this._multiColumnSort=t,this._refreshTableSort(),this.render())}get selectCheckboxAlignment(){return this._selectCheckboxAlignment}set selectCheckboxAlignment(t){t!==this._selectCheckboxAlignment&&(this._selectCheckboxAlignment=t,this._adapter.setHostAttribute(f.attributes.SELECT_CHECKBOX_ALIGNMENT,t),this.render())}get tooltipSelect(){return this._tooltipSelect}set tooltipSelect(t){t!==this._tooltipSelect&&(this._tooltipSelect=t,typeof t=="string"&&this._adapter.setHostAttribute(f.attributes.TOOLTIP_SELECT,t),this.render())}get tooltipSelectAll(){return this._tooltipSelectAll}set tooltipSelectAll(t){t!==this._tooltipSelectAll&&(this._tooltipSelectAll=t,this._adapter.setHostAttribute(f.attributes.TOOLTIP_SELECT_ALL,t),this.render())}get selectAllTemplate(){return this._selectAllTemplate}set selectAllTemplate(t){t!==this._selectAllTemplate&&(this._selectAllTemplate=t,this.render())}get rowCreated(){return this._rowCreatedCallback}set rowCreated(t){this._rowCreatedCallback=t}get cellCreated(){return this._cellCreatedCallback}set cellCreated(t){this._cellCreatedCallback=t}isRowSelected(t){let e=ha(Array.isArray(this._selectKey)?this._selectKey:[this._selectKey],t);return this.selectKey?!!this._selectionManager.getItems().find(a=>Nr(a,e)):this._selectionManager.exists(t)}getSelectedRows(){return this._selectionManager.getItems()}selectRows(t,e){if(!this._selectKey)throw new Error("You must set a selectKey to select rows.");(!this._multiselect||e)&&this.clearSelections(),t&&t.length&&(this._selectionManager.add(t),this._updateSelections(!e))}deselectRows(t){t&&t.length&&(this._selectionManager.remove(t),this._updateSelections(!1))}clearSelections(){let t=this._adapter.getTableElement();this._selectionManager.clear(),this._tableRows.forEach(e=>e.selected=!1),this._isAllSelected=!1,this._adapter.clearSelectedRows(t),this._select&&this._multiselect&&this._adapter.updateSelectAllState(t,!1)}hideColumn(t){let e=this._columnConfigurations[t];this._sortedColumnIndex===t&&(this._sortedColumnIndex=-1),this._hiddenColumnManager.exists(e)||(this._hiddenColumnManager.add(e),this.render())}showColumn(t){let e=this._columnConfigurations[t];this._hiddenColumnManager.exists(e)&&(this._hiddenColumnManager.remove(e),this.render())}isColumnHidden(t){let e=this._columnConfigurations[t];return!!e&&this._hiddenColumnManager.exists(e)}render(){this._adapter.createTable(this._tableConfiguration),this._renderSelections(),this._rendered=!0}_renderBody(){this._rendered&&(this._adapter.recreateTableBody(this._tableConfiguration),this._renderSelections())}_renderSelections(){this.select&&(this._isAllSelected=this._getSelectAllState(),this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)));let t=this._selectionManager.getItems();t.length&&this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,t,!1)}expandRow(t,e){if(!this._rendered)throw new Error("Cannot expand a row before the table has rendered.");if(t<0||t>this._tableRows.length)throw new Error(`Invalid row index: ${t}.`);return this._adapter.expandRow(this._tableConfiguration,t,e)}collapseRow(t){return!this._rendered||t<0||t>this._tableRows.length?Promise.resolve():this._adapter.collapseRow(this._tableConfiguration,t)}isRowExpanded(t){return this._adapter.isRowExpanded(this._tableConfiguration,t)}selectRowsByIndex(t,e){let a=t.map(o=>this._data[o]).filter(o=>!!o);this.selectRows(a,!e)}deselectRowsByIndex(t){let e=t.map(a=>this._data[a]).filter(a=>!!a);this.deselectRows(e)}_getSelectAllState(){return this._tableRows.length>0&&this._tableRows.every(t=>t.selected)}_updateSelections(t){this._tableRows.forEach(a=>a.selected=this._selectionManager.exists(a.data));let e=this._getSelectAllState();this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,this._selectionManager.getItems(),t),(e!==this._isAllSelected||this._isIndeterminate(e))&&(this._isAllSelected=e,this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)))}_onRowClick(t){if(t.stopImmediatePropagation(),t.target.matches(`[${f.attributes.SELECT_CHECKBOX}]`))return;let o=L2(t).filter(c=>c.nodeType===1).find(c=>c.hasAttribute(f.attributes.CUSTOM_CELL_TEMPLATE));if(o&&o.hasAttribute(f.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION))return;let{index:i,data:l}=this._getSelectedRowFromEvent(t),h={index:i,data:l};this._adapter.emitHostEvent(f.events.ROW_CLICK,h,!0,!1)}_onRowDoubleClick(t){if(t.stopPropagation(),t.target.matches(`[${f.attributes.SELECT_CHECKBOX}]`))return;let e=this._getSelectedRowFromEvent(t),a={index:e.index,data:e.data};this._adapter.emitHostEvent(f.events.SELECT_DOUBLE,a,!0,!1)}_onRowSelected(t){let e=this._getSelectedRowFromEvent(t);this._multiselect||this._tableRows.filter(l=>l.selected).forEach(l=>{Nr(l.data,ha(this._selectKey,e.data))||this.deselectRows([l.data])});let a=!this._selectionManager.exists(e.data);this._adapter.updateSelectedState(e.rowElement,a),a?this._selectionManager.add(e.data):this._selectionManager.remove(e.data),this._tableRows[e.index].selected=a;let o=[e.index],n=!1;if(this._multiselect){if(t.shiftKey&&this._previouslyClickedRow&&(o=this._shiftSelectRows(e),o.includes(this._previouslyClickedRow.index))){let l=o.indexOf(this._previouslyClickedRow.index);o.splice(l,1)}n=this._getSelectAllState(),this._adapter.updateSelectAllState(this._adapter.getTableElement(),n,this._isIndeterminate(n))}for(let i of o){let l=this._tableRows[i].data,c={selected:this._selectionManager.exists(l),index:i,data:l};this._adapter.emitHostEvent(f.events.SELECT,c,!0,!1)}if(this._isAllSelected!==n){this._isAllSelected=n;let i={status:this._isAllSelected,count:this._tableRows.filter(l=>l.selected).length,data:[...this._data],targetType:"row"};this._adapter.emitHostEvent(f.events.SELECT_ALL,i,!0,!1)}this._previouslyClickedRow=w({},e)}_getSelectedRowFromEvent(t){let a=L2(t).find(l=>l.tagName==="TR"),o=a.parentElement,n=this._getNonExpandedRows(o).findIndex(l=>l===a),i=this._tableRows[n].data;return{rowElement:a,index:n,data:i}}_getNonExpandedRows(t){return Array.from(t.rows).filter(e=>!e.classList.contains(f.classes.TABLE_ROW_EXPANDABLE_CONTENT))}_onSelectAll(t){t.stopPropagation(),this._isAllSelected=!this._isAllSelected;let e=this._adapter.getTableElement();this._adapter.updateSelectAllState(e,this._isAllSelected),this._tableRows.forEach((o,n)=>{o.selected=this._isAllSelected,this._isAllSelected?this._selectionManager.add(o.data):this._selectionManager.remove(o.data);let i=C1.getRowByIndex(e,n);i&&this._adapter.updateSelectedState(i,this._isAllSelected)});let a={status:this._isAllSelected,count:this._tableRows.filter(o=>o.selected).length,data:[...this._data],targetType:"select-all"};this._adapter.emitHostEvent(f.events.SELECT_ALL,a,!0,!1)}_onHeadRowContextMenu(t){t.ctrlKey&&t.preventDefault()}_onHeadRowMouseDown(t){if(t.button!==0)return;let e=L2(t),a=t.target,o=e.find(l=>l.tagName==="TR"),n=e.find(l=>l.tagName==="TH"),i=Array.from(o.cells).findIndex(l=>l===n);this._headCellMouseDownIndex=i,a!==n&&a.classList.contains(f.classes.TABLE_RESIZE_HANDLE)&&(this._resizeDescriptor={element:n,startWidth:n.offsetWidth,startX:t.pageX,width:n.offsetWidth,index:this._select?i-1:i},this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.setResizeColumnVisibility(this._tableConfiguration,i,!0)),this._adapter.addDocumentListener("mouseup",this._documentMouseUpListener)}_onMouseMove(t){if(this._resizeDescriptor){let e=this._resizeDescriptor.startWidth+(t.pageX-this._resizeDescriptor.startX);e<this._minResizeWidth&&(e=this._minResizeWidth),this._resizeDescriptor.width=e,this._resizeDescriptor.element.style.width=`${e}px`,this._adapter.addTableClass(f.classes.TABLE_RESIZING)}}_onMouseUp(t){if(this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener),this._adapter.removeTableClass(f.classes.TABLE_RESIZING),this._headCellMouseDownIndex!==void 0){if(this._resizeDescriptor){this._adapter.normalizeColumnWidths(this._tableConfiguration),this._adapter.setResizeColumnVisibility(this._tableConfiguration,this._headCellMouseDownIndex,!1);let e={index:this._resizeDescriptor.index,width:this._resizeDescriptor.width};this._adapter.emitHostEvent(f.events.COLUMN_RESIZE,e),this._resizeDescriptor=void 0}else this._tableConfiguration.tableElement.tHead.contains(t.target)&&(this._multiColumnSort?this._onMultiSort(this._headCellMouseDownIndex,t.ctrlKey):this._onSort(this._headCellMouseDownIndex));this._headCellMouseDownIndex=void 0}}_onSortableHeadCellKeydown(t){if(t.key===" "||t.key==="Enter"){let e=L2(t),a=e.find(i=>i.tagName==="TR"),o=e.find(i=>i.tagName==="TH"),n=Array.from(a.cells).findIndex(i=>i===o);this._onSort(n)}}_onSort(t){let e=this._select?t-1:t,a=e>=0?this._visibleColumnConfigurations[e]:null;if(!a||!a.sortable)return;let o="ASC",n=e===this._sortedColumnIndex,i=this._sortDirection==="ASC"||this._sortDirection===void 0,l=n&&this._sortDirection==="DESC";n&&i&&(o="DESC"),l&&!a.preventUnsort&&(o="UNSET");let h={direction:o,columnIndex:e};if(this._adapter.emitHostEvent(f.events.SORT,h,!0,!0)){if(n&&this._sortDirection==="DESC"&&!a.preventUnsort){this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=-1;return}this._sortDirection=o,e===this._sortedColumnIndex?this._adapter.setSortDirection(this._adapter.getTableElement(),t,this._sortDirection):(this._sortedColumnIndex>=0&&this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=e,this._adapter.setSortedColumn(this._adapter.getTableElement(),t,this._sortDirection))}}_onMultiSort(t,e){let a=this._select?t-1:t,o=a>=0?this._visibleColumnConfigurations[a]:null;if(!o||!o.sortable)return;let n=this._multiSortManager.sortedColumns,i=this._multiSortManager.getSortColumn(a);i?this._multiSortManager.updateSortColumn(i):e?this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:a,propertyName:o.property}):(this._multiSortManager.clearMultiSort(),this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:a,propertyName:o.property}));let l=this._multiSortManager.sortedColumns.map(d=>w({},d));if(!this._adapter.emitHostEvent(f.events.SORT,l,!0,!0)){this._multiSortManager.setSortColumns(n);return}let c=this._multiSortManager.sortedColumns.length>1;for(let d=0;d<this._visibleColumnConfigurations.length;d++){let u=this._select?d+1:d;if(!this._multiSortManager.isSortColumn(d))this._adapter.removeColumnSort(this._adapter.getTableElement(),u),C1.setMultiSortColumnSortNumber(this._adapter.getTableElement(),c,u,null);else{let _=this._multiSortManager.getSortColumn(d);_&&(this._adapter.setSortedColumn(this._adapter.getTableElement(),u,_.direction),C1.setMultiSortColumnSortNumber(this._adapter.getTableElement(),c,u,_.sortOrder||null))}}}_onFilter(t,e){let a={value:t,columnIndex:e};this._adapter.emitHostEvent(f.events.FILTER,a,!0,!1)}_shiftSelectRows(t){let e=[];if(this._previouslyClickedRow){let a=this._previouslyClickedRow.index,o=t.index,n=o>=a?a:o,i=o>=a?o:a;i+=i>n?1:0,n+=n>i?1:0;let l=d=>this.selectRows(d,!1),h=this._tableRows.find(d=>d.selected&&d.data===t.data),c=this._tableRows.find(d=>{var u;return d.data===((u=this._previouslyClickedRow)==null?void 0:u.data)&&!d.selected});(!h||c)&&(l=d=>this.deselectRows(d));for(let d=n;d<i;d++)e.push(d);l(this.data.filter((d,u)=>e.includes(u)))}return e}_isIndeterminate(t){return!t&&this.getSelectedRows().length>0&&this._data.length!==this.getSelectedRows().length}_applyRoomy(){this._adapter.setRoomy(this._adapter.getTableElement(),this._roomy),this._adapter.setHostAttribute(f.attributes.ROOMY,this._roomy.toString())}_refreshTableSort(){if(this._sortedColumnIndex=this._visibleColumnConfigurations.findIndex(t=>t.initialSort),this._sortedColumnIndex>=0&&this._sortDirection===void 0){let t=this._visibleColumnConfigurations[this._sortedColumnIndex];t.initialSort===!0&&t.sortDirection?this._sortDirection=t.sortDirection:typeof t.initialSort=="object"&&t.initialSort.direction&&(this._sortDirection=t.initialSort.direction)}if(this._multiColumnSort){let t=[];this._visibleColumnConfigurations.forEach((e,a)=>{typeof e.initialSort=="object"&&t.push({columnIndex:a,direction:e.initialSort.direction,sortOrder:e.initialSort.sortOrder,propertyName:e.property})}),this._multiSortManager.setSortColumns(t)}}};var q1=class extends M{static get observedAttributes(){return[f.attributes.SELECT,f.attributes.MULTISELECT,f.attributes.SELECT_KEY,f.attributes.DENSE,f.attributes.ROOMY,f.attributes.FILTER,f.attributes.FIXED_HEADERS,f.attributes.LAYOUT_TYPE,f.attributes.WRAP_CONTENT,f.attributes.RESIZABLE,f.attributes.MIN_RESIZE_WIDTH,f.attributes.ALLOW_ROW_CLICK,f.attributes.MULTI_COLUMN_SORT,f.attributes.SELECT_CHECKBOX_ALIGNMENT,f.attributes.TOOLTIP_SELECT,f.attributes.TOOLTIP_SELECT_ALL]}constructor(){super(),q.define(K5),this._core=new Ll(new yl(this))}initializedCallback(){this._core.initialize()}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case f.attributes.SELECT:this.select=p(a);break;case f.attributes.MULTISELECT:this.multiselect=p(a);break;case f.attributes.SELECT_KEY:this.selectKey=a;break;case f.attributes.DENSE:this.dense=p(a);break;case f.attributes.ROOMY:this.roomy=p(a);break;case f.attributes.FILTER:this.filter=p(a);break;case f.attributes.FIXED_HEADERS:this.fixedHeaders=p(a);break;case f.attributes.LAYOUT_TYPE:this.layoutType=a;break;case f.attributes.WRAP_CONTENT:this.wrapContent=p(a);break;case f.attributes.RESIZABLE:this.resizable=p(a);break;case f.attributes.MIN_RESIZE_WIDTH:this.minResizeWidth=W(a);break;case f.attributes.ALLOW_ROW_CLICK:this.allowRowClick=p(a);break;case f.attributes.MULTI_COLUMN_SORT:this.multiColumnSort=p(a);break;case f.attributes.SELECT_CHECKBOX_ALIGNMENT:this.selectCheckboxAlignment=this.getAttribute(f.attributes.SELECT_CHECKBOX_ALIGNMENT)||"center";break;case f.attributes.TOOLTIP_SELECT:this.tooltipSelect=a;break;case f.attributes.TOOLTIP_SELECT_ALL:this.tooltipSelectAll=a;break}}hideColumn(t){this._core.hideColumn(t)}showColumn(t){this._core.showColumn(t)}isColumnHidden(t){return this._core.isColumnHidden(t)}getSelectedRows(){return this._core.getSelectedRows()}selectRow(t){this._core.selectRows([t],!1)}selectRows(t,e=!1){this._core.selectRows(t,!e)}deselectRow(t){this._core.deselectRows([t])}deselectRows(t){this._core.deselectRows(t)}clearSelections(){this._core.clearSelections()}render(){this._core.render()}expandRow(t,e){return this._core.expandRow(t,e)}collapseRow(t){return this._core.collapseRow(t)}isRowExpanded(t){return this._core.isRowExpanded(t)}selectRowsByIndex(t,e){typeof t=="number"?this._core.selectRowsByIndex([t],e):Array.isArray(t)&&this._core.selectRowsByIndex(t,e)}deselectRowsByIndex(t){typeof t=="number"?this._core.deselectRowsByIndex([t]):Array.isArray(t)&&this._core.deselectRowsByIndex(t)}isRowSelected(t){return this._core.isRowSelected(t)}};s([v()],q1.prototype,"data",2),s([v()],q1.prototype,"columnConfigurations",2),s([v()],q1.prototype,"select",2),s([v()],q1.prototype,"multiselect",2),s([v()],q1.prototype,"selectKey",2),s([v()],q1.prototype,"tooltipSelect",2),s([v()],q1.prototype,"tooltipSelectAll",2),s([v()],q1.prototype,"dense",2),s([v()],q1.prototype,"roomy",2),s([v()],q1.prototype,"filter",2),s([v()],q1.prototype,"fixedHeaders",2),s([v()],q1.prototype,"layoutType",2),s([v()],q1.prototype,"wrapContent",2),s([v()],q1.prototype,"resizable",2),s([v()],q1.prototype,"minResizeWidth",2),s([v()],q1.prototype,"allowRowClick",2),s([v()],q1.prototype,"multiColumnSort",2),s([v()],q1.prototype,"rowCreated",2),s([v()],q1.prototype,"cellCreated",2),s([v()],q1.prototype,"selectAllTemplate",2),s([v()],q1.prototype,"selectCheckboxAlignment",2),q1=s([y({name:f.elementName,dependencies:[_t,X,J2,p1]})],q1);function b6(){x(q1)}var y6=`${b}tab-bar`,M6={DISABLED:"disabled",ACTIVE_TAB:"active-tab",VERTICAL:"vertical",STACKED:"stacked",CLUSTERED:"clustered",SECONDARY:"secondary",INVERTED:"inverted",AUTO_ACTIVATE:"auto-activate",SCROLL_BUTTONS:"scroll-buttons"},Xx=w({},M6),jx={ROOT:".forge-tab-bar",SCROLL_CONTAINER:".scroll-container",DEFAULT_SLOT:"slot:not([name])"},Zx={SCROLL_BUTTON:"scroll-button"},Qx={CHANGE:`${y6}-change`},Jx={SCROLL_MARGIN:48},T1={elementName:y6,observedAttributes:M6,attributes:Xx,events:Qx,selectors:jx,classes:Zx,numbers:Jx},i5=new Map([["default",new Set(["Home","End"])],["horizontal",new Set(["ArrowLeft","ArrowRight"])],["vertical",new Set(["ArrowUp","ArrowDown"])]]);var H6=`${b}tab`,L6={DISABLED:"disabled",SELECTED:"selected",VERTICAL:"vertical",STACKED:"stacked",SECONDARY:"secondary",INVERTED:"inverted"},tb=w({},L6),eb={INDICATOR:".indicator"},ab={},ob={SELECT:`${H6}-select`},rb={EASING:"cubic-bezier(0.4, 0, 0.2, 1)"},nb={ANIMATION_DURATION:250},F1={elementName:H6,observedAttributes:L6,attributes:tb,selectors:eb,classes:ab,events:ob,strings:rb,numbers:nb};var Il=class extends I{constructor(t){super(t),this._tabIndicatorElement=g(this._component,F1.selectors.INDICATOR),this._focusIndicatorElement=g(this._component,m1.elementName),this._stateLayerElement=g(this._component,M1.elementName)}initialize(){this._component.tabIndex=this._component.selected?0:-1,this._component.setAttribute("role","tab"),this._component.setAttribute("aria-selected",this._component.selected?"true":"false")}activateFocusIndicator(){this._focusIndicatorElement.active=!0}addInteractionListener(t,e){this._component.addEventListener(t,e)}setDisabled(t){this._stateLayerElement.disabled=t,this._component.tabIndex=t?-1:this._component.selected?0:-1,this._component.setAttribute("aria-disabled",String(t)),K(this._component,t,F1.attributes.DISABLED,String(t))}setSelected(t){this._component.tabIndex=t?0:-1,this._component.setAttribute("aria-selected",String(t))}animateSelected(){this._tabIndicatorElement.getAnimations().forEach(e=>e.cancel());let t=this._getKeyframes();t&&this._tabIndicatorElement.animate(t,{duration:F1.numbers.ANIMATION_DURATION,easing:F1.strings.EASING})}animateStateLayer(){this._stateLayerElement.playAnimation()}_getKeyframes(){var L;let t=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!this._component.selected)return t?[{opacity:1},{transform:"none"}]:null;let e={},a=this._component.vertical,o=this._getSelectedTabIndicator(),n=(L=o==null?void 0:o.getBoundingClientRect())!=null?L:{},i=a?n.top:n.left,l=a?n.height:n.width,h=this._tabIndicatorElement.getBoundingClientRect(),c=a?h.top:h.left,d=a?h.height:h.width,u=a?"Y":"X",_=l/d;return!t&&i!==void 0&&c!==void 0&&!isNaN(_)?e.transform=`translate${u}(${(i-c).toFixed(4)}px) scale${u}(${_.toFixed(4)})`:e.opacity=0,[e,{transform:"none"}]}_getSelectedTabIndicator(){let t=M5(this._component,T1.elementName);if(t){let a=Array.from(t.querySelectorAll(F1.elementName)).find(o=>o.hasAttribute(F1.attributes.SELECTED));if(a)return g(a,F1.selectors.INDICATOR)}return null}};var Vl=class{constructor(t){this._adapter=t;this._selected=!1;this._disabled=!1;this._vertical=!1;this._stacked=!1;this._secondary=!1;this._inverted=!1;this._clickListener=()=>this._onClick(),this._keydownListener=e=>this._onKeydown(e)}initialize(){this._adapter.initialize(),this._adapter.addInteractionListener("click",this._clickListener),this._adapter.addInteractionListener("keydown",this._keydownListener)}setFocus(t){t!=null&&t.focusVisible&&this._adapter.activateFocusIndicator()}_onClick(){this._disabled||this._selected||this._dispatchSelectEvent()}_onKeydown(t){if(this._disabled||this._selected)return;(t.key===" "||t.key==="Enter")&&(t.preventDefault(),this._adapter.animateStateLayer(),this._dispatchSelectEvent())}_dispatchSelectEvent(){this._adapter.dispatchHostEvent(new CustomEvent(F1.events.SELECT,{bubbles:!0,composed:!0}))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(F1.attributes.DISABLED,this._disabled))}get selected(){return this._selected}set selected(t){this._selected!==t&&(this._selected=t,this._adapter.setSelected(this._selected),this._adapter.animateSelected(),this._adapter.toggleHostAttribute(F1.attributes.SELECTED,this._selected))}get vertical(){return this._vertical}set vertical(t){this._vertical!==t&&(this._vertical=t,this._adapter.toggleHostAttribute(F1.attributes.VERTICAL,this._vertical))}get stacked(){return this._stacked}set stacked(t){this._stacked!==t&&(this._stacked=t,this._adapter.toggleHostAttribute(F1.attributes.STACKED,this._stacked))}get secondary(){return this._secondary}set secondary(t){this._secondary!==t&&(this._secondary=t,this._adapter.toggleHostAttribute(F1.attributes.SECONDARY,this._secondary))}get inverted(){return this._inverted}set inverted(t){this._inverted!==t&&(this._inverted=t,this._adapter.toggleHostAttribute(F1.attributes.INVERTED,this._inverted))}};var ib='<template><div class="forge-tab" part="container"><span class="content" part="content"><slot name="start"><slot name="leading"></slot></slot><span class="label" part="label"><slot></slot></span><slot name="end"><slot name="trailing"></slot></slot><span class="indicator" part="indicator"></span></span><forge-state-layer exportparts="surface:state-layer" target=":host"></forge-state-layer><forge-focus-indicator part="focus-indicator" target=":host" inward></forge-focus-indicator></div></template>',sb=':host{display:inline-flex;outline:0;-webkit-tap-highlight-color:transparent;vertical-align:middle}:host([hidden]){display:none}.forge-tab{--_tab-active-color:var(--forge-tab-active-color, var(--forge-theme-primary, #3f51b5));--_tab-inactive-color:var(--forge-tab-inactive-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_tab-height:var(--forge-tab-height, 48px);--_tab-stacked-height:var(--forge-tab-stacked-height, 64px);--_tab-padding-block:var(--forge-tab-padding-block, 0);--_tab-padding-inline:var(--forge-tab-padding-inline, 0);--_tab-disabled-opacity:var(--forge-tab-disabled-opacity, 0.38);--_tab-indicator-color:var(--forge-tab-indicator-color, var(--_tab-active-color));--_tab-indicator-height:var(--forge-tab-indicator-height, 3px);--_tab-indicator-shape:var(--forge-tab-indicator-shape, 3px 3px 0 0);--_tab-vertical-indicator-shape:var(--forge-tab-vertical-indicator-shape, 3px 0 0 3px);--_tab-secondary-indicator-height:var(--forge-tab-secondary-indicator-height, 2px);--_tab-secondary-indicator-shape:var(--forge-tab-secondary-indicator-shape, 0);--_tab-inverted-indicator-shape:var(--forge-tab-inverted-indicator-shape, 0 0 3px 3px);--_tab-vertical-inverted-indicator-shape:var(--forge-tab-vertical-inverted-indicator-shape, 0 3px 3px 0);--_tab-container-color:var(--forge-tab-container-color, transparent);--_tab-container-height:var(--forge-tab-container-height, var(--_tab-height));--_tab-container-shape:var(--forge-tab-container-shape, 0);--_tab-content-height:var(--forge-tab-content-height, var(--_tab-height));--_tab-content-spacing:var(--forge-tab-content-spacing, var(--forge-spacing-xsmall, 8px));--_tab-content-padding:var(--forge-tab-content-padding, var(--forge-spacing-xxsmall, 4px));--_tab-content-padding-block:var(--forge-tab-content-padding-block, var(--_tab-content-padding));--_tab-content-padding-inline:var(--forge-tab-content-padding-inline, var(--forge-spacing-medium, 16px));--_tab-content-padding-inline-secondary:var(--forge-tab-content-padding-inline-secondary, var(--forge-spacing-medium, 16px));--_tab-active-focus-icon-color:var(--forge-tab-active-focus-icon-color, var(--_tab-active-color));--_tab-active-hover-icon-color:var(--forge-tab-active-hover-icon-color, var(--_tab-active-color));--_tab-active-icon-color:var(--forge-tab-active-icon-color, var(--_tab-active-color));--_tab-active-pressed-icon-color:var(--forge-tab-active-pressed-icon-color, var(--_tab-active-color));--_tab-icon-size:var(--forge-tab-icon-size, 24px);--_tab-focus-icon-color:var(--forge-tab-focus-icon-color, var(--_tab-inactive-color));--_tab-hover-icon-color:var(--forge-tab-hover-icon-color, var(--_tab-inactive-color));--_tab-icon-color:var(--forge-tab-icon-color, var(--_tab-inactive-color));--_tab-pressed-icon-color:var(--forge-tab-pressed-icon-color, var(--_tab-inactive-color));--_tab-active-focus-label-text-color:var(--forge-tab-active-focus-label-text-color, var(--_tab-active-color));--_tab-active-hover-label-text-color:var(--forge-tab-active-hover-label-text-color, var(--_tab-active-color));--_tab-active-label-text-color:var(--forge-tab-active-label-text-color, var(--_tab-active-color));--_tab-active-pressed-label-text-color:var(--forge-tab-active-pressed-label-text-color, var(--_tab-active-color));--_tab-focus-label-text-color:var(--forge-tab-focus-label-text-color, var(--_tab-inactive-color));--_tab-hover-label-text-color:var(--forge-tab-hover-label-text-color, var(--_tab-inactive-color));--_tab-label-text-color:var(--forge-tab-label-text-color, var(--_tab-inactive-color));--_tab-pressed-label-text-color:var(--forge-tab-pressed-label-text-color, var(--_tab-inactive-color))}.forge-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;background:0 0;text-decoration:none;width:100%;position:relative;padding-block:var(--_tab-padding-block);padding-inline:var(--_tab-padding-inline);margin:0;z-index:0;background-color:var(--_tab-container-color);color:var(--_tab-label-text-color);min-height:var(--_tab-container-height)}.forge-tab::-moz-focus-inner{padding:0;border:0}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=trailing]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_tab-icon-color);font-size:var(--_tab-icon-size);width:var(--_tab-icon-size);height:var(--_tab-icon-size)}.forge-tab:hover{color:var(--_tab-hover-label-text-color);cursor:pointer}.forge-tab:hover ::slotted([slot=leading]),.forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-hover-icon-color)}.forge-tab .content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;white-space:nowrap;transition:150ms color linear;max-height:calc(var(--_tab-content-height) + 2 * var(--_tab-content-padding-block));min-height:var(--_tab-content-height);width:100%;padding-block:var(--_tab-content-padding-block);padding-inline:var(--_tab-content-padding-inline);gap:var(--_tab-content-spacing)}.forge-tab .content .label{display:inline-block;line-height:1}.forge-tab .indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_tab-indicator-color);border-radius:var(--_tab-indicator-shape);height:var(--_tab-indicator-height);min-width:100%;inset:auto 0 0;opacity:0}::slotted(*),:host{white-space:nowrap}forge-focus-indicator{--forge-focus-indicator-color:var(--_tab-active-color);--forge-focus-indicator-shape:8px}forge-state-layer{--forge-state-layer-color:var(--_tab-inactive-color)}:host(:focus) .forge-tab{color:var(--_tab-focus-label-text-color)}:host(:focus) .forge-tab ::slotted([slot=leading]),:host(:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-focus-icon-color)}:host(:active) .forge-tab{color:var(--_tab-pressed-label-text-color);outline:0}:host(:active) .forge-tab ::slotted([slot=leading]),:host(:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-pressed-icon-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .forge-tab{opacity:var(--_tab-disabled-opacity);pointer-events:none}:host([selected]) .forge-tab{color:var(--_tab-active-label-text-color)}:host([selected]) .forge-tab ::slotted([slot=end]),:host([selected]) .forge-tab ::slotted([slot=leading]),:host([selected]) .forge-tab ::slotted([slot=start]),:host([selected]) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-icon-color)}:host([selected]) .forge-tab:hover{color:var(--_tab-active-hover-label-text-color)}:host([selected]) .forge-tab:hover ::slotted([slot=end]),:host([selected]) .forge-tab:hover ::slotted([slot=leading]),:host([selected]) .forge-tab:hover ::slotted([slot=start]),:host([selected]) .forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-active-hover-icon-color)}:host([selected]) .forge-tab .indicator{opacity:1}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_tab-active-color)}:host([selected]:not([vertical])) forge-focus-indicator{--forge-focus-indicator-offset-block:0 calc(var(--_tab-indicator-height) + 1px)}:host([selected]:focus) .forge-tab{color:var(--_tab-active-focus-label-text-color)}:host([selected]:focus) .forge-tab ::slotted([slot=leading]),:host([selected]:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-focus-icon-color)}:host([selected]:active) .forge-tab{color:var(--_tab-active-pressed-label-text-color)}:host([selected]:active) .forge-tab ::slotted([slot=leading]),:host([selected]:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-pressed-icon-color)}:host([stacked]) .forge-tab{--_tab-height:var(--_tab-stacked-height)}:host([stacked]) .forge-tab .content{max-height:none;flex-direction:column;height:100%}:host([vertical]) .forge-tab{--_tab-padding-inline:var(--forge-tab-padding-inline, 0);width:100%;flex-direction:row;border-bottom:none}:host([vertical]) .forge-tab .content{width:100%;min-height:100%}:host([vertical]) .forge-tab .indicator{height:100%;min-width:var(--_tab-indicator-height);inset:0 0 0 auto}:host([vertical]) forge-focus-indicator{--forge-focus-indicator-offset-inline:0 calc(var(--_tab-indicator-height) + 1px)}:host([vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-indicator-shape)}:host([inverted]) .forge-tab{--_tab-indicator-shape:var(--_tab-inverted-indicator-shape)}:host([inverted]) .indicator{inset:0 0 auto;transform-origin:top left}:host([inverted][vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-inverted-indicator-shape)}:host([inverted][vertical]) .indicator{inset:0 auto 0 0}',kt=class extends M{static get observedAttributes(){return Object.values(F1.observedAttributes)}constructor(){super(),H(this,ib,sb),this._core=new Vl(new Il(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case F1.observedAttributes.DISABLED:this.disabled=p(a);break;case F1.observedAttributes.SELECTED:this.selected=p(a);break;case F1.observedAttributes.VERTICAL:this.vertical=p(a);break;case F1.observedAttributes.STACKED:this.stacked=p(a);break;case F1.observedAttributes.SECONDARY:this.secondary=p(a);break;case F1.observedAttributes.INVERTED:this.inverted=p(a);break}}focus(t){super.focus(t),this._core.setFocus(t)}};s([v()],kt.prototype,"disabled",2),s([v()],kt.prototype,"selected",2),s([v()],kt.prototype,"vertical",2),s([v()],kt.prototype,"stacked",2),s([v()],kt.prototype,"secondary",2),s([v()],kt.prototype,"inverted",2),kt=s([y({name:F1.elementName,dependencies:[Q,r1]})],kt);function I6(){x(kt)}var El=class extends I{constructor(t){super(t),this._defaultSlotElement=g(this._component,T1.selectors.DEFAULT_SLOT),this._rootElement=g(this._component,T1.selectors.ROOT),this._scrollContainer=g(this._component,T1.selectors.SCROLL_CONTAINER)}initializeContainerSizeObserver(t){this._resizeObserver=new ResizeObserver(()=>t()),this._resizeObserver.observe(this._component)}initializeScrollObserver(t){this._scrollContainer.addEventListener("scroll",t,{passive:!0})}destroyContainerSizeObserver(){var t;(t=this._resizeObserver)==null||t.disconnect(),this._resizeObserver=void 0}destroyScrollObserver(t){this._scrollContainer.removeEventListener("scroll",t,{passive:!0})}setVertical(t){K(this._component,!!t,"aria-orientation","vertical")}setScrollBackwardButtonListener(t){var e;(e=this._backwardScrollButton)==null||e.addEventListener("click",t)}setScrollForwardButtonListener(t){var e;(e=this._forwardScrollButton)==null||e.addEventListener("click",t)}addSlotListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}getTabs(){return Array.from(this._component.querySelectorAll(F1.elementName))}async tryScrollTabIntoView(t){if(await new Promise(requestAnimationFrame),!t.isConnected||!t.selected&&!t.matches(":focus"))return;let e=this._component.vertical,a=e?this._scrollContainer.offsetTop:this._scrollContainer.offsetLeft,o=e?t.offsetTop:t.offsetLeft,n=e?t.offsetHeight:t.offsetWidth,i=e?this._scrollContainer.scrollTop:this._scrollContainer.scrollLeft,l=e?this._scrollContainer.offsetHeight:this._scrollContainer.offsetWidth,h=o-(T1.numbers.SCROLL_MARGIN+a),c=o+n-l+(T1.numbers.SCROLL_MARGIN-a),d=Math.min(h,Math.max(c,i)),u=t.matches(":focus")?"smooth":"instant";this._scrollContainer.scrollTo({behavior:u,[e?"left":"top"]:0,[e?"top":"left"]:d})}getScrollState(){let{scrollHeight:t,scrollWidth:e,scrollLeft:a,scrollTop:o,clientHeight:n,clientWidth:i}=this._scrollContainer,l=this._component.vertical?n+o:i+a,h=this._component.vertical?t:e,c=l===h;return{isScrolledStart:(this._component.vertical?l-n:l-i)===0,isScrolledEnd:c}}isScrollable(){let{scrollHeight:t,scrollWidth:e,clientHeight:a,clientWidth:o}=this._scrollContainer;return this._component.vertical?t>a:e>o}setScrollButtons(t){var e,a;t?(this._backwardScrollButton=this._createScrollButton(this._component.vertical?Go.name:s0.name),this._rootElement.insertAdjacentElement("afterbegin",this._backwardScrollButton),this._forwardScrollButton=this._createScrollButton(this._component.vertical?i0.name:fe.name),this._rootElement.insertAdjacentElement("beforeend",this._forwardScrollButton)):((e=this._backwardScrollButton)==null||e.remove(),this._backwardScrollButton=void 0,(a=this._forwardScrollButton)==null||a.remove(),this._forwardScrollButton=void 0)}syncScrollButtons({backwardEnabled:t,forwardEnabled:e}){var a,o;if(this._backwardScrollButton){let n=!t;n&&this._backwardScrollButton.matches(":focus")&&((a=this._forwardScrollButton)==null||a.focus()),this._backwardScrollButton.disabled=n,this._backwardScrollButton.tabIndex=-1}if(this._forwardScrollButton){let n=!e;n&&this._forwardScrollButton.matches(":focus")&&((o=this._backwardScrollButton)==null||o.focus()),this._forwardScrollButton.disabled=n,this._forwardScrollButton.tabIndex=-1}}scroll(t){let e=this._component.vertical?this._scrollContainer.offsetHeight:this._scrollContainer.offsetWidth;this._scrollContainer.scrollBy({behavior:"smooth",[this._component.vertical?"top":"left"]:e*(t==="forward"?1:-1)})}updateScrollButtonIcons(t){var o,n;let e=(o=this._backwardScrollButton)==null?void 0:o.querySelector("forge-icon");e&&(e.name=t?Go.name:s0.name);let a=(n=this._forwardScrollButton)==null?void 0:n.querySelector("forge-icon");a&&(a.name=t?i0.name:fe.name)}_createScrollButton(t){let e=document.createElement("forge-icon-button");e.classList.add(T1.classes.SCROLL_BUTTON),e.shape="squared",e.type="button",e.tabIndex=-1,e.setAttribute("aria-hidden","true");let a=document.createElement("forge-icon");return a.name=t,e.appendChild(a),e}};var Cl=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._disabled=!1;this._vertical=!1;this._clustered=!1;this._stacked=!1;this._secondary=!1;this._inverted=!1;this._autoActivate=!1;this._scrollButtons=!1;this._tabs=[];this._scrollButtonsVisible=!1;this._tabsChangedListener=()=>this._onTabsChanged(),this._tabSelectedListener=e=>this._onTabSelected(e),this._keydownListener=e=>this._onKeydown(e),this._resizeListener=()=>this._onResize(),this._scrollListener=()=>this._onScroll(),this._scrollBackwardButtonListener=()=>this._onScrollBackward(),this._scrollForwardButtonListener=()=>this._onScrollForward()}initialize(){this._adapter.addSlotListener(this._tabsChangedListener),this._adapter.addHostListener(F1.events.SELECT,this._tabSelectedListener),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.setVertical(this._vertical),this._scrollButtons&&(this._adapter.initializeContainerSizeObserver(this._resizeListener),this._adapter.initializeScrollObserver(this._scrollListener),this._updateScrollState()),this._tryScrollActiveTabIntoView(),this._isInitialized=!0}destroy(){this._adapter.destroyContainerSizeObserver(),this._adapter.destroyScrollObserver(this._scrollListener),this._isInitialized=!1}async _onTabsChanged(){this._tabs=this._adapter.getTabs(),this._syncTabState(),this._tryScrollActiveTabIntoView()}_onTabSelected(t){this._selectTab({tab:t.target,focusTab:!0})}async _onKeydown(t){var n,i;let e=this._vertical?"vertical":"horizontal";if(!(((n=i5.get("default"))==null?void 0:n.has(t.key))||((i=i5.get(e))==null?void 0:i.has(t.key))))return;t.preventDefault();let o=-1;if(t.key==="Home")o=this._tabs.findIndex(l=>!l.disabled);else if(t.key==="End")o=this._tabs.reduceRight((l,h,c)=>!h.disabled&&l===-1?c:l,-1);else{let l=this._tabs.findIndex(d=>d.matches(":focus")),h=t.key==="ArrowLeft"||t.key==="ArrowUp",c=d=>{var _;o=d+(h?-1:1),o=o<0?this._tabs.length-1:o%this._tabs.length,!this._tabs.every(L=>L.disabled)&&((_=this._tabs[o])!=null&&_.disabled)&&c(o)};c(l)}o!==-1&&(this._autoActivate?this._selectTab({tab:this._tabs[o],focusTab:!0}):(this._tabs[o].focus({preventScroll:!0,focusVisible:!0}),await this._adapter.tryScrollTabIntoView(this._tabs[o])))}async _selectTab({tab:t,emitEvent:e=!0,focusTab:a=!1}){if(!t||t.disabled)return;let o=this._tabs.find(n=>n.selected);if(o!==t){if(e){let n=this._tabs.indexOf(t),i=new CustomEvent(T1.events.CHANGE,{detail:{index:n},bubbles:!0,cancelable:!0,composed:!0});if(this._adapter.dispatchHostEvent(i),i.defaultPrevented)return}t.selected=!0,a&&t.focus({preventScroll:!0}),await this._adapter.tryScrollTabIntoView(t),o&&(o.selected=!1),this._activeTab=this._tabs.indexOf(t)}}_syncTabState(){this._tabs.forEach((t,e)=>{t.selected=e===this._activeTab,this._disabled&&(t.disabled=this._disabled),t.vertical=this._vertical,t.stacked=this._stacked,t.secondary=this._secondary,t.inverted=this._inverted})}_onResize(){this._detectScrollableStatus()}_onScroll(){this._updateScrollState()}_onScrollBackward(){this._adapter.scroll("backward")}_onScrollForward(){this._adapter.scroll("forward")}_detectScrollableStatus(){let t=this._adapter.isScrollable();this._scrollButtonsVisible!==t&&(this._adapter.setScrollButtons(t),t?(this._adapter.initializeScrollObserver(this._scrollListener),this._updateScrollState(),this._adapter.setScrollBackwardButtonListener(this._scrollBackwardButtonListener),this._adapter.setScrollForwardButtonListener(this._scrollForwardButtonListener)):this._adapter.destroyScrollObserver(this._scrollListener),this._scrollButtonsVisible=t)}_updateScrollState(){let{isScrolledEnd:t,isScrolledStart:e}=this._adapter.getScrollState(),a={backwardEnabled:!e,forwardEnabled:!t};this._adapter.syncScrollButtons(a)}_tryScrollActiveTabIntoView(){this._tabScrollAnimationFrame&&window.cancelAnimationFrame(this._tabScrollAnimationFrame),this._tabScrollAnimationFrame=window.requestAnimationFrame(()=>{this._tabScrollAnimationFrame=void 0,this._adapter.isScrollable()&&typeof this._activeTab=="number"&&this._activeTab>=0&&this._tabs[this._activeTab]&&this._adapter.tryScrollTabIntoView(this._tabs[this._activeTab])})}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._tabs.forEach(e=>e.disabled=this._disabled),this._adapter.toggleHostAttribute(T1.attributes.DISABLED,this._disabled))}get activeTab(){return this._activeTab}set activeTab(t){if(this._activeTab!==t)if(this._activeTab=t!=null?t:void 0,typeof this._activeTab=="number"){let e=this._tabs[this._activeTab];this._selectTab({tab:e,emitEvent:!1,focusTab:!1}),this._adapter.setHostAttribute(T1.attributes.ACTIVE_TAB,String(this._activeTab))}else this._tabs.forEach(e=>e.selected=!1),this._adapter.removeHostAttribute(T1.attributes.ACTIVE_TAB)}get vertical(){return this._vertical}set vertical(t){t=!!t,this._vertical!==t&&(this._vertical=t,this._isInitialized&&this._adapter.setVertical(this._vertical),this._tabs.forEach(e=>e.vertical=this._vertical),this._scrollButtonsVisible&&this._adapter.updateScrollButtonIcons(this._vertical),this._adapter.toggleHostAttribute(F1.attributes.VERTICAL,this._vertical))}get clustered(){return this._clustered}set clustered(t){t=!!t,this._clustered!==t&&(this._clustered=t,this._adapter.toggleHostAttribute(T1.attributes.CLUSTERED,this._clustered))}get stacked(){return this._stacked}set stacked(t){t=!!t,this._stacked!==t&&(this._stacked=t,this._tabs.forEach(e=>e.stacked=this._stacked),this._adapter.toggleHostAttribute(T1.attributes.STACKED,this._stacked))}get secondary(){return this._secondary}set secondary(t){t=!!t,this._secondary!==t&&(this._secondary=t,this._tabs.forEach(e=>e.secondary=this._secondary),this._adapter.toggleHostAttribute(T1.attributes.SECONDARY,this._secondary))}get inverted(){return this._inverted}set inverted(t){t=!!t,this._inverted!==t&&(this._inverted=t,this._tabs.forEach(e=>e.inverted=this._inverted),this._adapter.toggleHostAttribute(T1.attributes.INVERTED,this._inverted))}get autoActivate(){return this._autoActivate}set autoActivate(t){t=!!t,this._autoActivate!==t&&(this._autoActivate=t,this._adapter.toggleHostAttribute(T1.attributes.AUTO_ACTIVATE,this._autoActivate))}get scrollButtons(){return this._scrollButtons}set scrollButtons(t){t=!!t,this._scrollButtons!==t&&(this._scrollButtons=!!t,this._isInitialized&&(this._scrollButtons?(this._adapter.initializeContainerSizeObserver(this._resizeListener),this._adapter.initializeScrollObserver(this._scrollListener),this._detectScrollableStatus(),this._updateScrollState(),this._tryScrollActiveTabIntoView()):(this._adapter.destroyContainerSizeObserver(),this._adapter.destroyScrollObserver(this._scrollListener),this._adapter.setScrollButtons(this._scrollButtons),this._scrollButtonsVisible=!1)),this._adapter.setHostAttribute(T1.attributes.SCROLL_BUTTONS,String(this._scrollButtons)))}};var lb='<template><div class="forge-tab-bar" part="container"><div class="scroll-container" part="scroll-container"><slot></slot></div></div></template>',vb=":host{position:relative;display:block}:host([hidden]){display:none}.forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, space-between);--_tab-bar-stretch:var(--forge-tab-bar-stretch, 1);--_tab-bar-divider-color:var(--forge-tab-bar-divider-color, var(--forge-theme-outline, #e0e0e0));--_tab-bar-divider-thickness:var(--forge-tab-bar-divider-thickness, 1px)}.forge-tab-bar{position:relative;display:grid;grid-template-columns:auto 1fr auto;max-width:100%;max-height:100%;align-items:center;border-bottom:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color)}.scroll-container{position:relative;display:flex;justify-content:var(--_tab-bar-justify);align-items:flex-end;box-sizing:border-box;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;grid-column:2}.scroll-container::-webkit-scrollbar{display:none}::slotted(*){flex:var(--_tab-bar-stretch);align-self:stretch}::slotted([selected]){z-index:1}forge-icon-button{--forge-icon-button-shape-squared:0px}:host([vertical]) .forge-tab-bar{grid-template-columns:none;grid-template-rows:auto 1fr auto;align-items:initial;border-bottom:none;border-right:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color);height:100%}:host([vertical]) .scroll-container{display:inline-flex;flex-direction:column;align-items:stretch;gap:0;grid-column:auto;grid-row:2}:host([vertical]) .scroll-button{justify-self:center}:host([inverted]:not([vertical])) .forge-tab-bar{border-bottom:none;border-top:variale(divider-thickness) solid var(--_tab-bar-divider-color)}:host([inverted][vertical]) .forge-tab-bar{border-bottom:none;border-top:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color)}:host([clustered]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-start);--_tab-bar-stretch:var(--forge-tab-bar-stretch, 0)}:host([clustered=start]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-start)}:host([clustered=center]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, center)}:host([clustered=end]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-end)}",Mt=class extends L1(H1(M)){static get observedAttributes(){return Object.values(T1.observedAttributes)}constructor(){super(),q.define([s0,fe,Go,i0]),H(this,lb,vb),this._core=new Cl(new El(this))}connectedCallback(){this[P]({role:"tablist"},{setAttribute:!0}),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case T1.observedAttributes.DISABLED:this.disabled=p(a);break;case T1.observedAttributes.ACTIVE_TAB:this.activeTab=a?W(a):void 0;break;case T1.observedAttributes.VERTICAL:this.vertical=p(a);break;case T1.observedAttributes.CLUSTERED:this.clustered=p(a);break;case T1.observedAttributes.STACKED:this.stacked=p(a);break;case T1.observedAttributes.SECONDARY:this.secondary=p(a);break;case T1.observedAttributes.INVERTED:this.inverted=p(a);break;case T1.observedAttributes.AUTO_ACTIVATE:this.autoActivate=p(a);break;case T1.observedAttributes.SCROLL_BUTTONS:this.scrollButtons=p(a);break}}};s([v()],Mt.prototype,"disabled",2),s([v()],Mt.prototype,"activeTab",2),s([v()],Mt.prototype,"vertical",2),s([v()],Mt.prototype,"clustered",2),s([v()],Mt.prototype,"stacked",2),s([v()],Mt.prototype,"secondary",2),s([v()],Mt.prototype,"inverted",2),s([v()],Mt.prototype,"autoActivate",2),s([v()],Mt.prototype,"scrollButtons",2),Mt=s([y({name:T1.elementName,dependencies:[kt,n1,X]})],Mt);function V6(){x(Mt)}var Cr=`${b}time-picker`,E6={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},hb={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${E6.TOGGLE}]`},cb={OPEN:`${Cr}-open`,CLOSE:`${Cr}-close`,INPUT:`${Cr}-input`,CHANGE:`${Cr}-change`},pb={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},U={elementName:Cr,attributes:E6,selectors:hb,events:cb,numbers:pb};var zl=class extends I{constructor(t){super(t)}get inputElement(){return this._inputElement}initialize(){this._inputElement=this._component.querySelector(U.selectors.INPUT)}initializeMask(t){this.destroyMask(),this._inputElement&&(this._inputMask=new dn(this._inputElement,t))}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){var t;(t=this._inputMask)==null||t.destroy(),this._inputMask=void 0}initializeAccessibility(t){var e,a,o,n,i,l,h,c,d;(e=this._inputElement)==null||e.setAttribute("autocomplete","off"),(a=this._inputElement)==null||a.setAttribute("autocorrect","off"),(o=this._inputElement)==null||o.setAttribute("autocapitalize","off"),(n=this._inputElement)==null||n.setAttribute("spellcheck","false"),(i=this._inputElement)==null||i.setAttribute("role","combobox"),(l=this._inputElement)==null||l.setAttribute("aria-live","assertive"),(h=this._inputElement)==null||h.setAttribute("aria-atomic","true"),(c=this._inputElement)==null||c.setAttribute("aria-haspopup","true"),(d=this._inputElement)==null||d.setAttribute("aria-expanded","false"),Oe(),this._inputElement&&Zt(this._inputElement)}addInputListener(t,e,a){var o;(o=this._inputElement)==null||o.addEventListener(t,e,{capture:a})}removeInputListener(t,e,a){var o;(o=this._inputElement)==null||o.removeEventListener(t,e,{capture:a})}addToggleListener(t,e){this._toggleElement&&this._toggleElement.addEventListener(t,e)}removeToggleListener(t,e){this._toggleElement&&this._toggleElement.removeEventListener(t,e)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let t=this._component.querySelector(V1.elementName),e=this._component.querySelector(U.selectors.TOGGLE);if(t){let a=t.querySelector(`${J.elementName}[slot=trailing]`);if(a||e){this._toggleElement=a||e;return}let o=document.createElement(J.elementName);o.slot="trailing",o.density="medium",o.type="button",o.tabIndex=-1,o.style.marginRight="4px",o.setAttribute("aria-label","Toggle time dropdown");let n=document.createElement(h1.elementName);n.name="clock_outline",o.appendChild(n),t.appendChild(o),this._toggleElement=o}else e&&(this._toggleElement=e)}tryFocusInput(){var t;(t=this._inputElement)==null||t.select()}tryBlurInput(){var t;(t=this._inputElement)==null||t.blur()}selectInputText(){var t;(t=this._inputElement)==null||t.select()}isInputDisabled(){var t,e;return(e=(t=this._inputElement)==null?void 0:t.disabled)!=null?e:!1}isInputFocused(){return Se(this._component.ownerDocument)===this._inputElement}setInputValue(t,e){var a;((a=this._inputElement)==null?void 0:a.value)!==t&&(this._inputElement&&(this._inputElement.value=t),this._inputMask&&this._inputMask.update(),e&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){var t,e;return this._inputMask?this._inputMask.maskedValue:(e=(t=this._inputElement)==null?void 0:t.value)!=null?e:""}setDisabled(t){this._inputElement&&(this._inputElement.disabled=t,this._inputElement.setAttribute("aria-disabled",t.toString())),this.setToggleDisabled(t)}attachDropdown(t){var e;this._targetElement||(this._targetElement=this._getTargetElement(this._component.popupTarget)),this._listDropdown=new Pe(this._targetElement,t),this._listDropdown.open(),(e=this._inputElement)==null||e.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`)}async detachDropdown({destroy:t=!1}={}){this._listDropdown&&(t?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0),this._inputElement&&Zt(this._inputElement)}propagateKey(t){var e;(e=this._listDropdown)==null||e.handleKey(t)}setActiveDescendant(t){this._inputElement&&K(this._inputElement,!!t,"aria-activedescendant",t)}getTargetElementWidth(t){return this._getTargetElement(t).getBoundingClientRect().width}_emitInputEvent(t){var e;(e=this._inputElement)==null||e.dispatchEvent(new Event(t))}emitInputEvent(t,e){this._inputElement&&o0(this._inputElement,t,e)}setInputReadonly(t){this._inputElement&&(this._inputElement.readOnly=t)}setToggleDisabled(t){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",t.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=t;else{let e=this._toggleElement.querySelector("button");e&&(e.disabled=t)}}hasActiveOption(){var t,e;return((e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:-1)>=0}activateOptionByIndex(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}getActiveOption(){var t;return(t=this._listDropdown)==null?void 0:t.getActiveOption()}_getTargetElement(t){return this._targetElement?this._targetElement:(this._targetElement=t?this._component.querySelector(t)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){var e;let t=this._component.querySelector(V1.elementName);return(e=t==null?void 0:t.popoverTargetElement)!=null?e:this._component}};function Al(r,t,e){if(!r||/^\s*$/.test(r))return null;let a=0,o=0,n=0;if($a.test(r)){let i=I3(r);a=+i.hours||0,o=+i.minutes||0,n=+i.seconds||0}else if(an.test(r)){let i=V3(r);a=+i.hours||0,o=+i.minutes||0,n=+i.seconds||0,a===12&&i.meridiem==="AM"&&(a=0),a<12&&i.meridiem==="PM"&&(a+=12)}else return null;return A6(a)+Tl(o)+(e?l5(n):0)}function Yt(r,t,e){if(typeof r!="number"||r<0)return null;let a=Math.min(C6(r),23),o=Math.min(z6(r),59),i=r/(1e3*60)<720?"AM":"PM";t||(a=a<=12?a:a-12,a===0&&(a=12));let l=`${String(a).padStart(2,"0")}:${String(o).padStart(2,"0")}`;if(e){let h=Math.min(s5(r),59);l+=`:${String(h).padStart(2,"0")}`}return t||(l+=` ${i}`),l}function C6(r){return Math.abs(Math.floor(r/(1e3*60*60)))}function z6(r){return Math.abs(Math.floor(Bl(r)%60))}function Bl(r){return r/(1e3*60)}function s5(r){return Math.abs(Math.floor(db(r)%60))}function db(r){return r/1e3}function A6(r){return r*60*60*1e3}function Tl(r){return r*60*1e3}function l5(r){return r*1e3}function B6(r){return r-l5(s5(r))}function v5(r){let t=new Date,e=t.getHours(),a=t.getMinutes();return A6(e)+Tl(a)+(r?l5(t.getSeconds()):0)}function KV1(r,t,e=!1){r||(r=new Date);let a=Al(t,!0,e);if(!a)return r.setHours(0,0,0),r;let o=C6(a),n=828e5;o>n?o=n:o<0&&(o=0);let i=z6(a),l=e?s5(a):0;return r.setHours(o,i,l),r}var Sl=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=U.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=P2(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}destroy(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown({destroy:!0}),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){var e,a;if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeDropdown({emitCloseEvent:!0}));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption():(this._openDropdown(),typeof((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0?this._adapter.activateOptionByIndex((a=this._dropdownConfig)==null?void 0:a.visibleStartIndex):this._adapter.activateFirstOption()));break;case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&(this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption()));break;case"Enter":case"NumpadEnter":case"Home":case"End":this._open&&((t.code==="Enter"||t.code==="NumpadEnter")&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":t.preventDefault();let o=v5(this._allowSeconds);if(this._value!==o){let n=Yt(o,!0,this._allowSeconds);this._emitChangeEvent(n)&&(this._applyValue(o),this._selectInputText())}break}}_trySetActiveOption(){var t,e;!this._adapter.hasActiveOption()&&typeof((t=this._dropdownConfig)==null?void 0:t.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0&&this._adapter.activateOptionByIndex((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown({emitCloseEvent:!0}):($2.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._allowInput&&this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown({emitCloseEvent:!0})}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){this._adapter.destroyMask();let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:Ae(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown({emitCloseEvent:!0})}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=Yt(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(B6(this._value)),this._isInitialized&&t!==this._value){let e=Yt(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown({emitCloseEvent:!0}),t=C3(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let a;!this._masked&&typeof this._parseCallback=="function"?a=this._parseCallback.call(null,t):a=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),a=this._validateMillis(a),this._trySetValue(a)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(U.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=Yt(t,!0,this._allowSeconds);return this._adapter.emitInputEvent(U.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){if(typeof t=="number"){let e=typeof this._min=="number"&&t<this._min,a=typeof this._max=="number"&&t>this._max;(e||a)&&(t=null)}return typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):E3(t)}_isValidInputValue(t){return $a.test(t)}_onSelect(t){if(this._closeDropdown({emitCloseEvent:!0}),!t.isCustom&&t.metadata==="now"&&(t.time=v5(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let o=t.customCallback.call(null,t.metadata);if(typeof o!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=o}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=Yt(t.time,!0,this._allowSeconds);this._emitChangeEvent(e)&&(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let a=this._formatValue(this._value);this._adapter.getInputValue()!==a&&this._adapter.setInputValue(a,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>U.numbers.MAX_DAY_MILLIS?U.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length||!this._adapter.inputElement)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(U.attributes.OPEN);let e=t.filter(n=>!n.divider&&!n.disabled),a=[],o=0;if(t.length)if(this._value!=null){let n=this._findClosestOptionIndex(this._value,e);n>=0&&(e[n].value.time===this._value?a=[e[n].value]:o=n)}else if(typeof this._startTime=="number"){let n=this._findClosestOptionIndex(this._startTime,e);n>=0&&n<e.length&&(o=n)}else this._startTime==null&&(o=this._getOptionIndexClosestCurrent(e));this._dropdownConfig={id:`forge-time-picker-${this._identifier}`,referenceElement:this._adapter.inputElement,selectedValues:a,syncWidth:!0,visibleStartIndex:o,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:n=>this._onSelect(n),closeCallback:()=>this._closeDropdown({emitCloseEvent:!0}),activeChangeCallback:n=>this._adapter.setActiveDescendant(n),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)},this._adapter.attachDropdown(this._dropdownConfig),this._adapter.emitHostEvent(U.events.OPEN,void 0,!1)}_closeDropdown({destroy:t=!1,emitCloseEvent:e=!1}={}){this._open=!1,this._dropdownConfig=void 0,this._adapter.removeHostAttribute(U.attributes.OPEN),this._adapter.detachDropdown({destroy:t}),e&&this._adapter.emitHostEvent(U.events.CLOSE,!0,!1)}_getOptionIndexClosestCurrent(t){let e=new Date,a=`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,o=Al(a,!0,!1);return this._findClosestOptionIndex(o,t)}_findClosestOptionIndex(t,e){let a=e.reduce((o,n)=>Math.abs((n.value.time||0)-t)<Math.abs((o.value.time||0)-t)?n:o);return e.indexOf(a)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let a=this._formatValue(this._value);e!==a&&(this._adapter.setInputValue(a,t),this._adapter.emitInputEvent(U.events.INPUT,a))}_generateTimeOptions(){let t=this._min!=null?Math.max(Bl(this._min),0):0,e=this._max!=null?Math.min(Bl(this._max),U.numbers.MAX_DAY_MINUTES):U.numbers.MAX_DAY_MINUTES,a=this._step,o=[],n=[];if(this._showHourOptions){for(let l=t;l<=e&&l!==U.numbers.MAX_DAY_MINUTES;l+=a){let h=Tl(l),c=this._restrictedTimes.includes(h),d=Yt(h,this._use24HourTime,!1)||"",u={time:h};o.push({label:d,value:u,disabled:c})}let i=o.findIndex(l=>l.value.time/1e3/60>=720);i>=0&&i<o.length-1&&o.splice(i,0,{label:"",value:null,divider:!0})}if(this._showNow){let i={time:null,metadata:"now"};n.push({label:"Now",value:i})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let i=this._customOptions.map(l=>{let h={time:null,metadata:l.value,isCustom:!0,customCallback:l.toMilliseconds};return{label:l.label,value:h}});n=[...n,...i]}return n.length&&(o.length&&o.splice(0,0,{label:"",value:null,divider:!0}),n.forEach((i,l)=>o.splice(l,0,i))),o}_convertTimeStringToMillis(t,e,a){return(!t||!this._isValidTimeFormat(t))&&(t=""),Al(t,e,a)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):Yt(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(U.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(U.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(U.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return Yt(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return Yt(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get max(){return Yt(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get restrictedTimes(){return this._restrictedTimes.map(t=>Yt(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return Yt(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(U.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var mb="<template><slot></slot></template>",gb=":host{display:block}:host([hidden]){display:none}",O1=class extends M{static get observedAttributes(){return[U.attributes.VALUE,U.attributes.OPEN,U.attributes.ALLOW_SECONDS,U.attributes.MASKED,U.attributes.SHOW_MASK_FORMAT,U.attributes.USE_24_HOUR_TIME,U.attributes.ALLOW_INVALID_TIME,U.attributes.MIN,U.attributes.MAX,U.attributes.START_TIME,U.attributes.STEP,U.attributes.ALLOW_INPUT,U.attributes.SHOW_NOW,U.attributes.SHOW_HOUR_OPTIONS,U.attributes.DISABLED,U.attributes.POPUP_CLASSES,U.attributes.ALLOW_DROPDOWN]}constructor(){super(),q.define([Zd,Ya]),H(this,mb,gb),this._core=new Sl(new zl(this))}connectedCallback(){this.querySelector(U.selectors.INPUT)?this._core.initialize():I0(this,U.selectors.INPUT).then(()=>this._core.initialize())}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case U.attributes.VALUE:this.value=a;break;case U.attributes.OPEN:this.open=p(a);break;case U.attributes.ALLOW_SECONDS:this.allowSeconds=p(a);break;case U.attributes.MASKED:this.masked=p(a);break;case U.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=p(a);break;case U.attributes.USE_24_HOUR_TIME:this.use24HourTime=p(a);break;case U.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=p(a);break;case U.attributes.SHOW_NOW:this.showNow=p(a);break;case U.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=p(a);break;case U.attributes.MIN:this.min=a;break;case U.attributes.MAX:this.max=a;break;case U.attributes.START_TIME:this.startTime=a;break;case U.attributes.STEP:this.step=W(a);break;case U.attributes.ALLOW_INPUT:this.allowInput=p(a);break;case U.attributes.DISABLED:this.disabled=p(a);break;case U.attributes.POPUP_CLASSES:this.popupClasses=a;break;case U.attributes.ALLOW_DROPDOWN:this.allowDropdown=p(a);break}}};s([v()],O1.prototype,"value",2),s([v()],O1.prototype,"open",2),s([v()],O1.prototype,"allowSeconds",2),s([v()],O1.prototype,"masked",2),s([v()],O1.prototype,"showMaskFormat",2),s([v()],O1.prototype,"use24HourTime",2),s([v()],O1.prototype,"allowInvalidTime",2),s([v()],O1.prototype,"min",2),s([v()],O1.prototype,"max",2),s([v()],O1.prototype,"restrictedTimes",2),s([v()],O1.prototype,"startTime",2),s([v()],O1.prototype,"step",2),s([v()],O1.prototype,"allowInput",2),s([v()],O1.prototype,"showNow",2),s([v()],O1.prototype,"showHourOptions",2),s([v()],O1.prototype,"customOptions",2),s([v()],O1.prototype,"validationCallback",2),s([v()],O1.prototype,"parseCallback",2),s([v()],O1.prototype,"formatCallback",2),s([v()],O1.prototype,"coercionCallback",2),s([v()],O1.prototype,"prepareMaskCallback",2),s([v()],O1.prototype,"disabled",2),s([v()],O1.prototype,"popupClasses",2),s([v()],O1.prototype,"allowDropdown",2),s([v()],O1.prototype,"popupTarget",2),O1=s([y({name:U.elementName,dependencies:[h2,j1,n1,X,P1,X,E1]})],O1);var T6=class extends a2{constructor(t){super(t)}_build(){let t=document.createElement(U.elementName);return this._attachTextField(t),t}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.addEventListener(U.events.CHANGE,e=>{var a;return t((a=e.detail)!=null?a:"")})}onInput(t){this._element.addEventListener(U.events.INPUT,e=>{var a;return t((a=e.detail)!=null?a:"")})}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var a,o,n,i;let e={props:w({},(o=(a=this._config.options)==null?void 0:a.textFieldDelegateConfig)==null?void 0:o.props),options:w({},(i=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:i.options)};this._textFieldDelegate=new J0(e),t.appendChild(this._textFieldDelegate.element)}};function S6(){x(O1)}var h5=`${b}toast`,k6={OPEN:"open",DURATION:"duration",PLACEMENT:"placement",ACTION_TEXT:"action-text",DISMISSIBLE:"dismissible",DISMISS_LABEL:"dismiss-label",THEME:"theme"},wb=w({},k6),ub={ACTION:`${h5}-action`,CLOSE:`${h5}-close`},_b={EXITING:"exiting"},fb={SURFACE:".surface",ACTION_BUTTON:".action-button",CLOSE_BUTTON:".close-button"},xb={PLACEMENT:"bottom",DURATION:2750,THEME:"default"},B1={elementName:h5,observedAttributes:k6,attributes:wb,classes:_b,selectors:fb,defaults:xb,events:ub};var kl=class extends I{constructor(t){super(t),this._overlayElement=g(t,B.elementName),this._surfaceElement=g(t,B1.selectors.SURFACE),this._actionButtonElement=g(t,B1.selectors.ACTION_BUTTON),this._closeButtonElement=g(t,B1.selectors.CLOSE_BUTTON)}show(){this._overlayElement.open=!0}async hide(){await Rt(this._surfaceElement,B1.classes.EXITING),this._overlayElement.open=!1}addCloseListener(t){this._closeButtonElement.addEventListener("click",t)}removeCloseListener(t){this._closeButtonElement.removeEventListener("click",t)}addActionListener(t){this._actionButtonElement.addEventListener("click",t)}removeActionListener(t){this._actionButtonElement.removeEventListener("click",t)}setDismissLabel(t){this._closeButtonElement.setAttribute("aria-label",t)}setActionText(t){this._actionButtonElement.textContent=t,t?this._actionButtonElement.removeAttribute("hidden"):this._actionButtonElement.setAttribute("hidden","")}};var Ol=class{constructor(t){this._adapter=t;this._open=!1;this._duration=B1.defaults.DURATION;this._placement=B1.defaults.PLACEMENT;this._dismissible=!1;this._theme=B1.defaults.THEME;this._actionListener=this._onAction.bind(this);this._closeListener=this._onClose.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["duration","placement","dismissible"]),this._open&&this.show()}show(){this._adapter.show(),isFinite(this._duration)&&this._duration>0&&(this._hideTimeout&&window.clearTimeout(this._hideTimeout),this._hideTimeout=window.setTimeout(()=>this.hide(),this._duration)),this._open=!0,this._adapter.toggleHostAttribute(B1.attributes.OPEN,this._open)}async hide({dispatchEvent:t=!0}={}){this._hideTimeout&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=void 0),await this._adapter.hide(),this._open=!1,this._adapter.toggleHostAttribute(B1.attributes.OPEN,this._open),t&&this._adapter.dispatchHostEvent(new CustomEvent(B1.events.CLOSE,{bubbles:!0}))}_onAction(t){t.stopPropagation(),this._adapter.dispatchHostEvent(new CustomEvent(B1.events.ACTION,{bubbles:!0}))}_onClose(t){this.hide()}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._adapter.isConnected?t?this.show():this.hide({dispatchEvent:!1}):this._open=t,this._adapter.toggleHostAttribute(B1.attributes.OPEN,this._open))}get duration(){return this._duration}set duration(t){this._duration!==t&&(this._duration=t,this._hideTimeout&&(window.clearTimeout(this._hideTimeout),isFinite(this._duration)&&this._duration>0&&(this._hideTimeout=window.setTimeout(()=>this.hide(),this._duration))))}get placement(){return this._placement}set placement(t){this._placement!==t&&(this._placement=t,this._adapter.setHostAttribute(B1.attributes.PLACEMENT,this._placement))}get actionText(){return this._actionText}set actionText(t){var e;t=(e=t==null?void 0:t.trim())!=null?e:"",this._actionText!==t&&(this._actionText=t,this._adapter.setActionText(this._actionText),this._actionText?this._adapter.addActionListener(this._actionListener):this._adapter.removeActionListener(this._actionListener),this._adapter.toggleHostAttribute(B1.attributes.ACTION_TEXT,!!this._actionText,this._actionText))}get dismissible(){return this._dismissible}set dismissible(t){t=!!t,this._dismissible!==t&&(this._dismissible=t,this._dismissible?this._adapter.addCloseListener(this._closeListener):this._adapter.removeCloseListener(this._closeListener),this._adapter.toggleHostAttribute(B1.attributes.DISMISSIBLE,this._dismissible))}get dismissLabel(){return this._dismissLabel}set dismissLabel(t){this._dismissLabel!==t&&(this._dismissLabel=t,this._adapter.setDismissLabel(this._dismissLabel))}get theme(){return this._theme}set theme(t){t!=null||(t=B1.defaults.THEME),this._theme!==t&&(this._theme=t,this._adapter.setHostAttribute(B1.attributes.THEME,this._theme))}};var bb='<template><forge-overlay exportparts="root:overlay" no-anchor persistent><div class="surface" part="surface"><slot name="icon"></slot><div class="message" part="message"><slot></slot></div><forge-button hidden part="action-button" class="action-button"></forge-button><forge-icon-button part="close-button" class="close-button" aria-label="Dismiss" density="medium"><forge-icon name="close"></forge-icon></forge-icon-button></div></forge-overlay></template>',yb='@keyframes slidein{from{transform:translateY(var(--_toast-slide-origin))}to{transform:translateY(0)}}@keyframes slideout{from{transform:translateY(0)}to{transform:translateY(var(--_toast-slide-origin))}}@keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadeout{from{opacity:1}to{opacity:0}}@layer base,open,theme,placement,media; @layer base{:host{display:contents}:host([hidden]){display:none}.surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-surface-inverse, #333333));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-surface-inverse, #ffffff));--_toast-offset:var(--forge-toast-offset, var(--forge-spacing-medium, 16px));--_toast-shape:var(--forge-toast-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_toast-elevation:var(--forge-toast-elevation, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12));--_toast-action-color:var(--forge-toast-action-color, var(--forge-theme-secondary, #ffc107));--_toast-min-width:var(--forge-toast-min-width, 344px);--_toast-max-width:var(--forge-toast-max-width, 672px);--_toast-min-height:var(--forge-toast-min-height, 48px);--_toast-inline-padding:var(--forge-toast-inline-padding, var(--forge-spacing-medium, 16px));--_toast-spacing:var(--forge-toast-spacing, var(--forge-spacing-xsmall, 8px));--_toast-message-padding:var(--forge-toast-message-padding, var(--forge-spacing-xsmall, 8px));--_toast-enter-duration:var(--forge-toast-enter-duration, var(--forge-animation-duration-medium1, 250ms));--_toast-enter-timing:var(--forge-toast-enter-timing, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_toast-exit-duration:var(--forge-toast-exit-duration, var(--forge-animation-duration-short4, 200ms));--_toast-exit-timing:var(--forge-toast-exit-timing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)));--_toast-slide-origin:var(--forge-toast-slide-origin, 100%)}.surface{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);position:fixed;display:flex;align-items:center;column-gap:var(--_toast-spacing);border-radius:var(--_toast-shape);padding-inline:var(--_toast-inline-padding);margin:var(--_toast-offset);min-width:var(--_toast-min-width);max-width:var(--_toast-max-width);min-height:var(--_toast-min-height);box-sizing:border-box;background:var(--_toast-background);color:var(--_toast-color);box-shadow:var(--_toast-elevation)}.message{flex-grow:1;padding-block:var(--_toast-message-padding);text-overflow:ellipsis;overflow:hidden}forge-button.action-button{--forge-button-primary-color:var(--_toast-action-color)}forge-icon-button.close-button{--forge-icon-button-focus-indicator-color:var(--_toast-color)}:host(:not([dismissible])) .close-button{display:none}.action-button:not([hidden]){margin-inline-end:-8px}:host([dismissible]) .close-button{margin-inline-end:-8px}}@layer theme{:host([theme=primary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-primary, #3f51b5));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-primary, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=secondary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-secondary, #ffc107));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-secondary, #000000));--_toast-action-color:var(--_toast-color)}:host([theme=tertiary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-tertiary, #3d5afe));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-tertiary, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=success]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-success, #2e7d32));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-success, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=warning]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-warning, #d14900));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-warning, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=error]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-error, #b00020));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-error, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=info]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-info, #1565c0));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-info, #ffffff));--_toast-action-color:var(--_toast-color)}}@layer open{forge-overlay[open] .surface{animation-name:slidein;animation-duration:var(--_toast-enter-duration);animation-timing-function:var(--_toast-enter-timing)}forge-overlay[open] .surface.exiting{animation-name:slideout;animation-duration:var(--_toast-exit-duration);animation-timing-function:var(--_toast-exit-timing)}}@layer placement{:host([placement=bottom-start]) .surface{bottom:0;left:0}:host(:is(:not([placement]),[placement=bottom])) .surface{bottom:0;left:50%;translate:-50%}:host([placement=bottom-end]) .surface{bottom:0;right:0}:host([placement=top-start]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;left:0}:host([placement=top]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;left:50%;translate:-50%}:host([placement=top-end]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;right:0}}@layer media{@media (prefers-reduced-motion:reduce){forge-overlay[open] .surface{animation-name:fadein}forge-overlay[open] .surface.exiting{animation-name:fadeout}}@media (max-width:599px){:host([placement^=top]) .surface{bottom:auto;top:0}.surface{bottom:0;left:0;right:0;margin:0;translate:none;max-width:none;min-width:auto;border-radius:0}}}',Kt=class extends H1(L1(M)){static get observedAttributes(){return Object.values(B1.observedAttributes)}constructor(){super(),q.define(Ya),H(this,bb,yb),this._core=new Ol(new kl(this))}connectedCallback(){this.hasAttribute("role")||this.getAttribute("aria-hidden")==="true"||this[P]({role:"alert",ariaLive:"assertive",ariaAtomic:"true"}),this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case B1.attributes.OPEN:this.open=p(a);break;case B1.attributes.DURATION:let o=Number(a);this.duration=o&&o>0?o:B1.defaults.DURATION;break;case B1.attributes.PLACEMENT:this.placement=a||B1.defaults.PLACEMENT;break;case B1.attributes.ACTION_TEXT:this.actionText=a;break;case B1.attributes.DISMISSIBLE:this.dismissible=p(a);break;case B1.attributes.DISMISS_LABEL:this.dismissLabel=a;break;case B1.attributes.THEME:this.theme=a;break}}show(){this._core.show()}hide(){return this._core.hide()}static present(l){var h=l,{message:t,element:e,icon:a,className:o,topLayer:n}=h,i=Pa(h,["message","element","icon","className","topLayer"]);let c=document.createElement(B1.elementName);if(e?c.appendChild(e):t&&c.append(t),a){let u=document.createElement("forge-icon");Object.assign(u,a),u.slot="icon",c.appendChild(u)}if(o){let u=Array.isArray(o)?o:[o];c.classList.add(...u)}return i&&Object.assign(c,i),(n&&Array.from(E1[w0]).at(-1)||document.body).appendChild(c),c.open=!0,c.addEventListener(B1.events.CLOSE,()=>c.remove()),c}};s([v()],Kt.prototype,"open",2),s([v()],Kt.prototype,"duration",2),s([v()],Kt.prototype,"placement",2),s([v()],Kt.prototype,"actionText",2),s([v()],Kt.prototype,"dismissible",2),s([v()],Kt.prototype,"dismissLabel",2),s([v()],Kt.prototype,"theme",2),Kt=s([y({name:B1.elementName,dependencies:[d2,V2,n1,X]})],Kt);function O6(){x(Kt)}var Mb=`${b}view-switcher`,c5={ROOT:"forge-view-switcher",VIEW_HIDDEN:"forge-view-switcher__view--hidden",VIEW_SWITCHER_SLIDE:"slide",VIEW_SWITCHER_FADE:"fade"},Hb={ROOT:`.${c5.ROOT}`,DEFAULT_SLOT:"slot:not([name])",VIEW_HIDDEN:`.${c5.VIEW_HIDDEN}`},Lb={INDEX:"index",ANIMATION_TYPE:"animation-type"},Ib={DEFAULT_TRANSITION_DURATION:500},e2={elementName:Mb,attributes:Lb,classes:c5,selectors:Hb,numbers:Ib},p5=(e=>(e.Left="left",e.Right="right",e))(p5||{}),Vb=(a=>(a.None="none",a.Slide="slide",a.Fade="fade",a))(Vb||{});var Dl=class extends I{constructor(t){super(t),this._rootElement=g(t,e2.selectors.ROOT),this._slotElement=g(t,e2.selectors.DEFAULT_SLOT)}getViewCount(){return this._getViews().length}startViewObserver(t){this._viewObserver=new MutationObserver(t),this._viewObserver.observe(this._component,{childList:!0})}stopViewObserver(){var t;(t=this._viewObserver)==null||t.disconnect()}initializeSlideViews(t){let e=this._getViews();e.forEach((a,o)=>{if(a.style.removeProperty("opacity"),a.style.removeProperty("display"),o===t){e[t].classList.remove(e2.classes.VIEW_HIDDEN),a.style.removeProperty("visibility");return}a.style.transition="none",a.classList.add(e2.classes.VIEW_HIDDEN),a.style.visibility="hidden",o>t?a.style.transform="translate3d(100%, 0, 0)":a.style.transform="translate3d(-100%, 0, 0)"}),window.requestAnimationFrame(()=>{e=this._getViews(),e.forEach((a,o)=>{o!==t&&a.style.removeProperty("transition")})})}initializeFadeViews(t){let e=this._getViews();e.forEach((a,o)=>{if(a.style.removeProperty("transform"),a.style.removeProperty("display"),o===t){a.classList.remove(e2.classes.VIEW_HIDDEN),a.style.removeProperty("visibility");return}a.classList.add(e2.classes.VIEW_HIDDEN),a.style.visibility="hidden"}),e[t]&&(e[t].style.opacity="1")}setActiveView(t){let e=this._getViews();e.forEach((a,o)=>{o!==t&&(a.classList.add(e2.classes.VIEW_HIDDEN),a.style.display="none")}),e[t]&&(e[t].classList.remove(e2.classes.VIEW_HIDDEN),e[t].style.removeProperty("display"))}hideInactiveViews(t){this._getViews().forEach((a,o)=>{if(a.style.removeProperty("opacity"),a.style.removeProperty("transform"),a.style.removeProperty("visibility"),o===t){a.classList.remove(e2.classes.VIEW_HIDDEN);return}a.classList.add(e2.classes.VIEW_HIDDEN),a.style.display="none"})}async transitionToView(t,e,a,o){let n=this._getViews(),i=n[t],l=n[e];return new Promise(h=>{l.style.removeProperty("visibility"),window.requestAnimationFrame(()=>{let c;switch(a){case"slide":this._slideToView(i,l,o),c="transform";break;case"fade":this._fadeToView(i,l),c="opacity";break;default:return}this._animateHeight(i,l),i?i.addEventListener("transitionend",d):l.classList.remove(e2.classes.VIEW_HIDDEN);function d(u){u.propertyName===c&&(i.removeEventListener("transitionend",d),l.classList.remove(e2.classes.VIEW_HIDDEN),h())}})})}_slideToView(t,e,a){a==="left"?(t&&(t.style.transform="translate3d(-100%, 0, 0)"),e.style.transform="translate3d(0, 0, 0)"):(t&&(t.style.transform="translate3d(100%, 0, 0)"),e.style.transform="translate3d(0, 0, 0)")}_fadeToView(t,e){t&&(t.style.opacity="0"),e.style.opacity="1"}_animateHeight(t,e){let a=t?this._getViewHeight(t):0,o=this._getViewHeight(e);a!==o&&(this._rootElement.addEventListener("transitionend",this._onRootTransitionEnd.bind(this)),this._setHeight(a),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._setHeight(o)})}))}_onRootTransitionEnd(t){t.propertyName==="height"&&(this._rootElement.removeEventListener("transitionend",this._onRootTransitionEnd),this._rootElement.style.removeProperty("height"))}setAnimationType(t){switch(we([e2.classes.VIEW_SWITCHER_SLIDE,e2.classes.VIEW_SWITCHER_FADE],this._component),t){case"slide":this._component.classList.add(e2.classes.VIEW_SWITCHER_SLIDE);break;case"fade":this._component.classList.add(e2.classes.VIEW_SWITCHER_FADE);break}}_getViews(){return this._slotElement.assignedNodes().filter(t=>t.nodeType===1)}_setHeight(t){this._rootElement.style.height=`${t}px`}_getViewHeight(t){let e=0,a=t.children.length?Array.from(t.children):[t];for(let o of a){let n=window.getComputedStyle(o),i=parseFloat(n.marginTop)+parseFloat(n.marginBottom);e+=Math.ceil(o.offsetHeight+i)}return e}};var Pl=class{constructor(t){this._adapter=t;this._viewCount=0;this._viewIndex=0;this._animationType="none";this._viewsChangedListener=()=>this._onViewsChanged()}initialize(){this._viewCount=this._adapter.getViewCount(),this._adapter.startViewObserver(this._viewsChangedListener),this._adapter.setAnimationType(this._animationType),this._viewCount&&this._initializeAnimationType()}destroy(){this._adapter.stopViewObserver()}_initializeAnimationType(){switch(this._animationType){case"slide":this._adapter.initializeSlideViews(this._viewIndex);break;case"fade":this._adapter.initializeFadeViews(this._viewIndex);break;case"none":default:this._adapter.hideInactiveViews(this._viewIndex);break}}_onViewsChanged(){if(this._viewCount=this._adapter.getViewCount(),this._viewCount===0&&(this._viewIndex=0),this._viewCount&&this._initializeAnimationType(),this._viewCount>0&&this._viewIndex>=this._viewCount){let t=this._viewIndex;this._viewIndex=this._viewCount>0?this._viewCount-1:0,this._goToView(t,this._viewCount)}}async _goToView(t,e){if(this._viewCount=k(e)?e:this._adapter.getViewCount(),!(!(this._viewIndex>=0&&this._viewIndex<=this._viewCount-1)||t===this._clampedViewIndex(this._viewIndex,this._viewCount)))switch(this._animationType){case"slide":let o=this._viewIndex>t?"left":"right";await this._adapter.transitionToView(t,this._viewIndex,"slide",o),this._adapter.initializeSlideViews(this._viewIndex);break;case"fade":await this._adapter.transitionToView(t,this._viewIndex,"fade"),this._adapter.initializeFadeViews(this._viewIndex);break;case"none":default:this._adapter.setActiveView(this._viewIndex);break}}_clampedViewIndex(t,e){return t<0?t=0:t>e-1&&(t=e>0?e-1:0),t}next(){this.index++}previous(){this.index--}goToStart(){this.index=0}goToEnd(){this.index=this._viewCount-1}get index(){return this._viewIndex}set index(t){if(this._viewIndex!==t){let e=this._viewIndex;this._viewIndex=t,this._goToView(e),this._adapter.setHostAttribute(e2.attributes.INDEX,this._viewIndex.toString())}}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._initializeAnimationType(),this._adapter.setAnimationType(this._animationType),this._adapter.setHostAttribute(e2.attributes.ANIMATION_TYPE,this._animationType))}};var Eb=`${b}view`,D6={elementName:Eb};var Cb="<template><slot></slot></template>",zb=":host{display:block}:host([hidden]){display:none}",la=class extends M{constructor(){super(),H(this,Cb,zb)}};la=s([y({name:D6.elementName})],la);var Ab='<template><div class="forge-view-switcher" part="root"><slot></slot></div></template>',Bb=":host{height:var(--_view-switcher-height);width:var(--_view-switcher-width);display:block}:host([hidden]){display:none}.forge-view-switcher{--_view-switcher-height:var(--forge-view-switcher-height, auto);--_view-switcher-width:var(--forge-view-switcher-width, auto);--_view-switcher-animation-duration:var(--forge-view-switcher-animation-duration, var(--forge-animation-duration-medium2, 300ms));--_view-switcher-animation-easing:var(--forge-view-switcher-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-view-switcher{height:var(--_view-switcher-height);width:var(--_view-switcher-width);position:relative;overflow:hidden;transition-property:height;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing)}.forge-view-switcher ::slotted(.forge-view-switcher__view--hidden){position:absolute;top:0;right:0;bottom:0;left:0}:host(.slide) ::slotted(forge-view){transition-property:transform;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing);will-change:transform}:host(.fade) ::slotted(forge-view){transition-property:opacity;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing);will-change:opacity}:host(.fade) ::slotted(.forge-view-switcher__view--hidden){opacity:0}",va=class extends M{static get observedAttributes(){return[e2.attributes.INDEX,e2.attributes.ANIMATION_TYPE]}constructor(){super(),H(this,Ab,Bb),this._core=new Pl(new Dl(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case e2.attributes.INDEX:this.index=W(a);break;case e2.attributes.ANIMATION_TYPE:this.animationType=a;break}}next(){this._core.next()}previous(){this._core.previous()}goToStart(){this._core.goToStart()}goToEnd(){this._core.goToEnd()}};s([v()],va.prototype,"index",2),s([v()],va.prototype,"animationType",2),va=s([y({name:e2.elementName,dependencies:[la]})],va);function P6(){x(la)}function N6(){x(va)}var Tb=`${b}deprecated-button`,Sb={TYPE:"type",DISABLED:"disabled",FULL_WIDTH:"full-width"},kb={BUTTON:"button,a"},Ot={elementName:Tb,attributes:Sb,selectors:kb};var Ob='<template><slot></slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></template>',Db=':host{--_button-primary-color:var(--forge-button-primary-color, var(--forge-theme-primary, #3f51b5));--_button-text-color:var(--forge-button-text-color, var(--_button-primary-color));--_button-disabled-color:var(--forge-button-disabled-color, var(--forge-theme-surface-container, #e0e0e0));--_button-padding:var(--forge-button-padding, var(--forge-spacing-medium, 16px));--_button-display:var(--forge-button-display, inline-flex);--_button-justify:var(--forge-button-justify, center);--_button-shape:var(--forge-button-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_button-height:var(--forge-button-height, 36px);--_button-min-width:var(--forge-button-min-width, 64px);--_button-spacing:var(--forge-button-spacing, var(--forge-spacing-xsmall, 8px));--_button-border-width:var(--forge-button-border-width, medium);--_button-border-style:var(--forge-button-border-style, none);--_button-border-color:var(--forge-button-border-color, currentColor);--_button-shape-start-start-radius:var(--forge-button-shape-start-start-radius, var(--_button-shape));--_button-shape-start-end-radius:var(--forge-button-shape-start-end-radius, var(--_button-shape));--_button-shape-end-start-radius:var(--forge-button-shape-end-start-radius, var(--_button-shape));--_button-shape-end-end-radius:var(--forge-button-shape-end-end-radius, var(--_button-shape));--_button-padding-block:var(--forge-button-padding-block, var(--_button-padding));--_button-padding-inline:var(--forge-button-padding-inline, var(--_button-padding));--_button-background:var(--forge-button-background, transparent);--_button-hover-background:var(--forge-button-hover-background, var(--_button-background));--_button-active-background:var(--forge-button-active-background, var(--_button-background));--_button-color:var(--forge-button-color, var(--_button-text-color));--_button-icon-size:var(--forge-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125));--_button-shadow:var(--forge-button-shadow, none);--_button-hover-shadow:var(--forge-button-hover-shadow, none);--_button-active-shadow:var(--forge-button-active-shadow, none);--_button-cursor:var(--forge-button-cursor, pointer);--_button-transition-duration:var(--forge-button-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-transition-timing:var(--forge-button-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-text-padding-inline:var(--forge-button-text-padding-inline, var(--forge-spacing-xsmall, 8px));--_button-outlined-background:var(--forge-button-outlined-background, transparent);--_button-outlined-color:var(--forge-button-outlined-color, var(--_button-primary-color));--_button-outlined-border-width:var(--forge-button-outlined-border-width, var(--forge-border-thin, 1px));--_button-outlined-border-style:var(--forge-button-outlined-border-style, solid);--_button-outlined-border-color:var(--forge-button-outlined-border-color, var(--_button-primary-color));--_button-tonal-background:var(--forge-button-tonal-background, var(--forge-theme-primary-container, #d1d5ed));--_button-tonal-disabled-background:var(--forge-button-tonal-disabled-background, var(--_button-disabled-color));--_button-tonal-color:var(--forge-button-tonal-color, var(--forge-theme-on-primary-container, #222c62));--_button-tonal-disabled-color:var(--forge-button-tonal-disabled-color, var(--_button-disabled-text-color));--_button-filled-background:var(--forge-button-filled-background, var(--_button-primary-color));--_button-filled-disabled-background:var(--forge-button-filled-disabled-background, var(--_button-disabled-color));--_button-filled-color:var(--forge-button-filled-color, var(--forge-theme-on-primary, #ffffff));--_button-filled-disabled-color:var(--forge-button-filled-disabled-color, var(--_button-disabled-text-color));--_button-raised-background:var(--forge-button-raised-background, var(--_button-primary-color));--_button-raised-disabled-background:var(--forge-button-raised-disabled-background, var(--_button-disabled-color));--_button-raised-color:var(--forge-button-raised-color, var(--forge-theme-on-primary, #ffffff));--_button-raised-disabled-color:var(--forge-button-raised-disabled-color, var(--_button-disabled-text-color));--_button-raised-shadow:var(--forge-button-raised-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_button-raised-hover-shadow:var(--forge-button-raised-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_button-raised-active-shadow:var(--forge-button-raised-active-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12));--_button-raised-disabled-shadow:var(--forge-button-raised-disabled-shadow, none);--_button-link-color:var(--forge-button-link-color, var(--_button-primary-color));--_button-link-text-decoration:var(--forge-button-link-text-decoration, underline);--_button-link-height:var(--forge-button-link-height, auto);--_button-link-padding:var(--forge-button-link-padding, 0);--_button-link-line-height:var(--forge-button-link-line-height, normal);--_button-link-width:var(--forge-button-link-width, auto);--_button-link-hover-text-decoration:var(--forge-button-link-hover-text-decoration, none);--_button-link-active-opacity:var(--forge-button-link-active-opacity, 0.65);--_button-link-transition-duration:var(--forge-button-link-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-link-transition-timing:var(--forge-button-link-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-disabled-cursor:var(--forge-button-disabled-cursor, not-allowed);--_button-disabled-text-color:var(--forge-button-disabled-text-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_button-disabled-background:var(--forge-button-disabled-background, transparent);--_button-disabled-border-color:var(--forge-button-disabled-border-color, var(--_button-disabled-color));--_button-disabled-shadow:var(--forge-button-disabled-shadow, none);--_button-dense-height:var(--forge-button-dense-height, 24px);--_button-pill-shape:var(--forge-button-pill-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_button-pill-padding-inline:var(--forge-button-pill-padding-inline, var(--forge-spacing-small, 12px));--_button-focus-indicator-offset:var(--forge-button-focus-indicator-offset, 4px);--_button-text-focus-indicator-offset:var(--forge-button-text-focus-indicator-offset, 0px);--_button-link-focus-indicator-offset:var(--forge-button-link-focus-indicator-offset, 2px);--_button-popover-icon-transition-duration:var(--forge-button-popover-icon-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-popover-icon-transition-timing:var(--forge-button-popover-icon-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-popover-icon-open-rotation:var(--forge-button-popover-icon-open-rotation, 180deg)}:host{display:var(--_button-display);position:relative;outline:0;vertical-align:middle;-webkit-tap-highlight-color:transparent;border-radius:var(--_button-shape)}:host([hidden]){display:none}::slotted(:is(button,a)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:var(--_button-display);align-items:center;justify-content:var(--_button-justify);gap:var(--_button-spacing);z-index:0;box-sizing:border-box;min-inline-size:var(--_button-min-width);height:var(--_button-height);inline-size:100%;border-width:var(--_button-border-width);border-style:var(--_button-border-style);border-color:var(--_button-border-color);border-start-start-radius:var(--_button-shape-start-start-radius);border-start-end-radius:var(--_button-shape-start-end-radius);border-end-start-radius:var(--_button-shape-end-start-radius);border-end-end-radius:var(--_button-shape-end-end-radius);padding-block:var(--_button-padding-block);padding-inline:var(--_button-padding-inline);box-shadow:var(--_button-shadow);outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;text-decoration:none;white-space:nowrap;background:var(--_button-background);color:var(--_button-color);cursor:var(--_button-cursor);transition-property:box-shadow,background;transition-duration:var(--_button-transition-duration);transition-timing-function:var(--_button-transition-timing);--forge-icon-font-size:1.25em}::slotted(:is(button,a))::-moz-focus-inner{padding:0;border:0}::slotted(:is(button,a)):hover{--_button-shadow:var(--_button-hover-shadow);background:var(--_button-hover-background)}::slotted(:is(button,a)):active{--_button-shadow:var(--_button-active-shadow);background:var(--_button-active-background)}::slotted(a){text-decoration:none;--forge-typography-link-text-decoration:none}forge-state-layer{--forge-state-layer-color:var(--_button-color)}forge-focus-indicator{--forge-focus-indicator-color:var(--_button-primary-color);--forge-focus-indicator-outward-offset:var(--_button-focus-indicator-offset)}:host(:is([type*=unelevated],[type*=raised])) ::slotted(:is(button,a)){--_button-background:var(--_button-filled-background);--_button-color:var(--_button-filled-color)}:host(:is([type*=unelevated],[type*=raised])) forge-state-layer{--forge-state-layer-color:var(--_button-filled-color)}:host([type*=raised]) ::slotted(:is(button,a)){--_button-background:var(--_button-raised-background);--_button-color:var(--_button-raised-color);--_button-shadow:var(--_button-raised-shadow)}:host([type*=raised]) ::slotted(:is(button,a)):hover{--_button-shadow:var(--_button-raised-hover-shadow)}:host([type*=raised]) ::slotted(:is(button,a)):active{--_button-shadow:var(--_button-raised-active-shadow)}:host([type*=outlined]) ::slotted(:is(button,a)){--_button-background:var(--_button-outlined-background);--_button-color:var(--_button-outlined-color);--_button-border-width:var(--_button-outlined-border-width);--_button-border-style:var(--_button-outlined-border-style);--_button-border-color:var(--_button-outlined-border-color)}:host([full-width]){width:100%}:host(:is([dense],[type*=dense])) ::slotted(:is(button,a)){--_button-height:var(--_button-dense-height)}:host([disabled]){cursor:var(--_button-disabled-cursor)}:host([disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-disabled-background);--_button-color:var(--_button-disabled-text-color);--_button-shadow:var(--_button-disabled-shadow);pointer-events:none}:host([type*=outlined][disabled]) ::slotted(button[disabled]){--_button-border-color:var(--_button-disabled-border-color)}:host(:is([type*=unelevated],[type*=raised])[disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-filled-disabled-background);--_button-color:var(--_button-filled-disabled-color)}:host([type*=raised][disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-raised-disabled-background);--_button-color:var(--_button-raised-disabled-color);--_button-shadow:var(--_button-raised-disabled-shadow)}',Do=class extends M{constructor(){super();this._buttonOrAnchorElement=null;this._disabled=!1;this._fullWidth=!1;this._buttonChangeListener=this._onButtonChange.bind(this);this._keydownListener=e=>this._onKeydown(e);H(this,Ob,Db),this._slotElement=g(this,"slot:not([name])"),this._focusIndicator=g(this,m1.elementName),this._stateLayer=g(this,M1.elementName)}static get observedAttributes(){return Object.values(Ot.attributes)}connectedCallback(){this._slotElement.addEventListener("slotchange",this._buttonChangeListener),this.children.length?this._initialize():Fa(this).then(()=>this._initialize())}disconnectedCallback(){this._detachButton()}attributeChangedCallback(e,a,o){switch(e){case Ot.attributes.TYPE:this.type=o;return;case Ot.attributes.DISABLED:this.disabled=p(o);return;case Ot.attributes.FULL_WIDTH:this.fullWidth=p(o);return}}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&this._stateLayer.playAnimation()}_onButtonChange(){this._detachButton(),this._initialize()}_initialize(){this._buttonOrAnchorElement=this.querySelector(Ot.selectors.BUTTON),this._buttonOrAnchorElement&&(this._stateLayer.targetElement=this._buttonOrAnchorElement,this._focusIndicator.targetElement=this._buttonOrAnchorElement,this._buttonOrAnchorElement.addEventListener("keydown",this._keydownListener),this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._disabled&&!this._buttonOrAnchorElement.disabled?this._buttonOrAnchorElement.disabled=!0:this.disabled=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled,this._buttonOrAnchorElement instanceof HTMLButtonElement&&(this._buttonAttrMutationObserver=new MutationObserver(e=>{e.some(a=>a.attributeName==="disabled")&&this._syncDisabledState()}),this._buttonAttrMutationObserver.observe(this._buttonOrAnchorElement,{attributes:!0,attributeFilter:["disabled"]})))}_syncDisabledState(){let e=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled;K(this,e,Ot.attributes.DISABLED)}_detachButton(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("keydown",this._keydownListener),this._buttonAttrMutationObserver&&(this._buttonAttrMutationObserver.disconnect(),this._buttonAttrMutationObserver=void 0)}get type(){return this._type}set type(e){this._type!==e&&(this._type=e,this.setAttribute(Ot.attributes.TYPE,this._type))}get disabled(){return this._disabled}set disabled(e){var a;this._disabled!==e&&(this._disabled=e,(a=this._buttonOrAnchorElement)==null||a.toggleAttribute(Ot.attributes.DISABLED,this._disabled),this.toggleAttribute(Ot.attributes.DISABLED,this._disabled))}get fullWidth(){return this._fullWidth}set fullWidth(e){this._fullWidth!==e&&(this._fullWidth=e,this.toggleAttribute(Ot.attributes.FULL_WIDTH,this._fullWidth))}focus(e){var a;(a=this._buttonOrAnchorElement)==null||a.focus(e)}};Do=s([y({name:Ot.elementName,dependencies:[Q,r1]})],Do);var R6=class extends X1{constructor(t){super(t)}destroy(){this._buttonElement=void 0}get buttonElement(){return this._buttonElement}_build(){var e,a;let t=document.createElement(Ot.elementName);return this._buttonElement=document.createElement("button"),this._buttonElement.type=((e=this._config.options)==null?void 0:e.type)||"button",this._buttonElement.textContent=((a=this._config.options)==null?void 0:a.text)||"",t.appendChild(this._buttonElement),t}onClick(t){var e;(e=this._buttonElement)==null||e.addEventListener("click",t)}onFocus(t){var e;(e=this._buttonElement)==null||e.addEventListener("focus",a=>t(a))}onBlur(t){var e;(e=this._buttonElement)==null||e.addEventListener("blur",a=>t(a))}};function F6(){x(Do)}var Pb=`${b}deprecated-icon-button`,U6={DISABLED:"disabled",TOGGLE:"toggle",IS_ON:"is-on",DENSITY_LEVEL:"density-level"},Nb=t1(w({},U6),{ON_ICON:"forge-icon-button-on"}),Rb={BUTTON:"button,a",ICON_LIKE:"button > i,span,svg,img,forge-icon"},Fb={TOGGLE:"forge-icon-button-toggle"},K2={elementName:Pb,observedAttributes:U6,attributes:Nb,selectors:Rb,events:Fb};var Ub='<template><slot></slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></template>',Wb=":host{--_icon-button-display:var(--forge-icon-button-display, inline-flex);--_icon-button-size:var(--forge-icon-button-size, 48px);--_icon-button-gap:var(--forge-icon-button-gap, 0);--_icon-button-icon-color:var(--forge-icon-button-icon-color, currentColor);--_icon-button-background-color:var(--forge-icon-button-background-color, none);--_icon-button-icon-size:var(--forge-icon-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.5));--_icon-button-cursor:var(--forge-icon-button-cursor, pointer);--_icon-button-padding:var(--forge-icon-button-padding, var(--forge-spacing-xxsmall, 4px));--_icon-button-border:var(--forge-icon-button-border, none);--_icon-button-shadow:var(--forge-icon-button-shadow, none);--_icon-button-transition-duration:var(--forge-icon-button-transition-duration, var(--forge-animation-duration-short3, 150ms));--_icon-button-transition-timing:var(--forge-icon-button-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_icon-button-shape:var(--forge-icon-button-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_icon-button-shape-start-start:var(--forge-icon-button-shape-start-start, var(--_icon-button-shape));--_icon-button-shape-start-end:var(--forge-icon-button-shape-start-end, var(--_icon-button-shape));--_icon-button-shape-end-start:var(--forge-icon-button-shape-end-start, var(--_icon-button-shape));--_icon-button-shape-end-end:var(--forge-icon-button-shape-end-end, var(--_icon-button-shape));--_icon-button-shape-squared:var(--forge-icon-button-shape-squared, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_icon-button-outlined-border-width:var(--forge-icon-button-outlined-border-width, 1px);--_icon-button-outlined-border-style:var(--forge-icon-button-outlined-border-style, solid);--_icon-button-outlined-border-color:var(--forge-icon-button-outlined-border-color, var(--_icon-button-icon-color));--_icon-button-tonal-icon-color:var(--forge-icon-button-tonal-icon-color, var(--forge-theme-on-primary-container, #222c62));--_icon-button-tonal-background-color:var(--forge-icon-button-tonal-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-filled-icon-color:var(--forge-icon-button-filled-icon-color, var(--forge-theme-on-primary, #ffffff));--_icon-button-filled-background-color:var(--forge-icon-button-filled-background-color, var(--forge-theme-primary, #3f51b5));--_icon-button-raised-shadow:var(--forge-icon-button-raised-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_icon-button-raised-hover-shadow:var(--forge-icon-button-raised-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_icon-button-raised-active-shadow:var(--forge-icon-button-raised-active-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12));--_icon-button-raised-disabled-shadow:var(--forge-icon-button-raised-disabled-shadow, none);--_icon-button-density-small-size:var(--forge-icon-button-density-small-size, 24px);--_icon-button-density-small-padding:var(--forge-icon-button-density-small-padding, var(--forge-spacing-xxxsmall, 2px));--_icon-button-density-small-icon-size:var(--forge-icon-button-density-small-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125));--_icon-button-density-medium-size:var(--forge-icon-button-density-medium-size, 36px);--_icon-button-density-medium-padding:var(--forge-icon-button-density-medium-padding, var(--forge-spacing-xxsmall, 4px));--_icon-button-density-large-size:var(--forge-icon-button-density-large-size, var(--_icon-button-size));--_icon-button-toggle-on-background-color:var(--forge-icon-button-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-toggle-on-icon-color:var(--forge-icon-button-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-outlined-toggle-on-background-color:var(--forge-icon-button-outlined-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-outlined-toggle-on-icon-color:var(--forge-icon-button-outlined-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-tonal-toggle-background-color:var(--forge-icon-button-tonal-toggle-background-color, var(--forge-theme-surface-container-low, #ebebeb));--_icon-button-tonal-toggle-on-background-color:var(--forge-icon-button-tonal-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-tonal-toggle-on-icon-color:var(--forge-icon-button-tonal-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-background-color:var(--forge-icon-button-filled-toggle-background-color, var(--forge-theme-surface-container-low, #ebebeb));--_icon-button-filled-toggle-icon-color:var(--forge-icon-button-filled-toggle-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-on-background-color:var(--forge-icon-button-filled-toggle-on-background-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-on-icon-color:var(--forge-icon-button-filled-toggle-on-icon-color, var(--forge-theme-on-primary, #ffffff));--_icon-button-disabled-cursor:var(--forge-icon-button-disabled-cursor, not-allowed);--_icon-button-disabled-opacity:var(--forge-icon-button-disabled-opacity, 0.38);--_icon-button-popover-icon-padding:var(--forge-icon-button-popover-icon-padding, var(--forge-spacing-xsmall, 8px));--_icon-button-focus-indicator-color:var(--forge-icon-button-focus-indicator-color, var(--forge-theme-primary, #3f51b5))}:host{display:var(--_icon-button-display);position:relative;outline:0;-webkit-tap-highlight-color:transparent;border-start-start-radius:var(--_icon-button-shape-start-start);border-start-end-radius:var(--_icon-button-shape-start-end);border-end-start-radius:var(--_icon-button-shape-end-start);border-end-end-radius:var(--_icon-button-shape-end-end)}:host([hidden]){display:none}::slotted(:is(button,a)){position:relative;z-index:0;display:var(--_icon-button-display);align-items:center;justify-content:center;gap:var(--_icon-button-gap);box-sizing:border-box;height:var(--_icon-button-density-large-size);min-width:var(--_icon-button-density-large-size);border:var(--_icon-button-border);border-start-start-radius:var(--_icon-button-shape-start-start);border-start-end-radius:var(--_icon-button-shape-start-end);border-end-start-radius:var(--_icon-button-shape-end-start);border-end-end-radius:var(--_icon-button-shape-end-end);padding:var(--_icon-button-padding);box-shadow:var(--_icon-button-shadow);color:var(--_icon-button-icon-color);background:var(--_icon-button-background-color);font-size:var(--_icon-button-icon-size);cursor:var(--_icon-button-cursor);user-select:none;transition-property:box-shadow,background;transition-duration:var(--_icon-button-transition-duration);transition-timing-function:var(--_icon-button-transition-timing);font-size:var(--_icon-button-icon-size);height:var(--_icon-button-size);width:var(--_icon-button-size)}::slotted(a){text-decoration:none;color:var(--_icon-button-icon-color)!important}forge-state-layer{--forge-state-layer-color:var(--_icon-button-icon-color)}forge-focus-indicator{--forge-focus-indicator-outward-offset:0px;--forge-focus-indicator-color:var(--_icon-button-focus-indicator-color);--forge-focus-indicator-shape-start-start:var(--_icon-button-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_icon-button-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_icon-button-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_icon-button-shape-end-end)}:host(:is([dense],[density=large]):not(:is([density=medium],[density-level]))){--_icon-button-size:var(--_icon-button-density-small-size);--_icon-button-icon-size:var(--_icon-button-density-small-icon-size);--_icon-button-padding:var(--_icon-button-density-small-padding);--forge-icon-font-size:var(--_icon-button-icon-size)}:host([dense]:not([density=large]):not([density=small]):is([density=medium],[density-level])){--_icon-button-size:var(--_icon-button-density-medium-size);--_icon-button-padding:var(--_icon-button-density-medium-padding)}:host([disabled]){cursor:var(--_icon-button-disabled-cursor)}:host([disabled]) ::slotted(button[disabled]){pointer-events:none;opacity:var(--_icon-button-disabled-opacity)}:host([toggle]:is([on],[is-on]):not([is-on=false])){--_icon-button-background-color:var(--_icon-button-toggle-on-background-color);--_icon-button-icon-color:var(--_icon-button-toggle-on-icon-color);--_icon-button-background-color:var(--forge-icon-button-background-color, var(--forge-theme-primary-container-low, #e8eaf6))}",Po=class extends M{constructor(){super();this._disabled=!1;this._toggle=!1;this._isOn=!1;this._densityLevel=0;this._buttonOrAnchorElement=null;this._slotChangeListener=this._onSlotChange.bind(this);this._keydownListener=this._onKeydown.bind(this);this._toggleClickListener=this._onToggle.bind(this);H(this,Ub,Wb),this._slotElement=g(this,"slot:not([name])"),this._focusIndicator=g(this,m1.elementName),this._stateLayer=g(this,M1.elementName)}static get observedAttributes(){return Object.values(K2.attributes)}connectedCallback(){this._slotElement.addEventListener("slotchange",this._slotChangeListener),this.children.length?this._initialize():Fa(this).then(()=>this._initialize())}disconnectedCallback(){this._detachButton()}attributeChangedCallback(e,a,o){switch(e){case K2.attributes.DISABLED:this.disabled=p(o);return;case K2.attributes.TOGGLE:this.toggle=p(o);return;case K2.attributes.IS_ON:this.isOn=p(o);return;case K2.attributes.DENSITY_LEVEL:this.densityLevel=W(o);return}}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&this._stateLayer.playAnimation()}_onSlotChange(){this._detachButton(),this._initialize()}_onToggle(){this.isOn=!this._isOn,this.dispatchEvent(new CustomEvent("forge-icon-button-toggle",{bubbles:!0,composed:!0,detail:this._isOn}))}_initialize(){this._buttonOrAnchorElement=this.querySelector(K2.selectors.BUTTON),this._buttonOrAnchorElement&&(this._stateLayer.targetElement=this._buttonOrAnchorElement,this._focusIndicator.targetElement=this._buttonOrAnchorElement,this._buttonOrAnchorElement.addEventListener("keydown",this._keydownListener),this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._disabled&&!this._buttonOrAnchorElement.disabled?this._buttonOrAnchorElement.disabled=!0:this.disabled=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled,this._toggle&&this._initializeToggle(),this._buttonOrAnchorElement instanceof HTMLButtonElement&&(this._buttonAttrMutationObserver=new MutationObserver(e=>{e.some(a=>a.attributeName==="disabled")&&this._syncDisabledState()}),this._buttonAttrMutationObserver.observe(this._buttonOrAnchorElement,{attributes:!0,attributeFilter:["disabled"]})))}_syncDisabledState(){let e=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled;this.toggleAttribute(K2.attributes.DISABLED,e)}_detachButton(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("keydown",this._keydownListener),this._buttonAttrMutationObserver&&(this._buttonAttrMutationObserver.disconnect(),this._buttonAttrMutationObserver=void 0)}_initializeToggle(){this._buttonOrAnchorElement&&(this._buttonOrAnchorElement.addEventListener("click",this._toggleClickListener),this._syncToggleState())}_destroyToggle(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("click",this._toggleClickListener)}_syncToggleState(){let e=Array.from(this.querySelectorAll(K2.selectors.ICON_LIKE)),a=e.find(n=>n.hasAttribute(K2.attributes.ON_ICON)),o=e.filter(n=>n!==a);a==null||a.toggleAttribute("hidden",!this._isOn),o.forEach(n=>n.toggleAttribute("hidden",this._isOn)),this.toggleAttribute(K2.attributes.IS_ON,this._isOn)}get disabled(){return this._disabled}set disabled(e){var a;e=!!e,this._disabled!==e&&(this._disabled=e,(a=this._buttonOrAnchorElement)==null||a.toggleAttribute(K2.attributes.DISABLED,this._disabled),this.toggleAttribute(K2.attributes.DISABLED,this._disabled))}get toggle(){return this._toggle}set toggle(e){e=!!e,this._toggle!==e&&(this._toggle=e,this.isConnected&&(this._toggle?this._initializeToggle():this._destroyToggle()),this.toggleAttribute(K2.attributes.TOGGLE,this._toggle))}get isOn(){return this._isOn}set isOn(e){e=!!e,this._isOn!==e&&(this._isOn=e,this.isConnected&&this._syncToggleState())}get densityLevel(){return this._densityLevel}set densityLevel(e){this._densityLevel!==e&&(this._densityLevel=e,this.setAttribute(K2.attributes.DENSITY_LEVEL,String(this._densityLevel)))}focus(e){var a;(a=this._buttonOrAnchorElement)==null||a.focus(e)}};Po=s([y({name:K2.elementName,dependencies:[X,Q,r1]})],Po);var W6=class extends X1{constructor(t){super(t)}destroy(){this._buttonElement=void 0}get buttonElement(){return this._buttonElement}_build(){var e;let t=document.createElement(K2.elementName);if(this._buttonElement=document.createElement("button"),this._buttonElement.type="button",t.appendChild(this._buttonElement),(e=this._config.options)!=null&&e.tooltip){let a=document.createElement("forge-tooltip");a.textContent=this._config.options.tooltip,this._config.options.tooltipPosition&&(a.position=this._config.options.tooltipPosition),t.appendChild(a)}return t}onClick(t){var e;(e=this._buttonElement)==null||e.addEventListener("click",t)}onFocus(t){var e;(e=this._buttonElement)==null||e.addEventListener("focus",t)}onBlur(t){var e;(e=this._buttonElement)==null||e.addEventListener("blur",t)}get iconElement(){return this._iconElement}get disabled(){var t;return!!((t=this._buttonElement)!=null&&t.disabled)}set disabled(t){this._buttonElement&&(this._buttonElement.disabled=t)}_configure(){this._configureIcon()}_configureIcon(){var e,a,o,n;if(!((e=this._config.options)!=null&&e.iconName))return;switch(((a=this._config.options)==null?void 0:a.iconType)||"component"){case"font":let i=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[ke];(o=this._buttonElement)==null||o.classList.add(...i),this._buttonElement&&(this._buttonElement.textContent=this._config.options.iconName);break;case"component":this._iconElement=document.createElement(h1.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&this._iconElement.classList.add(...this._config.options.iconClass),(n=this._buttonElement)==null||n.appendChild(this._iconElement);break}}};function G6(){x(Po)}var Nl=class extends I{constructor(t){super(t)}startButtonObserver(){this._buttonChangeObserver=new MutationObserver(t=>{let e=t.reduce((a,{addedNodes:o})=>{let n=Array.from(o).filter(i=>i.nodeType===Node.ELEMENT_NODE).map(i=>i.nodeName.toLowerCase()===I2.elementName?i:i.querySelector(I2.elementName)).filter(i=>!!i);return a.concat(n)},[]);e.length&&(e.forEach(a=>{a.variant=this._component.variant,a.theme=this._component.theme,a.disabled=this._component.disabled,a.dense=this._component.dense}),this.setPill(this._component.pill))}),this._buttonChangeObserver.observe(this._component,{childList:!0,subtree:!0})}destroyButtonObserver(){var t;(t=this._buttonChangeObserver)==null||t.disconnect(),this._buttonChangeObserver=void 0}setVariant(t){this._getButtons().forEach(a=>a.variant=t)}setTheme(t){this._getButtons().forEach(a=>a.theme=t)}setDisabled(t){this._getButtons().forEach(a=>a.disabled=t)}setDense(t){this._getButtons().forEach(a=>a.dense=t)}setPill(t){let e=this._getButtons();e.length>2&&Array.from(e).slice(1,e.length-1).filter(({pill:n})=>n).forEach(n=>n.pill=!1);let a=e[0];a&&(a.pill=t);let o=e[e.length-1];o&&(o.pill=t)}_getButtons(){return this._component.querySelectorAll(I2.elementName)}};var Gb=`${b}split-button`,Yb={VARIANT:"variant",THEME:"theme",DISABLED:"disabled",DENSE:"dense",PILL:"pill"},Kb={DEFAULT_VARIANT:"text",DEFAULT_THEME:"primary"},u2={elementName:Gb,attributes:Yb,defaults:Kb};var Rl=class{constructor(t){this._adapter=t;this._variant=u2.defaults.DEFAULT_VARIANT;this._theme=u2.defaults.DEFAULT_THEME;this._disabled=!1;this._dense=!1;this._pill=!1}initialize(){this._adapter.startButtonObserver(),this._adapter.setVariant(this._variant),this._adapter.setTheme(this._theme),this._adapter.setDisabled(this._disabled),this._adapter.setDense(this._dense),this._adapter.setPill(this._pill)}destroy(){this._adapter.destroyButtonObserver()}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t!=null?t:u2.defaults.DEFAULT_VARIANT,this._adapter.setVariant(t),this._adapter.setHostAttribute(u2.attributes.VARIANT,this._variant))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:u2.defaults.DEFAULT_THEME,this._adapter.setTheme(this._theme),this._adapter.setHostAttribute(u2.attributes.THEME,this._theme))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(u2.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setDense(this._dense),this._adapter.toggleHostAttribute(u2.attributes.DENSE,this._dense))}get pill(){return this._pill}set pill(t){this._pill!==t&&(this._pill=t,this._adapter.setPill(this._pill),this._adapter.toggleHostAttribute(u2.attributes.PILL,this._pill))}};var qb="<template><slot></slot></template>",$b=":host{--_split-button-min-width:var(--forge-split-button-min-width, 0);--_split-button-gap:var(--forge-split-button-gap, var(--forge-border-thin, 1px));--_split-button-focus-indicator-offset:var(--forge-split-button-focus-indicator-offset, var(--forge-button-focus-indicator-offset, 4px));--_split-button-focus-indicator-divider-offset:var(--forge-split-button-focus-indicator-divider-offset, var(--_split-button-gap));--_split-button-focus-indicator-offset-adjusted:calc(var(--_split-button-focus-indicator-offset) + var(--_split-button-focus-indicator-divider-offset) * 2)}:host{display:inline-flex;justify-content:center;align-items:center}:host([hidden]){display:none}::slotted(*){--forge-button-min-width:var(--_split-button-min-width);--forge-button-focus-indicator-offset:var(--_split-button-focus-indicator-offset)}::slotted(:first-child){--forge-button-shape-start-end-radius:0;--forge-button-shape-end-end-radius:0;--forge-focus-indicator-shape-start-end:0;--forge-focus-indicator-shape-end-end:0;--forge-focus-indicator-offset-inline:0 var(--_split-button-focus-indicator-offset-adjusted)}::slotted(:not(:first-child):not(:last-child)){--forge-button-shape:0;--forge-focus-indicator-shape:0;--forge-focus-indicator-offset-inline:var(--_split-button-focus-indicator-offset-adjusted)}::slotted(:last-child){--forge-button-shape-start-start-radius:0;--forge-button-shape-end-start-radius:0;--forge-focus-indicator-shape-start-start:0;--forge-focus-indicator-shape-end-start:0;--forge-focus-indicator-offset-inline:var(--_split-button-focus-indicator-offset-adjusted) 0}:host([variant=outlined]){--_split-button-focus-indicator-divider-offset:var(--forge-split-button-focus-indicator-divider-offset, 0px)}:host([variant=outlined]) ::slotted(:not(:first-child)){margin-inline-start:calc(-1 * var(--_split-button-gap))}:host(:is([variant=tonal],[variant=filled],[variant=raised],:not([variant]))) ::slotted(:not(:last-child)){margin-inline-end:var(--_split-button-gap)}",ze=class extends M{static get observedAttributes(){return[u2.attributes.VARIANT,u2.attributes.THEME,u2.attributes.DISABLED,u2.attributes.DENSE,u2.attributes.PILL]}constructor(){super(),H(this,qb,$b),this._core=new Rl(new Nl(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case u2.attributes.VARIANT:this.variant=a;break;case u2.attributes.THEME:this.theme=a;break;case u2.attributes.DISABLED:this.disabled=p(a);break;case u2.attributes.DENSE:this.dense=p(a);break;case u2.attributes.PILL:this.pill=p(a);break}}};s([v()],ze.prototype,"variant",2),s([v()],ze.prototype,"theme",2),s([v()],ze.prototype,"disabled",2),s([v()],ze.prototype,"dense",2),s([v()],ze.prototype,"pill",2),ze=s([y({name:u2.elementName,dependencies:[V2]})],ze);function $A1(){x(ze)}function tB1(){let r="0123456789ABCDEF".split(""),t="#";for(let e=0;e<6;e++)t+=r[Math.floor(Math.random()*16)];return t}function uT1(){G3(),sv(),zh(),oh(),ih(),ic(),vv(),qc(),ho(),Xc(),nh(),Zc(),rp(),np(),Bh(),cc(),gc(),Op(),Pp(),_c(),Nc(),Uc(),Rc(),Np(),Gp(),Kp(),$p(),ep(),sc(),Qp(),U3(),Bc(),nd(),vd(),iv(),gv(),N3(),hd(),cd(),fd(),pd(),Cc(),yd(),bh(),mh(),dh(),Ch(),Md(),Hd(),ad(),td(),R3(),Td(),Sd(),th(),Id(),Rd(),fh(),nc(),xc(),yc(),Ad(),Nd(),Ud(),yh(),Yd(),jd(),p6(),g6(),nv(),w6(),_6(),Ic(),V6(),I6(),b6(),kc(),S6(),O6(),rc(),ah(),P6(),N6()}function _T1(){F6(),G6()}export{wa as ACCORDION_CONSTANTS,J3 as ANIMATION_FILL,W1 as APP_BAR_CONSTANTS,Ne as APP_BAR_HELP_BUTTON_CONSTANTS,to as APP_BAR_MENU_BUTTON_CONSTANTS,m2 as APP_BAR_NOTIFICATION_BUTTON_CONSTANTS,_1 as APP_BAR_PROFILE_BUTTON_CONSTANTS,A2 as APP_BAR_SEARCH_CONSTANTS,Zl as ARIA_CONTROLS_PLACEHOLDER_ID,s1 as AUTOCOMPLETE_CONSTANTS,Ca as AVATAR_CONSTANTS,z4 as AVATAR_TAG_NAME,bn as AccordionAdapter,ua as AccordionComponent,yn as AccordionCore,Vn as AppBarAdapter,be as AppBarComponent,En as AppBarCore,mi as AppBarHelpButtonAdapter,q0 as AppBarHelpButtonComponent,gi as AppBarHelpButtonCore,io as AppBarMenuButtonComponent,qn as AppBarNotificationButtonAdapter,Le as AppBarNotificationButtonComponent,$n as AppBarNotificationButtonCore,Ci as AppBarProfileButtonAdapter,U2 as AppBarProfileButtonComponent,zi as AppBarProfileButtonCore,zn as AppBarSearchAdapter,h0 as AppBarSearchComponent,Cn as AppBarSearchCore,rs as AutocompleteAdapter,c2 as AutocompleteComponent,Kc as AutocompleteComponentDelegate,ns as AutocompleteCore,Wc as AutocompleteMode,Ve as AvatarComponent,s2 as BACKDROP_CONSTANTS,j2 as BADGE_CONSTANTS,M2 as BANNER_CONSTANTS,Z1 as BASE_DRAWER_CONSTANTS,F as BASE_FIELD_CONSTANTS,bt as BASE_SELECT_CONSTANTS,A1 as BOTTOM_SHEET_CONSTANTS,Bt as BUTTON_AREA_CONSTANTS,I2 as BUTTON_CONSTANTS,y3 as BUTTON_FORM_ATTRIBUTES,Z2 as BUTTON_TOGGLE_CONSTANTS,N1 as BUTTON_TOGGLE_GROUP_CONSTANTS,We as BackdropComponent,G0 as BadgeComponent,rh as BadgeComponentDelegate,is as BannerAdapter,g0 as BannerComponent,ss as BannerCore,I as BaseAdapter,M as BaseComponent,X1 as BaseComponentDelegate,ra as BaseDrawerAdapter,Ke as BaseDrawerComponent,na as BaseDrawerCore,b2 as BaseField,mo as BaseFieldAdapter,go as BaseFieldCore,To as BaseSelectAdapter,yt as BaseSelectComponent,So as BaseSelectCore,ds as BottomSheetAdapter,Ge as BottomSheetComponent,ms as BottomSheetCore,_i as ButtonAdapter,gs as ButtonAreaAdapter,Aa as ButtonAreaComponent,ws as ButtonAreaCore,V2 as ButtonComponent,xi as ButtonComponentDelegate,fi as ButtonCore,Ti as ButtonToggleAdapter,le as ButtonToggleComponent,Si as ButtonToggleCore,ki as ButtonToggleGroupAdapter,Q2 as ButtonToggleGroupComponent,Oi as ButtonToggleGroupCore,m as CALENDAR_CONSTANTS,kp as CALENDAR_DROPDOWN_CONSTANTS,T as CALENDAR_MENU_CONSTANTS,Mr as CARD_CONSTANTS,G5 as CDN_BASE_URL,z1 as CHECKBOX_CONSTANTS,d1 as CHIP_CONSTANTS,g2 as CHIP_FIELD_CONSTANTS,tt as CHIP_SET_CONSTANTS,C2 as CIRCULAR_PROGRESS_CONSTANTS,g1 as COLOR_PICKER_CONSTANTS,b as COMPONENT_NAME_PREFIX,Vs as CalendarAdapter,v1 as CalendarComponent,Sp as CalendarComponentDelegate,Es as CalendarCore,_o as CalendarDropdown,fs as CalendarMenuAdapter,Ye as CalendarMenuComponent,xs as CalendarMenuCore,vp as CalendarMonthFocus,fo as CardComponent,xl as CellAlign,Di as CheckboxAdapter,J2 as CheckboxComponent,uc as CheckboxComponentDelegate,Pi as CheckboxCore,es as ChipAdapter,y2 as ChipComponent,as as ChipCore,Qi as ChipFieldAdapter,za as ChipFieldComponent,Fc as ChipFieldComponentDelegate,Ji as ChipFieldCore,wo as ChipSetComponent,Cs as CircularProgressAdapter,Tt as CircularProgressComponent,zs as CircularProgressCore,As as ColorPickerAdapter,ce as ColorPickerComponent,Ss as ColorPickerCore,j4 as ColorPickerValueType,ft as DATE_PICKER_CONSTANTS,k2 as DATE_RANGE_PICKER_CONSTANTS,X4 as DEFAULT_COLOR,hn as DEFAULT_DATE_MASK,Wo as DEFERRED_LABEL_TARGET,Ot as DEPRECATED_BUTTON_CONSTANTS,K2 as DEPRECATED_ICON_BUTTON_CONSTANTS,O as DIALOG_CONSTANTS,co as DIVIDER_CONSTANTS,Zp as DRAWER_CONSTANTS,ga as DateInputMask,Os as DatePickerAdapter,Mo as DatePickerComponent,Yp as DatePickerComponentDelegate,Ds as DatePickerCore,Ps as DatePickerRange,l2 as DateRange,qp as DateRangeComponentDelegate,Ns as DateRangePickerAdapter,oa as DateRangePickerComponent,Rs as DateRangePickerCore,fr as DayOfWeek,Jr as Deferred,Do as DeprecatedButtonComponent,R6 as DeprecatedButtonComponentDelegate,Po as DeprecatedIconButtonComponent,W6 as DeprecatedIconButtonComponentDelegate,hs as DialogAdapter,E1 as DialogComponent,ps as DialogCore,Vt as DismissibleStack,Z0 as DividerComponent,Ho as DrawerComponent,tv as EASING,D1 as EXPANSION_PANEL_CONSTANTS,fn as ExpansionPanelAdapter,_t as ExpansionPanelComponent,xn as ExpansionPanelCore,V as FIELD_CONSTANTS,w1 as FILE_PICKER_CONSTANTS,Q1 as FLOATING_ACTION_BUTTON_CONSTANTS,m1 as FOCUS_INDICATOR_CONSTANTS,$i as FieldAdapter,k1 as FieldComponent,Xi as FieldCore,Ws as FilePickerAdapter,Gt as FilePickerComponent,rd as FilePickerComponentDelegate,Gs as FilePickerCore,Ys as FloatingActionButtonAdapter,_0 as FloatingActionButtonComponent,ld as FloatingActionButtonComponentDelegate,Ks as FloatingActionButtonCore,Ln as FocusIndicatorAdapter,Q as FocusIndicatorComponent,In as FocusIndicatorCore,a2 as FormFieldComponentDelegate,Xr as GlobalConfiguration,L3 as HAS_MERIDIEM_REGEX,J as ICON_BUTTON_CONSTANTS,ke as ICON_CLASS_NAME,h1 as ICON_CONSTANTS,mn as ICON_REGISTRY_KEY,$3 as INITIAL_ORIGIN_SCALE,Eo as INLINE_MESSAGE_CONSTANTS,CH as INPUT_ARIA_ATTRIBUTES,zH as INPUT_PROPERTIES,Cm as ISO_8601_REGEX,zm as ISO_TIMEZONE_REGEX,gn as IconAdapter,Bn as IconButtonAdapter,n1 as IconButtonComponent,mv as IconButtonComponentDelegate,An as IconButtonCore,X as IconComponent,P0 as IconComponentDelegate,un as IconCore,q as IconRegistry,Co as InlineMessageComponent,p2 as KEYBOARD_SHORTCUT_CONSTANTS,W5 as KEYSTROKE_DEBOUNCE_THRESHOLD,Ta as KeyComponent,qe as KeyItemComponent,qs as KeyboardShortcutAdapter,xt as KeyboardShortcutComponent,$s as KeyboardShortcutCore,o2 as LABEL_CONSTANTS,pe as LABEL_VALUE_CONSTANTS,S2 as LINEAR_PROGRESS_CONSTANTS,I1 as LIST_CONSTANTS,l1 as LIST_ITEM_CONSTANTS,Ki as LabelAdapter,ve as LabelComponent,qi as LabelCore,zo as LabelValueComponent,bd as LabelValueComponentDelegate,ae as LinearProgressComponent,Xn as ListAdapter,h2 as ListComponent,jn as ListCore,Zn as ListItemAdapter,j1 as ListItemComponent,Qn as ListItemCore,e1 as MENU_CONSTANTS,i4 as MINIMUM_PRESS_MS,ed as MINI_DRAWER_CONSTANTS,Lo as MODAL_DRAWER_CONSTANTS,pi as MenuAdapter,x2 as MenuComponent,di as MenuCore,Y1 as MeterComponent,O2 as MeterGroupComponent,Vo as MiniDrawerComponent,Fs as ModalDrawerAdapter,Io as ModalDrawerComponent,Us as ModalDrawerCore,i5 as NAVIGATION_KEYS,It as OPEN_ICON_CONSTANTS,N as OPTION_CONSTANTS,ia as OPTION_GROUP_CONSTANTS,B as OVERLAY_CONSTANTS,Zv as OVERLAY_FALLBACK_PLACEMENT_MAP,Qa as OpenIconComponent,Zs as OptionAdapter,J1 as OptionComponent,Qs as OptionCore,Xe as OptionGroupComponent,Gc as OptionType,Fn as OverlayAdapter,d2 as OverlayComponent,Wn as OverlayCore,X3 as PADDING,Ld as PAGE_STATE_CONSTANTS,$ as PAGINATOR_CONSTANTS,Tm as PARSEABLE_TIME_FORMAT,Z as POPOVER_CONSTANTS,_h as POPOVER_HOVER_TIMEOUT,q3 as PRESS_GROW_MS,Q3 as PRESS_PSEUDO,Y as PROFILE_CARD_CONSTANTS,Ao as PageStateComponent,js as PaginatorAdapter,ot as PaginatorComponent,Xs as PaginatorCore,ev as PointerState,ti as PopoverAdapter,P1 as PopoverComponent,ai as PopoverCore,wi as ProfileCardAdapter,F2 as ProfileCardComponent,ui as ProfileCardCore,f1 as RADIO_CONSTANTS,po as RADIO_GROUP_CONSTANTS,EH as REFLECTIVE_ARIA_ATTRIBUTES,Ri as RadioAdapter,vt as RadioComponent,Fi as RadioCore,Ui as RadioGroupAdapter,Q0 as RadioGroupComponent,Wi as RadioGroupCore,Bo as SCAFFOLD_CONSTANTS,G2 as SELECT_CONSTANTS,je as SELECT_DROPDOWN_CONSTANTS,ni as SKELETON_CONSTANTS,pt as SKIP_LINK_CONSTANTS,E as SLIDER_CONSTANTS,Z3 as SOFT_EDGE_CONTAINER_RATIO,j3 as SOFT_EDGE_MINIMUM_SIZE,u2 as SPLIT_BUTTON_CONSTANTS,t2 as SPLIT_VIEW_CONSTANTS,D as SPLIT_VIEW_PANEL_CONSTANTS,D2 as STACK_CONSTANTS,M1 as STATE_LAYER_CONSTANTS,R as STEPPER_CONSTANTS,S as STEP_CONSTANTS,no as SUPPORTS_POPOVER,i1 as SWITCH_CONSTANTS,$e as ScaffoldComponent,Js as SelectAdapter,Ee as SelectComponent,Wd as SelectComponentDelegate,tl as SelectCore,al as SelectDropdownAdapter,f0 as SelectDropdownComponent,el as SelectDropdownCore,kd as SelectOptionType,Y0 as SkeletonComponent,ko as SkipLinkComponent,w2 as SliderComponent,Xd as SliderComponentDelegate,b3 as SlottedElementAdapter,bl as SortDirection,Nl as SplitButtonAdapter,ze as SplitButtonComponent,Rl as SplitButtonCore,cl as SplitViewAdapter,Jd as SplitViewAnimatingLayer,Ce as SplitViewComponent,pl as SplitViewCore,hl as SplitViewPanelAdapter,H2 as SplitViewPanelComponent,vl as SplitViewPanelCore,dl as StackAdapter,de as StackComponent,ml as StackCore,Mn as StateLayerAdapter,r1 as StateLayerComponent,Ja as StateLayerCoords,Hn as StateLayerCore,wl as StepAdapter,Y2 as StepComponent,ul as StepCore,_l as StepperAdapter,St as StepperComponent,fl as StepperCore,Gi as SwitchAdapter,W2 as SwitchComponent,Lc as SwitchComponentDelegate,Yi as SwitchCore,f as TABLE_CONSTANTS,T1 as TAB_BAR_CONSTANTS,F1 as TAB_CONSTANTS,V1 as TEXT_FIELD_CONSTANTS,U as TIME_PICKER_CONSTANTS,B1 as TOAST_CONSTANTS,mr as TOOLBAR_CONSTANTS,o1 as TOOLTIP_CONSTANTS,K3 as TOUCH_DELAY_MS,Fm as TWELVE_HOUR_TIME_MASK,Um as TWELVE_HOUR_TIME_MASK_WITH_SECONDS,an as TWELVE_HOUR_TIME_REGEX,Wm as TWENTY_FOUR_HOUR_TIME_MASK,Gm as TWENTY_FOUR_HOUR_TIME_MASK_WITH_SECONDS,$a as TWENTY_FOUR_HOUR_TIME_REGEX,Il as TabAdapter,El as TabBarAdapter,Mt as TabBarComponent,Cl as TabBarCore,kt as TabComponent,Vl as TabCore,yl as TableAdapter,q1 as TableComponent,Ll as TableCore,$x as TableFilterType,Hl as TableRow,ji as TextFieldAdapter,m0 as TextFieldComponent,J0 as TextFieldComponentDelegate,Zi as TextFieldCore,dn as TimeInputMask,zl as TimePickerAdapter,O1 as TimePickerComponent,T6 as TimePickerComponentDelegate,Sl as TimePickerCore,kl as ToastAdapter,Kt as ToastComponent,Ol as ToastCore,se as ToolbarComponent,Gn as TooltipAdapter,p1 as TooltipComponent,Kn as TooltipCore,D6 as VIEW_CONSTANTS,e2 as VIEW_SWITCHER_CONSTANTS,p5 as ViewAnimationDirection,la as ViewComponent,Dl as ViewSwitcherAdapter,Vb as ViewSwitcherAnimationType,va as ViewSwitcherComponent,Pl as ViewSwitcherCore,k3 as awaitIconDefinition,n0 as canUserHoverElements,nl as clampSize,a6 as clearState,e4 as cloneAttributes,Am as cloneProperties,Bm as cloneValidationMessage,q4 as coerceDateFromValue,da as coerceStringToArray,h6 as createOverlay,wn as createSanitizedSvg,M3 as createSvgFromString,w3 as createUserInteractionListener,G3 as defineAccordionComponent,sv as defineAppBarComponent,zh as defineAppBarHelpButtonComponent,oh as defineAppBarMenuButtonComponent,ih as defineAppBarNotificationButtonComponent,ic as defineAppBarProfileButtonComponent,vv as defineAppBarSearchComponent,qc as defineAutocompleteComponent,ho as defineAvatarComponent,Xc as defineBackdropComponent,nh as defineBadgeComponent,Zc as defineBannerComponent,rp as defineBottomSheetComponent,np as defineButtonAreaComponent,Bh as defineButtonComponent,cc as defineButtonToggleComponent,gc as defineButtonToggleGroupComponent,Op as defineCalendarComponent,zl1 as defineCalendarMenuComponent,Pp as defineCardComponent,_c as defineCheckboxComponent,Nc as defineChipComponent,Uc as defineChipFieldComponent,Rc as defineChipSetComponent,Np as defineCircularProgressComponent,Gp as defineColorPickerComponent,uT1 as defineComponents,Kp as defineDatePickerComponent,$p as defineDateRangePickerComponent,F6 as defineDeprecatedButtonComponent,_T1 as defineDeprecatedComponents,G6 as defineDeprecatedIconButtonComponent,ep as defineDialogComponent,sc as defineDividerComponent,Qp as defineDrawerComponent,U3 as defineExpansionPanelComponent,Bc as defineFieldComponent,nd as defineFilePickerComponent,vd as defineFloatingActionButtonComponent,iv as defineFocusIndicatorComponent,gv as defineIconButtonComponent,N3 as defineIconComponent,hd as defineInlineMessageComponent,cd as defineKeyComponent,pd as defineKeyItemComponent,fd as defineKeyboardShortcutComponent,Cc as defineLabelComponent,yd as defineLabelValueComponent,bh as defineLinearProgressComponent,mh as defineListComponent,dh as defineListItemComponent,Ch as defineMenuComponent,Md as defineMeterComponent,Hd as defineMeterGroupComponent,ad as defineMiniDrawerComponent,td as defineModalDrawerComponent,R3 as defineOpenIconComponent,Td as defineOptionComponent,Sd as defineOptionGroupComponent,th as defineOverlayComponent,Id as definePageStateComponent,Rd as definePaginatorComponent,fh as definePopoverComponent,nc as defineProfileCardComponent,xc as defineRadioComponent,yc as defineRadioGroupComponent,Ad as defineScaffoldComponent,Nd as defineSelectComponent,Ud as defineSelectDropdownComponent,yh as defineSkeletonComponent,Yd as defineSkipLinkComponent,jd as defineSliderComponent,$A1 as defineSplitButtonComponent,p6 as defineSplitViewComponent,ub1 as defineSplitViewPanelComponent,g6 as defineStackComponent,nv as defineStateLayerComponent,w6 as defineStepComponent,_6 as defineStepperComponent,Ic as defineSwitchComponent,V6 as defineTabBarComponent,I6 as defineTabComponent,b6 as defineTableComponent,kc as defineTextFieldComponent,S6 as defineTimePickerComponent,O6 as defineToastComponent,rc as defineToolbarComponent,ah as defineTooltipComponent,P6 as defineViewComponent,N6 as defineViewSwitcherComponent,w0 as dialogStack,wd as elementAcceptsTextInput,Y3 as elementName,_3 as elementsOverlapping,_n as emulateUserToggle,t4 as eventIncludesArrowKey,xr as eventIncludesDate,Hp as eventIncludesElement,D3 as fetchIconContent,sf as fixKey,Ga as forgeLabelRef,d3 as formatDate,S0 as forwardAttributes,Ko as frame,W4 as getAccessibleHeader,Bp as getAllYearOptions,S3 as getCachedIcon,yp as getClearButton,v5 as getCurrentTimeOfDayMillis,n5 as getCursor,F4 as getDateElement,at as getDateId,Ba as getDateRangeFromDates,gp as getDateRow,bs as getDateSpacerElement,Ep as getDatesFromDateRange,Ls as getDatesInRange,mp as getDayElement,Pu as getDayId,K4 as getEventDescriptions,up as getEventElement,wp as getEventWrapperElement,R4 as getEventWrapperId,Is as getEventsOnDate,br as getFirstDateOfWeek,p41 as getFirstDayOfMonth,cp as getFirstDayOfWeekForLocale,bp as getFooter,$t as getFormState,Lt as getFormValue,us as getGrid,ip as getGridItems,v6 as getHandleIcon,U4 as getHeader,yr as getIndexOfDate,jl as getLastDateOfMonth,Lp as getLastDateOfWeek,lp as getList,_s as getListItems,hp as getLocalizedDayOfMonth,N4 as getLocalizedDayOfWeek,aa as getLocalizedMonth,u0 as getLocalizedYear,Hs as getMinAndMaxDates,nf as getModiferKeysString,fp as getMonthButtonContent,Y4 as getMonthDates,m3 as getMonthLength,zp as getMonthOptions,Tp as getMultipleFromRange,AH as getPartPrefixedAttributes,Sa as getPixelDimension,sp as getScrollSpy,Yc as getSelectedOption,ys as getSortedDaysOfWeek,ll as getSplitViewPanelSibling,Mp as getTodayButton,_p as getTooltip,Xt as getValidationMessage,sl as getValuenow,c41 as getWeekDates,pp as getWeekendDaysForLocale,xp as getYearButtonContent,Ap as getYearOptions,l6 as handleBoundariesAfterResize,il as handleBoundariesDuringResize,ls as hideBackdrop,g3 as highlightTextHTML,A6 as hoursToMillis,t6 as initState,jt as inputType,a1 as internals,ct as isDisabled,$1 as isFocusable,ht as isInMonth,Nu as isInRange,f3 as isInstanceOf,lc as isLabelAware,o5 as isOptionGroupObject,Af as isOptionObject,gr as isOptionType,Ql as isPointerOverElement,dp as isRtlLocale,H3 as isSafeSvg,f2 as isSameDate,a5 as isSelectOptionType,uo as isSelected,E3 as isSupportedTimeFormat,Ip as isToday,r6 as keyboardResize,Yo as locateElementById,en as locateTargetHeuristic,_d as matchKeyCombination,i6 as maxResize,KV1 as mergeDateWithTime,C6 as millisToHours,Bl as millisToMinutes,z6 as millisToMinutesClamped,db as millisToSeconds,s5 as millisToSecondsClamped,Yt as millisToTimeString,n6 as minResize,Tl as minutesToMillis,wr as optionEqualPredicate,W0 as overlayStack,Ru as parseDateOffset,p3 as parseDateString,ud as parseKeyCombinations,px as parseSize,Cp as parseYearRange,u3 as percentToPixels,_H as pixelsToPercent,o6 as pointerResize,U5 as prefersReducedMotion,x3 as proxyShadowScrollEvent,tB1 as randomHexColor,ur as removeAllExceptLastChild,O3 as removeIconListener,Ka as replaceElement,s6 as resizeSibling,qa as roundByDPR,fH as safeMax,B0 as safeMin,P3 as sanitizeExternalType,tn as scaleValue,l5 as secondsToMillis,Zt as setAriaControls,P as setDefaultAria,e6 as setState,G4 as setTabindexOnElement,wt as setValidity,$4 as shouldHandleEvent,vs as showBackdrop,Ms as sortDates,Vp as splitIntoWeeks,B6 as stripSecondsFromMillis,R5 as supportsElementInternalsAria,F5 as supportsHover,jr as supportsPopover,Qt as task,gd as textInputTypes,Al as timeStringToMillis,V3 as tokenize12HourTimeString,I3 as tokenize24HourTimeString,Ni as tryCheck,C3 as tryCoerceTimeString,Oe as tryCreateAriaControlsPlaceholder,T0 as tryDismiss,bH as unwrapElements,Zr as updateTarget,xH as wrapElements};
|
|
61
|
+
`}_syncMeters(){this._meters.forEach(e=>{e.direction=this.direction,e.min=this.min,e.max=this.max})}_handleMeterChange(e){e.stopPropagation(),this._meters.reduce((a,o,n,i)=>(o.style.setProperty("--_meter-z-index",`${i.length-n}`),o.style.setProperty("--_meter-inset",`${a}%`),a+o.percentage),0)}_handleHeadingSlotChange(){let e=[...this._labelNodes,...this._valueNodes].filter(a=>{var o;return!!((o=a.textContent)!=null&&o.trim())});this._hasSlottedHeadingContent=!!e.length}};O2.styles=oe(mf),O2.formAssociated=!0,s([S1({type:Number})],O2.prototype,"min",2),s([S1({type:Number})],O2.prototype,"max",2),s([S1({type:Boolean})],O2.prototype,"tickmarks",2),s([S1()],O2.prototype,"direction",2),s([S1()],O2.prototype,"density",2),s([S1()],O2.prototype,"shape",2),s([S1({attribute:"inner-shape"})],O2.prototype,"innerShape",2),s([ne()],O2.prototype,"_hasSlottedHeadingContent",2),s([j0({slot:"label"})],O2.prototype,"_labelNodes",2),s([j0({slot:"value"})],O2.prototype,"_valueNodes",2),s([tc({selector:"forge-meter"})],O2.prototype,"_meters",2),O2=s([Re("forge-meter-group")],O2);function Hd(){ue("forge-meter-group",O2)}var gf=`${b}page-state`,Ld={elementName:gf};var wf='<template><div class="forge-page-state" part="root"><div class="graphic" part="graphic-container"><slot name="graphic"></slot></div><div class="title" part="title-container"><slot name="title"></slot></div><div class="message" part="message-container"><slot name="message"></slot></div><div class="actions" part="actions-container"><slot name="action"></slot></div></div></template>',uf=':host{--_page-state-width:var(--forge-page-state-width, 576px);--_page-state-height:var(--forge-page-state-height, auto);--_page-state-spacing:var(--forge-page-state-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-mobile-width:var(--forge-page-state-mobile-width, 70%);--_page-state-graphic-height:var(--forge-page-state-graphic-height, 296px);--_page-state-graphic-spacing:var(--forge-page-state-graphic-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-mobile-graphic-height:var(--forge-page-state-mobile-graphic-height, auto);--_page-state-title-color:var(--forge-page-state-title-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_page-state-title-spacing:var(--forge-page-state-title-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-title-spacing-mobile:var(--forge-page-state-title-spacing-mobile, var(--forge-spacing-large, 24px));--_page-state-message-color:var(--forge-page-state-message-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_page-state-message-spacing:var(--forge-page-state-message-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-message-spacing-mobile:var(--forge-page-state-message-spacing-mobile, var(--forge-spacing-large, 24px));--_page-state-actions-spacing:var(--forge-page-state-actions-spacing, 16px)}:host{display:flex;justify-content:center;align-items:center;width:100%;container-type:inline-size}:host([hidden]){display:none}.forge-page-state{width:var(--_page-state-width);margin-block:var(--_page-state-spacing);text-align:center}.forge-page-state .graphic{display:flex;justify-content:center;align-items:center;height:var(--_page-state-graphic-height);width:100%;margin-block-end:var(--_page-state-graphic-spacing)}.forge-page-state .graphic ::slotted([slot=graphic]){height:100%;width:100%}.forge-page-state .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading8-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading8-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading8-font-size-scale, 2.25)));font-weight:var(--forge-typography-heading8-font-weight,500);line-height:var(--forge-typography-heading8-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading8-line-height-scale, 2.625)));letter-spacing:var(--forge-typography-heading8-letter-spacing, -.0027777778em);text-transform:var(--forge-typography-heading8-text-transform,inherit);text-decoration:var(--forge-typography-heading8-text-decoration,inherit);--_page-state-title-spacing:var(--_page-state-title-spacing-mobile);color:var(--_page-state-title-color);margin-block:var(--_page-state-title-spacing)}.forge-page-state .message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body4-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body4-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1.25)));font-weight:var(--forge-typography-body4-font-weight,400);line-height:var(--forge-typography-body4-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.75)));letter-spacing:var(--forge-typography-body4-letter-spacing, .005em);text-transform:var(--forge-typography-body4-text-transform,inherit);text-decoration:var(--forge-typography-body4-text-decoration,inherit);--_page-state-message-spacing:var(--_page-state-message-spacing-mobile);color:var(--_page-state-message-color);margin-block-end:var(--_page-state-message-spacing)}.forge-page-state .actions{display:grid;justify-content:center;grid-auto-flow:column;gap:var(--_page-state-actions-spacing)}@container (max-width:599px){.forge-page-state{--_page-state-width:var(--_page-state-mobile-width)}.forge-page-state .graphic{--_page-state-graphic-height:var(--_page-state-mobile-graphic-height);--_page-state-graphic-spacing:var(--forge-page-state-graphic-spacing, 0)}.forge-page-state .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading5-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading5-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading5-font-size-scale, 1.5)));font-weight:var(--forge-typography-heading5-font-weight,500);line-height:var(--forge-typography-heading5-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading5-line-height-scale, 1.75)));letter-spacing:var(--forge-typography-heading5-letter-spacing, 0);text-transform:var(--forge-typography-heading5-text-transform,inherit);text-decoration:var(--forge-typography-heading5-text-decoration,inherit)}.forge-page-state .message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit)}.forge-page-state .actions{grid-auto-flow:row}}',Ao=class extends M{constructor(){super(),H(this,wf,uf)}};Ao=s([y({name:Ld.elementName})],Ao);function Id(){x(Ao)}var Vd=`${b}paginator`,Ed={PAGE_INDEX:"page-index",PAGE_SIZE:"page-size",OFFSET:"offset",TOTAL:"total",PAGE_SIZE_OPTIONS:"page-size-options",LABEL:"label",FIRST_LAST:"first-last",FIRST:"first",DISABLED:"disabled",ALTERNATIVE:"alternative"},_f=w({},Ed),ff={LABEL:".label > slot[name=label]",PAGE_SIZE_SELECT:".page-size-options",RANGE_LABEL:".range-label > slot[name=range-label]",FIRST_PAGE_BUTTON:".first-page",FIRST_PAGE_CONTAINER:"#first-page-container",PREVIOUS_PAGE_BUTTON:".previous-page",PREVIOUS_PAGE_CONTAINER:"#previous-page-container",NEXT_PAGE_BUTTON:".next-page",NEXT_PAGE_CONTAINER:"#next-page-container",LAST_PAGE_BUTTON:".last-page",LAST_PAGE_CONTAINER:"#last-page-container",RANGE_LABEL_ALTERNATIVE:".alternative-range-label > slot[name=alternative-range-label]"},xf={CHANGE:`${Vd}-change`},bf={DEFAULT_PAGE_INDEX:0,DEFAULT_TOTAL:0,DEFAULT_PAGE_SIZE:25,DEFAULT_PAGE_SIZE_OPTIONS:[5,15,25,50,100]},yf={DEFAULT_LABEL:"Rows per page:",RANGE_SEPARATOR_LABEL:"of"},$={elementName:Vd,observedAttributes:Ed,attributes:_f,selectors:ff,events:xf,numbers:bf,strings:yf};var Xs=class{constructor(t){this._adapter=t;this._pageIndex=$.numbers.DEFAULT_PAGE_INDEX;this._pageSize=$.numbers.DEFAULT_PAGE_SIZE;this._offset=0;this._total=$.numbers.DEFAULT_TOTAL;this._pageSizeOptions=$.numbers.DEFAULT_PAGE_SIZE_OPTIONS.map(t=>({label:`${t}`,value:`${t}`}));this._label=$.strings.DEFAULT_LABEL;this._firstLast=!1;this._first=!1;this._disabled=!1;this._alternative=!1;this._firstPageListener=this._onFirstPage.bind(this);this._previousPageListener=this._onPreviousPage.bind(this);this._nextPageListener=this._onNextPage.bind(this);this._lastPageListener=this._onLastPage.bind(this);this._pageSizeListener=this._onPageSizeChanged.bind(this)}initialize(){this._updateRangeLabel(),this._adapter.setLabel(this._label),this._adapter.setPageSizeOptions(this._pageSizeOptions),this._adapter.setPageSize(this._pageSize),this._attachListeners(),this._toggleFirstLastButtons(),this._syncInteractionState()}focus(t){this._adapter.setFocus(t)}_attachListeners(){this._adapter.attachPageSizeChangeListener(this._pageSizeListener),this._adapter.attachFirstPageListener(this._firstPageListener),this._adapter.attachPreviousPageListener(this._previousPageListener),this._adapter.attachNextPageListener(this._nextPageListener),this._adapter.attachLastPageListener(this._lastPageListener)}_onFirstPage(t){if(t.stopPropagation(),!this._hasFirstPage())return;let e=0;this._dispatchChangeEvent("first-page",{pageIndex:e})&&this._applyPageIndex(e)}_onPreviousPage(t){if(t.stopPropagation(),!this._hasPreviousPage())return;let e=this._pageIndex-1;this._dispatchChangeEvent("previous-page",{pageIndex:e})&&this._applyPageIndex(e)}_onNextPage(t){if(t.stopPropagation(),!this._hasNextPage())return;let e=this._pageIndex+1;this._dispatchChangeEvent("next-page",{pageIndex:e})&&this._applyPageIndex(e)}_onLastPage(t){if(t.stopPropagation(),!this._hasLastPage())return;let e=this._getMaxPages();this._dispatchChangeEvent("last-page",{pageIndex:e})&&this._applyPageIndex(e)}_onPageSizeChanged(t){t.stopPropagation();let e=Number(t.detail);this._dispatchChangeEvent("page-size",{pageIndex:0,pageSize:e})?(this._applyPageIndex(0),this._applyPageSize(e)):t.preventDefault()}_dispatchChangeEvent(t,{pageSize:e=this._pageSize,pageIndex:a=this._pageIndex}={}){let o=a*e,n={type:t,pageSize:e,pageIndex:a,offset:o},i=new CustomEvent($.events.CHANGE,{detail:n,bubbles:!0,cancelable:!0});return this._adapter.dispatchHostEvent(i),!i.defaultPrevented}_getMaxPages(){return Math.ceil(this._total/this._pageSize)-1}_updateRangeLabel(){let t;if(typeof this._rangeLabelCallback=="function"){let e={pageSize:this._pageSize,pageIndex:this._pageIndex,offset:this._offset,pageStart:this._pageIndex*this._pageSize+1,pageEnd:Math.min((this._pageIndex+1)*this._pageSize,this._total),total:this._total};t=this._rangeLabelCallback.call(null,e)}else if(this.pageSize>1){let e=this._pageIndex*this._pageSize,o=(Math.floor(e/this._pageSize)||0)*this._pageSize+1,n=e<this._total?Math.min(e+this._pageSize,this._total):e+this._pageSize;t=`${o}-${n} ${$.strings.RANGE_SEPARATOR_LABEL} ${this._total}`}else t=`${this._pageIndex+1} ${$.strings.RANGE_SEPARATOR_LABEL} ${this._total}`;this._adapter.setRangeLabel(t)}_syncInteractionState(){if(this._disabled)return;this._adapter.setFirstPageButtonEnabled(!0),this._adapter.setPreviousPageButtonEnabled(!0),this._adapter.setNextPageButtonEnabled(!0),this._adapter.setLastPageButtonEnabled(!0);let t=[];this._hasFirstPage()||t.push("first"),this._hasPreviousPage()||t.push("previous"),this._hasNextPage()||t.push("next"),this._hasLastPage()||t.push("last"),this._adapter.tryDisableFields(t)}_toggleFirstLastButtons(){this._toggleFirstButton(),this._firstLast?this._adapter.hasLastPageButton()||this._adapter.showLastPageButton():this._adapter.hasLastPageButton()&&this._adapter.hideLastPageButton()}_toggleFirstButton(){this._first||this._firstLast?this._adapter.hasFirstPageButton()||this._adapter.showFirstPageButton():this._adapter.hasFirstPageButton()&&this._adapter.hideFirstPageButton()}_hasFirstPage(){return this._hasPreviousPage()}_hasPreviousPage(){return this._pageIndex>0&&this._pageSize>0}_hasNextPage(){let t=this._getMaxPages();return this._pageIndex<t&&this._pageSize>0}_hasLastPage(){return this._hasNextPage()}_computePageIndexFromOffset(t){t>=this._total&&(this._total>=this._pageSize?t=this._total-this._pageSize:t=0);let e=Math.min(Math.max(t,0),this._total),a=Math.floor(e/this._pageSize);this._applyPageIndex(a)}_computeOffset(){this._total>0&&(this._offset=this._pageIndex*this._pageSize)}_applyPageIndex(t){this._pageIndex=t,this._computeOffset(),this._updateRangeLabel(),this._syncInteractionState(),this._adapter.toggleHostAttribute($.attributes.PAGE_INDEX,this._pageIndex!=null,this._pageIndex.toString())}_applyPageSize(t){this._pageSize=t,this._adapter.setPageSize(this._pageSize),this._computeOffset(),this._updateRangeLabel(),this._syncInteractionState()}_applyTotal(t){this._total=t,this._updateRangeLabel(),this._offset>0&&this._total>0&&this._computePageIndexFromOffset(this._offset),this._syncInteractionState()}_applyDisabled(t){this._disabled=t,t?(this._adapter.setPageSizeSelectEnabled(!1),this._adapter.setFirstPageButtonEnabled(!1),this._adapter.setPreviousPageButtonEnabled(!1),this._adapter.setNextPageButtonEnabled(!1),this._adapter.setLastPageButtonEnabled(!1)):(this._adapter.setPageSizeSelectEnabled(!0),this._syncInteractionState())}get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex!==t&&(k(t)?this._applyPageIndex(t):this._adapter.removeHostAttribute($.attributes.PAGE_INDEX))}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize!==t&&(this._applyPageSize(t),this._adapter.setHostAttribute($.attributes.PAGE_SIZE,`${this._pageSize}`))}get offset(){return this._offset}set offset(t){this._offset!==t&&(this._offset=t,this._computePageIndexFromOffset(t))}get total(){return this._total}set total(t){this._total!==t&&(this._applyTotal(t),this._adapter.setHostAttribute($.attributes.TOTAL,`${this._total}`))}get pageSizeOptions(){return this._pageSizeOptions.map(t=>Number(t.value))}set pageSizeOptions(t){if(rt(t)&&t.length){if(this._pageSizeOptions=t.map(e=>({label:e.toString(),value:e.toString()})).sort((e,a)=>W(e.value)-W(a.value)),this._adapter.setPageSizeOptions(this._pageSizeOptions),this._adapter.attachPageSizeChangeListener(this._pageSizeListener),this._adapter.setPageSizeVisibility(!0),k(this._pageSize)&&this._pageSizeOptions.length&&!this._pageSizeOptions.find(e=>W(e.value)===this._pageSize)){let e=W(this._pageSizeOptions[0].value);this._applyPageSize(e)}}else t!=null&&t.length||(this._adapter.detachPageSizeChangeListener(this._pageSizeListener),this._adapter.setPageSizeVisibility(!1))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.setLabel(this._label),k(this._label)&&this._label.length?this._adapter.setHostAttribute($.attributes.LABEL,String(this._label)):this._adapter.removeHostAttribute($.attributes.LABEL))}get firstLast(){return this._firstLast}set firstLast(t){t=!!t,this._firstLast!==t&&(this._firstLast=t,this._toggleFirstLastButtons(),this._adapter.toggleHostAttribute($.attributes.FIRST_LAST,this._firstLast))}get first(){return this._first}set first(t){t=!!t,this._first!==t&&(this._first=t,this._toggleFirstButton(),this._adapter.toggleHostAttribute($.attributes.FIRST,this._first))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._applyDisabled(t),this._adapter.toggleHostAttribute($.attributes.DISABLED,this._disabled))}get alternative(){return this._alternative}set alternative(t){t=!!t,t!==this._alternative&&(this._alternative=t,this._adapter.toggleHostAttribute($.attributes.ALTERNATIVE,this._alternative))}get rangeLabelCallback(){return this._rangeLabelCallback}set rangeLabelCallback(t){this._rangeLabelCallback=t,this._updateRangeLabel()}};var js=class extends I{constructor(t){super(t),this._labelElement=g(t,$.selectors.LABEL),this._pageSizeSelect=g(t,$.selectors.PAGE_SIZE_SELECT),this._rangeLabel=g(t,$.selectors.RANGE_LABEL),this._rangeLabelAlternative=g(t,$.selectors.RANGE_LABEL_ALTERNATIVE),this._firstPageButton=g(t,$.selectors.FIRST_PAGE_BUTTON),this._firstPageContainer=g(t,$.selectors.FIRST_PAGE_CONTAINER),this._previousPageButton=g(t,$.selectors.PREVIOUS_PAGE_BUTTON),this._previousPageContainer=g(t,$.selectors.PREVIOUS_PAGE_CONTAINER),this._nextPageButton=g(t,$.selectors.NEXT_PAGE_BUTTON),this._nextPageContainer=g(t,$.selectors.NEXT_PAGE_CONTAINER),this._lastPageButton=g(t,$.selectors.LAST_PAGE_BUTTON),this._lastPageContainer=g(t,$.selectors.LAST_PAGE_CONTAINER)}setLabel(t){this._labelElement.textContent=t}setPageSizeOptions(t){r2(this._pageSizeSelect),this._pageSizeSelect.options=t}setPageSize(t){this._pageSizeSelect.value=t.toString()}setRangeLabel(t){this._rangeLabel.innerText=t,this._rangeLabelAlternative.innerText=t}hasFirstPageButton(){return!!g(this._component,$.selectors.FIRST_PAGE_BUTTON)}showFirstPageButton(){this._firstPagePlaceholder=Uo(this._component,!0,$.elementName,$.selectors.FIRST_PAGE_CONTAINER,this._firstPageContainer,this._firstPagePlaceholder)}hideFirstPageButton(){this._firstPagePlaceholder=Uo(this._component,!1,$.elementName,$.selectors.FIRST_PAGE_CONTAINER,this._firstPageContainer,this._firstPagePlaceholder)}hasLastPageButton(){return!!g(this._component,$.selectors.LAST_PAGE_BUTTON)}showLastPageButton(){this._lastPagePlaceholder=Uo(this._component,!0,$.elementName,$.selectors.LAST_PAGE_CONTAINER,this._lastPageContainer,this._lastPagePlaceholder)}hideLastPageButton(){this._lastPagePlaceholder=Uo(this._component,!1,$.elementName,$.selectors.LAST_PAGE_CONTAINER,this._lastPageContainer,this._lastPagePlaceholder)}attachPageSizeChangeListener(t){this._pageSizeSelect.addEventListener("change",t)}detachPageSizeChangeListener(t){this._pageSizeSelect.removeEventListener("change",t)}attachFirstPageListener(t){this._firstPageButton.addEventListener("click",t)}attachPreviousPageListener(t){this._previousPageButton.addEventListener("click",t)}attachNextPageListener(t){this._nextPageButton.addEventListener("click",t)}attachLastPageListener(t){this._lastPageButton.addEventListener("click",t)}setFirstPageButtonEnabled(t){this._firstPageButton.disabled=!t}setPreviousPageButtonEnabled(t){this._previousPageButton.disabled=!t}setNextPageButtonEnabled(t){this._nextPageButton.disabled=!t}setLastPageButtonEnabled(t){this._lastPageButton.disabled=!t}setPageSizeSelectEnabled(t){this._pageSizeSelect.disabled=!t}setPageSizeVisibility(t){this._pageSizeSelect.hidden=!t}setFocus(t){this._tryFocus([this._pageSizeSelect,this._firstPageButton,this._previousPageButton,this._nextPageButton,this._lastPageButton],t)}tryDisableFields(t){let e={first:()=>this.setFirstPageButtonEnabled(!1),last:()=>this.setLastPageButtonEnabled(!1),previous:()=>this.setPreviousPageButtonEnabled(!1),next:()=>this.setNextPageButtonEnabled(!1)};t.forEach(a=>{var o;return(o=e[a])==null?void 0:o.call(e)})}_tryFocus(t,e){let a=typeof(e==null?void 0:e.preventScroll)=="boolean"?e.preventScroll:!0;for(let o of t)if(o&&o.isConnected&&!o.disabled&&o.style.display!=="none"){o.focus(t1(w({},e),{preventScroll:a}));return}}};function Cd(r){class t extends r{constructor(...a){super(...a)}initializeFieldInstance(a){this._fieldElement=a,this._fieldElement.shadowRoot||window.customElements.upgrade(this._fieldElement)}attributeChangedCallback(a,o,n){var i;switch(a){case F.observedAttributes.LABEL_POSITION:this.labelPosition=n;return;case F.observedAttributes.LABEL_ALIGNMENT:this.labelAlignment=n;return;case F.observedAttributes.INVALID:this.invalid=p(n);return;case F.observedAttributes.REQUIRED:this.required=p(n);return;case F.observedAttributes.OPTIONAL:this.optional=p(n);return;case F.observedAttributes.DISABLED:this.disabled=p(n);return;case F.observedAttributes.FLOAT_LABEL:this.floatLabel=p(n);return;case F.observedAttributes.VARIANT:this.variant=n;return;case F.observedAttributes.THEME:this.theme=n;return;case F.observedAttributes.SHAPE:this.shape=n;return;case F.observedAttributes.DENSITY:this.density=n;return;case F.observedAttributes.DENSE:this.dense=p(n);return;case F.observedAttributes.POPOVER_ICON:this.popoverIcon=p(n);return;case F.observedAttributes.SUPPORT_TEXT_INSET:this.supportTextInset=n;return}(i=super.attributeChangedCallback)==null||i.call(this,a,o,n)}get labelPosition(){return this._fieldElement.labelPosition}set labelPosition(a){this._fieldElement.labelPosition!==a&&(this._fieldElement.labelPosition=a,this.setAttribute(V.attributes.LABEL_POSITION,a))}get labelAlignment(){return this._fieldElement.labelAlignment}set labelAlignment(a){this._fieldElement.labelAlignment!==a&&(this._fieldElement.labelAlignment=a,this.setAttribute(V.attributes.LABEL_ALIGNMENT,a))}get invalid(){return this._fieldElement.invalid}set invalid(a){this._fieldElement.invalid!==a&&(this._fieldElement.invalid=a,this.toggleAttribute(V.attributes.INVALID,a))}get required(){return this._fieldElement.required}set required(a){this._fieldElement.required!==a&&(this._fieldElement.required=a,this.toggleAttribute(V.attributes.REQUIRED,a))}get optional(){return this._fieldElement.optional}set optional(a){this._fieldElement.optional!==a&&(this._fieldElement.optional=a,this.toggleAttribute(V.attributes.OPTIONAL,a))}get disabled(){return this._fieldElement.disabled}set disabled(a){this._fieldElement.disabled!==a&&(this._fieldElement.disabled=a,this.toggleAttribute(V.attributes.DISABLED,a))}get floatLabel(){return this._fieldElement.floatLabel}set floatLabel(a){this._fieldElement.floatLabel!==a&&(this._fieldElement.floatLabel=a,this.toggleAttribute(V.attributes.FLOAT_LABEL,a))}get variant(){return this._fieldElement.variant}set variant(a){this._fieldElement.variant!==a&&(this._fieldElement.variant=a,this.setAttribute(V.attributes.VARIANT,a))}get theme(){return this._fieldElement.theme}set theme(a){this._fieldElement.theme!==a&&(this._fieldElement.theme=a,this.setAttribute(V.attributes.THEME,a))}get shape(){return this._fieldElement.shape}set shape(a){this._fieldElement.shape!==a&&(this._fieldElement.shape=a,this.setAttribute(V.attributes.SHAPE,a))}get density(){return this._fieldElement.density}set density(a){this._fieldElement.density!==a&&(this._fieldElement.density=a,this.setAttribute(V.attributes.DENSITY,a))}get dense(){return this._fieldElement.dense}set dense(a){this._fieldElement.dense!==a&&(this._fieldElement.dense=a,this.toggleAttribute(V.attributes.DENSE,a))}get popoverIcon(){return this._fieldElement.popoverIcon}set popoverIcon(a){this._fieldElement.popoverIcon!==a&&(this._fieldElement.popoverIcon=a,this.toggleAttribute(V.attributes.POPOVER_ICON,a))}get supportTextInset(){return this._fieldElement.supportTextInset}set supportTextInset(a){this._fieldElement.supportTextInset!==a&&(this._fieldElement.supportTextInset=a,this.setAttribute(V.attributes.SUPPORT_TEXT_INSET,a))}floatLabelWithoutAnimation(a){this._fieldElement.floatLabelWithoutAnimation(a)}}return t}var Mf=`${b}scaffold`,zd={VIEWPORT:"viewport"},Hf=w({},zd),Bo={elementName:Mf,observedAttributes:zd,attributes:Hf};var Lf='<template><div class="forge-scaffold" part="root"><slot name="left"></slot><div class="header" part="header"><slot name="header"></slot></div><div class="body" part="body"><slot name="body-left"></slot><slot name="body-header"></slot><slot name="body"></slot><slot name="body-footer"></slot><slot name="body-right"></slot></div><slot name="footer"></slot><slot name="right"></slot></div></template>',If=':host{--_scaffold-height:var(--forge-scaffold-height, 100%);--_scaffold-width:var(--forge-scaffold-width, 100%)}:host{display:block;width:var(--_scaffold-width);height:var(--_scaffold-height)}:host([hidden]){display:none}.forge-scaffold{--_scaffold-overflow:var(--forge-scaffold-overflow, initial);--_scaffold-body-position:var(--forge-scaffold-body-position, relative)}.forge-scaffold{position:relative;display:grid;grid-template-areas:"left header right" "left body right" "left footer right";grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr auto;height:var(--_scaffold-height);width:var(--_scaffold-width);overflow:var(--_scaffold-overflow)}.header{grid-area:header;min-width:0;min-height:0}.body{position:var(--_scaffold-body-position);display:grid;grid-area:body;grid-template-areas:"body-left body-header body-right" "body-left body-inner body-right" "body-left body-footer body-right";grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr auto;width:var(--_scaffold-width);min-width:0;min-height:0;overflow:var(--_scaffold-overflow)}::slotted(*){min-width:0;min-height:0}::slotted([slot=left]){grid-area:left}::slotted([slot=right]){grid-area:right}::slotted([slot=body-left]){grid-area:body-left}::slotted([slot=body-right]){grid-area:body-right}::slotted([slot=body-header]){grid-area:body-header}::slotted([slot=body]){overflow:auto;grid-area:body-inner}::slotted([slot=body-footer]){grid-area:body-footer}::slotted([slot=footer]){grid-area:footer}::slotted([slot=body-left]),::slotted([slot=body-right]),::slotted([slot=body]),::slotted([slot=left]),::slotted([slot=right]){overflow:auto}:host([viewport]){--_scaffold-height:var(--forge-scaffold-height, 100dvh);--_scaffold-width:var(--forge-scaffold-width, 100dvw)}',$e=class extends M{static get observedAttributes(){return Object.values(Bo.observedAttributes)}constructor(){super(),H(this,Lf,If)}attributeChangedCallback(t,e,a){switch(t){case Bo.observedAttributes.VIEWPORT:this.viewport=a!==null;break}}get viewport(){return this.hasAttribute(Bo.attributes.VIEWPORT)}set viewport(t){this.toggleAttribute(Bo.attributes.VIEWPORT,!!t)}};$e=s([y({name:Bo.elementName})],$e);function Ad(){x($e)}var Zs=class extends I{constructor(t){super(t)}};var Bd=`${b}option`,Vf={DISABLED:"disabled",DIVIDER:"divider",LABEL:"label",SECONDARY_LABEL:"secondary-label",LEADING_ICON_CLASS:"leading-icon-class",LEADING_ICON_TYPE:"leading-icon-type",LEADING_ICON:"leading-icon",OPTION_CLASS:"option-class",TRAILING_ICON_CLASS:"trailing-icon-class",TRAILING_ICON_TYPE:"trailing-icon-type",TRAILING_ICON:"trailing-icon",VALUE:"value"},Ef={VALUE_CHANGE:`${Bd}-value-change`},N={elementName:Bd,attributes:Vf,events:Ef};var Qs=class{constructor(t){this._adapter=t;this._disabled=!1;this._divider=!1;this._optionClass=[]}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.emitHostEvent(N.events.VALUE_CHANGE,this._value))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.toggleHostAttribute(N.attributes.LABEL,!!this._label,this._label))}get secondaryLabel(){return this._secondaryLabel}set secondaryLabel(t){this._secondaryLabel!==t&&(this._secondaryLabel=t,this._adapter.toggleHostAttribute(N.attributes.SECONDARY_LABEL,!!this._secondaryLabel,this._secondaryLabel))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.toggleHostAttribute(N.attributes.DISABLED,this._disabled))}get divider(){return this._divider}set divider(t){this._divider!==t&&(this._divider=t,this._adapter.toggleHostAttribute(N.attributes.DIVIDER,this._divider))}get optionClass(){return this._optionClass}set optionClass(t){t?typeof t=="string"&&(t=t.split(" ")):t=[],t=t.filter(e=>e&&!/\s+/.test(e)),this._optionClass.toString()!==t.toString()&&(this._optionClass=t,this._adapter.toggleHostAttribute(N.attributes.OPTION_CLASS,this._optionClass&&!!this._optionClass.length,this._optionClass.join(" ")))}get leadingIcon(){return this._leadingIcon}set leadingIcon(t){this._leadingIcon!==t&&(this._leadingIcon=t,this._adapter.toggleHostAttribute(N.attributes.LEADING_ICON,!!this._leadingIcon,this._leadingIcon))}get leadingIconClass(){return this._leadingIconClass}set leadingIconClass(t){this._leadingIconClass!==t&&(this._leadingIconClass=t,this._adapter.toggleHostAttribute(N.attributes.LEADING_ICON_CLASS,!!this._leadingIconClass,this._leadingIconClass))}get leadingIconType(){return this._leadingIconType}set leadingIconType(t){this._leadingIconType!==t&&(this._leadingIconType=t,this._adapter.toggleHostAttribute(N.attributes.LEADING_ICON_TYPE,!!this._leadingIconType,this._leadingIconType))}get leadingIconComponentProps(){return this._leadingIconComponentProps}set leadingIconComponentProps(t){this._leadingIconComponentProps!==t&&(this._leadingIconComponentProps=t)}get trailingIcon(){return this._trailingIcon}set trailingIcon(t){this._trailingIcon!==t&&(this._trailingIcon=t,this._adapter.toggleHostAttribute(N.attributes.TRAILING_ICON,!!this._trailingIcon,this._trailingIcon))}get trailingIconClass(){return this._trailingIconClass}set trailingIconClass(t){this._trailingIconClass!==t&&(this._trailingIconClass=t,this._adapter.toggleHostAttribute(N.attributes.TRAILING_ICON_CLASS,!!this._trailingIconClass,this._trailingIconClass))}get trailingIconType(){return this._trailingIconType}set trailingIconType(t){this._trailingIconType!==t&&(this._trailingIconType=t,this._adapter.toggleHostAttribute(N.attributes.TRAILING_ICON_TYPE,!!this._trailingIconType,this._trailingIconType))}get trailingIconComponentProps(){return this._trailingIconComponentProps}set trailingIconComponentProps(t){this._trailingIconComponentProps!==t&&(this._trailingIconComponentProps=t)}get leadingBuilder(){return this._leadingBuilder}set leadingBuilder(t){this._leadingBuilder!==t&&(this._leadingBuilder=t)}get trailingBuilder(){return this._trailingBuilder}set trailingBuilder(t){this._trailingBuilder!==t&&(this._trailingBuilder=t)}};var J1=class extends M{static get observedAttributes(){return[N.attributes.VALUE,N.attributes.LABEL,N.attributes.SECONDARY_LABEL,N.attributes.DISABLED,N.attributes.DIVIDER,N.attributes.OPTION_CLASS,N.attributes.LEADING_ICON,N.attributes.LEADING_ICON_CLASS,N.attributes.LEADING_ICON_TYPE,N.attributes.TRAILING_ICON,N.attributes.TRAILING_ICON_CLASS,N.attributes.TRAILING_ICON_TYPE]}constructor(){super(),this._core=new Qs(new Zs(this))}attributeChangedCallback(t,e,a){switch(t){case N.attributes.VALUE:this.value=a;break;case N.attributes.LABEL:this.label=a;break;case N.attributes.SECONDARY_LABEL:this.secondaryLabel=a;break;case N.attributes.DISABLED:this.disabled=p(a);break;case N.attributes.DIVIDER:this.divider=this.hasAttribute(N.attributes.DIVIDER);break;case N.attributes.OPTION_CLASS:this.optionClass=a;break;case N.attributes.LEADING_ICON:this.leadingIcon=a;break;case N.attributes.LEADING_ICON_CLASS:this.leadingIconClass=a;break;case N.attributes.LEADING_ICON_TYPE:this.leadingIconType=a;break;case N.attributes.TRAILING_ICON:this.trailingIcon=a;break;case N.attributes.TRAILING_ICON_CLASS:this.trailingIconClass=a;break;case N.attributes.TRAILING_ICON_TYPE:this.trailingIconType=a;break}}};s([v()],J1.prototype,"value",2),s([v()],J1.prototype,"label",2),s([v()],J1.prototype,"secondaryLabel",2),s([v()],J1.prototype,"disabled",2),s([v()],J1.prototype,"divider",2),s([v()],J1.prototype,"optionClass",2),s([v()],J1.prototype,"leadingIcon",2),s([v()],J1.prototype,"leadingIconClass",2),s([v()],J1.prototype,"leadingIconType",2),s([v()],J1.prototype,"leadingIconComponentProps",2),s([v()],J1.prototype,"trailingIcon",2),s([v()],J1.prototype,"trailingIconClass",2),s([v()],J1.prototype,"trailingIconType",2),s([v()],J1.prototype,"trailingIconComponentProps",2),s([v()],J1.prototype,"leadingBuilder",2),s([v()],J1.prototype,"trailingBuilder",2),J1=s([y({name:N.elementName})],J1);function Td(){x(J1)}var Cf=`${b}option-group`,zf={LABEL:"label"},ia={elementName:Cf,attributes:zf};var Xe=class extends M{static get observedAttributes(){return[ia.attributes.LABEL]}constructor(){super()}attributeChangedCallback(t,e,a){switch(t){case ia.attributes.LABEL:this.label=a;break}}get label(){return this._label}set label(t){this._label!==t&&(this._label=t||"",this.setAttribute(ia.attributes.LABEL,this._label))}get text(){return this._label}set text(t){this.label=t}};Xe=s([y({name:ia.elementName})],Xe);function Sd(){x(Xe)}var kd=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(kd||{});function a5(r,t){let e=r.some(o=>o5(o)),a=r.some(o=>Af(o));return e&&t===1||a&&t===0}function o5(r){return k(r)&&nt(r)&&r.hasOwnProperty("options")}function Af(r){return k(r)&&nt(r)&&r.hasOwnProperty("label")&&r.hasOwnProperty("value")}var To=class extends I{constructor(t){super(t)}get popupElement(){var t;return(t=this._listDropdown)==null?void 0:t.dropdownElement}getOptions(){let t=Array.from(this._component.querySelectorAll(ia.elementName));if(t.length)return t.map(e=>{let a=Array.from(e.querySelectorAll(N.elementName)),o=this._createOptionsFromElements(a);return{text:e.label,builder:e.builder,value:e.value,options:o}});{let e=Array.from(this._component.querySelectorAll(N.elementName));return this._createOptionsFromElements(e)}}_createOptionsFromElements(t){return t.map(e=>{let a=e.hasAttribute(N.attributes.OPTION_CLASS)?e.getAttribute(N.attributes.OPTION_CLASS):e.optionClass;return typeof a=="string"&&(a=a.split(" ")),{label:e.hasAttribute(N.attributes.LABEL)?e.getAttribute(N.attributes.LABEL):k(e.label)?e.label:e.innerText,secondaryLabel:e.hasAttribute(N.attributes.SECONDARY_LABEL)?e.getAttribute(N.attributes.SECONDARY_LABEL):k(e.secondaryLabel)?e.secondaryLabel:void 0,value:e.hasAttribute(N.attributes.VALUE)?e.getAttribute(N.attributes.VALUE):e.value,disabled:e.hasAttribute(N.attributes.DISABLED),divider:e.hasAttribute(N.attributes.DIVIDER),optionClass:a,leadingIcon:e.hasAttribute(N.attributes.LEADING_ICON)?e.getAttribute(N.attributes.LEADING_ICON):e.leadingIcon,leadingIconClass:e.hasAttribute(N.attributes.LEADING_ICON_CLASS)?e.getAttribute(N.attributes.LEADING_ICON_CLASS):e.leadingIconClass,leadingIconType:e.hasAttribute(N.attributes.LEADING_ICON_TYPE)?e.getAttribute(N.attributes.LEADING_ICON_TYPE):e.leadingIconType,leadingIconComponentProps:e.leadingIconComponentProps,trailingIcon:e.hasAttribute(N.attributes.TRAILING_ICON)?e.getAttribute(N.attributes.TRAILING_ICON):e.trailingIcon,trailingIconClass:e.hasAttribute(N.attributes.TRAILING_ICON_CLASS)?e.getAttribute(N.attributes.TRAILING_ICON_CLASS):e.trailingIconClass,trailingIconType:e.hasAttribute(N.attributes.TRAILING_ICON_TYPE)?e.getAttribute(N.attributes.TRAILING_ICON_TYPE):e.trailingIconType,trailingIconComponentProps:e.trailingIconComponentProps,leadingBuilder:e.leadingBuilder,trailingBuilder:e.trailingBuilder}})}open(t){var e;if(this._listDropdown=new Pe(this._targetElement,t),this._listDropdown.open(),this._component.id){let a=(e=this._listDropdown.dropdownElement)==null?void 0:e.querySelector("forge-list");a==null||a.setAttribute("aria-labelledby",this._component.id)}}async close(){this._listDropdown&&(await this._listDropdown.close(),this.destroyListDropdown())}destroyListDropdown(){var t;(t=this._listDropdown)==null||t.destroy(),this._listDropdown=void 0}setDismissListener(t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(Z.events.TOGGLE,t)}toggleOptionMultiple(t,e){var a;(a=this._listDropdown)==null||a.toggleOptionMultiple(t,e)}getActiveOptionIndex(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:-1}activateSelectedOption(){var t;(t=this._listDropdown)==null||t.activateSelectedOption()}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}highlightActiveOption(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}patchSelectedValues(t){var e;(e=this._listDropdown)==null||e.setSelectedValues(t)}setOptionsListener(t){let e=o=>{o.stopPropagation(),t(this.getOptions())};this._component.addEventListener(N.events.VALUE_CHANGE,e);let a=new MutationObserver(()=>t(this.getOptions()));return a.observe(this._component,{childList:!0,subtree:!0}),()=>{this._component.removeEventListener(N.events.VALUE_CHANGE,e),a.disconnect()}}setOptions(t,e=!0){e&&this._clearOptions();for(let a of t)if(o5(a)){let o=this._createOptionGroupElement(a);for(let n of a.options){let i=this._createOptionElement(n);o.appendChild(i)}this._component.appendChild(o)}else{let o=this._createOptionElement(a);this._component.appendChild(o)}}appendDropdownOptions(t){var e;(e=this._listDropdown)==null||e.appendOptions(t)}setDropdownOptions(t){var e;(e=this._listDropdown)==null||e.setOptions(t)}scrollSelectedOptionIntoView(){var t;(t=this._listDropdown)==null||t.scrollSelectedOptionIntoView()}isFocusWithinPopup(t){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(t)}queueDropdownPositionUpdate(){this.popupElement&&window.requestAnimationFrame(()=>{let t=this.popupElement;t==null||t.position()})}_clearOptions(){Array.from(this._component.querySelectorAll(ia.elementName)).forEach(a=>Te(a)),Array.from(this._component.querySelectorAll(N.elementName)).forEach(a=>Te(a))}_createOptionGroupElement(t){let e=document.createElement("forge-option-group");return Object.assign(e,t),e}_createOptionElement(t){let e=document.createElement("forge-option");return Object.assign(e,t),e.textContent=t.label,t.elementAttributes&&t.elementAttributes.forEach((a,o)=>{e.setAttribute(o,a)}),e}};var Od={VALUE:"value",MULTIPLE:"multiple",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",SYNC_POPUP_WIDTH:"sync-popup-width",CONSTRAIN_POPUP_WIDTH:"constrain-popup-width",WRAP_OPTION_TEXT:"wrap-option-text"},Bf=w({},Od),Tf={CHANGE:"change"},bt={observedAttributes:Od,attributes:Bf,events:Tf};var So=class extends K0{constructor(e){super();this._adapter=e;this._options=[];this._value=[];this._multiple=!1;this._open=!1;this._selectedValues=[];this._selectedLabels=[];this._selectedIndexes=[];this._filterString="";this._focusListener=a=>this._onFocus(a),this._blurListener=a=>this._onBlur(a),this._clickListener=a=>this._onClick(a),this._keydownListener=a=>this._onKeydown(a),this._optionsChangedListener=a=>this._onOptionsChanged(a),this._activeChangeListener=a=>this._onActiveOptionChanged(a),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dismissListener=()=>this._onDismiss(),this._identifier=P2()}_onFocus(e){}initialize(){this._optionListenerDestructor&&this._optionListenerDestructor(),this._optionListenerDestructor=this._adapter.setOptionsListener(this._optionsChangedListener),this._initializeValue()}initializeTarget(){this._adapter.initializeAccessibility(),this._adapter.addClickListener(this._clickListener),this._adapter.addTargetListener("blur",this._blurListener),this._adapter.addTargetListener("focus",this._focusListener),this._adapter.addTargetListener("keydown",this._keydownListener)}destroy(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeTargetListener("blur",this._blurListener),this._adapter.removeTargetListener("focus",this._focusListener),this._adapter.removeTargetListener("keydown",this._keydownListener),this._optionListenerDestructor&&this._optionListenerDestructor(),this._open=!1,this._adapter.destroyListDropdown()}appendOptions(e){this._adapter.setOptions(e,!1),this._open&&this._adapter.appendDropdownOptions(e)}selectAll(){this._multiple&&(this.value=this._flatOptions.map(e=>e.value))}deselectAll(){this._multiple&&(this.value=[])}get _flatOptions(){return a5(this._options,1)?[].concat.apply([],this._options.map(e=>e.options)):this._options}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}_initializeValue(){let e=this._options.length&&this._options||this._adapter.getOptions();k(this._value)&&e.length&&this._applyValue(this._value)}_onClick(e){e.button===0&&(this._open?this._closeDropdown():this._openDropdown())}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._open&&this._closeDropdown()}_openDropdown(){if(this._options=this._adapter.getOptions(),!this._flatOptions.length)return;this._open=!0;let e={options:this._options,referenceElement:this._adapter.hostElement,multiple:this._multiple,selectedValues:[...this._selectedValues],id:this._identifier,optionBuilder:this._optionBuilder,syncWidth:this._syncPopupWidth,constrainViewportWidth:this._constrainPopupWidth,wrapOptionText:this._wrapOptionText,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,popupClasses:this._popupClasses,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,closeCallback:()=>this._closeDropdown(),selectCallback:a=>{let o=this._flatOptions,n=o.find(i=>i.value===a);if(n){let i=o.indexOf(n);this._onSelect(n,i,!0)}}};this._adapter.open(e),this._adapter.setDismissListener(this._dismissListener)}_closeDropdown(){this._open=!1,this._adapter.close()}async _onSelect(e,a,o=!0){return new Promise(async n=>{if(this._valueChanging)return Promise.resolve(!1);let i=e?e.value:"",l=e?e.label:"",h=[...this._value],c=[...this._selectedValues],d=[...this._selectedLabels],u=[...this._selectedIndexes];if(this._multiple)if(this._selectedValues.includes(i)){let z=this._selectedValues.indexOf(i);this._selectedValues.splice(z,1),this._selectedLabels.splice(z,1),this._selectedIndexes.splice(z,1)}else this._selectedValues.push(i),this._selectedLabels.push(l),this._selectedIndexes.push(a);else k(i)?(this._selectedValues[0]=i,this._selectedLabels[0]=l,this._selectedIndexes[0]=a):(this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]);this._value=[...this._selectedValues];let _=()=>{this._selectedValues=[...c],this._selectedLabels=[...d],this._selectedIndexes=[...u],this._value=[...h]},L=()=>{if(this._multiple){let z=this._selectedIndexes.includes(a);this._adapter.toggleOptionMultiple(a,z)}this._applySelection()},C=this.multiple?[...this._selectedValues]:this._selectedValues[0];if(this._open&&o&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"){this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,C));let z=await this._valueChanging;if(this._valueChanging=void 0,!z)return _(),this._tryUpdateDropdownPosition(),n(!1)}let A=!this._adapter.emitHostEvent(bt.events.CHANGE,C,!0,!0);A?_():L(),this._tryUpdateDropdownPosition(),n(!A)})}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._onSelect(this._nonDividerOptions[e],e)}_tryUpdateDropdownPosition(){this._open&&this._adapter.queueDropdownPositionUpdate()}_reset(){this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]}_applyValue(e){this._selectedValues=[],this._selectedLabels=[],this._options=this._adapter.getOptions(),Array.isArray(e)||(e=[e]),this._value=[];for(let a of e){this._value.includes(a)||this._value.push(a);let o=this._flatOptions.find(n=>Nt(n.value,a));o&&(this._selectedValues.push(o.value),this._selectedLabels.push(o.label))}this._selectedIndexes=this._selectedValues.map(a=>this._flatOptions.findIndex(o=>o.value===a)),this._adapter.patchSelectedValues(this._selectedValues)}_onDismiss(){this._closeDropdown()}_getSelectedText(){if(typeof this._selectedTextBuilder=="function"){let e=this._flatOptions.filter(a=>this._selectedValues.includes(a.value));return this._selectedTextBuilder(e)}return this._multiple?this._selectedLabels.length?this._selectedLabels.length===1?this._selectedLabels[0]:`${this._selectedLabels.length} options selected`:"":this._selectedLabels.filter(e=>e&&e.length).join(" ").trim()}_onKeydown(e){let a=e.key==="Escape"||e.keyCode===27,o=e.key==="Enter"||e.keyCode===13,n=e.key==="Space"||e.keyCode===32,i=e.key==="ArrowDown"||e.keyCode===40,l=e.key==="ArrowUp"||e.keyCode===38,h=e.keyCode>=48&&e.keyCode<=90,c=e.key==="Home"||e.keyCode===36,d=e.key==="End"||e.keyCode===35;if(e.key==="Tab"&&this._open&&!this._multiple){this._selectActiveOption();return}if(!h&&this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterString="",this._filterTimeout=void 0),a&&(e.preventDefault(),e.stopPropagation(),this._open)){this._closeDropdown();return}if(n)e.preventDefault(),e.stopPropagation(),this._open?this._closeDropdown():this._openDropdown();else if(o)this._open&&(e.stopPropagation(),e.preventDefault(),this._options=this._adapter.getOptions(),this._selectActiveOption());else if(l||i){if(e.preventDefault(),!this._open){this._openDropdown(),this._adapter.activateFirstOption();return}if(this._flatOptions.length===0)return;let _=0;this._open?(_=this._adapter.getActiveOptionIndex(),_===-1&&(_=this._getFirstSelectedOptionIndex())):_=this._getFirstSelectedOptionIndex(),l?_=this._getPreviousHighlightableOptionIndex(_,this._nonDividerOptions):_=this._getNextHighlightableOptionIndex(_,this._nonDividerOptions),this._adapter.highlightActiveOption(_)}else if(c)this._open&&(e.preventDefault(),this._adapter.highlightActiveOption(this._nonDividerOptions.findIndex(_=>!_.disabled)));else if(d){if(this._open){e.preventDefault();let _=this._nonDividerOptions;for(let L=_.length-1;L>=0;L--)if(!_[L].disabled){this._adapter.highlightActiveOption(L);break}}}else h&&this._filter(e.key)}_getFirstSelectedOptionIndex(){return this._nonDividerOptions.findIndex(e=>this._selectedValues.includes(e.value))}_getPreviousHighlightableOptionIndex(e,a){let o=e;return o<=0?o=a.length-1:o--,a[o].disabled?this._getPreviousHighlightableOptionIndex(o,a):o}_getNextHighlightableOptionIndex(e,a){let o=e;return o===a.length-1?o=0:o++,a[o].disabled?this._getNextHighlightableOptionIndex(o,a):o}_filter(e){this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterTimeout=void 0),this._filterString+=e,this._filterTimeout=window.setTimeout(()=>{this._filterString="",this._filterTimeout=void 0},300),this._options=this._adapter.getOptions();let a=this._flatOptions.find(({disabled:o,label:n})=>!o&&n.trim().toLowerCase().startsWith(this._filterString.trim().toLowerCase()));if(a){let o=this._flatOptions.indexOf(a);this._open?this._adapter.highlightActiveOption(o):this._multiple||this._onSelect(a,o,!1)}}_onOptionsChanged(e){this._options=e,this._applyValue(this._value)}_onActiveOptionChanged(e){this._adapter.updateActiveDescendant(e)}get value(){return this._multiple?[...this._value]:this._value[0]}set value(e){let a;Array.isArray(e)?a=[...e]:a=e,this._applyValue(a)}get selectedIndex(){return this._multiple?[...this._selectedIndexes]:this._selectedIndexes[0]}set selectedIndex(e){this._options=this._adapter.getOptions();let a;if(Array.isArray(e)?a=[...e]:a=[e],a.sort(),this.multiple)this.value=a.map(o=>this._flatOptions[o]).filter(o=>o).map(o=>o.value);else{let o=this._flatOptions[a[a.length-1]];if(!o)return;this.value=o.value}}get options(){return this._adapter.getOptions()}set options(e){let a;a5(e,1)?a=e.map(o=>w({},o)):a=e.map(o=>w({},o)),this._options=a,this._adapter.setOptions(a),this._initializeValue(),this._open&&this._adapter.setDropdownOptions(a)}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._reset(),this._open&&this._closeDropdown())}get open(){return this._open}set open(e){this._open!==e&&(e?this._openDropdown():this._closeDropdown())}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit=e}get popupClasses(){return this._popupClasses}set popupClasses(e){this._popupClasses=e}get popupHeaderBuilder(){return this._popupHeaderBuilder}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}get popupFooterBuilder(){return this._popupFooterBuilder}set popupFooterBuilder(e){this._popupFooterBuilder=e}get popupElement(){return this._adapter.popupElement}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){this._beforeValueChange=e}};var yt=class extends R2{constructor(){super()}attributeChangedCallback(t,e,a){switch(super.attributeChangedCallback(t,e,a),t){case bt.attributes.MULTIPLE:this.multiple=p(a);break;case bt.attributes.VALUE:this.value=a;break}}appendOptions(t){this._core.appendOptions(t)}selectAll(){this._core.selectAll()}deselectAll(){this._core.deselectAll()}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}};s([v()],yt.prototype,"value",2),s([v()],yt.prototype,"selectedIndex",2),s([v()],yt.prototype,"options",2),s([v()],yt.prototype,"multiple",2),s([v()],yt.prototype,"open",2),s([v()],yt.prototype,"optionBuilder",2),s([v()],yt.prototype,"selectedTextBuilder",2),s([v()],yt.prototype,"beforeValueChange",2),s([v({set:!1})],yt.prototype,"popupElement",2);var Dd=`${b}select`,Sf={FIELD:"#field",SELECTED_TEXT:"#selected-text",LABEL:"#select-label"},Pd={OPEN:"open",TYPE:"type",VALUE:"value",LABEL:"label",MULTIPLE:"multiple",DISABLED:"disabled",PLACEHOLDER:"placeholder",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},kf=w({},Pd),Of={SCROLLED_BOTTOM:`${Dd}-scrolled-bottom`},G2={elementName:Dd,observedAttributes:Pd,attributes:kf,selectors:Sf,events:Of};var Js=class extends To{constructor(t){super(t),this._fieldElement=g(t,G2.selectors.FIELD),this._labelElement=g(t,G2.selectors.LABEL),this._selectedTextElement=g(t,G2.selectors.SELECTED_TEXT),this._fieldElement.setAttribute("exportparts",Object.values(V.parts).join(", ")),this._fieldElement.focusIndicatorTargetElement=this._component}get fieldElement(){return this._fieldElement}initializeAccessibility(){this._component.setAttribute("role","combobox"),this._component.setAttribute("aria-haspopup","true"),this._component.setAttribute("aria-expanded","false"),Oe(),Zt(this._component),this.fieldElement.required&&this.setHostAttribute("aria-required","true"),this.fieldElement.disabled&&this.setHostAttribute("aria-disabled","true"),this.fieldElement.invalid&&this.setHostAttribute("aria-invalid","true"),this._component[$1]=!this._component.disabled}setLabel(t){let a=!(this._fieldElement.labelPosition==="inset"&&(this._fieldElement.density==="extra-small"||this._fieldElement.dense))&&!!(t!=null&&t.trim());(!this._component.hasAttribute("aria-label")||this._component.getAttribute("aria-label")===this._labelElement.textContent)&&this._component.setAttribute("aria-label",t),a?(this._labelElement.isConnected||this._fieldElement.insertAdjacentElement("afterbegin",this._labelElement),this._labelElement.textContent=t):this._labelElement.remove()}setPlaceholderText(t){K(this._selectedTextElement,!!(t!=null&&t.trim()),"placeholder",t)}open(t){this._targetElement||(this._targetElement=g(this._fieldElement,V.selectors.POPOVER_TARGET)),super.open(t),this._component.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._component.setAttribute("aria-expanded","true"),this._fieldElement.popoverExpanded=!0}close(){return this._component.setAttribute("aria-expanded","false"),this._component.removeAttribute("aria-activedescendant"),Zt(this._component),this._fieldElement.popoverExpanded=!1,super.close()}floatLabel(t){this._fieldElement.floatLabel=t}updateActiveDescendant(t){K(this._component,!!t,"aria-activedescendant",t)}setSelectedText(t){this._selectedTextElement.textContent=t}setDisabled(t){this._component[$1]=!t,K(this._component,t,"aria-disabled","true")}setRequired(){this._component[wt]()}addClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}addTargetListener(t,e){this._component.addEventListener(t,e)}removeTargetListener(t,e){this._component.removeEventListener(t,e)}syncValue(t){let a=(Array.isArray(t)?!t.length||!t.some(n=>n!=null):t==null)?null:new FormData,o=JSON.stringify(t);a&&t&&a.append(this._component.name,o),this._component.setFormValue(a,o),this._component[wt]()}};var tl=class extends So{constructor(e){super(e);this._label="";this._required=!1;this._permanentlyFloatLabel=!1;this._mousedownListener=this._onMouseDown.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),super.initialize(),super.initializeTarget(),this._initializeLabel(),this._initializeAccessibility(),this._adapter.addTargetListener("mousedown",this._mousedownListener)}destroy(){super.destroy(),this._adapter.removeTargetListener("mousedown",this._mousedownListener)}syncFloatingLabelState({force:e}={}){e!==void 0&&(this._permanentlyFloatLabel=e),this._updateLabel(),this._tryFloatLabel()}setDisabled(e){this._adapter.setDisabled(e)}_initializeLabel(){this._updateLabel(),this._tryFloatLabel()}_initializeValue(){super._initializeValue(),this._tryFloatLabel()}_initializeAccessibility(){this._adapter.initializeAccessibility()}_onMouseDown(e){e.preventDefault()}_onClick(e){this._adapter.fieldElement.disabled||e.composedPath().find(o=>{var n;return(n=o.matches)==null?void 0:n.call(o,"slot[name=accessory]")})||(this._adapter.focusHost(),super._onClick(e))}_openDropdown(){super._openDropdown(),this._open&&this._adapter.toggleHostAttribute(G2.attributes.OPEN,!0)}_closeDropdown(){super._closeDropdown(),this._open||this._adapter.toggleHostAttribute(G2.attributes.OPEN,!1)}_onDismiss(){super._onDismiss()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(G2.events.SCROLLED_BOTTOM)}async _onSelect(e,a,o=!0){let n=await super._onSelect(e,a,o);return n&&(this._adapter.setSelectedText(this._getSelectedText()),o&&!this._multiple&&this._adapter.focusHost()),this._tryFloatLabel(),this._adapter.syncValue(this._value),n}_reset(){super._reset(),this._adapter.setSelectedText(""),this._tryFloatLabel()}_tryFloatLabel(){if(this._permanentlyFloatLabel){this._adapter.floatLabel(!0);return}let e=!!this._getSelectedText()||!!this._selectedValues.length,a=!!this._placeholder;this._adapter.floatLabel(e||a)}_updateLabel(){this._adapter.setLabel(this._label)}_applyValue(e){super._applyValue(e),this._adapter.syncValue(this._value);let a=this._getSelectedText();this._adapter.setSelectedText(a),this._open||this._tryFloatLabel()}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._updateLabel(),this._label&&this._initializeLabel(),this._adapter.toggleHostAttribute(G2.attributes.LABEL,!!this._label,this._label))}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder!==e&&(this._placeholder=e,this._adapter.setPlaceholderText(this._placeholder),this._initializeLabel())}get multiple(){return super.multiple}set multiple(e){this._multiple!==e&&(super.multiple=e,this._adapter.toggleHostAttribute(G2.attributes.MULTIPLE,e))}set required(e){this._required!==e&&this._adapter.setRequired()}};var Df='<template><forge-field id="field" popover-icon focus-indicator-allow-focus focus-indicator-focus-mode="focus"><label id="select-label" aria-hidden="true" part="label" slot="label"></label><slot slot="start" name="start"></slot><div data-forge-field-input class="selected-text-container" part="text-container" aria-live="assertive" aria-atomic="true"><slot name="value"><span id="selected-text" class="selected-text" part="text"></span></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',Pf=":host{display:block;outline:0}:host([hidden]){display:none}forge-field{--_select-placeholder-color:var(--forge-select-placeholder-color, var(--forge-field-placeholder-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6))))}.selected-text-container{display:grid;align-items:center;cursor:pointer}.selected-text,::slotted([slot=value]){white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.selected-text:empty::before{content:attr(placeholder);color:var(--_select-placeholder-color);font-size:inherit}:host([disabled]) .selected-text-container{cursor:not-allowed}forge-field{display:contents}",Ee=class extends Ue(it(Fe(L1(H1(Cd(yt)))))){static get observedAttributes(){return[...Object.values(F.observedAttributes),...Object.values(G2.observedAttributes),...Object.values(bt.observedAttributes)]}constructor(){var e;super(),q.define([A0,z0]),H(this,Df,Pf);let t=(e=this.shadowRoot)==null?void 0:e.querySelector(V.elementName);this.initializeFieldInstance(t),this[jt]="select",this._core=new tl(new Js(this))}connectedCallback(){super.connectedCallback(),this[P]({role:"combobox",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"})}attributeChangedCallback(t,e,a){switch(t){case G2.observedAttributes.OPEN:this.open=p(a);return;case G2.observedAttributes.LABEL:this.label=a;return;case G2.observedAttributes.PLACEHOLDER:this.placeholder=a;return}super.attributeChangedCallback(t,e,a)}[Lt](){return this.value}[wt](){this[a1].setValidity({valueMissing:this.required&&!this.value},this[Xt]({required:this.required,value:this.value}))}formResetCallback(){this.value=null}formStateRestoreCallback(t){this.value=JSON.parse(t)}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[P]({ariaLabel:t})}setFormValue(t,e){this[a1].setFormValue(t,e)}get floatLabel(){return super.floatLabel}set floatLabel(t){this._core.syncFloatingLabelState({force:t})}get density(){return super.density}set density(t){super.density=t,this._core.syncFloatingLabelState()}get dense(){return super.dense}set dense(t){super.dense=t,this._core.syncFloatingLabelState()}get disabled(){return super.disabled}set disabled(t){super.disabled=t,this._core.setDisabled(t)}get required(){return super.required}set required(t){super.required=t,this._core.required=t}get labelPosition(){return super.labelPosition}set labelPosition(t){super.labelPosition=t,this._core.syncFloatingLabelState()}};s([v()],Ee.prototype,"label",2),s([v()],Ee.prototype,"placeholder",2),s([v()],Ee.prototype,"readonly",2),Ee=s([y({name:G2.elementName,dependencies:[k1,J1,Xe,P1,h2,j1,Tt,X,$e,se,n1]})],Ee);function Nd(){x(Ee)}var Nf='<template><div class="forge-paginator" part="root" forge-popover-host><div class="container" part="container"><div class="label" part="label" id="label"><slot name="label"></slot></div><forge-select class="page-size-options" aria-labelledby="label" label-position="none" density="extra-small" part="page-size-options"></forge-select><div class="range-label" part="range-label"><slot name="range-label"></slot></div></div><div class="actions" part="actions"><div id="first-page-container"><forge-icon-button class="first-page" part="first-page-button" part="first-page-button-element"><forge-icon name="first_page" part="first-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="first-page-tooltip">Go to the first page</slot></forge-tooltip></div><div id="previous-page-container"><forge-icon-button class="previous-page" part="previous-page-button" part="previous-page-button-element"><forge-icon name="keyboard_arrow_left" part="previous-page-button-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="previous-page-tooltip">Go to the previous page</slot></forge-tooltip></div><div class="alternative-range-label" part="alternative-range-label"><slot name="alternative-range-label"></slot></div><div id="next-page-container"><forge-icon-button class="next-page" part="next-page-button" part="next-page-button-element"><forge-icon name="keyboard_arrow_right" part="next-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="next-page-tooltip">Go to the next page</slot></forge-tooltip></div><div id="last-page-container"><forge-icon-button class="last-page" part="last-page-button" part="last-page-button-element"><forge-icon name="last_page" part="last-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="last-page-tooltip">Go to the last page</slot></forge-tooltip></div></div></div></template>',Rf=':host{display:block}:host([hidden]){display:none}.forge-paginator{display:flex;gap:var(--forge-spacing-xsmall,8px)}.container{display:flex;gap:var(--forge-spacing-medium,16px);align-items:center}.alternative-range-label,.label,.range-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit)}.actions{display:flex;align-items:center}.alternative-range-label{display:none}:host([alternative]) .alternative-range-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);display:inline-block}:host([alternative]) .container{display:none}:host([alternative]) .actions{width:100%;justify-content:var(--forge-paginator-alternative-alignment,start)}',ot=class extends M{static get observedAttributes(){return Object.values($.observedAttributes)}constructor(){super(),q.define([t3,s0,fe,o3]),H(this,Nf,Rf),this._core=new Xs(new js(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){var o,n,i,l;switch(t){case $.observedAttributes.PAGE_INDEX:this.pageIndex=(o=W(a))!=null?o:$.numbers.DEFAULT_PAGE_INDEX;break;case $.observedAttributes.PAGE_SIZE:this.pageSize=(n=W(a))!=null?n:$.numbers.DEFAULT_PAGE_SIZE;break;case $.observedAttributes.OFFSET:this.offset=W(a);break;case $.observedAttributes.TOTAL:this.total=(i=W(a))!=null?i:$.numbers.DEFAULT_TOTAL;break;case $.observedAttributes.PAGE_SIZE_OPTIONS:this.pageSizeOptions=(l=Tr(a))!=null?l:$.numbers.DEFAULT_PAGE_SIZE_OPTIONS;break;case $.observedAttributes.LABEL:this.label=a;break;case $.observedAttributes.FIRST_LAST:this.firstLast=p(a);break;case $.observedAttributes.FIRST:this.first=p(a);break;case $.observedAttributes.DISABLED:this.disabled=p(a);break;case $.observedAttributes.ALTERNATIVE:this.alternative=p(a);break}}focus(t){this._core.focus(t)}};s([v()],ot.prototype,"pageIndex",2),s([v()],ot.prototype,"pageSize",2),s([v()],ot.prototype,"offset",2),s([v()],ot.prototype,"total",2),s([v()],ot.prototype,"pageSizeOptions",2),s([v()],ot.prototype,"label",2),s([v()],ot.prototype,"firstLast",2),s([v()],ot.prototype,"first",2),s([v()],ot.prototype,"disabled",2),s([v()],ot.prototype,"alternative",2),s([v()],ot.prototype,"rangeLabelCallback",2),ot=s([y({name:$.elementName,dependencies:[n1,Ee,p1]})],ot);function Rd(){x(ot)}var Fd=`${b}select-dropdown`,Ff={TARGET:"target",SELECTED_TEXT_TARGET:"selected-text-target",SYNC_SELECTED_TEXT:"sync-selected-text"},Uf=w({},Ff),Wf={SCROLLED_BOTTOM:`${Fd}-scrolled-bottom`},je={elementName:Fd,attributes:Uf,events:Wf};var el=class extends So{constructor(e){super(e);this._syncSelectedText=!1;this._originalTargetText="";this._targetDisconnectedListener=()=>this._onTargetDisconnected()}initialize(){this._tryAttach(),super.initialize()}destroy(){super.destroy(),this._adapter.isAttached()&&this._detach()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(je.events.SCROLLED_BOTTOM)}_applyValue(e){super._applyValue(e),this._applySelection()}_applySelection(){if(super._applySelection(),this._syncSelectedText||typeof this._selectedTextBuilder=="function"){let e=this._getSelectedText();e||(e=this._originalTargetText),this._adapter.setTargetText(e||"",this._selectedTextTarget)}}_tryAttach(){this._adapter.attach(this._target),this._adapter.isAttached()&&(this._targetDisconnectedDestructor=this._adapter.setTargetDisconnectedListener(this._targetDisconnectedListener),this._originalTargetText=this._adapter.getTargetText(this._selectedTextTarget),this.initializeTarget())}_detach(){this._adapter.detach(),this._targetDisconnectedDestructor&&(this._targetDisconnectedDestructor(),this._targetDisconnectedDestructor=void 0)}_onTargetDisconnected(){this._adapter.detach()}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this._adapter.isAttached()&&this._detach(),this._tryAttach())}get selectedTextTarget(){return this._selectedTextTarget}set selectedTextTarget(e){this._selectedTextTarget!==e&&(this._selectedTextTarget=e)}get syncSelectedText(){return this._syncSelectedText}set syncSelectedText(e){this._syncSelectedText!==e&&(this._syncSelectedText=e)}};var al=class extends To{constructor(t){super(t)}initializeAccessibility(){this._targetElement.setAttribute("role","combobox"),this._targetElement.setAttribute("aria-live","polite"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this.setAriaControls()}addClickListener(t){this._targetElement.addEventListener("click",t)}removeClickListener(t){this._targetElement&&this._targetElement.removeEventListener("click",t)}addTargetListener(t,e){let a,o;t==="keydown"&&(a=!1,o=!0),this._targetElement.addEventListener(t,e,{passive:a,capture:o})}removeTargetListener(t,e){this._targetElement&&this._targetElement.removeEventListener(t,e)}updateActiveDescendant(t){t?this._targetElement.setAttribute("aria-activedescendant",t):this._targetElement.removeAttribute("aria-activedescendant")}open(t){super.open(t),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._targetElement.setAttribute("aria-expanded","true")}close(){return this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.removeAttribute("aria-activedescendant"),this.setAriaControls(),super.close()}attach(t){let o=(this._component.getRootNode()||HTMLDocument||this._component.ownerDocument||document).querySelector(t);o&&(this._targetElement=o)}detach(){this._targetElement=void 0}setTargetDisconnectedListener(t){if(!this._targetElement||!this._targetElement.parentElement)return()=>{};let e=new MutationObserver(a=>{a.some(n=>Array.from(n.removedNodes).some(i=>i===this._targetElement))&&(e.disconnect(),t())});return e.observe(this._targetElement.parentElement,{childList:!0}),()=>e.disconnect()}isAttached(){return!!this._targetElement}setTargetText(t,e){let a=this._targetElement;if(e){let o=this._getElementBySelector(e);o&&(a=o)}a&&(a.textContent=t)}getTargetText(t){let e=t?this._getElementBySelector(t):this._targetElement;return e?e.innerText:""}_getElementBySelector(t){return this._targetElement.querySelector(t)||this._getRootNode().querySelector(t)}_getRootNode(){var t,e;return(e=(t=this._component.getRootNode())!=null?t:this._component.ownerDocument)!=null?e:document}setAriaControls(){let t=this._component.querySelector("[data-forge-aria-controls-placeholder]");if(t){this._targetElement.setAttribute("aria-controls",t.id);return}t=document.createElement("div"),t.id=`forge-select-dropdown-temp-${P2(10)}`,t.setAttribute("data-forge-aria-controls-placeholder",""),this._targetElement.setAttribute("aria-controls",t.id),this._component.appendChild(t)}};var Gf="<template></template>",Yf=":host{display:none}",f0=class extends yt{static get observedAttributes(){return[je.attributes.TARGET,je.attributes.SELECTED_TEXT_TARGET,je.attributes.SYNC_SELECTED_TEXT,bt.attributes.VALUE,bt.attributes.MULTIPLE,bt.attributes.OBSERVE_SCROLL,bt.attributes.OBSERVE_SCROLL_THRESHOLD,bt.attributes.POPUP_CLASSES,bt.attributes.OPTION_LIMIT,bt.attributes.SYNC_POPUP_WIDTH]}constructor(){super(),H(this,Gf,Yf),this._core=new el(new al(this))}attributeChangedCallback(t,e,a){switch(t){case je.attributes.TARGET:this.target=a;return;case je.attributes.SELECTED_TEXT_TARGET:this.selectedTextTarget=a;return;case je.attributes.SYNC_SELECTED_TEXT:this.syncSelectedText=p(a);return}super.attributeChangedCallback(t,e,a)}};s([v()],f0.prototype,"target",2),s([v()],f0.prototype,"selectedTextTarget",2),s([v()],f0.prototype,"syncSelectedText",2),f0=s([y({name:je.elementName,dependencies:[J1,Xe,P1,h2,j1,Tt,$e,se,n1]})],f0);function Ud(){x(f0)}var Wd=class extends a2{constructor(t){super(t)}_build(){return document.createElement(G2.elementName)}_configure(){var t;typeof((t=this._config.options)==null?void 0:t.helperText)=="string"&&this.setHelperText(this._config.options.helperText)}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}onChange(t){this._element.addEventListener("change",e=>t(e.detail))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&this._helperTextElement.isConnected&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}};var Kf=`${b}skip-link`,Gd={TARGET:"target",THEME:"theme",MUTED:"muted",PERSISTENT:"persistent",INLINE:"inline",SKIP_URL_CHANGE:"skip-url-change"},qf=w({},Gd),$f={ANCHOR:"a"},pt={elementName:Kf,observedAttributes:Gd,attributes:qf,selectors:$f};var Xf='<template><a class="forge-skip-link" part="anchor"><slot>Skip to main content</slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></a></template>',jf=':host{--_skip-link-inset:var(--forge-skip-link-inset, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-medium, 16px));--_skip-link-z-index:var(--forge-skip-link-z-index, var(--forge-z-index-popup, 10));--_skip-link-transition-duration:var(--forge-skip-link-transition-duration, var(--forge-animation-duration-short4, 200ms));--_skip-link-transition-timing-function:var(--forge-skip-link-transition-timing-function, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}:host{transition-property:opacity,transform;transition-duration:var(--_skip-link-transition-duration);transition-timing-function:var(--_skip-link-transition-timing-function);display:block;position:fixed;inset:var(--_skip-link-inset);z-index:var(--_skip-link-z-index);block-size:fit-content;inline-size:fit-content;opacity:0;transform:translateY(-100%)}:host([hidden]){display:none}:host(:where(:focus-within,[persistent])){transition-property:opacity,transform;transition-duration:var(--_skip-link-transition-duration);transition-timing-function:var(--_skip-link-transition-timing-function);transform:translateY(0);opacity:1}.forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary, #ffc107));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary, #000000));--_skip-link-shape:var(--forge-skip-link-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_skip-link-elevation:var(--forge-skip-link-elevation, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12));--_skip-link-padding-block:var(--forge-skip-link-padding-block, var(--forge-spacing-xsmall, 8px));--_skip-link-padding-inline:var(--forge-skip-link-padding-inline, var(--forge-spacing-medium, 16px));--_skip-link-focus-indicator-color:var(--forge-skip-link-focus-indicator-color, var(--_skip-link-background))}.forge-skip-link{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);display:block;outline:0;box-shadow:var(--_skip-link-elevation);border-radius:var(--_skip-link-shape);background:var(--_skip-link-background);padding-block:var(--_skip-link-padding-block);padding-inline:var(--_skip-link-padding-inline);cursor:pointer;color:var(--_skip-link-color);text-decoration:underline}:host([theme=primary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-primary, #3f51b5));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-primary, #ffffff))}:host([theme=primary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-primary-container-high, #b6bde3));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-primary-container-high, #000000))}:host([theme=secondary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary, #ffc107));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary, #000000))}:host([theme=secondary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary-container-high, #ffe7a1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary-container-high, #000000))}:host([theme=tertiary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-tertiary, #3d5afe));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=tertiary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-tertiary-container-high, #b5c0ff));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-tertiary-container-high, #000000))}:host([theme=success]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-success, #2e7d32));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-success, #ffffff))}:host([theme=success][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-success-container-high, #b0ceb1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-success-container-high, #000000))}:host([theme=error]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-error, #b00020));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-error, #ffffff))}:host([theme=error][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-error-container-high, #e19eaa));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-error-container-high, #000000))}:host([theme=warning]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-warning, #d14900));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=warning][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-warning-container-high, #eeba9e));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-warning-container-high, #000000))}:host([theme=info]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-info, #1565c0));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-info, #ffffff))}:host([theme=info][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-info-container-high, #a6c4e7));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-info-container-high, #000000))}:host(:where(:not([theme]),[theme=default])[muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary-container-high, #ffe7a1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary-container-high, #000000))}:host([inline]){position:absolute;transform:none}forge-focus-indicator{--forge-focus-indicator-color:var(--_skip-link-focus-indicator-color);--forge-focus-indicator-shape:var(--_skip-link-shape)}@media (prefers-reduced-motion:reduce){:host{--_skip-link-transition-duration:var(--forge-skip-link-transition-duration, 0s)}}',ko=class extends M{constructor(){super();this._target="";this._theme="default";this._muted=!1;this._persistent=!1;this._inline=!1;this._skipUrlChange=!1;this._clickListener=e=>this._handleClick(e);H(this,Xf,jf),this._anchorElement=g(this,pt.selectors.ANCHOR)}static get observedAttributes(){return Object.values(pt.observedAttributes)}attributeChangedCallback(e,a,o){switch(e){case pt.observedAttributes.TARGET:this.target=o;break;case pt.observedAttributes.THEME:this.theme=o;break;case pt.observedAttributes.MUTED:this.muted=p(o);break;case pt.observedAttributes.PERSISTENT:this.persistent=p(o);break;case pt.observedAttributes.INLINE:this.inline=p(o);break;case pt.observedAttributes.SKIP_URL_CHANGE:this.skipUrlChange=p(o);break}}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this.setAttribute(pt.attributes.TARGET,this._target),this._anchorElement.href=`#${this._target}`)}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this.setAttribute(pt.attributes.THEME,this._theme))}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this.toggleAttribute(pt.attributes.MUTED,this._muted))}get persistent(){return this._persistent}set persistent(e){this._persistent!==e&&(this._persistent=e,this.toggleAttribute(pt.attributes.PERSISTENT,this._persistent))}get inline(){return this._inline}set inline(e){this._inline!==e&&(this._inline=e,this.toggleAttribute(pt.attributes.INLINE,this._inline))}get skipUrlChange(){return this._skipUrlChange}set skipUrlChange(e){if(this._skipUrlChange!==e){if(this._skipUrlChange=e,this.toggleAttribute(pt.attributes.SKIP_URL_CHANGE,this._skipUrlChange),this._skipUrlChange){this._anchorElement.addEventListener("click",this._clickListener);return}this._anchorElement.removeEventListener("click",this._clickListener)}}_handleClick(e){e.preventDefault();let a=document.getElementById(this._target);a==null||a.focus(),a==null||a.scrollIntoView({behavior:"smooth"})}};ko=s([y({name:pt.elementName,dependencies:[Q,r1]})],ko);function Yd(){x(ko)}var Er=class extends M{};Er.formAssociated=!0;var Zf=`${b}slider`,Qf={ARIA_LABEL:"data-aria-label",ARIA_LABEL_START:"data-aria-label-start",ARIA_LABEL_END:"data-aria-label-end",VALUE:"value",VALUE_START:"value-start",VALUE_END:"value-end",LABEL:"label",LABEL_START:"label-start",LABEL_END:"label-end",MIN:"min",MAX:"max",STEP:"step",TICKMARKS:"tickmarks",LABELED:"labeled",RANGE:"range",DISABLED:"disabled",READONLY:"readonly"},Jf={ROOT:".forge-slider",TRACK:".track",HANDLE_CONTAINER:".handle-container",START_INPUT:"input.start",END_INPUT:"input.end",START_HANDLE:".handle.start",START_HANDLE_THUMB:".handle.start .handle-thumb",END_HANDLE:".handle.end",END_HANDLE_THUMB:".handle.end .handle-thumb",START_LABEL:".handle.start .handle-label",START_LABEL_CONTENT:".handle.start .handle-label-content",END_LABEL:".handle.end .handle-label",END_LABEL_CONTENT:".handle.end .handle-label-content",LABEL:".handle-label",INPUT:"input[type=range]"},tx={RANGE:"range",TICKMARKS:"tickmarks",ON_TOP:"on-top",OVERLAPPING:"overlapping",HOVER:"hover",HANDLE:"handle",HANDLE_THUMB:"handle-thumb",HANDLE_START:"start",HANDLE_LABEL:"handle-label",LABEL:"handle-label",LABEL_CONTENT:"handle-label-content"},ex={INPUT:"forge-slider-input",CHANGE:"forge-slider-change",RANGE_INPUT:"forge-slider-range-input",RANGE_CHANGE:"forge-slider-range-change"},ax={START_FRACTION:"--_slider-start-fraction",END_FRACTION:"--_slider-end-fraction",TICK_COUNT:"--_slider-tick-count"},ox={DEFAULT_STEP:1,DEFAULT_VALUE:50,DEFAULT_START_VALUE:33,DEFAULT_END_VALUE:67},E={elementName:Zf,attributes:Qf,selectors:Jf,classes:tx,events:ex,numbers:ox,cssCustomProperties:ax};function Kd(r){let t=document.createElement("input");return t.type="range",t.id="start",t.min=String(r.min),t.max=String(r.max),t.step=String(r.step),t.valueAsNumber=r.valueStart,t.disabled=r.disabled,t.classList.add("start"),r.hasAttribute(E.attributes.ARIA_LABEL_START)&&t.setAttribute("aria-label",r.getAttribute(E.attributes.ARIA_LABEL_START)),t.setAttribute("aria-valuetext",String(r.valueStart)),t}function qd(r){let t=document.createElement("div");t.classList.add(E.classes.HANDLE,E.classes.HANDLE_START),t.setAttribute("part","handle-start");let e=document.createElement("forge-state-layer");e.target="start",t.appendChild(e);let a=document.createElement("forge-focus-indicator");a.target="start",t.appendChild(a);let o=document.createElement("div");o.classList.add(E.classes.HANDLE_THUMB),o.setAttribute("part","handle-start-thumb"),t.appendChild(o);let n=document.createElement("div");n.classList.add(E.classes.HANDLE_LABEL),n.setAttribute("part","handle-start-label"),t.appendChild(n);let i=document.createElement("span");return i.textContent=r,i.classList.add(E.classes.LABEL_CONTENT),i.setAttribute("part","handle-start-label-content"),n.appendChild(i),t}function r5(r){let t=document.createElement("div");t.classList.add(E.classes.LABEL);let e=document.createElement("span");return e.textContent=r,e.classList.add(E.classes.LABEL_CONTENT),t.appendChild(e),t}var ol=class extends I{constructor(t){super(t),this._rootElement=g(t,E.selectors.ROOT),this._trackElement=g(t,E.selectors.TRACK),this._handleContainerElement=g(t,E.selectors.HANDLE_CONTAINER),this._endInputElement=g(t,E.selectors.END_INPUT),this._endHandleElement=g(t,E.selectors.END_HANDLE),this._endHandleThumbElement=g(t,E.selectors.END_HANDLE_THUMB),this._endLabelContentElement=g(t,E.selectors.END_LABEL_CONTENT)}addInputListener(t,e){this._getInputs().forEach(o=>o.addEventListener(t,e))}update({startFraction:t,endFraction:e,tickCount:a}){this._rootElement.style.setProperty(E.cssCustomProperties.START_FRACTION,String(t)),this._rootElement.style.setProperty(E.cssCustomProperties.END_FRACTION,String(e)),this._rootElement.style.setProperty(E.cssCustomProperties.TICK_COUNT,String(a))}updateLabels(t,e){var a;this._startLabelContentElement&&(this._startLabelContentElement.textContent=t),this._endLabelContentElement&&(this._endLabelContentElement.textContent=e),(a=this._startInputElement)==null||a.setAttribute("aria-valuetext",t),this._endInputElement.setAttribute("aria-valuetext",e)}updateHandleLayering(){let t=this._endInputElement.matches(":focus");this._startHandleElement&&_2(this._startHandleElement,!t,E.classes.ON_TOP),_2(this._endHandleElement,t,E.classes.ON_TOP)}tryHoverStartHandle(t){var e,a,o;this._startHandleThumbElement&&Ql(t,this._startHandleThumbElement)?(this._handleContainerElement.classList.add(E.classes.HOVER),(e=this._startHandleElement)==null||e.classList.add(E.classes.HOVER)):(a=this._startInputElement)!=null&&a.matches(":focus")||(this._handleContainerElement.classList.remove(E.classes.HOVER),(o=this._startHandleElement)==null||o.classList.remove(E.classes.HOVER))}tryHoverEndHandle(t){Ql(t,this._endHandleThumbElement)?(this._handleContainerElement.classList.add(E.classes.HOVER),this._endHandleElement.classList.add(E.classes.HOVER)):this._endInputElement.matches(":focus")||(this._handleContainerElement.classList.remove(E.classes.HOVER),this._endHandleElement.classList.remove(E.classes.HOVER))}tryDetectOverlap(){if(this._startHandleElement){let t=_3(this._startHandleElement,this._endHandleElement);_2(this._endHandleElement,t,E.classes.OVERLAPPING),_2(this._startHandleElement,t,E.classes.OVERLAPPING)}}leaveHandleContainer(){this._handleContainerElement.classList.remove(E.classes.HOVER)}syncInputValues(t,e){if(this._startInputElement&&(this._startInputElement.valueAsNumber=t),this._endInputElement.valueAsNumber=e,this._startInputElement){let a=new FormData;a.append(this._component.nameStart,String(t)),a.append(this._component.nameEnd,String(e)),this._component[a1].setFormValue(a)}else this._component[a1].setFormValue(String(e))}setRange(t){var e,a;if(this._rootElement.classList.toggle(E.classes.RANGE,t),t){this._startInputElement=Kd(this._component),this._rootElement.insertAdjacentElement("afterbegin",this._startInputElement),this._endInputElement.valueAsNumber=this._component.valueEnd;let o=this._startInputElement.value;this._startHandleElement=qd(o),this._handleContainerElement.insertAdjacentElement("afterbegin",this._startHandleElement),this._startHandleThumbElement=g(this._component,E.selectors.START_HANDLE_THUMB),this._startLabelContentElement=g(this._component,E.selectors.START_LABEL_CONTENT)}else(e=this._startInputElement)==null||e.remove(),(a=this._startHandleElement)==null||a.remove(),this._startInputElement=void 0,this._startHandleElement=void 0,this._startHandleThumbElement=void 0,this._startLabelContentElement=void 0}setTickmarks(t){this._trackElement.classList.toggle(E.classes.TICKMARKS,t)}setStep(t){this._getInputs().forEach(a=>a.step=String(t))}setMin(t){this._getInputs().forEach(a=>a.min=String(t))}setMax(t){this._getInputs().forEach(a=>a.max=String(t))}setDisabled(t){this._getInputs().forEach(o=>o.disabled=t),this._rootElement.querySelectorAll(M1.elementName).forEach(o=>o.disabled=t)}setReadonly(t){this._getInputs().forEach(a=>a.readOnly=t)}toggleLabels(t){var a;if(this._rootElement.querySelectorAll(E.selectors.LABEL).forEach(o=>o.remove()),this._endLabelContentElement=void 0,this._startLabelContentElement=void 0,t){let o=r5(this._endInputElement.value);if(this._endHandleElement.insertAdjacentElement("beforeend",o),this._endLabelContentElement=g(this._component,E.selectors.END_LABEL_CONTENT),this._startInputElement){let n=r5(this._startInputElement.value);(a=this._startHandleElement)==null||a.insertAdjacentElement("beforeend",n),this._startLabelContentElement=g(this._component,E.selectors.START_LABEL_CONTENT)}}}setStartAriaLabel(t){this._startInputElement&&K(this._startInputElement,!!t,"aria-label",t)}setEndAriaLabel(t){K(this._endInputElement,!!t,"aria-label",t)}_getInputs(){let t=[];return this._startInputElement&&t.push(this._startInputElement),[...t,this._endInputElement]}};var rl=class{constructor(t){this._adapter=t;this._value=E.numbers.DEFAULT_VALUE;this._valueStart=E.numbers.DEFAULT_START_VALUE;this._valueEnd=E.numbers.DEFAULT_END_VALUE;this._min=0;this._max=100;this._step=E.numbers.DEFAULT_STEP;this._tickmarks=!1;this._labeled=!0;this._range=!1;this._disabled=!1;this._readonly=!1;this._pointerEnterListener=e=>this._handlePointerEnter(e),this._pointerMoveListener=e=>this._handlePointerMove(e),this._pointerLeaveListener=e=>this._handlePointerLeave(e),this._changeUpdateListener=e=>this._handleInputUpdate(e),this._focusListener=e=>this._handleFocus(e)}initialize(){this._applyInputListeners(),this._update()}_update(){var _,L;let{value:t,valueStart:e,valueEnd:a}=this._clampMinMax(),o=this._step<=0?1:this._step,n=Math.max(this._max-this._min,o),i=this._range?((e!=null?e:this._min)-this._min)/n:0,l=this._range?a:t,h=((l!=null?l:this.min)-this.min)/n,c=n/o;this._adapter.update({startFraction:i,endFraction:h,tickCount:c}),this._adapter.syncInputValues(e,this._range?a:t),this._range&&this._adapter.tryDetectOverlap();let d=(_=this._labelStart)!=null?_:String(e),u=(L=this._labelEnd)!=null?L:String(this._range?a:t);typeof this._labelBuilder=="function"&&(this._range?(d=this._labelBuilder(e,"start"),u=this._labelBuilder(a,"end")):u=this._labelBuilder(t)),this._adapter.updateLabels(d,u)}_clampMinMax(){let t=this._value,e=this._valueStart,a=this._valueEnd;return this._range?(e>this._max?e=this._max:e<this._min&&(e=this._min),a>this._max?a=this._max:a<this._min&&(a=this._min)):t>this._max?t=this._max:this._value<this._min&&(t=this._min),{value:t,valueStart:e,valueEnd:a}}_applyInputListeners(){this._adapter.addInputListener("pointerenter",this._pointerEnterListener),this._adapter.addInputListener("pointermove",this._pointerMoveListener),this._adapter.addInputListener("pointerleave",this._pointerLeaveListener),this._adapter.addInputListener("input",this._changeUpdateListener),this._adapter.addInputListener("change",this._changeUpdateListener),this._adapter.addInputListener("focus",this._focusListener)}_handlePointerEnter(t){this._handlePointerMove(t)}_handlePointerMove({target:t,x:e,y:a}){t.id==="start"?this._adapter.tryHoverStartHandle({x:e,y:a}):this._adapter.tryHoverEndHandle({x:e,y:a})}_handlePointerLeave(t){this._adapter.leaveHandleContainer()}_handleInputUpdate(t){if(t.stopPropagation(),this._disabled||this._readonly){this._adapter.syncInputValues(this._valueStart,this._range?this._valueEnd:this._value);return}let e=t.target;if(this._range){let l=e.id==="start";if(l?this._valueStart=e.valueAsNumber:this._valueEnd=e.valueAsNumber,this._canClamp()){l?this._valueStart=this._valueEnd:this._valueEnd=this._valueStart,this._adapter.syncInputValues(this._valueStart,this._valueEnd),this._update();return}}else this._value=e.valueAsNumber;let a={default:{change:E.events.CHANGE,input:E.events.INPUT},range:{change:E.events.RANGE_CHANGE,input:E.events.RANGE_INPUT}},o=this._range?a.range[t.type]:a.default[t.type],n=this._range?{valueStart:this._valueStart,valueEnd:this._valueEnd}:{value:this._value},i=new CustomEvent(o,{detail:n,bubbles:!0});this._adapter.dispatchHostEvent(i),this._update()}_handleFocus(t){this._adapter.updateHandleLayering()}_canClamp(){return this._valueStart>this._valueEnd||this._valueEnd<this._valueStart}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._update())}get valueStart(){return this._valueStart}set valueStart(t){this._valueStart!==t&&(this._valueStart=t,this._update())}get valueEnd(){return this._valueEnd}set valueEnd(t){this._valueEnd!==t&&(this._valueEnd=t,this._update())}get label(){return this.labelEnd}set label(t){this.labelEnd=t}get labelStart(){return this._labelStart}set labelStart(t){this._labelStart!==t&&(this._labelStart=t,this._adapter.updateLabels(this._labelStart,this._labelEnd))}get labelEnd(){return this._labelEnd}set labelEnd(t){this._labelEnd!==t&&(this._labelEnd=t,this._adapter.updateLabels(this._labelStart,this._labelEnd))}get labelBuilder(){return this._labelBuilder}set labelBuilder(t){this._labelBuilder=t,this._update()}get min(){return this._min}set min(t){this._min!==t&&(this._min=t,this._adapter.setMin(this._min),this._update(),this._adapter.setHostAttribute(E.attributes.MIN,String(this._min)))}get max(){return this._max}set max(t){this._max!==t&&(this._max=t,this._adapter.setMax(this._max),this._update(),this._adapter.setHostAttribute(E.attributes.MAX,String(this._max)))}get step(){return this._step}set step(t){this._step!==t&&(this._step=t,this._adapter.setStep(this._step),this._update(),this._adapter.setHostAttribute(E.attributes.STEP,String(this._step)))}get tickmarks(){return this._tickmarks}set tickmarks(t){this._tickmarks!==t&&(this._tickmarks=t,this._adapter.setTickmarks(this._tickmarks),this._adapter.toggleHostAttribute(E.attributes.TICKMARKS,this._tickmarks))}get labeled(){return this._labeled}set labeled(t){this._labeled!==t&&(this._labeled=t,this._adapter.toggleLabels(this._labeled),this._update(),this._adapter.toggleHostAttribute(E.attributes.LABELED,this._labeled))}get range(){return this._range}set range(t){this._range!==t&&(this._range=t,this._adapter.setRange(this._range),this._range&&this._applyInputListeners(),this._update(),this._adapter.toggleHostAttribute(E.attributes.RANGE,this._range))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(E.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(t),this._adapter.toggleHostAttribute(E.attributes.READONLY,this._readonly))}set ariaLabel(t){this.ariaLabelEnd=t}set ariaLabelStart(t){this._adapter.setStartAriaLabel(t)}set ariaLabelEnd(t){this._adapter.setEndAriaLabel(t)}};var rx='<template><div part="root" class="forge-slider"><input type="range" class="end" id="end" min="0" max="100" step="1" aria-valuetext="0"><div class="track" part="track"></div><div class="handle-container-padded"><div class="handle-container-block"><div class="handle-container"><div class="handle end" part="handle-end"><forge-state-layer exportparts="surface:state-layer" target="end"></forge-state-layer><forge-focus-indicator part="focus-indicator" target="end"></forge-focus-indicator><div class="handle-thumb" part="handle-end-thumb"></div><div class="handle-label" part="handle-end-label"><span class="handle-label-content" part="handle-end-label-content"></span></div></div></div></div></div></div></template>',nx=':host{display:inline-flex;vertical-align:middle;min-inline-size:100%}:host([hidden]){display:none}.forge-slider{--_slider-start-fraction:0;--_slider-end-fraction:0;--_slider-tick-count:100;--_slider-track-height:var(--forge-slider-track-height, 4px);--_slider-active-track-color:var(--forge-slider-active-track-color, var(--forge-theme-primary, #3f51b5));--_slider-active-track-height:var(--forge-slider-active-track-height, var(--_slider-track-height));--_slider-active-track-shape:var(--forge-slider-active-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-disabled-active-track-color:var(--forge-slider-disabled-active-track-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-active-track-opacity:var(--forge-slider-disabled-active-track-opacity, 0.38);--_slider-disabled-handle-color:var(--forge-slider-disabled-handle-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-inactive-track-color:var(--forge-slider-disabled-inactive-track-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-inactive-track-opacity:var(--forge-slider-disabled-inactive-track-opacity, 0.12);--_slider-focus-handle-color:var(--forge-slider-focus-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-handle-color:var(--forge-slider-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-handle-height:var(--forge-slider-handle-height, 20px);--_slider-handle-shape:var(--forge-slider-handle-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_slider-handle-width:var(--forge-slider-handle-width, 20px);--_slider-hover-handle-color:var(--forge-slider-hover-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-inactive-track-color:var(--forge-slider-inactive-track-color, var(--forge-theme-primary-container, #d1d5ed));--_slider-inactive-track-height:var(--forge-slider-inactive-track-height, var(--_slider-track-height));--_slider-inactive-track-shape:var(--forge-slider-inactive-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-label-container-shape:var(--forge-slider-label-container-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-label-container-color:var(--forge-slider-label-container-color, var(--forge-theme-primary, #3f51b5));--_slider-label-container-height:var(--forge-slider-label-container-height, 28px);--_slider-label-text-color:var(--forge-slider-label-text-color, var(--forge-theme-on-primary, #ffffff));--_slider-pressed-handle-color:var(--forge-slider-pressed-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-state-layer-size:var(--forge-slider-state-layer-size, 40px);--_slider-with-overlap-handle-outline-color:var(--forge-slider-with-overlap-handle-outline-color, var(--forge-theme-on-primary, #ffffff));--_slider-with-overlap-handle-outline-width:var(--forge-slider-with-overlap-handle-outline-width, 1px);--_slider-with-tick-marks-active-container-color:var(--forge-slider-with-tick-marks-active-container-color, var(--forge-theme-on-primary, #ffffff));--_slider-with-tick-marks-container-size:var(--forge-slider-with-tick-marks-container-size, 2px);--_slider-with-tick-marks-disabled-active-container-color:var(--forge-slider-with-tick-marks-disabled-active-container-color, var(--forge-theme-on-surface-container-high, #000000));--_slider-with-tick-marks-disabled-inactive-container-color:var(--forge-slider-with-tick-marks-disabled-inactive-container-color, var(--forge-theme-on-surface-container-high, #000000));--_slider-with-tick-marks-inactive-container-color:var(--forge-slider-with-tick-marks-inactive-container-color, var(--forge-theme-primary, #3f51b5))}.forge-slider{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_slider-state-layer-size);pointer-events:none;touch-action:none}.forge-slider.range :host-context([dir=rtl]) input.start{clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range :host([dir=rtl]) input.start{clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range input.start{clip-path:inset(0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))) 0 0)}.forge-slider.range input.end{clip-path:inset(0 0 0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)))}.forge-slider.range :host-context([dir=rtl]) input.end{clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.forge-slider.range :host([dir=rtl]) input.end{clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.forge-slider.range input.end:dir(rtl){clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.track{position:absolute;inset:0;display:flex;align-items:center}.track::after,.track::before{content:"";position:absolute;inset-inline-start:calc(var(--_slider-state-layer-size)/ 2 - var(--_slider-with-tick-marks-container-size));inset-inline-end:calc(var(--_slider-state-layer-size)/ 2 - var(--_slider-with-tick-marks-container-size));background-size:calc((100% - var(--_slider-with-tick-marks-container-size) * 2)/ var(--_slider-tick-count)) 100%}.track::before{block-size:var(--_slider-inactive-track-height);border-radius:var(--_slider-inactive-track-shape);background-color:var(--_slider-inactive-track-color)}.track::after{block-size:var(--_slider-active-track-height);border-radius:var(--_slider-active-track-shape);clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)));background-color:var(--_slider-active-track-color)}.track.tickmarks::before{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-inactive-container-color) 0,var(--_slider-with-tick-marks-inactive-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}.track.tickmarks::after{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-active-container-color) 0,var(--_slider-with-tick-marks-active-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}.handle-container-block,.handle-container-padded{position:relative;block-size:100%;inline-size:100%}.handle-container-padded{padding-inline:calc(var(--_slider-state-layer-size)/ 2)}.handle-container{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100% * var(--_slider-start-fraction));inline-size:calc(100% * (var(--_slider-end-fraction) - var(--_slider-start-fraction)))}.handle{position:absolute;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);border-radius:var(--_slider-handle-shape);display:grid;place-items:center}.handle.start{inset-inline-start:calc(0px - var(--_slider-state-layer-size)/ 2)}.handle.end{inset-inline-end:calc(0px - var(--_slider-state-layer-size)/ 2)}.handle-thumb{box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);position:absolute;height:var(--_slider-handle-height);width:var(--_slider-handle-width);border-radius:var(--_slider-handle-shape);background:var(--_slider-handle-color)}.handle-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);position:absolute;box-sizing:border-box;display:grid;padding:4px;place-items:center;border-radius:var(--_slider-label-container-shape);color:var(--_slider-label-text-color);font-weight:500;white-space:nowrap;inset-block-end:100%;min-inline-size:var(--_slider-label-container-height);min-block-size:var(--_slider-label-container-height);background:var(--_slider-label-container-color);transition:transform var(--forge-animation-duration-short2, 100ms) var(--forge-animation-easing-standard, cubic-bezier(.2, 0, 0, 1));transform-origin:center bottom;transform:scale(0)}.handle-label::after,.handle-label::before{content:"";position:absolute;display:block;background:inherit}.handle-label::before{inline-size:calc(var(--_slider-label-container-height)/ 2);block-size:calc(var(--_slider-label-container-height)/ 2);bottom:calc(var(--_slider-label-container-height)/ -10);transform:rotate(45deg)}.handle-label::after{inset:0;border-radius:inherit}.handle-label-content{z-index:1}.handle-container.hover .handle-thumb{background:var(--_slider-hover-handle-color)}:host(:not([disabled])) input.end:active~.handle-container-padded .handle.end>.handle-thumb,:host(:not([disabled])) input.start:active~.handle-container-padded .handle.start>.handle-thumb{background:var(--_slider-pressed-handle-color)}:host([disabled]) .handle-thumb{box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);background:var(--_slider-disabled-handle-color)}:host([disabled]) .handle-label{background:var(--_slider-disabled-handle-color)}:host([disabled]) .track::before{opacity:calc(1 / var(--_slider-disabled-active-track-opacity) * var(--_slider-disabled-inactive-track-opacity));background-color:var(--_slider-disabled-inactive-track-color)}:host([disabled]) .track::after{background-color:var(--_slider-disabled-active-track-color)}:host([disabled]) .track.tickmarks::before{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-disabled-inactive-container-color) 0,var(--_slider-with-tick-marks-disabled-inactive-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}:host([disabled]) .track.tickmarks::after{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-disabled-active-container-color) 0,var(--_slider-with-tick-marks-disabled-active-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}:host([disabled]) input[type=range]{cursor:not-allowed}:host-context([dir=rtl]) .track::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}:host([dir=rtl]) .track::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}.track:dir(rtl)::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}input.end:focus~.handle-container-padded .handle.end>.handle-thumb,input.start:focus~.handle-container-padded .handle.start>.handle-thumb{background:var(--_slider-focus-handle-color)}.on-top.overlapping .handle-label,.on-top.overlapping .handle-label::before,.on-top.overlapping .handle-thumb{border:var(--_slider-with-overlap-handle-outline-color) solid var(--_slider-with-overlap-handle-outline-width)}.handle-container.hover .handle-label,:host(:focus-within) .handle-label,:where(:has(input:active)) .handle-label{transform:scale(1)}input[type=range]{opacity:0;-webkit-tap-highlight-color:transparent;position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:0 0;cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:0}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none}input[type=range]::-moz-range-track{appearance:none}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);transform:scaleX(0);opacity:0;z-index:2}input[type=range]::-moz-range-thumb{appearance:none;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.on-top{z-index:1}@media (prefers-reduced-motion){.handle-label{transition-duration:0}}forge-focus-indicator{--forge-focus-indicator-shape:50%;--forge-focus-indicator-outward-offset:0px}forge-state-layer{--forge-state-layer-color:var(--_slider-handle-color)}',$d,w2=class extends($d=Er,a1,$d){static get observedAttributes(){return[E.attributes.ARIA_LABEL,E.attributes.ARIA_LABEL_START,E.attributes.ARIA_LABEL_END,E.attributes.VALUE,E.attributes.VALUE_START,E.attributes.VALUE_END,E.attributes.LABEL,E.attributes.LABEL_START,E.attributes.LABEL_END,E.attributes.MAX,E.attributes.MIN,E.attributes.STEP,E.attributes.TICKMARKS,E.attributes.LABELED,E.attributes.RANGE,E.attributes.DISABLED,E.attributes.READONLY]}get form(){return this[a1].form}get labels(){return this[a1].labels}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}set name(t){K(this,!!t,"name",t!=null?t:"")}get nameStart(){var t;return(t=this.getAttribute("name-start"))!=null?t:this.name}set nameStart(t){K(this,!!t,"name-start",t!=null?t:"")}get nameEnd(){var t;return(t=this.getAttribute("name-end"))!=null?t:this.nameStart}set nameEnd(t){K(this,!!t,"name-end",t!=null?t:"")}constructor(){super(),H(this,rx,nx),this[a1]=this.attachInternals(),this._core=new rl(new ol(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case E.attributes.ARIA_LABEL:this._core.ariaLabel=a;break;case E.attributes.ARIA_LABEL_START:this._core.ariaLabelStart=a;break;case E.attributes.ARIA_LABEL_END:this._core.ariaLabelEnd=a;break;case E.attributes.VALUE:this.value=W(a);break;case E.attributes.VALUE_START:this.valueStart=W(a);break;case E.attributes.VALUE_END:this.valueEnd=W(a);break;case E.attributes.LABEL:this.label=a;break;case E.attributes.LABEL_START:this.labelStart=a;break;case E.attributes.LABEL_END:this.labelEnd=a;break;case E.attributes.MIN:this.min=W(a);break;case E.attributes.MAX:this.max=W(a);break;case E.attributes.STEP:this.step=W(a);break;case E.attributes.TICKMARKS:this.tickmarks=p(a);break;case E.attributes.LABELED:this.labeled=p(a);break;case E.attributes.RANGE:this.range=p(a);break;case E.attributes.DISABLED:this.disabled=p(a);break;case E.attributes.READONLY:this.readonly=p(a);break}}formResetCallback(){if(this._core.range){let e=this.getAttribute("value-start");this.valueStart=e!==null?Number(e):E.numbers.DEFAULT_START_VALUE;let a=this.getAttribute("value-end");this.valueEnd=a!==null?Number(a):E.numbers.DEFAULT_END_VALUE;return}let t=this.getAttribute("value");this.value=t!==null?Number(t):E.numbers.DEFAULT_VALUE}formStateRestoreCallback(t){if(t&&t[0]instanceof FormData){let e=Array.from(t[0]),[[,a],[,o]]=e;this.valueStart=Number(a),this.valueEnd=Number(o),this.range=!0;return}this.value=Number(t),this.range=!1}formDisabledCallback(t){this.disabled=t}};w2.formAssociated=!0,s([v()],w2.prototype,"value",2),s([v()],w2.prototype,"valueStart",2),s([v()],w2.prototype,"valueEnd",2),s([v()],w2.prototype,"label",2),s([v()],w2.prototype,"labelStart",2),s([v()],w2.prototype,"labelEnd",2),s([v()],w2.prototype,"labelBuilder",2),s([v()],w2.prototype,"min",2),s([v()],w2.prototype,"max",2),s([v()],w2.prototype,"step",2),s([v()],w2.prototype,"tickmarks",2),s([v()],w2.prototype,"labeled",2),s([v()],w2.prototype,"range",2),s([v()],w2.prototype,"disabled",2),s([v()],w2.prototype,"readonly",2),w2=s([y({name:E.elementName,dependencies:[Q,r1]})],w2);var Xd=class extends a2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get valueStart(){return this._element.valueStart}set valueStart(t){this._element.valueStart=t}get valueEnd(){return this._element.valueEnd}set valueEnd(t){this._element.valueEnd=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get min(){return this._element.min}set min(t){this._element.min=t}get max(){return this._element.max}set max(t){this._element.max=t}get step(){return this._element.step}get range(){return this._element.range}set range(t){this._element.range=t}get tickmarks(){return this._element.tickmarks}set tickmarks(t){this._element.tickmarks=t}get labeled(){return this._element.labeled}set labeled(t){this._element.labeled=t}get labelBuilder(){return this._element.labelBuilder}set labelBuilder(t){this._element.labelBuilder=t}onInput(t){this._element.addEventListener("forge-slider-input",({detail:e})=>t(e))}onChange(t){this._element.addEventListener("forge-slider-change",({detail:e})=>t(e))}onRangeInput(t){this._element.addEventListener("forge-slider-range-input",({detail:e})=>t(e))}onRangeChange(t){this._element.addEventListener("forge-slider-range-change",({detail:e})=>t(e))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}_build(){return document.createElement(E.elementName)}};function jd(){x(w2)}var Zd={name:"clock_outline",data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 20a8 8 0 008-8 8 8 0 00-8-8 8 8 0 00-8 8 8 8 0 008 8m0-18a10 10 0 0110 10 10 10 0 01-10 10C6.47 22 2 17.5 2 12A10 10 0 0112 2m.5 5v5.25l4.5 2.67-.75 1.23L11 13V7h1.5z"/></svg>'};var Qd={name:"drag_vertical_variant",data:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 21H9V3h2v18m4-18h-2v18h2V3z"/></svg>'};var x0=`${b}split-view-panel`,ix={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},sx={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled",OVERLAY:"forge-split-view-panel-overlay"},Oo={ROOT:"root",HANDLE:"handle",ICON:"icon",STATE_LAYER:"state-layer",CONTENT:"content"},lx={ROOT:`#${Oo.ROOT}`,HANDLE:`#${Oo.HANDLE}`,ICON:`#${Oo.ICON}`,STATE_LAYER:`#${Oo.STATE_LAYER}`,CONTENT:`#${Oo.CONTENT}`},vx={WILL_RESIZE:`${x0}-will-resize`,RESIZE_START:`${x0}-resize-start`,RESIZE_END:`${x0}-resize-end`,RESIZE:`${x0}-resize`,DID_OPEN:`${x0}-did-open`,DID_CLOSE:`${x0}-did-close`,WILL_OPEN:`${x0}-will-open`,WILL_CLOSE:`${x0}-will-close`},hx={STATE_LAYER_ACTIVATION_WAIT:200},cx={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},D={elementName:x0,attributes:ix,classes:sx,ids:Oo,selectors:lx,events:vx,numbers:hx,customCssProperties:cx},Jd=(a=>(a[a.Under=1]="Under",a[a.Active=2]="Active",a[a.Above=3]="Above",a))(Jd||{});function t6(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function e6(r,t){let e=r.getContentSize(t.orientation);return t1(w({},t),{currentSize:e,startSize:e,availableSpace:r.getAvailableSpace(t.orientation,t.resizable),siblingSize:r.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function a6(r){return t1(w({},r),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function o6(r,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let a=e.currentSize,o=e.orientation==="horizontal"?t.clientX:t.clientY,n=e.startPoint-o;e.resizable==="start"&&(n*=-1);let i=e.startSize-n;e.currentSize=nl(i,e),r.setContentSize(e.currentSize),il(r,e,"pointer"),r.setValuenow(sl(e.currentSize,e));let l=i-e.currentSize+n;return s6(r,l,e),a!==e.currentSize}function r6(r,t,e){if(e.startSize===void 0)return!1;let a=e.currentSize;e.keyboardDelta+=t;let o=e.startSize+e.keyboardDelta;e.currentSize=nl(o,e),r.setContentSize(e.currentSize),il(r,e,"keyboard"),r.setValuenow(sl(e.currentSize,e));let n=o-e.currentSize+e.keyboardDelta*-1;return s6(r,n,e),a!==e.currentSize}function n6(r,t){return r.setContentSize(t.min),t.min}function i6(r,t){let e=r.getAvailableSpace(t.orientation,t.resizable),a=B0(t.max,e);return r.setContentSize(a),a}function s6(r,t,e){if(e.siblingSize!==void 0){let a=e.siblingSize+t;r.setSiblingContentSize(a)}}function nl(r,t){return r=Math.max(r,t.min),r=B0(r,t.max,t.availableSpace),r}function il(r,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(r.animateStateLayer(e==="pointer"),e==="pointer"&&r.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let a=B0(t.max,t.availableSpace);return t.currentSize>=a?(t.isAtMax||(r.animateStateLayer(e==="pointer"),e==="pointer"&&r.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&r.setBodyCursor(t.orientation),!1)}function l6(r,t,e){if(t<=e.min)return r.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let a=B0(e.max,e.availableSpace);return t>=a?(r.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(r.setHandleCursor(e.orientation),!1)}function sl(r,t){if(!t.availableSpace&&!t.max)return 100;let e=B0(t.max,t.availableSpace);return tn(r,t.min,e)}function n5(r,t){if(r==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function v6(r){return r==="horizontal"?"drag_vertical_variant":"drag_handle"}function ll(r){let t=r.resizable;if(t==="off")return;let e=r;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof H2&&!e.open);if(e instanceof H2)return e}function px(r){var n,i;if(!isNaN(+r))return{amount:+r,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=r.match(t),a=e!=null&&e[1]?+e[1]:-1,o=(i=(n=e==null?void 0:e[2])==null?void 0:n.toLowerCase())!=null?i:"";return{amount:a,unit:o}}function Sa(r,t){let e=px(r);return e.unit==="%"?u3(e.amount,t):e.amount}function h6(){let r=document.createElement("div");return r.classList.add(D.classes.OVERLAY),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100vw",r.style.height="100vh",r.style.zIndex="9999",r}var vl=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=t6();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}destroy(){this._adapter.tryRemoveOverlay(),this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):t4(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){t4(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){this._appliedAllowClose&&(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=n6(this._adapter,this._state);this._adapter.emitHostEvent(D.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=i6(this._adapter,this._state);this._adapter.emitHostEvent(D.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){r6(this._adapter,t,this._state)&&this._adapter.emitHostEvent(D.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,il(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._endResize()}_handlePointermove(t){o6(this._adapter,t,this._state)&&this._adapter.emitHostEvent(D.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(D.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=e6(this._adapter,this._state),this._adapter.emitHostEvent(D.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(D.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=a6(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,a=!1){let o=t?D.events.WILL_OPEN:D.events.WILL_CLOSE,n={auto:e,userInitiated:a};this._adapter.emitHostEvent(o,n,!0,!0)&&(this._open=t,this._applyOpen(n))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let a=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=a,this._applyParentAutoClose();let o=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=o,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(D.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=Sa(this._size,t);this._adapter.setHostAttribute(D.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let a=this._adapter.getAvailableSpace(this._orientation,this._resizable),o=B0(this._pixelMax,a),n=tn(e,this._pixelMin,o);this._adapter.setValuenow(n),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(D.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=Sa(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var a;if(this._adapter.toggleHostAttribute(D.attributes.MAX,this._max!==void 0,(a=this._max)==null?void 0:a.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=Sa(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(D.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(D.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(D.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!k(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(D.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(D.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!k(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(D.attributes.AUTO_CLOSE_THRESHOLD,k(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!k(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=Sa(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=nl(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(D.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(k(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),k(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),k(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,k(this._autoClose)||this._applyAutoClose()),k(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,k(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size&&this.open){let o=this._adapter.getParentSize(this._orientation);this._pixelMin=Sa(this._min,o),this._pixelMax=k(this._max)?Sa(this._max,o):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),a=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let o=sl(e,t1(w({},this._state),{availableSpace:a}));this._adapter.setValuenow(o)}t.cursor&&l6(this._adapter,e,t1(w({},this._state),{availableSpace:a}))}};var dx=`${b}split-view`,mx={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},gx={ROOT:"forge-split-view"},c6={ROOT:"root"},wx={ROOT:`#${c6.ROOT}`,PANEL:D.elementName},ux={RESIZE_THROTTLE_THRESHOLD:200},_x={ANIMATING_LAYER:"--forge-split-view-animating-layer"},t2={elementName:dx,attributes:mx,classes:gx,ids:c6,selectors:wx,numbers:ux,customCssProperties:_x};var hl=class extends I{constructor(t){super(t),this._root=g(t,D.selectors.ROOT),this._handle=g(t,D.selectors.HANDLE),this._icon=g(t,D.selectors.ICON),this._stateLayer=g(t,D.selectors.STATE_LAYER),this._content=g(t,D.selectors.CONTENT)}initialize(){let t=this._component.parentElement;(t==null?void 0:t.tagName.toLowerCase())===t2.elementName&&(this._parent=t)}tryRemoveOverlay(){var t;(t=this._overlay)==null||t.remove(),this._overlay=void 0}setPointerdownListener(t){this._handle.addEventListener("pointerdown",t)}setPointerupListener(t){document.addEventListener("pointerup",t)}removePointerupListener(t){document.removeEventListener("pointerup",t)}setPointermoveListener(t){document.addEventListener("pointermove",t)}removePointermoveListener(t){document.removeEventListener("pointermove",t)}setKeydownListener(t){this._handle.addEventListener("keydown",t)}setKeyupListener(t){this._handle.addEventListener("keyup",t)}removeKeyupListener(t){this._handle.removeEventListener("keyup",t)}getParentProperty(t){var e;return(e=this._parent)==null?void 0:e[t]}setAccessibleLabel(t){this._handle.setAttribute("aria-label",t)}setDisabled(t){this._root.classList.toggle(D.classes.DISABLED,t),this._handle&&(this._handle.setAttribute("tabindex",t?"-1":"0"),K(this._handle,t,"aria-disabled","true"))}setResizable(t){this._root.setAttribute(D.attributes.RESIZABLE,t.toString()),K(this._handle,t!=="off","aria-valuemin","0"),K(this._handle,t!=="off","aria-valuemax","100"),t!=="off"&&(this._handle.remove(),t==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(t){this._root.setAttribute(D.attributes.ORIENTATION,t),this._handle.setAttribute("aria-orientation",t==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",v6(t))}setOpen(t,e=!0,a){var n,i;let o=()=>{var l,h;t||this._root.classList.add(D.classes.CLOSED),a&&this.emitHostEvent(t?D.events.DID_OPEN:D.events.DID_CLOSE,a),(l=this._parent)==null||l.unlayerSlottedPanels(),(h=this._parent)==null||h.update({accessibility:!0,cursor:!0})};if(t&&this._root.classList.contains(D.classes.CLOSED)){if(this._root.classList.remove(D.classes.CLOSED),!e){o();return}(n=this._parent)==null||n.layerSlottedPanels(this._component),Rt(this._root,D.classes.OPENING,!0).then(()=>{o()})}else if(!t&&!this._root.classList.contains(D.classes.CLOSED)){if(!e){o();return}(i=this._parent)==null||i.layerSlottedPanels(this._component),Rt(this._root,D.classes.CLOSING,!0).then(()=>{o()})}}setGrabbed(t){var e;this._root.classList.toggle(D.classes.GRABBED,t),this._handle.setAttribute("aria-grabbed",t.toString()),t?(this._overlay||(this._overlay=h6()),document.body.append(this._overlay)):(e=this._overlay)==null||e.remove()}setHandleCursor(t,e){t?this._root.style.setProperty(D.customCssProperties.CURSOR,n5(t,e)):this._root.style.removeProperty(D.customCssProperties.CURSOR)}setBodyCursor(t,e){var a;(a=this._overlay)==null||a.style.setProperty("cursor",n5(t,e))}getContentSize(t){return t==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(t){this._component.style.setProperty(D.customCssProperties.SIZE,`${t}px`)}setValuenow(t){this._handle.setAttribute("aria-valuenow",t.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(t,e){if(e==="off")return-1;let a=ll(this._component);return a?a.getCollapsibleSize()+this.getContentSize(t):this.getParentSize(t)}getSiblingContentSize(){var e;let t=ll(this._component);return(e=t==null?void 0:t.getContentSize())!=null?e:0}setSiblingContentSize(t){let e=ll(this._component);e==null||e.setContentSize(t)}animateStateLayer(t){t?window.setTimeout(()=>{this._stateLayer.playAnimation()},D.numbers.STATE_LAYER_ACTIVATION_WAIT):this._stateLayer.playAnimation()}getParentSize(t){var a,o;let e=t==="horizontal"?(a=this._parent)==null?void 0:a.clientWidth:(o=this._parent)==null?void 0:o.clientHeight;return e!=null?e:0}updateParent(t){var e;(e=this._parent)==null||e.update(t)}};var fx='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-state-layer target="handle" id="state-layer" exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator inward target="handle" part="focus-indicator"></forge-focus-indicator></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',xx=".forge-split-view-panel{display:flex;width:100%;height:100%;overflow:hidden}.forge-split-view-panel__handle{color:var(--forge-theme-text-medium,rgba(0,0,0,.6));background-color:var(--forge-theme-outline,#e0e0e0);position:relative;display:flex;flex-shrink:0;justify-content:center;align-items:center;outline:0}.forge-split-view-panel__content{flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:uxbrlv3;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes uxbrlv3{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;animation-name:uxbrlvc;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes uxbrlvc{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:uxbrlw6;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes uxbrlw6{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;animation-name:uxbrlwb;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes uxbrlwb{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:uxbrlwu;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes uxbrlwu{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;animation-name:uxbrlxq;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes uxbrlxq{from{transform:none}to{transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:uxbrlyb;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes uxbrlyb{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;animation-name:uxbrlyn;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes uxbrlyn{from{transform:none}to{transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}forge-focus-indicator{--forge-focus-indicator-active-width:2px}",H2=class extends M{static get observedAttributes(){return[D.attributes.RESIZABLE,D.attributes.SIZE,D.attributes.MIN,D.attributes.MAX,D.attributes.ACCESSIBLE_LABEL,D.attributes.OPEN,D.attributes.DISABLED,D.attributes.ALLOW_CLOSE,D.attributes.AUTO_CLOSE,D.attributes.AUTO_CLOSE_THRESHOLD]}constructor(){super(),q.define([Qd,J5]),H(this,fx,xx),this._core=new vl(new hl(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case D.attributes.RESIZABLE:this.resizable=a;break;case D.attributes.SIZE:this.size=a;break;case D.attributes.MIN:this.min=a;break;case D.attributes.MAX:a?this.max=a:this.max=void 0;break;case D.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=a;break;case D.attributes.OPEN:this.open=p(a);break;case D.attributes.DISABLED:this.hasAttribute(t)?this.disabled=p(a):this.disabled=void 0;break;case D.attributes.ALLOW_CLOSE:this.hasAttribute(t)?this.allowClose=p(a):this.allowClose=void 0;break;case D.attributes.AUTO_CLOSE:this.hasAttribute(t)?this.autoClose=p(a):this.autoClose=void 0;break;case D.attributes.AUTO_CLOSE_THRESHOLD:a?this.autoCloseThreshold=W(a):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._core.getContentSize()}getCollapsibleSize(){return this._core.getCollapsibleSize()}setContentSize(t){this._core.setContentSize(t)}update(t){this._core.update(t)}};s([v()],H2.prototype,"resizable",2),s([v()],H2.prototype,"size",2),s([v()],H2.prototype,"min",2),s([v()],H2.prototype,"max",2),s([v()],H2.prototype,"accessibleLabel",2),s([v()],H2.prototype,"open",2),s([v()],H2.prototype,"disabled",2),s([v()],H2.prototype,"allowClose",2),s([v()],H2.prototype,"autoClose",2),s([v()],H2.prototype,"autoCloseThreshold",2),H2=s([y({name:D.elementName,dependencies:[X,r1,Q]})],H2);function ub1(){x(H2)}var cl=class extends I{constructor(t){super(t),this._root=g(t,t2.selectors.ROOT)}registerSlotListener(t){this._root.addEventListener("slotchange",t)}registerDidOpenListener(t){this._root.addEventListener(D.events.DID_OPEN,t)}registerDidCloseListener(t){this._root.addEventListener(D.events.DID_CLOSE,t)}observeResize(t){E0.observe(this._root,t)}unobserveResize(){E0.unobserve(this._root)}getSlottedPanels(){let t=this._component.querySelectorAll(t2.selectors.PANEL);return Array.from(t).filter(o=>o.parentElement===this._component)}refitSlottedPanels(t){let e=t==="horizontal"?this._root.clientWidth:this._root.clientHeight,a=this.getSlottedPanels(),o=a.map(i=>{var c;let l=(c=i.shadowRoot)==null?void 0:c.querySelector(D.selectors.ROOT),h=t==="horizontal"?l==null?void 0:l.clientWidth:l==null?void 0:l.clientHeight;return h!=null?h:0}).reduce((i,l)=>i+l,0);if(o<=e)return;let n=o-e;a.slice().reverse().filter(i=>i.open).forEach(i=>{if(n<=0)return;let l=i.getContentSize(),h=i.getCollapsibleSize(),c=Math.min(n,h),d=l-c;i.setContentSize(d),n-=c})}};var pl=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=Sr(e=>this._onResize(e),t2.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}destroy(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(t2.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(t2.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(t2.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(t2.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(t2.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),a=t.resizable==="start"?1:-1,o=t.resizable==="start"?1:3;e.forEach(n=>{(n===t||o===2)&&(o+=a),n.style.setProperty(t2.customCssProperties.ANIMATING_LAYER,o.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(t2.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(a=>{a.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var bx='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',yx=".forge-split-view{display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{flex-direction:row}:host([orientation=vertical]) .forge-split-view{flex-direction:column}",Ce=class extends M{static get observedAttributes(){return[t2.attributes.ORIENTATION,t2.attributes.DISABLED,t2.attributes.ALLOW_CLOSE,t2.attributes.AUTO_CLOSE,t2.attributes.AUTO_CLOSE_THRESHOLD]}constructor(){super(),H(this,bx,yx),this._core=new pl(new cl(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case t2.attributes.ORIENTATION:this.orientation=a;break;case t2.attributes.DISABLED:this.disabled=p(a);break;case t2.attributes.ALLOW_CLOSE:this.allowClose=p(a);break;case t2.attributes.AUTO_CLOSE:this.autoClose=p(a);break;case t2.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=W(a);break}}layerSlottedPanels(t){this._core.layerSlottedPanels(t)}unlayerSlottedPanels(){this._core.unlayerSlottedPanels()}update(t){this._core.update(t)}refit(){this._core.refitSlottedPanels()}};s([v()],Ce.prototype,"orientation",2),s([v()],Ce.prototype,"disabled",2),s([v()],Ce.prototype,"allowClose",2),s([v()],Ce.prototype,"autoClose",2),s([v()],Ce.prototype,"autoCloseThreshold",2),Ce=s([y({name:t2.elementName,dependencies:[H2]})],Ce);function p6(){x(Ce)}var Mx=`${b}stack`,d6={DEFAULT:"forge-stack"},Hx={ROOT:`.${d6.DEFAULT}`},m6={INLINE:"inline",WRAP:"wrap",STRETCH:"stretch",GAP:"gap",ALIGNMENT:"alignment",JUSTIFY:"justify"},Lx=w({},m6),Ix={DEFAULT_GAP:"16"},D2={elementName:Mx,classes:d6,observedAttributes:m6,attributes:Lx,selectors:Hx,strings:Ix};var dl=class extends I{constructor(t){super(t),this._rootElement=g(t,D2.selectors.ROOT)}setGap(t){let e=/^\d+$/.test(t)?`${t}px`:t;this._rootElement.style.gap=`var(--forge-stack-gap, ${e})`}};var ml=class{constructor(t){this._adapter=t;this._inline=!1;this._wrap=!1;this._stretch=!1;this._gap=D2.strings.DEFAULT_GAP;this._alignment="start";this._justify="start"}get inline(){return this._inline}set inline(t){t=!!t,this._inline!==t&&(this._inline=t,this._adapter.toggleHostAttribute(D2.attributes.INLINE,this._inline))}get wrap(){return this._wrap}set wrap(t){t=!!t,this._wrap!==t&&(this._wrap=t,this._adapter.toggleHostAttribute(D2.attributes.WRAP,this._wrap))}get stretch(){return this._stretch}set stretch(t){t=!!t,this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(D2.attributes.STRETCH,this._stretch))}get gap(){return this._gap}set gap(t){this._gap!==t&&(this._gap=t,this._adapter.setGap(this._gap),this._adapter.setHostAttribute(D2.attributes.GAP,this._gap))}get alignment(){return this._alignment}set alignment(t){this._alignment!==t&&(this._alignment=t,this._adapter.setHostAttribute(D2.attributes.ALIGNMENT,this._alignment))}get justify(){return this._justify}set justify(t){this._justify!==t&&(this._justify=t,this._adapter.setHostAttribute(D2.attributes.JUSTIFY,this._justify))}};var Vx='<template><div class="forge-stack" part="root"><slot></slot></div></template>',Ex=".forge-stack{display:flex;flex-direction:column;align-items:var(--_stack-alignment);justify-content:var(--_stack-justify);gap:var(--_stack-gap);height:var(--_stack-height);width:100%;--_stack-gap:var(--forge-stack-gap, var(--forge-spacing-medium, 16px));--_stack-height:var(--forge-stack-height);--_stack-stretch:var(--forge-stack-stretch, initial);--_stack-alignment:var(--forge-stack-alignment, normal);--_stack-justify:var(--forge-stack-justify, normal);--_stack-wrap:var(--forge-stack-wrap, wrap)}.forge-stack ::slotted(*){flex:var(--_stack-stretch)}:host([inline]) .forge-stack{flex-direction:row}:host([inline][wrap]) .forge-stack{flex-wrap:wrap}:host(:not([inline])) .forge-stack{--_stack-height:var(--forge-stack-height, 100%)}:host([stretch]) ::slotted(*){--_stack-stretch:var(--forge-stack-stretch, 1)}:host([alignment=start]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, start)}:host([alignment=center]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, center)}:host([alignment=end]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, end)}:host([justify=start]) .forge-stack{--_stack-justify:var(--forge-stack-justify, start)}:host([justify=center]) .forge-stack{--_stack-justify:var(--forge-stack-justify, center)}:host([justify=end]) .forge-stack{--_stack-justify:var(--forge-stack-justify, end)}",de=class extends M{static get observedAttributes(){return Object.values(D2.observedAttributes)}constructor(){super(),H(this,Vx,Ex),this._core=new ml(new dl(this))}attributeChangedCallback(t,e,a){switch(t){case D2.observedAttributes.INLINE:this.inline=p(a);break;case D2.observedAttributes.WRAP:this.wrap=p(a);break;case D2.observedAttributes.STRETCH:this.stretch=p(a);break;case D2.observedAttributes.GAP:this.gap=a;break;case D2.observedAttributes.ALIGNMENT:this.alignment=a;break;case D2.observedAttributes.JUSTIFY:this.justify=a;break}}};s([v()],de.prototype,"inline",2),s([v()],de.prototype,"wrap",2),s([v()],de.prototype,"stretch",2),s([v()],de.prototype,"gap",2),s([v()],de.prototype,"alignment",2),s([v()],de.prototype,"justify",2),de=s([y({name:D2.elementName})],de);function g6(){x(de)}var gl=`${b}step`,sa={STEP:"forge-step",STEP_CONTAINER:"container",ERROR:"error",SELECTED:"selected",COMPLETED:"completed",EDITABLE:"editable",ALTERNATIVE:"alternative",ICON_CONTENT:"icon-content",ICON:"icon",LABEL_CONTAINER:"label-container",LABEL:"label",OPTIONAL_LABEL:"optional-label",INDEX:"index",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",EXPANSION_PANEL:"expansion-panel",EXPANSION_ICON:"expanded-icon",EXPANSION_ICON_EXPANDED:"expanded-icon--expanded",EXPANSION_CONTENT:"expansion-content"},Cx={SELECTED:"selected",INDEX:"index",EDITABLE:"editable",COMPLETED:"completed",ERROR:"error",ALTERNATIVE:"alternative",FIRST:"first",LAST:"last",ARIA_SELECTED:"aria-selected",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",IGNORE_USER_EXPANSION:"ignore-user-expansion"},zx={STEP:`.${sa.STEP}`,STEP_CONTAINER:`.${sa.STEP_CONTAINER}`,INDEX:`.${sa.INDEX}`,ICON:`.${sa.ICON}`,ICON_CONTENT:`.${sa.ICON_CONTENT}`,EXPANSION_SLOT:'slot[name="expansion-content"]',EXPANSION_PANEL:`.${sa.EXPANSION_PANEL}`,EXPANSION_ICON:`.${sa.EXPANSION_ICON}`},Ax={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",EXPANSION_CONTENT_SLOT_NAME:"expansion-content"},Bx={SELECT:`${gl}-select`,EXPANDED_CONTENT_FOCUSIN:`${gl}-expanded-content-focusin`,EXPANDED_CONTENT_FOCUSOUT:`${gl}-expanded-content-focusout`},S={elementName:gl,classes:sa,selectors:zx,attributes:Cx,events:Bx,strings:Ax};var wl=class extends I{constructor(t){super(t),this._stepContainer=g(t,S.selectors.STEP),this._container=g(t,S.selectors.STEP_CONTAINER),this._stateLayerElement=g(this._component,M1.elementName)}get component(){return this._component}initialize(){this._component.hasAttribute("role")||this._component.setAttribute("role","tab")}setIndex(t){this._stepContainer.querySelector(S.selectors.INDEX).innerHTML=(t+1||"").toString()}toggleRootClass(t,e){_2(this._stepContainer,e,t)}toggleDisabled(t){_2(this._stepContainer,t,S.classes.DISABLED),K(this._component,t,"aria-disabled"),this._stateLayerElement.disabled=t}toggleIcon(t,e){let a=this._stepContainer.querySelector(S.selectors.INDEX),o=this._stepContainer.querySelector(S.selectors.ICON);if(!e){a.style.display="inherit",o.style.display="none";return}a.style.display="none",o.style.display="inherit",o.name=t}slotHasContent(){return this._expansionSlot.assignedElements({flatten:!0}).length>0}setClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}setSlotListener(t){this._expansionSlot.addEventListener("slotchange",t)}removeSlotListener(t){this._expansionSlot&&this._expansionSlot.removeEventListener("slotchange",t)}setExpanded(t){this._expansionPanel&&(this._expansionPanel.open=t,K(this._expansionPanel,!t,"tabindex","-1")),_2(this._stepContainer,t,S.classes.EXPANDED)}setExpansionPanelAnimations(t){this._expansionPanel.animationType=t?"default":"none"}addExpansionPanel(){this._container.querySelector(S.selectors.EXPANSION_PANEL)||(this._expansionPanel=this._container.appendChild(this._createExpansionPanel()),this._expansionSlot=this._expansionPanel.querySelector(S.selectors.EXPANSION_SLOT))}removeExpansionPanel(){let t=this._container.querySelector(S.selectors.EXPANSION_PANEL);t&&this._container.removeChild(t)}addExpansionIcon(){this._stepContainer.querySelector(S.selectors.EXPANSION_ICON)||this._stepContainer.appendChild(this._createExpansionIcon())}removeExpansionIcon(){let t=this._stepContainer.querySelector(S.selectors.EXPANSION_ICON);t&&this._stepContainer.removeChild(t)}addExpansionPanelListener(t,e){this._expansionPanel.addEventListener(t,e)}removeExpansionPanelListener(t,e){this._expansionPanel&&this._expansionPanel.removeEventListener(t,e)}isExpandedContentInFocus(t){return this._expansionSlot.assignedElements().some(e=>e.contains(t||document.activeElement))}_createExpansionPanel(){let t=document.createElement("forge-expansion-panel");t.animationType="none",t.setAttribute("part","expansion-panel"),y1(S.classes.EXPANSION_PANEL,t);let e=document.createElement("slot");return e.setAttribute("name","expansion-content"),y1(S.classes.EXPANSION_CONTENT,e),t.appendChild(e),t}_createExpansionIcon(){let t=document.createElement("forge-icon");return y1(S.classes.EXPANSION_ICON,t),t.name="keyboard_arrow_down",t.setAttribute("part","expanded-icon"),t}};var ul=class{constructor(t){this._adapter=t;this._clickListener=()=>this._onClickListener(),this._expansionContentSlotChangeListener=e=>this._onExpansionContentSlotChange(e),this._expansionContentFocusInListener=e=>this._onExpansionContentFocusIn(e),this._expansionContentFocusOutListener=e=>this._onExpansionContentFocusOut(e)}initialize(){this._adapter.initialize(),this._applySelected(),this._toggleIcon(),this._vertical&&(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener),this._adapter.addExpansionPanelListener("focusin",this._expansionContentFocusInListener),this._adapter.addExpansionPanelListener("focusout",this._expansionContentFocusOutListener)),this._initialized=!0}destroy(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanelListener("focusin",this._onExpansionContentFocusIn),this._adapter.removeExpansionPanelListener("focusout",this._onExpansionContentFocusOut)}get index(){return this._index}set index(t){this._index!==t&&(this._index=t,this._applyIndex(),this._adapter.setHostAttribute(S.attributes.INDEX,t.toString()))}get editable(){return this._editable}set editable(t){this._editable!==t&&(this._editable=t,this._adapter.toggleHostAttribute(S.attributes.EDITABLE,t),this._applyEditable())}get completed(){return this._completed}set completed(t){this._completed!==t&&(this._completed=t,this._adapter.toggleHostAttribute(S.attributes.COMPLETED,t),this._applyCompleted())}get error(){return this._error}set error(t){this._error!==t&&(this._error=t,this._adapter.toggleHostAttribute(S.attributes.ERROR,t),this._applyError())}get selected(){return this._selected}set selected(t){this._selected!==t&&(this._selected=t,this._adapter.toggleHostAttribute(S.attributes.SELECTED,t),this._applySelected())}get alternative(){return this._alternative}set alternative(t){this._alternative!==t&&(this._alternative=t,this._adapter.toggleHostAttribute(S.attributes.ALTERNATIVE,t),this._applyAlternative())}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._applyDisabled()}get vertical(){return this._vertical}set vertical(t){t!==this._vertical&&(this._vertical=t,this._applyVertical(),this._initialized&&(this._vertical?(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener)):(this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanel(),this._adapter.removeExpansionIcon())))}get expanded(){return this._expanded}set expanded(t){t!==this._expanded&&(this._expanded=t,this._adapter.toggleHostAttribute(S.attributes.EXPANDED,this._expanded),this._initialized&&this._applyExpanded())}get ignoreUserExpansion(){return this._ignoreUserExpansion}set ignoreUserExpansion(t){t!==this._ignoreUserExpansion&&(this._ignoreUserExpansion=t)}_applyExpanded(){this._adapter.setExpanded(this._expanded)}_applyVertical(){this._adapter.toggleHostAttribute(S.attributes.VERTICAL,this._vertical),this._adapter.toggleRootClass(S.classes.VERTICAL,this._vertical)}_applyAlternative(){this._adapter.toggleRootClass(S.classes.ALTERNATIVE,this._alternative)}_applySelected(){this._adapter.toggleRootClass(S.classes.SELECTED,this._selected),this._adapter.setHostAttribute(S.attributes.ARIA_SELECTED,(this._selected||!1).toString()),this._adapter.hostElement.tabIndex=this._selected?0:-1,this._toggleIcon()}_applyIndex(){this._adapter.setIndex(this._index)}_applyEditable(){this._adapter.toggleRootClass(S.classes.EDITABLE,this._editable),this._toggleIcon()}_applyCompleted(){this._adapter.toggleRootClass(S.classes.COMPLETED,this._completed),this._toggleIcon()}_applyError(){this._adapter.toggleRootClass(S.classes.ERROR,this._error),this._toggleIcon()}_applyDisabled(){this._adapter.toggleDisabled(this._disabled),this._toggleIcon()}_getIconState(){return this._error?"warning":this._completed?this._editable?"mode_edit":"check":this._editable&&this._selected&&!this._disabled?"mode_edit":this._disabled?"block":""}_toggleIcon(){this._iconState=this._getIconState(),this._adapter.toggleIcon(this._iconState,this._iconState!=="")}_toggleExpanded(){this._adapter.slotHasContent()&&(this._expanded=!this._expanded,this._applyExpanded(),this._adapter.toggleHostAttribute(S.attributes.EXPANDED,this._expanded))}_onClickListener(){this._vertical&&!this._ignoreUserExpansion&&this._toggleExpanded()}_onExpansionContentSlotChange(t){let e=this._adapter.slotHasContent();e?(this._adapter.setHostAttribute(S.attributes.EXPANDABLE),this._applyExpanded(),this._adapter.setExpansionPanelAnimations(!0)):(this._adapter.removeHostAttribute(S.attributes.EXPANDABLE),this._adapter.setExpansionPanelAnimations(!1)),this._adapter.toggleRootClass(S.classes.EXPANDABLE,e)}_onExpansionContentFocusIn(t){!this._expandedContentFocused&&this._adapter.isExpandedContentInFocus(t.target)&&(this._adapter.emitHostEvent(S.events.EXPANDED_CONTENT_FOCUSIN,this._adapter.component),this._expandedContentFocused=!0)}_onExpansionContentFocusOut(t){t.relatedTarget&&!this._adapter.isExpandedContentInFocus(t.relatedTarget)&&(this._adapter.emitHostEvent(S.events.EXPANDED_CONTENT_FOCUSOUT,this._adapter.component),this._expandedContentFocused=!1)}};var Tx='<template><div class="container" part="root"><div class="forge-step" part="step"><div class="before" part="before"></div><div class="icon-container" part="icon-container"><div class="icon-content" part="icon-content"><span class="index" part="index"></span><forge-icon class="icon" part="icon"></forge-icon></div></div><div class="text-container" part="text-container"><div class="title" part="title-container"><slot></slot></div><div class="subtitle" part="subtitle-container"><slot name="optional"></slot></div></div><div class="after" part="after"></div><forge-state-layer exportparts="surface:state-layer" target=":host"></forge-state-layer><forge-focus-indicator part="focus-indicator" target=":host" inward></forge-focus-indicator></div></div></template>',Sx=':host{--_step-primary-color:var(--forge-step-primary-color, var(--forge-theme-primary, #3f51b5));--_step-text-color:var(--forge-step-text-color, var(--forge-theme-on-primary, #ffffff));--_step-border-radius:var(--forge-step-border-radius, calc(var(--forge-shape-extra-large, 16px) * var(--forge-shape-factor, 1)));--_step-border-radius-vertical:var(--forge-step-border-radius-vertical, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_step-disabled-text-color:var(--forge-step-disabled-text-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_step-disabled-color:var(--forge-step-disabled-color, var(--forge-theme-surface-container-minimum, #f5f5f5));--_step-icon-fill:var(--forge-step-icon-fill, unset);--_step-icon-fill-active:var(--forge-step-icon-fill-active, var(--_step-primary-color));--_step-icon-text-color:var(--forge-step-icon-text-color, var(--forge-theme-primary, #3f51b5));--_step-icon-text-color-active:var(--forge-step-icon-text-color-active, var(--forge-theme-on-primary, #ffffff));--_step-icon-content-size:var(--forge-step-icon-content-size, 24px);--_step-icon-size:var(--forge-step-icon-size, calc(var(--forge-typography-font-size, 1rem) * 0.875));--_step-icon-transition-duration:var(--forge-step-icon-transition-duration, var(--forge-animation-duration-medium4, 400ms));--_step-icon-transition-easing:var(--forge-step-icon-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_step-line-color:var(--forge-step-line-color, var(--forge-theme-outline, #e0e0e0));--_step-line-min-width:var(--forge-step-line-min-width, 10px);--_step-line-min-width-clustered:var(--forge-step-line-min-width-clustered, 25px);--_step-label-color:var(--forge-step-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_step-sub-label-color:var(--forge-step-sub-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_step-error-color:var(--forge-step-error-color, var(--forge-theme-error, #b00020));--_step-error-text-color:var(--forge-step-error-text-color, var(--forge-theme-on-error, #ffffff));--_step-expansion-panel-border-left-width:var(--forge-step-expansion-panel-border-left-width, 1px);--_step-expansion-panel-margin-bottom:var(--forge-step-expansion-panel-margin-bottom, 4px);--_step-expansion-panel-margin-left:var(--forge-step-expansion-panel-margin-left, 60px);--_step-expansion-panel-margin-top:var(--forge-step-expansion-panel-margin-top, 4px);--_step-expansion-panel-icon-color:var(--forge-step-expansion-panel-icon-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}:host(:focus){outline:0}:host([error]){--forge-state-layer-color:var(--_step-error-color)}:host(:first-child[alternative])::after{align-self:flex-start;top:22px;margin:0}:host(:last-child[alternative])::before{align-self:flex-start;top:22px;margin:0}:host(:not(:first-child):not(:last-child)[alternative])::after,:host(:not(:first-child):not(:last-child)[alternative])::before{align-self:flex-start;top:22px;min-width:7px;margin:0}:host(:not(:last-child)[alternative]) .after{align-self:flex-start;top:22px;position:absolute;width:calc(50% - 18px);left:calc(50% + 18px);height:0;right:0}:host(:not(:first-child)[alternative]) .before{align-self:flex-start;top:22px;position:absolute;left:0;width:calc(50% - 18px);height:0}:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::after,:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::before{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host(:last-child):host(:not([vertical]))::before{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px 0 0}:host(:is(:first-child)):host(:not([vertical]))::after{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host([vertical]){flex-direction:column}:host([vertical])::after{content:none}:host([vertical])::before{content:none}:host([vertical]) .forge-step{--_step-border-radius:var(--_step-border-radius-vertical);width:100%;min-height:52px}:host([vertical]) .forge-step .text-container{white-space:normal}:host([vertical]) .icon-container .icon-content{margin:0 16px 0 0}:host([vertical]) .expansion-panel{display:none}:host([vertical]) .expanded-icon{color:var(--_step-expansion-panel-icon-color);display:none;margin-left:auto}:host([vertical][expandable]) .expansion-panel{display:block}:host([ignore-user-expansion]) .forge-step .expanded-icon{display:none}forge-expansion-panel::part(root){border-color:var(--_step-line-color);margin-left:var(--_step-expansion-panel-margin-left);margin-top:var(--_step-expansion-panel-margin-top);margin-bottom:var(--_step-expansion-panel-margin-bottom);border-left-width:var(--_step-expansion-panel-border-left-width);border-left-style:solid}forge-focus-indicator{--forge-focus-indicator-color:var(--_step-primary-color);--forge-focus-indicator-shape:16px}.container{display:contents}.forge-step{-webkit-tap-highlight-color:transparent;padding:12px 16px;outline:0;background:0 0;border:none;border-radius:var(--_step-border-radius);position:relative;display:flex;overflow:hidden;align-items:center;box-sizing:border-box;cursor:pointer}.forge-step:focus{outline:0}.forge-step::-moz-focus-inner,.forge-step::-moz-focus-outer{padding:0;border:0}.forge-step.error forge-focus-indicator{--forge-focus-indicator-color:var(--_step-error-color)}.forge-step.vertical forge-focus-indicator{--forge-focus-indicator-shape:4px}.forge-step.selected:not(.disabled){--forge-state-layer-color:var(--_step-primary-color)}.forge-step.selected:not(.disabled)::before{background-color:var(--_step-primary-color);content:"";position:absolute;inset:0;opacity:.08;height:100%;width:100%}.forge-step.selected:not(.disabled).error{--_step-primary-color:var(--_step-error-color)}.forge-step .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);color:var(--_step-label-color);text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step .subtitle{text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step .subtitle ::slotted(*){color:var(--_step-sub-label-color);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit)}.forge-step .icon-container .icon-content{color:var(--_step-icon-text-color);background-color:var(--_step-icon-fill);height:var(--_step-icon-content-size);width:var(--_step-icon-content-size);border-style:solid;border-width:2px;border-color:transparent;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background-color var(--_step-icon-transition-duration) var(--_step-icon-transition-easing);margin:0 8px 0 0;flex:none}.forge-step .icon-container .icon-content forge-icon{font-size:var(--_step-icon-size)}.forge-step.disabled{color:var(--_step-disabled-text-color);cursor:not-allowed}.forge-step.disabled.forge-step .icon-container .icon-content{--_step-icon-fill:var(--_step-disabled-color);--_step-icon-text-color:var(--_step-disabled-text-color)}.forge-step.disabled .text-container .title{color:var(--_step-disabled-text-color)}.forge-step.disabled .text-container .subtitle ::slotted(*){color:var(--_step-disabled-text-color)}.forge-step.alternative{flex-direction:column}.forge-step.alternative .icon-container .icon-content{margin:0}.forge-step.alternative .text-container{margin-top:8px;place-items:center}.forge-step:not(.selected):not(.disabled).editable:not(.completed):not(.error) .icon-content,.forge-step:not(.selected):not(.disabled):not(.editable):not(.completed):not(.error) .icon-content{border-color:var(--_step-primary-color)}.forge-step:not(.selected):not(.disabled).editable:not(.completed):not(.error) .icon-content .index,.forge-step:not(.selected):not(.disabled):not(.editable):not(.completed):not(.error) .icon-content .index{color:var(--_step-primary-color)}.forge-step.selected.disabled .icon-content{--_step-icon-fill:var(--_step-disabled-color);--_step-icon-text-color:var(--_step-disabled-text-color)}.forge-step.selected:not(.disabled) .icon-container .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.selected:not(.disabled) .title{color:var(--_step-primary-color);font-weight:500}.forge-step.selected:not(.disabled) .subtitle ::slotted(*){color:var(--_step-primary-color);font-weight:500}.forge-step.error:not(.disabled) .title{color:var(--_step-error-color)}.forge-step.error:not(.disabled) .subtitle ::slotted(*){color:var(--_step-error-color)}.forge-step.error:not(.disabled) .icon-container .icon-content{--_step-icon-fill:var(--_step-error-color);--_step-icon-text-color:var(--_step-error-text-color)}.forge-step.completed:not(.disabled):not(.error):not(.editable) .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.completed:not(.disabled):not(.error).editable .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.expandable .expanded-icon{display:inline-block;transition:transform .3s ease-in-out}.forge-step.expandable.expanded .expanded-icon{transform:rotate(180deg)}.forge-step.expandable .icon-container .icon-content{margin:0 16px 0 0}.forge-step .text-container{display:flex;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(:not(:last-child)[clustered])::after{--_step-line-min-width:var(--_step-line-min-width-clustered)}:host(:last-child[clustered])::before{--_step-line-min-width:var(--_step-line-min-width-clustered)}:host(:not(:first-child):not(:last-child)[clustered])::after,:host(:not(:first-child):not(:last-child)[clustered])::before{--_step-line-min-width:var(--_step-line-min-width-clustered)}',Y2=class extends M{static get observedAttributes(){return[S.attributes.COMPLETED,S.attributes.EDITABLE,S.attributes.ERROR,S.attributes.INDEX,S.attributes.SELECTED,S.attributes.ALTERNATIVE,S.attributes.DISABLED,S.attributes.VERTICAL,S.attributes.EXPANDED,S.attributes.IGNORE_USER_EXPANSION]}constructor(){super(),q.define([n3,j5,v3,$5,i0]),H(this,Tx,Sx),this._core=new ul(new wl(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case S.attributes.INDEX:this.index=W(a);break;case S.attributes.COMPLETED:this.completed=p(a);break;case S.attributes.EDITABLE:this.editable=p(a);break;case S.attributes.ERROR:this.error=p(a);break;case S.attributes.SELECTED:this.selected=p(a);break;case S.attributes.ALTERNATIVE:this.alternative=p(a);break;case S.attributes.DISABLED:this.disabled=p(a);break;case S.attributes.VERTICAL:this.vertical=p(a);break;case S.attributes.EXPANDED:this.expanded=p(a);break;case S.attributes.IGNORE_USER_EXPANSION:this.ignoreUserExpansion=p(a);break}}};s([v()],Y2.prototype,"alternative",2),s([v()],Y2.prototype,"index",2),s([v()],Y2.prototype,"editable",2),s([v()],Y2.prototype,"completed",2),s([v()],Y2.prototype,"error",2),s([v()],Y2.prototype,"selected",2),s([v()],Y2.prototype,"disabled",2),s([v()],Y2.prototype,"vertical",2),s([v()],Y2.prototype,"expanded",2),s([v()],Y2.prototype,"ignoreUserExpansion",2),Y2=s([y({name:S.elementName,dependencies:[X,_t,r1,Q]})],Y2);function w6(){x(Y2)}var kx=`${b}stepper`,u6={STEPPER:"forge-stepper",LINEAR:"linear",ALTERNATIVE:"alternative",CLUSTERED:"clustered",FIXED:"fixed",ALIGN_LEFT:"align-left",ALIGN_CENTER:"align-center",ALIGN_RIGHT:"align-right",VERTICAL:"vertical",FOCUSED:"focused"},Ox={STEPPER:`.${u6.STEPPER}`},Dx={SELECTED_INDEX:"selected-index",LINEAR:"linear",ALTERNATIVE:"alternative",LAYOUT_MODE:"layout-mode",LAYOUT_ALIGN:"layout-align",DISABLED:"disabled",VERTICAL:"vertical"},dt={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_KEY:"Tab"},ka={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,HOME_KEYCODE:36,ENTER_KEYCODE:13,SPACE_KEYCODE:32},Px=[dt.ARROW_LEFT_KEY,dt.ARROW_RIGHT_KEY,dt.ARROW_DOWN_KEY,dt.ARROW_UP_KEY,dt.END_KEY,dt.HOME_KEY,dt.ENTER_KEY,dt.SPACE_KEY,dt.TAB_KEY],Nx={[ka.ARROW_LEFT_KEYCODE]:dt.ARROW_LEFT_KEY,[ka.ARROW_RIGHT_KEYCODE]:dt.ARROW_RIGHT_KEY,[ka.END_KEYCODE]:dt.END_KEY,[ka.HOME_KEYCODE]:dt.HOME_KEY,[ka.ENTER_KEYCODE]:dt.ENTER_KEY,[ka.SPACE_KEYCODE]:dt.SPACE_KEY},R={elementName:kx,classes:u6,selectors:Ox,attributes:Dx,numbers:ka,strings:dt,ACCEPTABLE_KEYS:Px,KEYCODE_MAP:Nx};var b0=class r{static createStepElement(t,e,a){var n,i;let o=document.createElement(S.elementName);return o.index=e,o.completed=t.completed||!1,o.editable=t.editable||!1,o.selected=a.selectedIndex===e,o.alternative=a.alternative,o.error=t.error||!1,o.disabled=t.disabled||!1,o.vertical=(i=(n=t.vertical)!=null?n:a.vertical)!=null?i:!1,o.ignoreUserExpansion=t.ignoreUserExpansion||!1,o.expanded=t.expanded||!1,a.linear&&e>a.selectedIndex&&(o.tabIndex=-1),o.textContent=t.label,t.optionalLabel&&o.appendChild(this.createStepOptionalLabel(t.optionalLabel)),o}static createStepOptionalLabel(t){let e=document.createElement("span");return e.slot="optional",e.textContent=t||"",e}static setLinearState(t,e){let a=t.classList.contains(R.classes.LINEAR);a&&!e&&(t.classList.remove(R.classes.LINEAR),a=!1),!a&&e&&t.classList.add(R.classes.LINEAR)}static setAlternativeState(t,e){let a=t.classList.contains(R.classes.ALTERNATIVE);a&&!e&&(t.classList.remove(R.classes.ALTERNATIVE),a=!1),!a&&e&&t.classList.add(R.classes.ALTERNATIVE)}static setLayoutMode(t,e){switch(e){case"clustered":t.classList.contains(R.classes.FIXED)&&t.classList.remove(R.classes.FIXED),t.classList.add(R.classes.CLUSTERED);break;case"fixed":t.classList.contains(R.classes.CLUSTERED)&&t.classList.remove(R.classes.CLUSTERED),t.classList.add(R.classes.FIXED);break}}static setLayoutAlign(t,e){switch(t.classList.contains(R.classes.ALIGN_LEFT)&&t.classList.remove(R.classes.ALIGN_LEFT),t.classList.contains(R.classes.ALIGN_CENTER)&&t.classList.remove(R.classes.ALIGN_CENTER),t.classList.contains(R.classes.ALIGN_RIGHT)&&t.classList.remove(R.classes.ALIGN_RIGHT),e){case"left":t.classList.add(R.classes.ALIGN_LEFT);break;case"center":t.classList.add(R.classes.ALIGN_CENTER);break;case"right":t.classList.add(R.classes.ALIGN_RIGHT);break}}static createSteps(t){let e=[];return t.steps.forEach((a,o)=>{let n=r.createStepElement(a,o,t);e.push(n)}),e[0].setAttribute(S.attributes.FIRST,""),e[e.length-1].setAttribute(S.attributes.LAST,""),e}};var _l=class extends I{constructor(t){super(t),this._rootElement=g(t,R.selectors.STEPPER),this._slotElement=this._rootElement.querySelector("slot")}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","tablist")}patchSafari(){this._applyToSteps(t=>t.setAttribute("safari",""))}addSlotChangeListener(t){this._slotElement.addEventListener("slotchange",t)}removeSlotChangeListener(t){this._slotElement.addEventListener("slotchange",t)}getLastStep(){let t=this._getSteps();return t.item(t.length-1)}setSelected(t){this._getSteps().forEach(e=>{e===t?e.selected=!0:e.selected=!1})}assignIndices(){this._getSteps().forEach((e,a)=>{e.index=a})}assignFirstLastStep(){let t=this._getSteps();t&&t.length>1&&(t[0].setAttribute("first",""),t[t.length-1].setAttribute("last",""))}setLayoutAlign(t){b0.setLayoutAlign(this._rootElement,t)}setLayoutMode(t){b0.setLayoutMode(this._rootElement,t),this._applyToSteps(e=>e.setAttribute(S.attributes.CLUSTERED,""))}setAlternativeState(t){b0.setAlternativeState(this._rootElement,t),this._applyToSteps(e=>e.alternative=t)}setVertical(t){_2(this._rootElement,t,R.classes.VERTICAL),this._applyToSteps(e=>e.vertical=t)}setLinearState(t){b0.setLinearState(this._rootElement,t)}removeRootListener(t,e){this._rootElement.removeEventListener("click",e)}addRootListener(t,e){this._rootElement.addEventListener(t,e)}setSelectedByIndex(t){this._applyToSteps(e=>{e.selected&&e.index!==t&&(e.selected=!1),e.index===t&&(e.selected=!0)})}applyConfiguredSteps(t){this._component.querySelectorAll(S.elementName).forEach(e=>{this._component.removeChild(e)}),t.forEach(e=>this._component.appendChild(e))}tryGetFocusedStep(){let t;return this._applyToSteps(e=>{e.matches(":focus-within")&&(t=e)}),t}getFocusedOrSelectedStep(){let t=this.tryGetFocusedStep();return t||(t=this._getSteps()[0],t.focus()),t}getStep(t){let e=0,a=this._getSteps();return t<0?a.item(a.length-1):(a.length>t&&(e=t),a.item(e))}toggleDisabled(t){this._applyToSteps(e=>e.disabled=t)}toggleRootClass(t,e){_2(this._rootElement,e,t)}isStepperFocused(){return this._rootElement.classList.contains(R.classes.FOCUSED)}setStepsListener(t,e){this._applyToSteps(a=>a.addEventListener(t,e))}removeStepsListener(t,e){this._applyToSteps(a=>a.removeEventListener(t,e))}_applyToSteps(t){this._getSteps().forEach(t)}_getSteps(){return this._component.querySelectorAll(S.elementName)}};var fl=class{constructor(t){this._adapter=t;this._steps=[];this._selectedIndex=0;this._linear=!1;this._alternative=!1;this._layoutMode="fixed";this._layoutAlign="center";this._initialize=!1;this._clickListener=e=>this._handleClick(e),this._keyListener=e=>this._onKeydown(e),this._stepFocusListener=()=>this._onStepFocus(),this._stepBlurListener=()=>this._onStepBlur(),this._stepExpandedContentFocusInListener=e=>this._onStepExpandedContentFocusIn(e),this._stepExpandedContentFocusOutListener=e=>this._onStepExpandedContentFocusOut(e),this._slotChangeListener=e=>this._onSlotChange(e)}initialize(){this._adapter.initializeAccessibility(),this._adapter.assignIndices(),this._adapter.setLinearState(this._linear),this._adapter.setAlternativeState(this._alternative),this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setLayoutMode(this._layoutMode),this._adapter.addRootListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keyListener),this._adapter.assignFirstLastStep(),this._adapter.addRootListener(S.events.EXPANDED_CONTENT_FOCUSIN,this._stepExpandedContentFocusInListener),this._adapter.addRootListener(S.events.EXPANDED_CONTENT_FOCUSOUT,this._stepExpandedContentFocusOutListener),this._applySelectedIndex(),this._patchBrowser(),this._adapter.setStepsListener("blur",this._stepBlurListener),this._adapter.setStepsListener("focus",this._stepFocusListener),this._initialize||this._adapter.addSlotChangeListener(this._slotChangeListener),this._initialize=!0}destroy(){this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeHostListener("keydown",this._keyListener),this._adapter.removeSlotChangeListener(this._slotChangeListener),this._adapter.removeStepsListener("blur",this._stepBlurListener),this._adapter.removeStepsListener("focus",this._stepFocusListener)}get steps(){return this._steps.map(t=>w({},t))}set steps(t){if(Array.isArray(t)&&t.length>0)this._steps=[...t.map(e=>w({},e))];else{this._steps=[];return}this._renderConfiguration()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){if(!k(t))t=0;else if(!z2(t)){let e=Number(t);t=isNaN(e)?0:e}this._selectedIndex!==t&&(this._selectedIndex=t,this._adapter.setHostAttribute(R.attributes.SELECTED_INDEX,this._selectedIndex.toString()),this._applySelectedIndex())}get linear(){return this._linear}set linear(t){t=!!t,this._linear!==t&&(this._linear=t,this._adapter.setLinearState(this._linear),this._adapter.setHostAttribute(R.attributes.LINEAR,this._linear.toString()))}get alternative(){return this._alternative}set alternative(t){t=!!t,this._alternative!==t&&(this._alternative=t,this._adapter.setAlternativeState(this._alternative),this._adapter.setHostAttribute(R.attributes.ALTERNATIVE,this._alternative.toString()))}get layoutMode(){return this._layoutMode}set layoutMode(t){/^(fixed|clustered)$/.test(t)&&this._layoutMode!==t&&(this._layoutMode=t,this._adapter.setHostAttribute(R.attributes.LAYOUT_MODE,this._layoutMode),this._adapter.setLayoutMode(this._layoutMode))}get layoutAlign(){return this._layoutAlign}set layoutAlign(t){/^(left|center|right)$/.test(t)&&this._layoutAlign!==t&&(this._layoutAlign=t,this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setHostAttribute(R.attributes.LAYOUT_ALIGN,this._layoutAlign))}get disabled(){return this._disabled}set disabled(t){t!==this._disabled&&(this._disabled=t,this._applyDisabled())}get vertical(){return this._vertical}set vertical(t){t!==this._vertical&&(this._vertical=t,this._applyVertical(),this._adapter.toggleHostAttribute(R.attributes.VERTICAL,this._vertical))}_applyVertical(){this._adapter.setVertical(this._vertical)}_applyDisabled(){this._disabled?this._adapter.setHostAttribute(R.attributes.DISABLED,"disabled"):this._adapter.removeHostAttribute(R.attributes.DISABLED),this._adapter.toggleDisabled(this._disabled)}_applySelectedIndex(){this._adapter.setSelectedByIndex(this._selectedIndex)}_handleClick(t){if(t.preventDefault(),this._linear)return;let a=L2(t).filter(o=>o.nodeType===Node.ELEMENT_NODE).find(o=>o.matches(S.elementName));a&&!a.selected&&!a.disabled&&this._adapter.emitHostEvent(S.events.SELECT,a.index,!0,!0)&&(this._adapter.setSelected(a),this.selectedIndex=a.index)}_renderConfiguration(){let t=b0.createSteps({steps:this._steps,vertical:this._vertical,selectedIndex:this._selectedIndex,alternative:this._alternative,layoutAlign:this._layoutAlign,layoutMode:this._layoutMode,linear:this._linear});this.destroy(),this._adapter.applyConfiguredSteps(t),this.initialize()}_onKeydown(t){var o;if(this._linear)return;let e=this._getKeyFromEvent(t);if(!this._adapter.isStepperFocused()||!e)return;if([S.strings.HOME_KEY,S.strings.END_KEY,S.strings.ARROW_DOWN_KEY,R.strings.ARROW_UP_KEY,R.strings.ENTER_KEY,R.strings.SPACE_KEY].includes(e)&&t.preventDefault(),[R.strings.ENTER_KEY,R.strings.SPACE_KEY].includes(e)){(o=this._adapter.getFocusedOrSelectedStep())==null||o.click();return}let a=this._vertical?this._determineVerticalMoveTarget(e):this._determineMoveTarget(e);a&&this._moveFocusTo(a)}_moveFocusTo(t){t.focus()}_getKeyFromEvent(t){return R.ACCEPTABLE_KEYS.includes(t.key)?t.key:R.KEYCODE_MAP[t.keyCode]}_determineMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case R.strings.ARROW_RIGHT_KEY:return this._adapter.getStep(e.index+1);case R.strings.ARROW_LEFT_KEY:return this._adapter.getStep(e.index-1);case R.strings.HOME_KEY:return this._adapter.getStep(0);case R.strings.END_KEY:return this._adapter.getLastStep()}return e}_determineVerticalMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case R.strings.ARROW_DOWN_KEY:return this._adapter.getStep(e.index+1);case R.strings.ARROW_UP_KEY:return this._adapter.getStep(e.index-1);case R.strings.HOME_KEY:return this._adapter.getStep(0);case R.strings.END_KEY:return this._adapter.getLastStep()}return e}_onSlotChange(t){this.destroy(),this.initialize()}_onStepExpandedContentFocusIn(t){let e=this._adapter.getStep(t.detail.index+1);e&&(e.tabIndex=0),t.detail.tabIndex=0}_onStepExpandedContentFocusOut(t){let e=t.target,a=this._adapter.getStep(e.index+1);a&&(a.tabIndex=-1),e.tabIndex=-1}_onStepFocus(){this._adapter.toggleRootClass(R.classes.FOCUSED,!0)}_onStepBlur(){this._adapter.toggleRootClass(R.classes.FOCUSED,!1)}_patchBrowser(){new $2().SAFARI()&&this._adapter.patchSafari()}};var Rx='<template><div class="forge-stepper" part="root"><slot></slot></div></template>',Fx=":host{display:block}:host([hidden]){display:none}:host([vertical]) .forge-stepper{display:unset;align-items:unset;white-space:unset;overflow:unset}.forge-stepper{display:flex;align-items:center;white-space:nowrap;overflow:hidden}.forge-stepper:not(.vertical) ::slotted(*){display:flex;align-items:center;position:relative;min-width:112px}.forge-stepper.fixed ::slotted(*){flex:1}.forge-stepper.alternative{align-items:flex-start}.forge-stepper.alternative ::slotted(*){min-width:160px}.forge-stepper.align-left{justify-content:flex-start}.forge-stepper.align-center{justify-content:center}.forge-stepper.align-right{justify-content:flex-end}",St=class extends M{static get observedAttributes(){return[R.attributes.SELECTED_INDEX,R.attributes.LINEAR,R.attributes.ALTERNATIVE,R.attributes.LAYOUT_MODE,R.attributes.LAYOUT_ALIGN,R.attributes.DISABLED,R.attributes.VERTICAL]}constructor(){super(),H(this,Rx,Fx),this._core=new fl(new _l(this))}async connectedCallback(){await Fa(this),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case R.attributes.SELECTED_INDEX:this.selectedIndex=Number(a)||0;break;case R.attributes.LINEAR:this.linear=p(a);break;case R.attributes.ALTERNATIVE:this.alternative=p(a);break;case R.attributes.LAYOUT_MODE:this.layoutMode=a;break;case R.attributes.LAYOUT_ALIGN:this.layoutAlign=a;break;case R.attributes.DISABLED:this.disabled=p(a);break;case R.attributes.VERTICAL:this.vertical=p(a);break}}};s([v()],St.prototype,"steps",2),s([v()],St.prototype,"selectedIndex",2),s([v()],St.prototype,"linear",2),s([v()],St.prototype,"alternative",2),s([v()],St.prototype,"layoutMode",2),s([v()],St.prototype,"layoutAlign",2),s([v()],St.prototype,"disabled",2),s([v()],St.prototype,"vertical",2),St=s([y({name:R.elementName,dependencies:[Y2]})],St);function _6(){x(St)}var y0=`${b}table`,f6={TABLE:"forge-table",TABLE_DENSE:"forge-table--dense",TABLE_ROOMY:"forge-table--roomy",TABLE_RESIZABLE:"forge-table--resizable",TABLE_RESIZING:"forge-table--resizing",TABLE_RESIZE_HANDLE:"forge-table__resize-handle",TABLE_NO_WRAP_CONTENT:"forge-table--no-wrap-content",TABLE_LAYOUT_FIXED:"forge-table--layout-fixed",TABLE_FILTER_VISIBLE:"forge-table--filter-visible",TABLE_FIXED:"forge-table--fixed",TABLE_HEAD:"forge-table-head",TABLE_HEAD_ROW:"forge-table-head__row",TABLE_HEAD_ROW_FILTER:"forge-table-head__row__filter",TABLE_HEAD_CELL:"forge-table-head__cell",TABLE_HEAD_CELL_CONTAINER:"forge-table-head__cell-container",TABLE_HEAD_CELL_SORTABLE:"forge-table-head__cell--sortable",TABLE_HEAD_CELL_SORT_ICON:"forge-table-head__cell-sort-icon",TABLE_HEAD_CELL_TEXT:"forge-table-head__cell-text",TABLE_HEAD_CELL_SORT_ICON_ACTIVE:"forge-table-head__cell-sort-icon--active",TABLE_HEAD_CELL_SORTED_ASCENDING:"forge-table-head__cell--sorted-ascending",TABLE_HEAD_CELL_SORTED_DESCENDING:"forge-table-head__cell--sorted-descending",TABLE_HEAD_CELL_SORT_ORDER:"forge-table-head__cell__sort-order",TABLE_HEAD_CELL_SORT_ORDER_HIDDEN:"forge-table-head__cell__sort-order--hidden",TABLE_BODY:"forge-table-body",TABLE_BODY_ROW:"forge-table-body__row",TABLE_BODY_ROW_SELECTED:"forge-table-body__row--selected",TABLE_BODY_ROW_CLICKABLE:"forge-table-body__row--clickable",TABLE_BODY_CELL:"forge-table-body__cell",TABLE_ROW:"forge-table-row",TABLE_ROW_EXPANDED:"forge-table-row--expanded",TABLE_ROW_EXPANDABLE_CONTENT:"forge-table-row__expandable-content",TABLE_ROW_EXPANDABLE_CONTENT_CELL:"forge-table-row__expandable-content-cell",TABLE_CELL:"forge-table-cell",TABLE_CELL_SELECT:"forge-table-cell__select",TABLE_CELL_SELECT_CHECKBOX:"forge-table-cell__select-checkbox",TABLE_CELL_SELECT_CHECKBOX_CONTAINER:"forge-table-cell__select-checkbox-container",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT:"forge-table-cell__select-checkbox-container--align-right",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT:"forge-table-cell__select-checkbox-container--align-left",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER:"forge-table-cell__select-checkbox-container--align-center",TABLE_CELL_CONTAINER:"forge-table-cell__container",TABLE_CELL_CONTAINER_TEXT:"forge-table-cell__container-text",TABLE_CELL_CENTER:"forge-table-cell--center",TABLE_CELL_RIGHT:"forge-table-cell--right",TABLE_CELL_RESIZABLE:"forge-table-cell--resizing"},Ux={TABLE:".forge-table",CHECKBOX_INPUT:":is(forge-checkbox,input[type=checkbox]):not([forge-ignore])",SELECT_ALL_TEMPLATE_CHECKBOX_INPUT:":is(forge-checkbox,input[type=checkbox]):not([forge-ignore])",ROW_SELECTED:`.${f6.TABLE_BODY_ROW_SELECTED}`},Wx={SELECT:"select",MULTISELECT:"multiselect",SELECT_KEY:"select-key",DENSE:"dense",ROOMY:"roomy",FILTER:"filter",FIXED_HEADERS:"fixed-headers",LAYOUT_TYPE:"layout-type",WRAP_CONTENT:"wrap-content",RESIZABLE:"resizable",MIN_RESIZE_WIDTH:"min-resize-width",ALLOW_ROW_CLICK:"allow-row-click",MULTI_COLUMN_SORT:"multi-column-sort",SELECT_CHECKBOX_ALIGNMENT:"select-checkbox-alignment",TOOLTIP_SELECT:"tooltip-select",TOOLTIP_SELECT_ALL:"tooltip-select-all",CHECKBOX_TYPE:"forge-checkbox-type",CUSTOM_CELL_TEMPLATE:"data-cell-template",CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION:"data-cell-template-stop-propagation",SELECT_CHECKBOX:"forge-table-row-select-checkbox"},Gx={ROW_CLICK:`${y0}-row-click`,SELECT:`${y0}-select`,SELECT_DOUBLE:`${y0}-select-double`,SELECT_ALL:`${y0}-select-all`,SORT:`${y0}-sort`,FILTER:`${y0}-filter`,INITIALIZED:`${y0}-initialized`,COLUMN_RESIZE:`${y0}-column-resize`},Yx={SELECT_ALL:"select-all",SELECT_ROW:"select-row",DEFAULT_LAYOUT_TYPE:"auto"},Kx={SORT_DOWN:"arrow_downward"},qx={DEFAULT_FILTER_DEBOUNCE_TIME:750,MIN_RESIZE_WIDTH:100,RESIZE_HOVER_DURATION:150},f={elementName:y0,classes:f6,selectors:Ux,attributes:Wx,events:Gx,strings:Yx,icons:Kx,numbers:qx};var xl=(a=>(a.Left="left",a.Right="right",a.Center="center",a))(xl||{}),bl=(a=>(a.Ascending="ASC",a.Descending="DESC",a.Unset="UNSET",a))(bl||{}),$x=(i=>(i.InputText="text",i.InputNumber="number",i.Select="select",i.SelectMultiple="select-multiple",i.Date="date",i.DateRange="date-range",i))($x||{});function x6(r){return r&&typeof r=="object"&&"content"in r}var C1=class r{static createTable(t){r._resetTable(t.tableElement);let e=r._createTableHead(t),a=r._createTableBody(t);t.clickListener&&(r._attachRowClickListeners(a,t.clickListener,t.doubleClickListener),r._addRowClickAttributes(a)),t.fixedHeaders&&r.setFixedHeaders(t),t.resizable&&r.setResizable(t),t.dense&&r.setDenseState(t.tableElement,t.dense),t.wrapContent&&r.setWrapContentState(t.tableElement,t.wrapContent),t.selectListener&&r._addSelectColumn(e,a,t.selectListener,t.selectAllListener,t.selectAllTemplate,t.selectCheckboxAlignment,t.data,t.tooltipSelect,t.tooltipSelectAll),(t.resizable||t.columnConfigurations.some(o=>!!o.sortable))&&(r._attachHeadRowMouseDownListener(e,t.headRowMouseDownListener),r._isMac()&&r._attachHeadRowContextMenuListener(e,t.headRowContextMenuListener)),r.setLayoutType(t),r._setTableHead(t.tableElement,e),t.filter&&r.setFilterRow(t),r._setTableBody(t.tableElement,a)}static _setTableHead(t,e){t.tHead?e0(e,t.tHead):t.appendChild(e)}static _setTableBody(t,e){t.tBodies.length?e0(e,t.tBodies[0]):t.appendChild(e)}static recreateTableBody(t){let e=r._createTableBody(t);t.clickListener&&(r._attachRowClickListeners(e,t.clickListener,t.doubleClickListener),r._addRowClickAttributes(e)),t.selectListener&&(r._createBodySelectColumn(e,t.selectCheckboxAlignment,t.data,t.tooltipSelect,t.tooltipSelectAll),r._attachRowSelectListeners(e,t.selectListener)),r._setTableBody(t.tableElement,e)}static _resetTable(t){r2(t)}static _createMultisortTooltip(){let t=document.createElement("forge-tooltip");return t.textContent="Ctrl + click to sort multiple columns",t.placement="bottom",t.delay=0,t}static _createTableHead(t){let e=document.createElement("thead"),a=e.insertRow();y1([f.classes.TABLE_ROW,f.classes.TABLE_HEAD_ROW],a);let o=!1;for(let n=0;n<t.columnConfigurations.length;n++){let i=t.columnConfigurations[n],l=document.createElement("th");l.scope="col",y1([f.classes.TABLE_CELL,f.classes.TABLE_HEAD_CELL],l);let h;if(i.sortable?(h=document.createElement("button"),h.type="button",h.addEventListener("keydown",t.sortableHeadCellKeydownListener)):h=document.createElement("div"),h.classList.add(f.classes.TABLE_HEAD_CELL_CONTAINER),t.multiColumnSort){let c=r._createMultisortTooltip();h.appendChild(c)}if(i.align&&r._setCellAlignmentClass(h,i.align),k(i.width)){let c=Ul(i.width);c&&(l.style.width=c)}if(t.resizable&&i.resizable!==!1){let c=document.createElement("div");c.classList.add(f.classes.TABLE_RESIZE_HANDLE),l.appendChild(c)}if(k(i.headerCellStyle)&&nt(i.headerCellStyle)&&(Object.assign(l.style,i.headerCellStyle),Object.assign(h.style,i.headerCellStyle)),i.sortable){l.classList.add(f.classes.TABLE_HEAD_CELL_SORTABLE);let c=document.createElement("span");y1([f.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,f.classes.TABLE_HEAD_CELL_SORT_ORDER],c);let d=document.createElement(h1.elementName);d.name=f.icons.SORT_DOWN,y1([f.classes.TABLE_HEAD_CELL_SORT_ICON],d),t.multiColumnSort?typeof i.initialSort=="object"&&i.initialSort.sortOrder&&(c.textContent=i.initialSort.sortOrder.toString(),t.columnConfigurations.filter(u=>typeof u.initialSort=="object").length>1&&we(f.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,c),l.classList.add(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),d.classList.add(f.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),r._setColumnSortDirection(l,i.initialSort.direction)):t.sortedColumn===n&&!o&&!t.multiColumnSort&&(l.classList.add(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),d.classList.add(f.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),r._setColumnSortDirection(l,t.sortDirection),o=!0),h.appendChild(d),h.appendChild(c)}if(typeof i.headerTemplate=="function")Promise.resolve(i.headerTemplate(n,h,i)).then(c=>{if(c){let d=document.createElement("div");y1(f.classes.TABLE_CELL_CONTAINER,d),typeof c=="string"?d.innerHTML=c:r._prepend(c,d),d.setAttribute(f.attributes.CUSTOM_CELL_TEMPLATE,""),r._prepend(d,h)}});else{let c=document.createElement("span");c.classList.add(f.classes.TABLE_HEAD_CELL_TEXT),c.textContent=i.header&&typeof i.header=="string"?i.header.trim():"",c.textContent.trim().length===0&&l.setAttribute("aria-hidden","true"),r._prepend(c,h)}l.appendChild(h),a.appendChild(l)}return e}static setSortDirection(t,e,a){let o=r._getHeaderCellByIndex(t,e);t.querySelectorAll("th[aria-sort]").forEach(n=>n.removeAttribute("aria-sort")),r._setColumnSortDirection(o,a)}static _setColumnSortDirection(t,e){t.classList.contains(f.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&t.classList.remove(f.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),t.classList.contains(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&t.classList.remove(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),!e||e==="DESC"?(t.setAttribute("aria-sort","descending"),t.classList.add(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)):(t.setAttribute("aria-sort","ascending"),t.classList.add(f.classes.TABLE_HEAD_CELL_SORTED_ASCENDING))}static _createTableBody(t){let e=document.createElement("tbody");return r._getOrderedRowData(t.columnConfigurations,t.data).forEach((o,n)=>{let i=e.insertRow();y1([f.classes.TABLE_ROW,f.classes.TABLE_BODY_ROW],i),r._populateRowCells(t,i,o,n),typeof t.rowCreatedCallback=="function"&&t.rowCreatedCallback(i,n,w({},t.data[n].data))}),e}static _populateRowCells(t,e,a,o){for(let n=0;n<a.length;n++){let i=t.columnConfigurations[n],l=e.insertCell();if(y1([f.classes.TABLE_CELL,f.classes.TABLE_BODY_CELL],l),k(i.width)){let c=Ul(i.width);c&&(l.style.width=c)}let h=document.createElement("div");if(h.classList.add(f.classes.TABLE_CELL_CONTAINER),k(i.cellStyle)&&nt(i.cellStyle)&&(Object.assign(l.style,i.cellStyle),Object.assign(h.style,i.cellStyle)),i.template&&typeof i.template=="function"){let c=t.data[o]?t.data[o].data:void 0;Promise.resolve(i.template(o,h,c,n)).then(d=>{let u=x6(d)?d:{content:d,stopClickPropagation:i.stopCellTemplateClickPropagation};u.content&&(typeof u.content=="string"?h.innerHTML=u.content:h.appendChild(u.content),h.setAttribute(f.attributes.CUSTOM_CELL_TEMPLATE,""),u.stopClickPropagation&&h.setAttribute(f.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION,""))})}else if(i.property){let c=document.createElement("span");c.classList.add(f.classes.TABLE_CELL_CONTAINER_TEXT),h.appendChild(c),i.transform&&typeof i.transform=="function"?Promise.resolve(i.transform(a[n])).then(d=>c.textContent=d):a[n]==null?c.textContent="":c.textContent=a[n].toString()}if(i.align&&r._setCellAlignmentClass(h,i.align),l.appendChild(h),k(i.columnSpan)){if(i.columnSpan==="all"){l.colSpan=a.length-n;break}else if(typeof i.columnSpan=="number"&&i.columnSpan>0){let c=i.columnSpan;i.columnSpan>a.length-n&&(c=a.length),l.colSpan=c,n=n+(c-1)}}typeof t.cellCreatedCallback=="function"&&t.cellCreatedCallback(l,o,n)}}static _setCellAlignmentClass(t,e){switch(e){case"center":t.classList.add(f.classes.TABLE_CELL_CENTER);break;case"right":t.classList.add(f.classes.TABLE_CELL_RIGHT);break}}static _getNonExpandedRows(t){return Array.from(t).filter(e=>!e.classList.contains(f.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _getExpandedRows(t){return Array.from(t).filter(e=>e.classList.contains(f.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _createColumnDataMap(t,e){return t.map(a=>({config:a,data:e.map(o=>{if(a.property){let n=y5(o.data,a.property);return k(n)?n:null}return null})}))}static _getOrderedRowData(t,e){let a=r._createColumnDataMap(t,e),o=[];for(let n of a)for(let i=0;i<n.data.length;i++)o[i]||(o[i]=[]),o[i].push(n.data[i]);return o}static _attachRowClickListeners(t,e,a){r._getNonExpandedRows(t.rows).forEach(n=>{n.addEventListener("click",e),a&&n.addEventListener("dblclick",a)})}static _addRowClickAttributes(t){r._getNonExpandedRows(t.rows).forEach(a=>{a.classList.add(f.classes.TABLE_BODY_ROW_CLICKABLE)})}static _removeRowClickAttributes(t){r._getNonExpandedRows(t.rows).forEach(a=>{a.classList.remove(f.classes.TABLE_BODY_ROW_CLICKABLE)})}static _attachRowSelectListeners(t,e){r._getNonExpandedRows(t.rows).forEach(o=>r._attachRowSelectListener(o,e))}static _attachRowSelectListener(t,e){let a=r._getCheckboxElement(t);a==null||a.addEventListener("click",e)}static _detachRowSelectListeners(t,e){Array.from(t.rows).forEach(a=>{let o=r._getCheckboxElement(a);o==null||o.removeEventListener("click",e)})}static _detachRowClickListeners(t,e,a){Array.from(t.rows).forEach(o=>{o.removeEventListener("click",e),o.removeEventListener("dblclick",a)})}static _attachSelectAllListener(t,e){let a=t.rows[t.rows.length-1],o=r._getCheckboxElement(a);if(!o)throw new Error("Checkbox element not found.");o.addEventListener("change",e)}static _tryAttachSelectAllTemplateListener(t,e){let a=t.rows[t.rows.length-1],o=r._tryGetSelectAllCheckboxElement(a);o&&o.addEventListener("change",e)}static _detachSelectAllListener(t,e){let a=t.rows[t.rows.length-1],o=r._tryGetSelectAllCheckboxElement(a);o&&o.removeEventListener("change",e)}static _attachHeadRowMouseDownListener(t,e){let a=t.rows[0];if(!a)throw new Error("Missing table header row. Unable to attach sort listener.");a.addEventListener("mousedown",e)}static _attachHeadRowContextMenuListener(t,e){let a=t.rows[0];if(!a)throw new Error("Missing table header row. Unable to attach sort listener.");a.addEventListener("contextmenu",e)}static _createSelectColumn(t,e,a,o,n,i,l,h,c){t&&r._createHeadSelectColumn(t,a,o,n,i,c),e&&r._createBodySelectColumn(e,i,l,h,c)}static _createHeadSelectColumn(t,e,a,o,n,i){var l;if(Array.from(t.rows).forEach(h=>{let c=document.createElement("th");y1([f.classes.TABLE_CELL,f.classes.TABLE_HEAD_CELL],c),h.insertBefore(c,h.cells.item(0))}),e){let h=(l=t.rows.item(t.rows.length-1))==null?void 0:l.cells.item(0);h.classList.add(f.classes.TABLE_CELL_SELECT),typeof a=="function"?r._renderSelectAllTemplate(a,t).then(()=>{typeof o=="function"&&o()}):h==null||h.appendChild(r._createCheckboxElement(!0,n,null,null,null,i))}}static _createBodySelectColumn(t,e,a,o,n){if(r._getNonExpandedRows(t.rows).forEach((l,h)=>r._addRowSelectColumn(l,e,h,a[h],o,n)),t.rows.length){let l=t.rows.item(0);l&&r._updateExpandedRowColspan(t.rows,l.cells.length)}}static _addRowSelectColumn(t,e,a,o,n,i){let l=t.insertCell(0);y1([f.classes.TABLE_CELL,f.classes.TABLE_BODY_CELL,f.classes.TABLE_CELL_SELECT],l),l.appendChild(r._createCheckboxElement(!1,e,a,o,n,i))}static _destroySelectColumn(t,e){let a=r._getNonExpandedRows(e.rows);if(Array.from(t.rows).forEach(o=>o.removeChild(o.cells.item(0))),Array.from(a).forEach(o=>o.removeChild(o.cells.item(0))),e.rows.length){let o=e.rows.item(0);o&&r._updateExpandedRowColspan(e.rows,o.cells.length)}}static _hasSelectColumn(t,e){return[...Array.from(t.rows),...Array.from(e.rows)].some(o=>o.cells.item(0).classList.contains(f.classes.TABLE_CELL_SELECT))}static _createCheckboxElement(t,e,a,o,n,i){let l=document.createElement("div");if(l.classList.add(f.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER),e)switch(e){case"center":l.classList.add(f.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER);break;case"left":l.classList.add(f.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT);break;case"right":l.classList.add(f.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT);break}let h=document.createElement(z1.elementName);h.setAttribute(f.attributes.SELECT_CHECKBOX,""),l.appendChild(h);let c=d=>{let u=document.createElement("forge-tooltip");return u.placement="left",u.type="label",u.textContent=d,u};if(t)if(typeof i=="string"&&i.length){let u=c(i);l.appendChild(u)}else h.setAttribute("aria-label","Select all rows");else{let d=n||"";if(o&&typeof n=="function"&&(d=n.call(null,a,o.data)),typeof d=="string"&&d.length){let u=c(d);l.appendChild(u)}else h.setAttribute("aria-label","Select row")}return l}static _getCheckboxElement(t){let e=t.querySelector(`.${f.classes.TABLE_CELL_SELECT}`);return e?e.querySelector(f.selectors.CHECKBOX_INPUT):null}static _tryGetSelectAllCheckboxElement(t){let e=t.querySelector(`.${f.classes.TABLE_CELL_SELECT}`);return e?e.querySelector(f.selectors.CHECKBOX_INPUT)||e.querySelector(f.selectors.SELECT_ALL_TEMPLATE_CHECKBOX_INPUT):null}static _setSelectedCheckboxState(t,e){t&&(t.checked=e)}static _setIndeterminateCheckboxState(t,e){t&&(t.indeterminate=e)}static _setRowSelectedState(t,e){e?t.classList.contains(f.classes.TABLE_BODY_ROW_SELECTED)||t.classList.add(f.classes.TABLE_BODY_ROW_SELECTED):t.classList.remove(f.classes.TABLE_BODY_ROW_SELECTED)}static _updateExpandedRowColspan(t,e){r._getExpandedRows(t).forEach(o=>{let n=o.cells.item(0);n&&(n.colSpan=e)})}static updateSelectedState(t,e){r._setRowSelectedState(t,e);let a=r._getCheckboxElement(t);a&&r._setSelectedCheckboxState(a,e)}static getRowByIndex(t,e){return r._getNonExpandedRows(t.tBodies[0].rows)[e]}static updateSelectAllState(t,e,a){if(!t.tHead)return;let o=t.tHead.rows[t.tHead.rows.length-1],n=r._tryGetSelectAllCheckboxElement(o);n&&(r._setSelectedCheckboxState(n,e),r._setIndeterminateCheckboxState(n,!!a))}static setSelectedRows(t,e,a,o,n=!1){if(!t.tBodies.length)return;n||r.clearSelectedRows(t);let i=t.tBodies[0].rows,l=0;o.length&&Array.from(i).forEach((h,c)=>{let d=a[c];if(Pr(o,ha(e,d))){r._setRowSelectedState(h,!0);let _=r._getCheckboxElement(h);_&&r._setSelectedCheckboxState(_,!0),l++}}),r.updateSelectAllState(t,l>0&&i.length===l)}static clearSelectedRows(t){if(!t.tBodies.length)return;r._getNonExpandedRows(t.tBodies[0].rows).forEach(a=>{r._setRowSelectedState(a,!1);let o=r._getCheckboxElement(a);o&&r._setSelectedCheckboxState(o,!1)})}static setSortedColumn(t,e,a){let o=r._getHeaderCellByIndex(t,e);r._getSortIconElementFromHeaderCell(o).classList.add(f.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),r._setColumnSortDirection(o,a)}static setMultiSortColumnSortNumber(t,e,a,o){let l=r._getHeaderCellByIndex(t,a).querySelector(`.${f.classes.TABLE_HEAD_CELL_CONTAINER}`).querySelector(`.${f.classes.TABLE_HEAD_CELL_SORT_ORDER}`);l&&(_2(l,typeof o!="number"||!e,f.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN),o&&(l.textContent=o.toString()))}static removeColumnSort(t,e){let a=r._getHeaderCellByIndex(t,e);a.removeAttribute("aria-sort"),a.classList.contains(f.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&a.classList.remove(f.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),a.classList.contains(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&a.classList.remove(f.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);let o=r._getSortIconElementFromHeaderCell(a);o&&o.classList.contains(f.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)&&o.classList.remove(f.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)}static _getHeaderCellByIndex(t,e){if(!t.tHead)throw new Error("Table head element cannot be null.");return t.tHead.rows.item(0).cells.item(e)}static _getSortIconElementFromHeaderCell(t){return t.querySelector(`.${f.classes.TABLE_HEAD_CELL_SORT_ICON}`)}static setSelectColumnVisibility(t,e,a,o,n,i,l,h,c){let d=t.tHead,u=t.tBodies[0];!d||!u||(e?r._addSelectColumn(d,u,a,o,n,i,l,h,c):r._hasSelectColumn(d,u)&&(a&&r._detachRowSelectListeners(u,a),o&&r._detachSelectAllListener(d,o),r._destroySelectColumn(d,u)))}static _addSelectColumn(t,e,a,o,n,i,l,h,c){r._createSelectColumn(t,e,!!o,n,()=>{o&&r._tryAttachSelectAllTemplateListener(t,o)},i,l,h,c),a&&r._attachRowSelectListeners(e,a),o&&!n&&r._tryAttachSelectAllTemplateListener(t,o)}static setDenseState(t,e){t.classList.contains(f.classes.TABLE_DENSE)&&t.classList.remove(f.classes.TABLE_DENSE),e&&t.classList.add(f.classes.TABLE_DENSE)}static setRoomyState(t,e){t.classList.contains(f.classes.TABLE_ROOMY)&&t.classList.remove(f.classes.TABLE_ROOMY),e&&t.classList.add(f.classes.TABLE_ROOMY)}static setResizable(t){let e=t.tableElement.tHead;t.resizable?(t.tableElement.classList.add(f.classes.TABLE_RESIZABLE),r._addResizeHandles(e,t)):(t.tableElement.classList.remove(f.classes.TABLE_RESIZABLE),r._removeResizeHandles(e,t))}static _addResizeHandles(t,e){if(!t)return;let a=t.rows.item(0);if(a){let o=Array.from(a.cells);e.selectListener&&(o=o.slice(1));for(let n of o){let i=o.indexOf(n);if(e.columnConfigurations[i].resizable!==!1){let h=document.createElement("div");h.classList.add(f.classes.TABLE_RESIZE_HANDLE),n.appendChild(h)}}}}static _removeResizeHandles(t,e){if(!t)return;let a=t.rows.item(0);if(a){let o=Array.from(a.cells);e.selectListener&&(o=o.slice(1));for(let n of o){let i=document.querySelector(`.${f.classes.TABLE_RESIZE_HANDLE}`);i&&n.removeChild(i)}}}static setWrapContentState(t,e){e?t.classList.remove(f.classes.TABLE_NO_WRAP_CONTENT):t.classList.add(f.classes.TABLE_NO_WRAP_CONTENT)}static setSelectAllVisibility(t,e,a,o,n,i){let l=t.tHead;if(!l)return;!e&&a&&r._detachSelectAllListener(l,a);let c=l.rows[l.rows.length-1].cells.item(0);e?c.childElementCount||(c.classList.add(f.classes.TABLE_CELL_SELECT),o?r._renderSelectAllTemplate(o,l).then(()=>{a&&r._tryAttachSelectAllTemplateListener(l,a)}):c.appendChild(r._createCheckboxElement(!0,n||null,null,null,null,i)),a&&!o&&r._attachSelectAllListener(l,a)):(a&&r._detachSelectAllListener(l,a),r2(c))}static setFilterRow(t){if(!t.tableElement.tHead)return;let e=r._getFilterRowElement(t.tableElement.tHead),a;if(t.filter?t.tableElement.classList.add(f.classes.TABLE_FILTER_VISIBLE):t.tableElement.classList.remove(f.classes.TABLE_FILTER_VISIBLE),t.filter&&!e){if(t.columnConfigurations.every(n=>!n.filter))return;t.selectListener&&t.selectAllListener&&(a=t.tableElement.tHead.rows[t.tableElement.tHead.rows.length-1].cells.item(0));let o=r._createFilterRowElement(t);o&&a&&Array.from(a.children).forEach(n=>{var i;(i=o.cells.item(0))==null||i.appendChild(n)})}else if(!t.filter&&e){if(t.selectListener&&t.selectAllListener){a=e.cells.item(0);let o=Array.from(t.tableElement.tHead.rows).indexOf(e)-1,n=t.tableElement.tHead.rows.item(o);n&&Array.from(a.children).forEach(i=>{var l;(l=n.cells.item(0))==null||l.appendChild(i)})}Te(e)}}static _createFilterRowElement(t){if(!t.tableElement.tHead)throw new Error("Table head element cannot be null.");let e=t.tableElement.tHead.insertRow();if(y1([f.classes.TABLE_ROW,f.classes.TABLE_HEAD_ROW_FILTER],e),t.selectListener){let a=document.createElement("th");y1([f.classes.TABLE_CELL,f.classes.TABLE_HEAD_CELL],a),e.insertBefore(a,e.cells[0]),a.classList.add(f.classes.TABLE_CELL_SELECT)}return t.columnConfigurations.forEach((a,o)=>{let n=document.createElement("th");if(y1([f.classes.TABLE_CELL,f.classes.TABLE_HEAD_CELL],n),a.filter&&k(a.filterDelegate)){let i=document.createElement("div");i.classList.add(f.classes.TABLE_HEAD_CELL_CONTAINER),a.align&&r._setCellAlignmentClass(i,a.align);let l=r._createFilterElement(a,o,t.filterListener);i.appendChild(l),n.appendChild(i)}e.appendChild(n)}),e}static _createFilterElement(t,e,a){let o;if(t0(t.filterDelegate))o=t.filterDelegate();else if(t.filterDelegate instanceof a2||t.filterDelegate instanceof X1)o=t.filterDelegate;else throw new Error("Invalid filter delegate.");if(a&&o instanceof a2&&t0(o.onChange))if(!k(t.filterDebounceTime)||z2(t.filterDebounceTime)){let n=k(t.filterDebounceTime)?t.filterDebounceTime:f.numbers.DEFAULT_FILTER_DEBOUNCE_TIME;o.onChange(Ae(i=>a(i,e),n))}else o.onChange(n=>a(n,e));return o.element}static _getFilterRowElement(t){if(t)return Array.from(t.rows).find(e=>e.classList.contains(f.classes.TABLE_HEAD_ROW_FILTER))}static async expandRow(t,e,a){let o=t.tableElement.tBodies[0],i=r._getNonExpandedRows(o.rows)[e];i.classList.add(f.classes.TABLE_ROW_EXPANDED);let l=Array.from(o.rows).indexOf(i),h=o.insertRow(l+1);y1([f.classes.TABLE_ROW,f.classes.TABLE_BODY_ROW,f.classes.TABLE_ROW_EXPANDABLE_CONTENT],h);let c=h.insertCell();c.setAttribute("colspan",i.cells.length.toString()),c.classList.add(f.classes.TABLE_ROW_EXPANDABLE_CONTENT_CELL);let d=document.createElement("div"),u=document.createElement(D1.elementName);u.appendChild(d),c.appendChild(u);let _=a;if(t0(a)){let L=t.data[e]?t.data[e].data:void 0,C=a(e,d,L);try{let A=await Promise.resolve(C);_=x6(A)?A.content:A}catch(A){console.error("Failed to load row template "+A.message),_=""}}_&&r._setRowTemplate(d,_),window.requestAnimationFrame(()=>u.open=!0)}static _setRowTemplate(t,e){Pt(e)?t.innerHTML=e:t.appendChild(e)}static collapseRow(t,e){if(!t.tableElement||!t.tableElement.tBodies.length||!t.tableElement.tBodies[0].rows.length)return Promise.resolve();let a=t.tableElement.tBodies[0],n=r._getNonExpandedRows(a.rows)[e],i=Array.from(a.rows).indexOf(n);if(n&&n.classList.contains(f.classes.TABLE_ROW_EXPANDED)){let l=a.rows[i+1],h=l.querySelector(D1.elementName);if(h&&h.open){let c=new Promise(d=>{h.addEventListener(D1.events.ANIMATION_COMPLETE,()=>{n.classList.remove(f.classes.TABLE_ROW_EXPANDED),Te(l),d()},{once:!0})});return h.open=!1,c}}return Promise.resolve()}static isRowExpanded(t,e){let a=t.tableElement.tBodies[0],n=r._getNonExpandedRows(a.rows)[e];return n&&n.classList.contains(f.classes.TABLE_ROW_EXPANDED)}static setFixedHeaders(t){t.fixedHeaders?t.tableElement.classList.add(f.classes.TABLE_FIXED):t.tableElement.classList.remove(f.classes.TABLE_FIXED)}static setLayoutType(t){t.layoutType==="fixed"?t.tableElement.classList.add(f.classes.TABLE_LAYOUT_FIXED):t.tableElement.classList.remove(f.classes.TABLE_LAYOUT_FIXED)}static normalizeColumnWidths(t){let e=t.tableElement;if(e.tHead&&e.tHead.rows.length){let a=Array.from(e.tHead.rows[0].cells);for(let o of a){let n=getComputedStyle(o).width;o.style.width&&o.style.width!==n&&(o.style.width=n)}}}static setColumnResizeIndicatorVisibility(t,e,a){let o=t.tableElement;if(o.tHead&&o.tHead.rows.length){let n=Array.from(o.tHead.rows);for(let i of n){let l=i.cells[e];l&&(a?l.classList.add(f.classes.TABLE_CELL_RESIZABLE):l.classList.remove(f.classes.TABLE_CELL_RESIZABLE))}}if(o.tBodies.length){let n=Array.from(o.tBodies[0].rows);for(let i of n){let l=i.cells[e];l&&(a?l.classList.add(f.classes.TABLE_CELL_RESIZABLE):l.classList.remove(f.classes.TABLE_CELL_RESIZABLE))}}}static setRowClickListeners(t,e,a,o){let n=t.tBodies[0];n&&(e?r._attachRowClickListeners(n,a,o):r._detachRowClickListeners(n,a,o))}static setRowClickAttributes(t,e){let a=t.tBodies[0];a&&(e?r._addRowClickAttributes(a):r._removeRowClickAttributes(a))}static getOwnerDocument(t){return t.ownerDocument||document}static _prepend(t,e){let a=e.childNodes.item(0);a?e.insertBefore(t,a):e.appendChild(t)}static _isMac(){return!!(navigator&&navigator.platform&&navigator.platform.substr(0,3)==="Mac")}static _renderSelectAllTemplate(t,e){return Promise.resolve(t()).then(a=>{let o=e.rows.item(e.rows.length-1);if(!o)return;let n=o.cells.item(0);a&&n&&(typeof a=="string"?n.innerHTML=a:a instanceof HTMLElement&&n.appendChild(a),n.setAttribute(f.attributes.CUSTOM_CELL_TEMPLATE,""))})}};var yl=class extends I{constructor(t){super(t)}initialize(){this._tableElement||(this._tableElement=document.createElement("table"),this._tableElement.classList.add(f.classes.TABLE),this._component.children.length&&r2(this._component),this._component.appendChild(this._tableElement))}getTableElement(){return this._tableElement||this.initialize(),this._tableElement}createTable(t){return C1.createTable(t)}recreateTableBody(t){C1.recreateTableBody(t)}setSelectedRows(t,e,a,o,n=!1){C1.setSelectedRows(t,e,a,o,n)}clearSelectedRows(t){C1.clearSelectedRows(t)}updateSelectedState(t,e){C1.updateSelectedState(t,e)}updateSelectAllState(t,e,a){C1.updateSelectAllState(t,e,a)}setSortedColumn(t,e,a){C1.setSortedColumn(t,e,a)}removeColumnSort(t,e){C1.removeColumnSort(t,e)}setSortDirection(t,e,a){C1.setSortDirection(t,e,a)}setSelectColumnVisibility(t,e,a,o,n,i,l,h,c){C1.setSelectColumnVisibility(t,e,a,o||null,n||null,i||null,l||[],h||null,c||null)}setDense(t,e){C1.setDenseState(t,e)}setRoomy(t,e){C1.setRoomyState(t,e)}setResizable(t){C1.setResizable(t)}setSelectAllVisibility(t,e,a,o,n,i=null){C1.setSelectAllVisibility(t,e,a,o,n||null,i||null)}setFilterRow(t){C1.setFilterRow(t)}expandRow(t,e,a){return C1.expandRow(t,e,a)}collapseRow(t,e){return C1.collapseRow(t,e)}isRowExpanded(t,e){return C1.isRowExpanded(t,e)}setFixedHeaders(t){C1.setFixedHeaders(t)}setTableLayoutType(t){C1.setLayoutType(t)}setWrapContentState(t){C1.setWrapContentState(t.tableElement,t.wrapContent)}addDocumentListener(t,e){C1.getOwnerDocument(this._component).addEventListener(t,e)}removeDocumentListener(t,e){C1.getOwnerDocument(this._component).removeEventListener(t,e)}normalizeColumnWidths(t){C1.normalizeColumnWidths(t)}setResizeColumnVisibility(t,e,a){C1.setColumnResizeIndicatorVisibility(t,e,a)}addTableClass(t){y1(t,this._tableElement)}removeTableClass(t){we(t,this._tableElement)}setRowClickListeners(t,e,a,o){C1.setRowClickListeners(t,e,a,o)}setRowClickAttributes(t,e){C1.setRowClickAttributes(t,e)}};var Ml=class{constructor(){this._sortedColumns=[]}get sortedColumns(){return[...this._sortedColumns.map(t=>w({},t))]}addSortColumn(t){this._sortedColumns.push(w({},t)),this._updateSortNumbers()}updateSortColumn(t){let e=this._sortedColumns.find(a=>a.columnIndex===t.columnIndex);if(e)switch(e.direction){case"ASC":this.removeSortColumn(t);break;case"DESC":e.direction="ASC";break;case"UNSET":e.direction="DESC";break}}setSortColumns(t){this._sortedColumns=[...t.map(e=>w({},e))]}removeSortColumn(t){typeof t=="number"?this._sortedColumns.splice(t,1):this._sortedColumns.splice(this._sortedColumns.indexOf(t),1),this._updateSortNumbers()}isSortColumn(t){return typeof t=="number"?this._sortedColumns.some(e=>e.columnIndex===t):this._sortedColumns.includes(t)}clearMultiSort(){this._sortedColumns=[]}getSortColumn(t){return this._sortedColumns.find(e=>e.columnIndex===t)}_updateSortNumbers(){this._sortedColumns.every(t=>typeof t.sortOrder=="number")&&this._sortedColumns.sort((t,e)=>t.sortOrder-e.sortOrder),this._sortedColumns.forEach((t,e)=>t.sortOrder=e+1)}};var Hl=class{constructor(t,e=!1){this.data=t;this.selected=e}};var Ll=class{constructor(t){this._adapter=t;this._tableRows=[];this._data=[];this._columnConfigurations=[];this._select=!1;this._multiselect=!0;this._dense=!1;this._roomy=!1;this._filter=!1;this._fixedHeaders=!1;this._layoutType=f.strings.DEFAULT_LAYOUT_TYPE;this._wrapContent=!0;this._resizable=!1;this._minResizeWidth=f.numbers.MIN_RESIZE_WIDTH;this._multiColumnSort=!1;this._selectCheckboxAlignment="center";this._isAllSelected=!1;this._sortedColumnIndex=-1;this._rendered=!1;this._allowRowClick=!1;this._multiSortManager=new Ml;this._rowClickListener=e=>this._onRowClick(e),this._rowDoubleClickListener=e=>this._onRowDoubleClick(e),this._selectRowListener=e=>this._onRowSelected(e),this._selectAllListener=e=>this._onSelectAll(e),this._sortableHeadCellKeydownListener=e=>this._onSortableHeadCellKeydown(e),this._headRowMouseDownListener=e=>this._onHeadRowMouseDown(e),this._headRowContextMenuListener=e=>this._onHeadRowContextMenu(e),this._documentMouseMoveListener=e=>this._onMouseMove(e),this._documentMouseUpListener=e=>this._onMouseUp(e),this._filterListener=(e,a)=>this._onFilter(e,a),this._selectionManager=new Ro(this._selectKey),this._hiddenColumnManager=new Ro}initialize(){this._adapter.initialize(),this._adapter.setHostAttribute(f.attributes.SELECT,this._select.toString()),this._adapter.setHostAttribute(f.attributes.MULTISELECT,this._multiselect.toString()),this._adapter.setHostAttribute(f.attributes.DENSE,this._dense.toString()),this._adapter.setHostAttribute(f.attributes.ROOMY,this._roomy.toString()),this._adapter.setHostAttribute(f.attributes.FILTER,this._filter.toString()),this._adapter.emitHostEvent(f.events.INITIALIZED,void 0,!1)}destroy(){this._resizeDescriptor=void 0,this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener)}set data(t){Array.isArray(t)&&t.length>0?nt(t[0])?this._data=t.map(e=>w({},e)):this._data=[...t]:this._data=[],this._tableRows=this._data.map(e=>new Hl(e,this._selectionManager.exists(e))),this._renderBody()}get data(){return this._data.map(t=>w({},t))}set columnConfigurations(t){this._columnConfigurations=t.map(e=>w({},e)),this._hiddenColumnManager.clear(),this._columnConfigurations.forEach(e=>{e.hidden&&this._hiddenColumnManager.add(e)}),this._refreshTableSort(),this.render()}get columnConfigurations(){return this._columnConfigurations.map(t=>w({},t))}get _visibleColumnConfigurations(){return this._columnConfigurations.filter(t=>!this._hiddenColumnManager.exists(t))}get _tableConfiguration(){return{tableElement:this._adapter.getTableElement(),columnConfigurations:this._visibleColumnConfigurations,data:this._tableRows,clickListener:this._allowRowClick?this._rowClickListener:null,doubleClickListener:this._allowRowClick?this._rowDoubleClickListener:null,selectListener:this._select?this._selectRowListener:null,selectAllListener:this._multiselect?this._selectAllListener:null,sortableHeadCellKeydownListener:this._sortableHeadCellKeydownListener,headRowMouseDownListener:this._headRowMouseDownListener,headRowContextMenuListener:this._headRowContextMenuListener,filterListener:this._filter?this._filterListener:null,sortDirection:this._sortDirection,sortedColumn:this._sortedColumnIndex,multiColumnSort:this._multiColumnSort,filter:this._filter,wrapContent:this._wrapContent,fixedHeaders:this._fixedHeaders,layoutType:this._layoutType,dense:this._dense,resizable:this._resizable,rowCreatedCallback:this._rowCreatedCallback,cellCreatedCallback:this._cellCreatedCallback,selectAllTemplate:this._selectAllTemplate,selectCheckboxAlignment:this._selectCheckboxAlignment,tooltipSelect:this._tooltipSelect,tooltipSelectAll:this._tooltipSelectAll}}set select(t){this._select!==t&&(this._select=t,this._adapter.setSelectColumnVisibility(this._adapter.getTableElement(),this._select,this._selectRowListener,this._multiselect?this._selectAllListener:void 0,this._multiselect?this._selectAllTemplate:null,this._selectCheckboxAlignment,this._tableRows,this._tooltipSelect,this._tooltipSelectAll),this._updateSelections(!0),this._select?this._adapter.setHostAttribute(f.attributes.SELECT,this._select.toString()):this._adapter.removeHostAttribute(f.attributes.SELECT))}get select(){return this._select}set multiselect(t){this._multiselect!==t&&(this._multiselect=t,this._select&&(this._adapter.setSelectAllVisibility(this._adapter.getTableElement(),this._multiselect,this._multiselect?this._selectAllListener:null,this._multiselect?this.selectAllTemplate:null,this._selectCheckboxAlignment,this._tooltipSelectAll),this._updateSelections(!0)),this._adapter.setHostAttribute(f.attributes.MULTISELECT,this._multiselect.toString()))}get multiselect(){return this._multiselect}get selectKey(){return Array.isArray(this._selectKey)?[...this._selectKey]:this._selectKey}set selectKey(t){this._originalSelectKey!==t&&(Array.isArray(t)?(this._originalSelectKey=[...t],this._selectKey=[...t]):(this._originalSelectKey=t,this._selectKey=[t]),this._selectionManager.setKey(this._selectKey),this._updateSelections(!1))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setDense(this._adapter.getTableElement(),this._dense),this._adapter.setHostAttribute(f.attributes.DENSE,this._dense.toString()))}get roomy(){return this._roomy}set roomy(t){t!==this._roomy&&(this._roomy=t,this._applyRoomy())}set filter(t){this._filter!==t&&(this._filter=t,this._adapter.setFilterRow(this._tableConfiguration),this._adapter.setHostAttribute(f.attributes.FILTER,this._filter.toString()))}get filter(){return this._filter}set fixedHeaders(t){this._fixedHeaders!==t&&(this._fixedHeaders=t,this._adapter.setFixedHeaders(this._tableConfiguration))}get fixedHeaders(){return this._fixedHeaders}get layoutType(){return this._layoutType}set layoutType(t){this._layoutType!==t&&(this._layoutType=t,this._adapter.setTableLayoutType(this._tableConfiguration))}get wrapContent(){return this._wrapContent}set wrapContent(t){this._wrapContent!==t&&(this._wrapContent=t,this._adapter.setWrapContentState(this._tableConfiguration))}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._adapter.setResizable(this._tableConfiguration))}get minResizeWidth(){return this._minResizeWidth}set minResizeWidth(t){this._minResizeWidth!==t&&(this._minResizeWidth=t,z2(this._minResizeWidth)?this._minResizeWidth<0&&(this._minResizeWidth=0):this._minResizeWidth=f.numbers.MIN_RESIZE_WIDTH)}get allowRowClick(){return this._allowRowClick}set allowRowClick(t){this._allowRowClick!==t&&(this._allowRowClick=t,this._rendered&&(this._adapter.setRowClickListeners(this._adapter.getTableElement(),this._allowRowClick,this._rowClickListener,this._rowDoubleClickListener),this._adapter.setRowClickAttributes(this._adapter.getTableElement(),this._allowRowClick)))}get multiColumnSort(){return this._multiColumnSort}set multiColumnSort(t){t!==this._multiColumnSort&&(this._multiColumnSort=t,this._refreshTableSort(),this.render())}get selectCheckboxAlignment(){return this._selectCheckboxAlignment}set selectCheckboxAlignment(t){t!==this._selectCheckboxAlignment&&(this._selectCheckboxAlignment=t,this._adapter.setHostAttribute(f.attributes.SELECT_CHECKBOX_ALIGNMENT,t),this.render())}get tooltipSelect(){return this._tooltipSelect}set tooltipSelect(t){t!==this._tooltipSelect&&(this._tooltipSelect=t,typeof t=="string"&&this._adapter.setHostAttribute(f.attributes.TOOLTIP_SELECT,t),this.render())}get tooltipSelectAll(){return this._tooltipSelectAll}set tooltipSelectAll(t){t!==this._tooltipSelectAll&&(this._tooltipSelectAll=t,this._adapter.setHostAttribute(f.attributes.TOOLTIP_SELECT_ALL,t),this.render())}get selectAllTemplate(){return this._selectAllTemplate}set selectAllTemplate(t){t!==this._selectAllTemplate&&(this._selectAllTemplate=t,this.render())}get rowCreated(){return this._rowCreatedCallback}set rowCreated(t){this._rowCreatedCallback=t}get cellCreated(){return this._cellCreatedCallback}set cellCreated(t){this._cellCreatedCallback=t}isRowSelected(t){let e=ha(Array.isArray(this._selectKey)?this._selectKey:[this._selectKey],t);return this.selectKey?!!this._selectionManager.getItems().find(a=>Nr(a,e)):this._selectionManager.exists(t)}getSelectedRows(){return this._selectionManager.getItems()}selectRows(t,e){if(!this._selectKey)throw new Error("You must set a selectKey to select rows.");(!this._multiselect||e)&&this.clearSelections(),t&&t.length&&(this._selectionManager.add(t),this._updateSelections(!e))}deselectRows(t){t&&t.length&&(this._selectionManager.remove(t),this._updateSelections(!1))}clearSelections(){let t=this._adapter.getTableElement();this._selectionManager.clear(),this._tableRows.forEach(e=>e.selected=!1),this._isAllSelected=!1,this._adapter.clearSelectedRows(t),this._select&&this._multiselect&&this._adapter.updateSelectAllState(t,!1)}hideColumn(t){let e=this._columnConfigurations[t];this._sortedColumnIndex===t&&(this._sortedColumnIndex=-1),this._hiddenColumnManager.exists(e)||(this._hiddenColumnManager.add(e),this.render())}showColumn(t){let e=this._columnConfigurations[t];this._hiddenColumnManager.exists(e)&&(this._hiddenColumnManager.remove(e),this.render())}isColumnHidden(t){let e=this._columnConfigurations[t];return!!e&&this._hiddenColumnManager.exists(e)}render(){this._adapter.createTable(this._tableConfiguration),this._renderSelections(),this._rendered=!0}_renderBody(){this._rendered&&(this._adapter.recreateTableBody(this._tableConfiguration),this._renderSelections())}_renderSelections(){this.select&&(this._isAllSelected=this._getSelectAllState(),this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)));let t=this._selectionManager.getItems();t.length&&this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,t,!1)}expandRow(t,e){if(!this._rendered)throw new Error("Cannot expand a row before the table has rendered.");if(t<0||t>this._tableRows.length)throw new Error(`Invalid row index: ${t}.`);return this._adapter.expandRow(this._tableConfiguration,t,e)}collapseRow(t){return!this._rendered||t<0||t>this._tableRows.length?Promise.resolve():this._adapter.collapseRow(this._tableConfiguration,t)}isRowExpanded(t){return this._adapter.isRowExpanded(this._tableConfiguration,t)}selectRowsByIndex(t,e){let a=t.map(o=>this._data[o]).filter(o=>!!o);this.selectRows(a,!e)}deselectRowsByIndex(t){let e=t.map(a=>this._data[a]).filter(a=>!!a);this.deselectRows(e)}_getSelectAllState(){return this._tableRows.length>0&&this._tableRows.every(t=>t.selected)}_updateSelections(t){this._tableRows.forEach(a=>a.selected=this._selectionManager.exists(a.data));let e=this._getSelectAllState();this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,this._selectionManager.getItems(),t),(e!==this._isAllSelected||this._isIndeterminate(e))&&(this._isAllSelected=e,this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)))}_onRowClick(t){if(t.stopImmediatePropagation(),t.target.matches(`[${f.attributes.SELECT_CHECKBOX}]`))return;let o=L2(t).filter(c=>c.nodeType===1).find(c=>c.hasAttribute(f.attributes.CUSTOM_CELL_TEMPLATE));if(o&&o.hasAttribute(f.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION))return;let{index:i,data:l}=this._getSelectedRowFromEvent(t),h={index:i,data:l};this._adapter.emitHostEvent(f.events.ROW_CLICK,h,!0,!1)}_onRowDoubleClick(t){if(t.stopPropagation(),t.target.matches(`[${f.attributes.SELECT_CHECKBOX}]`))return;let e=this._getSelectedRowFromEvent(t),a={index:e.index,data:e.data};this._adapter.emitHostEvent(f.events.SELECT_DOUBLE,a,!0,!1)}_onRowSelected(t){let e=this._getSelectedRowFromEvent(t);this._multiselect||this._tableRows.filter(l=>l.selected).forEach(l=>{Nr(l.data,ha(this._selectKey,e.data))||this.deselectRows([l.data])});let a=!this._selectionManager.exists(e.data);this._adapter.updateSelectedState(e.rowElement,a),a?this._selectionManager.add(e.data):this._selectionManager.remove(e.data),this._tableRows[e.index].selected=a;let o=[e.index],n=!1;if(this._multiselect){if(t.shiftKey&&this._previouslyClickedRow&&(o=this._shiftSelectRows(e),o.includes(this._previouslyClickedRow.index))){let l=o.indexOf(this._previouslyClickedRow.index);o.splice(l,1)}n=this._getSelectAllState(),this._adapter.updateSelectAllState(this._adapter.getTableElement(),n,this._isIndeterminate(n))}for(let i of o){let l=this._tableRows[i].data,c={selected:this._selectionManager.exists(l),index:i,data:l};this._adapter.emitHostEvent(f.events.SELECT,c,!0,!1)}if(this._isAllSelected!==n){this._isAllSelected=n;let i={status:this._isAllSelected,count:this._tableRows.filter(l=>l.selected).length,data:[...this._data],targetType:"row"};this._adapter.emitHostEvent(f.events.SELECT_ALL,i,!0,!1)}this._previouslyClickedRow=w({},e)}_getSelectedRowFromEvent(t){let a=L2(t).find(l=>l.tagName==="TR"),o=a.parentElement,n=this._getNonExpandedRows(o).findIndex(l=>l===a),i=this._tableRows[n].data;return{rowElement:a,index:n,data:i}}_getNonExpandedRows(t){return Array.from(t.rows).filter(e=>!e.classList.contains(f.classes.TABLE_ROW_EXPANDABLE_CONTENT))}_onSelectAll(t){t.stopPropagation(),this._isAllSelected=!this._isAllSelected;let e=this._adapter.getTableElement();this._adapter.updateSelectAllState(e,this._isAllSelected),this._tableRows.forEach((o,n)=>{o.selected=this._isAllSelected,this._isAllSelected?this._selectionManager.add(o.data):this._selectionManager.remove(o.data);let i=C1.getRowByIndex(e,n);i&&this._adapter.updateSelectedState(i,this._isAllSelected)});let a={status:this._isAllSelected,count:this._tableRows.filter(o=>o.selected).length,data:[...this._data],targetType:"select-all"};this._adapter.emitHostEvent(f.events.SELECT_ALL,a,!0,!1)}_onHeadRowContextMenu(t){t.ctrlKey&&t.preventDefault()}_onHeadRowMouseDown(t){if(t.button!==0)return;let e=L2(t),a=t.target,o=e.find(l=>l.tagName==="TR"),n=e.find(l=>l.tagName==="TH"),i=Array.from(o.cells).findIndex(l=>l===n);this._headCellMouseDownIndex=i,a!==n&&a.classList.contains(f.classes.TABLE_RESIZE_HANDLE)&&(this._resizeDescriptor={element:n,startWidth:n.offsetWidth,startX:t.pageX,width:n.offsetWidth,index:this._select?i-1:i},this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.setResizeColumnVisibility(this._tableConfiguration,i,!0)),this._adapter.addDocumentListener("mouseup",this._documentMouseUpListener)}_onMouseMove(t){if(this._resizeDescriptor){let e=this._resizeDescriptor.startWidth+(t.pageX-this._resizeDescriptor.startX);e<this._minResizeWidth&&(e=this._minResizeWidth),this._resizeDescriptor.width=e,this._resizeDescriptor.element.style.width=`${e}px`,this._adapter.addTableClass(f.classes.TABLE_RESIZING)}}_onMouseUp(t){if(this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener),this._adapter.removeTableClass(f.classes.TABLE_RESIZING),this._headCellMouseDownIndex!==void 0){if(this._resizeDescriptor){this._adapter.normalizeColumnWidths(this._tableConfiguration),this._adapter.setResizeColumnVisibility(this._tableConfiguration,this._headCellMouseDownIndex,!1);let e={index:this._resizeDescriptor.index,width:this._resizeDescriptor.width};this._adapter.emitHostEvent(f.events.COLUMN_RESIZE,e),this._resizeDescriptor=void 0}else this._tableConfiguration.tableElement.tHead.contains(t.target)&&(this._multiColumnSort?this._onMultiSort(this._headCellMouseDownIndex,t.ctrlKey):this._onSort(this._headCellMouseDownIndex));this._headCellMouseDownIndex=void 0}}_onSortableHeadCellKeydown(t){if(t.key===" "||t.key==="Enter"){let e=L2(t),a=e.find(i=>i.tagName==="TR"),o=e.find(i=>i.tagName==="TH"),n=Array.from(a.cells).findIndex(i=>i===o);this._onSort(n)}}_onSort(t){let e=this._select?t-1:t,a=e>=0?this._visibleColumnConfigurations[e]:null;if(!a||!a.sortable)return;let o="ASC",n=e===this._sortedColumnIndex,i=this._sortDirection==="ASC"||this._sortDirection===void 0,l=n&&this._sortDirection==="DESC";n&&i&&(o="DESC"),l&&!a.preventUnsort&&(o="UNSET");let h={direction:o,columnIndex:e};if(this._adapter.emitHostEvent(f.events.SORT,h,!0,!0)){if(n&&this._sortDirection==="DESC"&&!a.preventUnsort){this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=-1;return}this._sortDirection=o,e===this._sortedColumnIndex?this._adapter.setSortDirection(this._adapter.getTableElement(),t,this._sortDirection):(this._sortedColumnIndex>=0&&this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=e,this._adapter.setSortedColumn(this._adapter.getTableElement(),t,this._sortDirection))}}_onMultiSort(t,e){let a=this._select?t-1:t,o=a>=0?this._visibleColumnConfigurations[a]:null;if(!o||!o.sortable)return;let n=this._multiSortManager.sortedColumns,i=this._multiSortManager.getSortColumn(a);i?this._multiSortManager.updateSortColumn(i):e?this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:a,propertyName:o.property}):(this._multiSortManager.clearMultiSort(),this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:a,propertyName:o.property}));let l=this._multiSortManager.sortedColumns.map(d=>w({},d));if(!this._adapter.emitHostEvent(f.events.SORT,l,!0,!0)){this._multiSortManager.setSortColumns(n);return}let c=this._multiSortManager.sortedColumns.length>1;for(let d=0;d<this._visibleColumnConfigurations.length;d++){let u=this._select?d+1:d;if(!this._multiSortManager.isSortColumn(d))this._adapter.removeColumnSort(this._adapter.getTableElement(),u),C1.setMultiSortColumnSortNumber(this._adapter.getTableElement(),c,u,null);else{let _=this._multiSortManager.getSortColumn(d);_&&(this._adapter.setSortedColumn(this._adapter.getTableElement(),u,_.direction),C1.setMultiSortColumnSortNumber(this._adapter.getTableElement(),c,u,_.sortOrder||null))}}}_onFilter(t,e){let a={value:t,columnIndex:e};this._adapter.emitHostEvent(f.events.FILTER,a,!0,!1)}_shiftSelectRows(t){let e=[];if(this._previouslyClickedRow){let a=this._previouslyClickedRow.index,o=t.index,n=o>=a?a:o,i=o>=a?o:a;i+=i>n?1:0,n+=n>i?1:0;let l=d=>this.selectRows(d,!1),h=this._tableRows.find(d=>d.selected&&d.data===t.data),c=this._tableRows.find(d=>{var u;return d.data===((u=this._previouslyClickedRow)==null?void 0:u.data)&&!d.selected});(!h||c)&&(l=d=>this.deselectRows(d));for(let d=n;d<i;d++)e.push(d);l(this.data.filter((d,u)=>e.includes(u)))}return e}_isIndeterminate(t){return!t&&this.getSelectedRows().length>0&&this._data.length!==this.getSelectedRows().length}_applyRoomy(){this._adapter.setRoomy(this._adapter.getTableElement(),this._roomy),this._adapter.setHostAttribute(f.attributes.ROOMY,this._roomy.toString())}_refreshTableSort(){if(this._sortedColumnIndex=this._visibleColumnConfigurations.findIndex(t=>t.initialSort),this._sortedColumnIndex>=0&&this._sortDirection===void 0){let t=this._visibleColumnConfigurations[this._sortedColumnIndex];t.initialSort===!0&&t.sortDirection?this._sortDirection=t.sortDirection:typeof t.initialSort=="object"&&t.initialSort.direction&&(this._sortDirection=t.initialSort.direction)}if(this._multiColumnSort){let t=[];this._visibleColumnConfigurations.forEach((e,a)=>{typeof e.initialSort=="object"&&t.push({columnIndex:a,direction:e.initialSort.direction,sortOrder:e.initialSort.sortOrder,propertyName:e.property})}),this._multiSortManager.setSortColumns(t)}}};var q1=class extends M{static get observedAttributes(){return[f.attributes.SELECT,f.attributes.MULTISELECT,f.attributes.SELECT_KEY,f.attributes.DENSE,f.attributes.ROOMY,f.attributes.FILTER,f.attributes.FIXED_HEADERS,f.attributes.LAYOUT_TYPE,f.attributes.WRAP_CONTENT,f.attributes.RESIZABLE,f.attributes.MIN_RESIZE_WIDTH,f.attributes.ALLOW_ROW_CLICK,f.attributes.MULTI_COLUMN_SORT,f.attributes.SELECT_CHECKBOX_ALIGNMENT,f.attributes.TOOLTIP_SELECT,f.attributes.TOOLTIP_SELECT_ALL]}constructor(){super(),q.define(K5),this._core=new Ll(new yl(this))}initializedCallback(){this._core.initialize()}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case f.attributes.SELECT:this.select=p(a);break;case f.attributes.MULTISELECT:this.multiselect=p(a);break;case f.attributes.SELECT_KEY:this.selectKey=a;break;case f.attributes.DENSE:this.dense=p(a);break;case f.attributes.ROOMY:this.roomy=p(a);break;case f.attributes.FILTER:this.filter=p(a);break;case f.attributes.FIXED_HEADERS:this.fixedHeaders=p(a);break;case f.attributes.LAYOUT_TYPE:this.layoutType=a;break;case f.attributes.WRAP_CONTENT:this.wrapContent=p(a);break;case f.attributes.RESIZABLE:this.resizable=p(a);break;case f.attributes.MIN_RESIZE_WIDTH:this.minResizeWidth=W(a);break;case f.attributes.ALLOW_ROW_CLICK:this.allowRowClick=p(a);break;case f.attributes.MULTI_COLUMN_SORT:this.multiColumnSort=p(a);break;case f.attributes.SELECT_CHECKBOX_ALIGNMENT:this.selectCheckboxAlignment=this.getAttribute(f.attributes.SELECT_CHECKBOX_ALIGNMENT)||"center";break;case f.attributes.TOOLTIP_SELECT:this.tooltipSelect=a;break;case f.attributes.TOOLTIP_SELECT_ALL:this.tooltipSelectAll=a;break}}hideColumn(t){this._core.hideColumn(t)}showColumn(t){this._core.showColumn(t)}isColumnHidden(t){return this._core.isColumnHidden(t)}getSelectedRows(){return this._core.getSelectedRows()}selectRow(t){this._core.selectRows([t],!1)}selectRows(t,e=!1){this._core.selectRows(t,!e)}deselectRow(t){this._core.deselectRows([t])}deselectRows(t){this._core.deselectRows(t)}clearSelections(){this._core.clearSelections()}render(){this._core.render()}expandRow(t,e){return this._core.expandRow(t,e)}collapseRow(t){return this._core.collapseRow(t)}isRowExpanded(t){return this._core.isRowExpanded(t)}selectRowsByIndex(t,e){typeof t=="number"?this._core.selectRowsByIndex([t],e):Array.isArray(t)&&this._core.selectRowsByIndex(t,e)}deselectRowsByIndex(t){typeof t=="number"?this._core.deselectRowsByIndex([t]):Array.isArray(t)&&this._core.deselectRowsByIndex(t)}isRowSelected(t){return this._core.isRowSelected(t)}};s([v()],q1.prototype,"data",2),s([v()],q1.prototype,"columnConfigurations",2),s([v()],q1.prototype,"select",2),s([v()],q1.prototype,"multiselect",2),s([v()],q1.prototype,"selectKey",2),s([v()],q1.prototype,"tooltipSelect",2),s([v()],q1.prototype,"tooltipSelectAll",2),s([v()],q1.prototype,"dense",2),s([v()],q1.prototype,"roomy",2),s([v()],q1.prototype,"filter",2),s([v()],q1.prototype,"fixedHeaders",2),s([v()],q1.prototype,"layoutType",2),s([v()],q1.prototype,"wrapContent",2),s([v()],q1.prototype,"resizable",2),s([v()],q1.prototype,"minResizeWidth",2),s([v()],q1.prototype,"allowRowClick",2),s([v()],q1.prototype,"multiColumnSort",2),s([v()],q1.prototype,"rowCreated",2),s([v()],q1.prototype,"cellCreated",2),s([v()],q1.prototype,"selectAllTemplate",2),s([v()],q1.prototype,"selectCheckboxAlignment",2),q1=s([y({name:f.elementName,dependencies:[_t,X,J2,p1]})],q1);function b6(){x(q1)}var y6=`${b}tab-bar`,M6={DISABLED:"disabled",ACTIVE_TAB:"active-tab",VERTICAL:"vertical",STACKED:"stacked",CLUSTERED:"clustered",SECONDARY:"secondary",INVERTED:"inverted",AUTO_ACTIVATE:"auto-activate",SCROLL_BUTTONS:"scroll-buttons"},Xx=w({},M6),jx={ROOT:".forge-tab-bar",SCROLL_CONTAINER:".scroll-container",DEFAULT_SLOT:"slot:not([name])"},Zx={SCROLL_BUTTON:"scroll-button"},Qx={CHANGE:`${y6}-change`},Jx={SCROLL_MARGIN:48},T1={elementName:y6,observedAttributes:M6,attributes:Xx,events:Qx,selectors:jx,classes:Zx,numbers:Jx},i5=new Map([["default",new Set(["Home","End"])],["horizontal",new Set(["ArrowLeft","ArrowRight"])],["vertical",new Set(["ArrowUp","ArrowDown"])]]);var H6=`${b}tab`,L6={DISABLED:"disabled",SELECTED:"selected",VERTICAL:"vertical",STACKED:"stacked",SECONDARY:"secondary",INVERTED:"inverted"},tb=w({},L6),eb={INDICATOR:".indicator"},ab={},ob={SELECT:`${H6}-select`},rb={EASING:"cubic-bezier(0.4, 0, 0.2, 1)"},nb={ANIMATION_DURATION:250},F1={elementName:H6,observedAttributes:L6,attributes:tb,selectors:eb,classes:ab,events:ob,strings:rb,numbers:nb};var Il=class extends I{constructor(t){super(t),this._tabIndicatorElement=g(this._component,F1.selectors.INDICATOR),this._focusIndicatorElement=g(this._component,m1.elementName),this._stateLayerElement=g(this._component,M1.elementName)}initialize(){this._component.tabIndex=this._component.selected?0:-1,this._component.setAttribute("role","tab"),this._component.setAttribute("aria-selected",this._component.selected?"true":"false")}activateFocusIndicator(){this._focusIndicatorElement.active=!0}addInteractionListener(t,e){this._component.addEventListener(t,e)}setDisabled(t){this._stateLayerElement.disabled=t,this._component.tabIndex=t?-1:this._component.selected?0:-1,this._component.setAttribute("aria-disabled",String(t)),K(this._component,t,F1.attributes.DISABLED,String(t))}setSelected(t){this._component.tabIndex=t?0:-1,this._component.setAttribute("aria-selected",String(t))}animateSelected(){this._tabIndicatorElement.getAnimations().forEach(e=>e.cancel());let t=this._getKeyframes();t&&this._tabIndicatorElement.animate(t,{duration:F1.numbers.ANIMATION_DURATION,easing:F1.strings.EASING})}animateStateLayer(){this._stateLayerElement.playAnimation()}_getKeyframes(){var L;let t=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!this._component.selected)return t?[{opacity:1},{transform:"none"}]:null;let e={},a=this._component.vertical,o=this._getSelectedTabIndicator(),n=(L=o==null?void 0:o.getBoundingClientRect())!=null?L:{},i=a?n.top:n.left,l=a?n.height:n.width,h=this._tabIndicatorElement.getBoundingClientRect(),c=a?h.top:h.left,d=a?h.height:h.width,u=a?"Y":"X",_=l/d;return!t&&i!==void 0&&c!==void 0&&!isNaN(_)?e.transform=`translate${u}(${(i-c).toFixed(4)}px) scale${u}(${_.toFixed(4)})`:e.opacity=0,[e,{transform:"none"}]}_getSelectedTabIndicator(){let t=M5(this._component,T1.elementName);if(t){let a=Array.from(t.querySelectorAll(F1.elementName)).find(o=>o.hasAttribute(F1.attributes.SELECTED));if(a)return g(a,F1.selectors.INDICATOR)}return null}};var Vl=class{constructor(t){this._adapter=t;this._selected=!1;this._disabled=!1;this._vertical=!1;this._stacked=!1;this._secondary=!1;this._inverted=!1;this._clickListener=()=>this._onClick(),this._keydownListener=e=>this._onKeydown(e)}initialize(){this._adapter.initialize(),this._adapter.addInteractionListener("click",this._clickListener),this._adapter.addInteractionListener("keydown",this._keydownListener)}setFocus(t){t!=null&&t.focusVisible&&this._adapter.activateFocusIndicator()}_onClick(){this._disabled||this._selected||this._dispatchSelectEvent()}_onKeydown(t){if(this._disabled||this._selected)return;(t.key===" "||t.key==="Enter")&&(t.preventDefault(),this._adapter.animateStateLayer(),this._dispatchSelectEvent())}_dispatchSelectEvent(){this._adapter.dispatchHostEvent(new CustomEvent(F1.events.SELECT,{bubbles:!0,composed:!0}))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(F1.attributes.DISABLED,this._disabled))}get selected(){return this._selected}set selected(t){this._selected!==t&&(this._selected=t,this._adapter.setSelected(this._selected),this._adapter.animateSelected(),this._adapter.toggleHostAttribute(F1.attributes.SELECTED,this._selected))}get vertical(){return this._vertical}set vertical(t){this._vertical!==t&&(this._vertical=t,this._adapter.toggleHostAttribute(F1.attributes.VERTICAL,this._vertical))}get stacked(){return this._stacked}set stacked(t){this._stacked!==t&&(this._stacked=t,this._adapter.toggleHostAttribute(F1.attributes.STACKED,this._stacked))}get secondary(){return this._secondary}set secondary(t){this._secondary!==t&&(this._secondary=t,this._adapter.toggleHostAttribute(F1.attributes.SECONDARY,this._secondary))}get inverted(){return this._inverted}set inverted(t){this._inverted!==t&&(this._inverted=t,this._adapter.toggleHostAttribute(F1.attributes.INVERTED,this._inverted))}};var ib='<template><div class="forge-tab" part="container"><span class="content" part="content"><slot name="start"><slot name="leading"></slot></slot><span class="label" part="label"><slot></slot></span><slot name="end"><slot name="trailing"></slot></slot><span class="indicator" part="indicator"></span></span><forge-state-layer exportparts="surface:state-layer" target=":host"></forge-state-layer><forge-focus-indicator part="focus-indicator" target=":host" inward></forge-focus-indicator></div></template>',sb=':host{display:inline-flex;outline:0;-webkit-tap-highlight-color:transparent;vertical-align:middle}:host([hidden]){display:none}.forge-tab{--_tab-active-color:var(--forge-tab-active-color, var(--forge-theme-primary, #3f51b5));--_tab-inactive-color:var(--forge-tab-inactive-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_tab-height:var(--forge-tab-height, 48px);--_tab-stacked-height:var(--forge-tab-stacked-height, 64px);--_tab-padding-block:var(--forge-tab-padding-block, 0);--_tab-padding-inline:var(--forge-tab-padding-inline, 0);--_tab-disabled-opacity:var(--forge-tab-disabled-opacity, 0.38);--_tab-indicator-color:var(--forge-tab-indicator-color, var(--_tab-active-color));--_tab-indicator-height:var(--forge-tab-indicator-height, 3px);--_tab-indicator-shape:var(--forge-tab-indicator-shape, 3px 3px 0 0);--_tab-vertical-indicator-shape:var(--forge-tab-vertical-indicator-shape, 3px 0 0 3px);--_tab-secondary-indicator-height:var(--forge-tab-secondary-indicator-height, 2px);--_tab-secondary-indicator-shape:var(--forge-tab-secondary-indicator-shape, 0);--_tab-inverted-indicator-shape:var(--forge-tab-inverted-indicator-shape, 0 0 3px 3px);--_tab-vertical-inverted-indicator-shape:var(--forge-tab-vertical-inverted-indicator-shape, 0 3px 3px 0);--_tab-container-color:var(--forge-tab-container-color, transparent);--_tab-container-height:var(--forge-tab-container-height, var(--_tab-height));--_tab-container-shape:var(--forge-tab-container-shape, 0);--_tab-content-height:var(--forge-tab-content-height, var(--_tab-height));--_tab-content-spacing:var(--forge-tab-content-spacing, var(--forge-spacing-xsmall, 8px));--_tab-content-padding:var(--forge-tab-content-padding, var(--forge-spacing-xxsmall, 4px));--_tab-content-padding-block:var(--forge-tab-content-padding-block, var(--_tab-content-padding));--_tab-content-padding-inline:var(--forge-tab-content-padding-inline, var(--forge-spacing-medium, 16px));--_tab-content-padding-inline-secondary:var(--forge-tab-content-padding-inline-secondary, var(--forge-spacing-medium, 16px));--_tab-active-focus-icon-color:var(--forge-tab-active-focus-icon-color, var(--_tab-active-color));--_tab-active-hover-icon-color:var(--forge-tab-active-hover-icon-color, var(--_tab-active-color));--_tab-active-icon-color:var(--forge-tab-active-icon-color, var(--_tab-active-color));--_tab-active-pressed-icon-color:var(--forge-tab-active-pressed-icon-color, var(--_tab-active-color));--_tab-icon-size:var(--forge-tab-icon-size, 24px);--_tab-focus-icon-color:var(--forge-tab-focus-icon-color, var(--_tab-inactive-color));--_tab-hover-icon-color:var(--forge-tab-hover-icon-color, var(--_tab-inactive-color));--_tab-icon-color:var(--forge-tab-icon-color, var(--_tab-inactive-color));--_tab-pressed-icon-color:var(--forge-tab-pressed-icon-color, var(--_tab-inactive-color));--_tab-active-focus-label-text-color:var(--forge-tab-active-focus-label-text-color, var(--_tab-active-color));--_tab-active-hover-label-text-color:var(--forge-tab-active-hover-label-text-color, var(--_tab-active-color));--_tab-active-label-text-color:var(--forge-tab-active-label-text-color, var(--_tab-active-color));--_tab-active-pressed-label-text-color:var(--forge-tab-active-pressed-label-text-color, var(--_tab-active-color));--_tab-focus-label-text-color:var(--forge-tab-focus-label-text-color, var(--_tab-inactive-color));--_tab-hover-label-text-color:var(--forge-tab-hover-label-text-color, var(--_tab-inactive-color));--_tab-label-text-color:var(--forge-tab-label-text-color, var(--_tab-inactive-color));--_tab-pressed-label-text-color:var(--forge-tab-pressed-label-text-color, var(--_tab-inactive-color))}.forge-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;background:0 0;text-decoration:none;width:100%;position:relative;padding-block:var(--_tab-padding-block);padding-inline:var(--_tab-padding-inline);margin:0;z-index:0;background-color:var(--_tab-container-color);color:var(--_tab-label-text-color);min-height:var(--_tab-container-height)}.forge-tab::-moz-focus-inner{padding:0;border:0}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=trailing]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_tab-icon-color);font-size:var(--_tab-icon-size);width:var(--_tab-icon-size);height:var(--_tab-icon-size)}.forge-tab:hover{color:var(--_tab-hover-label-text-color);cursor:pointer}.forge-tab:hover ::slotted([slot=leading]),.forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-hover-icon-color)}.forge-tab .content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;white-space:nowrap;transition:150ms color linear;max-height:calc(var(--_tab-content-height) + 2 * var(--_tab-content-padding-block));min-height:var(--_tab-content-height);width:100%;padding-block:var(--_tab-content-padding-block);padding-inline:var(--_tab-content-padding-inline);gap:var(--_tab-content-spacing)}.forge-tab .content .label{display:inline-block;line-height:1}.forge-tab .indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_tab-indicator-color);border-radius:var(--_tab-indicator-shape);height:var(--_tab-indicator-height);min-width:100%;inset:auto 0 0;opacity:0}::slotted(*),:host{white-space:nowrap}forge-focus-indicator{--forge-focus-indicator-color:var(--_tab-active-color);--forge-focus-indicator-shape:8px}forge-state-layer{--forge-state-layer-color:var(--_tab-inactive-color)}:host(:focus) .forge-tab{color:var(--_tab-focus-label-text-color)}:host(:focus) .forge-tab ::slotted([slot=leading]),:host(:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-focus-icon-color)}:host(:active) .forge-tab{color:var(--_tab-pressed-label-text-color);outline:0}:host(:active) .forge-tab ::slotted([slot=leading]),:host(:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-pressed-icon-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .forge-tab{opacity:var(--_tab-disabled-opacity);pointer-events:none}:host([selected]) .forge-tab{color:var(--_tab-active-label-text-color)}:host([selected]) .forge-tab ::slotted([slot=end]),:host([selected]) .forge-tab ::slotted([slot=leading]),:host([selected]) .forge-tab ::slotted([slot=start]),:host([selected]) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-icon-color)}:host([selected]) .forge-tab:hover{color:var(--_tab-active-hover-label-text-color)}:host([selected]) .forge-tab:hover ::slotted([slot=end]),:host([selected]) .forge-tab:hover ::slotted([slot=leading]),:host([selected]) .forge-tab:hover ::slotted([slot=start]),:host([selected]) .forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-active-hover-icon-color)}:host([selected]) .forge-tab .indicator{opacity:1}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_tab-active-color)}:host([selected]:not([vertical])) forge-focus-indicator{--forge-focus-indicator-offset-block:0 calc(var(--_tab-indicator-height) + 1px)}:host([selected]:focus) .forge-tab{color:var(--_tab-active-focus-label-text-color)}:host([selected]:focus) .forge-tab ::slotted([slot=leading]),:host([selected]:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-focus-icon-color)}:host([selected]:active) .forge-tab{color:var(--_tab-active-pressed-label-text-color)}:host([selected]:active) .forge-tab ::slotted([slot=leading]),:host([selected]:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-pressed-icon-color)}:host([stacked]) .forge-tab{--_tab-height:var(--_tab-stacked-height)}:host([stacked]) .forge-tab .content{max-height:none;flex-direction:column;height:100%}:host([vertical]) .forge-tab{--_tab-padding-inline:var(--forge-tab-padding-inline, 0);width:100%;flex-direction:row;border-bottom:none}:host([vertical]) .forge-tab .content{width:100%;min-height:100%}:host([vertical]) .forge-tab .indicator{height:100%;min-width:var(--_tab-indicator-height);inset:0 0 0 auto}:host([vertical]) forge-focus-indicator{--forge-focus-indicator-offset-inline:0 calc(var(--_tab-indicator-height) + 1px)}:host([vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-indicator-shape)}:host([inverted]) .forge-tab{--_tab-indicator-shape:var(--_tab-inverted-indicator-shape)}:host([inverted]) .indicator{inset:0 0 auto;transform-origin:top left}:host([inverted][vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-inverted-indicator-shape)}:host([inverted][vertical]) .indicator{inset:0 auto 0 0}',kt=class extends M{static get observedAttributes(){return Object.values(F1.observedAttributes)}constructor(){super(),H(this,ib,sb),this._core=new Vl(new Il(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case F1.observedAttributes.DISABLED:this.disabled=p(a);break;case F1.observedAttributes.SELECTED:this.selected=p(a);break;case F1.observedAttributes.VERTICAL:this.vertical=p(a);break;case F1.observedAttributes.STACKED:this.stacked=p(a);break;case F1.observedAttributes.SECONDARY:this.secondary=p(a);break;case F1.observedAttributes.INVERTED:this.inverted=p(a);break}}focus(t){super.focus(t),this._core.setFocus(t)}};s([v()],kt.prototype,"disabled",2),s([v()],kt.prototype,"selected",2),s([v()],kt.prototype,"vertical",2),s([v()],kt.prototype,"stacked",2),s([v()],kt.prototype,"secondary",2),s([v()],kt.prototype,"inverted",2),kt=s([y({name:F1.elementName,dependencies:[Q,r1]})],kt);function I6(){x(kt)}var El=class extends I{constructor(t){super(t),this._defaultSlotElement=g(this._component,T1.selectors.DEFAULT_SLOT),this._rootElement=g(this._component,T1.selectors.ROOT),this._scrollContainer=g(this._component,T1.selectors.SCROLL_CONTAINER)}initializeContainerSizeObserver(t){this._resizeObserver=new ResizeObserver(()=>t()),this._resizeObserver.observe(this._component)}initializeScrollObserver(t){this._scrollContainer.addEventListener("scroll",t,{passive:!0})}destroyContainerSizeObserver(){var t;(t=this._resizeObserver)==null||t.disconnect(),this._resizeObserver=void 0}destroyScrollObserver(t){this._scrollContainer.removeEventListener("scroll",t,{passive:!0})}setVertical(t){K(this._component,!!t,"aria-orientation","vertical")}setScrollBackwardButtonListener(t){var e;(e=this._backwardScrollButton)==null||e.addEventListener("click",t)}setScrollForwardButtonListener(t){var e;(e=this._forwardScrollButton)==null||e.addEventListener("click",t)}addSlotListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}getTabs(){return Array.from(this._component.querySelectorAll(F1.elementName))}async tryScrollTabIntoView(t){if(await new Promise(requestAnimationFrame),!t.isConnected||!t.selected&&!t.matches(":focus"))return;let e=this._component.vertical,a=e?this._scrollContainer.offsetTop:this._scrollContainer.offsetLeft,o=e?t.offsetTop:t.offsetLeft,n=e?t.offsetHeight:t.offsetWidth,i=e?this._scrollContainer.scrollTop:this._scrollContainer.scrollLeft,l=e?this._scrollContainer.offsetHeight:this._scrollContainer.offsetWidth,h=o-(T1.numbers.SCROLL_MARGIN+a),c=o+n-l+(T1.numbers.SCROLL_MARGIN-a),d=Math.min(h,Math.max(c,i)),u=t.matches(":focus")?"smooth":"instant";this._scrollContainer.scrollTo({behavior:u,[e?"left":"top"]:0,[e?"top":"left"]:d})}getScrollState(){let{scrollHeight:t,scrollWidth:e,scrollLeft:a,scrollTop:o,clientHeight:n,clientWidth:i}=this._scrollContainer,l=this._component.vertical?n+o:i+a,h=this._component.vertical?t:e,c=l===h;return{isScrolledStart:(this._component.vertical?l-n:l-i)===0,isScrolledEnd:c}}isScrollable(){let{scrollHeight:t,scrollWidth:e,clientHeight:a,clientWidth:o}=this._scrollContainer;return this._component.vertical?t>a:e>o}setScrollButtons(t){var e,a;t?(this._backwardScrollButton=this._createScrollButton(this._component.vertical?Go.name:s0.name),this._rootElement.insertAdjacentElement("afterbegin",this._backwardScrollButton),this._forwardScrollButton=this._createScrollButton(this._component.vertical?i0.name:fe.name),this._rootElement.insertAdjacentElement("beforeend",this._forwardScrollButton)):((e=this._backwardScrollButton)==null||e.remove(),this._backwardScrollButton=void 0,(a=this._forwardScrollButton)==null||a.remove(),this._forwardScrollButton=void 0)}syncScrollButtons({backwardEnabled:t,forwardEnabled:e}){var a,o;if(this._backwardScrollButton){let n=!t;n&&this._backwardScrollButton.matches(":focus")&&((a=this._forwardScrollButton)==null||a.focus()),this._backwardScrollButton.disabled=n,this._backwardScrollButton.tabIndex=-1}if(this._forwardScrollButton){let n=!e;n&&this._forwardScrollButton.matches(":focus")&&((o=this._backwardScrollButton)==null||o.focus()),this._forwardScrollButton.disabled=n,this._forwardScrollButton.tabIndex=-1}}scroll(t){let e=this._component.vertical?this._scrollContainer.offsetHeight:this._scrollContainer.offsetWidth;this._scrollContainer.scrollBy({behavior:"smooth",[this._component.vertical?"top":"left"]:e*(t==="forward"?1:-1)})}updateScrollButtonIcons(t){var o,n;let e=(o=this._backwardScrollButton)==null?void 0:o.querySelector("forge-icon");e&&(e.name=t?Go.name:s0.name);let a=(n=this._forwardScrollButton)==null?void 0:n.querySelector("forge-icon");a&&(a.name=t?i0.name:fe.name)}_createScrollButton(t){let e=document.createElement("forge-icon-button");e.classList.add(T1.classes.SCROLL_BUTTON),e.shape="squared",e.type="button",e.tabIndex=-1,e.setAttribute("aria-hidden","true");let a=document.createElement("forge-icon");return a.name=t,e.appendChild(a),e}};var Cl=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._disabled=!1;this._vertical=!1;this._clustered=!1;this._stacked=!1;this._secondary=!1;this._inverted=!1;this._autoActivate=!1;this._scrollButtons=!1;this._tabs=[];this._scrollButtonsVisible=!1;this._tabsChangedListener=()=>this._onTabsChanged(),this._tabSelectedListener=e=>this._onTabSelected(e),this._keydownListener=e=>this._onKeydown(e),this._resizeListener=()=>this._onResize(),this._scrollListener=()=>this._onScroll(),this._scrollBackwardButtonListener=()=>this._onScrollBackward(),this._scrollForwardButtonListener=()=>this._onScrollForward()}initialize(){this._adapter.addSlotListener(this._tabsChangedListener),this._adapter.addHostListener(F1.events.SELECT,this._tabSelectedListener),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.setVertical(this._vertical),this._scrollButtons&&(this._adapter.initializeContainerSizeObserver(this._resizeListener),this._adapter.initializeScrollObserver(this._scrollListener),this._updateScrollState()),this._tryScrollActiveTabIntoView(),this._isInitialized=!0}destroy(){this._adapter.destroyContainerSizeObserver(),this._adapter.destroyScrollObserver(this._scrollListener),this._isInitialized=!1}async _onTabsChanged(){this._tabs=this._adapter.getTabs(),this._syncTabState(),this._tryScrollActiveTabIntoView()}_onTabSelected(t){this._selectTab({tab:t.target,focusTab:!0})}async _onKeydown(t){var n,i;let e=this._vertical?"vertical":"horizontal";if(!(((n=i5.get("default"))==null?void 0:n.has(t.key))||((i=i5.get(e))==null?void 0:i.has(t.key))))return;t.preventDefault();let o=-1;if(t.key==="Home")o=this._tabs.findIndex(l=>!l.disabled);else if(t.key==="End")o=this._tabs.reduceRight((l,h,c)=>!h.disabled&&l===-1?c:l,-1);else{let l=this._tabs.findIndex(d=>d.matches(":focus")),h=t.key==="ArrowLeft"||t.key==="ArrowUp",c=d=>{var _;o=d+(h?-1:1),o=o<0?this._tabs.length-1:o%this._tabs.length,!this._tabs.every(L=>L.disabled)&&((_=this._tabs[o])!=null&&_.disabled)&&c(o)};c(l)}o!==-1&&(this._autoActivate?this._selectTab({tab:this._tabs[o],focusTab:!0}):(this._tabs[o].focus({preventScroll:!0,focusVisible:!0}),await this._adapter.tryScrollTabIntoView(this._tabs[o])))}async _selectTab({tab:t,emitEvent:e=!0,focusTab:a=!1}){if(!t||t.disabled)return;let o=this._tabs.find(n=>n.selected);if(o!==t){if(e){let n=this._tabs.indexOf(t),i=new CustomEvent(T1.events.CHANGE,{detail:{index:n},bubbles:!0,cancelable:!0,composed:!0});if(this._adapter.dispatchHostEvent(i),i.defaultPrevented)return}t.selected=!0,a&&t.focus({preventScroll:!0}),await this._adapter.tryScrollTabIntoView(t),o&&(o.selected=!1),this._activeTab=this._tabs.indexOf(t)}}_syncTabState(){this._tabs.forEach((t,e)=>{t.selected=e===this._activeTab,this._disabled&&(t.disabled=this._disabled),t.vertical=this._vertical,t.stacked=this._stacked,t.secondary=this._secondary,t.inverted=this._inverted})}_onResize(){this._detectScrollableStatus()}_onScroll(){this._updateScrollState()}_onScrollBackward(){this._adapter.scroll("backward")}_onScrollForward(){this._adapter.scroll("forward")}_detectScrollableStatus(){let t=this._adapter.isScrollable();this._scrollButtonsVisible!==t&&(this._adapter.setScrollButtons(t),t?(this._adapter.initializeScrollObserver(this._scrollListener),this._updateScrollState(),this._adapter.setScrollBackwardButtonListener(this._scrollBackwardButtonListener),this._adapter.setScrollForwardButtonListener(this._scrollForwardButtonListener)):this._adapter.destroyScrollObserver(this._scrollListener),this._scrollButtonsVisible=t)}_updateScrollState(){let{isScrolledEnd:t,isScrolledStart:e}=this._adapter.getScrollState(),a={backwardEnabled:!e,forwardEnabled:!t};this._adapter.syncScrollButtons(a)}_tryScrollActiveTabIntoView(){this._tabScrollAnimationFrame&&window.cancelAnimationFrame(this._tabScrollAnimationFrame),this._tabScrollAnimationFrame=window.requestAnimationFrame(()=>{this._tabScrollAnimationFrame=void 0,this._adapter.isScrollable()&&typeof this._activeTab=="number"&&this._activeTab>=0&&this._tabs[this._activeTab]&&this._adapter.tryScrollTabIntoView(this._tabs[this._activeTab])})}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._tabs.forEach(e=>e.disabled=this._disabled),this._adapter.toggleHostAttribute(T1.attributes.DISABLED,this._disabled))}get activeTab(){return this._activeTab}set activeTab(t){if(this._activeTab!==t)if(this._activeTab=t!=null?t:void 0,typeof this._activeTab=="number"){let e=this._tabs[this._activeTab];this._selectTab({tab:e,emitEvent:!1,focusTab:!1}),this._adapter.setHostAttribute(T1.attributes.ACTIVE_TAB,String(this._activeTab))}else this._tabs.forEach(e=>e.selected=!1),this._adapter.removeHostAttribute(T1.attributes.ACTIVE_TAB)}get vertical(){return this._vertical}set vertical(t){t=!!t,this._vertical!==t&&(this._vertical=t,this._isInitialized&&this._adapter.setVertical(this._vertical),this._tabs.forEach(e=>e.vertical=this._vertical),this._scrollButtonsVisible&&this._adapter.updateScrollButtonIcons(this._vertical),this._adapter.toggleHostAttribute(F1.attributes.VERTICAL,this._vertical))}get clustered(){return this._clustered}set clustered(t){t=!!t,this._clustered!==t&&(this._clustered=t,this._adapter.toggleHostAttribute(T1.attributes.CLUSTERED,this._clustered))}get stacked(){return this._stacked}set stacked(t){t=!!t,this._stacked!==t&&(this._stacked=t,this._tabs.forEach(e=>e.stacked=this._stacked),this._adapter.toggleHostAttribute(T1.attributes.STACKED,this._stacked))}get secondary(){return this._secondary}set secondary(t){t=!!t,this._secondary!==t&&(this._secondary=t,this._tabs.forEach(e=>e.secondary=this._secondary),this._adapter.toggleHostAttribute(T1.attributes.SECONDARY,this._secondary))}get inverted(){return this._inverted}set inverted(t){t=!!t,this._inverted!==t&&(this._inverted=t,this._tabs.forEach(e=>e.inverted=this._inverted),this._adapter.toggleHostAttribute(T1.attributes.INVERTED,this._inverted))}get autoActivate(){return this._autoActivate}set autoActivate(t){t=!!t,this._autoActivate!==t&&(this._autoActivate=t,this._adapter.toggleHostAttribute(T1.attributes.AUTO_ACTIVATE,this._autoActivate))}get scrollButtons(){return this._scrollButtons}set scrollButtons(t){t=!!t,this._scrollButtons!==t&&(this._scrollButtons=!!t,this._isInitialized&&(this._scrollButtons?(this._adapter.initializeContainerSizeObserver(this._resizeListener),this._adapter.initializeScrollObserver(this._scrollListener),this._detectScrollableStatus(),this._updateScrollState(),this._tryScrollActiveTabIntoView()):(this._adapter.destroyContainerSizeObserver(),this._adapter.destroyScrollObserver(this._scrollListener),this._adapter.setScrollButtons(this._scrollButtons),this._scrollButtonsVisible=!1)),this._adapter.setHostAttribute(T1.attributes.SCROLL_BUTTONS,String(this._scrollButtons)))}};var lb='<template><div class="forge-tab-bar" part="container"><div class="scroll-container" part="scroll-container"><slot></slot></div></div></template>',vb=":host{position:relative;display:block}:host([hidden]){display:none}.forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, space-between);--_tab-bar-stretch:var(--forge-tab-bar-stretch, 1);--_tab-bar-divider-color:var(--forge-tab-bar-divider-color, var(--forge-theme-outline, #e0e0e0));--_tab-bar-divider-thickness:var(--forge-tab-bar-divider-thickness, 1px)}.forge-tab-bar{position:relative;display:grid;grid-template-columns:auto 1fr auto;max-width:100%;max-height:100%;align-items:center;border-bottom:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color)}.scroll-container{position:relative;display:flex;justify-content:var(--_tab-bar-justify);align-items:flex-end;box-sizing:border-box;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;grid-column:2}.scroll-container::-webkit-scrollbar{display:none}::slotted(*){flex:var(--_tab-bar-stretch);align-self:stretch}::slotted([selected]){z-index:1}forge-icon-button{--forge-icon-button-shape-squared:0px}:host([vertical]) .forge-tab-bar{grid-template-columns:none;grid-template-rows:auto 1fr auto;align-items:initial;border-bottom:none;border-right:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color);height:100%}:host([vertical]) .scroll-container{display:inline-flex;flex-direction:column;align-items:stretch;gap:0;grid-column:auto;grid-row:2}:host([vertical]) .scroll-button{justify-self:center}:host([inverted]:not([vertical])) .forge-tab-bar{border-bottom:none;border-top:variale(divider-thickness) solid var(--_tab-bar-divider-color)}:host([inverted][vertical]) .forge-tab-bar{border-bottom:none;border-top:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color)}:host([clustered]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-start);--_tab-bar-stretch:var(--forge-tab-bar-stretch, 0)}:host([clustered=start]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-start)}:host([clustered=center]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, center)}:host([clustered=end]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-end)}",Mt=class extends L1(H1(M)){static get observedAttributes(){return Object.values(T1.observedAttributes)}constructor(){super(),q.define([s0,fe,Go,i0]),H(this,lb,vb),this._core=new Cl(new El(this))}connectedCallback(){this[P]({role:"tablist"},{setAttribute:!0}),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case T1.observedAttributes.DISABLED:this.disabled=p(a);break;case T1.observedAttributes.ACTIVE_TAB:this.activeTab=a?W(a):void 0;break;case T1.observedAttributes.VERTICAL:this.vertical=p(a);break;case T1.observedAttributes.CLUSTERED:this.clustered=p(a);break;case T1.observedAttributes.STACKED:this.stacked=p(a);break;case T1.observedAttributes.SECONDARY:this.secondary=p(a);break;case T1.observedAttributes.INVERTED:this.inverted=p(a);break;case T1.observedAttributes.AUTO_ACTIVATE:this.autoActivate=p(a);break;case T1.observedAttributes.SCROLL_BUTTONS:this.scrollButtons=p(a);break}}};s([v()],Mt.prototype,"disabled",2),s([v()],Mt.prototype,"activeTab",2),s([v()],Mt.prototype,"vertical",2),s([v()],Mt.prototype,"clustered",2),s([v()],Mt.prototype,"stacked",2),s([v()],Mt.prototype,"secondary",2),s([v()],Mt.prototype,"inverted",2),s([v()],Mt.prototype,"autoActivate",2),s([v()],Mt.prototype,"scrollButtons",2),Mt=s([y({name:T1.elementName,dependencies:[kt,n1,X]})],Mt);function V6(){x(Mt)}var Cr=`${b}time-picker`,E6={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},hb={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${E6.TOGGLE}]`},cb={OPEN:`${Cr}-open`,CLOSE:`${Cr}-close`,INPUT:`${Cr}-input`,CHANGE:`${Cr}-change`},pb={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},U={elementName:Cr,attributes:E6,selectors:hb,events:cb,numbers:pb};var zl=class extends I{constructor(t){super(t)}get inputElement(){return this._inputElement}initialize(){this._inputElement=this._component.querySelector(U.selectors.INPUT)}initializeMask(t){this.destroyMask(),this._inputElement&&(this._inputMask=new dn(this._inputElement,t))}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){var t;(t=this._inputMask)==null||t.destroy(),this._inputMask=void 0}initializeAccessibility(t){var e,a,o,n,i,l,h,c,d;(e=this._inputElement)==null||e.setAttribute("autocomplete","off"),(a=this._inputElement)==null||a.setAttribute("autocorrect","off"),(o=this._inputElement)==null||o.setAttribute("autocapitalize","off"),(n=this._inputElement)==null||n.setAttribute("spellcheck","false"),(i=this._inputElement)==null||i.setAttribute("role","combobox"),(l=this._inputElement)==null||l.setAttribute("aria-live","assertive"),(h=this._inputElement)==null||h.setAttribute("aria-atomic","true"),(c=this._inputElement)==null||c.setAttribute("aria-haspopup","true"),(d=this._inputElement)==null||d.setAttribute("aria-expanded","false"),Oe(),this._inputElement&&Zt(this._inputElement)}addInputListener(t,e,a){var o;(o=this._inputElement)==null||o.addEventListener(t,e,{capture:a})}removeInputListener(t,e,a){var o;(o=this._inputElement)==null||o.removeEventListener(t,e,{capture:a})}addToggleListener(t,e){this._toggleElement&&this._toggleElement.addEventListener(t,e)}removeToggleListener(t,e){this._toggleElement&&this._toggleElement.removeEventListener(t,e)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let t=this._component.querySelector(V1.elementName),e=this._component.querySelector(U.selectors.TOGGLE);if(t){let a=t.querySelector(`${J.elementName}[slot=trailing]`);if(a||e){this._toggleElement=a||e;return}let o=document.createElement(J.elementName);o.slot="trailing",o.density="medium",o.type="button",o.tabIndex=-1,o.style.marginRight="4px",o.setAttribute("aria-label","Toggle time dropdown");let n=document.createElement(h1.elementName);n.name="clock_outline",o.appendChild(n),t.appendChild(o),this._toggleElement=o}else e&&(this._toggleElement=e)}tryFocusInput(){var t;(t=this._inputElement)==null||t.select()}tryBlurInput(){var t;(t=this._inputElement)==null||t.blur()}selectInputText(){var t;(t=this._inputElement)==null||t.select()}isInputDisabled(){var t,e;return(e=(t=this._inputElement)==null?void 0:t.disabled)!=null?e:!1}isInputFocused(){return Se(this._component.ownerDocument)===this._inputElement}setInputValue(t,e){var a;((a=this._inputElement)==null?void 0:a.value)!==t&&(this._inputElement&&(this._inputElement.value=t),this._inputMask&&this._inputMask.update(),e&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){var t,e;return this._inputMask?this._inputMask.maskedValue:(e=(t=this._inputElement)==null?void 0:t.value)!=null?e:""}setDisabled(t){this._inputElement&&(this._inputElement.disabled=t,this._inputElement.setAttribute("aria-disabled",t.toString())),this.setToggleDisabled(t)}attachDropdown(t){var e;this._targetElement||(this._targetElement=this._getTargetElement(this._component.popupTarget)),this._listDropdown=new Pe(this._targetElement,t),this._listDropdown.open(),(e=this._inputElement)==null||e.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`)}async detachDropdown({destroy:t=!1}={}){this._listDropdown&&(t?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0),this._inputElement&&Zt(this._inputElement)}propagateKey(t){var e;(e=this._listDropdown)==null||e.handleKey(t)}setActiveDescendant(t){this._inputElement&&K(this._inputElement,!!t,"aria-activedescendant",t)}getTargetElementWidth(t){return this._getTargetElement(t).getBoundingClientRect().width}_emitInputEvent(t){var e;(e=this._inputElement)==null||e.dispatchEvent(new Event(t))}emitInputEvent(t,e){this._inputElement&&o0(this._inputElement,t,e)}setInputReadonly(t){this._inputElement&&(this._inputElement.readOnly=t)}setToggleDisabled(t){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",t.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=t;else{let e=this._toggleElement.querySelector("button");e&&(e.disabled=t)}}hasActiveOption(){var t,e;return((e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:-1)>=0}activateOptionByIndex(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}getActiveOption(){var t;return(t=this._listDropdown)==null?void 0:t.getActiveOption()}_getTargetElement(t){return this._targetElement?this._targetElement:(this._targetElement=t?this._component.querySelector(t)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){var e;let t=this._component.querySelector(V1.elementName);return(e=t==null?void 0:t.popoverTargetElement)!=null?e:this._component}};function Al(r,t,e){if(!r||/^\s*$/.test(r))return null;let a=0,o=0,n=0;if($a.test(r)){let i=I3(r);a=+i.hours||0,o=+i.minutes||0,n=+i.seconds||0}else if(an.test(r)){let i=V3(r);a=+i.hours||0,o=+i.minutes||0,n=+i.seconds||0,a===12&&i.meridiem==="AM"&&(a=0),a<12&&i.meridiem==="PM"&&(a+=12)}else return null;return A6(a)+Tl(o)+(e?l5(n):0)}function Yt(r,t,e){if(typeof r!="number"||r<0)return null;let a=Math.min(C6(r),23),o=Math.min(z6(r),59),i=r/(1e3*60)<720?"AM":"PM";t||(a=a<=12?a:a-12,a===0&&(a=12));let l=`${String(a).padStart(2,"0")}:${String(o).padStart(2,"0")}`;if(e){let h=Math.min(s5(r),59);l+=`:${String(h).padStart(2,"0")}`}return t||(l+=` ${i}`),l}function C6(r){return Math.abs(Math.floor(r/(1e3*60*60)))}function z6(r){return Math.abs(Math.floor(Bl(r)%60))}function Bl(r){return r/(1e3*60)}function s5(r){return Math.abs(Math.floor(db(r)%60))}function db(r){return r/1e3}function A6(r){return r*60*60*1e3}function Tl(r){return r*60*1e3}function l5(r){return r*1e3}function B6(r){return r-l5(s5(r))}function v5(r){let t=new Date,e=t.getHours(),a=t.getMinutes();return A6(e)+Tl(a)+(r?l5(t.getSeconds()):0)}function KV1(r,t,e=!1){r||(r=new Date);let a=Al(t,!0,e);if(!a)return r.setHours(0,0,0),r;let o=C6(a),n=828e5;o>n?o=n:o<0&&(o=0);let i=z6(a),l=e?s5(a):0;return r.setHours(o,i,l),r}var Sl=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=U.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=P2(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}destroy(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown({destroy:!0}),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){var e,a;if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeDropdown({emitCloseEvent:!0}));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption():(this._openDropdown(),typeof((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0?this._adapter.activateOptionByIndex((a=this._dropdownConfig)==null?void 0:a.visibleStartIndex):this._adapter.activateFirstOption()));break;case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&(this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption()));break;case"Enter":case"NumpadEnter":case"Home":case"End":this._open&&((t.code==="Enter"||t.code==="NumpadEnter")&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":t.preventDefault();let o=v5(this._allowSeconds);if(this._value!==o){let n=Yt(o,!0,this._allowSeconds);this._emitChangeEvent(n)&&(this._applyValue(o),this._selectInputText())}break}}_trySetActiveOption(){var t,e;!this._adapter.hasActiveOption()&&typeof((t=this._dropdownConfig)==null?void 0:t.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0&&this._adapter.activateOptionByIndex((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown({emitCloseEvent:!0}):($2.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._allowInput&&this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown({emitCloseEvent:!0})}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){this._adapter.destroyMask();let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:Ae(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown({emitCloseEvent:!0})}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=Yt(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(B6(this._value)),this._isInitialized&&t!==this._value){let e=Yt(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown({emitCloseEvent:!0}),t=C3(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let a;!this._masked&&typeof this._parseCallback=="function"?a=this._parseCallback.call(null,t):a=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),a=this._validateMillis(a),this._trySetValue(a)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(U.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=Yt(t,!0,this._allowSeconds);return this._adapter.emitInputEvent(U.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){if(typeof t=="number"){let e=typeof this._min=="number"&&t<this._min,a=typeof this._max=="number"&&t>this._max;(e||a)&&(t=null)}return typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):E3(t)}_isValidInputValue(t){return $a.test(t)}_onSelect(t){if(this._closeDropdown({emitCloseEvent:!0}),!t.isCustom&&t.metadata==="now"&&(t.time=v5(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let o=t.customCallback.call(null,t.metadata);if(typeof o!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=o}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=Yt(t.time,!0,this._allowSeconds);this._emitChangeEvent(e)&&(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let a=this._formatValue(this._value);this._adapter.getInputValue()!==a&&this._adapter.setInputValue(a,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>U.numbers.MAX_DAY_MILLIS?U.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length||!this._adapter.inputElement)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(U.attributes.OPEN);let e=t.filter(n=>!n.divider&&!n.disabled),a=[],o=0;if(t.length)if(this._value!=null){let n=this._findClosestOptionIndex(this._value,e);n>=0&&(e[n].value.time===this._value?a=[e[n].value]:o=n)}else if(typeof this._startTime=="number"){let n=this._findClosestOptionIndex(this._startTime,e);n>=0&&n<e.length&&(o=n)}else this._startTime==null&&(o=this._getOptionIndexClosestCurrent(e));this._dropdownConfig={id:`forge-time-picker-${this._identifier}`,referenceElement:this._adapter.inputElement,selectedValues:a,syncWidth:!0,visibleStartIndex:o,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:n=>this._onSelect(n),closeCallback:()=>this._closeDropdown({emitCloseEvent:!0}),activeChangeCallback:n=>this._adapter.setActiveDescendant(n),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)},this._adapter.attachDropdown(this._dropdownConfig),this._adapter.emitHostEvent(U.events.OPEN,void 0,!1)}_closeDropdown({destroy:t=!1,emitCloseEvent:e=!1}={}){this._open=!1,this._dropdownConfig=void 0,this._adapter.removeHostAttribute(U.attributes.OPEN),this._adapter.detachDropdown({destroy:t}),e&&this._adapter.emitHostEvent(U.events.CLOSE,!0,!1)}_getOptionIndexClosestCurrent(t){let e=new Date,a=`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,o=Al(a,!0,!1);return this._findClosestOptionIndex(o,t)}_findClosestOptionIndex(t,e){let a=e.reduce((o,n)=>Math.abs((n.value.time||0)-t)<Math.abs((o.value.time||0)-t)?n:o);return e.indexOf(a)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let a=this._formatValue(this._value);e!==a&&(this._adapter.setInputValue(a,t),this._adapter.emitInputEvent(U.events.INPUT,a))}_generateTimeOptions(){let t=this._min!=null?Math.max(Bl(this._min),0):0,e=this._max!=null?Math.min(Bl(this._max),U.numbers.MAX_DAY_MINUTES):U.numbers.MAX_DAY_MINUTES,a=this._step,o=[],n=[];if(this._showHourOptions){for(let l=t;l<=e&&l!==U.numbers.MAX_DAY_MINUTES;l+=a){let h=Tl(l),c=this._restrictedTimes.includes(h),d=Yt(h,this._use24HourTime,!1)||"",u={time:h};o.push({label:d,value:u,disabled:c})}let i=o.findIndex(l=>l.value.time/1e3/60>=720);i>=0&&i<o.length-1&&o.splice(i,0,{label:"",value:null,divider:!0})}if(this._showNow){let i={time:null,metadata:"now"};n.push({label:"Now",value:i})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let i=this._customOptions.map(l=>{let h={time:null,metadata:l.value,isCustom:!0,customCallback:l.toMilliseconds};return{label:l.label,value:h}});n=[...n,...i]}return n.length&&(o.length&&o.splice(0,0,{label:"",value:null,divider:!0}),n.forEach((i,l)=>o.splice(l,0,i))),o}_convertTimeStringToMillis(t,e,a){return(!t||!this._isValidTimeFormat(t))&&(t=""),Al(t,e,a)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):Yt(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(U.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(U.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(U.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return Yt(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return Yt(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get max(){return Yt(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get restrictedTimes(){return this._restrictedTimes.map(t=>Yt(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return Yt(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(U.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var mb="<template><slot></slot></template>",gb=":host{display:block}:host([hidden]){display:none}",O1=class extends M{static get observedAttributes(){return[U.attributes.VALUE,U.attributes.OPEN,U.attributes.ALLOW_SECONDS,U.attributes.MASKED,U.attributes.SHOW_MASK_FORMAT,U.attributes.USE_24_HOUR_TIME,U.attributes.ALLOW_INVALID_TIME,U.attributes.MIN,U.attributes.MAX,U.attributes.START_TIME,U.attributes.STEP,U.attributes.ALLOW_INPUT,U.attributes.SHOW_NOW,U.attributes.SHOW_HOUR_OPTIONS,U.attributes.DISABLED,U.attributes.POPUP_CLASSES,U.attributes.ALLOW_DROPDOWN]}constructor(){super(),q.define([Zd,Ya]),H(this,mb,gb),this._core=new Sl(new zl(this))}connectedCallback(){this.querySelector(U.selectors.INPUT)?this._core.initialize():I0(this,U.selectors.INPUT).then(()=>this._core.initialize())}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case U.attributes.VALUE:this.value=a;break;case U.attributes.OPEN:this.open=p(a);break;case U.attributes.ALLOW_SECONDS:this.allowSeconds=p(a);break;case U.attributes.MASKED:this.masked=p(a);break;case U.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=p(a);break;case U.attributes.USE_24_HOUR_TIME:this.use24HourTime=p(a);break;case U.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=p(a);break;case U.attributes.SHOW_NOW:this.showNow=p(a);break;case U.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=p(a);break;case U.attributes.MIN:this.min=a;break;case U.attributes.MAX:this.max=a;break;case U.attributes.START_TIME:this.startTime=a;break;case U.attributes.STEP:this.step=W(a);break;case U.attributes.ALLOW_INPUT:this.allowInput=p(a);break;case U.attributes.DISABLED:this.disabled=p(a);break;case U.attributes.POPUP_CLASSES:this.popupClasses=a;break;case U.attributes.ALLOW_DROPDOWN:this.allowDropdown=p(a);break}}};s([v()],O1.prototype,"value",2),s([v()],O1.prototype,"open",2),s([v()],O1.prototype,"allowSeconds",2),s([v()],O1.prototype,"masked",2),s([v()],O1.prototype,"showMaskFormat",2),s([v()],O1.prototype,"use24HourTime",2),s([v()],O1.prototype,"allowInvalidTime",2),s([v()],O1.prototype,"min",2),s([v()],O1.prototype,"max",2),s([v()],O1.prototype,"restrictedTimes",2),s([v()],O1.prototype,"startTime",2),s([v()],O1.prototype,"step",2),s([v()],O1.prototype,"allowInput",2),s([v()],O1.prototype,"showNow",2),s([v()],O1.prototype,"showHourOptions",2),s([v()],O1.prototype,"customOptions",2),s([v()],O1.prototype,"validationCallback",2),s([v()],O1.prototype,"parseCallback",2),s([v()],O1.prototype,"formatCallback",2),s([v()],O1.prototype,"coercionCallback",2),s([v()],O1.prototype,"prepareMaskCallback",2),s([v()],O1.prototype,"disabled",2),s([v()],O1.prototype,"popupClasses",2),s([v()],O1.prototype,"allowDropdown",2),s([v()],O1.prototype,"popupTarget",2),O1=s([y({name:U.elementName,dependencies:[h2,j1,n1,X,P1,X,E1]})],O1);var T6=class extends a2{constructor(t){super(t)}_build(){let t=document.createElement(U.elementName);return this._attachTextField(t),t}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.addEventListener(U.events.CHANGE,e=>{var a;return t((a=e.detail)!=null?a:"")})}onInput(t){this._element.addEventListener(U.events.INPUT,e=>{var a;return t((a=e.detail)!=null?a:"")})}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var a,o,n,i;let e={props:w({},(o=(a=this._config.options)==null?void 0:a.textFieldDelegateConfig)==null?void 0:o.props),options:w({},(i=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:i.options)};this._textFieldDelegate=new J0(e),t.appendChild(this._textFieldDelegate.element)}};function S6(){x(O1)}var h5=`${b}toast`,k6={OPEN:"open",DURATION:"duration",PLACEMENT:"placement",ACTION_TEXT:"action-text",DISMISSIBLE:"dismissible",DISMISS_LABEL:"dismiss-label",THEME:"theme"},wb=w({},k6),ub={ACTION:`${h5}-action`,CLOSE:`${h5}-close`},_b={EXITING:"exiting"},fb={SURFACE:".surface",ACTION_BUTTON:".action-button",CLOSE_BUTTON:".close-button"},xb={PLACEMENT:"bottom",DURATION:2750,THEME:"default"},B1={elementName:h5,observedAttributes:k6,attributes:wb,classes:_b,selectors:fb,defaults:xb,events:ub};var kl=class extends I{constructor(t){super(t),this._overlayElement=g(t,B.elementName),this._surfaceElement=g(t,B1.selectors.SURFACE),this._actionButtonElement=g(t,B1.selectors.ACTION_BUTTON),this._closeButtonElement=g(t,B1.selectors.CLOSE_BUTTON)}show(){this._overlayElement.open=!0}async hide(){await Rt(this._surfaceElement,B1.classes.EXITING),this._overlayElement.open=!1}addCloseListener(t){this._closeButtonElement.addEventListener("click",t)}removeCloseListener(t){this._closeButtonElement.removeEventListener("click",t)}addActionListener(t){this._actionButtonElement.addEventListener("click",t)}removeActionListener(t){this._actionButtonElement.removeEventListener("click",t)}setDismissLabel(t){this._closeButtonElement.setAttribute("aria-label",t)}setActionText(t){this._actionButtonElement.textContent=t,t?this._actionButtonElement.removeAttribute("hidden"):this._actionButtonElement.setAttribute("hidden","")}};var Ol=class{constructor(t){this._adapter=t;this._open=!1;this._duration=B1.defaults.DURATION;this._placement=B1.defaults.PLACEMENT;this._dismissible=!1;this._theme=B1.defaults.THEME;this._actionListener=this._onAction.bind(this);this._closeListener=this._onClose.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["duration","placement","dismissible"]),this._open&&this.show()}show(){this._adapter.show(),isFinite(this._duration)&&this._duration>0&&(this._hideTimeout&&window.clearTimeout(this._hideTimeout),this._hideTimeout=window.setTimeout(()=>this.hide(),this._duration)),this._open=!0,this._adapter.toggleHostAttribute(B1.attributes.OPEN,this._open)}async hide({dispatchEvent:t=!0}={}){this._hideTimeout&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=void 0),await this._adapter.hide(),this._open=!1,this._adapter.toggleHostAttribute(B1.attributes.OPEN,this._open),t&&this._adapter.dispatchHostEvent(new CustomEvent(B1.events.CLOSE,{bubbles:!0}))}_onAction(t){t.stopPropagation(),this._adapter.dispatchHostEvent(new CustomEvent(B1.events.ACTION,{bubbles:!0}))}_onClose(t){this.hide()}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._adapter.isConnected?t?this.show():this.hide({dispatchEvent:!1}):this._open=t,this._adapter.toggleHostAttribute(B1.attributes.OPEN,this._open))}get duration(){return this._duration}set duration(t){this._duration!==t&&(this._duration=t,this._hideTimeout&&(window.clearTimeout(this._hideTimeout),isFinite(this._duration)&&this._duration>0&&(this._hideTimeout=window.setTimeout(()=>this.hide(),this._duration))))}get placement(){return this._placement}set placement(t){this._placement!==t&&(this._placement=t,this._adapter.setHostAttribute(B1.attributes.PLACEMENT,this._placement))}get actionText(){return this._actionText}set actionText(t){var e;t=(e=t==null?void 0:t.trim())!=null?e:"",this._actionText!==t&&(this._actionText=t,this._adapter.setActionText(this._actionText),this._actionText?this._adapter.addActionListener(this._actionListener):this._adapter.removeActionListener(this._actionListener),this._adapter.toggleHostAttribute(B1.attributes.ACTION_TEXT,!!this._actionText,this._actionText))}get dismissible(){return this._dismissible}set dismissible(t){t=!!t,this._dismissible!==t&&(this._dismissible=t,this._dismissible?this._adapter.addCloseListener(this._closeListener):this._adapter.removeCloseListener(this._closeListener),this._adapter.toggleHostAttribute(B1.attributes.DISMISSIBLE,this._dismissible))}get dismissLabel(){return this._dismissLabel}set dismissLabel(t){this._dismissLabel!==t&&(this._dismissLabel=t,this._adapter.setDismissLabel(this._dismissLabel))}get theme(){return this._theme}set theme(t){t!=null||(t=B1.defaults.THEME),this._theme!==t&&(this._theme=t,this._adapter.setHostAttribute(B1.attributes.THEME,this._theme))}};var bb='<template><forge-overlay exportparts="root:overlay" no-anchor persistent><div class="surface" part="surface"><slot name="icon"></slot><div class="message" part="message"><slot></slot></div><forge-button hidden part="action-button" class="action-button"></forge-button><forge-icon-button part="close-button" class="close-button" aria-label="Dismiss" density="medium"><forge-icon name="close"></forge-icon></forge-icon-button></div></forge-overlay></template>',yb='@keyframes slidein{from{transform:translateY(var(--_toast-slide-origin))}to{transform:translateY(0)}}@keyframes slideout{from{transform:translateY(0)}to{transform:translateY(var(--_toast-slide-origin))}}@keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadeout{from{opacity:1}to{opacity:0}}@layer base,open,theme,placement,media; @layer base{:host{display:contents}:host([hidden]){display:none}.surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-surface-inverse, #333333));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-surface-inverse, #ffffff));--_toast-offset:var(--forge-toast-offset, var(--forge-spacing-medium, 16px));--_toast-shape:var(--forge-toast-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_toast-elevation:var(--forge-toast-elevation, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12));--_toast-action-color:var(--forge-toast-action-color, var(--forge-theme-secondary, #ffc107));--_toast-min-width:var(--forge-toast-min-width, 344px);--_toast-max-width:var(--forge-toast-max-width, 672px);--_toast-min-height:var(--forge-toast-min-height, 48px);--_toast-inline-padding:var(--forge-toast-inline-padding, var(--forge-spacing-medium, 16px));--_toast-spacing:var(--forge-toast-spacing, var(--forge-spacing-xsmall, 8px));--_toast-message-padding:var(--forge-toast-message-padding, var(--forge-spacing-xsmall, 8px));--_toast-enter-duration:var(--forge-toast-enter-duration, var(--forge-animation-duration-medium1, 250ms));--_toast-enter-timing:var(--forge-toast-enter-timing, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_toast-exit-duration:var(--forge-toast-exit-duration, var(--forge-animation-duration-short4, 200ms));--_toast-exit-timing:var(--forge-toast-exit-timing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)));--_toast-slide-origin:var(--forge-toast-slide-origin, 100%)}.surface{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);position:fixed;display:flex;align-items:center;column-gap:var(--_toast-spacing);border-radius:var(--_toast-shape);padding-inline:var(--_toast-inline-padding);margin:var(--_toast-offset);min-width:var(--_toast-min-width);max-width:var(--_toast-max-width);min-height:var(--_toast-min-height);box-sizing:border-box;background:var(--_toast-background);color:var(--_toast-color);box-shadow:var(--_toast-elevation)}.message{flex-grow:1;padding-block:var(--_toast-message-padding);text-overflow:ellipsis;overflow:hidden}forge-button.action-button{--forge-button-primary-color:var(--_toast-action-color)}forge-icon-button.close-button{--forge-icon-button-focus-indicator-color:var(--_toast-color)}:host(:not([dismissible])) .close-button{display:none}.action-button:not([hidden]){margin-inline-end:-8px}:host([dismissible]) .close-button{margin-inline-end:-8px}}@layer theme{:host([theme=primary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-primary, #3f51b5));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-primary, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=secondary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-secondary, #ffc107));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-secondary, #000000));--_toast-action-color:var(--_toast-color)}:host([theme=tertiary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-tertiary, #3d5afe));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-tertiary, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=success]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-success, #2e7d32));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-success, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=warning]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-warning, #d14900));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-warning, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=error]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-error, #b00020));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-error, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=info]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-info, #1565c0));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-info, #ffffff));--_toast-action-color:var(--_toast-color)}}@layer open{forge-overlay[open] .surface{animation-name:slidein;animation-duration:var(--_toast-enter-duration);animation-timing-function:var(--_toast-enter-timing)}forge-overlay[open] .surface.exiting{animation-name:slideout;animation-duration:var(--_toast-exit-duration);animation-timing-function:var(--_toast-exit-timing)}}@layer placement{:host([placement=bottom-start]) .surface{bottom:0;left:0}:host(:is(:not([placement]),[placement=bottom])) .surface{bottom:0;left:50%;translate:-50%}:host([placement=bottom-end]) .surface{bottom:0;right:0}:host([placement=top-start]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;left:0}:host([placement=top]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;left:50%;translate:-50%}:host([placement=top-end]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;right:0}}@layer media{@media (prefers-reduced-motion:reduce){forge-overlay[open] .surface{animation-name:fadein}forge-overlay[open] .surface.exiting{animation-name:fadeout}}@media (max-width:599px){:host([placement^=top]) .surface{bottom:auto;top:0}.surface{bottom:0;left:0;right:0;margin:0;translate:none;max-width:none;min-width:auto;border-radius:0}}}',Kt=class extends H1(L1(M)){static get observedAttributes(){return Object.values(B1.observedAttributes)}constructor(){super(),q.define(Ya),H(this,bb,yb),this._core=new Ol(new kl(this))}connectedCallback(){this.hasAttribute("role")||this.getAttribute("aria-hidden")==="true"||this[P]({role:"alert",ariaLive:"assertive",ariaAtomic:"true"}),this._core.initialize()}attributeChangedCallback(t,e,a){switch(t){case B1.attributes.OPEN:this.open=p(a);break;case B1.attributes.DURATION:let o=Number(a);this.duration=o&&o>0?o:B1.defaults.DURATION;break;case B1.attributes.PLACEMENT:this.placement=a||B1.defaults.PLACEMENT;break;case B1.attributes.ACTION_TEXT:this.actionText=a;break;case B1.attributes.DISMISSIBLE:this.dismissible=p(a);break;case B1.attributes.DISMISS_LABEL:this.dismissLabel=a;break;case B1.attributes.THEME:this.theme=a;break}}show(){this._core.show()}hide(){return this._core.hide()}static present(l){var h=l,{message:t,element:e,icon:a,className:o,topLayer:n}=h,i=Pa(h,["message","element","icon","className","topLayer"]);let c=document.createElement(B1.elementName);if(e?c.appendChild(e):t&&c.append(t),a){let u=document.createElement("forge-icon");Object.assign(u,a),u.slot="icon",c.appendChild(u)}if(o){let u=Array.isArray(o)?o:[o];c.classList.add(...u)}return i&&Object.assign(c,i),(n&&Array.from(E1[w0]).at(-1)||document.body).appendChild(c),c.open=!0,c.addEventListener(B1.events.CLOSE,()=>c.remove()),c}};s([v()],Kt.prototype,"open",2),s([v()],Kt.prototype,"duration",2),s([v()],Kt.prototype,"placement",2),s([v()],Kt.prototype,"actionText",2),s([v()],Kt.prototype,"dismissible",2),s([v()],Kt.prototype,"dismissLabel",2),s([v()],Kt.prototype,"theme",2),Kt=s([y({name:B1.elementName,dependencies:[d2,V2,n1,X]})],Kt);function O6(){x(Kt)}var Mb=`${b}view-switcher`,c5={ROOT:"forge-view-switcher",VIEW_HIDDEN:"forge-view-switcher__view--hidden",VIEW_SWITCHER_SLIDE:"slide",VIEW_SWITCHER_FADE:"fade"},Hb={ROOT:`.${c5.ROOT}`,DEFAULT_SLOT:"slot:not([name])",VIEW_HIDDEN:`.${c5.VIEW_HIDDEN}`},Lb={INDEX:"index",ANIMATION_TYPE:"animation-type"},Ib={DEFAULT_TRANSITION_DURATION:500},e2={elementName:Mb,attributes:Lb,classes:c5,selectors:Hb,numbers:Ib},p5=(e=>(e.Left="left",e.Right="right",e))(p5||{}),Vb=(a=>(a.None="none",a.Slide="slide",a.Fade="fade",a))(Vb||{});var Dl=class extends I{constructor(t){super(t),this._rootElement=g(t,e2.selectors.ROOT),this._slotElement=g(t,e2.selectors.DEFAULT_SLOT)}getViewCount(){return this._getViews().length}startViewObserver(t){this._viewObserver=new MutationObserver(t),this._viewObserver.observe(this._component,{childList:!0})}stopViewObserver(){var t;(t=this._viewObserver)==null||t.disconnect()}initializeSlideViews(t){let e=this._getViews();e.forEach((a,o)=>{if(a.style.removeProperty("opacity"),a.style.removeProperty("display"),o===t){e[t].classList.remove(e2.classes.VIEW_HIDDEN),a.style.removeProperty("visibility");return}a.style.transition="none",a.classList.add(e2.classes.VIEW_HIDDEN),a.style.visibility="hidden",o>t?a.style.transform="translate3d(100%, 0, 0)":a.style.transform="translate3d(-100%, 0, 0)"}),window.requestAnimationFrame(()=>{e=this._getViews(),e.forEach((a,o)=>{o!==t&&a.style.removeProperty("transition")})})}initializeFadeViews(t){let e=this._getViews();e.forEach((a,o)=>{if(a.style.removeProperty("transform"),a.style.removeProperty("display"),o===t){a.classList.remove(e2.classes.VIEW_HIDDEN),a.style.removeProperty("visibility");return}a.classList.add(e2.classes.VIEW_HIDDEN),a.style.visibility="hidden"}),e[t]&&(e[t].style.opacity="1")}setActiveView(t){let e=this._getViews();e.forEach((a,o)=>{o!==t&&(a.classList.add(e2.classes.VIEW_HIDDEN),a.style.display="none")}),e[t]&&(e[t].classList.remove(e2.classes.VIEW_HIDDEN),e[t].style.removeProperty("display"))}hideInactiveViews(t){this._getViews().forEach((a,o)=>{if(a.style.removeProperty("opacity"),a.style.removeProperty("transform"),a.style.removeProperty("visibility"),o===t){a.classList.remove(e2.classes.VIEW_HIDDEN);return}a.classList.add(e2.classes.VIEW_HIDDEN),a.style.display="none"})}async transitionToView(t,e,a,o){let n=this._getViews(),i=n[t],l=n[e];return new Promise(h=>{l.style.removeProperty("visibility"),window.requestAnimationFrame(()=>{let c;switch(a){case"slide":this._slideToView(i,l,o),c="transform";break;case"fade":this._fadeToView(i,l),c="opacity";break;default:return}this._animateHeight(i,l),i?i.addEventListener("transitionend",d):l.classList.remove(e2.classes.VIEW_HIDDEN);function d(u){u.propertyName===c&&(i.removeEventListener("transitionend",d),l.classList.remove(e2.classes.VIEW_HIDDEN),h())}})})}_slideToView(t,e,a){a==="left"?(t&&(t.style.transform="translate3d(-100%, 0, 0)"),e.style.transform="translate3d(0, 0, 0)"):(t&&(t.style.transform="translate3d(100%, 0, 0)"),e.style.transform="translate3d(0, 0, 0)")}_fadeToView(t,e){t&&(t.style.opacity="0"),e.style.opacity="1"}_animateHeight(t,e){let a=t?this._getViewHeight(t):0,o=this._getViewHeight(e);a!==o&&(this._rootElement.addEventListener("transitionend",this._onRootTransitionEnd.bind(this)),this._setHeight(a),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._setHeight(o)})}))}_onRootTransitionEnd(t){t.propertyName==="height"&&(this._rootElement.removeEventListener("transitionend",this._onRootTransitionEnd),this._rootElement.style.removeProperty("height"))}setAnimationType(t){switch(we([e2.classes.VIEW_SWITCHER_SLIDE,e2.classes.VIEW_SWITCHER_FADE],this._component),t){case"slide":this._component.classList.add(e2.classes.VIEW_SWITCHER_SLIDE);break;case"fade":this._component.classList.add(e2.classes.VIEW_SWITCHER_FADE);break}}_getViews(){return this._slotElement.assignedNodes().filter(t=>t.nodeType===1)}_setHeight(t){this._rootElement.style.height=`${t}px`}_getViewHeight(t){let e=0,a=t.children.length?Array.from(t.children):[t];for(let o of a){let n=window.getComputedStyle(o),i=parseFloat(n.marginTop)+parseFloat(n.marginBottom);e+=Math.ceil(o.offsetHeight+i)}return e}};var Pl=class{constructor(t){this._adapter=t;this._viewCount=0;this._viewIndex=0;this._animationType="none";this._viewsChangedListener=()=>this._onViewsChanged()}initialize(){this._viewCount=this._adapter.getViewCount(),this._adapter.startViewObserver(this._viewsChangedListener),this._adapter.setAnimationType(this._animationType),this._viewCount&&this._initializeAnimationType()}destroy(){this._adapter.stopViewObserver()}_initializeAnimationType(){switch(this._animationType){case"slide":this._adapter.initializeSlideViews(this._viewIndex);break;case"fade":this._adapter.initializeFadeViews(this._viewIndex);break;case"none":default:this._adapter.hideInactiveViews(this._viewIndex);break}}_onViewsChanged(){if(this._viewCount=this._adapter.getViewCount(),this._viewCount===0&&(this._viewIndex=0),this._viewCount&&this._initializeAnimationType(),this._viewCount>0&&this._viewIndex>=this._viewCount){let t=this._viewIndex;this._viewIndex=this._viewCount>0?this._viewCount-1:0,this._goToView(t,this._viewCount)}}async _goToView(t,e){if(this._viewCount=k(e)?e:this._adapter.getViewCount(),!(!(this._viewIndex>=0&&this._viewIndex<=this._viewCount-1)||t===this._clampedViewIndex(this._viewIndex,this._viewCount)))switch(this._animationType){case"slide":let o=this._viewIndex>t?"left":"right";await this._adapter.transitionToView(t,this._viewIndex,"slide",o),this._adapter.initializeSlideViews(this._viewIndex);break;case"fade":await this._adapter.transitionToView(t,this._viewIndex,"fade"),this._adapter.initializeFadeViews(this._viewIndex);break;case"none":default:this._adapter.setActiveView(this._viewIndex);break}}_clampedViewIndex(t,e){return t<0?t=0:t>e-1&&(t=e>0?e-1:0),t}next(){this.index++}previous(){this.index--}goToStart(){this.index=0}goToEnd(){this.index=this._viewCount-1}get index(){return this._viewIndex}set index(t){if(this._viewIndex!==t){let e=this._viewIndex;this._viewIndex=t,this._goToView(e),this._adapter.setHostAttribute(e2.attributes.INDEX,this._viewIndex.toString())}}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._initializeAnimationType(),this._adapter.setAnimationType(this._animationType),this._adapter.setHostAttribute(e2.attributes.ANIMATION_TYPE,this._animationType))}};var Eb=`${b}view`,D6={elementName:Eb};var Cb="<template><slot></slot></template>",zb=":host{display:block}:host([hidden]){display:none}",la=class extends M{constructor(){super(),H(this,Cb,zb)}};la=s([y({name:D6.elementName})],la);var Ab='<template><div class="forge-view-switcher" part="root"><slot></slot></div></template>',Bb=":host{height:var(--_view-switcher-height);width:var(--_view-switcher-width);display:block}:host([hidden]){display:none}.forge-view-switcher{--_view-switcher-height:var(--forge-view-switcher-height, auto);--_view-switcher-width:var(--forge-view-switcher-width, auto);--_view-switcher-animation-duration:var(--forge-view-switcher-animation-duration, var(--forge-animation-duration-medium2, 300ms));--_view-switcher-animation-easing:var(--forge-view-switcher-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-view-switcher{height:var(--_view-switcher-height);width:var(--_view-switcher-width);position:relative;overflow:hidden;transition-property:height;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing)}.forge-view-switcher ::slotted(.forge-view-switcher__view--hidden){position:absolute;top:0;right:0;bottom:0;left:0}:host(.slide) ::slotted(forge-view){transition-property:transform;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing);will-change:transform}:host(.fade) ::slotted(forge-view){transition-property:opacity;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing);will-change:opacity}:host(.fade) ::slotted(.forge-view-switcher__view--hidden){opacity:0}",va=class extends M{static get observedAttributes(){return[e2.attributes.INDEX,e2.attributes.ANIMATION_TYPE]}constructor(){super(),H(this,Ab,Bb),this._core=new Pl(new Dl(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case e2.attributes.INDEX:this.index=W(a);break;case e2.attributes.ANIMATION_TYPE:this.animationType=a;break}}next(){this._core.next()}previous(){this._core.previous()}goToStart(){this._core.goToStart()}goToEnd(){this._core.goToEnd()}};s([v()],va.prototype,"index",2),s([v()],va.prototype,"animationType",2),va=s([y({name:e2.elementName,dependencies:[la]})],va);function P6(){x(la)}function N6(){x(va)}var Tb=`${b}deprecated-button`,Sb={TYPE:"type",DISABLED:"disabled",FULL_WIDTH:"full-width"},kb={BUTTON:"button,a"},Ot={elementName:Tb,attributes:Sb,selectors:kb};var Ob='<template><slot></slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></template>',Db=':host{--_button-primary-color:var(--forge-button-primary-color, var(--forge-theme-primary, #3f51b5));--_button-text-color:var(--forge-button-text-color, var(--_button-primary-color));--_button-disabled-color:var(--forge-button-disabled-color, var(--forge-theme-surface-container, #e0e0e0));--_button-padding:var(--forge-button-padding, var(--forge-spacing-medium, 16px));--_button-display:var(--forge-button-display, inline-flex);--_button-justify:var(--forge-button-justify, center);--_button-shape:var(--forge-button-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_button-height:var(--forge-button-height, 36px);--_button-min-width:var(--forge-button-min-width, 64px);--_button-spacing:var(--forge-button-spacing, var(--forge-spacing-xsmall, 8px));--_button-border-width:var(--forge-button-border-width, medium);--_button-border-style:var(--forge-button-border-style, none);--_button-border-color:var(--forge-button-border-color, currentColor);--_button-shape-start-start-radius:var(--forge-button-shape-start-start-radius, var(--_button-shape));--_button-shape-start-end-radius:var(--forge-button-shape-start-end-radius, var(--_button-shape));--_button-shape-end-start-radius:var(--forge-button-shape-end-start-radius, var(--_button-shape));--_button-shape-end-end-radius:var(--forge-button-shape-end-end-radius, var(--_button-shape));--_button-padding-block:var(--forge-button-padding-block, var(--_button-padding));--_button-padding-inline:var(--forge-button-padding-inline, var(--_button-padding));--_button-background:var(--forge-button-background, transparent);--_button-hover-background:var(--forge-button-hover-background, var(--_button-background));--_button-active-background:var(--forge-button-active-background, var(--_button-background));--_button-color:var(--forge-button-color, var(--_button-text-color));--_button-icon-size:var(--forge-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125));--_button-shadow:var(--forge-button-shadow, none);--_button-hover-shadow:var(--forge-button-hover-shadow, none);--_button-active-shadow:var(--forge-button-active-shadow, none);--_button-cursor:var(--forge-button-cursor, pointer);--_button-transition-duration:var(--forge-button-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-transition-timing:var(--forge-button-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-text-padding-inline:var(--forge-button-text-padding-inline, var(--forge-spacing-xsmall, 8px));--_button-outlined-background:var(--forge-button-outlined-background, transparent);--_button-outlined-color:var(--forge-button-outlined-color, var(--_button-primary-color));--_button-outlined-border-width:var(--forge-button-outlined-border-width, var(--forge-border-thin, 1px));--_button-outlined-border-style:var(--forge-button-outlined-border-style, solid);--_button-outlined-border-color:var(--forge-button-outlined-border-color, var(--_button-primary-color));--_button-tonal-background:var(--forge-button-tonal-background, var(--forge-theme-primary-container, #d1d5ed));--_button-tonal-disabled-background:var(--forge-button-tonal-disabled-background, var(--_button-disabled-color));--_button-tonal-color:var(--forge-button-tonal-color, var(--forge-theme-on-primary-container, #222c62));--_button-tonal-disabled-color:var(--forge-button-tonal-disabled-color, var(--_button-disabled-text-color));--_button-filled-background:var(--forge-button-filled-background, var(--_button-primary-color));--_button-filled-disabled-background:var(--forge-button-filled-disabled-background, var(--_button-disabled-color));--_button-filled-color:var(--forge-button-filled-color, var(--forge-theme-on-primary, #ffffff));--_button-filled-disabled-color:var(--forge-button-filled-disabled-color, var(--_button-disabled-text-color));--_button-raised-background:var(--forge-button-raised-background, var(--_button-primary-color));--_button-raised-disabled-background:var(--forge-button-raised-disabled-background, var(--_button-disabled-color));--_button-raised-color:var(--forge-button-raised-color, var(--forge-theme-on-primary, #ffffff));--_button-raised-disabled-color:var(--forge-button-raised-disabled-color, var(--_button-disabled-text-color));--_button-raised-shadow:var(--forge-button-raised-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_button-raised-hover-shadow:var(--forge-button-raised-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_button-raised-active-shadow:var(--forge-button-raised-active-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12));--_button-raised-disabled-shadow:var(--forge-button-raised-disabled-shadow, none);--_button-link-color:var(--forge-button-link-color, var(--_button-primary-color));--_button-link-text-decoration:var(--forge-button-link-text-decoration, underline);--_button-link-height:var(--forge-button-link-height, auto);--_button-link-padding:var(--forge-button-link-padding, 0);--_button-link-line-height:var(--forge-button-link-line-height, normal);--_button-link-width:var(--forge-button-link-width, auto);--_button-link-hover-text-decoration:var(--forge-button-link-hover-text-decoration, none);--_button-link-active-opacity:var(--forge-button-link-active-opacity, 0.65);--_button-link-transition-duration:var(--forge-button-link-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-link-transition-timing:var(--forge-button-link-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-disabled-cursor:var(--forge-button-disabled-cursor, not-allowed);--_button-disabled-text-color:var(--forge-button-disabled-text-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_button-disabled-background:var(--forge-button-disabled-background, transparent);--_button-disabled-border-color:var(--forge-button-disabled-border-color, var(--_button-disabled-color));--_button-disabled-shadow:var(--forge-button-disabled-shadow, none);--_button-dense-height:var(--forge-button-dense-height, 24px);--_button-pill-shape:var(--forge-button-pill-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_button-pill-padding-inline:var(--forge-button-pill-padding-inline, var(--forge-spacing-small, 12px));--_button-focus-indicator-offset:var(--forge-button-focus-indicator-offset, 4px);--_button-text-focus-indicator-offset:var(--forge-button-text-focus-indicator-offset, 0px);--_button-link-focus-indicator-offset:var(--forge-button-link-focus-indicator-offset, 2px);--_button-popover-icon-transition-duration:var(--forge-button-popover-icon-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-popover-icon-transition-timing:var(--forge-button-popover-icon-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-popover-icon-open-rotation:var(--forge-button-popover-icon-open-rotation, 180deg)}:host{display:var(--_button-display);position:relative;outline:0;vertical-align:middle;-webkit-tap-highlight-color:transparent;border-radius:var(--_button-shape)}:host([hidden]){display:none}::slotted(:is(button,a)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:var(--_button-display);align-items:center;justify-content:var(--_button-justify);gap:var(--_button-spacing);z-index:0;box-sizing:border-box;min-inline-size:var(--_button-min-width);height:var(--_button-height);inline-size:100%;border-width:var(--_button-border-width);border-style:var(--_button-border-style);border-color:var(--_button-border-color);border-start-start-radius:var(--_button-shape-start-start-radius);border-start-end-radius:var(--_button-shape-start-end-radius);border-end-start-radius:var(--_button-shape-end-start-radius);border-end-end-radius:var(--_button-shape-end-end-radius);padding-block:var(--_button-padding-block);padding-inline:var(--_button-padding-inline);box-shadow:var(--_button-shadow);outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;text-decoration:none;white-space:nowrap;background:var(--_button-background);color:var(--_button-color);cursor:var(--_button-cursor);transition-property:box-shadow,background;transition-duration:var(--_button-transition-duration);transition-timing-function:var(--_button-transition-timing);--forge-icon-font-size:1.25em}::slotted(:is(button,a))::-moz-focus-inner{padding:0;border:0}::slotted(:is(button,a)):hover{--_button-shadow:var(--_button-hover-shadow);background:var(--_button-hover-background)}::slotted(:is(button,a)):active{--_button-shadow:var(--_button-active-shadow);background:var(--_button-active-background)}::slotted(a){text-decoration:none;--forge-typography-link-text-decoration:none}forge-state-layer{--forge-state-layer-color:var(--_button-color)}forge-focus-indicator{--forge-focus-indicator-color:var(--_button-primary-color);--forge-focus-indicator-outward-offset:var(--_button-focus-indicator-offset)}:host(:is([type*=unelevated],[type*=raised])) ::slotted(:is(button,a)){--_button-background:var(--_button-filled-background);--_button-color:var(--_button-filled-color)}:host(:is([type*=unelevated],[type*=raised])) forge-state-layer{--forge-state-layer-color:var(--_button-filled-color)}:host([type*=raised]) ::slotted(:is(button,a)){--_button-background:var(--_button-raised-background);--_button-color:var(--_button-raised-color);--_button-shadow:var(--_button-raised-shadow)}:host([type*=raised]) ::slotted(:is(button,a)):hover{--_button-shadow:var(--_button-raised-hover-shadow)}:host([type*=raised]) ::slotted(:is(button,a)):active{--_button-shadow:var(--_button-raised-active-shadow)}:host([type*=outlined]) ::slotted(:is(button,a)){--_button-background:var(--_button-outlined-background);--_button-color:var(--_button-outlined-color);--_button-border-width:var(--_button-outlined-border-width);--_button-border-style:var(--_button-outlined-border-style);--_button-border-color:var(--_button-outlined-border-color)}:host([full-width]){width:100%}:host(:is([dense],[type*=dense])) ::slotted(:is(button,a)){--_button-height:var(--_button-dense-height)}:host([disabled]){cursor:var(--_button-disabled-cursor)}:host([disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-disabled-background);--_button-color:var(--_button-disabled-text-color);--_button-shadow:var(--_button-disabled-shadow);pointer-events:none}:host([type*=outlined][disabled]) ::slotted(button[disabled]){--_button-border-color:var(--_button-disabled-border-color)}:host(:is([type*=unelevated],[type*=raised])[disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-filled-disabled-background);--_button-color:var(--_button-filled-disabled-color)}:host([type*=raised][disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-raised-disabled-background);--_button-color:var(--_button-raised-disabled-color);--_button-shadow:var(--_button-raised-disabled-shadow)}',Do=class extends M{constructor(){super();this._buttonOrAnchorElement=null;this._disabled=!1;this._fullWidth=!1;this._buttonChangeListener=this._onButtonChange.bind(this);this._keydownListener=e=>this._onKeydown(e);H(this,Ob,Db),this._slotElement=g(this,"slot:not([name])"),this._focusIndicator=g(this,m1.elementName),this._stateLayer=g(this,M1.elementName)}static get observedAttributes(){return Object.values(Ot.attributes)}connectedCallback(){this._slotElement.addEventListener("slotchange",this._buttonChangeListener),this.children.length?this._initialize():Fa(this).then(()=>this._initialize())}disconnectedCallback(){this._detachButton()}attributeChangedCallback(e,a,o){switch(e){case Ot.attributes.TYPE:this.type=o;return;case Ot.attributes.DISABLED:this.disabled=p(o);return;case Ot.attributes.FULL_WIDTH:this.fullWidth=p(o);return}}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&this._stateLayer.playAnimation()}_onButtonChange(){this._detachButton(),this._initialize()}_initialize(){this._buttonOrAnchorElement=this.querySelector(Ot.selectors.BUTTON),this._buttonOrAnchorElement&&(this._stateLayer.targetElement=this._buttonOrAnchorElement,this._focusIndicator.targetElement=this._buttonOrAnchorElement,this._buttonOrAnchorElement.addEventListener("keydown",this._keydownListener),this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._disabled&&!this._buttonOrAnchorElement.disabled?this._buttonOrAnchorElement.disabled=!0:this.disabled=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled,this._buttonOrAnchorElement instanceof HTMLButtonElement&&(this._buttonAttrMutationObserver=new MutationObserver(e=>{e.some(a=>a.attributeName==="disabled")&&this._syncDisabledState()}),this._buttonAttrMutationObserver.observe(this._buttonOrAnchorElement,{attributes:!0,attributeFilter:["disabled"]})))}_syncDisabledState(){let e=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled;K(this,e,Ot.attributes.DISABLED)}_detachButton(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("keydown",this._keydownListener),this._buttonAttrMutationObserver&&(this._buttonAttrMutationObserver.disconnect(),this._buttonAttrMutationObserver=void 0)}get type(){return this._type}set type(e){this._type!==e&&(this._type=e,this.setAttribute(Ot.attributes.TYPE,this._type))}get disabled(){return this._disabled}set disabled(e){var a;this._disabled!==e&&(this._disabled=e,(a=this._buttonOrAnchorElement)==null||a.toggleAttribute(Ot.attributes.DISABLED,this._disabled),this.toggleAttribute(Ot.attributes.DISABLED,this._disabled))}get fullWidth(){return this._fullWidth}set fullWidth(e){this._fullWidth!==e&&(this._fullWidth=e,this.toggleAttribute(Ot.attributes.FULL_WIDTH,this._fullWidth))}focus(e){var a;(a=this._buttonOrAnchorElement)==null||a.focus(e)}};Do=s([y({name:Ot.elementName,dependencies:[Q,r1]})],Do);var R6=class extends X1{constructor(t){super(t)}destroy(){this._buttonElement=void 0}get buttonElement(){return this._buttonElement}_build(){var e,a;let t=document.createElement(Ot.elementName);return this._buttonElement=document.createElement("button"),this._buttonElement.type=((e=this._config.options)==null?void 0:e.type)||"button",this._buttonElement.textContent=((a=this._config.options)==null?void 0:a.text)||"",t.appendChild(this._buttonElement),t}onClick(t){var e;(e=this._buttonElement)==null||e.addEventListener("click",t)}onFocus(t){var e;(e=this._buttonElement)==null||e.addEventListener("focus",a=>t(a))}onBlur(t){var e;(e=this._buttonElement)==null||e.addEventListener("blur",a=>t(a))}};function F6(){x(Do)}var Pb=`${b}deprecated-icon-button`,U6={DISABLED:"disabled",TOGGLE:"toggle",IS_ON:"is-on",DENSITY_LEVEL:"density-level"},Nb=t1(w({},U6),{ON_ICON:"forge-icon-button-on"}),Rb={BUTTON:"button,a",ICON_LIKE:"button > i,span,svg,img,forge-icon"},Fb={TOGGLE:"forge-icon-button-toggle"},K2={elementName:Pb,observedAttributes:U6,attributes:Nb,selectors:Rb,events:Fb};var Ub='<template><slot></slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></template>',Wb=":host{--_icon-button-display:var(--forge-icon-button-display, inline-flex);--_icon-button-size:var(--forge-icon-button-size, 48px);--_icon-button-gap:var(--forge-icon-button-gap, 0);--_icon-button-icon-color:var(--forge-icon-button-icon-color, currentColor);--_icon-button-background-color:var(--forge-icon-button-background-color, none);--_icon-button-icon-size:var(--forge-icon-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.5));--_icon-button-cursor:var(--forge-icon-button-cursor, pointer);--_icon-button-padding:var(--forge-icon-button-padding, var(--forge-spacing-xxsmall, 4px));--_icon-button-border:var(--forge-icon-button-border, none);--_icon-button-shadow:var(--forge-icon-button-shadow, none);--_icon-button-transition-duration:var(--forge-icon-button-transition-duration, var(--forge-animation-duration-short3, 150ms));--_icon-button-transition-timing:var(--forge-icon-button-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_icon-button-shape:var(--forge-icon-button-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_icon-button-shape-start-start:var(--forge-icon-button-shape-start-start, var(--_icon-button-shape));--_icon-button-shape-start-end:var(--forge-icon-button-shape-start-end, var(--_icon-button-shape));--_icon-button-shape-end-start:var(--forge-icon-button-shape-end-start, var(--_icon-button-shape));--_icon-button-shape-end-end:var(--forge-icon-button-shape-end-end, var(--_icon-button-shape));--_icon-button-shape-squared:var(--forge-icon-button-shape-squared, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_icon-button-outlined-border-width:var(--forge-icon-button-outlined-border-width, 1px);--_icon-button-outlined-border-style:var(--forge-icon-button-outlined-border-style, solid);--_icon-button-outlined-border-color:var(--forge-icon-button-outlined-border-color, var(--_icon-button-icon-color));--_icon-button-tonal-icon-color:var(--forge-icon-button-tonal-icon-color, var(--forge-theme-on-primary-container, #222c62));--_icon-button-tonal-background-color:var(--forge-icon-button-tonal-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-filled-icon-color:var(--forge-icon-button-filled-icon-color, var(--forge-theme-on-primary, #ffffff));--_icon-button-filled-background-color:var(--forge-icon-button-filled-background-color, var(--forge-theme-primary, #3f51b5));--_icon-button-raised-shadow:var(--forge-icon-button-raised-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_icon-button-raised-hover-shadow:var(--forge-icon-button-raised-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_icon-button-raised-active-shadow:var(--forge-icon-button-raised-active-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12));--_icon-button-raised-disabled-shadow:var(--forge-icon-button-raised-disabled-shadow, none);--_icon-button-density-small-size:var(--forge-icon-button-density-small-size, 24px);--_icon-button-density-small-padding:var(--forge-icon-button-density-small-padding, var(--forge-spacing-xxxsmall, 2px));--_icon-button-density-small-icon-size:var(--forge-icon-button-density-small-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125));--_icon-button-density-medium-size:var(--forge-icon-button-density-medium-size, 36px);--_icon-button-density-medium-padding:var(--forge-icon-button-density-medium-padding, var(--forge-spacing-xxsmall, 4px));--_icon-button-density-large-size:var(--forge-icon-button-density-large-size, var(--_icon-button-size));--_icon-button-toggle-on-background-color:var(--forge-icon-button-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-toggle-on-icon-color:var(--forge-icon-button-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-outlined-toggle-on-background-color:var(--forge-icon-button-outlined-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-outlined-toggle-on-icon-color:var(--forge-icon-button-outlined-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-tonal-toggle-background-color:var(--forge-icon-button-tonal-toggle-background-color, var(--forge-theme-surface-container-low, #ebebeb));--_icon-button-tonal-toggle-on-background-color:var(--forge-icon-button-tonal-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-tonal-toggle-on-icon-color:var(--forge-icon-button-tonal-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-background-color:var(--forge-icon-button-filled-toggle-background-color, var(--forge-theme-surface-container-low, #ebebeb));--_icon-button-filled-toggle-icon-color:var(--forge-icon-button-filled-toggle-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-on-background-color:var(--forge-icon-button-filled-toggle-on-background-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-on-icon-color:var(--forge-icon-button-filled-toggle-on-icon-color, var(--forge-theme-on-primary, #ffffff));--_icon-button-disabled-cursor:var(--forge-icon-button-disabled-cursor, not-allowed);--_icon-button-disabled-opacity:var(--forge-icon-button-disabled-opacity, 0.38);--_icon-button-popover-icon-padding:var(--forge-icon-button-popover-icon-padding, var(--forge-spacing-xsmall, 8px));--_icon-button-focus-indicator-color:var(--forge-icon-button-focus-indicator-color, var(--forge-theme-primary, #3f51b5))}:host{display:var(--_icon-button-display);position:relative;outline:0;-webkit-tap-highlight-color:transparent;border-start-start-radius:var(--_icon-button-shape-start-start);border-start-end-radius:var(--_icon-button-shape-start-end);border-end-start-radius:var(--_icon-button-shape-end-start);border-end-end-radius:var(--_icon-button-shape-end-end)}:host([hidden]){display:none}::slotted(:is(button,a)){position:relative;z-index:0;display:var(--_icon-button-display);align-items:center;justify-content:center;gap:var(--_icon-button-gap);box-sizing:border-box;height:var(--_icon-button-density-large-size);min-width:var(--_icon-button-density-large-size);border:var(--_icon-button-border);border-start-start-radius:var(--_icon-button-shape-start-start);border-start-end-radius:var(--_icon-button-shape-start-end);border-end-start-radius:var(--_icon-button-shape-end-start);border-end-end-radius:var(--_icon-button-shape-end-end);padding:var(--_icon-button-padding);box-shadow:var(--_icon-button-shadow);color:var(--_icon-button-icon-color);background:var(--_icon-button-background-color);font-size:var(--_icon-button-icon-size);cursor:var(--_icon-button-cursor);user-select:none;transition-property:box-shadow,background;transition-duration:var(--_icon-button-transition-duration);transition-timing-function:var(--_icon-button-transition-timing);font-size:var(--_icon-button-icon-size);height:var(--_icon-button-size);width:var(--_icon-button-size)}::slotted(a){text-decoration:none;color:var(--_icon-button-icon-color)!important}forge-state-layer{--forge-state-layer-color:var(--_icon-button-icon-color)}forge-focus-indicator{--forge-focus-indicator-outward-offset:0px;--forge-focus-indicator-color:var(--_icon-button-focus-indicator-color);--forge-focus-indicator-shape-start-start:var(--_icon-button-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_icon-button-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_icon-button-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_icon-button-shape-end-end)}:host(:is([dense],[density=large]):not(:is([density=medium],[density-level]))){--_icon-button-size:var(--_icon-button-density-small-size);--_icon-button-icon-size:var(--_icon-button-density-small-icon-size);--_icon-button-padding:var(--_icon-button-density-small-padding);--forge-icon-font-size:var(--_icon-button-icon-size)}:host([dense]:not([density=large]):not([density=small]):is([density=medium],[density-level])){--_icon-button-size:var(--_icon-button-density-medium-size);--_icon-button-padding:var(--_icon-button-density-medium-padding)}:host([disabled]){cursor:var(--_icon-button-disabled-cursor)}:host([disabled]) ::slotted(button[disabled]){pointer-events:none;opacity:var(--_icon-button-disabled-opacity)}:host([toggle]:is([on],[is-on]):not([is-on=false])){--_icon-button-background-color:var(--_icon-button-toggle-on-background-color);--_icon-button-icon-color:var(--_icon-button-toggle-on-icon-color);--_icon-button-background-color:var(--forge-icon-button-background-color, var(--forge-theme-primary-container-low, #e8eaf6))}",Po=class extends M{constructor(){super();this._disabled=!1;this._toggle=!1;this._isOn=!1;this._densityLevel=0;this._buttonOrAnchorElement=null;this._slotChangeListener=this._onSlotChange.bind(this);this._keydownListener=this._onKeydown.bind(this);this._toggleClickListener=this._onToggle.bind(this);H(this,Ub,Wb),this._slotElement=g(this,"slot:not([name])"),this._focusIndicator=g(this,m1.elementName),this._stateLayer=g(this,M1.elementName)}static get observedAttributes(){return Object.values(K2.attributes)}connectedCallback(){this._slotElement.addEventListener("slotchange",this._slotChangeListener),this.children.length?this._initialize():Fa(this).then(()=>this._initialize())}disconnectedCallback(){this._detachButton()}attributeChangedCallback(e,a,o){switch(e){case K2.attributes.DISABLED:this.disabled=p(o);return;case K2.attributes.TOGGLE:this.toggle=p(o);return;case K2.attributes.IS_ON:this.isOn=p(o);return;case K2.attributes.DENSITY_LEVEL:this.densityLevel=W(o);return}}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&this._stateLayer.playAnimation()}_onSlotChange(){this._detachButton(),this._initialize()}_onToggle(){this.isOn=!this._isOn,this.dispatchEvent(new CustomEvent("forge-icon-button-toggle",{bubbles:!0,composed:!0,detail:this._isOn}))}_initialize(){this._buttonOrAnchorElement=this.querySelector(K2.selectors.BUTTON),this._buttonOrAnchorElement&&(this._stateLayer.targetElement=this._buttonOrAnchorElement,this._focusIndicator.targetElement=this._buttonOrAnchorElement,this._buttonOrAnchorElement.addEventListener("keydown",this._keydownListener),this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._disabled&&!this._buttonOrAnchorElement.disabled?this._buttonOrAnchorElement.disabled=!0:this.disabled=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled,this._toggle&&this._initializeToggle(),this._buttonOrAnchorElement instanceof HTMLButtonElement&&(this._buttonAttrMutationObserver=new MutationObserver(e=>{e.some(a=>a.attributeName==="disabled")&&this._syncDisabledState()}),this._buttonAttrMutationObserver.observe(this._buttonOrAnchorElement,{attributes:!0,attributeFilter:["disabled"]})))}_syncDisabledState(){let e=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled;this.toggleAttribute(K2.attributes.DISABLED,e)}_detachButton(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("keydown",this._keydownListener),this._buttonAttrMutationObserver&&(this._buttonAttrMutationObserver.disconnect(),this._buttonAttrMutationObserver=void 0)}_initializeToggle(){this._buttonOrAnchorElement&&(this._buttonOrAnchorElement.addEventListener("click",this._toggleClickListener),this._syncToggleState())}_destroyToggle(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("click",this._toggleClickListener)}_syncToggleState(){let e=Array.from(this.querySelectorAll(K2.selectors.ICON_LIKE)),a=e.find(n=>n.hasAttribute(K2.attributes.ON_ICON)),o=e.filter(n=>n!==a);a==null||a.toggleAttribute("hidden",!this._isOn),o.forEach(n=>n.toggleAttribute("hidden",this._isOn)),this.toggleAttribute(K2.attributes.IS_ON,this._isOn)}get disabled(){return this._disabled}set disabled(e){var a;e=!!e,this._disabled!==e&&(this._disabled=e,(a=this._buttonOrAnchorElement)==null||a.toggleAttribute(K2.attributes.DISABLED,this._disabled),this.toggleAttribute(K2.attributes.DISABLED,this._disabled))}get toggle(){return this._toggle}set toggle(e){e=!!e,this._toggle!==e&&(this._toggle=e,this.isConnected&&(this._toggle?this._initializeToggle():this._destroyToggle()),this.toggleAttribute(K2.attributes.TOGGLE,this._toggle))}get isOn(){return this._isOn}set isOn(e){e=!!e,this._isOn!==e&&(this._isOn=e,this.isConnected&&this._syncToggleState())}get densityLevel(){return this._densityLevel}set densityLevel(e){this._densityLevel!==e&&(this._densityLevel=e,this.setAttribute(K2.attributes.DENSITY_LEVEL,String(this._densityLevel)))}focus(e){var a;(a=this._buttonOrAnchorElement)==null||a.focus(e)}};Po=s([y({name:K2.elementName,dependencies:[X,Q,r1]})],Po);var W6=class extends X1{constructor(t){super(t)}destroy(){this._buttonElement=void 0}get buttonElement(){return this._buttonElement}_build(){var e;let t=document.createElement(K2.elementName);if(this._buttonElement=document.createElement("button"),this._buttonElement.type="button",t.appendChild(this._buttonElement),(e=this._config.options)!=null&&e.tooltip){let a=document.createElement("forge-tooltip");a.textContent=this._config.options.tooltip,this._config.options.tooltipPosition&&(a.position=this._config.options.tooltipPosition),t.appendChild(a)}return t}onClick(t){var e;(e=this._buttonElement)==null||e.addEventListener("click",t)}onFocus(t){var e;(e=this._buttonElement)==null||e.addEventListener("focus",t)}onBlur(t){var e;(e=this._buttonElement)==null||e.addEventListener("blur",t)}get iconElement(){return this._iconElement}get disabled(){var t;return!!((t=this._buttonElement)!=null&&t.disabled)}set disabled(t){this._buttonElement&&(this._buttonElement.disabled=t)}_configure(){this._configureIcon()}_configureIcon(){var e,a,o,n;if(!((e=this._config.options)!=null&&e.iconName))return;switch(((a=this._config.options)==null?void 0:a.iconType)||"component"){case"font":let i=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[ke];(o=this._buttonElement)==null||o.classList.add(...i),this._buttonElement&&(this._buttonElement.textContent=this._config.options.iconName);break;case"component":this._iconElement=document.createElement(h1.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&this._iconElement.classList.add(...this._config.options.iconClass),(n=this._buttonElement)==null||n.appendChild(this._iconElement);break}}};function G6(){x(Po)}var Nl=class extends I{constructor(t){super(t)}startButtonObserver(){this._buttonChangeObserver=new MutationObserver(t=>{let e=t.reduce((a,{addedNodes:o})=>{let n=Array.from(o).filter(i=>i.nodeType===Node.ELEMENT_NODE).map(i=>i.nodeName.toLowerCase()===I2.elementName?i:i.querySelector(I2.elementName)).filter(i=>!!i);return a.concat(n)},[]);e.length&&(e.forEach(a=>{a.variant=this._component.variant,a.theme=this._component.theme,a.disabled=this._component.disabled,a.dense=this._component.dense}),this.setPill(this._component.pill))}),this._buttonChangeObserver.observe(this._component,{childList:!0,subtree:!0})}destroyButtonObserver(){var t;(t=this._buttonChangeObserver)==null||t.disconnect(),this._buttonChangeObserver=void 0}setVariant(t){this._getButtons().forEach(a=>a.variant=t)}setTheme(t){this._getButtons().forEach(a=>a.theme=t)}setDisabled(t){this._getButtons().forEach(a=>a.disabled=t)}setDense(t){this._getButtons().forEach(a=>a.dense=t)}setPill(t){let e=this._getButtons();e.length>2&&Array.from(e).slice(1,e.length-1).filter(({pill:n})=>n).forEach(n=>n.pill=!1);let a=e[0];a&&(a.pill=t);let o=e[e.length-1];o&&(o.pill=t)}_getButtons(){return this._component.querySelectorAll(I2.elementName)}};var Gb=`${b}split-button`,Yb={VARIANT:"variant",THEME:"theme",DISABLED:"disabled",DENSE:"dense",PILL:"pill"},Kb={DEFAULT_VARIANT:"text",DEFAULT_THEME:"primary"},u2={elementName:Gb,attributes:Yb,defaults:Kb};var Rl=class{constructor(t){this._adapter=t;this._variant=u2.defaults.DEFAULT_VARIANT;this._theme=u2.defaults.DEFAULT_THEME;this._disabled=!1;this._dense=!1;this._pill=!1}initialize(){this._adapter.startButtonObserver(),this._adapter.setVariant(this._variant),this._adapter.setTheme(this._theme),this._adapter.setDisabled(this._disabled),this._adapter.setDense(this._dense),this._adapter.setPill(this._pill)}destroy(){this._adapter.destroyButtonObserver()}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t!=null?t:u2.defaults.DEFAULT_VARIANT,this._adapter.setVariant(t),this._adapter.setHostAttribute(u2.attributes.VARIANT,this._variant))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:u2.defaults.DEFAULT_THEME,this._adapter.setTheme(this._theme),this._adapter.setHostAttribute(u2.attributes.THEME,this._theme))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(u2.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setDense(this._dense),this._adapter.toggleHostAttribute(u2.attributes.DENSE,this._dense))}get pill(){return this._pill}set pill(t){this._pill!==t&&(this._pill=t,this._adapter.setPill(this._pill),this._adapter.toggleHostAttribute(u2.attributes.PILL,this._pill))}};var qb="<template><slot></slot></template>",$b=":host{--_split-button-min-width:var(--forge-split-button-min-width, 0);--_split-button-gap:var(--forge-split-button-gap, var(--forge-border-thin, 1px));--_split-button-focus-indicator-offset:var(--forge-split-button-focus-indicator-offset, var(--forge-button-focus-indicator-offset, 4px));--_split-button-focus-indicator-divider-offset:var(--forge-split-button-focus-indicator-divider-offset, var(--_split-button-gap));--_split-button-focus-indicator-offset-adjusted:calc(var(--_split-button-focus-indicator-offset) + var(--_split-button-focus-indicator-divider-offset) * 2)}:host{display:inline-flex;justify-content:center;align-items:center}:host([hidden]){display:none}::slotted(*){--forge-button-min-width:var(--_split-button-min-width);--forge-button-focus-indicator-offset:var(--_split-button-focus-indicator-offset)}::slotted(:first-child){--forge-button-shape-start-end-radius:0;--forge-button-shape-end-end-radius:0;--forge-focus-indicator-shape-start-end:0;--forge-focus-indicator-shape-end-end:0;--forge-focus-indicator-offset-inline:0 var(--_split-button-focus-indicator-offset-adjusted)}::slotted(:not(:first-child):not(:last-child)){--forge-button-shape:0;--forge-focus-indicator-shape:0;--forge-focus-indicator-offset-inline:var(--_split-button-focus-indicator-offset-adjusted)}::slotted(:last-child){--forge-button-shape-start-start-radius:0;--forge-button-shape-end-start-radius:0;--forge-focus-indicator-shape-start-start:0;--forge-focus-indicator-shape-end-start:0;--forge-focus-indicator-offset-inline:var(--_split-button-focus-indicator-offset-adjusted) 0}:host([variant=outlined]){--_split-button-focus-indicator-divider-offset:var(--forge-split-button-focus-indicator-divider-offset, 0px)}:host([variant=outlined]) ::slotted(:not(:first-child)){margin-inline-start:calc(-1 * var(--_split-button-gap))}:host(:is([variant=tonal],[variant=filled],[variant=raised],:not([variant]))) ::slotted(:not(:last-child)){margin-inline-end:var(--_split-button-gap)}",ze=class extends M{static get observedAttributes(){return[u2.attributes.VARIANT,u2.attributes.THEME,u2.attributes.DISABLED,u2.attributes.DENSE,u2.attributes.PILL]}constructor(){super(),H(this,qb,$b),this._core=new Rl(new Nl(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,a){switch(t){case u2.attributes.VARIANT:this.variant=a;break;case u2.attributes.THEME:this.theme=a;break;case u2.attributes.DISABLED:this.disabled=p(a);break;case u2.attributes.DENSE:this.dense=p(a);break;case u2.attributes.PILL:this.pill=p(a);break}}};s([v()],ze.prototype,"variant",2),s([v()],ze.prototype,"theme",2),s([v()],ze.prototype,"disabled",2),s([v()],ze.prototype,"dense",2),s([v()],ze.prototype,"pill",2),ze=s([y({name:u2.elementName,dependencies:[V2]})],ze);function $A1(){x(ze)}function tB1(){let r="0123456789ABCDEF".split(""),t="#";for(let e=0;e<6;e++)t+=r[Math.floor(Math.random()*16)];return t}function uT1(){G3(),sv(),zh(),oh(),ih(),ic(),vv(),qc(),ho(),Xc(),nh(),Zc(),rp(),np(),Bh(),cc(),gc(),Op(),Pp(),_c(),Nc(),Uc(),Rc(),Np(),Gp(),Kp(),$p(),ep(),sc(),Qp(),U3(),Bc(),nd(),vd(),iv(),gv(),N3(),hd(),cd(),fd(),pd(),Cc(),yd(),bh(),mh(),dh(),Ch(),Md(),Hd(),ad(),td(),R3(),Td(),Sd(),th(),Id(),Rd(),fh(),nc(),xc(),yc(),Ad(),Nd(),Ud(),yh(),Yd(),jd(),p6(),g6(),nv(),w6(),_6(),Ic(),V6(),I6(),b6(),kc(),S6(),O6(),rc(),ah(),P6(),N6()}function _T1(){F6(),G6()}export{wa as ACCORDION_CONSTANTS,J3 as ANIMATION_FILL,W1 as APP_BAR_CONSTANTS,Ne as APP_BAR_HELP_BUTTON_CONSTANTS,to as APP_BAR_MENU_BUTTON_CONSTANTS,m2 as APP_BAR_NOTIFICATION_BUTTON_CONSTANTS,_1 as APP_BAR_PROFILE_BUTTON_CONSTANTS,A2 as APP_BAR_SEARCH_CONSTANTS,Zl as ARIA_CONTROLS_PLACEHOLDER_ID,s1 as AUTOCOMPLETE_CONSTANTS,Ca as AVATAR_CONSTANTS,z4 as AVATAR_TAG_NAME,bn as AccordionAdapter,ua as AccordionComponent,yn as AccordionCore,Vn as AppBarAdapter,be as AppBarComponent,En as AppBarCore,mi as AppBarHelpButtonAdapter,q0 as AppBarHelpButtonComponent,gi as AppBarHelpButtonCore,io as AppBarMenuButtonComponent,qn as AppBarNotificationButtonAdapter,Le as AppBarNotificationButtonComponent,$n as AppBarNotificationButtonCore,Ci as AppBarProfileButtonAdapter,U2 as AppBarProfileButtonComponent,zi as AppBarProfileButtonCore,zn as AppBarSearchAdapter,h0 as AppBarSearchComponent,Cn as AppBarSearchCore,rs as AutocompleteAdapter,c2 as AutocompleteComponent,Kc as AutocompleteComponentDelegate,ns as AutocompleteCore,Wc as AutocompleteMode,Ve as AvatarComponent,s2 as BACKDROP_CONSTANTS,j2 as BADGE_CONSTANTS,M2 as BANNER_CONSTANTS,Z1 as BASE_DRAWER_CONSTANTS,F as BASE_FIELD_CONSTANTS,bt as BASE_SELECT_CONSTANTS,A1 as BOTTOM_SHEET_CONSTANTS,Bt as BUTTON_AREA_CONSTANTS,I2 as BUTTON_CONSTANTS,y3 as BUTTON_FORM_ATTRIBUTES,Z2 as BUTTON_TOGGLE_CONSTANTS,N1 as BUTTON_TOGGLE_GROUP_CONSTANTS,We as BackdropComponent,G0 as BadgeComponent,rh as BadgeComponentDelegate,is as BannerAdapter,g0 as BannerComponent,ss as BannerCore,I as BaseAdapter,M as BaseComponent,X1 as BaseComponentDelegate,ra as BaseDrawerAdapter,Ke as BaseDrawerComponent,na as BaseDrawerCore,b2 as BaseField,mo as BaseFieldAdapter,go as BaseFieldCore,To as BaseSelectAdapter,yt as BaseSelectComponent,So as BaseSelectCore,ds as BottomSheetAdapter,Ge as BottomSheetComponent,ms as BottomSheetCore,_i as ButtonAdapter,gs as ButtonAreaAdapter,Aa as ButtonAreaComponent,ws as ButtonAreaCore,V2 as ButtonComponent,xi as ButtonComponentDelegate,fi as ButtonCore,Ti as ButtonToggleAdapter,le as ButtonToggleComponent,Si as ButtonToggleCore,ki as ButtonToggleGroupAdapter,Q2 as ButtonToggleGroupComponent,Oi as ButtonToggleGroupCore,m as CALENDAR_CONSTANTS,kp as CALENDAR_DROPDOWN_CONSTANTS,T as CALENDAR_MENU_CONSTANTS,Mr as CARD_CONSTANTS,G5 as CDN_BASE_URL,z1 as CHECKBOX_CONSTANTS,d1 as CHIP_CONSTANTS,g2 as CHIP_FIELD_CONSTANTS,tt as CHIP_SET_CONSTANTS,C2 as CIRCULAR_PROGRESS_CONSTANTS,g1 as COLOR_PICKER_CONSTANTS,b as COMPONENT_NAME_PREFIX,Vs as CalendarAdapter,v1 as CalendarComponent,Sp as CalendarComponentDelegate,Es as CalendarCore,_o as CalendarDropdown,fs as CalendarMenuAdapter,Ye as CalendarMenuComponent,xs as CalendarMenuCore,vp as CalendarMonthFocus,fo as CardComponent,xl as CellAlign,Di as CheckboxAdapter,J2 as CheckboxComponent,uc as CheckboxComponentDelegate,Pi as CheckboxCore,es as ChipAdapter,y2 as ChipComponent,as as ChipCore,Qi as ChipFieldAdapter,za as ChipFieldComponent,Fc as ChipFieldComponentDelegate,Ji as ChipFieldCore,wo as ChipSetComponent,Cs as CircularProgressAdapter,Tt as CircularProgressComponent,zs as CircularProgressCore,As as ColorPickerAdapter,ce as ColorPickerComponent,Ss as ColorPickerCore,j4 as ColorPickerValueType,ft as DATE_PICKER_CONSTANTS,k2 as DATE_RANGE_PICKER_CONSTANTS,X4 as DEFAULT_COLOR,hn as DEFAULT_DATE_MASK,Wo as DEFERRED_LABEL_TARGET,Ot as DEPRECATED_BUTTON_CONSTANTS,K2 as DEPRECATED_ICON_BUTTON_CONSTANTS,O as DIALOG_CONSTANTS,co as DIVIDER_CONSTANTS,Zp as DRAWER_CONSTANTS,ga as DateInputMask,Os as DatePickerAdapter,Mo as DatePickerComponent,Yp as DatePickerComponentDelegate,Ds as DatePickerCore,Ps as DatePickerRange,l2 as DateRange,qp as DateRangeComponentDelegate,Ns as DateRangePickerAdapter,oa as DateRangePickerComponent,Rs as DateRangePickerCore,fr as DayOfWeek,Jr as Deferred,Do as DeprecatedButtonComponent,R6 as DeprecatedButtonComponentDelegate,Po as DeprecatedIconButtonComponent,W6 as DeprecatedIconButtonComponentDelegate,hs as DialogAdapter,E1 as DialogComponent,ps as DialogCore,Vt as DismissibleStack,Z0 as DividerComponent,Ho as DrawerComponent,tv as EASING,D1 as EXPANSION_PANEL_CONSTANTS,fn as ExpansionPanelAdapter,_t as ExpansionPanelComponent,xn as ExpansionPanelCore,V as FIELD_CONSTANTS,w1 as FILE_PICKER_CONSTANTS,Q1 as FLOATING_ACTION_BUTTON_CONSTANTS,m1 as FOCUS_INDICATOR_CONSTANTS,$i as FieldAdapter,k1 as FieldComponent,Xi as FieldCore,Ws as FilePickerAdapter,Gt as FilePickerComponent,rd as FilePickerComponentDelegate,Gs as FilePickerCore,Ys as FloatingActionButtonAdapter,_0 as FloatingActionButtonComponent,ld as FloatingActionButtonComponentDelegate,Ks as FloatingActionButtonCore,Ln as FocusIndicatorAdapter,Q as FocusIndicatorComponent,In as FocusIndicatorCore,a2 as FormFieldComponentDelegate,Xr as GlobalConfiguration,L3 as HAS_MERIDIEM_REGEX,J as ICON_BUTTON_CONSTANTS,ke as ICON_CLASS_NAME,h1 as ICON_CONSTANTS,mn as ICON_REGISTRY_KEY,$3 as INITIAL_ORIGIN_SCALE,Eo as INLINE_MESSAGE_CONSTANTS,CH as INPUT_ARIA_ATTRIBUTES,zH as INPUT_PROPERTIES,Cm as ISO_8601_REGEX,zm as ISO_TIMEZONE_REGEX,gn as IconAdapter,Bn as IconButtonAdapter,n1 as IconButtonComponent,mv as IconButtonComponentDelegate,An as IconButtonCore,X as IconComponent,P0 as IconComponentDelegate,un as IconCore,q as IconRegistry,Co as InlineMessageComponent,p2 as KEYBOARD_SHORTCUT_CONSTANTS,W5 as KEYSTROKE_DEBOUNCE_THRESHOLD,Ta as KeyComponent,qe as KeyItemComponent,qs as KeyboardShortcutAdapter,xt as KeyboardShortcutComponent,$s as KeyboardShortcutCore,o2 as LABEL_CONSTANTS,pe as LABEL_VALUE_CONSTANTS,S2 as LINEAR_PROGRESS_CONSTANTS,I1 as LIST_CONSTANTS,l1 as LIST_ITEM_CONSTANTS,Ki as LabelAdapter,ve as LabelComponent,qi as LabelCore,zo as LabelValueComponent,bd as LabelValueComponentDelegate,ae as LinearProgressComponent,Xn as ListAdapter,h2 as ListComponent,jn as ListCore,Zn as ListItemAdapter,j1 as ListItemComponent,Qn as ListItemCore,e1 as MENU_CONSTANTS,i4 as MINIMUM_PRESS_MS,ed as MINI_DRAWER_CONSTANTS,Lo as MODAL_DRAWER_CONSTANTS,pi as MenuAdapter,x2 as MenuComponent,di as MenuCore,Y1 as MeterComponent,O2 as MeterGroupComponent,Vo as MiniDrawerComponent,Fs as ModalDrawerAdapter,Io as ModalDrawerComponent,Us as ModalDrawerCore,i5 as NAVIGATION_KEYS,It as OPEN_ICON_CONSTANTS,N as OPTION_CONSTANTS,ia as OPTION_GROUP_CONSTANTS,B as OVERLAY_CONSTANTS,Zv as OVERLAY_FALLBACK_PLACEMENT_MAP,Qa as OpenIconComponent,Zs as OptionAdapter,J1 as OptionComponent,Qs as OptionCore,Xe as OptionGroupComponent,Gc as OptionType,Fn as OverlayAdapter,d2 as OverlayComponent,Wn as OverlayCore,X3 as PADDING,Ld as PAGE_STATE_CONSTANTS,$ as PAGINATOR_CONSTANTS,Tm as PARSEABLE_TIME_FORMAT,Z as POPOVER_CONSTANTS,_h as POPOVER_HOVER_TIMEOUT,q3 as PRESS_GROW_MS,Q3 as PRESS_PSEUDO,Y as PROFILE_CARD_CONSTANTS,Ao as PageStateComponent,js as PaginatorAdapter,ot as PaginatorComponent,Xs as PaginatorCore,ev as PointerState,ti as PopoverAdapter,P1 as PopoverComponent,ai as PopoverCore,wi as ProfileCardAdapter,F2 as ProfileCardComponent,ui as ProfileCardCore,f1 as RADIO_CONSTANTS,po as RADIO_GROUP_CONSTANTS,EH as REFLECTIVE_ARIA_ATTRIBUTES,Ri as RadioAdapter,vt as RadioComponent,Fi as RadioCore,Ui as RadioGroupAdapter,Q0 as RadioGroupComponent,Wi as RadioGroupCore,Bo as SCAFFOLD_CONSTANTS,G2 as SELECT_CONSTANTS,je as SELECT_DROPDOWN_CONSTANTS,ni as SKELETON_CONSTANTS,pt as SKIP_LINK_CONSTANTS,E as SLIDER_CONSTANTS,Z3 as SOFT_EDGE_CONTAINER_RATIO,j3 as SOFT_EDGE_MINIMUM_SIZE,u2 as SPLIT_BUTTON_CONSTANTS,t2 as SPLIT_VIEW_CONSTANTS,D as SPLIT_VIEW_PANEL_CONSTANTS,D2 as STACK_CONSTANTS,M1 as STATE_LAYER_CONSTANTS,R as STEPPER_CONSTANTS,S as STEP_CONSTANTS,no as SUPPORTS_POPOVER,i1 as SWITCH_CONSTANTS,$e as ScaffoldComponent,Js as SelectAdapter,Ee as SelectComponent,Wd as SelectComponentDelegate,tl as SelectCore,al as SelectDropdownAdapter,f0 as SelectDropdownComponent,el as SelectDropdownCore,kd as SelectOptionType,Y0 as SkeletonComponent,ko as SkipLinkComponent,w2 as SliderComponent,Xd as SliderComponentDelegate,b3 as SlottedElementAdapter,bl as SortDirection,Nl as SplitButtonAdapter,ze as SplitButtonComponent,Rl as SplitButtonCore,cl as SplitViewAdapter,Jd as SplitViewAnimatingLayer,Ce as SplitViewComponent,pl as SplitViewCore,hl as SplitViewPanelAdapter,H2 as SplitViewPanelComponent,vl as SplitViewPanelCore,dl as StackAdapter,de as StackComponent,ml as StackCore,Mn as StateLayerAdapter,r1 as StateLayerComponent,Ja as StateLayerCoords,Hn as StateLayerCore,wl as StepAdapter,Y2 as StepComponent,ul as StepCore,_l as StepperAdapter,St as StepperComponent,fl as StepperCore,Gi as SwitchAdapter,W2 as SwitchComponent,Lc as SwitchComponentDelegate,Yi as SwitchCore,f as TABLE_CONSTANTS,T1 as TAB_BAR_CONSTANTS,F1 as TAB_CONSTANTS,V1 as TEXT_FIELD_CONSTANTS,U as TIME_PICKER_CONSTANTS,B1 as TOAST_CONSTANTS,mr as TOOLBAR_CONSTANTS,o1 as TOOLTIP_CONSTANTS,K3 as TOUCH_DELAY_MS,Fm as TWELVE_HOUR_TIME_MASK,Um as TWELVE_HOUR_TIME_MASK_WITH_SECONDS,an as TWELVE_HOUR_TIME_REGEX,Wm as TWENTY_FOUR_HOUR_TIME_MASK,Gm as TWENTY_FOUR_HOUR_TIME_MASK_WITH_SECONDS,$a as TWENTY_FOUR_HOUR_TIME_REGEX,Il as TabAdapter,El as TabBarAdapter,Mt as TabBarComponent,Cl as TabBarCore,kt as TabComponent,Vl as TabCore,yl as TableAdapter,q1 as TableComponent,Ll as TableCore,$x as TableFilterType,Hl as TableRow,ji as TextFieldAdapter,m0 as TextFieldComponent,J0 as TextFieldComponentDelegate,Zi as TextFieldCore,dn as TimeInputMask,zl as TimePickerAdapter,O1 as TimePickerComponent,T6 as TimePickerComponentDelegate,Sl as TimePickerCore,kl as ToastAdapter,Kt as ToastComponent,Ol as ToastCore,se as ToolbarComponent,Gn as TooltipAdapter,p1 as TooltipComponent,Kn as TooltipCore,D6 as VIEW_CONSTANTS,e2 as VIEW_SWITCHER_CONSTANTS,p5 as ViewAnimationDirection,la as ViewComponent,Dl as ViewSwitcherAdapter,Vb as ViewSwitcherAnimationType,va as ViewSwitcherComponent,Pl as ViewSwitcherCore,k3 as awaitIconDefinition,n0 as canUserHoverElements,nl as clampSize,a6 as clearState,e4 as cloneAttributes,Am as cloneProperties,Bm as cloneValidationMessage,q4 as coerceDateFromValue,da as coerceStringToArray,h6 as createOverlay,wn as createSanitizedSvg,M3 as createSvgFromString,w3 as createUserInteractionListener,G3 as defineAccordionComponent,sv as defineAppBarComponent,zh as defineAppBarHelpButtonComponent,oh as defineAppBarMenuButtonComponent,ih as defineAppBarNotificationButtonComponent,ic as defineAppBarProfileButtonComponent,vv as defineAppBarSearchComponent,qc as defineAutocompleteComponent,ho as defineAvatarComponent,Xc as defineBackdropComponent,nh as defineBadgeComponent,Zc as defineBannerComponent,rp as defineBottomSheetComponent,np as defineButtonAreaComponent,Bh as defineButtonComponent,cc as defineButtonToggleComponent,gc as defineButtonToggleGroupComponent,Op as defineCalendarComponent,zl1 as defineCalendarMenuComponent,Pp as defineCardComponent,_c as defineCheckboxComponent,Nc as defineChipComponent,Uc as defineChipFieldComponent,Rc as defineChipSetComponent,Np as defineCircularProgressComponent,Gp as defineColorPickerComponent,uT1 as defineComponents,Kp as defineDatePickerComponent,$p as defineDateRangePickerComponent,F6 as defineDeprecatedButtonComponent,_T1 as defineDeprecatedComponents,G6 as defineDeprecatedIconButtonComponent,ep as defineDialogComponent,sc as defineDividerComponent,Qp as defineDrawerComponent,U3 as defineExpansionPanelComponent,Bc as defineFieldComponent,nd as defineFilePickerComponent,vd as defineFloatingActionButtonComponent,iv as defineFocusIndicatorComponent,gv as defineIconButtonComponent,N3 as defineIconComponent,hd as defineInlineMessageComponent,cd as defineKeyComponent,pd as defineKeyItemComponent,fd as defineKeyboardShortcutComponent,Cc as defineLabelComponent,yd as defineLabelValueComponent,bh as defineLinearProgressComponent,mh as defineListComponent,dh as defineListItemComponent,Ch as defineMenuComponent,Md as defineMeterComponent,Hd as defineMeterGroupComponent,ad as defineMiniDrawerComponent,td as defineModalDrawerComponent,R3 as defineOpenIconComponent,Td as defineOptionComponent,Sd as defineOptionGroupComponent,th as defineOverlayComponent,Id as definePageStateComponent,Rd as definePaginatorComponent,fh as definePopoverComponent,nc as defineProfileCardComponent,xc as defineRadioComponent,yc as defineRadioGroupComponent,Ad as defineScaffoldComponent,Nd as defineSelectComponent,Ud as defineSelectDropdownComponent,yh as defineSkeletonComponent,Yd as defineSkipLinkComponent,jd as defineSliderComponent,$A1 as defineSplitButtonComponent,p6 as defineSplitViewComponent,ub1 as defineSplitViewPanelComponent,g6 as defineStackComponent,nv as defineStateLayerComponent,w6 as defineStepComponent,_6 as defineStepperComponent,Ic as defineSwitchComponent,V6 as defineTabBarComponent,I6 as defineTabComponent,b6 as defineTableComponent,kc as defineTextFieldComponent,S6 as defineTimePickerComponent,O6 as defineToastComponent,rc as defineToolbarComponent,ah as defineTooltipComponent,P6 as defineViewComponent,N6 as defineViewSwitcherComponent,w0 as dialogStack,wd as elementAcceptsTextInput,Y3 as elementName,_3 as elementsOverlapping,_n as emulateUserToggle,t4 as eventIncludesArrowKey,xr as eventIncludesDate,Hp as eventIncludesElement,D3 as fetchIconContent,sf as fixKey,Ga as forgeLabelRef,d3 as formatDate,S0 as forwardAttributes,Ko as frame,W4 as getAccessibleHeader,Bp as getAllYearOptions,S3 as getCachedIcon,yp as getClearButton,v5 as getCurrentTimeOfDayMillis,n5 as getCursor,F4 as getDateElement,at as getDateId,Ba as getDateRangeFromDates,gp as getDateRow,bs as getDateSpacerElement,Ep as getDatesFromDateRange,Ls as getDatesInRange,mp as getDayElement,Pu as getDayId,K4 as getEventDescriptions,up as getEventElement,wp as getEventWrapperElement,R4 as getEventWrapperId,Is as getEventsOnDate,br as getFirstDateOfWeek,p41 as getFirstDayOfMonth,cp as getFirstDayOfWeekForLocale,bp as getFooter,$t as getFormState,Lt as getFormValue,us as getGrid,ip as getGridItems,v6 as getHandleIcon,U4 as getHeader,yr as getIndexOfDate,jl as getLastDateOfMonth,Lp as getLastDateOfWeek,lp as getList,_s as getListItems,hp as getLocalizedDayOfMonth,N4 as getLocalizedDayOfWeek,aa as getLocalizedMonth,u0 as getLocalizedYear,Hs as getMinAndMaxDates,nf as getModiferKeysString,fp as getMonthButtonContent,Y4 as getMonthDates,m3 as getMonthLength,zp as getMonthOptions,Tp as getMultipleFromRange,AH as getPartPrefixedAttributes,Sa as getPixelDimension,sp as getScrollSpy,Yc as getSelectedOption,ys as getSortedDaysOfWeek,ll as getSplitViewPanelSibling,Mp as getTodayButton,_p as getTooltip,Xt as getValidationMessage,sl as getValuenow,c41 as getWeekDates,pp as getWeekendDaysForLocale,xp as getYearButtonContent,Ap as getYearOptions,l6 as handleBoundariesAfterResize,il as handleBoundariesDuringResize,ls as hideBackdrop,g3 as highlightTextHTML,A6 as hoursToMillis,t6 as initState,jt as inputType,a1 as internals,ct as isDisabled,$1 as isFocusable,ht as isInMonth,Nu as isInRange,f3 as isInstanceOf,lc as isLabelAware,o5 as isOptionGroupObject,Af as isOptionObject,gr as isOptionType,Ql as isPointerOverElement,dp as isRtlLocale,H3 as isSafeSvg,f2 as isSameDate,a5 as isSelectOptionType,uo as isSelected,E3 as isSupportedTimeFormat,Ip as isToday,r6 as keyboardResize,Yo as locateElementById,en as locateTargetHeuristic,_d as matchKeyCombination,i6 as maxResize,KV1 as mergeDateWithTime,C6 as millisToHours,Bl as millisToMinutes,z6 as millisToMinutesClamped,db as millisToSeconds,s5 as millisToSecondsClamped,Yt as millisToTimeString,n6 as minResize,Tl as minutesToMillis,wr as optionEqualPredicate,W0 as overlayStack,Ru as parseDateOffset,p3 as parseDateString,ud as parseKeyCombinations,px as parseSize,Cp as parseYearRange,u3 as percentToPixels,_H as pixelsToPercent,o6 as pointerResize,U5 as prefersReducedMotion,x3 as proxyShadowScrollEvent,tB1 as randomHexColor,ur as removeAllExceptLastChild,O3 as removeIconListener,Ka as replaceElement,s6 as resizeSibling,qa as roundByDPR,fH as safeMax,B0 as safeMin,P3 as sanitizeExternalType,tn as scaleValue,l5 as secondsToMillis,Zt as setAriaControls,P as setDefaultAria,e6 as setState,G4 as setTabindexOnElement,wt as setValidity,$4 as shouldHandleEvent,vs as showBackdrop,Ms as sortDates,Vp as splitIntoWeeks,B6 as stripSecondsFromMillis,R5 as supportsElementInternalsAria,F5 as supportsHover,jr as supportsPopover,Qt as task,gd as textInputTypes,Al as timeStringToMillis,V3 as tokenize12HourTimeString,I3 as tokenize24HourTimeString,Ni as tryCheck,C3 as tryCoerceTimeString,Oe as tryCreateAriaControlsPlaceholder,T0 as tryDismiss,bH as unwrapElements,Zr as updateTarget,xH as wrapElements};
|
|
62
62
|
/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2023 Google LLC
|