Connected() { this.host.addEventListener("slotchange", __classPrivateFieldGet(this, _SlotController_onSlotChange, "f")); __classPrivateFieldSet(this, _SlotController_firstUpdated, false, "f"); __classPrivateFieldGet(this, _SlotController_mo, "f").observe(this.host, { childList: true }); __classPrivateFieldGet(this, _SlotController_nodes, "f").clear(); __classPrivateFieldGet(this, _SlotController_slotNames, "f").forEach(__classPrivateFieldGet(this, _SlotController_initSlot, "f")); Object.values(__classPrivateFieldGet(this, _SlotController_deprecations, "f")).forEach(__classPrivateFieldGet(this, _SlotController_initSlot, "f")); this.host.requestUpdate(); await this.host.updateComplete; this.host.requestUpdate(); } hostUpdated() { if (!__classPrivateFieldGet(this, _SlotController_firstUpdated, "f")) { __classPrivateFieldGet(this, _SlotController_slotNames, "f").forEach(__classPrivateFieldGet(this, _SlotController_initSlot, "f")); __classPrivateFieldSet(this, _SlotController_firstUpdated, true, "f"); } } hostDisconnected() { __classPrivateFieldGet(this, _SlotController_mo, "f").disconnect(); } /** * Given a slot name or slot names, returns elements assigned to the requested slots as an array. * If no value is provided, it returns all children not assigned to a slot (without a slot attribute). * @param slotNames slots to query * @example Get header-slotted elements * ```js * this.getSlotted('header') * ``` * @example Get header- and footer-slotted elements * ```js * this.getSlotted('header', 'footer') * ``` * @example Get default-slotted elements * ```js * this.getSlotted(); * ``` */ getSlotted(...slotNames) { if (!slotNames.length) { return __classPrivateFieldGet(this, _SlotController_nodes, "f").get(_a.default)?.elements ?? []; } else { return slotNames.flatMap((slotName) => __classPrivateFieldGet(this, _SlotController_nodes, "f").get(slotName)?.elements ?? []); } } /** * Returns a boolean statement of whether or not any of those slots exists in the light DOM. * @param names The slot names to check. * @example this.hasSlotted('header'); */ hasSlotted(...names) { if (isServer) { return this.host.getAttribute("ssr-hint-has-slotted")?.split(",").map((name) => name.trim()).some((name) => names.includes(name === "default" ? null : name)) ?? false; } else { const slotNames = Array.from(names, (x) => x == null ? _a.default : x); if (!slotNames.length) { slotNames.push(_a.default); } return slotNames.some((x) => __classPrivateFieldGet(this, _SlotController_nodes, "f").get(x)?.hasContent ?? false); } } /** * Whether or not all the requested slots are empty. * @param names The slot names to query. If no value is provided, it returns the default slot. * @example this.isEmpty('header', 'footer'); * @example this.isEmpty(); * @returns */ isEmpty(...names) { return !this.hasSlotted(...names); } }; _a = SlotController, _SlotController_nodes = /* @__PURE__ */ new WeakMap(), _SlotController_logger = /* @__PURE__ */ new WeakMap(), _SlotController_firstUpdated = /* @__PURE__ */ new WeakMap(), _SlotController_mo = /* @__PURE__ */ new WeakMap(), _SlotController_slotNames = /* @__PURE__ */ new WeakMap(), _SlotController_deprecations = /* @__PURE__ */ new WeakMap(), _SlotController_onSlotChange = /* @__PURE__ */ new WeakMap(), _SlotController_onMutation = /* @__PURE__ */ new WeakMap(), _SlotController_initSlot = /* @__PURE__ */ new WeakMap(), _SlotController_instances = /* @__PURE__ */ new WeakSet(), _SlotController_getChildrenForSlot = function _SlotController_getChildrenForSlot2(name) { const children = Array.from(this.host.children); return children.filter(isSlot(name)); }; SlotController.default = Symbol("default slot"); SlotController.anonymous = _a.default; // node_modules/@rhds/elements/elements/rh-card/rh-card.js var _RhCard_instances; var _RhCard_slots; var _RhCard_isPromo; var _RhCard_isStandardPromo; var _RhCard_computedPalette_get; var _RhCard_computedContext_get; var styles = css`:host{display:block;container-name:card;container-type:inline-size;height:max-content}#body.empty,#footer.empty,#header.empty,#image.empty{display:none!important}::slotted(*){line-height:inherit}::slotted(a){color:var(--rh-color-interactive-primary-default)}::slotted(a:hover){color:var(--rh-color-interactive-primary-hover)}::slotted(a:focus-within){color:var(--rh-color-interactive-primary-focus)}::slotted(a:active){color:var(--rh-color-interactive-primary-active)}::slotted(a:visited){color:var(--rh-color-interactive-primary-visited-default)}::slotted(a:visited:hover){color:var(--rh-color-interactive-primary-visited-hover)}::slotted(a:visited:focus-within){color:var(--rh-color-interactive-primary-visited-focus)}::slotted(a:visited:active){color:var(--rh-color-interactive-primary-visited-active)}#container{align-self:stretch;display:flex;flex-direction:column;justify-items:flex-start;overflow:hidden;border-radius:var(--_border-radius,var(--rh-border-width-lg,3px));font-family:var(--rh-font-family-body-text,RedHatText,"Red Hat Text",Helvetica,Arial,sans-serif)!important;line-height:var(--rh-line-height-body-text,1.5);border-style:solid;border-width:var(--rh-border-width-sm,1px);border-color:var(--rh-color-border-subtle);width:100%;height:100%;background-color:var(--rh-color-surface);color:var(--rh-color-text-primary)}.on.light{--rh-color-surface:var(--rh-color-surface-lightest,#fff)}.on.dark{--rh-color-surface:var(--rh-color-surface-darkest,#151515)}#container.on.palette-light{--rh-color-surface:var(--rh-color-surface-light,#e0e0e0)}#container.on.palette-lighter{--rh-color-surface:var(--rh-color-surface-lighter,#f2f2f2)}#container.on.palette-lightest{--rh-color-surface:var(--rh-color-surface-lightest,#fff)}#container.on.palette-dark{--rh-color-surface:var(--rh-color-surface-dark,#383838)}#container.on.palette-darker{--rh-color-surface:var(--rh-color-surface-darker,#1f1f1f)}#container.on.palette-darkest{--rh-color-surface:var(--rh-color-surface-darkest,#151515)}#body,#footer,#header{margin-inline:var(--rh-space-xl,24px)}#body ::slotted(:is(h1,h2,h3,h4,h5,h6)),#header ::slotted(:is(h1,h2,h3,h4,h5,h6)){font-family:var(--rh-font-family-heading,RedHatDisplay,"Red Hat Display",Helvetica,Arial,sans-serif)}#image ::slotted(*){display:block;max-width:100%}#header{display:flex;flex-direction:column;gap:var(--rh-space-lg,16px);box-sizing:border-box;font-family:var(--rh-card-heading-font-family,var(--rh-font-family-heading,RedHatDisplay,"Red Hat Display",Helvetica,Arial,sans-serif))!important;font-size:var(--rh-card-heading-font-size,var(--rh-font-size-heading-sm,1.5rem));font-weight:var(--rh-card-heading-font-weight,var(--rh-font-weight-body-text-medium,500))!important;margin-block-start:var(--rh-space-lg,16px);background-color:var(--_header-bg,#0000)}:is(#container,#container.light,#container.lighter,#container.lightest){--_header-bg:var(--rh-card-header-background-on-light,#0000)}:is(#container.dark,#container.darker,#container.darkest){--_header-bg:var(--rh-card-header-background-on-dark,#0000)}#body{margin-block:var(--rh-space-2xl,32px) var(--rh-space-xl,24px)}#body:has(+.empty){margin-block-end:var(--rh-space-2xl,32px)}#footer{display:flex;gap:.5em;margin-block:auto var(--rh-space-xl,24px)}#container #body ::slotted(:is(h1,h2,h3,h4,h5,h6)),#container #header ::slotted(:is(h1,h2,h3,h4,h5,h6)){font-family:inherit!important;font-weight:inherit!important;line-height:var(--rh-line-height-heading,1.3)!important}#header ::slotted(:is(h1,h2,h3,h4,h5,h6)){font-size:inherit!important;margin:unset!important}#body ::slotted(:is(h1,h2,h3,h4,h5,h6)){font-size:var(--rh-card-heading-font-size,var(--rh-font-size-heading-sm,1.5rem))!important}#body ::slotted(:not([slot]):first-child){margin-block-start:0}#body ::slotted(:not([slot]):last-child){margin-block-end:0}@container card (min-width: 768px){#body,#footer,#header{margin-inline:var(--rh-space-2xl,32px)}#body,#header{margin-block-start:var(--rh-space-2xl,32px)}#footer{margin-block-end:var(--rh-space-2xl,32px)}}:host([variant=promo]){display:block;container-name:card promo}#container.promo{--_promo-heading-font-weight:var(--rh-card-heading-font-weight,var(--rh-font-weight-body-text-medium,500));--_promo-heading-size:var(--rh-card-heading-font-size,var(--rh-font-size-heading-xs,1.25rem));--_promo-paragraph-font-size:var(--rh-font-size-body-text-lg,1.125rem);--_promo-paragraph-margin-block-end:var(--rh-space-lg,16px);--_promo-standard-inline-padding:var(--rh-space-2xl,32px);height:auto}#container.promo:not(.standard,.has-image){grid-template-columns:auto}.promo #body{margin:var(--rh-space-2xl,32px)}.promo.has-image #body{order:-5}.promo.has-header #header{margin:0;margin-block-end:var(--rh-space-lg,16px)}.promo.has-footer #footer{margin-block:var(--rh-space-xl,24px) 0;margin-inline:0}.promo #header ::slotted(*){font-family:var(--rh-card-heading-font-family,var(--rh-font-family-heading,RedHatDisplay,"Red Hat Display",Helvetica,Arial,sans-serif))!important;font-size:var(--_promo-heading-size)!important;font-weight:var(--_promo-heading-font-weight)!important;margin-block:0 var(--_promo-heading-margin-block-end)!important}.promo:is(.has-image,.has-header) #body ::slotted(p){font-size:var(--_promo-paragraph-font-size)!important;margin-block-end:var(--_promo-paragraph-margin-block-end)!important}#container.promo.standard{display:flex;padding:var(--_promo-standard-inline-padding);width:auto}#container.promo.standard.dark{background-color:var(--rh-color-surface-darker,#1f1f1f)}.promo.standard #body{display:contents}.promo.standard #body ::slotted(:not([slot])){font-family:var(--rh-card-heading-font-family,var(--rh-font-family-heading,RedHatDisplay,"Red Hat Display",Helvetica,Arial,sans-serif))!important;font-size:var(--rh-font-size-body-text-xl,1.25rem)!important;font-weight:var(--rh-font-weight-body-text-medium,500);line-height:var(--rh-line-height-heading,1.3)!important}:host([variant=promo][full-width]) #container{border-color:#0000;padding-block:var(--rh-space-4xl,64px);padding-inline:var(--rh-space-lg,16px);width:auto}:host([variant=promo][full-width]) #body{margin:0}:host([variant=promo][full-width]) #body ::slotted(p){--_promo-paragraph-font-size:var(--rh-font-size-body-text-md,1rem)}:host([variant=promo][full-width]) #header ::slotted(*){--_promo-heading-size:var(--rh-card-heading-font-size,var(--rh-font-size-body-text-2xl,1.5rem))}:host([variant=promo][full-width]) .has-image #footer{margin-block-end:var(--rh-space-2xl,32px)}@container promo (min-width: 768px){#container.promo{align-items:center;display:grid;grid-template-columns:2fr 1fr;min-height:250px}.promo #image{justify-self:end}.promo #body{margin:var(--rh-space-3xl,48px);max-width:70ch}.promo #header ::slotted(*){--_promo-heading-size:var(--rh-card-heading-font-size,var(--rh-font-size-heading-sm,1.5rem))}#container.promo.standard{--_promo-standard-inline-padding:var(--rh-space-3xl,48px);column-gap:var(--rh-space-xl,24px);flex-direction:row;justify-content:space-between;min-height:auto}.promo.standard #footer{flex:0 0 auto;margin-block:0}:host([variant=promo][full-width]) #container{column-gap:var(--rh-space-2xl,32px);min-height:auto;padding-inline:var(--rh-space-4xl,64px)}:host([variant=promo][full-width]) #body ::slotted(p){--_promo-paragraph-font-size:var(--rh-font-size-body-text-lg,1.125rem)}:host([variant=promo][full-width]) #header ::slotted(*){--_promo-heading-size:var(--rh-card-heading-font-size,var(--rh-font-size-heading-md,1.75rem))}:host([variant=promo][full-width]) .has-image #footer{margin-block-end:0}}@container promo (min-width: 1200px){:host([variant=promo][full-width]) #container{padding-inline:var(--rh-space-7xl,128px)}}`; var RhCard = class RhCard2 extends LitElement { constructor() { super(...arguments); _RhCard_instances.add(this); this.fullWidth = false; _RhCard_slots.set(this, new SlotController(this, "header", "image", null, "footer")); _RhCard_isPromo.set(this, this.variant === "promo"); _RhCard_isStandardPromo.set(this, false); } willUpdate() { __classPrivateFieldSet(this, _RhCard_isPromo, this.variant === "promo", "f"); __classPrivateFieldSet(this, _RhCard_isStandardPromo, __classPrivateFieldGet(this, _RhCard_isPromo, "f") && __classPrivateFieldGet(this, _RhCard_slots, "f").hasSlotted(null) && __classPrivateFieldGet(this, _RhCard_slots, "f").isEmpty("image") && __classPrivateFieldGet(this, _RhCard_slots, "f").isEmpty("header"), "f"); } render() { const promo = this.variant === "promo"; const standard = __classPrivateFieldGet(this, _RhCard_isStandardPromo, "f"); const computedPalette = __classPrivateFieldGet(this, _RhCard_instances, "a", _RhCard_computedPalette_get); const computedContext = __classPrivateFieldGet(this, _RhCard_instances, "a", _RhCard_computedContext_get); const on = computedContext ?? this.on ?? "light"; const { variant = "" } = this; const hasHeader = __classPrivateFieldGet(this, _RhCard_slots, "f").hasSlotted("header"); const hasFooter = __classPrivateFieldGet(this, _RhCard_slots, "f").hasSlotted("footer"); const hasImage = __classPrivateFieldGet(this, _RhCard_slots, "f").hasSlotted("image"); const hasBody = __classPrivateFieldGet(this, _RhCard_slots, "f").hasSlotted(null); const header = html`