@aurodesignsystem/auro-dialog 4.2.0 → 4.2.1

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +3 -19
  2. package/README.md +8 -9
  3. package/demo/accessibility.html +42 -0
  4. package/demo/accessibility.js +21 -0
  5. package/demo/accessibility.md +129 -0
  6. package/demo/accessibility.min.js +3969 -0
  7. package/demo/api.html +16 -40
  8. package/demo/api.md +0 -750
  9. package/demo/customize.html +45 -0
  10. package/demo/{api.js → customize.js} +2 -14
  11. package/demo/customize.md +226 -0
  12. package/demo/customize.min.js +3974 -0
  13. package/demo/demo-nav.css +32 -0
  14. package/demo/design.html +42 -0
  15. package/demo/design.js +23 -0
  16. package/demo/design.md +306 -0
  17. package/demo/design.min.js +4041 -0
  18. package/demo/getting-started.html +38 -0
  19. package/demo/getting-started.md +295 -0
  20. package/demo/index.html +17 -36
  21. package/demo/index.js +2 -3
  22. package/demo/index.md +220 -144
  23. package/demo/index.min.js +3984 -7
  24. package/demo/keyboard-behavior.html +38 -0
  25. package/demo/keyboard-behavior.md +51 -0
  26. package/demo/pages.json +1 -0
  27. package/demo/readme.html +42 -0
  28. package/demo/readme.js +24 -0
  29. package/demo/readme.md +176 -0
  30. package/demo/{auro-dialog.min.js → readme.min.js} +434 -281
  31. package/demo/support/demo-support.js +140 -0
  32. package/demo/voiceover.html +38 -0
  33. package/demo/voiceover.md +19 -0
  34. package/demo/why-dialog.html +38 -0
  35. package/demo/why-dialog.md +36 -0
  36. package/dist/{auro-dialog-CWkXz5VA.js → auro-dialog-T9I85UZL.js} +20 -20
  37. package/dist/index.d.ts +198 -98
  38. package/dist/index.js +1 -1
  39. package/dist/registered.js +1 -1
  40. package/package.json +6 -6
  41. package/demo/api.min.js +0 -219
