diff --git a/libs/deps/mas/mas.js b/libs/deps/mas/mas.js index 14fc314d23..0b09631c72 100644 --- a/libs/deps/mas/mas.js +++ b/libs/deps/mas/mas.js @@ -1922,7 +1922,7 @@ body.merch-modal { scrollbar-gutter: stable; height: 100vh; } -`;document.head.appendChild(Za);var Ll="#000000",wl="#F8D904",Pl=/(accent|primary|secondary)(-(outline|link))?/;function Cl(e){return e.fields.reduce((t,{name:r,multiple:n,values:i})=>(t[r]=n?i:i[0],t),{id:e.id})}function Il(e,t){let r=e.mnemonicIcon?.map((n,i)=>({icon:n,alt:e.mnemonicAlt[i]??"",link:e.mnemonicLink[i]??""}));return r?.forEach(({icon:n,alt:i,link:o})=>{if(!/^https?:/.test(o))try{o=new URL(`https://${o}`).href.toString()}catch{o="#"}let a=le("merch-icon",{slot:"icons",src:n,alt:i,href:o,size:"l"});t.append(a)}),r}function Nl(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||Ll),t.setAttribute("badge-background-color",e.badgeBackgroundColor||wl))}function kl(e,t,r){e.size?r?.includes(e.size)&&t.setAttribute("size",e.size):t.removeAttribute("size")}function Ol(e,t,r){e.cardTitle&&r&&t.append(le(r.tag,{slot:r.slot},e.cardTitle))}function Rl(e,t,r){e.subtitle&&r&&t.append(le(r.tag,{slot:r.slot},e.subtitle))}function Vl(e,t,r,n){if(e.backgroundImage)switch(n){case"ccd-slice":r&&t.append(le(r.tag,{slot:r.slot},``));break;case"ccd-suggested":t.setAttribute("background-image",e.backgroundImage);break}}function $l(e,t,r){if(e.prices&&r){let n=le(r.tag,{slot:r.slot},e.prices);t.append(n)}}function Ml(e,t,r){if(e.description&&r){let n=le(r.tag,{slot:r.slot},e.description);t.append(n)}}function Ul(e,t,r){let n=Pl.exec(e.className)?.[0]??"accent",i=n.includes("accent"),o=n.includes("primary"),a=n.includes("secondary"),s=n.includes("-outline");if(n.includes("-link"))return e;let l="fill",h;i||t?h="accent":o?h="primary":a&&(h="secondary"),s&&(l="outline");let d=le("sp-button",{treatment:l,variant:h,tabIndex:-1,size:r.ctas.size??"m"},e);return d.addEventListener("click",u=>{u.target!==e&&(u.stopPropagation(),e.click())}),d}function Dl(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function Gl(e,t,r){if(e.ctas){let{slot:n}=r.ctas,i=le("div",{slot:n},e.ctas),o=[...i.querySelectorAll("a")].map(a=>{let s=a.parentElement.tagName==="STRONG";return t.consonant?Dl(a,s):Ul(a,s,r)});i.innerHTML="",i.append(...o),t.append(i)}}async function Ja(e,t){let r=Cl(e),{variant:n}=r;if(!n)return;t.querySelectorAll("[slot]").forEach(a=>{a.remove()}),t.variant=n,await t.updateComplete;let{aemFragmentMapping:i}=t.variantLayout;if(!i)return;let o=Il(r,t);e.computed={mnemonics:o},Nl(r,t),kl(r,t,i.allowedSizes),Ol(r,t,i.title),Rl(r,t,i.subtitle),Vl(r,t,i.backgroundImage,n),$l(r,t,i.prices),Ml(r,t,i.description),Gl(r,t,i)}var Hl="merch-card",zl=2e3,Li,Ft,_i,zt=class extends ne{constructor(){super();B(this,Ft);p(this,"customerSegment");p(this,"marketSegment");p(this,"variantLayout");B(this,Li,!1);this.filters={},this.types="",this.selected=!1,this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}firstUpdated(){this.variantLayout=Ti(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=Ti(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&(this.style.border=this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(this)}get theme(){return this.closest("sp-theme")}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let i of n){await i.onceSettled();let o=i.value?.[0]?.planType;if(!o)return;let a=this.stockOfferOsis[o];if(!a)return;let s=i.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),i.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let i of n)i.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(i=>{if(r){n[i].order=Math.min(n[i].order||2,2);return}let o=n[i].order;o===1||isNaN(o)||(n[i].order=Number(o)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex",this.getAttribute("tabindex")??"0"),this.addEventListener(yi,this.handleQuantitySelection),this.addEventListener(Oa,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(it,this.handleAemFragmentEvents),this.addEventListener(nt,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout.disconnectedCallbackHook(),this.removeEventListener(yi,this.handleQuantitySelection),this.storageOptions?.removeEventListener(Si,this.handleStorageChange),this.removeEventListener(it,this.handleAemFragmentEvents),this.removeEventListener(nt,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===it&&Ge(this,Ft,_i).call(this,"AEM fragment cannot be loaded"),r.type===nt&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await Ja(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(o=>setTimeout(()=>o(!1),zl));if(await Promise.race([r,n])===!0){this.dispatchEvent(new CustomEvent($a,{bubbles:!0,composed:!0}));return}Ge(this,Ft,_i).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||this.dispatchEvent(new CustomEvent(Ra,{bubbles:!0}))}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(Si,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let i=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(i)}):n.replaceWith(i)}}};Li=new WeakMap,Ft=new WeakSet,_i=function(r){this.dispatchEvent(new CustomEvent(Ma,{detail:r,bubbles:!0,composed:!0}))},p(zt,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,i,o]=r.split(",");return{PUF:n,ABM:i,M2M:o}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[i,o,a]=n.split(":"),s=Number(o);return[i,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:i,size:o}])=>[n,i,o].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object}}),p(zt,"styles",[Ia,qa(),...Na()]);customElements.define(Hl,zt);var pt=class extends ne{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?g` +`;document.head.appendChild(Za);var Ll="#000000",wl="#F8D904",Pl=/(accent|primary|secondary)(-(outline|link))?/;function Cl(e){return e.fields.reduce((t,{name:r,multiple:n,values:i})=>(t[r]=n?i:i[0],t),{id:e.id})}function Il(e,t){let r=e.mnemonicIcon?.map((n,i)=>({icon:n,alt:e.mnemonicAlt[i]??"",link:e.mnemonicLink[i]??""}));return r?.forEach(({icon:n,alt:i,link:o})=>{if(!/^https?:/.test(o))try{o=new URL(`https://${o}`).href.toString()}catch{o="#"}let a=le("merch-icon",{slot:"icons",src:n,alt:i,href:o,size:"l"});t.append(a)}),r}function Nl(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||Ll),t.setAttribute("badge-background-color",e.badgeBackgroundColor||wl))}function kl(e,t,r){e.size?r?.includes(e.size)&&t.setAttribute("size",e.size):t.removeAttribute("size")}function Ol(e,t,r){e.cardTitle&&r&&t.append(le(r.tag,{slot:r.slot},e.cardTitle))}function Rl(e,t,r){e.subtitle&&r&&t.append(le(r.tag,{slot:r.slot},e.subtitle))}function Vl(e,t,r,n){if(e.backgroundImage)switch(n){case"ccd-slice":r&&t.append(le(r.tag,{slot:r.slot},``));break;case"ccd-suggested":t.setAttribute("background-image",e.backgroundImage);break}}function $l(e,t,r){if(e.prices&&r){let n=le(r.tag,{slot:r.slot},e.prices);t.append(n)}}function Ml(e,t,r){if(e.description&&r){let n=le(r.tag,{slot:r.slot},e.description);t.append(n)}}function Ul(e,t,r,n){n==="ccd-suggested"&&!e.className&&(e.className="primary-link");let i=Pl.exec(e.className)?.[0]??"accent",o=i.includes("accent"),a=i.includes("primary"),s=i.includes("secondary"),c=i.includes("-outline");if(i.includes("-link"))return e;let h="fill",d;o||t?d="accent":a?d="primary":s&&(d="secondary"),c&&(h="outline");let u=le("sp-button",{treatment:h,variant:d,tabIndex:-1,size:r.ctas.size??"m"},e);return u.addEventListener("click",m=>{m.target!==e&&(m.stopPropagation(),e.click())}),u}function Dl(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function Gl(e,t,r,n){if(e.ctas){let{slot:i}=r.ctas,o=le("div",{slot:i},e.ctas),a=[...o.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";return t.consonant?Dl(s,c):Ul(s,c,r,n)});o.innerHTML="",o.append(...a),t.append(o)}}async function Ja(e,t){let r=Cl(e),{variant:n}=r;if(!n)return;t.querySelectorAll("[slot]").forEach(a=>{a.remove()}),t.variant=n,await t.updateComplete;let{aemFragmentMapping:i}=t.variantLayout;if(!i)return;let o=Il(r,t);e.computed={mnemonics:o},Nl(r,t),kl(r,t,i.allowedSizes),Ol(r,t,i.title),Rl(r,t,i.subtitle),Vl(r,t,i.backgroundImage,n),$l(r,t,i.prices),Ml(r,t,i.description),Gl(r,t,i,n)}var Hl="merch-card",zl=2e3,Li,Ft,_i,zt=class extends ne{constructor(){super();B(this,Ft);p(this,"customerSegment");p(this,"marketSegment");p(this,"variantLayout");B(this,Li,!1);this.filters={},this.types="",this.selected=!1,this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}firstUpdated(){this.variantLayout=Ti(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=Ti(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&(this.style.border=this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(this)}get theme(){return this.closest("sp-theme")}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let i of n){await i.onceSettled();let o=i.value?.[0]?.planType;if(!o)return;let a=this.stockOfferOsis[o];if(!a)return;let s=i.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),i.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let i of n)i.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(i=>{if(r){n[i].order=Math.min(n[i].order||2,2);return}let o=n[i].order;o===1||isNaN(o)||(n[i].order=Number(o)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex",this.getAttribute("tabindex")??"0"),this.addEventListener(yi,this.handleQuantitySelection),this.addEventListener(Oa,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(it,this.handleAemFragmentEvents),this.addEventListener(nt,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout.disconnectedCallbackHook(),this.removeEventListener(yi,this.handleQuantitySelection),this.storageOptions?.removeEventListener(Si,this.handleStorageChange),this.removeEventListener(it,this.handleAemFragmentEvents),this.removeEventListener(nt,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===it&&Ge(this,Ft,_i).call(this,"AEM fragment cannot be loaded"),r.type===nt&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await Ja(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(o=>setTimeout(()=>o(!1),zl));if(await Promise.race([r,n])===!0){this.dispatchEvent(new CustomEvent($a,{bubbles:!0,composed:!0}));return}Ge(this,Ft,_i).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||this.dispatchEvent(new CustomEvent(Ra,{bubbles:!0}))}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(Si,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let i=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(i)}):n.replaceWith(i)}}};Li=new WeakMap,Ft=new WeakSet,_i=function(r){this.dispatchEvent(new CustomEvent(Ma,{detail:r,bubbles:!0,composed:!0}))},p(zt,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,i,o]=r.split(",");return{PUF:n,ABM:i,M2M:o}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[i,o,a]=n.split(":"),s=Number(o);return[i,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:i,size:o}])=>[n,i,o].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object}}),p(zt,"styles",[Ia,qa(),...Na()]);customElements.define(Hl,zt);var pt=class extends ne{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?g` `:g` `}};p(pt,"properties",{size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}}),p(pt,"styles",w` :host { diff --git a/libs/deps/mas/merch-card.js b/libs/deps/mas/merch-card.js index 3090b909f3..7a743feb28 100644 --- a/libs/deps/mas/merch-card.js +++ b/libs/deps/mas/merch-card.js @@ -1,6 +1,6 @@ -import{LitElement as ct}from"../lit-all.min.js";import{LitElement as ke,html as Q,css as Ce}from"../lit-all.min.js";var n=class extends ke{static properties={size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}};constructor(){super(),this.size="m",this.alt=""}render(){let{href:e}=this;return e?Q` +import{LitElement as it}from"../lit-all.min.js";import{LitElement as Ce,html as Z,css as ze}from"../lit-all.min.js";var n=class extends Ce{static properties={size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}};constructor(){super(),this.size="m",this.alt=""}render(){let{href:e}=this;return e?Z` - `:Q` `}static styles=Ce` + `:Z` `}static styles=ze` :host { --img-width: 32px; --img-height: 32px; @@ -28,7 +28,7 @@ import{LitElement as ct}from"../lit-all.min.js";import{LitElement as ke,html as width: var(--img-width); height: var(--img-height); } - `};customElements.define("merch-icon",n);import{css as J,unsafeCSS as Z}from"../lit-all.min.js";var x="(max-width: 767px)",T="(max-width: 1199px)",m="(min-width: 768px)",l="(min-width: 1200px)",p="(min-width: 1600px)";var X=J` + `};customElements.define("merch-icon",n);import{css as X,unsafeCSS as J}from"../lit-all.min.js";var f="(max-width: 767px)",M="(max-width: 1199px)",m="(min-width: 768px)",l="(min-width: 1200px)",p="(min-width: 1600px)";var ee=X` :host { position: relative; display: flex; @@ -240,9 +240,9 @@ import{LitElement as ct}from"../lit-all.min.js";import{LitElement as ke,html as display: flex; gap: 8px; } -`,ee=()=>[J` +`,te=()=>[X` /* Tablet */ - @media screen and ${Z(m)} { + @media screen and ${J(m)} { :host([size='wide']), :host([size='super-wide']) { width: 100%; @@ -251,11 +251,11 @@ import{LitElement as ct}from"../lit-all.min.js";import{LitElement as ke,html as } /* Laptop */ - @media screen and ${Z(l)} { + @media screen and ${J(l)} { :host([size='wide']) { grid-column: span 2; } - `];import{html as M}from"../lit-all.min.js";var h=class r{static styleMap={};card;#e;getContainer(){return this.#e=this.#e??this.card.closest('[class*="-merch-cards"]')??this.card.parentElement,this.#e}insertVariantStyle(){if(!r.styleMap[this.card.variant]){r.styleMap[this.card.variant]=!0;let e=document.createElement("style");e.innerHTML=this.getGlobalCSS(),document.head.appendChild(e)}}updateCardElementMinHeight(e,t){if(!e)return;let o=`--consonant-merch-card-${this.card.variant}-${t}-height`,a=Math.max(0,parseInt(window.getComputedStyle(e).height)||0),d=parseInt(this.getContainer().style.getPropertyValue(o))||0;a>d&&this.getContainer().style.setProperty(o,`${a}px`)}constructor(e){this.card=e,this.insertVariantStyle()}get badge(){let e;if(!(!this.card.badgeBackgroundColor||!this.card.badgeColor||!this.card.badgeText))return this.evergreen&&(e=`border: 1px solid ${this.card.badgeBackgroundColor}; border-right: none;`),M` + `];import{html as R}from"../lit-all.min.js";var h=class t{static styleMap={};card;#e;getContainer(){return this.#e=this.#e??this.card.closest('[class*="-merch-cards"]')??this.card.parentElement,this.#e}insertVariantStyle(){if(!t.styleMap[this.card.variant]){t.styleMap[this.card.variant]=!0;let e=document.createElement("style");e.innerHTML=this.getGlobalCSS(),document.head.appendChild(e)}}updateCardElementMinHeight(e,r){if(!e)return;let o=`--consonant-merch-card-${this.card.variant}-${r}-height`,a=Math.max(0,parseInt(window.getComputedStyle(e).height)||0),d=parseInt(this.getContainer().style.getPropertyValue(o))||0;a>d&&this.getContainer().style.setProperty(o,`${a}px`)}constructor(e){this.card=e,this.insertVariantStyle()}get badge(){let e;if(!(!this.card.badgeBackgroundColor||!this.card.badgeColor||!this.card.badgeText))return this.evergreen&&(e=`border: 1px solid ${this.card.badgeBackgroundColor}; border-right: none;`),R`