{"version":3,"sources":["jsdelivr-header.js","/npm/@aurodesignsystem/auro-dialog@3.1.8/src/styles/style-css.js","/npm/@aurodesignsystem/auro-dialog@3.1.8/src/styles/style-unformatted-css.js","/npm/@aurodesignsystem/auro-dialog@3.1.8/src/styles/color-css.js","/npm/@aurodesignsystem/auro-dialog@3.1.8/src/styles/tokens-css.js","/npm/@aurodesignsystem/auro-dialog@3.1.8/src/componentBase.js","/npm/@aurodesignsystem/auro-dialog@3.1.8/src/buttonVersion.js","/npm/@aurodesignsystem/auro-dialog@3.1.8/src/iconVersion.js","/npm/@aurodesignsystem/auro-dialog@3.1.8/src/auro-dialog.js","/npm/@aurodesignsystem/auro-dialog@3.1.8/index.js"],"names":[],"mappings":"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","file":"/npm/@aurodesignsystem/auro-dialog@3.1.8/index.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/@aurodesignsystem/auro-dialog@3.1.8/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { css } from 'lit';\nexport default css`.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, 0.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, 0.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, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.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, 0.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, 0.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, 0.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, 0.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, 0.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, 0.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(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{--insetPaddingXl: 0 var(--ds-size-400, 2rem) var(--ds-size-400, 2rem) var(--ds-size-400, 2rem);--insetPaddingXxl: 0 var(--ds-size-600, 3rem) var(--ds-size-600, 3rem) var(--ds-size-600, 3rem);--insetPaddingXxxl: 0 var(--ds-size-800, 4rem) var(--ds-size-800, 4rem) var(--ds-size-800, 4rem)}[auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}.dialogOverlay{position:fixed;z-index:-1;bottom:0;left:0;width:100%;height:100%;pointer-events:none}.dialogOverlay--open{z-index:var(--ds-depth-overlay);pointer-events:unset;transition:background .3s cubic-bezier(0.4, 0, 0.2, 0)}.dialogOverlay--modal{z-index:var(--ds-depth-overlay);transition:background .3s cubic-bezier(0.4, 0, 0.5, 0)}.dialog{position:fixed;z-index:-1;right:0;bottom:-100%;left:0;box-sizing:border-box;display:flex;flex-direction:column;visibility:hidden;overflow:visible;width:calc(100% - var(--insetPaddingXl) - var(--insetPaddingXl));max-height:90%;padding:var(--insetPaddingXl);opacity:0;border:0;transition:all .3s ease-in-out}.dialog--open{z-index:var(--ds-depth-modal, 300);visibility:visible;bottom:0;opacity:1}@media screen and (min-width: 768px){.dialog{top:10%;bottom:unset;left:0;right:0;max-width:80%;max-height:80%;margin:auto;padding:var(--insetPaddingXxxl);opacity:0;width:0;height:0;overflow:hidden}.dialog--open{opacity:1;width:calc(100% - var(--insetPaddingXxxl) - var(--insetPaddingXxxl));height:auto;overflow:visible}}@media screen and (min-width: 1024px){.dialog{max-width:986px}}.dialog-footer{padding-top:var(--ds-size-400, 2rem)}@media screen and (min-width: 768px){.dialog-footer ::slotted(*){display:flex;justify-content:flex-end}}.dialog-header{display:flex;align-items:flex-start;justify-content:space-between;padding-top:var(--ds-size-800, 4rem);margin-bottom:var(--ds-size-300, 1.5rem)}.dialog-header--action{margin:0;padding:0}.dialog-header--action:hover{cursor:pointer}.dialog-header .heading{flex:1;margin-block:0}.dialog-content{flex:1;overflow:auto;overscroll-behavior:contain;margin:calc(-1*var(--ds-size-100));padding:var(--ds-size-100)}::slotted([slot=content]){position:relative}:host([unformatted]) .dialog-header--action{position:absolute;top:var(--ds-size-400, 2rem);bottom:unset;right:var(--ds-size-400, 2rem)}@media screen and (min-width: 768px){:host([unformatted]) .dialog-header--action{top:var(--ds-size-800, 4rem);bottom:unset;right:var(--ds-size-800, 4rem)}}:host([sm]) .dialog{max-height:30%}@media screen and (min-width: 768px){:host([sm]) .dialog{top:10%;bottom:unset;max-width:40%;max-height:80%;padding:var(--insetPaddingXxl)}}@media screen and (min-width: 1024px){:host([sm]) .dialog{max-width:740px}}:host([md]) .dialog{max-height:50%}@media screen and (min-width: 768px){:host([md]) .dialog{top:10%;bottom:unset;max-width:70%;max-height:80%}}@media screen and (min-width: 1024px){:host([md]) .dialog{top:10%;bottom:unset;max-width:986px}}@media screen and (min-width: 768px){:host([sm][lg]) .dialog,:host([md][lg]) .dialog{max-height:80%}}:host([sm][lg]) .dialog,:host([md][lg]) .dialog{max-height:90%}:host([unformatted]) .dialog{padding:0}`;\n","import { css } from 'lit';\nexport default css`[unformatted] .unformattedWrapper{padding:var(--ds-size-400, 2rem)}@media screen and (min-width: 768px){[unformatted] .unformattedWrapper{padding:var(--ds-size-800, 4rem);padding-top:var(--ds-size-400, 2rem)}}`;\n","import { css } from 'lit';\nexport default css`.dialogOverlay--open{background:var(--ds-auro-dialog-overlay-open-background-color)}.dialogOverlay--modal{background:var(--ds-auro-dialog-overlay-modal-background-color)}.dialog{background:var(--ds-auro-dialog-container-color);color:var(--ds-auro-dialog-text-color)}@media screen and (min-width: 768px){.dialog{box-shadow:var(--ds-auro-dialog-boxshadow-color)}}.dialog-header--action{border:2px solid transparent;border-radius:var(--ds-border-radius, 0.375rem);background-color:transparent}`;\n","import { css } from 'lit';\nexport default css`:host{--ds-auro-dialog-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dialog-boxshadow-color: var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));--ds-auro-dialog-overlay-modal-background-color: var(--ds-advanced-color-shared-scrim, rgba(0, 0, 0, 0.5));--ds-auro-dialog-overlay-open-background-color: var(--ds-advanced-color-shared-scrim, rgba(0, 0, 0, 0.5));--ds-auro-dialog-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;\n","// Copyright (c) 2024 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license\n// See LICENSE in the project root for license information.\n\n// ---------------------------------------------------------------------\n\n/* eslint-disable jsdoc/no-undefined-types, lit-a11y/click-events-have-key-events, jsdoc/require-description-complete-sentence, lit/binding-positions, lit/no-invalid-html, prefer-destructuring, max-lines */\n\nimport { LitElement } from \"lit\";\nimport { html } from 'lit/static-html.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport styleCss from \"./styles/style-css.js\";\nimport styleUnformattedCss from './styles/style-unformatted-css.js';\nimport colorCss from \"./styles/color-css.js\";\nimport tokensCss from \"./styles/tokens-css.js\";\n\nimport AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';\nimport { AuroDependencyVersioning } from '@aurodesignsystem/auro-library/scripts/runtime/dependencyTagVersioning.mjs';\n\nimport { FocusTrap } from \"@aurodesignsystem/auro-library/scripts/runtime/FocusTrap/index.mjs\";\n\nimport { AuroButton } from '@aurodesignsystem/auro-button/src/auro-button.js';\nimport buttonVersion from './buttonVersion.js';\n\nimport { AuroIcon } from '@aurodesignsystem/auro-icon/src/auro-icon.js';\nimport iconVersion from './iconVersion.js';\n\nconst ESCAPE_KEYCODE = 27;\n\n\n// See https://git.io/JJ6SJ for \"How to document your components using JSDoc\"\n/**\n * auro-dialog appear above the page and require the user's attention.\n *\n * @attr {Boolean} modal - Modal dialog restricts the user to take an action (no default close actions)\n * @attr {Boolean} unformatted - Unformatted dialog window, edge-to-edge fill for content\n * @attr {Boolean} sm - Sets dialog box to small style. Adding both sm and lg will set the dialog to sm for desktop and lg for mobile.\n * @attr {Boolean} md - Sets dialog box to medium style. Adding both md and lg will set the dialog to md for desktop and lg for mobile.\n * @attr {Boolean} onDark - Sets close icon to white for dark backgrounds\n * @attr {Boolean} open - Sets state of dialog to open\n * @prop {HTMLElement} triggerElement - The element to focus when the dialog is closed. If not set, defaults to the value of document.activeElement when the dialog is opened.\n * @slot header - Text to display as the header of the modal\n * @slot content - Injects content into the body of the modal\n * @slot footer - Used for action options, e.g. buttons\n * @function toggleViewable - toggles the 'open' property on the element\n * @event toggle - Event fires when the element is closed\n * @csspart close-button - adjust position of the close X icon in the dialog window\n * @csspart dialog-overlay - apply CSS on the overlay of the dialog\n * @csspart dialog - apply CSS to the entire dialog\n * @csspart dialog-header - apply CSS to the header of the dialog\n * @csspart dialog-content - apply CSS to the content of the dialog\n * @csspart dialog-footer - apply CSS to the footer of the dialog\n */\n\nexport default class ComponentBase extends LitElement {\n  constructor() {\n    super();\n\n    this.modal = false;\n    this.unformatted = false;\n\n    const versioning = new AuroDependencyVersioning();\n\n    /**\n     * @private\n     */\n    this.buttonTag = versioning.generateTag('auro-button', buttonVersion, AuroButton);\n\n    /**\n     * @private\n     */\n    this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);\n\n\n    /**\n     * @private\n     */\n    this.runtimeUtils = new AuroLibraryRuntimeUtils();\n  }\n\n  static get properties() {\n    return {\n      modal: { type: Boolean },\n      unformatted: {\n        type: Boolean,\n        reflect: true\n      },\n      open: {\n        type: Boolean,\n        reflect: true\n      },\n      triggerElement: {\n        attribute: false\n      }\n    };\n  }\n\n  firstUpdated() {\n    // Add the tag name as an attribute if it is different than the component name\n    this.runtimeUtils.handleComponentTagRename(this, 'auro-dialog');\n\n    const slot = this.shadowRoot.querySelector(\"#footer\"),\n      slotWrapper = this.shadowRoot.querySelector(\"#footerWrapper\");\n\n    this.dialog = this.shadowRoot.getElementById('dialog');\n\n    if (!this.unformatted && slot.assignedNodes().length === 0) {\n      slotWrapper.classList.remove(\"dialog-footer\");\n    }\n  }\n\n  /**\n   * LitElement lifecycle method. Called after the DOM has been updated.\n   * @param {Map<string, any>} changedProperties - Keys are the names of changed properties, values are the corresponding previous values.\n   * @returns {void}\n   */\n  updated(changedProperties) {\n    if (changedProperties.has('open')) {\n      if (this.open) {\n        this.openDialog();\n      } else {\n        this.closeDialog();\n      }\n    }\n  }\n\n  connectedCallback() {\n    super.connectedCallback();\n    this.keydownEventHandler = this.handleKeydown.bind(this);\n    window.addEventListener('keydown', this.keydownEventHandler);\n  }\n\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    window.removeEventListener('keydown', this.keydownEventHandler);\n  }\n\n  /**\n   * @private\n   * @returns {void}\n   */\n  openDialog() {\n    this.defaultTrigger = document.activeElement;\n\n    this.focusTrap = new FocusTrap(this.dialog);\n  }\n\n  /**\n   * set the focus on the first element after opening transition effect is complete.\n   * @private\n   */\n  onDialogTransitionEnd() {\n    if (this.open && this.focusTrap) {\n      this.focusTrap.focusFirstElement();\n    }\n  }\n\n  /**\n   * @private\n   * @returns {void}\n   */\n  closeDialog() {\n    if (this.focusTrap) {\n      // If the dropdown is not open, disconnect the focus trap if it exists\n      this.focusTrap.disconnect();\n      this.focusTrap = undefined;\n    }\n\n    if (this.defaultTrigger) {\n      this.defaultTrigger.focus();\n      this.defaultTrigger = undefined;\n    }\n\n    this.dispatchToggleEvent();\n  }\n\n  /**\n   * @private\n   * @returns {void}\n   */\n  dispatchToggleEvent() {\n    // replace with Event constructor once IE support dropped\n    const toggleEvent = document.createEvent(\"HTMLEvents\");\n\n    toggleEvent.initEvent(\"toggle\", true, false);\n    this.dispatchEvent(toggleEvent);\n  }\n\n  /**\n   * @private\n   * @returns {void}\n   */\n  handleOverlayClick() {\n    if (this.open && !this.modal) {\n      const dropdownComponents = [...this.querySelectorAll('auro-combobox, [auro-combobox], auro-select, [auro-select], auro-datepicker, [auro-datepicker]')];\n      const dropdowns = [\n        ...this.querySelectorAll('auro-dropdown, [auro-dropdown]'),\n        ...dropdownComponents.map((comp) => comp.dropdown),\n      ];\n\n      const isAnyDropdownOpen = dropdowns.some((dropdown) => dropdown.isPopoverVisible);\n      if (!isAnyDropdownOpen) {\n        this.handleCloseButtonClick();\n      }\n    }\n  }\n\n  /**\n   * @private\n   * @returns {void}\n   */\n  handleCloseButtonClick() {\n    this.open = false;\n  }\n\n  /**\n   * @private\n   * @param {KeyboardEvent} event - The keyboard event containing the key and keyCode.\n   * @returns {void}\n   */\n  handleKeydown({ key, keyCode }) {\n    if (this.open && !this.modal && (key === 'Escape' || keyCode === ESCAPE_KEYCODE)) {\n      this.open = false;\n    }\n  }\n\n  /**\n   * Focus the dialog.\n   * @private\n   * @returns {void}\n   */\n  focus() {\n    if (this.open) {\n      this.dialog.focus();\n    }\n  }\n\n  static get styles() {\n    return [\n      styleCss,\n      styleUnformattedCss,\n      colorCss,\n      tokensCss\n    ];\n  }\n\n  /**\n   * @private\n   * @returns {TemplateResult} - The close button template.\n   */\n  getCloseButton() {\n    return this.modal\n      ? html``\n      : html`\n        <${this.buttonTag} variant=\"ghost\" shape=\"circle\" size=\"sm\" aria-label=\"Close\" ?onDark=${this.hasAttribute('onDark')} class=\"dialog-header--action\" id=\"dialog-close\" @click=\"${this.handleCloseButtonClick}\" part=\"close-button\">\n          <${this.iconTag} customColor category=\"interface\" name=\"x-lg\"></${this.iconTag}>\n        </${this.buttonTag}>\n      `;\n  }\n\n  render() {\n    const classes = {\n        'dialogOverlay': true,\n        'dialogOverlay--modal': this.modal && this.open,\n        'dialogOverlay--open': this.open,\n        'util_displayHidden': !this.open\n      },\n\n      contentClasses = {\n        'dialog': true,\n        'dialog--open': this.open\n      };\n\n    return html`\n      <div class=\"${classMap(classes)}\" id=\"dialog-overlay\" part=\"dialog-overlay\" @click=${this.handleOverlayClick}></div>\n\n      <div \n        role=\"dialog\" \n        id=\"dialog\" \n        class=\"${classMap(contentClasses)}\"\n        part=\"dialog\"\n        aria-labelledby=\"dialog-header\"\n        aria-describedby=\"dialog-content\"\n        @transitionend=\"${this.onDialogTransitionEnd}\">\n        ${this.unformatted\n        ? html`\n          <slot name=\"content\"></slot>\n          ${this.getCloseButton()}\n        `\n        : html`\n          <div class=\"dialog-header\" part=\"dialog-header\">\n            <h1 class=\"heading heading-lg util_stackMarginNone--top\" id=\"dialog-header\">\n              <slot name=\"header\">Default header...</slot>\n            </h1>\n            ${this.getCloseButton()}\n          </div>\n          <div class=\"dialog-content body-default\" part=\"dialog-content\">\n            <slot name=\"content\"></slot>\n          </div>\n          <div class=\"dialog-footer\" id=\"footerWrapper\" part=\"dialog-footer\">\n            <slot name=\"footer\" id=\"footer\"></slot>\n          </div>\n        `\n      }\n      </div>\n    `;\n  }\n}\n","export default '11.4.0'","export default '8.1.4'","// Copyright (c) 2024 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license\n// See LICENSE in the project root for license information.\n\n// ---------------------------------------------------------------------\n\nimport AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';\nimport ComponentBase from './componentBase.js';\n\n/**\n * The auro-dialog appears above the page and requires the user's attention.\n */\n\n// build the component class\nexport class AuroDialog extends ComponentBase {\n  // constructor() {\n  //   super();\n  // }\n\n  // function to define props used within the scope of this component\n  static get properties() {\n    return {\n      ...super.properties,\n      // use custom accessors on base class\n      open: {\n        ...super.properties.open,\n        noAccessor: true\n      }\n    };\n  }\n\n  static get styles() {\n    return [super.styles];\n  }\n\n  /**\n   * This will register this element with the browser.\n   * @param {string} [name=\"auro-dialog\"] - The name of element that you want to register to.\n   *\n   * @example\n   * AuroDialog.register(\"custom-dialog\") // this will register this element to <custom-dialog/>\n   *\n   */\n  static register(name = \"auro-dialog\") {\n    AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroDialog);\n  }\n}\n","import { AuroDialog } from './src/auro-dialog.js';\n\nAuroDialog.register();\n"]}