@aurodesignsystem-dev/auro-drawer 0.0.0-pr131.7 → 0.0.0-pr131.9

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