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