package/demo/index.min.js CHANGED
@@ -1,11 +1,16 @@
1
- import { A as AuroDialog, i as initBasicExample } from './auro-dialog.min.js';
2
-
3
- function initCustomExample() {
1
+ function initBasicExample() {
2
+ if (initBasicExample._initialized) {
3
+ return;
4
+ }
4
5
  const buttons = [
5
- document.querySelector("#openCustom"),
6
- document.querySelector("#closeCustom"),
6
+ document.querySelector("#openBasic"),
7
+ document.querySelector("#closeBasic"),
7
8
  ];
8
9
  const dialog = document.querySelector("#defaultDialog");
10
+ if (!buttons[0] || !buttons[1] || !dialog) {
11
+ return;
12
+ }
13
+ initBasicExample._initialized = true;
9
14
 
10
15
  buttons.forEach((button) => {
11
16
  button.addEventListener("click", () => {
@@ -18,8 +23,3980 @@ function initCustomExample() {
18
23
  });
19
24
  }
20
25
 
26
+ function initModalExample() {
27
+ const defaultButtons = [
28
+ document.querySelector("#openDefaultModal"),
29
+ document.querySelector("#closeDefaultModal"),
30
+ ];
31
+ const defaultDialog = document.querySelector("#defaultModalDialog");
32
+
33
+ const mediumButtons = [
34
+ document.querySelector("#openMediumModal"),
35
+ document.querySelector("#closeMediumModal"),
36
+ ];
37
+ const mediumDialog = document.querySelector("#mediumModalDialog");
38
+
39
+ const smallButtons = [
40
+ document.querySelector("#openSmallModal"),
41
+ document.querySelector("#closeSmallModal"),
42
+ ];
43
+ const smallDialog = document.querySelector("#smallModalDialog");
44
+
45
+ defaultButtons.forEach((button) => {
46
+ button.addEventListener("click", () => {
47
+ if (defaultDialog.hasAttribute("open")) {
48
+ defaultDialog.removeAttribute("open");
49
+ } else {
50
+ defaultDialog.setAttribute("open", true);
51
+ }
52
+ });
53
+ });
54
+
55
+ mediumButtons.forEach((button) => {
56
+ button.addEventListener("click", () => {
57
+ if (mediumDialog.hasAttribute("open")) {
58
+ mediumDialog.removeAttribute("open");
59
+ } else {
60
+ mediumDialog.setAttribute("open", true);
61
+ }
62
+ });
63
+ });
64
+
65
+ smallButtons.forEach((button) => {
66
+ button.addEventListener("click", () => {
67
+ if (smallDialog.hasAttribute("open")) {
68
+ smallDialog.removeAttribute("open");
69
+ } else {
70
+ smallDialog.setAttribute("open", true);
71
+ }
72
+ });
73
+ });
74
+ }
75
+
76
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
77
+ // See LICENSE in the project root for license information.
78
+
79
+ // ---------------------------------------------------------------------
80
+
81
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
82
+
83
+ class AuroLibraryRuntimeUtils {
84
+
85
+ /* eslint-disable jsdoc/require-param */
86
+
87
+ /**
88
+ * This will register a new custom element with the browser.
89
+ * @param {String} name - The name of the custom element.
90
+ * @param {Object} componentClass - The class to register as a custom element.
91
+ * @returns {void}
92
+ */
93
+ registerComponent(name, componentClass) {
94
+ if (!customElements.get(name)) {
95
+ customElements.define(name, class extends componentClass {});
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Finds and returns the closest HTML Element based on a selector.
101
+ * @returns {void}
102
+ */
103
+ closestElement(
104
+ selector, // selector like in .closest()
105
+ base = this, // extra functionality to skip a parent
106
+ __Closest = (el, found = el && el.closest(selector)) =>
107
+ !el || el === document || el === window
108
+ ? null // standard .closest() returns null for non-found selectors also
109
+ : found
110
+ ? found // found a selector INside this element
111
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
112
+ ) {
113
+ return __Closest(base);
114
+ }
115
+ /* eslint-enable jsdoc/require-param */
116
+
117
+ /**
118
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
119
+ * @param {Object} elem - The element to check.
120
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
121
+ * @returns {void}
122
+ */
123
+ handleComponentTagRename(elem, tagName) {
124
+ const tag = tagName.toLowerCase();
125
+ const elemTag = elem.tagName.toLowerCase();
126
+
127
+ if (elemTag !== tag) {
128
+ elem.setAttribute(tag, true);
129
+ }
130
+ }
131
+
132
+ /**
133
+ * Validates if an element is a specific Auro component.
134
+ * @param {Object} elem - The element to validate.
135
+ * @param {String} tagName - The name of the Auro component to check against.
136
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
137
+ */
138
+ elementMatch(elem, tagName) {
139
+ const tag = tagName.toLowerCase();
140
+ const elemTag = elem.tagName.toLowerCase();
141
+
142
+ return elemTag === tag || elem.hasAttribute(tag);
143
+ }
144
+
145
+ /**
146
+ * Gets the text content of a named slot.
147
+ * @returns {String}
148
+ * @private
149
+ */
150
+ getSlotText(elem, name) {
151
+ const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
152
+ const nodes = slot?.assignedNodes({ flatten: true }) || [];
153
+ const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
154
+
155
+ return text || null;
156
+ }
157
+ }
158
+
159
+ /**
160
+ * @license
161
+ * Copyright 2019 Google LLC
162
+ * SPDX-License-Identifier: BSD-3-Clause
163
+ */
164
+ const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$3=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$3)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$4&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$3("string"==typeof t?t:t+"",void 0,s$3),i$5=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new n$3(o,t,s$3)},S$2=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t$2.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$3=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
165
+
166
+ /**
167
+ * @license
168
+ * Copyright 2017 Google LLC
169
+ * SPDX-License-Identifier: BSD-3-Clause
170
+ */const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$2,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$2=a$2.trustedTypes,l$3=c$2?c$2.emptyScript:"",p$3=a$2.reactiveElementPolyfillSupport,d$2=(t,s)=>t,u$4={toAttribute(t,s){switch(s){case Boolean:t=t?l$3:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$3=(t,s)=>!i$4(t,s),b$2={attribute:true,type:String,converter:u$4,reflect:false,useDefault:false,hasChanged:f$3};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$3 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b$2){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$2(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b$2}static _$Ei(){if(this.hasOwnProperty(d$2("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$2("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$2("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$3(s));}else void 0!==s&&i.push(c$3(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$2(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$4).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$4;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i,e=false,h){if(void 0!==t){const r=this.constructor;if(false===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f$3)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM();}updated(t){}firstUpdated(t){}};y$3.elementStyles=[],y$3.shadowRootOptions={mode:"open"},y$3[d$2("elementProperties")]=new Map,y$3[d$2("finalized")]=new Map,p$3?.({ReactiveElement:y$3}),(a$2.reactiveElementVersions??=[]).push("2.1.2");
171
+
172
+ /**
173
+ * @license
174
+ * Copyright 2017 Google LLC
175
+ * SPDX-License-Identifier: BSD-3-Clause
176
+ */
177
+ const t$1=globalThis,i$3=t=>t,s$2=t$1.trustedTypes,e$2=s$2?s$2.createPolicy("lit-html",{createHTML:t=>t}):void 0,h$1="$lit$",o$3=`lit$${Math.random().toFixed(9).slice(2)}$`,n$1="?"+o$3,r=`<${n$1}>`,l$2=document,c$1=()=>l$2.createComment(""),a$1=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u$3=Array.isArray,d$1=t=>u$3(t)||"function"==typeof t?.[Symbol.iterator],f$2="[ \t\n\f\r]",v$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_$1=/-->/g,m$2=/>/g,p$2=RegExp(`>|${f$2}(?:([^\\s"'>=/]+)(${f$2}*=${f$2}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g$2=/'/g,$=/"/g,y$2=/^(?:script|style|textarea|title)$/i,x$1=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b$1=x$1(1),E=Symbol.for("lit-noChange"),A$1=Symbol.for("lit-nothing"),C$1=new WeakMap,P=l$2.createTreeWalker(l$2,129);function V(t,i){if(!u$3(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e$2?e$2.createHTML(i):i}const N$1=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?"<svg>":3===i?"<math>":"",c=v$1;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v$1?"!--"===u[1]?c=_$1:void 0!==u[1]?c=m$2:void 0!==u[2]?(y$2.test(u[2])&&(n=RegExp("</"+u[2],"g")),c=p$2):void 0!==u[3]&&(c=p$2):c===p$2?">"===u[0]?(c=n??v$1,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p$2:'"'===u[3]?$:g$2):c===$||c===g$2?c=p$2:c===_$1||c===m$2?c=v$1:(c=p$2,n=void 0);const x=c===p$2&&t[i+1].startsWith("/>")?" ":"";l+=c===v$1?s+r:d>=0?(e.push(a),s.slice(0,d)+h$1+s.slice(d)+o$3+x):s+o$3+(-2===d?i:x);}return [V(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),e]};let S$1 = class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N$1(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h$1)){const i=v[a++],s=r.getAttribute(t).split(o$3),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:"."===e[1]?I:"?"===e[1]?L:"@"===e[1]?z$2:H$1}),r.removeAttribute(t);}else t.startsWith(o$3)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y$2.test(r.tagName)){const t=r.textContent.split(o$3),i=t.length-1;if(i>0){r.textContent=s$2?s$2.emptyScript:"";for(let s=0;s<i;s++)r.append(t[s],c$1()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c$1());}}}else if(8===r.nodeType)if(r.data===n$1)d.push({type:2,index:l});else {let t=-1;for(;-1!==(t=r.data.indexOf(o$3,t+1));)d.push({type:7,index:l}),t+=o$3.length-1;}l++;}}static createElement(t,i){const s=l$2.createElement("template");return s.innerHTML=t,s}};function M$2(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a$1(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M$2(t,h._$AS(t,i.values),h,e)),i}let R$1 = class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l$2).importNode(i,true);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k$2(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n];}o!==r?.index&&(h=P.nextNode(),o++);}return P.currentNode=l$2,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};let k$2 = class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A$1,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M$2(this,t,i),a$1(t)?t===A$1||null==t||""===t?(this._$AH!==A$1&&this._$AR(),this._$AH=A$1):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d$1(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==A$1&&a$1(this._$AH)?this._$AA.nextSibling.data=t:this.T(l$2.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S$1.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new R$1(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=C$1.get(t.strings);return void 0===i&&C$1.set(t.strings,i=new S$1(t)),i}k(t){u$3(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c$1()),this.O(c$1()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(false,true,s);t!==this._$AB;){const s=i$3(t).nextSibling;i$3(t).remove(),t=s;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};let H$1 = class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A$1,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A$1;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=M$2(this,t,i,0),o=!a$1(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M$2(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a$1(r)||r!==this._$AH[n],r===A$1?t=A$1:t!==A$1&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===A$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};class I extends H$1{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A$1?void 0:t;}}class L extends H$1{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A$1);}}let z$2 = class z extends H$1{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=M$2(this,t,i,0)??A$1)===E)return;const s=this._$AH,e=t===A$1&&s!==A$1||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A$1&&(s===A$1||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}};class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){M$2(this,t);}}const B$1=t$1.litHtmlPolyfillSupport;B$1?.(S$1,k$2),(t$1.litHtmlVersions??=[]).push("3.3.3");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k$2(i.insertBefore(c$1(),t),t,void 0,s??{});}return h._$AI(t),h};
178
+
179
+ /**
180
+ * @license
181
+ * Copyright 2017 Google LLC
182
+ * SPDX-License-Identifier: BSD-3-Clause
183
+ */const s$1=globalThis;let i$2 = class i extends y$3{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=D(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return E}};i$2._$litElement$=true,i$2["finalized"]=true,s$1.litElementHydrateSupport?.({LitElement:i$2});const o$2=s$1.litElementPolyfillSupport;o$2?.({LitElement:i$2});(s$1.litElementVersions??=[]).push("4.2.2");
184
+
185
+ /**
186
+ * @license
187
+ * Copyright 2017 Google LLC
188
+ * SPDX-License-Identifier: BSD-3-Clause
189
+ */
190
+ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};
191
+
192
+ /**
193
+ * @license
194
+ * Copyright 2018 Google LLC
195
+ * SPDX-License-Identifier: BSD-3-Clause
196
+ */const e=e$1(class extends i$1{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter(s=>t[s]).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return E}});
197
+
198
+ /**
199
+ * @license
200
+ * Copyright 2018 Google LLC
201
+ * SPDX-License-Identifier: BSD-3-Clause
202
+ */const o$1=o=>o??A$1;
203
+
204
+ /**
205
+ * @license
206
+ * Copyright 2020 Google LLC
207
+ * SPDX-License-Identifier: BSD-3-Clause
208
+ */
209
+ const a=Symbol.for(""),o=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1],t[0]),r:a}),l$1=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l$1.get(t))&&(n.raw=n,l$1.set(t,r=n)),e=u;}return t(r,...e)},u$2=n(b$1);
210
+
211
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
212
+ // See LICENSE in the project root for license information.
213
+
214
+
215
+ class AuroDependencyVersioning {
216
+
217
+ /**
218
+ * Generates a unique string to be used for child auro element naming.
219
+ * @private
220
+ * @param {string} baseName - Defines the first part of the unique element name.
221
+ * @param {string} version - Version of the component that will be appended to the baseName.
222
+ * @returns {string} - Unique string to be used for naming.
223
+ */
224
+ generateElementName(baseName, version) {
225
+ let result = baseName;
226
+
227
+ result += '-';
228
+ result += version.replace(/[.]/g, '_');
229
+
230
+ return result;
231
+ }
232
+
233
+ /**
234
+ * Generates a unique string to be used for child auro element naming.
235
+ * @param {string} baseName - Defines the first part of the unique element name.
236
+ * @param {string} version - Version of the component that will be appended to the baseName.
237
+ * @returns {string} - Unique string to be used for naming.
238
+ */
239
+ generateTag(baseName, version, tagClass) {
240
+ const elementName = this.generateElementName(baseName, version);
241
+ const tag = i`${s(elementName)}`;
242
+
243
+ if (!customElements.get(elementName)) {
244
+ customElements.define(elementName, class extends tagClass {});
245
+ }
246
+
247
+ return tag;
248
+ }
249
+ }
250
+
251
+ // Selectors for focusable elements
252
+ const FOCUSABLE_SELECTORS = [
253
+ "a[href]",
254
+ "button:not([disabled])",
255
+ "textarea:not([disabled])",
256
+ "input:not([disabled])",
257
+ "select:not([disabled])",
258
+ '[role="tab"]:not([disabled])',
259
+ '[role="link"]:not([disabled])',
260
+ '[role="button"]:not([disabled])',
261
+ '[tabindex]:not([tabindex="-1"])',
262
+ '[contenteditable]:not([contenteditable="false"])',
263
+ ];
264
+
265
+ // List of custom components that are known to be focusable
266
+ const FOCUSABLE_COMPONENTS = [
267
+ "auro-checkbox",
268
+ "auro-radio",
269
+ "auro-dropdown",
270
+ "auro-button",
271
+ "auro-combobox",
272
+ "auro-input",
273
+ "auro-counter",
274
+ // 'auro-menu', // Auro menu is not focusable by default, it uses a different interaction model
275
+ "auro-select",
276
+ "auro-datepicker",
277
+ "auro-hyperlink",
278
+ "auro-accordion",
279
+ ];
280
+
281
+ /**
282
+ * Determines if a given element is a custom focusable component.
283
+ * Returns true if the element matches a known focusable component and is not disabled.
284
+ *
285
+ * @param {HTMLElement} element The element to check for focusability.
286
+ * @returns {boolean} True if the element is a focusable custom component, false otherwise.
287
+ */
288
+ function isFocusableComponent(element) {
289
+ const componentName = element.tagName.toLowerCase();
290
+
291
+ // Guard Clause: Element is a focusable component
292
+ if (
293
+ !FOCUSABLE_COMPONENTS.some(
294
+ (name) => element.hasAttribute(name) || componentName === name,
295
+ )
296
+ )
297
+ return false;
298
+
299
+ // Guard Clause: Element is not disabled
300
+ if (element.hasAttribute("disabled")) return false;
301
+
302
+ // Guard Clause: The element is a hyperlink and has no href attribute
303
+ if (componentName.match("hyperlink") && !element.hasAttribute("href"))
304
+ return false;
305
+
306
+ // If all guard clauses pass, the element is a focusable component
307
+ return true;
308
+ }
309
+
310
+ /**
311
+ * Safely get a numeric tabindex for an element.
312
+ * Returns a number if the tabindex is a valid integer, otherwise null.
313
+ *
314
+ * @param {HTMLElement} element The element whose tabindex to read.
315
+ * @returns {?number} The numeric tabindex or null if missing/invalid.
316
+ */
317
+ function getNumericTabIndex(element) {
318
+ const raw = element.getAttribute("tabindex");
319
+ if (raw == null) return null;
320
+
321
+ const value = Number.parseInt(raw, 10);
322
+ return Number.isNaN(value) ? null : value;
323
+ }
324
+
325
+ /**
326
+ * Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
327
+ * Returns a unique, ordered array of elements that can receive focus.
328
+ * Also sorts elements with tabindex first, preserving their order.
329
+ *
330
+ * @param {HTMLElement} container The container to search within
331
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
332
+ */
333
+ function getFocusableElements(container) {
334
+ // Get elements in DOM order by walking the tree
335
+ const orderedFocusableElements = [];
336
+
337
+ // Define a recursive function to collect focusable elements in DOM order
338
+ const collectFocusableElements = (root) => {
339
+ // Check if current element is focusable
340
+ if (root.nodeType === Node.ELEMENT_NODE) {
341
+ // Check if this is a custom component that is focusable
342
+ const isComponentFocusable = isFocusableComponent(root);
343
+
344
+ if (isComponentFocusable) {
345
+ // Add the component itself as a focusable element and don't traverse its shadow DOM
346
+ orderedFocusableElements.push(root);
347
+ return; // Skip traversing inside this component
348
+ }
349
+
350
+ // Check if the element itself matches any selector
351
+ for (const selector of FOCUSABLE_SELECTORS) {
352
+ if (root.matches?.(selector)) {
353
+ orderedFocusableElements.push(root);
354
+ break; // Once we know it's focusable, no need to check other selectors
355
+ }
356
+ }
357
+
358
+ // Process shadow DOM only for non-Auro components
359
+ if (root.shadowRoot) {
360
+ // Process shadow DOM children in order
361
+ if (root.shadowRoot.children) {
362
+ Array.from(root.shadowRoot.children).forEach((child) => {
363
+ collectFocusableElements(child);
364
+ });
365
+ }
366
+ }
367
+
368
+ // Process slots and their assigned nodes in order
369
+ if (root.tagName === "SLOT") {
370
+ const assignedNodes = root.assignedNodes({ flatten: true });
371
+ for (const node of assignedNodes) {
372
+ collectFocusableElements(node);
373
+ }
374
+ } else {
375
+ // Process light DOM children in order
376
+ if (root.children) {
377
+ Array.from(root.children).forEach((child) => {
378
+ collectFocusableElements(child);
379
+ });
380
+ }
381
+ }
382
+ }
383
+ };
384
+
385
+ // Start the traversal from the container
386
+ collectFocusableElements(container);
387
+
388
+ // Remove duplicates that might have been collected through different paths
389
+ // while preserving order
390
+ const uniqueElements = [];
391
+ const seen = new Set();
392
+
393
+ for (const element of orderedFocusableElements) {
394
+ if (!seen.has(element)) {
395
+ seen.add(element);
396
+ uniqueElements.push(element);
397
+ }
398
+ }
399
+
400
+ // Move tab-indexed elements to the front while preserving their order
401
+ // This ensures that elements with tabindex are prioritized in the focus order
402
+
403
+ // First extract elements with valid positive tabindex
404
+ const elementsWithTabindex = uniqueElements.filter((el) => {
405
+ const tabindex = getNumericTabIndex(el);
406
+ return tabindex !== null && tabindex > 0;
407
+ });
408
+
409
+ // Sort these elements by their tabindex value
410
+ elementsWithTabindex.sort((a, b) => {
411
+ const aIndex = getNumericTabIndex(a) ?? 0;
412
+ const bIndex = getNumericTabIndex(b) ?? 0;
413
+ return aIndex - bIndex;
414
+ });
415
+
416
+ // Elements without tabindex (preserving their original order)
417
+ const elementsWithoutTabindex = uniqueElements.filter((el) => {
418
+ const tabindex = getNumericTabIndex(el);
419
+
420
+ // Elements without tabindex or with tabindex of 0 stay in DOM order
421
+ return tabindex === null || tabindex === 0;
422
+ });
423
+
424
+ // Combine both arrays with tabindex elements first
425
+ const tabIndexedUniqueElements = [
426
+ ...elementsWithTabindex,
427
+ ...elementsWithoutTabindex,
428
+ ];
429
+
430
+ return tabIndexedUniqueElements;
431
+ }
432
+
433
+ /**
434
+ * FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
435
+ * It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
436
+ */
437
+ class FocusTrap {
438
+ /**
439
+ * Creates a new FocusTrap instance for the given container element.
440
+ * Initializes event listeners and prepares the container for focus management.
441
+ *
442
+ * @param {HTMLElement} container The DOM element to trap focus within.
443
+ * @param {boolean} [controlTabOrder=false] If true enables manual control of the tab order by the FocusTrap.
444
+ * @throws {Error} If the provided container is not a valid HTMLElement.
445
+ */
446
+ constructor(container, controlTabOrder = false) {
447
+ if (!container || !(container instanceof HTMLElement)) {
448
+ throw new Error("FocusTrap requires a valid HTMLElement.");
449
+ }
450
+
451
+ this.container = container;
452
+ this.tabDirection = "forward"; // or 'backward';
453
+ this.controlTabOrder = controlTabOrder;
454
+
455
+ this._init();
456
+ }
457
+
458
+ /**
459
+ * Initializes the focus trap by setting up event listeners and attributes on the container.
460
+ * Prepares the container for focus management, including support for shadow DOM and inert attributes.
461
+ *
462
+ * @private
463
+ */
464
+ _init() {
465
+ // Add inert attribute to prevent focusing programmatically as well (if supported)
466
+ if ("inert" in HTMLElement.prototype) {
467
+ this.container.inert = false; // Ensure the container isn't inert
468
+ this.container.setAttribute("data-focus-trap-container", true); // Mark for identification
469
+ }
470
+
471
+ // Track tab direction
472
+ this.container.addEventListener("keydown", this._onKeydown);
473
+ }
474
+
475
+ /**
476
+ * Gets an array of currently active (focused) elements in the document and shadow DOM.
477
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
478
+ * @private
479
+ */
480
+ _getActiveElements() {
481
+ // Get the active element(s) in the document and shadow root
482
+ // This will include the active element in the shadow DOM if it exists
483
+ // Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
484
+ let { activeElement } = document;
485
+ const actives = [activeElement];
486
+ while (activeElement?.shadowRoot?.activeElement) {
487
+ actives.push(activeElement.shadowRoot.activeElement);
488
+ activeElement = activeElement.shadowRoot.activeElement;
489
+ }
490
+ return actives;
491
+ }
492
+
493
+ /**
494
+ * Gets the next focus index based on the current index and focusable elements.
495
+ * @param {number} currentIndex The current index of the focused element.
496
+ * @param {Array<HTMLElement>} focusables The array of focusable elements.
497
+ * @returns {number|null} The next focus index or null if not determined.
498
+ */
499
+ _getNextFocusIndex(currentIndex, focusables, actives) {
500
+ if (this.controlTabOrder) {
501
+ // Calculate the new index based on the current index and tab direction
502
+ let newFocusIndex =
503
+ currentIndex + (this.tabDirection === "forward" ? 1 : -1);
504
+
505
+ // Wrap-around logic
506
+ if (newFocusIndex < 0) newFocusIndex = focusables.length - 1;
507
+ if (newFocusIndex >= focusables.length) newFocusIndex = 0;
508
+
509
+ // Early return with the new index
510
+ return newFocusIndex;
511
+ }
512
+
513
+ // Determine if we need to wrap
514
+ const atFirst =
515
+ actives.includes(focusables[0]) || actives.includes(this.container);
516
+ const atLast = actives.includes(focusables[focusables.length - 1]);
517
+
518
+ // Only wrap if at the ends
519
+ if (this.tabDirection === "backward" && atFirst) {
520
+ return focusables.length - 1;
521
+ }
522
+
523
+ if (this.tabDirection === "forward" && atLast) {
524
+ return 0;
525
+ }
526
+
527
+ // No wrap, so don't change focus, return early
528
+ return null;
529
+ }
530
+
531
+ /**
532
+ * Handles the Tab key press event to manage focus within the container.
533
+ * @param {KeyboardEvent} e The keyboard event triggered by the user.
534
+ * @returns {void}
535
+ */
536
+ _handleTabKey(e) {
537
+ // Update the focusable elements
538
+ const focusables = this._getFocusableElements();
539
+
540
+ // If there are no focusable elements, exit
541
+ if (!focusables.length) return;
542
+
543
+ // Set the tab direction based on the key pressed
544
+ this.tabDirection = e.shiftKey ? "backward" : "forward";
545
+
546
+ // Get the active elements that are currently focused
547
+ const actives = this._getActiveElements();
548
+
549
+ // If we're at either end of the focusable elements, wrap around to the other end
550
+ let focusIndex = focusables.findIndex((el) => actives.includes(el));
551
+
552
+ // Fallback if we have no focused element
553
+ if (focusIndex === -1) focusIndex = 0;
554
+
555
+ // Get the next focus index based on the current focus index, tab direction, and controlTabOrder setting
556
+ // Is null if no new focus index is determined
557
+ const newFocusIndex = this._getNextFocusIndex(
558
+ focusIndex,
559
+ focusables,
560
+ actives,
561
+ );
562
+
563
+ // If we have a new focus index, set focus to that element
564
+ if (newFocusIndex !== null) {
565
+ e.preventDefault();
566
+ focusables[newFocusIndex].focus();
567
+ }
568
+ }
569
+
570
+ /**
571
+ * Catches the keydown event
572
+ * @param {KeyboardEvent} e The keyboard event triggered by user interaction.
573
+ * @private
574
+ */
575
+ _onKeydown = (e) => {
576
+ // Handle tab
577
+ if (e.key === "Tab") this._handleTabKey(e);
578
+ };
579
+
580
+ /**
581
+ * Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
582
+ * Returns a unique, ordered array of elements that can receive focus.
583
+ *
584
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
585
+ * @private
586
+ */
587
+ _getFocusableElements() {
588
+ // Use the imported utility function to get focusable elements
589
+ const elements = getFocusableElements(this.container);
590
+
591
+ // Return the elements found
592
+ return elements;
593
+ }
594
+
595
+ /**
596
+ * Moves focus to the first focusable element within the container.
597
+ * Useful for setting initial focus when activating the focus trap.
598
+ */
599
+ focusFirstElement() {
600
+ const focusables = this._getFocusableElements();
601
+ if (focusables.length) focusables[0].focus();
602
+ }
603
+
604
+ /**
605
+ * Moves focus to the last focusable element within the container.
606
+ * Useful for setting focus when deactivating or cycling focus in reverse.
607
+ */
608
+ focusLastElement() {
609
+ const focusables = this._getFocusableElements();
610
+ if (focusables.length) focusables[focusables.length - 1].focus();
611
+ }
612
+
613
+ /**
614
+ * Removes event listeners and attributes added by the focus trap.
615
+ * Call this method to clean up when the focus trap is no longer needed.
616
+ */
617
+ disconnect() {
618
+ if (this.container.hasAttribute("data-focus-trap-container")) {
619
+ this.container.removeAttribute("data-focus-trap-container");
620
+ }
621
+
622
+ this.container.removeEventListener("keydown", this._onKeydown);
623
+ }
624
+ }
625
+
626
+ /**
627
+ * Custom positioning reference element.
628
+ * @see https://floating-ui.com/docs/virtual-elements
629
+ */
630
+
631
+ const sides = ['top', 'right', 'bottom', 'left'];
632
+ const alignments = ['start', 'end'];
633
+ const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
634
+ const min = Math.min;
635
+ const max = Math.max;
636
+ const round = Math.round;
637
+ const floor = Math.floor;
638
+ const createCoords = v => ({
639
+ x: v,
640
+ y: v
641
+ });
642
+ const oppositeSideMap = {
643
+ left: 'right',
644
+ right: 'left',
645
+ bottom: 'top',
646
+ top: 'bottom'
647
+ };
648
+ function clamp(start, value, end) {
649
+ return max(start, min(value, end));
650
+ }
651
+ function evaluate(value, param) {
652
+ return typeof value === 'function' ? value(param) : value;
653
+ }
654
+ function getSide(placement) {
655
+ return placement.split('-')[0];
656
+ }
657
+ function getAlignment(placement) {
658
+ return placement.split('-')[1];
659
+ }
660
+ function getOppositeAxis(axis) {
661
+ return axis === 'x' ? 'y' : 'x';
662
+ }
663
+ function getAxisLength(axis) {
664
+ return axis === 'y' ? 'height' : 'width';
665
+ }
666
+ function getSideAxis(placement) {
667
+ const firstChar = placement[0];
668
+ return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
669
+ }
670
+ function getAlignmentAxis(placement) {
671
+ return getOppositeAxis(getSideAxis(placement));
672
+ }
673
+ function getAlignmentSides(placement, rects, rtl) {
674
+ if (rtl === void 0) {
675
+ rtl = false;
676
+ }
677
+ const alignment = getAlignment(placement);
678
+ const alignmentAxis = getAlignmentAxis(placement);
679
+ const length = getAxisLength(alignmentAxis);
680
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
681
+ if (rects.reference[length] > rects.floating[length]) {
682
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
683
+ }
684
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
685
+ }
686
+ function getExpandedPlacements(placement) {
687
+ const oppositePlacement = getOppositePlacement(placement);
688
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
689
+ }
690
+ function getOppositeAlignmentPlacement(placement) {
691
+ return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
692
+ }
693
+ const lrPlacement = ['left', 'right'];
694
+ const rlPlacement = ['right', 'left'];
695
+ const tbPlacement = ['top', 'bottom'];
696
+ const btPlacement = ['bottom', 'top'];
697
+ function getSideList(side, isStart, rtl) {
698
+ switch (side) {
699
+ case 'top':
700
+ case 'bottom':
701
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
702
+ return isStart ? lrPlacement : rlPlacement;
703
+ case 'left':
704
+ case 'right':
705
+ return isStart ? tbPlacement : btPlacement;
706
+ default:
707
+ return [];
708
+ }
709
+ }
710
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
711
+ const alignment = getAlignment(placement);
712
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
713
+ if (alignment) {
714
+ list = list.map(side => side + "-" + alignment);
715
+ if (flipAlignment) {
716
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
717
+ }
718
+ }
719
+ return list;
720
+ }
721
+ function getOppositePlacement(placement) {
722
+ const side = getSide(placement);
723
+ return oppositeSideMap[side] + placement.slice(side.length);
724
+ }
725
+ function expandPaddingObject(padding) {
726
+ var _padding$top, _padding$right, _padding$bottom, _padding$left;
727
+ return {
728
+ top: (_padding$top = padding.top) != null ? _padding$top : 0,
729
+ right: (_padding$right = padding.right) != null ? _padding$right : 0,
730
+ bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,
731
+ left: (_padding$left = padding.left) != null ? _padding$left : 0
732
+ };
733
+ }
734
+ function getPaddingObject(padding) {
735
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
736
+ top: padding,
737
+ right: padding,
738
+ bottom: padding,
739
+ left: padding
740
+ };
741
+ }
742
+ function rectToClientRect(rect) {
743
+ const {
744
+ x,
745
+ y,
746
+ width,
747
+ height
748
+ } = rect;
749
+ return {
750
+ width,
751
+ height,
752
+ top: y,
753
+ left: x,
754
+ right: x + width,
755
+ bottom: y + height,
756
+ x,
757
+ y
758
+ };
759
+ }
760
+
761
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
762
+ let {
763
+ reference,
764
+ floating
765
+ } = _ref;
766
+ const sideAxis = getSideAxis(placement);
767
+ const alignmentAxis = getAlignmentAxis(placement);
768
+ const alignLength = getAxisLength(alignmentAxis);
769
+ const side = getSide(placement);
770
+ const isVertical = sideAxis === 'y';
771
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
772
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
773
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
774
+ let coords;
775
+ switch (side) {
776
+ case 'top':
777
+ coords = {
778
+ x: commonX,
779
+ y: reference.y - floating.height
780
+ };
781
+ break;
782
+ case 'bottom':
783
+ coords = {
784
+ x: commonX,
785
+ y: reference.y + reference.height
786
+ };
787
+ break;
788
+ case 'right':
789
+ coords = {
790
+ x: reference.x + reference.width,
791
+ y: commonY
792
+ };
793
+ break;
794
+ case 'left':
795
+ coords = {
796
+ x: reference.x - floating.width,
797
+ y: commonY
798
+ };
799
+ break;
800
+ default:
801
+ coords = {
802
+ x: reference.x,
803
+ y: reference.y
804
+ };
805
+ }
806
+ const alignment = getAlignment(placement);
807
+ if (alignment) {
808
+ coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);
809
+ }
810
+ return coords;
811
+ }
812
+
813
+ /**
814
+ * Resolves with an object of overflow side offsets that determine how much the
815
+ * element is overflowing a given clipping boundary on each side.
816
+ * - positive = overflowing the boundary by that number of pixels
817
+ * - negative = how many pixels left before it will overflow
818
+ * - 0 = lies flush with the boundary
819
+ * @see https://floating-ui.com/docs/detectOverflow
820
+ */
821
+ async function detectOverflow(state, options) {
822
+ var _await$platform$isEle;
823
+ if (options === void 0) {
824
+ options = {};
825
+ }
826
+ const {
827
+ x,
828
+ y,
829
+ platform,
830
+ rects,
831
+ elements,
832
+ strategy
833
+ } = state;
834
+ const {
835
+ boundary = 'clippingAncestors',
836
+ rootBoundary = 'viewport',
837
+ elementContext = 'floating',
838
+ altBoundary = false,
839
+ padding = 0
840
+ } = evaluate(options, state);
841
+ const paddingObject = getPaddingObject(padding);
842
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
843
+ const element = elements[altBoundary ? altContext : elementContext];
844
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
845
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
846
+ boundary,
847
+ rootBoundary,
848
+ strategy
849
+ }));
850
+ const rect = elementContext === 'floating' ? {
851
+ x,
852
+ y,
853
+ width: rects.floating.width,
854
+ height: rects.floating.height
855
+ } : rects.reference;
856
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
857
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
858
+ x: 1,
859
+ y: 1
860
+ };
861
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
862
+ elements,
863
+ rect,
864
+ offsetParent,
865
+ strategy
866
+ }) : rect);
867
+ return {
868
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
869
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
870
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
871
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
872
+ };
873
+ }
874
+
875
+ // Maximum number of resets that can occur before bailing to avoid infinite reset loops.
876
+ const MAX_RESET_COUNT = 50;
877
+
878
+ /**
879
+ * Computes the `x` and `y` coordinates that will place the floating element
880
+ * next to a given reference element.
881
+ *
882
+ * This export does not have any `platform` interface logic. You will need to
883
+ * write one for the platform you are using Floating UI with.
884
+ */
885
+ const computePosition$1 = async (reference, floating, config) => {
886
+ const {
887
+ placement = 'bottom',
888
+ strategy = 'absolute',
889
+ middleware = [],
890
+ platform
891
+ } = config;
892
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
893
+ ...platform,
894
+ detectOverflow
895
+ };
896
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
897
+ let rects = await platform.getElementRects({
898
+ reference,
899
+ floating,
900
+ strategy
901
+ });
902
+ let {
903
+ x,
904
+ y
905
+ } = computeCoordsFromPlacement(rects, placement, rtl);
906
+ let statefulPlacement = placement;
907
+ let resetCount = 0;
908
+ const middlewareData = {};
909
+ for (let i = 0; i < middleware.length; i++) {
910
+ const currentMiddleware = middleware[i];
911
+ if (!currentMiddleware) {
912
+ continue;
913
+ }
914
+ const {
915
+ name,
916
+ fn
917
+ } = currentMiddleware;
918
+ const {
919
+ x: nextX,
920
+ y: nextY,
921
+ data,
922
+ reset
923
+ } = await fn({
924
+ x,
925
+ y,
926
+ initialPlacement: placement,
927
+ placement: statefulPlacement,
928
+ strategy,
929
+ middlewareData,
930
+ rects,
931
+ platform: platformWithDetectOverflow,
932
+ elements: {
933
+ reference,
934
+ floating
935
+ }
936
+ });
937
+ x = nextX != null ? nextX : x;
938
+ y = nextY != null ? nextY : y;
939
+ middlewareData[name] = {
940
+ ...middlewareData[name],
941
+ ...data
942
+ };
943
+ if (reset && resetCount < MAX_RESET_COUNT) {
944
+ resetCount++;
945
+ if (typeof reset === 'object') {
946
+ if (reset.placement) {
947
+ statefulPlacement = reset.placement;
948
+ }
949
+ if (reset.rects) {
950
+ rects = reset.rects === true ? await platform.getElementRects({
951
+ reference,
952
+ floating,
953
+ strategy
954
+ }) : reset.rects;
955
+ }
956
+ ({
957
+ x,
958
+ y
959
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
960
+ }
961
+ i = -1;
962
+ }
963
+ }
964
+ return {
965
+ x,
966
+ y,
967
+ placement: statefulPlacement,
968
+ strategy,
969
+ middlewareData
970
+ };
971
+ };
972
+
973
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
974
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
975
+ return allowedPlacementsSortedByAlignment.filter(placement => {
976
+ if (alignment) {
977
+ return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
978
+ }
979
+ return true;
980
+ });
981
+ }
982
+ /**
983
+ * Optimizes the visibility of the floating element by choosing the placement
984
+ * that has the most space available automatically, without needing to specify a
985
+ * preferred placement. Alternative to `flip`.
986
+ * @see https://floating-ui.com/docs/autoPlacement
987
+ */
988
+ const autoPlacement$1 = function (options) {
989
+ if (options === void 0) {
990
+ options = {};
991
+ }
992
+ return {
993
+ name: 'autoPlacement',
994
+ options,
995
+ async fn(state) {
996
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
997
+ const {
998
+ rects,
999
+ middlewareData,
1000
+ placement,
1001
+ platform,
1002
+ elements
1003
+ } = state;
1004
+ const {
1005
+ crossAxis = false,
1006
+ alignment,
1007
+ allowedPlacements = placements,
1008
+ autoAlignment = true,
1009
+ ...detectOverflowOptions
1010
+ } = evaluate(options, state);
1011
+ const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
1012
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
1013
+ const currentPlacement = placements$1[currentIndex];
1014
+ if (currentPlacement == null) {
1015
+ return {};
1016
+ }
1017
+
1018
+ // Make `computeCoords` start from the right place.
1019
+ if (placement !== currentPlacement) {
1020
+ return {
1021
+ reset: {
1022
+ placement: placements$1[0]
1023
+ }
1024
+ };
1025
+ }
1026
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
1027
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
1028
+ const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
1029
+ const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
1030
+ placement: currentPlacement,
1031
+ overflows: currentOverflows
1032
+ }];
1033
+ const nextPlacement = placements$1[currentIndex + 1];
1034
+
1035
+ // There are more placements to check.
1036
+ if (nextPlacement) {
1037
+ return {
1038
+ data: {
1039
+ index: currentIndex + 1,
1040
+ overflows: allOverflows
1041
+ },
1042
+ reset: {
1043
+ placement: nextPlacement
1044
+ }
1045
+ };
1046
+ }
1047
+ const placementsSortedByMostSpace = allOverflows.map(d => {
1048
+ const alignment = getAlignment(d.placement);
1049
+ return [d.placement, alignment && crossAxis ?
1050
+ // Check along the mainAxis and main crossAxis side.
1051
+ d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
1052
+ // Check only the mainAxis.
1053
+ d.overflows[0], d.overflows];
1054
+ }).sort((a, b) => a[1] - b[1]);
1055
+ const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
1056
+ // Aligned placements should not check their opposite crossAxis
1057
+ // side.
1058
+ getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
1059
+ const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
1060
+ if (resetPlacement !== placement) {
1061
+ return {
1062
+ data: {
1063
+ index: currentIndex + 1,
1064
+ overflows: allOverflows
1065
+ },
1066
+ reset: {
1067
+ placement: resetPlacement
1068
+ }
1069
+ };
1070
+ }
1071
+ return {};
1072
+ }
1073
+ };
1074
+ };
1075
+
1076
+ /**
1077
+ * Optimizes the visibility of the floating element by flipping the `placement`
1078
+ * in order to keep it in view when the preferred placement(s) will overflow the
1079
+ * clipping boundary. Alternative to `autoPlacement`.
1080
+ * @see https://floating-ui.com/docs/flip
1081
+ */
1082
+ const flip$1 = function (options) {
1083
+ if (options === void 0) {
1084
+ options = {};
1085
+ }
1086
+ return {
1087
+ name: 'flip',
1088
+ options,
1089
+ async fn(state) {
1090
+ var _middlewareData$arrow, _middlewareData$flip;
1091
+ const {
1092
+ placement,
1093
+ middlewareData,
1094
+ rects,
1095
+ initialPlacement,
1096
+ platform,
1097
+ elements
1098
+ } = state;
1099
+ const {
1100
+ mainAxis: checkMainAxis = true,
1101
+ crossAxis: checkCrossAxis = true,
1102
+ fallbackPlacements: specifiedFallbackPlacements,
1103
+ fallbackStrategy = 'bestFit',
1104
+ fallbackAxisSideDirection = 'none',
1105
+ flipAlignment = true,
1106
+ ...detectOverflowOptions
1107
+ } = evaluate(options, state);
1108
+
1109
+ // If a reset by the arrow was caused due to an alignment offset being
1110
+ // added, we should skip any logic now since `flip()` has already done its
1111
+ // work.
1112
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
1113
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
1114
+ return {};
1115
+ }
1116
+ const side = getSide(placement);
1117
+ const initialSideAxis = getSideAxis(initialPlacement);
1118
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
1119
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1120
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
1121
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
1122
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
1123
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
1124
+ }
1125
+ const placements = [initialPlacement, ...fallbackPlacements];
1126
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
1127
+ const overflows = [];
1128
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
1129
+ if (checkMainAxis) {
1130
+ overflows.push(overflow[side]);
1131
+ }
1132
+ if (checkCrossAxis) {
1133
+ const sides = getAlignmentSides(placement, rects, rtl);
1134
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
1135
+ }
1136
+ overflowsData = [...overflowsData, {
1137
+ placement,
1138
+ overflows
1139
+ }];
1140
+
1141
+ // One or more sides is overflowing.
1142
+ if (!overflows.every(side => side <= 0)) {
1143
+ var _middlewareData$flip2, _overflowsData$filter;
1144
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
1145
+ const nextPlacement = placements[nextIndex];
1146
+ if (nextPlacement) {
1147
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
1148
+ if (!ignoreCrossAxisOverflow ||
1149
+ // We leave the current main axis only if every placement on that axis
1150
+ // overflows the main axis.
1151
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
1152
+ // Try next placement and re-run the lifecycle.
1153
+ return {
1154
+ data: {
1155
+ index: nextIndex,
1156
+ overflows: overflowsData
1157
+ },
1158
+ reset: {
1159
+ placement: nextPlacement
1160
+ }
1161
+ };
1162
+ }
1163
+ }
1164
+
1165
+ // First, find the candidates that fit on the mainAxis side of overflow,
1166
+ // then find the placement that fits the best on the main crossAxis side.
1167
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
1168
+
1169
+ // Otherwise fallback.
1170
+ if (!resetPlacement) {
1171
+ switch (fallbackStrategy) {
1172
+ case 'bestFit':
1173
+ {
1174
+ var _overflowsData$filter2;
1175
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
1176
+ if (hasFallbackAxisSideDirection) {
1177
+ const currentSideAxis = getSideAxis(d.placement);
1178
+ return currentSideAxis === initialSideAxis ||
1179
+ // Create a bias to the `y` side axis due to horizontal
1180
+ // reading directions favoring greater width.
1181
+ currentSideAxis === 'y';
1182
+ }
1183
+ return true;
1184
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
1185
+ if (placement) {
1186
+ resetPlacement = placement;
1187
+ }
1188
+ break;
1189
+ }
1190
+ case 'initialPlacement':
1191
+ resetPlacement = initialPlacement;
1192
+ break;
1193
+ }
1194
+ }
1195
+ if (placement !== resetPlacement) {
1196
+ return {
1197
+ reset: {
1198
+ placement: resetPlacement
1199
+ }
1200
+ };
1201
+ }
1202
+ }
1203
+ return {};
1204
+ }
1205
+ };
1206
+ };
1207
+
1208
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
1209
+
1210
+ // For type backwards-compatibility, the `OffsetOptions` type was also
1211
+ // Derivable.
1212
+
1213
+ async function convertValueToCoords(state, options) {
1214
+ const {
1215
+ placement,
1216
+ platform,
1217
+ elements
1218
+ } = state;
1219
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1220
+ const side = getSide(placement);
1221
+ const alignment = getAlignment(placement);
1222
+ const isVertical = getSideAxis(placement) === 'y';
1223
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
1224
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
1225
+ const rawValue = evaluate(options, state);
1226
+
1227
+ // eslint-disable-next-line prefer-const
1228
+ let {
1229
+ mainAxis,
1230
+ crossAxis,
1231
+ alignmentAxis
1232
+ } = typeof rawValue === 'number' ? {
1233
+ mainAxis: rawValue,
1234
+ crossAxis: 0,
1235
+ alignmentAxis: null
1236
+ } : {
1237
+ mainAxis: rawValue.mainAxis || 0,
1238
+ crossAxis: rawValue.crossAxis || 0,
1239
+ alignmentAxis: rawValue.alignmentAxis
1240
+ };
1241
+ if (alignment && typeof alignmentAxis === 'number') {
1242
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
1243
+ }
1244
+ return isVertical ? {
1245
+ x: crossAxis * crossAxisMulti,
1246
+ y: mainAxis * mainAxisMulti
1247
+ } : {
1248
+ x: mainAxis * mainAxisMulti,
1249
+ y: crossAxis * crossAxisMulti
1250
+ };
1251
+ }
1252
+
1253
+ /**
1254
+ * Modifies the placement by translating the floating element along the
1255
+ * specified axes.
1256
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1257
+ * object may be passed.
1258
+ * @see https://floating-ui.com/docs/offset
1259
+ */
1260
+ const offset$1 = function (options) {
1261
+ if (options === void 0) {
1262
+ options = 0;
1263
+ }
1264
+ return {
1265
+ name: 'offset',
1266
+ options,
1267
+ async fn(state) {
1268
+ var _middlewareData$offse, _middlewareData$arrow;
1269
+ const {
1270
+ x,
1271
+ y,
1272
+ placement,
1273
+ middlewareData
1274
+ } = state;
1275
+ const diffCoords = await convertValueToCoords(state, options);
1276
+
1277
+ // If the placement is the same and the arrow caused an alignment offset
1278
+ // then we don't need to change the positioning coordinates.
1279
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
1280
+ return {};
1281
+ }
1282
+ return {
1283
+ x: x + diffCoords.x,
1284
+ y: y + diffCoords.y,
1285
+ data: {
1286
+ ...diffCoords,
1287
+ placement
1288
+ }
1289
+ };
1290
+ }
1291
+ };
1292
+ };
1293
+
1294
+ /**
1295
+ * Optimizes the visibility of the floating element by shifting it in order to
1296
+ * keep it in view when it will overflow the clipping boundary.
1297
+ * @see https://floating-ui.com/docs/shift
1298
+ */
1299
+ const shift$1 = function (options) {
1300
+ if (options === void 0) {
1301
+ options = {};
1302
+ }
1303
+ return {
1304
+ name: 'shift',
1305
+ options,
1306
+ async fn(state) {
1307
+ const {
1308
+ x,
1309
+ y,
1310
+ placement,
1311
+ platform
1312
+ } = state;
1313
+ const {
1314
+ mainAxis: checkMainAxis = true,
1315
+ crossAxis: checkCrossAxis = false,
1316
+ limiter = {
1317
+ fn: _ref => {
1318
+ let {
1319
+ x,
1320
+ y
1321
+ } = _ref;
1322
+ return {
1323
+ x,
1324
+ y
1325
+ };
1326
+ }
1327
+ },
1328
+ ...detectOverflowOptions
1329
+ } = evaluate(options, state);
1330
+ const coords = {
1331
+ x,
1332
+ y
1333
+ };
1334
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
1335
+ const crossAxis = getSideAxis(placement);
1336
+ const mainAxis = getOppositeAxis(crossAxis);
1337
+ let mainAxisCoord = coords[mainAxis];
1338
+ let crossAxisCoord = coords[crossAxis];
1339
+ const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);
1340
+ if (checkMainAxis) {
1341
+ mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
1342
+ }
1343
+ if (checkCrossAxis) {
1344
+ crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
1345
+ }
1346
+ const limitedCoords = limiter.fn({
1347
+ ...state,
1348
+ [mainAxis]: mainAxisCoord,
1349
+ [crossAxis]: crossAxisCoord
1350
+ });
1351
+ return {
1352
+ ...limitedCoords,
1353
+ data: {
1354
+ x: limitedCoords.x - x,
1355
+ y: limitedCoords.y - y,
1356
+ enabled: {
1357
+ [mainAxis]: checkMainAxis,
1358
+ [crossAxis]: checkCrossAxis
1359
+ }
1360
+ }
1361
+ };
1362
+ }
1363
+ };
1364
+ };
1365
+
1366
+ function hasWindow() {
1367
+ return typeof window !== 'undefined';
1368
+ }
1369
+ function getNodeName(node) {
1370
+ if (isNode(node)) {
1371
+ return (node.nodeName || '').toLowerCase();
1372
+ }
1373
+ // Mocked nodes in testing environments may not be instances of Node. By
1374
+ // returning `#document` an infinite loop won't occur.
1375
+ // https://github.com/floating-ui/floating-ui/issues/2317
1376
+ return '#document';
1377
+ }
1378
+ function getWindow(node) {
1379
+ var _node$ownerDocument;
1380
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1381
+ }
1382
+ function getDocumentElement(node) {
1383
+ var _ref;
1384
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1385
+ }
1386
+ function isNode(value) {
1387
+ if (!hasWindow()) {
1388
+ return false;
1389
+ }
1390
+ return value instanceof Node || value instanceof getWindow(value).Node;
1391
+ }
1392
+ function isElement(value) {
1393
+ if (!hasWindow()) {
1394
+ return false;
1395
+ }
1396
+ return value instanceof Element || value instanceof getWindow(value).Element;
1397
+ }
1398
+ function isHTMLElement(value) {
1399
+ if (!hasWindow()) {
1400
+ return false;
1401
+ }
1402
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
1403
+ }
1404
+ function isShadowRoot(value) {
1405
+ if (!hasWindow() || typeof ShadowRoot === 'undefined') {
1406
+ return false;
1407
+ }
1408
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1409
+ }
1410
+ function isOverflowElement(element) {
1411
+ const {
1412
+ overflow,
1413
+ overflowX,
1414
+ overflowY,
1415
+ display
1416
+ } = getComputedStyle$1(element);
1417
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
1418
+ }
1419
+ function isTableElement(element) {
1420
+ return /^(table|td|th)$/.test(getNodeName(element));
1421
+ }
1422
+ function isTopLayer(element) {
1423
+ try {
1424
+ if (element.matches(':popover-open')) {
1425
+ return true;
1426
+ }
1427
+ } catch (_e) {
1428
+ // no-op
1429
+ }
1430
+ try {
1431
+ return element.matches(':modal');
1432
+ } catch (_e) {
1433
+ return false;
1434
+ }
1435
+ }
1436
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1437
+ const containRe = /paint|layout|strict|content/;
1438
+ const isNotNone = value => !!value && value !== 'none';
1439
+ let isWebKitValue;
1440
+ function isContainingBlock(elementOrCss) {
1441
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
1442
+
1443
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1444
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
1445
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
1446
+ }
1447
+ function getContainingBlock(element) {
1448
+ let currentNode = getParentNode(element);
1449
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1450
+ if (isContainingBlock(currentNode)) {
1451
+ return currentNode;
1452
+ } else if (isTopLayer(currentNode)) {
1453
+ return null;
1454
+ }
1455
+ currentNode = getParentNode(currentNode);
1456
+ }
1457
+ return null;
1458
+ }
1459
+ function isWebKit() {
1460
+ if (isWebKitValue == null) {
1461
+ isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
1462
+ }
1463
+ return isWebKitValue;
1464
+ }
1465
+ function isLastTraversableNode(node) {
1466
+ return /^(html|body|#document)$/.test(getNodeName(node));
1467
+ }
1468
+ function getComputedStyle$1(element) {
1469
+ return getWindow(element).getComputedStyle(element);
1470
+ }
1471
+ function getNodeScroll(element) {
1472
+ if (isElement(element)) {
1473
+ return {
1474
+ scrollLeft: element.scrollLeft,
1475
+ scrollTop: element.scrollTop
1476
+ };
1477
+ }
1478
+ return {
1479
+ scrollLeft: element.scrollX,
1480
+ scrollTop: element.scrollY
1481
+ };
1482
+ }
1483
+ function getParentNode(node) {
1484
+ if (getNodeName(node) === 'html') {
1485
+ return node;
1486
+ }
1487
+ const result =
1488
+ // Step into the shadow DOM of the parent of a slotted node.
1489
+ node.assignedSlot ||
1490
+ // DOM Element detected.
1491
+ node.parentNode ||
1492
+ // ShadowRoot detected.
1493
+ isShadowRoot(node) && node.host ||
1494
+ // Fallback.
1495
+ getDocumentElement(node);
1496
+ return isShadowRoot(result) ? result.host : result;
1497
+ }
1498
+ function getNearestOverflowAncestor(node) {
1499
+ const parentNode = getParentNode(node);
1500
+ if (isLastTraversableNode(parentNode)) {
1501
+ return (node.ownerDocument || node).body;
1502
+ }
1503
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1504
+ return parentNode;
1505
+ }
1506
+ return getNearestOverflowAncestor(parentNode);
1507
+ }
1508
+ function getOverflowAncestors(node, list, traverseIframes) {
1509
+ var _node$ownerDocument2;
1510
+ if (list === void 0) {
1511
+ list = [];
1512
+ }
1513
+ if (traverseIframes === void 0) {
1514
+ traverseIframes = true;
1515
+ }
1516
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1517
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1518
+ const win = getWindow(scrollableAncestor);
1519
+ if (isBody) {
1520
+ const frameElement = getFrameElement(win);
1521
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1522
+ } else {
1523
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1524
+ }
1525
+ }
1526
+ function getFrameElement(win) {
1527
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1528
+ }
1529
+
1530
+ function getCssDimensions(element) {
1531
+ const css = getComputedStyle$1(element);
1532
+ // In testing environments, the `width` and `height` properties are empty
1533
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
1534
+ let width = parseFloat(css.width) || 0;
1535
+ let height = parseFloat(css.height) || 0;
1536
+ const hasOffset = isHTMLElement(element);
1537
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
1538
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
1539
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1540
+ if (shouldFallback) {
1541
+ width = offsetWidth;
1542
+ height = offsetHeight;
1543
+ }
1544
+ return {
1545
+ width,
1546
+ height,
1547
+ $: shouldFallback
1548
+ };
1549
+ }
1550
+
1551
+ function unwrapElement(element) {
1552
+ return !isElement(element) ? element.contextElement : element;
1553
+ }
1554
+
1555
+ function getScale(element) {
1556
+ const domElement = unwrapElement(element);
1557
+ if (!isHTMLElement(domElement)) {
1558
+ return createCoords(1);
1559
+ }
1560
+ const rect = domElement.getBoundingClientRect();
1561
+ const {
1562
+ width,
1563
+ height,
1564
+ $
1565
+ } = getCssDimensions(domElement);
1566
+ let x = ($ ? round(rect.width) : rect.width) / width;
1567
+ let y = ($ ? round(rect.height) : rect.height) / height;
1568
+
1569
+ // 0, NaN, or Infinity should always fallback to 1.
1570
+
1571
+ if (!x || !Number.isFinite(x)) {
1572
+ x = 1;
1573
+ }
1574
+ if (!y || !Number.isFinite(y)) {
1575
+ y = 1;
1576
+ }
1577
+ return {
1578
+ x,
1579
+ y
1580
+ };
1581
+ }
1582
+
1583
+ const noOffsets = /*#__PURE__*/createCoords(0);
1584
+ function getVisualOffsets(element) {
1585
+ const win = getWindow(element);
1586
+ if (!isWebKit() || !win.visualViewport) {
1587
+ return noOffsets;
1588
+ }
1589
+ return {
1590
+ x: win.visualViewport.offsetLeft,
1591
+ y: win.visualViewport.offsetTop
1592
+ };
1593
+ }
1594
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1595
+ if (isFixed === void 0) {
1596
+ isFixed = false;
1597
+ }
1598
+ return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
1599
+ }
1600
+
1601
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1602
+ if (includeScale === void 0) {
1603
+ includeScale = false;
1604
+ }
1605
+ if (isFixedStrategy === void 0) {
1606
+ isFixedStrategy = false;
1607
+ }
1608
+ const clientRect = element.getBoundingClientRect();
1609
+ const domElement = unwrapElement(element);
1610
+ let scale = createCoords(1);
1611
+ if (includeScale) {
1612
+ if (offsetParent) {
1613
+ if (isElement(offsetParent)) {
1614
+ scale = getScale(offsetParent);
1615
+ }
1616
+ } else {
1617
+ scale = getScale(element);
1618
+ }
1619
+ }
1620
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
1621
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
1622
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
1623
+ let width = clientRect.width / scale.x;
1624
+ let height = clientRect.height / scale.y;
1625
+ if (domElement && offsetParent) {
1626
+ const win = getWindow(domElement);
1627
+ const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1628
+ let currentWin = win;
1629
+ let currentIFrame = getFrameElement(currentWin);
1630
+ while (currentIFrame && offsetWin !== currentWin) {
1631
+ const iframeScale = getScale(currentIFrame);
1632
+ const iframeRect = currentIFrame.getBoundingClientRect();
1633
+ const css = getComputedStyle$1(currentIFrame);
1634
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1635
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1636
+ x *= iframeScale.x;
1637
+ y *= iframeScale.y;
1638
+ width *= iframeScale.x;
1639
+ height *= iframeScale.y;
1640
+ x += left;
1641
+ y += top;
1642
+ currentWin = getWindow(currentIFrame);
1643
+ currentIFrame = getFrameElement(currentWin);
1644
+ }
1645
+ }
1646
+ return rectToClientRect({
1647
+ width,
1648
+ height,
1649
+ x,
1650
+ y
1651
+ });
1652
+ }
1653
+
1654
+ // If <html> has a CSS width greater than the viewport, then this will be
1655
+ // incorrect for RTL.
1656
+ function getWindowScrollBarX(element, rect) {
1657
+ const leftScroll = getNodeScroll(element).scrollLeft;
1658
+ if (!rect) {
1659
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
1660
+ }
1661
+ return rect.left + leftScroll;
1662
+ }
1663
+
1664
+ function getHTMLOffset(documentElement, scroll) {
1665
+ const htmlRect = documentElement.getBoundingClientRect();
1666
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
1667
+ const y = htmlRect.top + scroll.scrollTop;
1668
+ return {
1669
+ x,
1670
+ y
1671
+ };
1672
+ }
1673
+
1674
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1675
+ let {
1676
+ elements,
1677
+ rect,
1678
+ offsetParent,
1679
+ strategy
1680
+ } = _ref;
1681
+ const isFixed = strategy === 'fixed';
1682
+ const documentElement = getDocumentElement(offsetParent);
1683
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
1684
+ if (offsetParent === documentElement || topLayer && isFixed) {
1685
+ return rect;
1686
+ }
1687
+ let scroll = {
1688
+ scrollLeft: 0,
1689
+ scrollTop: 0
1690
+ };
1691
+ let scale = createCoords(1);
1692
+ const offsets = createCoords(0);
1693
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1694
+ if (isOffsetParentAnElement || !isFixed) {
1695
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1696
+ scroll = getNodeScroll(offsetParent);
1697
+ }
1698
+ if (isOffsetParentAnElement) {
1699
+ const offsetRect = getBoundingClientRect(offsetParent);
1700
+ scale = getScale(offsetParent);
1701
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1702
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1703
+ }
1704
+ }
1705
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1706
+ return {
1707
+ width: rect.width * scale.x,
1708
+ height: rect.height * scale.y,
1709
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
1710
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
1711
+ };
1712
+ }
1713
+
1714
+ function getClientRects(element) {
1715
+ return element.getClientRects ? Array.from(element.getClientRects()) : [];
1716
+ }
1717
+
1718
+ // Gets the entire size of the scrollable document area, even extending outside
1719
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
1720
+ function getDocumentRect(html) {
1721
+ const scroll = getNodeScroll(html);
1722
+ const body = html.ownerDocument.body;
1723
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1724
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1725
+ let x = -scroll.scrollLeft + getWindowScrollBarX(html);
1726
+ const y = -scroll.scrollTop;
1727
+ if (getComputedStyle$1(body).direction === 'rtl') {
1728
+ x += max(html.clientWidth, body.clientWidth) - width;
1729
+ }
1730
+ return {
1731
+ width,
1732
+ height,
1733
+ x,
1734
+ y
1735
+ };
1736
+ }
1737
+
1738
+ // Safety check: ensure the scrollbar space is reasonable in case this
1739
+ // calculation is affected by unusual styles.
1740
+ // Most scrollbars leave 15-18px of space.
1741
+ const SCROLLBAR_MAX = 25;
1742
+ function getViewportRect(element, strategy, rootBoundary) {
1743
+ if (rootBoundary === void 0) {
1744
+ rootBoundary = 'viewport';
1745
+ }
1746
+ const isLayoutViewport = rootBoundary === 'layoutViewport';
1747
+ const win = getWindow(element);
1748
+ const html = getDocumentElement(element);
1749
+ const visualViewport = win.visualViewport;
1750
+ let width = html.clientWidth;
1751
+ let height = html.clientHeight;
1752
+ let x = 0;
1753
+ let y = 0;
1754
+ if (visualViewport) {
1755
+ // Client coordinates are relative to the layout viewport, except in
1756
+ // WebKit with an `absolute` strategy, where they are relative to the
1757
+ // visual viewport.
1758
+ const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';
1759
+ if (isLayoutViewport) {
1760
+ if (!layoutRelativeClientCoords) {
1761
+ x = -visualViewport.offsetLeft;
1762
+ y = -visualViewport.offsetTop;
1763
+ }
1764
+ } else {
1765
+ width = visualViewport.width;
1766
+ height = visualViewport.height;
1767
+ if (layoutRelativeClientCoords) {
1768
+ x = visualViewport.offsetLeft;
1769
+ y = visualViewport.offsetTop;
1770
+ }
1771
+ }
1772
+ }
1773
+ const windowScrollbarX = getWindowScrollBarX(html);
1774
+ // `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks
1775
+ // the visual width but isn't reflected in `html.clientWidth`, so subtract it.
1776
+ // Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also
1777
+ // reserves an empty inline-start gutter that clips nothing, so exclude just
1778
+ // the one scrollbar-side gutter — halve the measured (two-gutter) total. A
1779
+ // left-side scrollbar (`windowScrollbarX > 0`) is already handled by
1780
+ // `getHTMLOffset`/`visualViewport.width`; skip it here.
1781
+ if (windowScrollbarX <= 0) {
1782
+ const doc = html.ownerDocument;
1783
+ const body = doc.body;
1784
+ const bodyStyles = getComputedStyle(body);
1785
+ const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
1786
+ const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1787
+ const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;
1788
+ if (gutter <= SCROLLBAR_MAX) {
1789
+ width -= gutter;
1790
+ }
1791
+ }
1792
+ return {
1793
+ width,
1794
+ height,
1795
+ x,
1796
+ y
1797
+ };
1798
+ }
1799
+
1800
+ // Returns the inner client rect, subtracting scrollbars if present.
1801
+ function getInnerBoundingClientRect(element, strategy) {
1802
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
1803
+ const top = clientRect.top + element.clientTop;
1804
+ const left = clientRect.left + element.clientLeft;
1805
+ const scale = getScale(element);
1806
+ const width = element.clientWidth * scale.x;
1807
+ const height = element.clientHeight * scale.y;
1808
+ const x = left * scale.x;
1809
+ const y = top * scale.y;
1810
+ return {
1811
+ width,
1812
+ height,
1813
+ x,
1814
+ y
1815
+ };
1816
+ }
1817
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1818
+ let rect;
1819
+ if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {
1820
+ rect = getViewportRect(element, strategy, clippingAncestor);
1821
+ } else if (clippingAncestor === 'document') {
1822
+ rect = getDocumentRect(getDocumentElement(element));
1823
+ } else if (isElement(clippingAncestor)) {
1824
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1825
+ } else {
1826
+ const visualOffsets = getVisualOffsets(element);
1827
+ rect = {
1828
+ x: clippingAncestor.x - visualOffsets.x,
1829
+ y: clippingAncestor.y - visualOffsets.y,
1830
+ width: clippingAncestor.width,
1831
+ height: clippingAncestor.height
1832
+ };
1833
+ }
1834
+ return rectToClientRect(rect);
1835
+ }
1836
+
1837
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
1838
+ // clipping (or hiding) child elements. This returns all clipping ancestors
1839
+ // of the given element up the tree.
1840
+ function getClippingElementAncestors(element, cache) {
1841
+ const cachedResult = cache.get(element);
1842
+ if (cachedResult) {
1843
+ return cachedResult;
1844
+ }
1845
+ let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1846
+ let lastKeptComputedStyle = null;
1847
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1848
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1849
+
1850
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1851
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1852
+ const computedStyle = getComputedStyle$1(currentNode);
1853
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1854
+ // Position of the containing block chain below the current node. A fixed
1855
+ // element whose containing block hasn't been found yet is a fixed chain.
1856
+ const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';
1857
+
1858
+ // A non-containing ancestor does not clip the element when the chain
1859
+ // below it escapes it: a fixed chain escapes all ancestors up to the
1860
+ // next containing block, an absolute chain escapes static ancestors.
1861
+ const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');
1862
+ if (shouldDropCurrentNode) {
1863
+ // Drop non-containing blocks.
1864
+ result = result.filter(ancestor => ancestor !== currentNode);
1865
+ } else {
1866
+ // The kept node carries the chain position for the next iteration.
1867
+ lastKeptComputedStyle = computedStyle;
1868
+ }
1869
+ currentNode = getParentNode(currentNode);
1870
+ }
1871
+ cache.set(element, result);
1872
+ return result;
1873
+ }
1874
+
1875
+ // Gets the maximum area that the element is visible in due to any number of
1876
+ // clipping ancestors.
1877
+ function getClippingRect(_ref) {
1878
+ let {
1879
+ element,
1880
+ boundary,
1881
+ rootBoundary,
1882
+ strategy
1883
+ } = _ref;
1884
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
1885
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1886
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
1887
+ let top = firstRect.top;
1888
+ let right = firstRect.right;
1889
+ let bottom = firstRect.bottom;
1890
+ let left = firstRect.left;
1891
+ for (let i = 1; i < clippingAncestors.length; i++) {
1892
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
1893
+ top = max(rect.top, top);
1894
+ right = min(rect.right, right);
1895
+ bottom = min(rect.bottom, bottom);
1896
+ left = max(rect.left, left);
1897
+ }
1898
+ return {
1899
+ width: right - left,
1900
+ height: bottom - top,
1901
+ x: left,
1902
+ y: top
1903
+ };
1904
+ }
1905
+
1906
+ function getDimensions(element) {
1907
+ const {
1908
+ width,
1909
+ height
1910
+ } = getCssDimensions(element);
1911
+ return {
1912
+ width,
1913
+ height
1914
+ };
1915
+ }
1916
+
1917
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1918
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1919
+ const documentElement = getDocumentElement(offsetParent);
1920
+ const isFixed = strategy === 'fixed';
1921
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1922
+ let scroll = {
1923
+ scrollLeft: 0,
1924
+ scrollTop: 0
1925
+ };
1926
+ const offsets = createCoords(0);
1927
+ if (isOffsetParentAnElement || !isFixed) {
1928
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1929
+ scroll = getNodeScroll(offsetParent);
1930
+ }
1931
+ if (isOffsetParentAnElement) {
1932
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1933
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1934
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1935
+ }
1936
+ }
1937
+
1938
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1939
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1940
+ if (!isOffsetParentAnElement && documentElement) {
1941
+ offsets.x = getWindowScrollBarX(documentElement);
1942
+ }
1943
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1944
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1945
+ const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
1946
+ return {
1947
+ x,
1948
+ y,
1949
+ width: rect.width,
1950
+ height: rect.height
1951
+ };
1952
+ }
1953
+
1954
+ function isStaticPositioned(element) {
1955
+ return getComputedStyle$1(element).position === 'static';
1956
+ }
1957
+
1958
+ function getTrueOffsetParent(element, polyfill) {
1959
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
1960
+ return null;
1961
+ }
1962
+ if (polyfill) {
1963
+ return polyfill(element);
1964
+ }
1965
+ let rawOffsetParent = element.offsetParent;
1966
+
1967
+ // Firefox returns the <html> element as the offsetParent if it's non-static,
1968
+ // while Chrome and Safari return the <body> element. The <body> element must
1969
+ // be used to perform the correct calculations even if the <html> element is
1970
+ // non-static.
1971
+ if (getDocumentElement(element) === rawOffsetParent) {
1972
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
1973
+ }
1974
+ return rawOffsetParent;
1975
+ }
1976
+
1977
+ // Gets the closest ancestor positioned element. Handles some edge cases,
1978
+ // such as table ancestors and cross browser bugs.
1979
+ function getOffsetParent(element, polyfill) {
1980
+ const win = getWindow(element);
1981
+ if (isTopLayer(element)) {
1982
+ return win;
1983
+ }
1984
+ if (!isHTMLElement(element)) {
1985
+ let svgOffsetParent = getParentNode(element);
1986
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
1987
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
1988
+ return svgOffsetParent;
1989
+ }
1990
+ svgOffsetParent = getParentNode(svgOffsetParent);
1991
+ }
1992
+ return win;
1993
+ }
1994
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1995
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
1996
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1997
+ }
1998
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
1999
+ return win;
2000
+ }
2001
+ return offsetParent || getContainingBlock(element) || win;
2002
+ }
2003
+
2004
+ const getElementRects = async function (data) {
2005
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
2006
+ const getDimensionsFn = this.getDimensions;
2007
+ const floatingDimensions = await getDimensionsFn(data.floating);
2008
+ return {
2009
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
2010
+ floating: {
2011
+ x: 0,
2012
+ y: 0,
2013
+ width: floatingDimensions.width,
2014
+ height: floatingDimensions.height
2015
+ }
2016
+ };
2017
+ };
2018
+
2019
+ function isRTL(element) {
2020
+ return getComputedStyle$1(element).direction === 'rtl';
2021
+ }
2022
+
2023
+ const platform = {
2024
+ convertOffsetParentRelativeRectToViewportRelativeRect,
2025
+ getDocumentElement,
2026
+ getClippingRect,
2027
+ getOffsetParent,
2028
+ getElementRects,
2029
+ getClientRects,
2030
+ getDimensions,
2031
+ getScale,
2032
+ isElement,
2033
+ isRTL
2034
+ };
2035
+
2036
+ function rectsAreEqual(a, b) {
2037
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
2038
+ }
2039
+
2040
+ // https://samthor.au/2021/observing-dom/
2041
+ function observeMove(element, onMove, ancestorResize) {
2042
+ let io = null;
2043
+ let timeoutId;
2044
+ const root = getDocumentElement(element);
2045
+ function cleanup() {
2046
+ var _io;
2047
+ clearTimeout(timeoutId);
2048
+ (_io = io) == null || _io.disconnect();
2049
+ io = null;
2050
+ }
2051
+ function refresh(skip, threshold) {
2052
+ if (skip === void 0) {
2053
+ skip = false;
2054
+ }
2055
+ if (threshold === void 0) {
2056
+ threshold = 1;
2057
+ }
2058
+ cleanup();
2059
+ const elementRectForRootMargin = element.getBoundingClientRect();
2060
+ const {
2061
+ left,
2062
+ top,
2063
+ width,
2064
+ height
2065
+ } = elementRectForRootMargin;
2066
+ if (!skip) {
2067
+ onMove();
2068
+ }
2069
+ if (!width || !height) {
2070
+ return;
2071
+ }
2072
+ const insetTop = floor(top);
2073
+ const insetRight = floor(root.clientWidth - (left + width));
2074
+ const insetBottom = floor(root.clientHeight - (top + height));
2075
+ const insetLeft = floor(left);
2076
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
2077
+ const options = {
2078
+ rootMargin,
2079
+ threshold: max(0, min(1, threshold)) || 1
2080
+ };
2081
+ let isFirstUpdate = true;
2082
+ function handleObserve(entries) {
2083
+ const ratio = entries[0].intersectionRatio;
2084
+
2085
+ // The entry is a snapshot, so the reference may have moved since the
2086
+ // intersection was computed (under performance constraints, or between
2087
+ // consecutive frames of a multi-frame layout shift). The reported ratio
2088
+ // and the observed area are stale in that case and cannot be trusted to
2089
+ // detect subsequent movement, so refresh regardless of the ratio.
2090
+ if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
2091
+ return refresh();
2092
+ }
2093
+ if (ratio !== threshold) {
2094
+ if (!isFirstUpdate) {
2095
+ return refresh();
2096
+ }
2097
+ if (!ratio) {
2098
+ // If the reference is clipped in place, the ratio is 0. Throttle
2099
+ // the refresh to prevent an infinite loop of updates.
2100
+ timeoutId = setTimeout(() => {
2101
+ refresh(false, 1e-7);
2102
+ }, 1000);
2103
+ } else {
2104
+ refresh(false, ratio);
2105
+ }
2106
+ }
2107
+ isFirstUpdate = false;
2108
+ }
2109
+
2110
+ // Older browsers don't support a `document` as the root and will throw an
2111
+ // error.
2112
+ try {
2113
+ io = new IntersectionObserver(handleObserve, {
2114
+ ...options,
2115
+ // Handle <iframe>s
2116
+ root: root.ownerDocument
2117
+ });
2118
+ } catch (_e) {
2119
+ io = new IntersectionObserver(handleObserve, options);
2120
+ }
2121
+ io.observe(element);
2122
+ }
2123
+ const win = getWindow(element);
2124
+ // The window is a resize ancestor, so when `ancestorResize` is enabled its
2125
+ // listener already runs the update on resize. Here we only need to rebuild
2126
+ // the `IntersectionObserver` for the new root size, skipping a redundant
2127
+ // update. When `ancestorResize` is disabled, this becomes the sole update.
2128
+ const handleResize = () => refresh(ancestorResize);
2129
+ win.addEventListener('resize', handleResize);
2130
+ refresh(true);
2131
+ return () => {
2132
+ win.removeEventListener('resize', handleResize);
2133
+ cleanup();
2134
+ };
2135
+ }
2136
+
2137
+ /**
2138
+ * Automatically updates the position of the floating element when necessary.
2139
+ * Should only be called when the floating element is mounted on the DOM or
2140
+ * visible on the screen.
2141
+ * @returns cleanup function that should be invoked when the floating element is
2142
+ * removed from the DOM or hidden from the screen.
2143
+ * @see https://floating-ui.com/docs/autoUpdate
2144
+ */
2145
+ function autoUpdate(reference, floating, update, options) {
2146
+ if (options === void 0) {
2147
+ options = {};
2148
+ }
2149
+ const {
2150
+ ancestorScroll = true,
2151
+ ancestorResize = true,
2152
+ elementResize = typeof ResizeObserver === 'function',
2153
+ layoutShift = typeof IntersectionObserver === 'function',
2154
+ animationFrame = false
2155
+ } = options;
2156
+ const referenceEl = unwrapElement(reference);
2157
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
2158
+ ancestors.forEach(ancestor => {
2159
+ ancestorScroll && ancestor.addEventListener('scroll', update);
2160
+ ancestorResize && ancestor.addEventListener('resize', update);
2161
+ });
2162
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;
2163
+ let reobserveFrame = -1;
2164
+ let resizeObserver = null;
2165
+ if (elementResize) {
2166
+ resizeObserver = new ResizeObserver(_ref => {
2167
+ let [firstEntry] = _ref;
2168
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
2169
+ // Prevent update loops when using the `size` middleware.
2170
+ // https://github.com/floating-ui/floating-ui/issues/1740
2171
+ resizeObserver.unobserve(floating);
2172
+ cancelAnimationFrame(reobserveFrame);
2173
+ reobserveFrame = requestAnimationFrame(() => {
2174
+ var _resizeObserver;
2175
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
2176
+ });
2177
+ }
2178
+ update();
2179
+ });
2180
+ if (referenceEl && !animationFrame) {
2181
+ resizeObserver.observe(referenceEl);
2182
+ }
2183
+ if (floating) {
2184
+ resizeObserver.observe(floating);
2185
+ }
2186
+ }
2187
+ let frameId;
2188
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
2189
+ if (animationFrame) {
2190
+ frameLoop();
2191
+ }
2192
+ function frameLoop() {
2193
+ const nextRefRect = getBoundingClientRect(reference);
2194
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
2195
+ update();
2196
+ }
2197
+ prevRefRect = nextRefRect;
2198
+ frameId = requestAnimationFrame(frameLoop);
2199
+ }
2200
+ update();
2201
+ return () => {
2202
+ var _resizeObserver2;
2203
+ ancestors.forEach(ancestor => {
2204
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
2205
+ ancestorResize && ancestor.removeEventListener('resize', update);
2206
+ });
2207
+ cleanupIo == null || cleanupIo();
2208
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
2209
+ resizeObserver = null;
2210
+ if (animationFrame) {
2211
+ cancelAnimationFrame(frameId);
2212
+ }
2213
+ };
2214
+ }
2215
+
2216
+ /**
2217
+ * Modifies the placement by translating the floating element along the
2218
+ * specified axes.
2219
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
2220
+ * object may be passed.
2221
+ * @see https://floating-ui.com/docs/offset
2222
+ */
2223
+ const offset = offset$1;
2224
+
2225
+ /**
2226
+ * Optimizes the visibility of the floating element by choosing the placement
2227
+ * that has the most space available automatically, without needing to specify a
2228
+ * preferred placement. Alternative to `flip`.
2229
+ * @see https://floating-ui.com/docs/autoPlacement
2230
+ */
2231
+ const autoPlacement = autoPlacement$1;
2232
+
2233
+ /**
2234
+ * Optimizes the visibility of the floating element by shifting it in order to
2235
+ * keep it in view when it will overflow the clipping boundary.
2236
+ * @see https://floating-ui.com/docs/shift
2237
+ */
2238
+ const shift = shift$1;
2239
+
2240
+ /**
2241
+ * Optimizes the visibility of the floating element by flipping the `placement`
2242
+ * in order to keep it in view when the preferred placement(s) will overflow the
2243
+ * clipping boundary. Alternative to `autoPlacement`.
2244
+ * @see https://floating-ui.com/docs/flip
2245
+ */
2246
+ const flip = flip$1;
2247
+
2248
+ /**
2249
+ * Computes the `x` and `y` coordinates that will place the floating element
2250
+ * next to a given reference element.
2251
+ */
2252
+ const computePosition = (reference, floating, options) => {
2253
+ // This caches the expensive `getClippingElementAncestors` function so that
2254
+ // multiple lifecycle resets re-use the same result. It only lives for a
2255
+ // single call. If other functions become expensive, we can add them as well.
2256
+ const cache = new Map();
2257
+ const mergedOptions = options != null ? options : {};
2258
+ const platformWithCache = {
2259
+ ...platform,
2260
+ ...mergedOptions.platform,
2261
+ _c: cache
2262
+ };
2263
+ return computePosition$1(reference, floating, {
2264
+ ...mergedOptions,
2265
+ platform: platformWithCache
2266
+ });
2267
+ };
2268
+
2269
+ /* eslint-disable line-comment-position, no-inline-comments */
2270
+
2271
+
2272
+ const MAX_CONFIGURATION_COUNT = 10;
2273
+
2274
+ class AuroFloatingUI {
2275
+ /**
2276
+ * @private
2277
+ */
2278
+ static isMousePressed = false;
2279
+
2280
+ /**
2281
+ * @private
2282
+ */
2283
+ static isMousePressHandlerInitialized = false;
2284
+
2285
+ /**
2286
+ * @private
2287
+ */
2288
+ static setupMousePressChecker() {
2289
+ if (
2290
+ !AuroFloatingUI.isMousePressHandlerInitialized &&
2291
+ window &&
2292
+ window.addEventListener
2293
+ ) {
2294
+ AuroFloatingUI.isMousePressHandlerInitialized = true;
2295
+
2296
+ // Track timeout for isMousePressed reset to avoid race conditions
2297
+ if (!AuroFloatingUI._mousePressedTimeout) {
2298
+ AuroFloatingUI._mousePressedTimeout = null;
2299
+ }
2300
+ const mouseEventGlobalHandler = (event) => {
2301
+ const isPressed = event.type === "mousedown";
2302
+ if (isPressed) {
2303
+ // Clear any pending timeout to prevent race condition
2304
+ if (AuroFloatingUI._mousePressedTimeout !== null) {
2305
+ clearTimeout(AuroFloatingUI._mousePressedTimeout);
2306
+ AuroFloatingUI._mousePressedTimeout = null;
2307
+ }
2308
+ if (!AuroFloatingUI.isMousePressed) {
2309
+ AuroFloatingUI.isMousePressed = true;
2310
+ }
2311
+ } else if (AuroFloatingUI.isMousePressed && !isPressed) {
2312
+ // Schedule reset and track timeout ID
2313
+ AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
2314
+ AuroFloatingUI.isMousePressed = false;
2315
+ AuroFloatingUI._mousePressedTimeout = null;
2316
+ }, 0);
2317
+ }
2318
+ };
2319
+
2320
+ window.addEventListener("mousedown", mouseEventGlobalHandler);
2321
+ window.addEventListener("mouseup", mouseEventGlobalHandler);
2322
+ }
2323
+ }
2324
+
2325
+ static openingQueue = [];
2326
+
2327
+ /**
2328
+ * Returns the currently active floating UI instance that should be considered "on top".
2329
+ * Prefers any globally tracked expanded dropdown or floater, falling back to the last entry in the local opening queue.
2330
+ *
2331
+ * This getter first checks the global document references for a visible floating UI and returns it if found.
2332
+ * If the global reference is stale or not visible, it clears those references and instead returns the most recently opened instance from `openingQueue`, or `null` if none exist.
2333
+ *
2334
+ * Side effect: clears stale global refs so callers don't need a separate cleanup step.
2335
+ */
2336
+ static get topOpeningFloatingUI() {
2337
+ const existedVisibleFloatingUI =
2338
+ document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
2339
+ if (
2340
+ existedVisibleFloatingUI &&
2341
+ existedVisibleFloatingUI.element.isPopoverVisible
2342
+ ) {
2343
+ return existedVisibleFloatingUI;
2344
+ }
2345
+
2346
+ // clear existedVisibleFloatingUI in case it's not flushed well when it hidden by other reasons (e.g. noToggle + click)
2347
+ document.expandedAuroFormkitDropdown = null;
2348
+ document.expandedAuroFloater = null;
2349
+
2350
+ return AuroFloatingUI.openingQueue.length > 0
2351
+ ? AuroFloatingUI.openingQueue[AuroFloatingUI.openingQueue.length - 1]
2352
+ : null;
2353
+ }
2354
+
2355
+ constructor(element, behavior) {
2356
+ this.element = element;
2357
+ this.behavior = behavior;
2358
+
2359
+ // Store event listener references for cleanup
2360
+ this.focusHandler = null;
2361
+ this.clickHandler = null;
2362
+ this.keyDownHandler = null;
2363
+ this.touchHandler = null;
2364
+
2365
+ /**
2366
+ * @private
2367
+ */
2368
+ this.enableKeyboardHandling = true;
2369
+
2370
+ /**
2371
+ * @private
2372
+ */
2373
+ this.configureTrial = 0;
2374
+
2375
+ /**
2376
+ * @private
2377
+ */
2378
+ this.eventPrefix = undefined;
2379
+
2380
+ /**
2381
+ * @private
2382
+ */
2383
+ this.id = undefined;
2384
+
2385
+ /**
2386
+ * @private
2387
+ */
2388
+ this.showing = false;
2389
+
2390
+ /**
2391
+ * @private
2392
+ */
2393
+ this.strategy = undefined;
2394
+ }
2395
+
2396
+ /**
2397
+ * Mirrors the size of the bibSizer element to the bib content.
2398
+ * Copies the width, height, max-width, and max-height styles from the bibSizer element to the bib content container.
2399
+ * This ensures that the bib content has the same dimensions as the sizer element.
2400
+ */
2401
+ mirrorSize() {
2402
+ const element = this.element;
2403
+ if (!element) {
2404
+ return;
2405
+ }
2406
+
2407
+ // mirror the boxsize from bibSizer
2408
+ if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
2409
+ const sizerStyle = window.getComputedStyle(element.bibSizer);
2410
+ const bibContent = element.bib.shadowRoot.querySelector(".container");
2411
+ if (!bibContent) {
2412
+ return;
2413
+ }
2414
+
2415
+ if (sizerStyle.width !== "0px") {
2416
+ bibContent.style.width = sizerStyle.width;
2417
+ }
2418
+ if (sizerStyle.height !== "0px") {
2419
+ bibContent.style.height = sizerStyle.height;
2420
+ }
2421
+ bibContent.style.maxWidth = sizerStyle.maxWidth;
2422
+ bibContent.style.maxHeight = sizerStyle.maxHeight;
2423
+ }
2424
+ }
2425
+
2426
+ /**
2427
+ * @private
2428
+ * Determines the positioning strategy based on the current viewport size and mobile breakpoint.
2429
+ *
2430
+ * This method checks if the current viewport width is less than or equal to the specified mobile fullscreen breakpoint
2431
+ * defined in the bib element. If it is, the strategy is set to 'fullscreen'; otherwise, it defaults to 'floating'.
2432
+ *
2433
+ * @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
2434
+ */
2435
+ getPositioningStrategy() {
2436
+ const element = this.element;
2437
+ if (!element) {
2438
+ return "floating";
2439
+ }
2440
+
2441
+ const breakpoint =
2442
+ element.bib?.mobileFullscreenBreakpoint ||
2443
+ element.floaterConfig?.fullscreenBreakpoint;
2444
+ switch (this.behavior) {
2445
+ case "tooltip":
2446
+ return "floating";
2447
+ case "dialog":
2448
+ case "drawer":
2449
+ if (breakpoint) {
2450
+ const smallerThanBreakpoint = window.matchMedia(
2451
+ `(max-width: ${breakpoint})`,
2452
+ ).matches;
2453
+
2454
+ this.element.expanded = smallerThanBreakpoint;
2455
+
2456
+ if (this.element.nested) {
2457
+ return "cover";
2458
+ }
2459
+ return smallerThanBreakpoint || this.element.modal
2460
+ ? "fullscreen"
2461
+ : "dialog";
2462
+ }
2463
+ return "dialog";
2464
+ case "dropdown":
2465
+ case undefined:
2466
+ case null:
2467
+ if (breakpoint) {
2468
+ const smallerThanBreakpoint = window.matchMedia(
2469
+ `(max-width: ${breakpoint})`,
2470
+ ).matches;
2471
+ if (smallerThanBreakpoint) {
2472
+ return "fullscreen";
2473
+ }
2474
+ }
2475
+ return "floating";
2476
+ default:
2477
+ return this.behavior;
2478
+ }
2479
+ }
2480
+
2481
+ /**
2482
+ * @private
2483
+ * Positions the bib element based on the current configuration and positioning strategy.
2484
+ *
2485
+ * This method determines the appropriate positioning strategy (fullscreen or not) and configures the bib accordingly.
2486
+ * It also sets up middleware for the floater configuration, computes the position of the bib relative to the trigger element,
2487
+ * and applies the calculated position to the bib's style.
2488
+ */
2489
+ position() {
2490
+ const element = this.element;
2491
+ if (!element) {
2492
+ return;
2493
+ }
2494
+
2495
+ const strategy = this.getPositioningStrategy();
2496
+ this.configureBibStrategy(strategy);
2497
+
2498
+ if (strategy === "floating") {
2499
+ if (!element.trigger || !element.bib) {
2500
+ return;
2501
+ }
2502
+
2503
+ this.mirrorSize();
2504
+ // Define the middlware for the floater configuration
2505
+ const middleware = [
2506
+ offset(element.floaterConfig?.offset || 0),
2507
+ ...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
2508
+ ...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
2509
+ ...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
2510
+ ];
2511
+
2512
+ // Compute the position of the bib
2513
+ computePosition(element.trigger, element.bib, {
2514
+ strategy: element.floaterConfig?.strategy || "fixed",
2515
+ placement: element.floaterConfig?.placement,
2516
+ middleware: middleware || [],
2517
+ }).then(({ x, y }) => {
2518
+ // eslint-disable-line id-length
2519
+ const currentElement = this.element;
2520
+ if (!currentElement?.bib) {
2521
+ return;
2522
+ }
2523
+
2524
+ Object.assign(currentElement.bib.style, {
2525
+ left: `${x}px`,
2526
+ top: `${y}px`,
2527
+ });
2528
+ });
2529
+ } else if (strategy === "cover") {
2530
+ if (!element.parentNode || !element.bib) {
2531
+ return;
2532
+ }
2533
+
2534
+ // Compute the position of the bib
2535
+ computePosition(element.parentNode, element.bib, {
2536
+ placement: "bottom-start",
2537
+ }).then(({ x, y }) => {
2538
+ // eslint-disable-line id-length
2539
+ const currentElement = this.element;
2540
+ if (!currentElement?.bib || !currentElement.parentNode) {
2541
+ return;
2542
+ }
2543
+
2544
+ Object.assign(currentElement.bib.style, {
2545
+ left: `${x}px`,
2546
+ top: `${y - currentElement.parentNode.offsetHeight}px`,
2547
+ width: `${currentElement.parentNode.offsetWidth}px`,
2548
+ height: `${currentElement.parentNode.offsetHeight}px`,
2549
+ });
2550
+ });
2551
+ }
2552
+ }
2553
+
2554
+ /**
2555
+ * @private
2556
+ * Controls whether to lock the scrolling for the document's body.
2557
+ * @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
2558
+ */
2559
+ lockScroll(lock = true) {
2560
+ const element = this.element;
2561
+
2562
+ if (!element?.bib) {
2563
+ return;
2564
+ }
2565
+
2566
+ const dialog = (
2567
+ element.bib?.shadowRoot ||
2568
+ element.bib ||
2569
+ element
2570
+ ).querySelector("dialog");
2571
+ if (dialog) {
2572
+ if (lock) {
2573
+ dialog.setAttribute("aria-modal", "true");
2574
+ } else {
2575
+ dialog.removeAttribute("aria-modal");
2576
+ }
2577
+ }
2578
+
2579
+ if (lock) {
2580
+ if (!this._scrollLocked) {
2581
+ this._scrollLocked = true;
2582
+ this._savedScrollY = window.scrollY;
2583
+ this._savedScrollStyles = {
2584
+ rootScrollbarGutter: document.documentElement.style.scrollbarGutter,
2585
+ rootOverflow: document.documentElement.style.overflow,
2586
+ bodyOverflow: document.body.style.overflow,
2587
+ bodyPosition: document.body.style.position,
2588
+ bodyTop: document.body.style.top,
2589
+ bodyWidth: document.body.style.width,
2590
+ bibTransform: element?.bib?.style.transform,
2591
+ };
2592
+ document.documentElement.style.scrollbarGutter = "stable";
2593
+ document.documentElement.style.overflow = "hidden";
2594
+ document.body.style.overflow = "hidden";
2595
+
2596
+ // position:fixed is the only way to block VoiceOver three-finger swipe,
2597
+ // which bypasses both overflow:hidden and touchmove preventDefault.
2598
+ document.body.style.position = "fixed";
2599
+ document.body.style.top = `-${this._savedScrollY}px`;
2600
+ document.body.style.width = "100%";
2601
+
2602
+ // Keep the bib aligned with the visual viewport as the VKB opens.
2603
+ // A one-shot offsetTop check at lock time is stale by the time the user
2604
+ // taps an input mid-drawer — iOS then pans visualViewport upward and the
2605
+ // bib drifts off-screen. Listen continuously so the transform tracks the pan.
2606
+ // RAF-throttled to avoid a style recalc on every scroll tick during the
2607
+ // keyboard animation; the pending frame is canceled on unlock so it cannot
2608
+ // reapply a translate after bibTransform has been restored.
2609
+ if (window.visualViewport) {
2610
+ this._viewportRafId = undefined;
2611
+ this._viewportHandler = () => {
2612
+ if (this._viewportRafId !== undefined) {
2613
+ return;
2614
+ }
2615
+ this._viewportRafId = requestAnimationFrame(() => {
2616
+ this._viewportRafId = undefined;
2617
+ if (element?.bib) {
2618
+ element.bib.style.transform = `translateY(${window.visualViewport.offsetTop}px)`;
2619
+ }
2620
+ });
2621
+ };
2622
+ window.visualViewport.addEventListener(
2623
+ "resize",
2624
+ this._viewportHandler,
2625
+ );
2626
+ window.visualViewport.addEventListener(
2627
+ "scroll",
2628
+ this._viewportHandler,
2629
+ );
2630
+ this._viewportHandler();
2631
+ }
2632
+
2633
+ this.lockTouchScroll(true);
2634
+ }
2635
+ } else {
2636
+ if (this._scrollLocked) {
2637
+ if (this._viewportHandler && window.visualViewport) {
2638
+ window.visualViewport.removeEventListener(
2639
+ "resize",
2640
+ this._viewportHandler,
2641
+ );
2642
+ window.visualViewport.removeEventListener(
2643
+ "scroll",
2644
+ this._viewportHandler,
2645
+ );
2646
+ this._viewportHandler = undefined;
2647
+ }
2648
+ if (this._viewportRafId !== undefined) {
2649
+ cancelAnimationFrame(this._viewportRafId);
2650
+ this._viewportRafId = undefined;
2651
+ }
2652
+
2653
+ document.documentElement.style.scrollbarGutter =
2654
+ this._savedScrollStyles?.rootScrollbarGutter ?? "";
2655
+ document.documentElement.style.overflow =
2656
+ this._savedScrollStyles?.rootOverflow ?? "";
2657
+ document.body.style.overflow =
2658
+ this._savedScrollStyles?.bodyOverflow ?? "";
2659
+ document.body.style.position =
2660
+ this._savedScrollStyles?.bodyPosition ?? "";
2661
+ document.body.style.top = this._savedScrollStyles?.bodyTop ?? "";
2662
+ document.body.style.width = this._savedScrollStyles?.bodyWidth ?? "";
2663
+ if (element?.bib) {
2664
+ element.bib.style.transform =
2665
+ this._savedScrollStyles?.bibTransform ?? "";
2666
+ }
2667
+ window.scrollTo(0, this._savedScrollY || 0);
2668
+ this._savedScrollY = undefined;
2669
+ this._savedScrollStyles = undefined;
2670
+ this._scrollLocked = false;
2671
+
2672
+ this.lockTouchScroll(false);
2673
+ }
2674
+ }
2675
+ }
2676
+
2677
+ /**
2678
+ * Locks page-level touch scroll while bib is open.
2679
+ * Walks composedPath() so scrollable children inside the dialog still scroll.
2680
+ * @private
2681
+ */
2682
+ lockTouchScroll(lock = true) {
2683
+ if (lock) {
2684
+ if (this._boundTouchMoveHandler) {
2685
+ return;
2686
+ }
2687
+ this._boundTouchMoveHandler = (e) => {
2688
+ const path = e.composedPath();
2689
+ const insideScrollable = path.some(
2690
+ (el) =>
2691
+ el !== document &&
2692
+ el !== document.documentElement &&
2693
+ el !== document.body &&
2694
+ (el.scrollHeight > el.clientHeight ||
2695
+ el.scrollWidth > el.clientWidth),
2696
+ );
2697
+ if (!insideScrollable) {
2698
+ e.preventDefault();
2699
+ }
2700
+ };
2701
+ document.addEventListener("touchmove", this._boundTouchMoveHandler, {
2702
+ passive: false,
2703
+ });
2704
+ } else if (this._boundTouchMoveHandler) {
2705
+ document.removeEventListener("touchmove", this._boundTouchMoveHandler, {
2706
+ passive: false,
2707
+ });
2708
+ this._boundTouchMoveHandler = undefined;
2709
+ }
2710
+ }
2711
+
2712
+ /**
2713
+ * @private
2714
+ * Configures the bib element's display strategy.
2715
+ *
2716
+ * Sets the bib to fullscreen or floating mode based on the provided strategy.
2717
+ * Dispatches a 'strategy-change' event if the strategy changes.
2718
+ *
2719
+ * @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
2720
+ */
2721
+ configureBibStrategy(value) {
2722
+ const element = this.element;
2723
+ if (!element?.bib) {
2724
+ return;
2725
+ }
2726
+
2727
+ if (value === "fullscreen" || value === "dialog") {
2728
+ element.isBibFullscreen = true;
2729
+ // reset the prev position
2730
+ element.bib.setAttribute("isfullscreen", "");
2731
+ element.bib.style.position = "fixed";
2732
+ element.bib.style.top = "0px";
2733
+ element.bib.style.left = "0px";
2734
+ element.bib.style.width = "";
2735
+ element.bib.style.height = "";
2736
+ element.style.contain = "";
2737
+
2738
+ // reset the size that was mirroring `size` css-part
2739
+ const bibContent = element.bib.shadowRoot?.querySelector(".container");
2740
+ if (bibContent) {
2741
+ bibContent.style.width = "";
2742
+ bibContent.style.height = "";
2743
+ bibContent.style.maxWidth = "";
2744
+ bibContent.style.maxHeight = "";
2745
+ this.configureTrial = 0;
2746
+ } else if (this.configureTrial < MAX_CONFIGURATION_COUNT) {
2747
+ this.configureTrial += 1;
2748
+
2749
+ setTimeout(() => {
2750
+ this.configureBibStrategy(value);
2751
+ }, 0);
2752
+ }
2753
+
2754
+ if (element.isPopoverVisible) {
2755
+ this.lockScroll(value === "fullscreen");
2756
+ }
2757
+ } else {
2758
+ element.bib.style.position = "";
2759
+ element.bib.removeAttribute("isfullscreen");
2760
+ element.isBibFullscreen = false;
2761
+ element.style.contain = "layout";
2762
+ }
2763
+
2764
+ const isChanged = this.strategy && this.strategy !== value;
2765
+ this.strategy = value;
2766
+ if (isChanged) {
2767
+ const event = new CustomEvent(
2768
+ this.eventPrefix
2769
+ ? `${this.eventPrefix}-strategy-change`
2770
+ : "strategy-change",
2771
+ {
2772
+ detail: {
2773
+ value,
2774
+ },
2775
+ composed: true,
2776
+ },
2777
+ );
2778
+
2779
+ element.dispatchEvent(event);
2780
+ }
2781
+ }
2782
+
2783
+ updateState() {
2784
+ const element = this.element;
2785
+ if (!element) {
2786
+ return;
2787
+ }
2788
+
2789
+ const isVisible = element.isPopoverVisible;
2790
+ if (!isVisible) {
2791
+ this.cleanupHideHandlers();
2792
+ try {
2793
+ element.cleanup?.();
2794
+ } catch (error) {
2795
+ // Do nothing
2796
+ }
2797
+ }
2798
+ }
2799
+
2800
+ /**
2801
+ * @private
2802
+ * getting called on 'blur' in trigger or `focusin` in document
2803
+ *
2804
+ * Hides the bib if focus moves outside of the trigger or bib, unless a 'noHideOnThisFocusLoss' flag is set.
2805
+ * This method checks if the currently active element is still within the trigger or bib.
2806
+ * If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
2807
+ */
2808
+ handleFocusLoss() {
2809
+ const element = this.element;
2810
+ if (!element?.bib) {
2811
+ return;
2812
+ }
2813
+
2814
+ // if mouse is being pressed, skip and let click event to handle the action
2815
+ if (AuroFloatingUI.isMousePressed) {
2816
+ return;
2817
+ }
2818
+
2819
+ if (
2820
+ element.noHideOnThisFocusLoss ||
2821
+ element.hasAttribute("noHideOnThisFocusLoss")
2822
+ ) {
2823
+ return;
2824
+ }
2825
+
2826
+ // if focus is still inside of trigger or bib, do not close
2827
+ if (element.matches(":focus") || element.matches(":focus-within")) {
2828
+ return;
2829
+ }
2830
+
2831
+ // Chrome-specific: during popover top-layer promotion after a click on a
2832
+ // slotted focusable, :focus-within can briefly evaluate false while the
2833
+ // active element is still structurally inside the trigger/bib. Fall back
2834
+ // to a shadow-piercing ancestry walk from the deep active element before
2835
+ // treating this as a real focus loss.
2836
+ try {
2837
+ let active = document.activeElement;
2838
+ while (active && active.shadowRoot && active.shadowRoot.activeElement) {
2839
+ active = active.shadowRoot.activeElement;
2840
+ }
2841
+ const targets = [element, element.trigger, element.bib].filter(Boolean);
2842
+ let node = active;
2843
+ while (node) {
2844
+ if (targets.includes(node)) {
2845
+ return;
2846
+ }
2847
+ node =
2848
+ node.parentElement ||
2849
+ (node.getRootNode && node.getRootNode().host) ||
2850
+ null;
2851
+ }
2852
+ } catch (e) {
2853
+ // Defensive: fall through to the existing close path if traversal fails.
2854
+ }
2855
+
2856
+ // if fullscreen bib is in fullscreen mode, do not close
2857
+ if (element.bib.hasAttribute("isfullscreen")) {
2858
+ return;
2859
+ }
2860
+
2861
+ // eventType "focusloss" distinguishes a Tab/click-driven close from an
2862
+ // Escape keydown close. Consumers use this to decide whether to restore
2863
+ // focus to the trigger (Escape) or let it advance naturally (Tab).
2864
+ this.hideBib("focusloss");
2865
+ }
2866
+
2867
+ setupHideHandlers() {
2868
+ const element = this.element;
2869
+ if (!element) {
2870
+ return;
2871
+ }
2872
+
2873
+ // Define handlers & store references
2874
+ this.focusHandler = () => this.handleFocusLoss();
2875
+
2876
+ this.clickHandler = (evt) => {
2877
+ const element = this.element;
2878
+ if (!element?.bib) {
2879
+ return;
2880
+ }
2881
+
2882
+ // When the bib is fullscreen (modal dialog), don't close on outside
2883
+ // clicks. VoiceOver's synthetic click events inside a top-layer modal
2884
+ // <dialog> may not include the bib in composedPath(), causing false
2885
+ // positives. This mirrors the fullscreen guard in handleFocusLoss().
2886
+ if (element.bib.hasAttribute("isfullscreen")) {
2887
+ return;
2888
+ }
2889
+
2890
+ if (
2891
+ (!evt.composedPath().includes(element.trigger) &&
2892
+ !evt.composedPath().includes(element.bib)) ||
2893
+ (element.bib.backdrop &&
2894
+ evt.composedPath().includes(element.bib.backdrop))
2895
+ ) {
2896
+ const existedVisibleFloatingUI =
2897
+ document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
2898
+
2899
+ if (
2900
+ existedVisibleFloatingUI &&
2901
+ existedVisibleFloatingUI.element.isPopoverVisible
2902
+ ) {
2903
+ // if something else is open, close that
2904
+ existedVisibleFloatingUI.hideBib();
2905
+ document.expandedAuroFormkitDropdown = null;
2906
+ document.expandedAuroFloater = this;
2907
+ } else {
2908
+ this.hideBib("click");
2909
+ }
2910
+ }
2911
+ };
2912
+
2913
+ // ESC key handler
2914
+ this.keyDownHandler = (evt) => {
2915
+ const element = this.element;
2916
+ if (!element) {
2917
+ return;
2918
+ }
2919
+
2920
+ if (evt.key === "Escape" && element.isPopoverVisible) {
2921
+ const existedVisibleFloatingUI =
2922
+ document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
2923
+ if (
2924
+ existedVisibleFloatingUI &&
2925
+ existedVisibleFloatingUI !== this &&
2926
+ existedVisibleFloatingUI.element.isPopoverVisible
2927
+ ) {
2928
+ // if something else is open, let it handle itself
2929
+ return;
2930
+ }
2931
+ this.hideBib("keydown");
2932
+ }
2933
+ };
2934
+
2935
+ if (this.behavior !== "drawer" && this.behavior !== "dialog") {
2936
+ // Add event listeners using the stored references
2937
+ document.addEventListener("focusin", this.focusHandler);
2938
+ }
2939
+
2940
+ if (this.enableKeyboardHandling) {
2941
+ document.addEventListener("keydown", this.keyDownHandler);
2942
+ }
2943
+
2944
+ // send this task to the end of queue to prevent conflicting
2945
+ // it conflicts if showBib gets call from a button that's not this.element.trigger
2946
+ setTimeout(() => {
2947
+ window.addEventListener("click", this.clickHandler);
2948
+ }, 0);
2949
+
2950
+ // iOS Safari does not fire `click` on non-interactive elements, so
2951
+ // tapping an inert backdrop never reaches the click handler above.
2952
+ // Mirror the same outside-tap logic with a passive touchstart listener.
2953
+ this.touchHandler = (evt) => {
2954
+ const element = this.element;
2955
+ if (!element?.bib) {
2956
+ return;
2957
+ }
2958
+
2959
+ // fullscreen (modal) dialog handles its own dismissal
2960
+ if (element.bib.hasAttribute("isfullscreen")) {
2961
+ return;
2962
+ }
2963
+
2964
+ const path = evt.composedPath();
2965
+ if (!path.includes(element.trigger) && !path.includes(element.bib)) {
2966
+ this.hideBib("click");
2967
+ }
2968
+ };
2969
+
2970
+ window.addEventListener("touchstart", this.touchHandler, { passive: true });
2971
+ }
2972
+
2973
+ cleanupHideHandlers() {
2974
+ // Remove event listeners if they exist
2975
+
2976
+ if (this.focusHandler) {
2977
+ document.removeEventListener("focusin", this.focusHandler);
2978
+ this.focusHandler = null;
2979
+ }
2980
+
2981
+ if (this.clickHandler) {
2982
+ window.removeEventListener("click", this.clickHandler);
2983
+ this.clickHandler = null;
2984
+ }
2985
+
2986
+ if (this.touchHandler) {
2987
+ window.removeEventListener("touchstart", this.touchHandler);
2988
+ this.touchHandler = null;
2989
+ }
2990
+
2991
+ if (this.keyDownHandler) {
2992
+ document.removeEventListener("keydown", this.keyDownHandler);
2993
+ this.keyDownHandler = null;
2994
+ }
2995
+ }
2996
+
2997
+ handleUpdate(changedProperties) {
2998
+ if (changedProperties.has("isPopoverVisible")) {
2999
+ this.updateState();
3000
+ }
3001
+ }
3002
+
3003
+ updateCurrentExpandedDropdown() {
3004
+ if (!this.element) {
3005
+ return;
3006
+ }
3007
+
3008
+ // Close any other dropdown that is already open
3009
+ const existedVisibleFloatingUI =
3010
+ document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
3011
+ if (
3012
+ existedVisibleFloatingUI &&
3013
+ existedVisibleFloatingUI !== this &&
3014
+ existedVisibleFloatingUI.element.isPopoverVisible &&
3015
+ existedVisibleFloatingUI.eventPrefix === this.eventPrefix
3016
+ ) {
3017
+ existedVisibleFloatingUI.hideBib();
3018
+ }
3019
+
3020
+ document.expandedAuroFloater = this;
3021
+ }
3022
+
3023
+ showBib() {
3024
+ const element = this.element;
3025
+ if (!element) {
3026
+ return;
3027
+ }
3028
+
3029
+ if (!element.bib || (!element.trigger && !element.parentNode)) {
3030
+ return;
3031
+ }
3032
+
3033
+ if (!element.disabled && !this.showing) {
3034
+ this.updateCurrentExpandedDropdown();
3035
+ element.triggerChevron?.setAttribute("data-expanded", true);
3036
+
3037
+ // prevent double showing: isPopovervisible gets first and showBib gets called later
3038
+ if (!this.showing) {
3039
+ if (!element.modal) {
3040
+ this.setupHideHandlers();
3041
+ } else {
3042
+ if (this.keyDownHandler) {
3043
+ document.removeEventListener("keydown", this.keyDownHandler);
3044
+ }
3045
+ this.keyDownHandler = (evt) => {
3046
+ if (evt.key === "Escape" && element.isPopoverVisible) {
3047
+ // Intercept at keydown so CloseWatcher never sees the keystroke.
3048
+ // Canceling `cancel` alone is insufficient — a second Esc with no
3049
+ // intervening user activation triggers the anti-trap and fires `close`
3050
+ // directly, bypassing any `cancel` preventDefault (AB#1613688).
3051
+ // stopImmediatePropagation is intentional: it prevents other document
3052
+ // keydown handlers (e.g. consumer code, auro-dialog) from also acting
3053
+ // on Escape while the modal owns the key.
3054
+ evt.preventDefault();
3055
+ evt.stopImmediatePropagation();
3056
+ }
3057
+ };
3058
+ document.addEventListener("keydown", this.keyDownHandler);
3059
+ }
3060
+ this.showing = true;
3061
+ element.isPopoverVisible = true;
3062
+ this.position();
3063
+ this.dispatchEventDropdownToggle();
3064
+ }
3065
+
3066
+ // Setup auto update to handle resize and scroll
3067
+ element.cleanup = autoUpdate(
3068
+ element.trigger || element.parentNode,
3069
+ element.bib,
3070
+ () => {
3071
+ this.position();
3072
+ },
3073
+ );
3074
+
3075
+ const idx = AuroFloatingUI.openingQueue.indexOf(this);
3076
+ if (idx > -1) {
3077
+ AuroFloatingUI.openingQueue.splice(idx, 1);
3078
+ }
3079
+ AuroFloatingUI.openingQueue.push(this);
3080
+ }
3081
+ }
3082
+
3083
+ /**
3084
+ * Hides the floating UI element.
3085
+ * @param {String} eventType - The event type that triggered the hiding action.
3086
+ */
3087
+ hideBib(eventType = "unknown") {
3088
+ const element = this.element;
3089
+ if (!element) {
3090
+ return;
3091
+ }
3092
+
3093
+ if (element.disabled) {
3094
+ return;
3095
+ }
3096
+
3097
+ // noToggle dropdowns should not close when the trigger is clicked (the
3098
+ // "toggle" behavior), but they CAN still close via other interactions like
3099
+ // Escape key or focus loss.
3100
+ if (element.noToggle && eventType === "click") {
3101
+ return;
3102
+ }
3103
+
3104
+ this.lockScroll(false);
3105
+ element.triggerChevron?.removeAttribute("data-expanded");
3106
+
3107
+ if (element.isPopoverVisible) {
3108
+ element.isPopoverVisible = false;
3109
+ }
3110
+ if (this.showing) {
3111
+ this.cleanupHideHandlers();
3112
+ this.showing = false;
3113
+ this.dispatchEventDropdownToggle(eventType);
3114
+ }
3115
+
3116
+ // Only clear the global reference if the bib was actually hidden.
3117
+ // Clearing it when hideBib is blocked (e.g. noToggle + click) corrupts
3118
+ // the singleton state so other dropdowns can't detect this one is still open.
3119
+ document.expandedAuroFloater = null;
3120
+ const idx = AuroFloatingUI.openingQueue.indexOf(this);
3121
+ if (idx > -1) {
3122
+ AuroFloatingUI.openingQueue.splice(idx, 1);
3123
+ }
3124
+ }
3125
+
3126
+ /**
3127
+ * @private
3128
+ * @returns {void} Dispatches event with an object showing the state of the dropdown.
3129
+ * @param {String} eventType - The event type that triggered the toggle action.
3130
+ */
3131
+ dispatchEventDropdownToggle(eventType) {
3132
+ const element = this.element;
3133
+ if (!element) {
3134
+ return;
3135
+ }
3136
+
3137
+ const event = new CustomEvent(
3138
+ this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
3139
+ {
3140
+ detail: {
3141
+ expanded: this.showing,
3142
+ eventType: eventType || "unknown",
3143
+ },
3144
+ composed: true,
3145
+ },
3146
+ );
3147
+
3148
+ element.dispatchEvent(event);
3149
+ }
3150
+
3151
+ handleClick() {
3152
+ const element = this.element;
3153
+ if (!element) {
3154
+ return;
3155
+ }
3156
+
3157
+ if (element.isPopoverVisible) {
3158
+ this.hideBib("click");
3159
+ } else {
3160
+ this.showBib();
3161
+ }
3162
+
3163
+ const event = new CustomEvent(
3164
+ this.eventPrefix ? `${this.eventPrefix}-triggerClick` : "triggerClick",
3165
+ {
3166
+ composed: true,
3167
+ detail: {
3168
+ expanded: element.isPopoverVisible,
3169
+ },
3170
+ },
3171
+ );
3172
+
3173
+ element.dispatchEvent(event);
3174
+ }
3175
+
3176
+ handleEvent(event) {
3177
+ const element = this.element;
3178
+ if (!element || element.disableEventShow) {
3179
+ return;
3180
+ }
3181
+
3182
+ switch (event.type) {
3183
+ case "keydown": {
3184
+ // Support both Enter and Space keys for accessibility
3185
+ // Space is included as it's expected behavior for interactive elements
3186
+
3187
+ const origin = event.composedPath()[0];
3188
+ if (
3189
+ event.key === "Enter" ||
3190
+ (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3191
+ ) {
3192
+ event.preventDefault();
3193
+ this.handleClick();
3194
+ }
3195
+ break;
3196
+ }
3197
+ case "mouseenter":
3198
+ if (element.hoverToggle) {
3199
+ this.showBib();
3200
+ }
3201
+ break;
3202
+ case "mouseleave":
3203
+ if (element.hoverToggle) {
3204
+ this.hideBib("mouseleave");
3205
+ }
3206
+ break;
3207
+ case "focus":
3208
+ if (element.focusShow) {
3209
+ /*
3210
+ This needs to better handle clicking that gives focus -
3211
+ currently it shows and then immediately hides the bib
3212
+ */
3213
+ this.showBib();
3214
+ }
3215
+ break;
3216
+ case "blur":
3217
+ // send this task 100ms later queue to
3218
+ // wait a frame in case focus moves within the floating element/bib
3219
+ setTimeout(() => this.handleFocusLoss(), 0);
3220
+ break;
3221
+ case "click":
3222
+ if (document.activeElement === document.body) {
3223
+ event.currentTarget.focus();
3224
+ }
3225
+ this.handleClick();
3226
+ break;
3227
+ // Do nothing
3228
+ }
3229
+ }
3230
+
3231
+ /**
3232
+ * Manages the tabIndex of the trigger element based on its focusability.
3233
+ *
3234
+ * If the trigger element or any of its children are inherently focusable, the tabIndex of the component is set to -1.
3235
+ * This prevents the component itself from being focusable when the trigger element already handles focus.
3236
+ */
3237
+ handleTriggerTabIndex() {
3238
+ const element = this.element;
3239
+ if (!element) {
3240
+ return;
3241
+ }
3242
+
3243
+ const focusableElementSelectors = [
3244
+ "a",
3245
+ "button",
3246
+ 'input:not([type="hidden"])',
3247
+ "select",
3248
+ "textarea",
3249
+ '[tabindex]:not([tabindex="-1"])',
3250
+ "auro-button",
3251
+ "auro-input",
3252
+ "auro-hyperlink",
3253
+ ];
3254
+
3255
+ const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
3256
+ if (!triggerNode) {
3257
+ return;
3258
+ }
3259
+ const triggerNodeTagName = triggerNode.tagName.toLowerCase();
3260
+
3261
+ focusableElementSelectors.forEach((selector) => {
3262
+ // Check if the trigger node element is focusable
3263
+ if (triggerNodeTagName === selector) {
3264
+ element.tabIndex = -1;
3265
+ return;
3266
+ }
3267
+
3268
+ // Check if any child is focusable
3269
+ if (triggerNode.querySelector(selector)) {
3270
+ element.tabIndex = -1;
3271
+ }
3272
+ });
3273
+ }
3274
+
3275
+ /**
3276
+ *
3277
+ * @param {*} eventPrefix
3278
+ */
3279
+ regenerateBibId() {
3280
+ const element = this.element;
3281
+ if (!element) {
3282
+ return;
3283
+ }
3284
+
3285
+ this.id = element.getAttribute("id");
3286
+ if (!this.id) {
3287
+ this.id = window.crypto.randomUUID();
3288
+ element.setAttribute("id", this.id);
3289
+ }
3290
+
3291
+ element.bib?.setAttribute("id", `${this.id}-floater-bib`);
3292
+ }
3293
+
3294
+ configure(elem, eventPrefix, enableKeyboardHandling = true) {
3295
+ AuroFloatingUI.setupMousePressChecker();
3296
+ this.enableKeyboardHandling = enableKeyboardHandling;
3297
+
3298
+ this.eventPrefix = eventPrefix;
3299
+ if (this.element !== elem) {
3300
+ this.element = elem;
3301
+ }
3302
+
3303
+ const element = this.element;
3304
+ if (!element) {
3305
+ return;
3306
+ }
3307
+
3308
+ if (this.behavior !== element.behavior) {
3309
+ this.behavior = element.behavior;
3310
+ }
3311
+
3312
+ if (element.trigger) {
3313
+ this.disconnect();
3314
+ }
3315
+ element.trigger =
3316
+ element.triggerElement ||
3317
+ element.shadowRoot?.querySelector("#trigger") ||
3318
+ element.trigger;
3319
+ element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
3320
+ element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
3321
+ element.triggerChevron =
3322
+ element.shadowRoot?.querySelector("#showStateIcon");
3323
+
3324
+ if (element.floaterConfig) {
3325
+ element.hoverToggle = element.floaterConfig.hoverToggle;
3326
+ }
3327
+
3328
+ this.regenerateBibId();
3329
+ this.handleTriggerTabIndex();
3330
+
3331
+ this.handleEvent = this.handleEvent.bind(this);
3332
+ if (element.trigger) {
3333
+ if (this.enableKeyboardHandling) {
3334
+ element.trigger.addEventListener("keydown", this.handleEvent);
3335
+ }
3336
+ element.trigger.addEventListener("click", this.handleEvent);
3337
+ element.trigger.addEventListener("mouseenter", this.handleEvent);
3338
+ element.trigger.addEventListener("mouseleave", this.handleEvent);
3339
+ element.trigger.addEventListener("focus", this.handleEvent);
3340
+ element.trigger.addEventListener("blur", this.handleEvent);
3341
+ }
3342
+ }
3343
+
3344
+ disconnect() {
3345
+ this.cleanupHideHandlers();
3346
+
3347
+ const element = this.element;
3348
+ if (!element) {
3349
+ return;
3350
+ }
3351
+
3352
+ element.cleanup?.();
3353
+
3354
+ if (element.bib && element.shadowRoot) {
3355
+ element.shadowRoot.append(element.bib);
3356
+ }
3357
+
3358
+ // Remove event & keyboard listeners
3359
+ if (element.trigger) {
3360
+ element.trigger.removeEventListener("keydown", this.handleEvent);
3361
+ element.trigger.removeEventListener("click", this.handleEvent);
3362
+ element.trigger.removeEventListener("mouseenter", this.handleEvent);
3363
+ element.trigger.removeEventListener("mouseleave", this.handleEvent);
3364
+ element.trigger.removeEventListener("focus", this.handleEvent);
3365
+ element.trigger.removeEventListener("blur", this.handleEvent);
3366
+ }
3367
+ }
3368
+ }
3369
+
3370
+ class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[.]/g,"_"),o}generateTag(o,s$1,a){const r=this.generateElementName(o,s$1),i$1=i`${s(r)}`;return customElements.get(r)||customElements.define(r,class extends a{}),i$1}}class d{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}getSlotText(t,e){const o=t.shadowRoot?.querySelector(`slot[name="${e}"]`),s=(o?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim();return s||null}}class h{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}}var c=i$5`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]),:host([appearance=brand]){--ds-auro-loader-color: var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]),:host([appearance=inverse]){--ds-auro-loader-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color: transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color: currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color: currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}
3371
+ `,u$1=i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0;box-sizing:border-box}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin: .375rem;--margin-xs: .2rem;--margin-sm: .5rem;--margin-md: .75rem;--margin-lg: 1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin) * 6);height:calc(1rem + var(--margin) * 2)}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(1.95rem + var(--margin-xs) * 6);height:calc(.65rem + var(--margin-xs) * 2)}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm) * 6);height:calc(2rem + var(--margin-sm) * 2)}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md) * 6);height:calc(3rem + var(--margin-md) * 2)}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg) * 6);height:calc(5rem + var(--margin-lg) * 2)}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-.4s}:host([pulse])>span:nth-child(2){animation-delay:-.2s}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,to{opacity:.1;transform:scale(.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}to{left:110%}}:host>.no-animation{display:none}@media (prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}
3372
+ `,p$1=i$5`:host{--ds-auro-loader-background-color: currentcolor;--ds-auro-loader-border-color: currentcolor;--ds-auro-loader-color: currentcolor}
3373
+ `;class b extends i$2{constructor(){super(),this.appearance="default",this.keys=[0,1,2,3,4,5,6,7,8,9],this.mdCount=3,this.smCount=2,this.runtimeUtils=new h,this.orbit=false,this.ringworm=false,this.laser=false,this.pulse=false;}static get properties(){return {appearance:{type:String,reflect:true},laser:{type:Boolean,reflect:true},orbit:{type:Boolean,reflect:true},pulse:{type:Boolean,reflect:true},ringworm:{type:Boolean,reflect:true}}}static get styles(){return [u$1,c,p$1]}static register(t="auro-loader"){h.prototype.registerComponent(t,b);}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-loader");}connectedCallback(){super.connectedCallback();}defineTemplate(){let t=Array.from(Array(this.mdCount).keys());return this.orbit||this.laser?t=Array.from(Array(this.smCount).keys()):this.ringworm&&(t=Array.from(Array(0).keys())),t}render(){return b$1`
3374
+ ${this.defineTemplate().map(t=>b$1`
3375
+ <span part="element" class="loader node-${t}"></span>
3376
+ `)}
3377
+
3378
+ <div class="no-animation body-default">Loading...</div>
3379
+
3380
+ ${this.ringworm?b$1`
3381
+ <svg part="element" class="circular" viewBox="25 25 50 50">
3382
+ <circle class="path" cx="50" cy="50" r="20" fill="none"/>
3383
+ </svg>`:""}
3384
+ `}}const m$1=new WeakMap,v=new WeakMap,x=({host:t,target:e,matcher:o,removeOriginal:s=true})=>{v.has(t)||v.set(t,{matchers:new Set,targets:new Map});const a=v.get(t);return a.matchers.add(o),a.targets.has(e)||a.targets.set(e,new Map),a.targets.get(e).set(o,{removeOriginal:s,currentAttributes:new Map}),f$1({host:t,target:e,matcher:o,removeOriginal:s}),y$1(t),{cleanup:()=>g$1(t,e,o),getObservedAttributes:()=>A(t,e,o),getObservedAttribute:s=>S(t,e,o,s)}},g$1=(t,e,o)=>{const s=v.get(t);if(!s)return;const a=s.targets.get(e);a&&(a.delete(o),0===a.size&&s.targets.delete(e));let r=false;for(const t of s.targets.values())if(t.has(o)){r=true;break}r||s.matchers.delete(o),0!==s.targets.size&&0!==s.matchers.size||w$1(t);},f$1=({host:t,target:e,matcher:o,removeOriginal:s=true})=>{const a=t.getAttributeNames().filter(t=>o(t)).reduce((e,o)=>(e[o]=t.getAttribute(o),e),{});Object.entries(a).forEach(([a,r])=>{k$1(t,e,o,a,r),e.setAttribute(a,r),s&&t.removeAttribute(a);});},y$1=t=>{if(m$1.has(t))return m$1.get(t);const e=new MutationObserver(e=>{const o=v.get(t);o&&e.filter(t=>"attributes"===t.type).forEach(e=>{const s=e.attributeName;for(const e of o.matchers)if(e(s))for(const[s,a]of o.targets.entries())if(a.has(e)){const{removeOriginal:o}=a.get(e);f$1({host:t,target:s,matcher:e,removeOriginal:o});}});});return e.observe(t,{attributes:true}),m$1.set(t,e),e},w$1=t=>{if(m$1.has(t)){m$1.get(t).disconnect(),m$1.delete(t);}v.has(t)&&v.delete(t);},z$1=(t,e,o)=>{const s=v.get(t);if(!s)return;const a=s.targets.get(e);return a?a.get(o):void 0},k$1=(t,e,o,s,a)=>{const r=z$1(t,e,o);r&&r.currentAttributes.set(s,a);},S=(t,e,o,s)=>{const a=z$1(t,e,o);if(a)return a.currentAttributes.get(s)},A=(t,e,o)=>{const s=z$1(t,e,o);return s?Array.from(s.currentAttributes.entries()):[]},q={"aria-":t=>t.startsWith("aria-"),role:t=>t.match(/^role$/)},B=({host:t,target:e,removeOriginal:o=true})=>(({host:t,target:e,match:o,removeOriginal:s=true})=>{if("object"!=typeof t||!(t instanceof HTMLElement))throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');if("object"!=typeof e||!(e instanceof HTMLElement))throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');if("function"!=typeof o)throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');if("boolean"!=typeof s)throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');return x({host:t,target:e,matcher:o,removeOriginal:s})})({host:t,target:e,match:t=>{for(const e in q)if(q[e](t))return true;return false},removeOriginal:o});class C extends i$2{attributeWatcher;static get properties(){return {layout:{type:String,attribute:"layout",reflect:true},shape:{type:String,attribute:"shape",reflect:true},size:{type:String,attribute:"size",reflect:true},appearance:{type:String,reflect:true},onDark:{type:Boolean,attribute:"ondark",reflect:true},wrapper:{attribute:false,reflect:false}}}constructor(){super(),this.onDark=false,this.appearance="default";}resetShapeClasses(){this.shape&&this.size&&this.wrapper&&(this.wrapper.classList.forEach(t=>{t.startsWith("shape-")&&this.wrapper.classList.remove(t);}),this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`));}resetLayoutClasses(){this.layout&&this.wrapper&&(this.wrapper.classList.forEach(t=>{t.startsWith("layout-")&&this.wrapper.classList.remove(t);}),this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`));}updateComponentArchitecture(){this.resetLayoutClasses(),this.resetShapeClasses();}updated(t){(t.has("layout")||t.has("shape")||t.has("size"))&&this.updateComponentArchitecture();}firstUpdated(){super.firstUpdated(),this.wrapper=this.shadowRoot.querySelector(".wrapper"),this.attributeWatcher=B({host:this,target:this.shadowRoot.querySelector(".wrapper")});}disconnectedCallback(){super.disconnectedCallback(),this.attributeWatcher&&(this.attributeWatcher.cleanup(),this.attributeWatcher=null);}render(){try{return this.renderLayout()}catch(t){return console.error("Failed to get the defined layout - using the default layout",t),this.getLayout("default")}}}var U=i$5`[auro-loader]{color:var(--ds-auro-button-loader-color, #ffffff)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image),var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}:host(:focus-within) .auro-button{outline-color:var(--ds-auro-button-border-inset-color)}:host(:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-hover, #00274a)}:host([disabled]){--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}:host([variant=secondary]){--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-secondary-text, #01426a)}:host([variant=secondary]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text-hover, #00274a)}:host([variant=secondary]:focus-within){--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}:host([variant=secondary][disabled]){--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([variant=tertiary]){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, .05));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, .05));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-tertiary-text, #01426a)}:host([variant=tertiary]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, .1));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, .1));--ds-auro-button-border-color: transparent}:host([variant=tertiary]:focus-within){--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}:host([variant=tertiary][disabled]){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, .05));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, .05));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([variant=ghost]){--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-ghost-text, #01426a)}:host([variant=ghost]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, .05));--ds-auro-button-container-image: var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, .05));--ds-auro-button-border-color: transparent}:host([variant=ghost]:focus-within){--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}:host([variant=ghost][disabled]){--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([variant=flat]) .auro-button{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}:host([variant=flat]) .auro-button:active:not(:disabled),:host([variant=flat]) .auro-button:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}:host([variant=flat]) .auro-button:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}:host([variant=flat]:focus-within){--ds-auro-button-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color: var(--ds-advanced-color-button-primary-text-inverse, #01426a)}:host([ondark]:not([disabled]):is([data-hover],[data-active])),:host([appearance=inverse]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}:host([ondark]:focus-within),:host([appearance=inverse]:focus-within){--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused, #01426a)}:host([ondark][disabled]),:host([appearance=inverse][disabled]){--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, .75));--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, .75));--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, .75));--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([ondark][variant=secondary]),:host([appearance=inverse][variant=secondary]){--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}:host([ondark][variant=secondary]:not([disabled]):is([data-hover],[data-active])),:host([appearance=inverse][variant=secondary]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-text-color: var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, .1));--ds-auro-button-container-image: var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, .1))}:host([ondark][variant=secondary]:focus-within),:host([appearance=inverse][variant=secondary]:focus-within){--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([ondark][variant=secondary][disabled]),:host([appearance=inverse][variant=secondary][disabled]){--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color: var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}:host([ondark][variant=tertiary]),:host([appearance=inverse][variant=tertiary]){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, .05));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, .05));--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}:host([ondark][variant=tertiary]:not([disabled]):is([data-hover],[data-active])),:host([appearance=inverse][variant=tertiary]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, .1));--ds-auro-button-container-image: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, .1))}:host([ondark][variant=tertiary]:focus-within),:host([appearance=inverse][variant=tertiary]:focus-within){--ds-auro-button-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([ondark][variant=tertiary][disabled]),:host([appearance=inverse][variant=tertiary][disabled]){--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([ondark][variant=ghost]),:host([appearance=inverse][variant=ghost]){--ds-auro-button-container-color: transparent;--ds-auro-button-container-image: transparent;--ds-auro-button-border-color: transparent;--ds-auro-button-text-color: var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color: var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}:host([ondark][variant=ghost]:not([disabled]):is([data-hover],[data-active])),:host([appearance=inverse][variant=ghost]:not([disabled]):is([data-hover],[data-active])){--ds-auro-button-container-color: var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, .05));--ds-auro-button-container-image: var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, .05));--ds-auro-button-border-color: transparent}:host([ondark][variant=ghost]:focus-within),:host([appearance=inverse][variant=ghost]:focus-within){border-color:transparent;--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([ondark][variant=ghost][disabled]),:host([appearance=inverse][variant=ghost][disabled]){--ds-auro-button-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([ondark][variant=flat]) .auro-button,:host([appearance=inverse][variant=flat]) .auro-button{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}:host([ondark][variant=flat]) .auro-button:active:not(:disabled),:host([ondark][variant=flat]) .auro-button:hover:not(:disabled),:host([appearance=inverse][variant=flat]) .auro-button:active:not(:disabled),:host([appearance=inverse][variant=flat]) .auro-button:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}:host([ondark][variant=flat]) .auro-button:disabled,:host([appearance=inverse][variant=flat]) .auro-button:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}:host([ondark][variant=flat]:focus-within),:host([appearance=inverse][variant=flat]:focus-within){--ds-auro-button-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}
3385
+ `,H=i$5`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-rounded-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-circle-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:50%;min-width:72px;max-width:72px;padding:0}.shape-circle-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-circle-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-circle-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-square-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px;min-width:72px;max-width:72px;padding:0}.shape-square-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-square-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-square-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px}.shape-pill-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px 0 0 28px}.shape-pill-left-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-left-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-left-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:0 28px 28px 0}.shape-pill-right-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-right-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-right-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-circle-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:50%;min-width:56px;max-width:56px;padding:0}.shape-circle-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-circle-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-circle-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-square-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px;min-width:56px;max-width:56px;padding:0}.shape-square-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-square-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-square-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-rounded-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-rounded-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px 0 0 24px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:0 24px 24px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-circle-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:50%;min-width:48px;max-width:48px;padding:0}.shape-circle-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-circle-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-circle-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-square-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px;min-width:48px;max-width:48px;padding:0}.shape-square-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-square-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-square-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-rounded-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-rounded-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px}.shape-pill-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px 0 0 18px}.shape-pill-left-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-left-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-left-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:0 18px 18px 0}.shape-pill-right-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-right-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-right-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-circle-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:50%;min-width:36px;max-width:36px;padding:0}.shape-circle-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-circle-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-circle-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-square-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px;min-width:36px;max-width:36px;padding:0}.shape-square-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-square-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-square-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:4px}.shape-rounded-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-rounded-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-rounded-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px}.shape-pill-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px 0 0 12px}.shape-pill-left-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-left-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-left-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:0 12px 12px 0}.shape-pill-right-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-right-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-right-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-circle-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:50%;min-width:24px;max-width:24px;padding:0}.shape-circle-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-circle-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-circle-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-square-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:6px;min-width:24px;max-width:24px;padding:0}.shape-square-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-square-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-square-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}
3386
+ `,M$1=i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host([size=xs][shape=rounded]) ::slotted(auro-icon),:host([size=xs][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill]) ::slotted(auro-icon),:host([size=xs][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left]) ::slotted(auro-icon),:host([size=xs][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right]) ::slotted(auro-icon),:host([size=xs][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle]) ::slotted(auro-icon),:host([size=xs][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=flat]) .auro-button:focus,:host([size=xs][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square]) ::slotted(auro-icon),:host([size=xs][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=square][variant=secondary]) .auro-button:focus,:host([size=xs][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=flat]) .auro-button:focus,:host([size=xs][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=ghost]) .auro-button:focus,:host([size=xs][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded]) ::slotted(auro-icon),:host([size=sm][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill]) ::slotted(auro-icon),:host([size=sm][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left]) ::slotted(auro-icon),:host([size=sm][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right]) ::slotted(auro-icon),:host([size=sm][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle]) ::slotted(auro-icon),:host([size=sm][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus,:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=flat]) .auro-button:focus,:host([size=sm][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus,:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square]) ::slotted(auro-icon),:host([size=sm][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=square][variant=secondary]) .auro-button:focus,:host([size=sm][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=flat]) .auro-button:focus,:host([size=sm][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=ghost]) .auro-button:focus,:host([size=sm][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded]) ::slotted(auro-icon),:host([size=md][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill]) ::slotted(auro-icon),:host([size=md][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left]) ::slotted(auro-icon),:host([size=md][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right]) ::slotted(auro-icon),:host([size=md][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle]) ::slotted(auro-icon),:host([size=md][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=circle][variant=secondary]) .auro-button:focus,:host([size=md][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=flat]) .auro-button:focus,:host([size=md][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=ghost]) .auro-button:focus,:host([size=md][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square]) ::slotted(auro-icon),:host([size=md][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=square][variant=primary]) .auro-button:focus,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=primary]) .auro-button:focus:after,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=square][variant=secondary]) .auro-button:focus,:host([size=md][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=tertiary]) .auro-button:focus,:host([size=md][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=flat]) .auro-button:focus,:host([size=md][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=ghost]) .auro-button:focus,:host([size=md][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded]) ::slotted(auro-icon),:host([size=lg][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill]) ::slotted(auro-icon),:host([size=lg][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left]) ::slotted(auro-icon),:host([size=lg][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right]) ::slotted(auro-icon),:host([size=lg][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle]) ::slotted(auro-icon),:host([size=lg][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, .25rem))}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus,:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=flat]) .auro-button:focus,:host([size=lg][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus,:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square]) ::slotted(auro-icon),:host([size=lg][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, .25rem))}:host([size=lg][shape=square][variant=primary]) .auro-button:focus,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=square][variant=secondary]) .auro-button:focus,:host([size=lg][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=flat]) .auro-button:focus,:host([size=lg][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=ghost]) .auro-button:focus,:host([size=lg][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded]) ::slotted(auro-icon),:host([size=xl][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill]) ::slotted(auro-icon),:host([size=xl][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left]) ::slotted(auro-icon),:host([size=xl][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right]) ::slotted(auro-icon),:host([size=xl][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle]) ::slotted(auro-icon),:host([size=xl][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, .25rem))}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=flat]) .auro-button:focus,:host([size=xl][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square]) ::slotted(auro-icon),:host([size=xl][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, .25rem))}:host([size=xl][shape=square][variant=primary]) .auro-button:focus,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=square][variant=secondary]) .auro-button:focus,:host([size=xl][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=flat]) .auro-button:focus,:host([size=xl][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=ghost]) .auro-button:focus,:host([size=xl][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-150, .75rem)}:host([size=sm]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-200, 1rem)}:host([size=md]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-300, 1.5rem)}:host([size=lg]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-400, 2rem)}:host([size=xl]) .inset .contentWrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-inline:var(--ds-size-500, 2.5rem)}:host([shape=circle]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host([shape=square]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}.textSlot{display:inline-flex;align-items:center;gap:var(--ds-size-100, .5rem)}.contentWrapper{font-size:0}slot{pointer-events:none}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}:host{display:inline-block;overflow:hidden}.auro-button{position:relative;cursor:pointer;padding:0 var(--ds-size-300, 1.5rem);padding-inline:unset;padding-block:unset;box-sizing:content-box;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;outline:none;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, .5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding .3s ease-out}.auro-button:focus,.auro-button:focus-visible{outline:none}.auro-button:active{transform:scale(.95)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}:host([fluid]){display:block}:host([fluid]) .auro-button:not(.thin):not(.simple){width:calc(100% - 4px)}:host([fluid]) .auro-button.thin{width:calc(100% - 2px)}:host([fluid]) .auro-button.simple{width:100%}:host([static]) .auro-button{pointer-events:none;cursor:default;display:inline-flex}:host([static]) .auro-button .contentWrapper{display:inline-flex}
3387
+ `,R=i$5`:host{--ds-auro-button-border-color: var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color: var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image: var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color: var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color: var(--ds-advanced-color-button-primary-text, #ffffff)}
3388
+ `;const N=["circle","square"];class T extends C{static get formAssociated(){return true}constructor(){super(),this.autofocus=false,this.disabled=false,this.loading=false,this.static=false,this.size="md",this.shape="rounded",this.fluid=false,this.loadingText=this.loadingText||"Loading...",this.variant="primary",this.runtimeUtils=new d,"function"==typeof this.attachInternals?this.internals=this.attachInternals():(this.internals=null,console.warn("This browser does not support form association features. Some form-related functionality may not work as expected. Consider using a polyfill or handling click events manually."));const t=new l;this.loaderTag=t.generateTag("auro-loader","6.1.0",b),this.buttonHref=void 0,this.buttonTarget=void 0,this.buttonRel=void 0;}static get styles(){return [R,M$1,U,H]}static get properties(){return {...C.properties,layout:{type:Boolean,attribute:false,reflect:false},autofocus:{type:Boolean,reflect:true},disabled:{type:Boolean,reflect:true},fluid:{type:Boolean,reflect:true},loading:{type:Boolean,reflect:true},loadingText:{type:String},tIndex:{type:String,reflect:true},tabindex:{type:String,reflect:false},title:{type:String,reflect:true},type:{type:String,reflect:true},value:{type:String,reflect:true},variant:{type:String,reflect:true},buttonHref:{type:String},buttonTarget:{type:String},buttonRel:{type:String},static:{type:Boolean,reflect:true},onHover:{attribute:"data-hover",type:Boolean,reflect:true},onActive:{attribute:"data-active",type:Boolean,reflect:true}}}static register(t="auro-button"){d.prototype.registerComponent(t,T);}focus(){this.renderRoot.querySelector("button").focus();}surfaceSubmitEvent(){this.form&&this.form.requestSubmit();}get form(){return this.internals?this.internals.form:null}get showText(){return !N.includes(this.shape)}get currentAriaLabel(){if(!this.attributeWatcher)return;return this.attributeWatcher.getObservedAttribute("aria-label")||void 0}get currentAriaLabelledBy(){if(!this.attributeWatcher)return;return this.attributeWatcher.getObservedAttribute("aria-labelledby")||void 0}get iconOnly(){return N.includes(this.shape)}getFontSize(){return (this.iconOnly?{xs:"heading-xs",sm:"heading-sm",md:"heading-sm",lg:"heading-md",xl:"heading-lg"}:{xs:"body-xs",sm:"body-sm",md:"body-default",lg:"body-lg",xl:"body-lg"})[this.size]||"body-default"}get _renderTag(){return this.static?i`span`:this.buttonHref?i`a`:i`button`}firstUpdated(){super.firstUpdated(),this.runtimeUtils.handleComponentTagRename(this,"auro-button");}generateAriaLabel(){return this.loading?this.runtimeUtils.getSlotText(this,"ariaLabel.loading")||this.loadingText:this.runtimeUtils.getSlotText(this,"ariaLabel")||this.currentAriaLabel}onPointerEvent(t){switch(t.type){case "pointerenter":this.onHover=true;break;case "pointerleave":this.onHover=false;break;case "pointerdown":this.onActive=true;break;case "pointerup":case "blur":this.onActive=false;}}renderLayoutDefault(){const t=this.getFontSize(),e$1=this.buttonHref?"link":"button",s={"auro-button":true,inset:this.showText,wrapper:true,loading:this.loading,simple:!["secondary"].includes(this.variant),thin:["secondary"].includes(this.variant)},a={contentWrapper:true,loading:this.loading},r={textSlot:true,[t]:this.showText},l=this.tIndex||this.tabindex;return u$2`
3389
+ <!-- Hidden slots for aria labels -->
3390
+ <slot name="ariaLabel" hidden @slotchange="${this.requestUpdate}"></slot>
3391
+ <slot name="ariaLabel.loading" hidden @slotchange="${this.requestUpdate}"></slot>
3392
+
3393
+ <${this._renderTag}
3394
+ part="${e$1}"
3395
+ aria-label="${o$1(this.generateAriaLabel())}"
3396
+ aria-labelledby="${o$1(this.loading?void 0:this.currentAriaLabelledBy||void 0)}"
3397
+ tabindex="${o$1(this.static?-1:l)}"
3398
+ ?autofocus="${this.autofocus}"
3399
+ class=${e(s)}
3400
+ ?disabled="${this.disabled||this.loading}"
3401
+ ?onDark="${this.onDark}"
3402
+ title="${o$1(this.title?this.title:void 0)}"
3403
+ name="${o$1(this.name?this.name:void 0)}"
3404
+ type="${o$1(this.type?this.type:void 0)}"
3405
+ variant="${o$1(this.variant?this.variant:void 0)}"
3406
+ .value="${o$1(this.value?this.value:void 0)}"
3407
+ @click="${this.static||"submit"!==this.type?void 0:this.surfaceSubmitEvent}"
3408
+ @pointerenter="${this.onPointerEvent}"
3409
+ @pointerleave="${this.onPointerEvent}"
3410
+ @pointerdown="${this.onPointerEvent}"
3411
+ @pointerup="${this.onPointerEvent}"
3412
+ @blur="${this.onPointerEvent}"
3413
+ href="${o$1(this.buttonHref||void 0)}"
3414
+ target="${o$1(this.buttonTarget||void 0)}"
3415
+ rel="${o$1(this.buttonRel||void 0)}"
3416
+ >
3417
+ ${o$1(this.loading?u$2`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>`:void 0)}
3418
+
3419
+ <span class="${e(a)}" part="contentWrapper">
3420
+ <span class="${e(r)}" part="text">
3421
+ <slot></slot>
3422
+ </span>
3423
+ </span>
3424
+ </${this._renderTag}>
3425
+ `}renderLayout(){return this.renderLayoutDefault()}}
3426
+
3427
+ class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,class extends a{});}closestElement(t,a=this,e=(a,s=a&&a.closest(t))=>a&&a!==document&&a!==window?s||e(a.getRootNode().host):null){return e(a)}handleComponentTagRename(t,a){const e=a.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,a){const e=a.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}getSlotText(t,a){const e=t.shadowRoot?.querySelector(`slot[name="${a}"]`);return (e?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim()||null}}var u='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>',g='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" style="min-width:100%;height:auto;fill:currentColor" viewBox="0 0 142 138" part="svg"><title id="tail-DEFAULT__title">Airplane tail default image with light gray color</title><path fill="url(#paint0_linear_9225_2069)" fill-rule="evenodd" d="M124.093 14.665a3.26 3.26 0 0 1 3.208 3.829L101.097 119.85c-.47 1.087-2.211 3.398-5.692 3.471l-.106.001-80.65.013A659230 659230 0 0 1 99.08 17.412c1.214-1.497 3.275-2.722 5.372-2.747z" clip-rule="evenodd"/><defs><linearGradient id="paint0_linear_9225_2069" x1="114.823" x2="60.061" y1="14.665" y2="123.335" gradientUnits="userSpaceOnUse"><stop offset=".5" stop-color="#707984"/><stop offset=".5" stop-color="#646E7B"/></linearGradient></defs></svg>';class m extends i$2{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}}const f=new Map,w=(t,a={})=>{const e=a.responseParser||(t=>t.text());return f.has(t)||f.set(t,fetch(t).then(e)),f.get(t)};var z=i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex;line-height:var(--ds-auro-icon-size)}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.svgWrapper [part=svg]{display:flex}.labelWrapper{margin-left:var(--ds-size-50, .25rem)}.labelWrapper ::slotted(*){line-height:inherit!important}
3428
+ `;class y extends m{constructor(){super(),this._initializeDefaults();}_initializeDefaults(){this.onDark=false,this.appearance="default";}static get properties(){return {...m.properties,onDark:{type:Boolean,reflect:true},appearance:{type:String,reflect:true},svg:{attribute:false,reflect:true}}}static get styles(){return z}async fetchIcon(t,a){let e="";e="logos"===t?await w(`${this.uri}/${t}/${a}.svg`):await w(`${this.uri}/icons/${t}/${a}.svg`);return (new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const t=await this.fetchIcon(this.category,this.name);if(t)this.svg=t;else if(!t){const t=this.name?.startsWith("tail-")?g:u;this.svg=(new DOMParser).parseFromString(t,"text/html").body.querySelector("svg");}}}catch(t){this.svg=void 0;}}}i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
3429
+ `;var M=i$5`:host{--ds-auro-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color: #02426D;--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}
3430
+ `;var _=i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]),:host(:not([appearance=inverse])[variant=accent1]){--ds-auro-icon-color: var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]),:host(:not([appearance=inverse])[variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]),:host(:not([appearance=inverse])[variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]),:host(:not([appearance=inverse])[variant=statusDefault]){--ds-auro-icon-color: var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]),:host(:not([appearance=inverse])[variant=statusInfo]){--ds-auro-icon-color: var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]),:host(:not([appearance=inverse])[variant=statusSuccess]){--ds-auro-icon-color: var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]),:host(:not([appearance=inverse])[variant=statusWarning]){--ds-auro-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]),:host(:not([appearance=inverse])[variant=statusError]){--ds-auro-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]),:host(:not([appearance=inverse])[variant=statusInfoSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]),:host(:not([appearance=inverse])[variant=statusSuccessSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]),:host(:not([appearance=inverse])[variant=statusWarningSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]),:host(:not([appearance=inverse])[variant=statusErrorSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]),:host(:not([appearance=inverse])[variant=fareBasicEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]),:host(:not([appearance=inverse])[variant=fareBusiness]){--ds-auro-icon-color: var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]),:host(:not([appearance=inverse])[variant=fareEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]),:host(:not([appearance=inverse])[variant=fareFirst]){--ds-auro-icon-color: var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]),:host(:not([appearance=inverse])[variant=farePremiumEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]),:host(:not([appearance=inverse])[variant=tierOneWorldEmerald]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]),:host(:not([appearance=inverse])[variant=tierOneWorldSapphire]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]),:host(:not([appearance=inverse])[variant=tierOneWorldRuby]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]),:host([appearance=inverse][variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]),:host([appearance=inverse][variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]),:host([appearance=inverse][variant=statusError]){--ds-auro-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}
3431
+ `;class k extends y{constructor(){super(),this._initializeDefaults();}_initializeDefaults(){this.variant=void 0,this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new p;}static get properties(){return {...y.properties,ariaHidden:{type:String,reflect:true},category:{type:String,reflect:true},customColor:{type:Boolean,reflect:true},customSvg:{type:Boolean},label:{type:Boolean,reflect:true},name:{type:String,reflect:true},variant:{type:String,reflect:true}}}static get styles(){return [y.styles,M,z,_]}static register(t="auro-icon"){p.prototype.registerComponent(t,k);}connectedCallback(){super.connectedCallback(),this.runtimeUtils.handleComponentTagRename(this,"auro-icon");}exposeCssParts(){this.setAttribute("exportparts","svg:iconSvg");}async firstUpdated(){if(await super.firstUpdated(),this.hasAttribute("ariaHidden")&&this.svg){const t=this.svg.querySelector("desc");t&&(t.remove(),this.svg.removeAttribute("aria-labelledby"));}}render(){const t={labelWrapper:true,util_displayHiddenVisually:!this.label};return b$1`
3432
+ <div class="componentWrapper">
3433
+ <div
3434
+ class="${e({svgWrapper:true})}"
3435
+ title="${o$1(this.title||void 0)}">
3436
+ <span aria-hidden="${o$1(this.ariaHidden||true)}" part="svg">
3437
+ ${this.customSvg?b$1`
3438
+ <slot name="svg"></slot>
3439
+ `:b$1`
3440
+ ${this.svg}
3441
+ `}
3442
+ </span>
3443
+ </div>
3444
+
3445
+ <div class="${e(t)}" part="label">
3446
+ <slot></slot>
3447
+ </div>
3448
+ </div>
3449
+ `}}
3450
+
3451
+ var buttonVersion = "12.3.2";
3452
+
3453
+ var iconVersion = "9.2.0";
3454
+
3455
+ var colorCss = i$5`dialog.container .wrapper{background:var(--ds-auro-dialog-container-color);color:var(--ds-auro-dialog-text-color)}dialog.container::backdrop{background:var(--ds-auro-dialog-overlay-open-background-color)}dialog.container:not([popover])::backdrop{background:var(--ds-auro-dialog-overlay-modal-background-color)}@media screen and (min-width:768px){dialog.container{box-shadow:var(--ds-auro-dialog-boxshadow-color)}}.dialog-header--action{border:2px solid transparent;border-radius:var(--ds-border-radius, .375rem);background-color:transparent}
3456
+ `;
3457
+
3458
+ var styleCss = i$5`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);font-weight:var(--wcss-body-default-weight, );line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-default-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-default-emphasized{font-size:var(--wcss-body-default-emphasized-font-size, 1rem);font-weight:var(--wcss-body-default-emphasized-weight, );line-height:var(--wcss-body-default-emphasized-line-height, 1.5rem)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);font-weight:var(--wcss-body-lg-weight, );line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-lg,.body-lg-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg-emphasized{font-size:var(--wcss-body-lg-emphasized-font-size, 1.125rem);font-weight:var(--wcss-body-lg-emphasized-weight, );line-height:var(--wcss-body-lg-emphasized-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);font-weight:var(--wcss-body-sm-weight, );line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-sm-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-sm-emphasized{font-size:var(--wcss-body-sm-emphasized-font-size, .875rem);font-weight:var(--wcss-body-sm-emphasized-weight, );line-height:var(--wcss-body-sm-emphasized-line-height, 1.25rem)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);font-weight:var(--wcss-body-xs-weight, );line-height:var(--wcss-body-xs-line-height, 1rem)}.body-xs,.body-xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs-emphasized{font-size:var(--wcss-body-xs-emphasized-font-size, .75rem);font-weight:var(--wcss-body-xs-emphasized-weight, );line-height:var(--wcss-body-xs-emphasized-line-height, 1rem)}.body-2xs{font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-2xs-weight, );line-height:var(--wcss-body-2xs-line-height, .875rem)}.body-2xs,.body-2xs-emphasized{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-2xs-emphasized{font-size:var(--wcss-body-2xs-emphasized-font-size, .625rem);font-weight:var(--wcss-body-2xs-emphasized-weight, );line-height:var(--wcss-body-2xs-emphasized-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 300);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 300);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{--insetPaddingXl: 0 var(--ds-size-400, 2rem) var(--ds-size-400, 2rem) var(--ds-size-400, 2rem);--insetPaddingXxl: 0 var(--ds-size-600, 3rem) var(--ds-size-600, 3rem) var(--ds-size-600, 3rem);--insetPaddingXxxl: 0 var(--ds-size-800, 4rem) var(--ds-size-800, 4rem) var(--ds-size-800, 4rem)}[auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.dialogOverlay{position:fixed;z-index:-1;bottom:0;left:0;width:100%;height:100%;pointer-events:none}.dialogOverlay--open{z-index:var(--ds-depth-overlay);pointer-events:unset;transition:background .3s cubic-bezier(.4,0,.2,0)}.dialogOverlay--modal{z-index:var(--ds-depth-overlay);transition:background .3s cubic-bezier(.4,0,.5,0)}.bib{position:fixed;inset:0;visibility:hidden;overflow:hidden}.bib dialog.container{display:inline-block;width:100%;max-width:none;height:100%;max-height:none;padding:0;border-width:medium;border-style:none;border-color:currentcolor;border-image:initial;margin:0;background-color:transparent;outline:none;transform:translateZ(0);overflow:hidden}:host([open]) .bib{visibility:visible}.dialog{position:fixed;z-index:-1;top:unset;right:0;bottom:-100%;left:0;box-sizing:border-box;display:flex;flex-direction:column;overflow:visible;width:calc(100% - var(--insetPaddingXl) - var(--insetPaddingXl));max-height:90%;padding:var(--insetPaddingXl);opacity:0;border:0;margin:0;max-width:none;transition:opacity .3s ease-in-out,visibility .3s ease-in-out,bottom .3s ease-in-out}.dialog--open{z-index:var(--ds-depth-modal, 300);visibility:visible;bottom:0;opacity:1}@media screen and (min-width:768px){.dialog{top:10%;bottom:unset;left:0;right:0;max-width:80%;max-height:80%;margin:auto;padding:var(--insetPaddingXxxl);opacity:0;width:calc(100% - var(--insetPaddingXxxl) - var(--insetPaddingXxxl));height:auto;overflow:visible}.dialog--open{opacity:1}}@media screen and (min-width:1024px){.dialog{max-width:986px}}.dialog-footer{padding-top:var(--ds-size-400, 2rem)}@media screen and (min-width:768px){.dialog-footer ::slotted(*){display:flex;justify-content:flex-end}}.dialog-header{display:flex;align-items:flex-start;justify-content:space-between;padding-top:var(--ds-size-800, 4rem);margin-bottom:var(--ds-size-300, 1.5rem)}.dialog-header--action{margin:0;padding:0}.dialog-header--action:hover{cursor:pointer}.dialog-header .heading{flex:1;margin-block:0}.dialog-content{flex:1;overflow:auto;overscroll-behavior:contain;margin:calc(-1 * var(--ds-size-100));padding:var(--ds-size-100)}::slotted([slot=content]){position:relative}:host([unformatted]) .dialog-header--action{position:absolute;top:var(--ds-size-400, 2rem);bottom:unset;right:var(--ds-size-400, 2rem)}@media screen and (min-width:768px){:host([unformatted]) .dialog-header--action{top:var(--ds-size-800, 4rem);bottom:unset;right:var(--ds-size-800, 4rem)}}:host([sm]) .dialog{max-height:30%}@media screen and (min-width:768px){:host([sm]) .dialog{top:10%;bottom:unset;max-width:40%;max-height:80%;padding:var(--insetPaddingXxl)}}@media screen and (min-width:1024px){:host([sm]) .dialog{max-width:740px}}:host([md]) .dialog{max-height:50%}@media screen and (min-width:768px){:host([md]) .dialog{top:10%;bottom:unset;max-width:70%;max-height:80%}}@media screen and (min-width:1024px){:host([md]) .dialog{top:10%;bottom:unset;max-width:986px}}@media screen and (min-width:768px){:host([sm][lg]) .dialog,:host([md][lg]) .dialog{max-height:80%}}:host([sm][lg]) .dialog,:host([md][lg]) .dialog{max-height:90%}:host([unformatted]) .dialog{padding:0}
3459
+ `;
3460
+
3461
+ var styleUnformattedCss = i$5`[unformatted] .unformattedWrapper{padding:var(--ds-size-400, 2rem)}@media screen and (min-width:768px){[unformatted] .unformattedWrapper{padding:var(--ds-size-800, 4rem);padding-top:var(--ds-size-400, 2rem)}}
3462
+ `;
3463
+
3464
+ var tokensCss = i$5`:host{--ds-auro-dialog-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dialog-boxshadow-color: var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, .2));--ds-auro-dialog-overlay-modal-background-color: var(--ds-advanced-color-shared-scrim, rgba(0, 0, 0, .5));--ds-auro-dialog-overlay-open-background-color: var(--ds-advanced-color-shared-scrim, rgba(0, 0, 0, .5));--ds-auro-dialog-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}
3465
+ `;
3466
+
3467
+ // Copyright (c) 2024 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3468
+ // See LICENSE in the project root for license information.
3469
+
3470
+
3471
+ const MOBILE_BREAKPOINT = '--ds-grid-breakpoint-md';
3472
+ /**
3473
+ * @slot header - Text to display as the header of the modal
3474
+ * @slot content - Injects content into the body of the modal
3475
+ * @slot footer - Used for action options, e.g. buttons
3476
+ * @slot ariaLabel.dialog.close - Text to describe the "x" icon close button for screen readers. Default: "Close".
3477
+ * @event toggle - Event fires when the element is closed
3478
+ * @csspart close-button - adjust position of the close X icon in the dialog window
3479
+ * @csspart dialog-overlay - DEPRECATED. Use `--ds-auro-dialog-overlay-modal-background-color` or `--ds-auro-dialog-overlay-open-background-color` for backdrop styling instead.
3480
+ * @csspart dialog - apply CSS to the entire dialog
3481
+ * @csspart dialog-header - apply CSS to the header of the dialog
3482
+ * @csspart dialog-content - apply CSS to the content of the dialog
3483
+ * @csspart dialog-footer - apply CSS to the footer of the dialog
3484
+ */
3485
+ class ComponentBase extends i$2 {
3486
+ constructor() {
3487
+ super();
3488
+
3489
+ this._initializeDefaults();
3490
+ }
3491
+
3492
+ _initializeDefaults() {
3493
+ this.modal = false;
3494
+ this.unformatted = false;
3495
+ this.closeButtonAppearance = 'default';
3496
+
3497
+ this.isPopoverVisible = false;
3498
+ this.isBibFullscreen = false;
3499
+ this.floater = new AuroFloatingUI(this, 'dialog');
3500
+
3501
+ const versioning = new AuroDependencyVersioning();
3502
+
3503
+ /**
3504
+ * @private
3505
+ */
3506
+ this.buttonTag = versioning.generateTag(
3507
+ "auro-button",
3508
+ buttonVersion,
3509
+ T,
3510
+ );
3511
+
3512
+ /**
3513
+ * @private
3514
+ */
3515
+ this.iconTag = versioning.generateTag("auro-icon", iconVersion, k);
3516
+
3517
+ /**
3518
+ * @private
3519
+ */
3520
+ this.runtimeUtils = new AuroLibraryRuntimeUtils();
3521
+ }
3522
+
3523
+ static get properties() {
3524
+ return {
3525
+
3526
+ /**
3527
+ * Defines whether the close button should be light colored for use on dark backgrounds.
3528
+ * @type {'default'|'inverse'}
3529
+ * @default 'default'
3530
+ */
3531
+ closeButtonAppearance: {
3532
+ type: String,
3533
+ attribute: 'close-button-appearance',
3534
+ reflect: true
3535
+ },
3536
+
3537
+ /**
3538
+ * Sets dialog box to large style. Adding both lg and sm/md will set the dialog to lg for mobile and sm/md for desktop.
3539
+ * Must be used in conjunction with sm or md to have an effect.
3540
+ */
3541
+ lg: {
3542
+ type: Boolean,
3543
+ reflect: true
3544
+ },
3545
+
3546
+ /**
3547
+ * Sets dialog box to medium style. Adding both md and lg will set the dialog to md for desktop and lg for mobile.
3548
+ */
3549
+ md: {
3550
+ type: Boolean,
3551
+ reflect: true
3552
+ },
3553
+
3554
+ /**
3555
+ * Modal dialog restricts the user to take an action (no default close actions).
3556
+ */
3557
+ modal: { type: Boolean },
3558
+
3559
+ /**
3560
+ * DEPRECATED - use `close-button-appearance="inverse" instead.
3561
+ */
3562
+ onDark: {
3563
+ type: Boolean,
3564
+ reflect: true
3565
+ },
3566
+
3567
+ /**
3568
+ * Sets state of dialog to open.
3569
+ */
3570
+ isPopoverVisible: {
3571
+ type: Boolean,
3572
+ reflect: true,
3573
+ attribute: 'open'
3574
+ },
3575
+
3576
+ /**
3577
+ * If true, the dialog bib is in fullscreen mode.
3578
+ * @private
3579
+ */
3580
+ isBibFullscreen: {
3581
+ type: Boolean,
3582
+ reflect: true
3583
+ },
3584
+
3585
+ /**
3586
+ * Sets dialog box to small style. Adding both sm and lg will set the dialog to sm for desktop and lg for mobile.
3587
+ */
3588
+ sm: {
3589
+ type: Boolean,
3590
+ reflect: true
3591
+ },
3592
+
3593
+ /**
3594
+ * The element to focus when the dialog is closed. If not set, defaults to the value of document.activeElement when the dialog is opened.
3595
+ * @type {HTMLElement}
3596
+ */
3597
+ triggerElement: {
3598
+ type: Object,
3599
+ attribute: false
3600
+ },
3601
+
3602
+ /**
3603
+ * Unformatted dialog window, edge-to-edge fill for content.
3604
+ */
3605
+ unformatted: {
3606
+ type: Boolean,
3607
+ reflect: true
3608
+ }
3609
+ };
3610
+ }
3611
+
3612
+ get open() {
3613
+ return this.isPopoverVisible;
3614
+ }
3615
+
3616
+ set open(value) {
3617
+ this.isPopoverVisible = Boolean(value);
3618
+ }
3619
+
3620
+ /**
3621
+ * @ignore
3622
+ */
3623
+ get floaterConfig() {
3624
+ if (!ComponentBase._mobileBreakpointValue) {
3625
+ const docStyle = getComputedStyle(document.documentElement);
3626
+ ComponentBase._mobileBreakpointValue = docStyle.getPropertyValue(MOBILE_BREAKPOINT).trim();
3627
+ }
3628
+ return {
3629
+ prefix: 'auroDialog',
3630
+ fullscreenBreakpoint: ComponentBase._mobileBreakpointValue,
3631
+ };
3632
+ }
3633
+
3634
+ get behavior() {
3635
+ return 'dialog';
3636
+ }
3637
+
3638
+ firstUpdated() {
3639
+ // Add the tag name as an attribute if it is different than the component name
3640
+ this.runtimeUtils.handleComponentTagRename(this, "auro-dialog");
3641
+
3642
+ const slot = this.shadowRoot.querySelector("#footer");
3643
+ const slotWrapper = this.shadowRoot.querySelector("#footerWrapper");
3644
+
3645
+ this.dialog = this.shadowRoot.getElementById("dialog");
3646
+
3647
+ if (!this.unformatted && slot.assignedNodes().length === 0) {
3648
+ slotWrapper.classList.remove("dialog-footer");
3649
+ }
3650
+
3651
+ this.floater.configure(this, this.floaterConfig.prefix);
3652
+
3653
+ // Forward FloatingUI toggle event to backward-compatible 'toggle' event
3654
+ this.addEventListener('auroDialog-toggled', (event) => {
3655
+ if (!event.detail.expanded) {
3656
+ this.dispatchToggleEvent();
3657
+ }
3658
+ });
3659
+
3660
+ // Always intercept the native ESC/cancel event so we can decide
3661
+ // whether to honour it based on `modal`. Re-dispatch via FloatingUI
3662
+ // for non-modal so the hide lifecycle runs correctly.
3663
+ this.dialog.addEventListener('cancel', (e) => {
3664
+ e.preventDefault();
3665
+ if (!this.modal) {
3666
+ this.hide();
3667
+ }
3668
+ });
3669
+
3670
+ // Clicks that land directly on the <dialog> element (not on a child) are
3671
+ // backdrop clicks. With the dialog in the top layer the ::backdrop sits above
3672
+ // the deprecated overlay div, so this listener replaces the overlay div's
3673
+ // click handler for backdrop-area interactions.
3674
+ this.dialog.addEventListener('click', (e) => {
3675
+ if (e.target !== this.dialog) {
3676
+ return;
3677
+ }
3678
+ if (this.modal) {
3679
+ return; // Modal drawers require an explicit action to close.
3680
+ }
3681
+ if (AuroFloatingUI.topOpeningFloatingUI !== this.floater) {
3682
+ return; // there is another floatingUI that is currently visible, so ignore backdrop clicks on this one
3683
+ }
3684
+ this.hide();
3685
+ });
3686
+ }
3687
+
3688
+ /**
3689
+ * LitElement lifecycle method. Called after the DOM has been updated.
3690
+ * @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.
3691
+ * @returns {void}
3692
+ */
3693
+ updated(changedProperties) {
3694
+ this.floater.handleUpdate(changedProperties);
3695
+
3696
+ if (changedProperties.has('isPopoverVisible')) {
3697
+ if (this.isPopoverVisible) {
3698
+ if (!this.floater.showing) {
3699
+ this.show();
3700
+ }
3701
+ } else {
3702
+ if (this.floater.showing) {
3703
+ this.hide();
3704
+ }
3705
+ }
3706
+ }
3707
+
3708
+ if (changedProperties.has('triggerElement')) {
3709
+ this.floater.configure(this, this.floaterConfig.prefix);
3710
+ }
3711
+ }
3712
+
3713
+ disconnectedCallback() {
3714
+ super.disconnectedCallback();
3715
+ if (this._hidePopoverTimerId) {
3716
+ clearTimeout(this._hidePopoverTimerId);
3717
+ this._hidePopoverTimerId = undefined;
3718
+ }
3719
+ if (this._focusFallbackTimerId) {
3720
+ clearTimeout(this._focusFallbackTimerId);
3721
+ this._focusFallbackTimerId = undefined;
3722
+ }
3723
+ if (this.focusTrap) {
3724
+ this.focusTrap.disconnect();
3725
+ this.focusTrap = undefined;
3726
+ }
3727
+ this._focusTrapActivated = false;
3728
+ this.floater.disconnect();
3729
+ }
3730
+
3731
+ /**
3732
+ * @private
3733
+ * @returns {void}
3734
+ */
3735
+ openDialog() {
3736
+ this.defaultTrigger = document.activeElement || this.triggerElement;
3737
+
3738
+ if (this._hidePopoverTimerId) {
3739
+ clearTimeout(this._hidePopoverTimerId);
3740
+ this._hidePopoverTimerId = undefined;
3741
+ }
3742
+
3743
+ if (this.modal) {
3744
+ this.dialog.showModal();
3745
+ } else {
3746
+ this.dialog.showPopover();
3747
+ }
3748
+
3749
+ if (this._focusFallbackTimerId) {
3750
+ clearTimeout(this._focusFallbackTimerId);
3751
+ this._focusFallbackTimerId = undefined;
3752
+ }
3753
+ if (this.focusTrap) {
3754
+ this.focusTrap.disconnect();
3755
+ }
3756
+
3757
+ this.focusTrap = new FocusTrap(this.dialog);
3758
+ this._focusTrapActivated = false;
3759
+
3760
+ // Fallback: if transitionend never fires (dialog mounted already-open,
3761
+ // reduced motion, or interrupted transition), engage the focus trap after
3762
+ // the transition duration elapses. 350ms = CSS open transition (300ms in
3763
+ // style.scss) + 50ms buffer.
3764
+ this._focusFallbackTimerId = setTimeout(() => {
3765
+ this._focusFallbackTimerId = undefined;
3766
+ if (this.isPopoverVisible && this.focusTrap && !this._focusTrapActivated) {
3767
+ this.focusTrap.focusFirstElement();
3768
+ this._focusTrapActivated = true;
3769
+ }
3770
+ }, 350);
3771
+ }
3772
+
3773
+ /**
3774
+ * Cancels the focus-trap fallback timer (if pending) and moves focus into
3775
+ * the dialog once the open CSS transition completes. No-ops when the
3776
+ * fallback timer already activated the trap (_focusTrapActivated === true).
3777
+ * @private
3778
+ */
3779
+ onDialogTransitionEnd() {
3780
+ if (this._focusFallbackTimerId) {
3781
+ clearTimeout(this._focusFallbackTimerId);
3782
+ this._focusFallbackTimerId = undefined;
3783
+ }
3784
+ if (this.isPopoverVisible && this.focusTrap && !this._focusTrapActivated) {
3785
+ this.focusTrap.focusFirstElement();
3786
+ this._focusTrapActivated = true;
3787
+ }
3788
+ }
3789
+
3790
+ /**
3791
+ * @private
3792
+ * @returns {void}
3793
+ */
3794
+ closeDialog() {
3795
+ if (this._focusFallbackTimerId) {
3796
+ clearTimeout(this._focusFallbackTimerId);
3797
+ this._focusFallbackTimerId = undefined;
3798
+ }
3799
+ this._focusTrapActivated = false;
3800
+
3801
+ if (this.focusTrap) {
3802
+ this.focusTrap.disconnect();
3803
+ this.focusTrap = undefined;
3804
+ }
3805
+
3806
+ if (this.modal) {
3807
+ // Dialog spec: close() immediately so the top-layer focus restriction is
3808
+ // lifted before we attempt to restore focus to the trigger.
3809
+ if (this.dialog?.open) {
3810
+ this.dialog.close();
3811
+ }
3812
+ } else {
3813
+ // Popover spec: delay hidePopover() so the dialog stays in the top layer
3814
+ // during the CSS close animation before leaving it.
3815
+ if (!this._hidePopoverTimerId) {
3816
+ this._hidePopoverTimerId = setTimeout(() => {
3817
+ this.dialog?.hidePopover?.();
3818
+ this._hidePopoverTimerId = undefined;
3819
+ }, 300);
3820
+ }
3821
+ }
3822
+
3823
+ if (this.defaultTrigger) {
3824
+ this.defaultTrigger.focus();
3825
+ this.defaultTrigger = undefined;
3826
+ }
3827
+ }
3828
+
3829
+ /**
3830
+ * @private
3831
+ * @returns {void}
3832
+ */
3833
+ dispatchToggleEvent() {
3834
+ const toggleEvent = new Event("toggle", {
3835
+ bubbles: true,
3836
+ cancelable: false
3837
+ });
3838
+
3839
+ this.dispatchEvent(toggleEvent);
3840
+ }
3841
+
3842
+ /**
3843
+ * @private
3844
+ * @returns {void}
3845
+ */
3846
+ handleCloseButtonClick() {
3847
+ this.hide();
3848
+ }
3849
+
3850
+ /**
3851
+ * Focus the dialog.
3852
+ * @private
3853
+ * @returns {void}
3854
+ */
3855
+ focus() {
3856
+ if (this.isPopoverVisible) {
3857
+ this.dialog.focus();
3858
+ }
3859
+ }
3860
+
3861
+ /**
3862
+ * Opens the dialog.
3863
+ * @returns {void}
3864
+ */
3865
+ show() {
3866
+ this.floater.showBib();
3867
+ this.openDialog();
3868
+ }
3869
+
3870
+ /**
3871
+ * Closes the dialog.
3872
+ * @returns {void}
3873
+ */
3874
+ hide() {
3875
+ this.floater.hideBib();
3876
+ this.closeDialog();
3877
+ }
3878
+
3879
+ static get styles() {
3880
+ return [styleCss, styleUnformattedCss, colorCss, tokensCss];
3881
+ }
3882
+
3883
+ /**
3884
+ * @private
3885
+ * @returns {TemplateResult} - The close button template.
3886
+ */
3887
+ getCloseButton() {
3888
+ return this.modal
3889
+ ? u$2``
3890
+ : u$2`
3891
+ <${this.buttonTag}
3892
+ aria-label="${this.runtimeUtils.getSlotText(this, 'ariaLabel.dialog.close') || 'Close'}"
3893
+ variant="ghost"
3894
+ shape="circle"
3895
+ size="sm"
3896
+ appearance=${this.hasAttribute("ondark") ? 'inverse' : this.closeButtonAppearance}
3897
+ class="dialog-header--action"
3898
+ id="dialog-close"
3899
+ @click="${this.handleCloseButtonClick}"
3900
+ part="close-button"
3901
+ >
3902
+ <${this.iconTag} customColor category="interface" name="x-lg"></${this.iconTag}>
3903
+ </${this.buttonTag}>
3904
+ `;
3905
+ }
3906
+
3907
+ render() {
3908
+ const classes = {
3909
+ dialogOverlay: true,
3910
+ "dialogOverlay--modal": this.modal && this.isPopoverVisible,
3911
+ "dialogOverlay--open": this.isPopoverVisible,
3912
+ util_displayHidden: !this.isPopoverVisible,
3913
+ };
3914
+ const wrapperClasses = {
3915
+ dialog: true,
3916
+ wrapper: true,
3917
+ "dialog--open": this.isPopoverVisible,
3918
+ };
3919
+
3920
+ return u$2`
3921
+ <!-- Hidden slot for close button aria-label -->
3922
+ <slot name="ariaLabel.dialog.close" hidden @slotchange=${this.requestUpdate}></slot>
3923
+
3924
+ <!-- @deprecated dialog-overlay: backdrop styling is now provided by ::backdrop on the dialog element.
3925
+ Retained for backward compatibility; part="dialog-overlay" remains available for custom CSS. -->
3926
+ <div class="${e(classes)}" id="dialog-overlay" part="dialog-overlay"></div>
3927
+
3928
+ <div id="bib" class="bib">
3929
+ <dialog
3930
+ id="dialog"
3931
+ popover="${o$1(this.modal ? undefined : 'manual')}"
3932
+ class="container"
3933
+ aria-labelledby="dialog-header"
3934
+ aria-describedby="dialog-content">
3935
+ <div class="${e(wrapperClasses)}"
3936
+ part="dialog"
3937
+ @transitionend="${this.onDialogTransitionEnd}">
3938
+ ${
3939
+ this.unformatted
3940
+ ? u$2`
3941
+ <slot name="content"></slot>
3942
+ ${this.getCloseButton()}
3943
+ `
3944
+ : u$2`
3945
+ <div class="dialog-header" part="dialog-header">
3946
+ <h1 class="heading heading-lg util_stackMarginNone--top" id="dialog-header">
3947
+ <slot name="header">Default header...</slot>
3948
+ </h1>
3949
+ ${this.getCloseButton()}
3950
+ </div>
3951
+ <div id="dialog-content" class="dialog-content body-default" part="dialog-content">
3952
+ <slot name="content"></slot>
3953
+ </div>
3954
+ <div class="dialog-footer" id="footerWrapper" part="dialog-footer">
3955
+ <slot name="footer" id="footer"></slot>
3956
+ </div>
3957
+ `
3958
+ }
3959
+ </div>
3960
+ </dialog>
3961
+ </div>
3962
+ `;
3963
+ }
3964
+ }
3965
+
3966
+ // Copyright (c) 2024 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3967
+ // See LICENSE in the project root for license information.
3968
+
3969
+
3970
+ /**
3971
+ * The `auro-dialog` appears on top of the page and presents information that requires the users immediate attention.
3972
+ * @customElement auro-dialog
3973
+ */
3974
+ class AuroDialog extends ComponentBase {
3975
+
3976
+ static get properties() {
3977
+ return {
3978
+ ...ComponentBase.properties,
3979
+ };
3980
+ }
3981
+
3982
+ static get styles() {
3983
+ return [ComponentBase.styles];
3984
+ }
3985
+
3986
+ /**
3987
+ * This will register this element with the browser.
3988
+ * @param {string} [name="auro-dialog"] - The name of the element that you want to register.
3989
+ *
3990
+ * @example
3991
+ * AuroDialog.register("custom-dialog") // this will register this element to <custom-dialog/>
3992
+ *
3993
+ */
3994
+ static register(name = "auro-dialog") {
3995
+ AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroDialog);
3996
+ }
3997
+ }
3998
+
21
3999
  AuroDialog.register();
22
- AuroDialog.register("custom-dialog");
23
4000
 
24
4001
  function initExamples(initCount) {
25
4002
  // biome-ignore lint/style/noParameterAssign: legacy error handling
@@ -27,7 +4004,7 @@ function initExamples(initCount) {
27
4004
 
28
4005
  try {
29
4006
  initBasicExample();
30
- initCustomExample();
4007
+ initModalExample();
31
4008
  } catch (_err) {
32
4009
  if (initCount <= 20) {
33
4010
  // setTimeout handles issue where content is sometimes loaded after the functions get called