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