+ >`:f`
`;return f`
`});this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}connectedCallbackHook(){this.card.addEventListener(ae,this.updatePriceQuantity)}disconnectedCallbackHook(){this.card.removeEventListener(ae,this.updatePriceQuantity)}updatePriceQuantity({detail:r}){!this.mainPrice||!r?.option||(this.mainPrice.dataset.quantity=r.option)}getGlobalCSS(){return ic}adjustMiniCompareBodySlots(){if(this.card.getBoundingClientRect().width<=2)return;this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(".top-section"),"top-section");let r=["heading-m","body-m","heading-m-price","body-xxs","price-commitment","offers","promo-text","callout-content"];this.card.classList.contains("bullet-list")&&r.push("footer-rows"),r.forEach(n=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${n}"]`),n)),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer"),this.card.shadowRoot.querySelector(".mini-compare-chart-badge")?.textContent!==""&&this.getContainer().style.setProperty("--consonant-merch-card-mini-compare-chart-top-section-mobile-height","32px")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;let r=this.card.querySelector('[slot="footer-rows"] ul');!r||!r.children||[...r.children].forEach((i,n)=>{let a=Math.max(vh,parseFloat(window.getComputedStyle(i).height)||0),o=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(n+1)))||0;a>o&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(n+1),`${a}px`)})}removeEmptyRows(){this.card.querySelectorAll(".footer-row-cell").forEach(i=>{let n=i.querySelector(".footer-row-cell-description");n&&!n.textContent.trim()&&i.remove()})}get mainPrice(){return this.card.querySelector(`[slot="heading-m-price"] ${H}[data-template="price"]`)}get headingMPriceSlot(){return this.card.shadowRoot.querySelector('slot[name="heading-m-price"]')?.assignedElements()[0]}toggleAddon(r){let i=this.mainPrice,n=this.headingMPriceSlot;if(!i&&n){let a=r?.getAttribute("plan-type"),o=null;if(r&&a&&(o=r.querySelector(`p[data-plan-type="${a}"]`)?.querySelector('span[is="inline-price"]')),this.card.querySelectorAll('p[slot="heading-m-price"]').forEach(s=>s.remove()),r.checked){if(o){let s=de("p",{class:"addon-heading-m-price-addon",slot:"heading-m-price"},o.innerHTML);this.card.appendChild(s)}}else{let s=de("p",{class:"card-heading",id:"free",slot:"heading-m-price"},"Free");this.card.appendChild(s)}}}async adjustAddon(){await this.card.updateComplete;let r=this.card.addon;if(!r)return;let i=this.mainPrice,n=this.card.planType;if(i&&(await i.onceSettled(),n=i.value?.[0]?.planType),!n)return;r.planType=n,this.card.querySelector("merch-addon[plan-type]")?.updateComplete.then(()=>{this.updateCardElementMinHeight(this.card.shadowRoot.querySelector('slot[name="addon"]'),"addon")})}renderLayout(){return f`
${this.badge}
@@ -5635,7 +5635,7 @@ merch-card[variant="mini"] span.renewal-text {
background-color: var(--spectrum-background-base-color);
border: 1px solid var(--consonant-merch-card-border-color, #dadada);
}
- `);var zi=new Map,V=(e,t,r=null,i=null,n)=>{zi.set(e,{class:t,fragmentMapping:r,style:i,collectionOptions:n})};V("catalog",Ut,ec,Ut.variantStyle);V("image",Ni);V("inline-heading",Ii);V("mini-compare-chart",Ft,null,Ft.variantStyle);V("plans",he,Di,he.variantStyle,he.collectionOptions);V("plans-students",he,oc,he.variantStyle,he.collectionOptions);V("plans-education",he,ac,he.variantStyle,he.collectionOptions);V("plans-v2",Ye,cc,Ye.variantStyle,Ye.collectionOptions);V("product",Gt,null,Gt.variantStyle);V("segment",qt,null,qt.variantStyle);V("special-offers",Vt,pc,Vt.variantStyle);V("simplified-pricing-express",jt,xa,jt.variantStyle);V("full-pricing-express",Wt,va,Wt.variantStyle);V("mini",Yt,fc,Yt.variantStyle);var ba=e=>{let t=zi.get(e.variant);if(!t)return;let{class:r,style:i}=t;if(i)try{let n=new CSSStyleSheet;n.replaceSync(i.cssText),e.shadowRoot.adoptedStyleSheets.push(n)}catch{let a=document.createElement("style");a.textContent=i.cssText,e.shadowRoot.appendChild(a)}return new r(e)};function Oi(e){return zi.get(e)?.fragmentMapping}function xc(e){return zi.get(e)?.collectionOptions}var vc=document.createElement("style");vc.innerHTML=`
+ `);var zi=new Map,xc=new WeakMap,vc=new Map,V=(e,t,r=null,i=null,n)=>{zi.set(e,{class:t,fragmentMapping:r,style:i,collectionOptions:n})};V("catalog",Ut,ec,Ut.variantStyle);V("image",Ni);V("inline-heading",Ii);V("mini-compare-chart",Ft,null,Ft.variantStyle);V("plans",he,Di,he.variantStyle,he.collectionOptions);V("plans-students",he,oc,he.variantStyle,he.collectionOptions);V("plans-education",he,ac,he.variantStyle,he.collectionOptions);V("plans-v2",Ye,cc,Ye.variantStyle,Ye.collectionOptions);V("product",Gt,null,Gt.variantStyle);V("segment",qt,null,qt.variantStyle);V("special-offers",Vt,pc,Vt.variantStyle);V("simplified-pricing-express",jt,xa,jt.variantStyle);V("full-pricing-express",Wt,va,Wt.variantStyle);V("mini",Yt,fc,Yt.variantStyle);var bh=(e,t,r)=>{try{let i=vc.get(e.variant);if(i||(i=new CSSStyleSheet,i.replaceSync(t.cssText),vc.set(e.variant,i)),r?.styleSheet&&r.styleSheet!==i){let n=e.shadowRoot.adoptedStyleSheets.indexOf(r.styleSheet);n!==-1&&e.shadowRoot.adoptedStyleSheets.splice(n,1)}return e.shadowRoot.adoptedStyleSheets.includes(i)||e.shadowRoot.adoptedStyleSheets.push(i),{styleSheet:i}}catch{let n=document.createElement("style");n.textContent=t.cssText,n.setAttribute("data-variant-style",e.variant);let a=r?.styleElement||e.shadowRoot.querySelector("[data-variant-style]");return a&&a.remove(),e.shadowRoot.appendChild(n),{styleElement:n}}},ba=e=>{let t=zi.get(e.variant);if(!t)return;let{class:r,style:i}=t,n=xc.get(e);if(n?.appliedVariant===e.variant)return new r(e);let a=i?bh(e,i,n):{};return xc.set(e,{appliedVariant:e.variant,...a}),new r(e)};function Oi(e){return zi.get(e)?.fragmentMapping}function bc(e){return zi.get(e)?.collectionOptions}var yc=document.createElement("style");yc.innerHTML=`
:root {
--consonant-merch-card-detail-font-size: 12px;
--consonant-merch-card-detail-font-weight: 500;
@@ -6371,7 +6371,7 @@ merch-card [slot='callout-content'] .icon-button::before {
}
}
-`;document.head.appendChild(vc);var bc="fragment",yc="author",Ec="preview",wc="loading",Ac="timeout",ya="aem-fragment",Sc="eager",_c="cache",xh=[Sc,_c],Re,bt,Se,Ea=class{constructor(){E(this,Re,new Map);E(this,bt,new Map);E(this,Se,new Map)}clear(){h(this,Re).clear(),h(this,bt).clear(),h(this,Se).clear()}add(t,r=!0){if(!this.has(t.id)&&!this.has(t.fields?.originalId)){if(h(this,Re).set(t.id,t),t.fields?.originalId&&h(this,Re).set(t.fields.originalId,t),h(this,Se).has(t.id)){let[,i]=h(this,Se).get(t.id);i()}if(h(this,Se).has(t.fields?.originalId)){let[,i]=h(this,Se).get(t.fields?.originalId);i()}if(!(!r||typeof t.references!="object"||Array.isArray(t.references)))for(let i in t.references){let{type:n,value:a}=t.references[i];n==="content-fragment"&&(a.settings={...t?.settings,...a.settings},a.placeholders={...t?.placeholders,...a.placeholders},a.dictionary={...t?.dictionary,...a.dictionary},a.priceLiterals={...t?.priceLiterals,...a.priceLiterals},this.add(a,t))}}}has(t){return h(this,Re).has(t)}entries(){return h(this,Re).entries()}get(t){return h(this,Re).get(t)}getAsPromise(t){let[r]=h(this,Se).get(t)??[];if(r)return r;let i;return r=new Promise(n=>{i=n,this.has(t)&&n()}),h(this,Se).set(t,[r,i]),r}getFetchInfo(t){let r=h(this,bt).get(t);return r||(r={url:null,retryCount:0,stale:!1,measure:null,status:null},h(this,bt).set(t,r)),r}remove(t){h(this,Re).delete(t),h(this,bt).delete(t),h(this,Se).delete(t)}};Re=new WeakMap,bt=new WeakMap,Se=new WeakMap;var Xe=new Ea,Xt,_e,He,ve,pe,J,Ur,Fr,Te,Gr,qr,Kt,Ce,Tc,Cc,wa,kc,$i=class extends HTMLElement{constructor(){super(...arguments);E(this,Ce);m(this,"cache",Xe);E(this,Xt);E(this,_e,null);E(this,He,null);E(this,ve,null);E(this,pe);E(this,J);E(this,Ur,Sc);E(this,Fr,5e3);E(this,Te);E(this,Gr,!1);E(this,qr,0);E(this,Kt)}static get observedAttributes(){return[bc,wc,Ac,yc,Ec]}attributeChangedCallback(r,i,n){r===bc&&(y(this,pe,n),y(this,J,Xe.getFetchInfo(n))),r===wc&&xh.includes(n)&&y(this,Ur,n),r===Ac&&y(this,Fr,parseInt(n,10)),r===yc&&y(this,Gr,["","true"].includes(n)),r===Ec&&y(this,Kt,n)}connectedCallback(){if(!h(this,Te)){if(h(this,ve)??y(this,ve,dt(this)),y(this,Kt,h(this,ve).settings?.preview),h(this,Xt)??y(this,Xt,h(this,ve).log.module(`${ya}[${h(this,pe)}]`)),!h(this,pe)||h(this,pe)==="#"){h(this,J)??y(this,J,Xe.getFetchInfo("missing-fragment-id")),te(this,Ce,wa).call(this,"Missing fragment id");return}this.refresh(!1)}}get fetchInfo(){return Object.fromEntries(Object.entries(h(this,J)).filter(([r,i])=>i!=null).map(([r,i])=>[`aem-fragment:${r}`,i]))}async refresh(r=!0){if(h(this,Te)&&!await Promise.race([h(this,Te),Promise.resolve(!1)]))return;r&&Xe.remove(h(this,pe)),h(this,Ur)===_c&&await Promise.race([Xe.getAsPromise(h(this,pe)),new Promise(s=>setTimeout(s,h(this,Fr)))]);try{y(this,Te,te(this,Ce,kc).call(this)),await h(this,Te)}catch(s){return te(this,Ce,wa).call(this,s.message),!1}let{references:i,referencesTree:n,placeholders:a,wcs:o}=h(this,_e)||{};return o&&!B("mas.disableWcsCache")&&h(this,ve).prefillWcsCache(o),this.dispatchEvent(new CustomEvent(tt,{detail:{...this.data,references:i,referencesTree:n,placeholders:a,...h(this,J)},bubbles:!0,composed:!0})),h(this,Te)}get updateComplete(){return h(this,Te)??Promise.reject(new Error("AEM fragment cannot be loaded"))}get data(){return h(this,He)?h(this,He):(h(this,Gr)?this.transformAuthorData():this.transformPublishData(),h(this,He))}get rawData(){return h(this,_e)}transformAuthorData(){let{fields:r,id:i,tags:n,settings:a={},priceLiterals:o={},dictionary:s={},placeholders:c={}}=h(this,_e);y(this,He,r.reduce((l,{name:d,multiple:p,values:u})=>(l.fields[d]=p?u:u[0],l),{fields:{},id:i,tags:n,settings:a,priceLiterals:o,dictionary:s,placeholders:c}))}transformPublishData(){let{fields:r,id:i,tags:n,settings:a={},priceLiterals:o={},dictionary:s={},placeholders:c={}}=h(this,_e);y(this,He,Object.entries(r).reduce((l,[d,p])=>(l.fields[d]=p?.mimeType?p.value:p??"",l),{fields:{},id:i,tags:n,settings:a,priceLiterals:o,dictionary:s,placeholders:c}))}getFragmentClientUrl(){let i=new URLSearchParams(window.location.search).get("maslibs");if(!i||i.trim()==="")return"https://mas.adobe.com/studio/libs/fragment-client.js";let n=i.trim().toLowerCase();if(n==="local")return"http://localhost:3030/studio/libs/fragment-client.js";let{hostname:a}=window.location,o=a.endsWith(".page")?"page":"live";return n.includes("--")?`https://${n}.aem.${o}/studio/libs/fragment-client.js`:`https://${n}--mas--adobecom.aem.${o}/studio/libs/fragment-client.js`}async generatePreview(){let r=this.getFragmentClientUrl(),{previewFragment:i}=await import(r);return await i(h(this,pe),{locale:h(this,ve).settings.locale,apiKey:h(this,ve).settings.wcsApiKey})}};Xt=new WeakMap,_e=new WeakMap,He=new WeakMap,ve=new WeakMap,pe=new WeakMap,J=new WeakMap,Ur=new WeakMap,Fr=new WeakMap,Te=new WeakMap,Gr=new WeakMap,qr=new WeakMap,Kt=new WeakMap,Ce=new WeakSet,Tc=async function(r){Ha(this,qr)._++;let i=`${ya}:${h(this,pe)}:${h(this,qr)}`,n=`${i}${nt}`,a=`${i}${at}`;if(h(this,Kt))return await this.generatePreview();performance.mark(n);let o;try{if(h(this,J).stale=!1,h(this,J).url=r,o=await Ai(r,{cache:"default",credentials:"omit"}),te(this,Ce,Cc).call(this,o),h(this,J).status=o?.status,h(this,J).measure=Le(performance.measure(a,n)),h(this,J).retryCount=o.retryCount,!o?.ok)throw new Ne("Unexpected fragment response",{response:o,...h(this,ve).duration});return await o.json()}catch(s){if(h(this,J).measure=Le(performance.measure(a,n)),h(this,J).retryCount=s.retryCount,h(this,_e))return h(this,J).stale=!0,h(this,Xt).error("Serving stale data",h(this,J)),h(this,_e);let c=s.message??"unknown";throw new Ne(`Failed to fetch fragment: ${c}`,{})}},Cc=function(r){Object.assign(h(this,J),si(r))},wa=function(r){y(this,Te,null),h(this,J).message=r,this.classList.add("error");let i={...h(this,J),...h(this,ve).duration};h(this,Xt).error(r,i),this.dispatchEvent(new CustomEvent(rt,{detail:i,bubbles:!0,composed:!0}))},kc=async function(){var c;this.classList.remove("error"),y(this,He,null);let r=Xe.get(h(this,pe));if(r)return y(this,_e,r),!0;let{masIOUrl:i,wcsApiKey:n,country:a,locale:o}=h(this,ve).settings,s=`${i}/fragment?id=${h(this,pe)}&api_key=${n}&locale=${o}`;return a&&!o.endsWith(`_${a}`)&&(s+=`&country=${a}`),r=await te(this,Ce,Tc).call(this,s),(c=r.fields).originalId??(c.originalId=h(this,pe)),Xe.add(r),y(this,_e,r),!0},m($i,"cache",Xe);customElements.define(ya,$i);R();var Qt=class extends ${constructor(){super(),this.color="",this.variant="",this.backgroundColor="",this.borderColor="",this.text=this.textContent}connectedCallback(){this.borderColor&&this.borderColor!=="Transparent"?this.style.setProperty("--merch-badge-border",`1px solid var(--${this.borderColor})`):this.style.setProperty("--merch-badge-border",`1px solid var(--${this.backgroundColor})`),this.style.setProperty("--merch-badge-background-color",`var(--${this.backgroundColor})`),this.style.setProperty("--merch-badge-color",this.color),this.style.setProperty("--merch-badge-padding","2px 10px 3px 10px"),this.style.setProperty("--merch-badge-border-radius","4px 0 0 4px"),this.style.setProperty("--merch-badge-font-size","var(--consonant-merch-card-body-xs-font-size)"),this.textContent="";let t=this.closest("merch-card"),r=t?.getAttribute("size"),i=t?.querySelectorAll(":scope > merch-icon").length||0;this.style.setProperty("--merch-badge-offset",i),this.style.setProperty("--merch-badge-with-offset",i?1:0),this.style.setProperty("--merch-badge-card-size",r?2:1),super.connectedCallback()}render(){return f`
${this.text}
`}};m(Qt,"properties",{color:{type:String},variant:{type:String},backgroundColor:{type:String,attribute:"background-color"},borderColor:{type:String,attribute:"border-color"}}),m(Qt,"styles",b`
+`;document.head.appendChild(yc);var Ec="fragment",wc="author",Ac="preview",Sc="loading",_c="timeout",ya="aem-fragment",Tc="eager",Cc="cache",yh=[Tc,Cc],Re,bt,Se,Ea=class{constructor(){E(this,Re,new Map);E(this,bt,new Map);E(this,Se,new Map)}clear(){h(this,Re).clear(),h(this,bt).clear(),h(this,Se).clear()}add(t,r=!0){if(!this.has(t.id)&&!this.has(t.fields?.originalId)){if(h(this,Re).set(t.id,t),t.fields?.originalId&&h(this,Re).set(t.fields.originalId,t),h(this,Se).has(t.id)){let[,i]=h(this,Se).get(t.id);i()}if(h(this,Se).has(t.fields?.originalId)){let[,i]=h(this,Se).get(t.fields?.originalId);i()}if(!(!r||typeof t.references!="object"||Array.isArray(t.references)))for(let i in t.references){let{type:n,value:a}=t.references[i];n==="content-fragment"&&(a.settings={...t?.settings,...a.settings},a.placeholders={...t?.placeholders,...a.placeholders},a.dictionary={...t?.dictionary,...a.dictionary},a.priceLiterals={...t?.priceLiterals,...a.priceLiterals},this.add(a,t))}}}has(t){return h(this,Re).has(t)}entries(){return h(this,Re).entries()}get(t){return h(this,Re).get(t)}getAsPromise(t){let[r]=h(this,Se).get(t)??[];if(r)return r;let i;return r=new Promise(n=>{i=n,this.has(t)&&n()}),h(this,Se).set(t,[r,i]),r}getFetchInfo(t){let r=h(this,bt).get(t);return r||(r={url:null,retryCount:0,stale:!1,measure:null,status:null},h(this,bt).set(t,r)),r}remove(t){h(this,Re).delete(t),h(this,bt).delete(t),h(this,Se).delete(t)}};Re=new WeakMap,bt=new WeakMap,Se=new WeakMap;var Xe=new Ea,Xt,_e,He,ve,pe,J,Ur,Fr,Te,Gr,qr,Kt,Ce,kc,Pc,wa,Lc,$i=class extends HTMLElement{constructor(){super(...arguments);E(this,Ce);m(this,"cache",Xe);E(this,Xt);E(this,_e,null);E(this,He,null);E(this,ve,null);E(this,pe);E(this,J);E(this,Ur,Tc);E(this,Fr,5e3);E(this,Te);E(this,Gr,!1);E(this,qr,0);E(this,Kt)}static get observedAttributes(){return[Ec,Sc,_c,wc,Ac]}attributeChangedCallback(r,i,n){r===Ec&&(y(this,pe,n),y(this,J,Xe.getFetchInfo(n))),r===Sc&&yh.includes(n)&&y(this,Ur,n),r===_c&&y(this,Fr,parseInt(n,10)),r===wc&&y(this,Gr,["","true"].includes(n)),r===Ac&&y(this,Kt,n)}connectedCallback(){if(!h(this,Te)){if(h(this,ve)??y(this,ve,dt(this)),y(this,Kt,h(this,ve).settings?.preview),h(this,Xt)??y(this,Xt,h(this,ve).log.module(`${ya}[${h(this,pe)}]`)),!h(this,pe)||h(this,pe)==="#"){h(this,J)??y(this,J,Xe.getFetchInfo("missing-fragment-id")),te(this,Ce,wa).call(this,"Missing fragment id");return}this.refresh(!1)}}get fetchInfo(){return Object.fromEntries(Object.entries(h(this,J)).filter(([r,i])=>i!=null).map(([r,i])=>[`aem-fragment:${r}`,i]))}async refresh(r=!0){if(h(this,Te)&&!await Promise.race([h(this,Te),Promise.resolve(!1)]))return;r&&Xe.remove(h(this,pe)),h(this,Ur)===Cc&&await Promise.race([Xe.getAsPromise(h(this,pe)),new Promise(s=>setTimeout(s,h(this,Fr)))]);try{y(this,Te,te(this,Ce,Lc).call(this)),await h(this,Te)}catch(s){return te(this,Ce,wa).call(this,s.message),!1}let{references:i,referencesTree:n,placeholders:a,wcs:o}=h(this,_e)||{};return o&&!B("mas.disableWcsCache")&&h(this,ve).prefillWcsCache(o),this.dispatchEvent(new CustomEvent(tt,{detail:{...this.data,references:i,referencesTree:n,placeholders:a,...h(this,J)},bubbles:!0,composed:!0})),h(this,Te)}get updateComplete(){return h(this,Te)??Promise.reject(new Error("AEM fragment cannot be loaded"))}get data(){return h(this,He)?h(this,He):(h(this,Gr)?this.transformAuthorData():this.transformPublishData(),h(this,He))}get rawData(){return h(this,_e)}transformAuthorData(){let{fields:r,id:i,tags:n,settings:a={},priceLiterals:o={},dictionary:s={},placeholders:c={}}=h(this,_e);y(this,He,r.reduce((l,{name:d,multiple:p,values:u})=>(l.fields[d]=p?u:u[0],l),{fields:{},id:i,tags:n,settings:a,priceLiterals:o,dictionary:s,placeholders:c}))}transformPublishData(){let{fields:r,id:i,tags:n,settings:a={},priceLiterals:o={},dictionary:s={},placeholders:c={}}=h(this,_e);y(this,He,Object.entries(r).reduce((l,[d,p])=>(l.fields[d]=p?.mimeType?p.value:p??"",l),{fields:{},id:i,tags:n,settings:a,priceLiterals:o,dictionary:s,placeholders:c}))}getFragmentClientUrl(){let i=new URLSearchParams(window.location.search).get("maslibs");if(!i||i.trim()==="")return"https://mas.adobe.com/studio/libs/fragment-client.js";let n=i.trim().toLowerCase();if(n==="local")return"http://localhost:3030/studio/libs/fragment-client.js";let{hostname:a}=window.location,o=a.endsWith(".page")?"page":"live";return n.includes("--")?`https://${n}.aem.${o}/studio/libs/fragment-client.js`:`https://${n}--mas--adobecom.aem.${o}/studio/libs/fragment-client.js`}async generatePreview(){let r=this.getFragmentClientUrl(),{previewFragment:i}=await import(r);return await i(h(this,pe),{locale:h(this,ve).settings.locale,apiKey:h(this,ve).settings.wcsApiKey})}};Xt=new WeakMap,_e=new WeakMap,He=new WeakMap,ve=new WeakMap,pe=new WeakMap,J=new WeakMap,Ur=new WeakMap,Fr=new WeakMap,Te=new WeakMap,Gr=new WeakMap,qr=new WeakMap,Kt=new WeakMap,Ce=new WeakSet,kc=async function(r){Ha(this,qr)._++;let i=`${ya}:${h(this,pe)}:${h(this,qr)}`,n=`${i}${nt}`,a=`${i}${at}`;if(h(this,Kt))return await this.generatePreview();performance.mark(n);let o;try{if(h(this,J).stale=!1,h(this,J).url=r,o=await Ai(r,{cache:"default",credentials:"omit"}),te(this,Ce,Pc).call(this,o),h(this,J).status=o?.status,h(this,J).measure=Le(performance.measure(a,n)),h(this,J).retryCount=o.retryCount,!o?.ok)throw new Ne("Unexpected fragment response",{response:o,...h(this,ve).duration});return await o.json()}catch(s){if(h(this,J).measure=Le(performance.measure(a,n)),h(this,J).retryCount=s.retryCount,h(this,_e))return h(this,J).stale=!0,h(this,Xt).error("Serving stale data",h(this,J)),h(this,_e);let c=s.message??"unknown";throw new Ne(`Failed to fetch fragment: ${c}`,{})}},Pc=function(r){Object.assign(h(this,J),si(r))},wa=function(r){y(this,Te,null),h(this,J).message=r,this.classList.add("error");let i={...h(this,J),...h(this,ve).duration};h(this,Xt).error(r,i),this.dispatchEvent(new CustomEvent(rt,{detail:i,bubbles:!0,composed:!0}))},Lc=async function(){var c;this.classList.remove("error"),y(this,He,null);let r=Xe.get(h(this,pe));if(r)return y(this,_e,r),!0;let{masIOUrl:i,wcsApiKey:n,country:a,locale:o}=h(this,ve).settings,s=`${i}/fragment?id=${h(this,pe)}&api_key=${n}&locale=${o}`;return a&&!o.endsWith(`_${a}`)&&(s+=`&country=${a}`),r=await te(this,Ce,kc).call(this,s),(c=r.fields).originalId??(c.originalId=h(this,pe)),Xe.add(r),y(this,_e,r),!0},m($i,"cache",Xe);customElements.define(ya,$i);R();var Qt=class extends ${constructor(){super(),this.color="",this.variant="",this.backgroundColor="",this.borderColor="",this.text=this.textContent}connectedCallback(){this.borderColor&&this.borderColor!=="Transparent"?this.style.setProperty("--merch-badge-border",`1px solid var(--${this.borderColor})`):this.style.setProperty("--merch-badge-border",`1px solid var(--${this.backgroundColor})`),this.style.setProperty("--merch-badge-background-color",`var(--${this.backgroundColor})`),this.style.setProperty("--merch-badge-color",this.color),this.style.setProperty("--merch-badge-padding","2px 10px 3px 10px"),this.style.setProperty("--merch-badge-border-radius","4px 0 0 4px"),this.style.setProperty("--merch-badge-font-size","var(--consonant-merch-card-body-xs-font-size)"),this.textContent="";let t=this.closest("merch-card"),r=t?.getAttribute("size"),i=t?.querySelectorAll(":scope > merch-icon").length||0;this.style.setProperty("--merch-badge-offset",i),this.style.setProperty("--merch-badge-with-offset",i?1:0),this.style.setProperty("--merch-badge-card-size",r?2:1),super.connectedCallback()}render(){return f`
${this.text}
`}};m(Qt,"properties",{color:{type:String},variant:{type:String},backgroundColor:{type:String,attribute:"background-color"},borderColor:{type:String,attribute:"border-color"}}),m(Qt,"styles",b`
:host {
display: block;
background-color: var(--merch-badge-background-color);
@@ -6445,7 +6445,7 @@ merch-card [slot='callout-content'] .icon-button::before {
text-decoration: underline;
color: var(--link-color-dark);
}
- `),m(jr,"properties",{heading:{type:String,attribute:!0},mobileRows:{type:Number,attribute:!0}});customElements.define("merch-whats-included",jr);var vh="#000000",Aa="#F8D904",bh="#EAEAEA",yh="#31A547",Eh=/(accent|primary|secondary)(-(outline|link))?/,wh="mas:product_code/",Ah="daa-ll",Hi="daa-lh",Sh=["XL","L","M","S"],Sa="...";function be(e,t,r,i){let n=i[e];if(t[e]&&n){let a={slot:n?.slot,...n?.attributes},o=t[e];if(n.maxCount&&typeof o=="string"){let[c,l]=Uh(o,n.maxCount,n.withSuffix);c!==o&&(a.title=l,o=c)}let s=de(n.tag,a,o);r.append(s)}}function _h(e,t,r){let i=e.mnemonicIcon?.map((a,o)=>({icon:a,alt:e.mnemonicAlt[o]??"",link:e.mnemonicLink[o]??""}));i?.forEach(({icon:a,alt:o,link:s})=>{if(s&&!/^https?:/.test(s))try{s=new URL(`https://${s}`).href.toString()}catch{s="#"}let c={slot:"icons",src:a,loading:t.loading,size:r?.size??"l"};o&&(c.alt=o),s&&(c.href=s);let l=de("merch-icon",c);t.append(l)});let n=t.shadowRoot.querySelector('slot[name="icons"]');n&&(n.style.display=i?.length?null:"none")}function Th(e,t,r){if(r.badge?.slot){if(e.badge?.length&&!e.badge?.startsWith("
${e.badge}`}be("badge",e,t,r)}else e.badge?(t.setAttribute("badge-text",e.badge),r.disabledAttributes?.includes("badgeColor")||t.setAttribute("badge-color",e.badgeColor||vh),r.disabledAttributes?.includes("badgeBackgroundColor")||t.setAttribute("badge-background-color",e.badgeBackgroundColor||Aa),t.setAttribute("border-color",e.badgeBackgroundColor||Aa)):t.setAttribute("border-color",e.borderColor||bh)}function Ch(e,t,r){if(r.trialBadge&&e.trialBadge){if(!e.trialBadge.startsWith("
${e.trialBadge}`}be("trialBadge",e,t,r)}}function kh(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function Ph(e,t){e.cardName&&t.setAttribute("name",e.cardName)}function Lh(e,t,r){e.cardTitle&&(e.cardTitle=Zt(e.cardTitle)),be("cardTitle",e,t,{cardTitle:r})}function Rh(e,t,r){be("subtitle",e,t,r)}function Mh(e,t,r,i){if(!e.backgroundColor||e.backgroundColor.toLowerCase()==="default"){t.style.removeProperty("--merch-card-custom-background-color"),t.removeAttribute("background-color");return}r?.[e.backgroundColor]?(t.style.setProperty("--merch-card-custom-background-color",`var(${r[e.backgroundColor]})`),t.setAttribute("background-color",e.backgroundColor)):i?.attribute&&e.backgroundColor&&(t.setAttribute(i.attribute,e.backgroundColor),t.style.removeProperty("--merch-card-custom-background-color"))}function Oh(e,t,r){let i=r?.borderColor,n="--consonant-merch-card-border-color";if(e.borderColor?.toLowerCase()==="transparent")t.style.setProperty(n,"transparent");else if(e.borderColor&&i){let o=i?.specialValues?.[e.borderColor]?.includes("gradient")||/-gradient/.test(e.borderColor),s=/^spectrum-.*-plans$/.test(e.borderColor);if(o){t.setAttribute("gradient-border","true");let c=e.borderColor;if(i?.specialValues){for(let[l,d]of Object.entries(i.specialValues))if(d===e.borderColor){c=l;break}}t.setAttribute("border-color",c),t.style.removeProperty(n)}else s?(t.setAttribute("border-color",e.borderColor),t.style.setProperty(n,`var(--${e.borderColor})`)):t.style.setProperty(n,`var(--${e.borderColor})`)}}function Nh(e,t,r){if(e.backgroundImage){let i={loading:t.loading??"lazy",src:e.backgroundImage};if(e.backgroundImageAltText?i.alt=e.backgroundImageAltText:i.role="none",!r)return;if(r?.attribute){t.setAttribute(r.attribute,e.backgroundImage);return}t.append(de(r.tag,{slot:r.slot},de("img",i)))}}function Zt(e){return!e||typeof e!="string"||e.includes("
(Ri(),fa)).catch(console.error),e}function Ih(e,t,r){e.prices&&(e.prices=Zt(e.prices)),be("prices",e,t,r)}function Lc(e,t,r){let i=e.hasAttribute("data-wcs-osi")&&!!e.getAttribute("data-wcs-osi"),n=e.className||"",a=Eh.exec(n)?.[0]??"accent",o=a.includes("accent"),s=a.includes("primary"),c=a.includes("secondary"),l=a.includes("-outline"),d=a.includes("-link");e.classList.remove("accent","primary","secondary");let p;if(t.consonant)p=Vh(e,o,i,d,s);else if(d)p=e;else{let u;o?u="accent":s?u="primary":c&&(u="secondary"),p=t.spectrum==="swc"?qh(e,r,l,u,i):Gh(e,r,l,u,i)}return p}function Dh(e,t){let{slot:r}=t?.description,i=e.querySelectorAll(`[slot="${r}"] a[data-wcs-osi]`);i.length&&i.forEach(n=>{let a=Lc(n,e,t);n.replaceWith(a)})}function zh(e,t,r){e.description&&(e.description=Zt(e.description)),e.promoText&&(e.promoText=Zt(e.promoText)),e.shortDescription&&(e.shortDescription=Zt(e.shortDescription)),be("promoText",e,t,r),be("description",e,t,r),be("shortDescription",e,t,r),e.shortDescription&&(t.setAttribute("action-menu","true"),e.actionMenuLabel||t.setAttribute("action-menu-label","More options")),Dh(t,r),be("callout",e,t,r),be("quantitySelect",e,t,r),be("whatsIncluded",e,t,r)}function $h(e,t,r){if(!r.addon)return;let i=e.addon?.replace(/[{}]/g,"");if(!i||/disabled/.test(i))return;let n=de("merch-addon",{slot:"addon"},i);[...n.querySelectorAll(H)].forEach(a=>{let o=a.parentElement;o?.nodeName==="P"&&o.setAttribute("data-plan-type","")}),t.append(n)}function Hh(e,t,r){e.addonConfirmation&&be("addonConfirmation",e,t,r)}function Bh(e,t,r,i){i?.secureLabel&&r?.secureLabel&&t.setAttribute("secure-label",i.secureLabel)}function Uh(e,t,r=!0){try{let i=typeof e!="string"?"":e,n=Pc(i);if(n.length<=t)return[i,n];let a=0,o=!1,s=r?t-Sa.length<1?1:t-Sa.length:t,c=[];for(let p of i){if(a++,p==="<")if(o=!0,i[a]==="/")c.pop();else{let u="";for(let g of i.substring(a)){if(g===" "||g===">")break;u+=g}c.push(u)}if(p==="/"&&i[a]===">"&&c.pop(),p===">"){o=!1;continue}if(!o&&(s--,s===0))break}let l=i.substring(0,a).trim();if(c.length>0){c[0]==="p"&&c.shift();for(let p of c.reverse())l+=`${p}>`}return[`${l}${r?Sa:""}`,n]}catch{let n=typeof e=="string"?e:"",a=Pc(n);return[n,a]}}function Pc(e){if(!e)return"";let t="",r=!1;for(let i of e){if(i==="<"&&(r=!0),i===">"){r=!1;continue}r||(t+=i)}return t}function Fh(e,t){t.querySelectorAll("a.upt-link").forEach(i=>{let n=je.createFrom(i);i.replaceWith(n),n.initializeWcsData(e.osi,e.promoCode)})}function Gh(e,t,r,i,n){let a=e;n?a=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML):a.innerHTML=`${a.textContent}`,a.setAttribute("tabindex",0);for(let d of e.attributes)["class","is"].includes(d.name)||a.setAttribute(d.name,d.value);a.firstElementChild?.classList.add("spectrum-Button-label");let o=t?.ctas?.size??"M",s=`spectrum-Button--${i}`,c=Sh.includes(o)?`spectrum-Button--size${o}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),a.classList.add(...l),a}function qh(e,t,r,i,n){let a=e;n&&(a=customElements.get("checkout-button").createCheckoutButton(e.dataset),a.connectedCallback(),a.render());let o="fill";r&&(o="outline");let s=de("sp-button",{treatment:o,variant:i,tabIndex:0,size:t?.ctas?.size??"m",...e.dataset.analyticsId&&{"data-analytics-id":e.dataset.analyticsId}},e.innerHTML);return s.source=a,(n?a.onceSettled():Promise.resolve(a)).then(c=>{s.setAttribute("data-navigation-url",c.href)}),s.addEventListener("click",c=>{c.defaultPrevented||a.click()}),s}function Vh(e,t,r,i,n){let a=e;return r&&(a=customElements.get("checkout-link").createCheckoutLink(e.dataset,e.innerHTML)),i||(a.classList.add("button","con-button"),t&&a.classList.add("blue"),n&&a.classList.add("primary")),a}function jh(e,t,r,i){if(e.ctas){e.ctas=Zt(e.ctas);let{slot:n}=r.ctas,a=de("div",{slot:n},e.ctas),o=[...a.querySelectorAll("a")].map(s=>Lc(s,t,r));a.innerHTML="",a.append(...o),t.append(a)}}function Wh(e,t){let{tags:r}=e,i=r?.find(a=>a.startsWith(wh))?.split("/").pop();if(!i)return;t.setAttribute(Hi,i),[...t.shadowRoot.querySelectorAll("a[data-analytics-id],button[data-analytics-id]"),...t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]")].forEach((a,o)=>{a.setAttribute(Ah,`${a.dataset.analyticsId}-${o+1}`)})}function Yh(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(i=>{i.classList.remove(t),i.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}function Xh(e){e.querySelectorAll("[slot]").forEach(i=>{i.remove()}),e.variant=void 0,["checkbox-label","stock-offer-osis","secure-label","background-image","background-color","border-color","badge-background-color","badge-color","badge-text","gradient-border","size",Hi].forEach(i=>e.removeAttribute(i));let r=["wide-strip","thin-strip"];e.classList.remove(...r)}async function Rc(e,t){if(!e){let c=t?.id||"unknown";throw console.error(`hydrate: Fragment is undefined. Cannot hydrate card (merchCard id: ${c}).`),new Error(`hydrate: Fragment is undefined for card (merchCard id: ${c}).`)}if(!e.fields){let c=e.id||"unknown",l=t?.id||"unknown";throw console.error(`hydrate: Fragment for card ID '${c}' (merchCard id: ${l}) is missing 'fields'. Cannot hydrate.`),new Error(`hydrate: Fragment for card ID '${c}' (merchCard id: ${l}) is missing 'fields'.`)}let{id:r,fields:i,settings:n={},priceLiterals:a}=e,{variant:o}=i;if(!o)throw new Error(`hydrate: no variant found in payload ${r}`);Xh(t),t.settings=n,a&&(t.priceLiterals=a),t.id??(t.id=e.id),t.variant=o,await t.updateComplete;let{aemFragmentMapping:s}=t.variantLayout;if(!s)throw new Error(`hydrate: variant mapping not found for ${r}`);s.style==="consonant"&&t.setAttribute("consonant",!0),_h(i,t,s.mnemonics),Th(i,t,s),Ch(i,t,s),kh(i,t,s.size),Ph(i,t),Lh(i,t,s.title),Rh(i,t,s),Ih(i,t,s),Nh(i,t,s.backgroundImage),Mh(i,t,s.allowedColors,s.backgroundColor),Oh(i,t,s),zh(i,t,s),$h(i,t,s),Hh(i,t,s),Bh(i,t,s,n),Fh(i,t),jh(i,t,s,o),Wh(i,t),Yh(t)}var Ta="merch-card",_a=2e4,Mc="merch-card:",Kh=["full-pricing-express","simplified-pricing-express"];function Oc(e,t){let r=e.closest(Ta);if(!r)return t;r.priceLiterals&&(t.literals??(t.literals={}),Object.assign(t.literals,r.priceLiterals)),r.aemFragment&&(t[we]=!0),r.variantLayout?.priceOptionsProvider?.(e,t)}function Qh(e){e.providers.has(Oc)||e.providers.price(Oc)}var Nc=new IntersectionObserver(e=>{e.forEach(t=>{t.target.clientHeight!==0&&(Nc.unobserve(t.target),t.target.requestUpdate())})}),Zh=0,Jt,er,tr,Be,Et,Me,wt,ee,yt,Bi,Ic,Ui,Ke=class extends ${constructor(){super();E(this,ee);E(this,Jt);E(this,er);E(this,tr);E(this,Be);E(this,Et);E(this,Me);E(this,wt,new Promise(r=>{y(this,Me,r)}));m(this,"customerSegment");m(this,"marketSegment");m(this,"variantLayout");this.id=null,this.failed=!1,this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.loading="lazy",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this),this.handleMerchOfferSelectReady=this.handleMerchOfferSelectReady.bind(this)}firstUpdated(){this.variantLayout=ba(this),this.variantLayout?.connectedCallbackHook()}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout?.disconnectedCallbackHook(),this.variantLayout=ba(this),this.variantLayout?.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),r.has("backgroundColor")&&this.style.setProperty("--merch-card-custom-background-color",this.backgroundColor?`var(--${this.backgroundColor})`:"");try{this.variantLayoutPromise=this.variantLayout?.postCardUpdateHook(r)}catch(i){te(this,ee,yt).call(this,`Error in postCardUpdateHook: ${i.message}`,{},!1)}}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["ccd-slice","ccd-suggested","ah-promoted-plans","simplified-pricing-express","full-pricing-express"].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 descriptionSlot(){return this.shadowRoot.querySelector('slot[name="body-xs"')?.assignedElements()[0]}get descriptionSlotCompare(){return this.shadowRoot.querySelector('slot[name="body-m"')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector(H)}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll(ye)??[]]}get checkoutLinksDescription(){return[...this.descriptionSlot?.querySelectorAll(ye)??[]]}get checkoutLinkDescriptionCompare(){return[...this.descriptionSlotCompare?.querySelectorAll(ye)??[]]}get activeDescriptionLinks(){return this.variant==="mini-compare-chart"?this.checkoutLinkDescriptionCompare:this.checkoutLinksDescription}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let i=this.checkoutLinks;if(i.length!==0)for(let n of i){await n.onceSettled();let a=n.value?.[0]?.planType;if(!a)return;let o=this.stockOfferOsis[a];if(!o)return;let s=n.dataset.wcsOsi.split(",").filter(c=>c!==o);r.checked&&s.push(o),n.dataset.wcsOsi=s.join(",")}}changeHandler(r){r.target.tagName==="MERCH-ADDON"&&this.toggleAddon(r.target)}toggleAddon(r){this.variantLayout?.toggleAddon?.(r);let i=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(i.length===0)return;let n=a=>{let{offerType:o,planType:s}=a.value?.[0]??{};if(!o||!s)return;let c=r.getOsi(s,o),l=(a.dataset.wcsOsi||"").split(",").filter(d=>d&&d!==c);r.checked&&l.push(c),a.dataset.wcsOsi=l.join(",")};i.forEach(n)}handleQuantitySelection(r){let i=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(i.length!==0)for(let n of i)n.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 i={...this.filters};Object.keys(i).forEach(n=>{if(r){i[n].order=Math.min(i[n].order||2,2);return}let a=i[n].order;a===1||isNaN(a)||(i[n].order=Number(a)+1)}),this.filters=i}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){var i;super.connectedCallback(),h(this,er)||y(this,er,Zh++),this.aemFragment||((i=h(this,Me))==null||i.call(this),y(this,Me,void 0)),this.id??(this.id=this.getAttribute("id")??this.aemFragment?.getAttribute("fragment"));let r=this.id??h(this,er);y(this,Et,`${Mc}${r}${nt}`),y(this,Jt,`${Mc}${r}${at}`),performance.mark(h(this,Et)),y(this,Be,dt()),Qh(h(this,Be)),y(this,tr,h(this,Be).Log.module(Ta)),this.addEventListener(ae,this.handleQuantitySelection),this.addEventListener(Jr,this.handleAddonAndQuantityUpdate),this.addEventListener(lr,this.handleMerchOfferSelectReady),this.addEventListener(rt,this.handleAemFragmentEvents),this.addEventListener(tt,this.handleAemFragmentEvents),this.addEventListener("change",this.changeHandler),this.variantLayout&&this.variantLayout.connectedCallbackHook(),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(ae,this.handleQuantitySelection),this.removeEventListener(rt,this.handleAemFragmentEvents),this.removeEventListener(tt,this.handleAemFragmentEvents),this.removeEventListener("change",this.changeHandler),this.removeEventListener(Jr,this.handleAddonAndQuantityUpdate)}async handleAemFragmentEvents(r){var i;if(this.isConnected&&(r.type===rt&&te(this,ee,yt).call(this,"AEM fragment cannot be loaded"),r.type===tt&&(this.failed=!1,r.target.nodeName==="AEM-FRAGMENT"))){let n=r.detail;try{h(this,Me)||y(this,wt,new Promise(a=>{y(this,Me,a)})),Rc(n,this)}catch(a){te(this,ee,yt).call(this,`hydration has failed: ${a.message}`)}finally{(i=h(this,Me))==null||i.call(this),y(this,Me,void 0)}this.checkReady()}}async checkReady(){if(!this.isConnected)return;h(this,wt)&&(await h(this,wt),Kh.includes(this.variantLayout)&&Nc.observe(this),y(this,wt,void 0)),this.variantLayoutPromise&&(await this.variantLayoutPromise,this.variantLayoutPromise=void 0);let r=new Promise(o=>setTimeout(()=>o("timeout"),_a));if(this.aemFragment){let o=await Promise.race([this.aemFragment.updateComplete,r]);if(o===!1||o==="timeout"){let s=o==="timeout"?`AEM fragment was not resolved within ${_a} timeout`:"AEM fragment cannot be loaded";te(this,ee,yt).call(this,s,{},!1);return}}let i=[...this.querySelectorAll(cr)],n=Promise.all(i.map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(s=>s.classList.contains("placeholder-resolved"))),a=await Promise.race([n,r]);if(a===!0){this.measure=performance.measure(h(this,Jt),h(this,Et));let o={...this.aemFragment?.fetchInfo,...h(this,Be).duration,measure:Le(this.measure)};return this.dispatchEvent(new CustomEvent(Xi,{bubbles:!0,composed:!0,detail:o})),this}else{this.measure=performance.measure(h(this,Jt),h(this,Et));let o={measure:Le(this.measure),...h(this,Be).duration};a==="timeout"?te(this,ee,yt).call(this,`Contains offers that were not resolved within ${_a} timeout`,o):te(this,ee,yt).call(this,"Contains unresolved offers",o)}}get aemFragment(){return this.querySelector("aem-fragment")}get addon(){return this.querySelector("merch-addon")}get quantitySelect(){return this.querySelector("merch-quantity-select")}get addonCheckbox(){return this.querySelector("merch-addon")}displayFooterElementsInColumn(){if(!this.classList.contains("product"))return;let r=this.shadowRoot.querySelector(".secure-transaction-label");(this.footerSlot?.querySelectorAll(ye)).length===2&&r&&r.parentElement.classList.add("footer-column")}handleMerchOfferSelectReady(){this.offerSelect&&!this.offerSelect.planType||this.displayFooterElementsInColumn()}get dynamicPrice(){return this.querySelector('[slot="price"]')}handleAddonAndQuantityUpdate({detail:{id:r,items:i}}){if(!r||!i?.length||this.closest('[role="tabpanel"][hidden="true"]'))return;let a=this.checkoutLinks.find(d=>d.getAttribute("data-modal-id")===r);if(!a)return;let s=new URL(a.getAttribute("href")).searchParams.get("pa"),c=i.find(d=>d.productArrangementCode===s)?.quantity,l=!!i.find(d=>d.productArrangementCode!==s);if(c&&this.quantitySelect?.dispatchEvent(new CustomEvent(Tt,{detail:{quantity:c},bubbles:!0,composed:!0})),this.addonCheckbox&&this.addonCheckbox.checked!==l){this.toggleStockOffer({target:this.addonCheckbox});let d=new Event("change",{bubbles:!0,cancelable:!0});Object.defineProperty(d,"target",{writable:!1,value:{checked:l}}),this.addonCheckbox.handleChange(d)}}get prices(){return Array.from(this.querySelectorAll(H))}get promoPrice(){if(!this.querySelector("span.price-strikethrough"))return;let r=this.querySelector(".price.price-alternative");if(r||(r=this.querySelector(`${H}[data-template="price"] > span`)),!!r)return r=r.innerText,r}get regularPrice(){return h(this,ee,Bi)?.innerText}get promotionCode(){let r=[...this.querySelectorAll(`${H}[data-promotion-code],${ye}[data-promotion-code]`)].map(n=>n.dataset.promotionCode),i=[...new Set(r)];return i.length>1&&h(this,tr)?.warn(`Multiple different promotion codes found: ${i.join(", ")}`),r[0]}get annualPrice(){return this.querySelector(`${H}[data-template="price"] > .price.price-annual`)?.innerText}get promoText(){}get taxText(){return(h(this,ee,Ic)??h(this,ee,Bi))?.querySelector("span.price-tax-inclusivity")?.textContent?.trim()||void 0}get recurrenceText(){return h(this,ee,Bi)?.querySelector("span.price-recurrence")?.textContent?.trim()}get planTypeText(){return this.querySelector('[is="inline-price"][data-template="legal"] span.price-plan-type')?.textContent?.trim()}get seeTermsInfo(){let r=this.querySelector('a[is="upt-link"]');if(r)return te(this,ee,Ui).call(this,r)}get renewalText(){return this.querySelector("span.renewal-text")?.textContent?.trim()}get promoDurationText(){return this.querySelector("span.promo-duration-text")?.textContent?.trim()}get ctas(){let r=this.querySelector('[slot="ctas"], [slot="footer"]')?.querySelectorAll(`${ye}, a`);return Array.from(r??[])}get primaryCta(){return te(this,ee,Ui).call(this,this.ctas.find(r=>r.variant==="accent"||r.matches(".spectrum-Button--accent,.con-button.blue")))}get secondaryCta(){return te(this,ee,Ui).call(this,this.ctas.find(r=>r.variant!=="accent"&&!r.matches(".spectrum-Button--accent,.con-button.blue")))}};Jt=new WeakMap,er=new WeakMap,tr=new WeakMap,Be=new WeakMap,Et=new WeakMap,Me=new WeakMap,wt=new WeakMap,ee=new WeakSet,yt=function(r,i={},n=!0){if(!this.isConnected)return;let o=this.aemFragment?.getAttribute("fragment");o=`[${o}]`;let s={...this.aemFragment.fetchInfo,...h(this,Be).duration,...i,message:r};h(this,tr).error(`merch-card${o}: ${r}`,s),this.failed=!0,n&&this.dispatchEvent(new CustomEvent(Ki,{bubbles:!0,composed:!0,detail:s}))},Bi=function(){return this.querySelector("span.price-strikethrough")??this.querySelector(`${H}[data-template="price"] > span`)},Ic=function(){return this.querySelector(`${H}[data-template="legal"]`)},Ui=function(r){if(r)return{text:r.innerText.trim(),analyticsId:r.dataset.analyticsId,href:r.getAttribute("href")??r.dataset.href}},m(Ke,"properties",{id:{type:String,attribute:"id",reflect:!0},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},backgroundColor:{type:String,attribute:"background-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"},actionMenuLabel:{type:String,attribute:"action-menu-label"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},failed:{type:Boolean,attribute:"failed",reflect:!0},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},addonTitle:{type:String,attribute:"addon-title"},addonOffers:{type:Object,attribute:"addon-offers"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0},settings:{type:Object,attribute:!1},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{if(!r)return;let[i,n,a]=r.split(",");return{PUF:i,ABM:n,M2M:a}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(i=>{let[n,a,o]=i.split(":"),s=Number(a);return[n,{order:isNaN(s)?void 0:s,size:o}]})),toAttribute:r=>Object.entries(r).map(([i,{order:n,size:a}])=>[i,n,a].filter(o=>o!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:Hi,reflect:!0},loading:{type:String},priceLiterals:{type:Object}}),m(Ke,"styles",[Qs,...Zs()]),m(Ke,"registerVariant",V),m(Ke,"getCollectionOptions",xc),m(Ke,"getFragmentMapping",Oi);customElements.define(Ta,Ke);R();var rr,Wr=class extends ${constructor(){super();E(this,rr);this.defaults={},this.variant="plans"}saveContainerDefaultValues(){let r=this.closest(this.getAttribute("container")),i=r?.querySelector('[slot="description"]:not(merch-offer > *)')?.cloneNode(!0),n=r?.badgeText;return{description:i,badgeText:n}}getSlottedElement(r,i){return(i||this.closest(this.getAttribute("container"))).querySelector(`[slot="${r}"]:not(merch-offer > *)`)}updateSlot(r,i){let n=this.getSlottedElement(r,i);if(!n)return;let a=this.selectedOffer.getOptionValue(r)?this.selectedOffer.getOptionValue(r):this.defaults[r];a&&n.replaceWith(a.cloneNode(!0))}handleOfferSelection(r){let i=r.detail;this.selectOffer(i)}handleOfferSelectionByQuantity(r){let i=r.detail.option,n=Number.parseInt(i),a=this.findAppropriateOffer(n);this.selectOffer(a),this.getSlottedElement("cta").setAttribute("data-quantity",n)}selectOffer(r){if(!r)return;let i=this.selectedOffer;i&&(i.selected=!1),r.selected=!0,this.selectedOffer=r,this.planType=r.planType,this.updateContainer(),this.updateComplete.then(()=>{this.dispatchEvent(new CustomEvent(Yi,{detail:this,bubbles:!0}))})}findAppropriateOffer(r){let i=null;return this.offers.find(a=>{let o=Number.parseInt(a.getAttribute("value"));if(o===r)return!0;if(o>r)return!1;i=a})||i}updateBadgeText(r){this.selectedOffer.badgeText===""?r.badgeText=null:this.selectedOffer.badgeText?r.badgeText=this.selectedOffer.badgeText:r.badgeText=this.defaults.badgeText}updateContainer(){let r=this.closest(this.getAttribute("container"));!r||!this.selectedOffer||(this.updateSlot("cta",r),this.updateSlot("secondary-cta",r),this.updateSlot("price",r),!this.manageableMode&&(this.updateSlot("description",r),this.updateBadgeText(r)))}render(){return f``}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.handleFocusin),this.addEventListener("click",this.handleFocusin),this.addEventListener(_t,this.handleOfferSelectReady);let r=this.closest("merch-quantity-select");this.manageableMode=r,this.offers=[...this.querySelectorAll("merch-offer")],y(this,rr,this.handleOfferSelectionByQuantity.bind(this)),this.manageableMode?r.addEventListener(ae,h(this,rr)):this.defaults=this.saveContainerDefaultValues(),this.selectedOffer=this.offers[0],this.planType&&this.updateContainer()}get miniCompareMobileCard(){return this.merchCard?.variant==="mini-compare-chart"&&this.isMobile}get merchCard(){return this.closest("merch-card")}get isMobile(){return window.matchMedia("(max-width: 767px)").matches}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(ae,h(this,rr)),this.removeEventListener(_t,this.handleOfferSelectReady),this.removeEventListener("focusin",this.handleFocusin),this.removeEventListener("click",this.handleFocusin)}get price(){return this.querySelector('merch-offer[aria-selected] [is="inline-price"]')}get customerSegment(){return this.selectedOffer?.customerSegment}get marketSegment(){return this.selectedOffer?.marketSegment}handleFocusin(r){r.target?.nodeName==="MERCH-OFFER"&&(r.preventDefault(),r.stopImmediatePropagation(),this.selectOffer(r.target))}async handleOfferSelectReady(){this.planType||this.querySelector("merch-offer:not([plan-type])")||(this.planType=this.selectedOffer.planType,await this.updateComplete,this.selectOffer(this.selectedOffer??this.querySelector("merch-offer[aria-selected]")??this.querySelector("merch-offer")),this.dispatchEvent(new CustomEvent(lr,{bubbles:!0})))}};rr=new WeakMap,m(Wr,"styles",b`
+ `),m(jr,"properties",{heading:{type:String,attribute:!0},mobileRows:{type:Number,attribute:!0}});customElements.define("merch-whats-included",jr);var Eh="#000000",Aa="#F8D904",wh="#EAEAEA",Ah="#31A547",Sh=/(accent|primary|secondary)(-(outline|link))?/,_h="mas:product_code/",Th="daa-ll",Hi="daa-lh",Ch=["XL","L","M","S"],Sa="...";function be(e,t,r,i){let n=i[e];if(t[e]&&n){let a={slot:n?.slot,...n?.attributes},o=t[e];if(n.maxCount&&typeof o=="string"){let[c,l]=qh(o,n.maxCount,n.withSuffix);c!==o&&(a.title=l,o=c)}let s=de(n.tag,a,o);r.append(s)}}function kh(e,t,r){let i=e.mnemonicIcon?.map((a,o)=>({icon:a,alt:e.mnemonicAlt[o]??"",link:e.mnemonicLink[o]??""}));i?.forEach(({icon:a,alt:o,link:s})=>{if(s&&!/^https?:/.test(s))try{s=new URL(`https://${s}`).href.toString()}catch{s="#"}let c={slot:"icons",src:a,loading:t.loading,size:r?.size??"l"};o&&(c.alt=o),s&&(c.href=s);let l=de("merch-icon",c);t.append(l)});let n=t.shadowRoot.querySelector('slot[name="icons"]');n&&(n.style.display=i?.length?null:"none")}function Ph(e,t,r){if(r.badge?.slot){if(e.badge?.length&&!e.badge?.startsWith("${e.badge}`}be("badge",e,t,r)}else e.badge?(t.setAttribute("badge-text",e.badge),r.disabledAttributes?.includes("badgeColor")||t.setAttribute("badge-color",e.badgeColor||Eh),r.disabledAttributes?.includes("badgeBackgroundColor")||t.setAttribute("badge-background-color",e.badgeBackgroundColor||Aa),t.setAttribute("border-color",e.badgeBackgroundColor||Aa)):t.setAttribute("border-color",e.borderColor||wh)}function Lh(e,t,r){if(r.trialBadge&&e.trialBadge){if(!e.trialBadge.startsWith("${e.trialBadge}`}be("trialBadge",e,t,r)}}function Rh(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function Mh(e,t){e.cardName&&t.setAttribute("name",e.cardName)}function Oh(e,t,r){e.cardTitle&&(e.cardTitle=Zt(e.cardTitle)),be("cardTitle",e,t,{cardTitle:r})}function Nh(e,t,r){be("subtitle",e,t,r)}function Ih(e,t,r,i){if(!e.backgroundColor||e.backgroundColor.toLowerCase()==="default"){t.style.removeProperty("--merch-card-custom-background-color"),t.removeAttribute("background-color");return}r?.[e.backgroundColor]?(t.style.setProperty("--merch-card-custom-background-color",`var(${r[e.backgroundColor]})`),t.setAttribute("background-color",e.backgroundColor)):i?.attribute&&e.backgroundColor&&(t.setAttribute(i.attribute,e.backgroundColor),t.style.removeProperty("--merch-card-custom-background-color"))}function Dh(e,t,r){let i=r?.borderColor,n="--consonant-merch-card-border-color";if(e.borderColor?.toLowerCase()==="transparent")t.style.setProperty(n,"transparent");else if(e.borderColor&&i){let o=i?.specialValues?.[e.borderColor]?.includes("gradient")||/-gradient/.test(e.borderColor),s=/^spectrum-.*-plans$/.test(e.borderColor);if(o){t.setAttribute("gradient-border","true");let c=e.borderColor;if(i?.specialValues){for(let[l,d]of Object.entries(i.specialValues))if(d===e.borderColor){c=l;break}}t.setAttribute("border-color",c),t.style.removeProperty(n)}else s?(t.setAttribute("border-color",e.borderColor),t.style.setProperty(n,`var(--${e.borderColor})`)):t.style.setProperty(n,`var(--${e.borderColor})`)}}function zh(e,t,r){if(e.backgroundImage){let i={loading:t.loading??"lazy",src:e.backgroundImage};if(e.backgroundImageAltText?i.alt=e.backgroundImageAltText:i.role="none",!r)return;if(r?.attribute){t.setAttribute(r.attribute,e.backgroundImage);return}t.append(de(r.tag,{slot:r.slot},de("img",i)))}}function Zt(e){return!e||typeof e!="string"||e.includes("(Ri(),fa)).catch(console.error),e}function $h(e,t,r){e.prices&&(e.prices=Zt(e.prices)),be("prices",e,t,r)}function Mc(e,t,r){let i=e.hasAttribute("data-wcs-osi")&&!!e.getAttribute("data-wcs-osi"),n=e.className||"",a=Sh.exec(n)?.[0]??"accent",o=a.includes("accent"),s=a.includes("primary"),c=a.includes("secondary"),l=a.includes("-outline"),d=a.includes("-link");e.classList.remove("accent","primary","secondary");let p;if(t.consonant)p=Yh(e,o,i,d,s);else if(d)p=e;else{let u;o?u="accent":s?u="primary":c&&(u="secondary"),p=t.spectrum==="swc"?Wh(e,r,l,u,i):jh(e,r,l,u,i)}return p}function Hh(e,t){let{slot:r}=t?.description,i=e.querySelectorAll(`[slot="${r}"] a[data-wcs-osi]`);i.length&&i.forEach(n=>{let a=Mc(n,e,t);n.replaceWith(a)})}function Bh(e,t,r){e.description&&(e.description=Zt(e.description)),e.promoText&&(e.promoText=Zt(e.promoText)),e.shortDescription&&(e.shortDescription=Zt(e.shortDescription)),be("promoText",e,t,r),be("description",e,t,r),be("shortDescription",e,t,r),e.shortDescription&&(t.setAttribute("action-menu","true"),e.actionMenuLabel||t.setAttribute("action-menu-label","More options")),Hh(t,r),be("callout",e,t,r),be("quantitySelect",e,t,r),be("whatsIncluded",e,t,r)}function Uh(e,t,r){if(!r.addon)return;let i=e.addon?.replace(/[{}]/g,"");if(!i||/disabled/.test(i))return;let n=de("merch-addon",{slot:"addon"},i);[...n.querySelectorAll(H)].forEach(a=>{let o=a.parentElement;o?.nodeName==="P"&&o.setAttribute("data-plan-type","")}),t.append(n)}function Fh(e,t,r){e.addonConfirmation&&be("addonConfirmation",e,t,r)}function Gh(e,t,r,i){i?.secureLabel&&r?.secureLabel&&t.setAttribute("secure-label",i.secureLabel)}function qh(e,t,r=!0){try{let i=typeof e!="string"?"":e,n=Rc(i);if(n.length<=t)return[i,n];let a=0,o=!1,s=r?t-Sa.length<1?1:t-Sa.length:t,c=[];for(let p of i){if(a++,p==="<")if(o=!0,i[a]==="/")c.pop();else{let u="";for(let g of i.substring(a)){if(g===" "||g===">")break;u+=g}c.push(u)}if(p==="/"&&i[a]===">"&&c.pop(),p===">"){o=!1;continue}if(!o&&(s--,s===0))break}let l=i.substring(0,a).trim();if(c.length>0){c[0]==="p"&&c.shift();for(let p of c.reverse())l+=`${p}>`}return[`${l}${r?Sa:""}`,n]}catch{let n=typeof e=="string"?e:"",a=Rc(n);return[n,a]}}function Rc(e){if(!e)return"";let t="",r=!1;for(let i of e){if(i==="<"&&(r=!0),i===">"){r=!1;continue}r||(t+=i)}return t}function Vh(e,t){t.querySelectorAll("a.upt-link").forEach(i=>{let n=je.createFrom(i);i.replaceWith(n),n.initializeWcsData(e.osi,e.promoCode)})}function jh(e,t,r,i,n){let a=e;n?a=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML):a.innerHTML=`${a.textContent}`,a.setAttribute("tabindex",0);for(let d of e.attributes)["class","is"].includes(d.name)||a.setAttribute(d.name,d.value);a.firstElementChild?.classList.add("spectrum-Button-label");let o=t?.ctas?.size??"M",s=`spectrum-Button--${i}`,c=Ch.includes(o)?`spectrum-Button--size${o}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),a.classList.add(...l),a}function Wh(e,t,r,i,n){let a=e;n&&(a=customElements.get("checkout-button").createCheckoutButton(e.dataset),a.connectedCallback(),a.render());let o="fill";r&&(o="outline");let s=de("sp-button",{treatment:o,variant:i,tabIndex:0,size:t?.ctas?.size??"m",...e.dataset.analyticsId&&{"data-analytics-id":e.dataset.analyticsId}},e.innerHTML);return s.source=a,(n?a.onceSettled():Promise.resolve(a)).then(c=>{s.setAttribute("data-navigation-url",c.href)}),s.addEventListener("click",c=>{c.defaultPrevented||a.click()}),s}function Yh(e,t,r,i,n){let a=e;return r&&(a=customElements.get("checkout-link").createCheckoutLink(e.dataset,e.innerHTML)),i||(a.classList.add("button","con-button"),t&&a.classList.add("blue"),n&&a.classList.add("primary")),a}function Xh(e,t,r,i){if(e.ctas){e.ctas=Zt(e.ctas);let{slot:n}=r.ctas,a=de("div",{slot:n},e.ctas),o=[...a.querySelectorAll("a")].map(s=>Mc(s,t,r));a.innerHTML="",a.append(...o),t.append(a)}}function Kh(e,t){let{tags:r}=e,i=r?.find(a=>a.startsWith(_h))?.split("/").pop();if(!i)return;t.setAttribute(Hi,i),[...t.shadowRoot.querySelectorAll("a[data-analytics-id],button[data-analytics-id]"),...t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]")].forEach((a,o)=>{a.setAttribute(Th,`${a.dataset.analyticsId}-${o+1}`)})}function Qh(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(i=>{i.classList.remove(t),i.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}function Zh(e){e.querySelectorAll("[slot]").forEach(i=>{i.remove()}),e.variant=void 0,["checkbox-label","stock-offer-osis","secure-label","background-image","background-color","border-color","badge-background-color","badge-color","badge-text","gradient-border","size",Hi].forEach(i=>e.removeAttribute(i));let r=["wide-strip","thin-strip"];e.classList.remove(...r)}async function Oc(e,t){if(!e){let c=t?.id||"unknown";throw console.error(`hydrate: Fragment is undefined. Cannot hydrate card (merchCard id: ${c}).`),new Error(`hydrate: Fragment is undefined for card (merchCard id: ${c}).`)}if(!e.fields){let c=e.id||"unknown",l=t?.id||"unknown";throw console.error(`hydrate: Fragment for card ID '${c}' (merchCard id: ${l}) is missing 'fields'. Cannot hydrate.`),new Error(`hydrate: Fragment for card ID '${c}' (merchCard id: ${l}) is missing 'fields'.`)}let{id:r,fields:i,settings:n={},priceLiterals:a}=e,{variant:o}=i;if(!o)throw new Error(`hydrate: no variant found in payload ${r}`);Zh(t),t.settings=n,a&&(t.priceLiterals=a),t.id??(t.id=e.id),t.variant=o,await t.updateComplete;let{aemFragmentMapping:s}=t.variantLayout;if(!s)throw new Error(`hydrate: variant mapping not found for ${r}`);s.style==="consonant"&&t.setAttribute("consonant",!0),kh(i,t,s.mnemonics),Ph(i,t,s),Lh(i,t,s),Rh(i,t,s.size),Mh(i,t),Oh(i,t,s.title),Nh(i,t,s),$h(i,t,s),zh(i,t,s.backgroundImage),Ih(i,t,s.allowedColors,s.backgroundColor),Dh(i,t,s),Bh(i,t,s),Uh(i,t,s),Fh(i,t,s),Gh(i,t,s,n),Vh(i,t),Xh(i,t,s,o),Kh(i,t),Qh(t)}var Ta="merch-card",_a=2e4,Nc="merch-card:",Jh=["full-pricing-express","simplified-pricing-express"];function Ic(e,t){let r=e.closest(Ta);if(!r)return t;r.priceLiterals&&(t.literals??(t.literals={}),Object.assign(t.literals,r.priceLiterals)),r.aemFragment&&(t[we]=!0),r.variantLayout?.priceOptionsProvider?.(e,t)}function ep(e){e.providers.has(Ic)||e.providers.price(Ic)}var Dc=new IntersectionObserver(e=>{e.forEach(t=>{t.target.clientHeight!==0&&(Dc.unobserve(t.target),t.target.requestUpdate())})}),tp=0,Jt,er,tr,Be,Et,Me,wt,ee,yt,Bi,zc,Ui,Ke=class extends ${constructor(){super();E(this,ee);E(this,Jt);E(this,er);E(this,tr);E(this,Be);E(this,Et);E(this,Me);E(this,wt,new Promise(r=>{y(this,Me,r)}));m(this,"customerSegment");m(this,"marketSegment");m(this,"variantLayout");this.id=null,this.failed=!1,this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.loading="lazy",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this),this.handleMerchOfferSelectReady=this.handleMerchOfferSelectReady.bind(this)}firstUpdated(){this.variantLayout=ba(this),this.variantLayout?.connectedCallbackHook()}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout?.disconnectedCallbackHook(),this.variantLayout=ba(this),this.variantLayout?.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),r.has("backgroundColor")&&this.style.setProperty("--merch-card-custom-background-color",this.backgroundColor?`var(--${this.backgroundColor})`:"");try{this.variantLayoutPromise=this.variantLayout?.postCardUpdateHook(r)}catch(i){te(this,ee,yt).call(this,`Error in postCardUpdateHook: ${i.message}`,{},!1)}}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["ccd-slice","ccd-suggested","ah-promoted-plans","simplified-pricing-express","full-pricing-express"].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 descriptionSlot(){return this.shadowRoot.querySelector('slot[name="body-xs"')?.assignedElements()[0]}get descriptionSlotCompare(){return this.shadowRoot.querySelector('slot[name="body-m"')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector(H)}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll(ye)??[]]}get checkoutLinksDescription(){return[...this.descriptionSlot?.querySelectorAll(ye)??[]]}get checkoutLinkDescriptionCompare(){return[...this.descriptionSlotCompare?.querySelectorAll(ye)??[]]}get activeDescriptionLinks(){return this.variant==="mini-compare-chart"?this.checkoutLinkDescriptionCompare:this.checkoutLinksDescription}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let i=this.checkoutLinks;if(i.length!==0)for(let n of i){await n.onceSettled();let a=n.value?.[0]?.planType;if(!a)return;let o=this.stockOfferOsis[a];if(!o)return;let s=n.dataset.wcsOsi.split(",").filter(c=>c!==o);r.checked&&s.push(o),n.dataset.wcsOsi=s.join(",")}}changeHandler(r){r.target.tagName==="MERCH-ADDON"&&this.toggleAddon(r.target)}toggleAddon(r){this.variantLayout?.toggleAddon?.(r);let i=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(i.length===0)return;let n=a=>{let{offerType:o,planType:s}=a.value?.[0]??{};if(!o||!s)return;let c=r.getOsi(s,o),l=(a.dataset.wcsOsi||"").split(",").filter(d=>d&&d!==c);r.checked&&l.push(c),a.dataset.wcsOsi=l.join(",")};i.forEach(n)}handleQuantitySelection(r){let i=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(i.length!==0)for(let n of i)n.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 i={...this.filters};Object.keys(i).forEach(n=>{if(r){i[n].order=Math.min(i[n].order||2,2);return}let a=i[n].order;a===1||isNaN(a)||(i[n].order=Number(a)+1)}),this.filters=i}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){var i;super.connectedCallback(),h(this,er)||y(this,er,tp++),this.aemFragment||((i=h(this,Me))==null||i.call(this),y(this,Me,void 0)),this.id??(this.id=this.getAttribute("id")??this.aemFragment?.getAttribute("fragment"));let r=this.id??h(this,er);y(this,Et,`${Nc}${r}${nt}`),y(this,Jt,`${Nc}${r}${at}`),performance.mark(h(this,Et)),y(this,Be,dt()),ep(h(this,Be)),y(this,tr,h(this,Be).Log.module(Ta)),this.addEventListener(ae,this.handleQuantitySelection),this.addEventListener(Jr,this.handleAddonAndQuantityUpdate),this.addEventListener(lr,this.handleMerchOfferSelectReady),this.addEventListener(rt,this.handleAemFragmentEvents),this.addEventListener(tt,this.handleAemFragmentEvents),this.addEventListener("change",this.changeHandler),this.variantLayout&&this.variantLayout.connectedCallbackHook(),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(ae,this.handleQuantitySelection),this.removeEventListener(rt,this.handleAemFragmentEvents),this.removeEventListener(tt,this.handleAemFragmentEvents),this.removeEventListener("change",this.changeHandler),this.removeEventListener(Jr,this.handleAddonAndQuantityUpdate)}async handleAemFragmentEvents(r){var i;if(this.isConnected&&(r.type===rt&&te(this,ee,yt).call(this,"AEM fragment cannot be loaded"),r.type===tt&&(this.failed=!1,r.target.nodeName==="AEM-FRAGMENT"))){let n=r.detail;try{h(this,Me)||y(this,wt,new Promise(a=>{y(this,Me,a)})),Oc(n,this)}catch(a){te(this,ee,yt).call(this,`hydration has failed: ${a.message}`)}finally{(i=h(this,Me))==null||i.call(this),y(this,Me,void 0)}this.checkReady()}}async checkReady(){if(!this.isConnected)return;h(this,wt)&&(await h(this,wt),Jh.includes(this.variantLayout)&&Dc.observe(this),y(this,wt,void 0)),this.variantLayoutPromise&&(await this.variantLayoutPromise,this.variantLayoutPromise=void 0);let r=new Promise(o=>setTimeout(()=>o("timeout"),_a));if(this.aemFragment){let o=await Promise.race([this.aemFragment.updateComplete,r]);if(o===!1||o==="timeout"){let s=o==="timeout"?`AEM fragment was not resolved within ${_a} timeout`:"AEM fragment cannot be loaded";te(this,ee,yt).call(this,s,{},!1);return}}let i=[...this.querySelectorAll(cr)],n=Promise.all(i.map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(s=>s.classList.contains("placeholder-resolved"))),a=await Promise.race([n,r]);if(a===!0){this.measure=performance.measure(h(this,Jt),h(this,Et));let o={...this.aemFragment?.fetchInfo,...h(this,Be).duration,measure:Le(this.measure)};return this.dispatchEvent(new CustomEvent(Xi,{bubbles:!0,composed:!0,detail:o})),this}else{this.measure=performance.measure(h(this,Jt),h(this,Et));let o={measure:Le(this.measure),...h(this,Be).duration};a==="timeout"?te(this,ee,yt).call(this,`Contains offers that were not resolved within ${_a} timeout`,o):te(this,ee,yt).call(this,"Contains unresolved offers",o)}}get aemFragment(){return this.querySelector("aem-fragment")}get addon(){return this.querySelector("merch-addon")}get quantitySelect(){return this.querySelector("merch-quantity-select")}get addonCheckbox(){return this.querySelector("merch-addon")}displayFooterElementsInColumn(){if(!this.classList.contains("product"))return;let r=this.shadowRoot.querySelector(".secure-transaction-label");(this.footerSlot?.querySelectorAll(ye)).length===2&&r&&r.parentElement.classList.add("footer-column")}handleMerchOfferSelectReady(){this.offerSelect&&!this.offerSelect.planType||this.displayFooterElementsInColumn()}get dynamicPrice(){return this.querySelector('[slot="price"]')}handleAddonAndQuantityUpdate({detail:{id:r,items:i}}){if(!r||!i?.length||this.closest('[role="tabpanel"][hidden="true"]'))return;let a=this.checkoutLinks.find(d=>d.getAttribute("data-modal-id")===r);if(!a)return;let s=new URL(a.getAttribute("href")).searchParams.get("pa"),c=i.find(d=>d.productArrangementCode===s)?.quantity,l=!!i.find(d=>d.productArrangementCode!==s);if(c&&this.quantitySelect?.dispatchEvent(new CustomEvent(Tt,{detail:{quantity:c},bubbles:!0,composed:!0})),this.addonCheckbox&&this.addonCheckbox.checked!==l){this.toggleStockOffer({target:this.addonCheckbox});let d=new Event("change",{bubbles:!0,cancelable:!0});Object.defineProperty(d,"target",{writable:!1,value:{checked:l}}),this.addonCheckbox.handleChange(d)}}get prices(){return Array.from(this.querySelectorAll(H))}get promoPrice(){if(!this.querySelector("span.price-strikethrough"))return;let r=this.querySelector(".price.price-alternative");if(r||(r=this.querySelector(`${H}[data-template="price"] > span`)),!!r)return r=r.innerText,r}get regularPrice(){return h(this,ee,Bi)?.innerText}get promotionCode(){let r=[...this.querySelectorAll(`${H}[data-promotion-code],${ye}[data-promotion-code]`)].map(n=>n.dataset.promotionCode),i=[...new Set(r)];return i.length>1&&h(this,tr)?.warn(`Multiple different promotion codes found: ${i.join(", ")}`),r[0]}get annualPrice(){return this.querySelector(`${H}[data-template="price"] > .price.price-annual`)?.innerText}get promoText(){}get taxText(){return(h(this,ee,zc)??h(this,ee,Bi))?.querySelector("span.price-tax-inclusivity")?.textContent?.trim()||void 0}get recurrenceText(){return h(this,ee,Bi)?.querySelector("span.price-recurrence")?.textContent?.trim()}get planTypeText(){return this.querySelector('[is="inline-price"][data-template="legal"] span.price-plan-type')?.textContent?.trim()}get seeTermsInfo(){let r=this.querySelector('a[is="upt-link"]');if(r)return te(this,ee,Ui).call(this,r)}get renewalText(){return this.querySelector("span.renewal-text")?.textContent?.trim()}get promoDurationText(){return this.querySelector("span.promo-duration-text")?.textContent?.trim()}get ctas(){let r=this.querySelector('[slot="ctas"], [slot="footer"]')?.querySelectorAll(`${ye}, a`);return Array.from(r??[])}get primaryCta(){return te(this,ee,Ui).call(this,this.ctas.find(r=>r.variant==="accent"||r.matches(".spectrum-Button--accent,.con-button.blue")))}get secondaryCta(){return te(this,ee,Ui).call(this,this.ctas.find(r=>r.variant!=="accent"&&!r.matches(".spectrum-Button--accent,.con-button.blue")))}};Jt=new WeakMap,er=new WeakMap,tr=new WeakMap,Be=new WeakMap,Et=new WeakMap,Me=new WeakMap,wt=new WeakMap,ee=new WeakSet,yt=function(r,i={},n=!0){if(!this.isConnected)return;let o=this.aemFragment?.getAttribute("fragment");o=`[${o}]`;let s={...this.aemFragment.fetchInfo,...h(this,Be).duration,...i,message:r};h(this,tr).error(`merch-card${o}: ${r}`,s),this.failed=!0,n&&this.dispatchEvent(new CustomEvent(Ki,{bubbles:!0,composed:!0,detail:s}))},Bi=function(){return this.querySelector("span.price-strikethrough")??this.querySelector(`${H}[data-template="price"] > span`)},zc=function(){return this.querySelector(`${H}[data-template="legal"]`)},Ui=function(r){if(r)return{text:r.innerText.trim(),analyticsId:r.dataset.analyticsId,href:r.getAttribute("href")??r.dataset.href}},m(Ke,"properties",{id:{type:String,attribute:"id",reflect:!0},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},backgroundColor:{type:String,attribute:"background-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"},actionMenuLabel:{type:String,attribute:"action-menu-label"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},failed:{type:Boolean,attribute:"failed",reflect:!0},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},addonTitle:{type:String,attribute:"addon-title"},addonOffers:{type:Object,attribute:"addon-offers"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0},settings:{type:Object,attribute:!1},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{if(!r)return;let[i,n,a]=r.split(",");return{PUF:i,ABM:n,M2M:a}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(i=>{let[n,a,o]=i.split(":"),s=Number(a);return[n,{order:isNaN(s)?void 0:s,size:o}]})),toAttribute:r=>Object.entries(r).map(([i,{order:n,size:a}])=>[i,n,a].filter(o=>o!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:Hi,reflect:!0},loading:{type:String},priceLiterals:{type:Object}}),m(Ke,"styles",[Qs,...Zs()]),m(Ke,"registerVariant",V),m(Ke,"getCollectionOptions",bc),m(Ke,"getFragmentMapping",Oi);customElements.define(Ta,Ke);R();var rr,Wr=class extends ${constructor(){super();E(this,rr);this.defaults={},this.variant="plans"}saveContainerDefaultValues(){let r=this.closest(this.getAttribute("container")),i=r?.querySelector('[slot="description"]:not(merch-offer > *)')?.cloneNode(!0),n=r?.badgeText;return{description:i,badgeText:n}}getSlottedElement(r,i){return(i||this.closest(this.getAttribute("container"))).querySelector(`[slot="${r}"]:not(merch-offer > *)`)}updateSlot(r,i){let n=this.getSlottedElement(r,i);if(!n)return;let a=this.selectedOffer.getOptionValue(r)?this.selectedOffer.getOptionValue(r):this.defaults[r];a&&n.replaceWith(a.cloneNode(!0))}handleOfferSelection(r){let i=r.detail;this.selectOffer(i)}handleOfferSelectionByQuantity(r){let i=r.detail.option,n=Number.parseInt(i),a=this.findAppropriateOffer(n);this.selectOffer(a),this.getSlottedElement("cta").setAttribute("data-quantity",n)}selectOffer(r){if(!r)return;let i=this.selectedOffer;i&&(i.selected=!1),r.selected=!0,this.selectedOffer=r,this.planType=r.planType,this.updateContainer(),this.updateComplete.then(()=>{this.dispatchEvent(new CustomEvent(Yi,{detail:this,bubbles:!0}))})}findAppropriateOffer(r){let i=null;return this.offers.find(a=>{let o=Number.parseInt(a.getAttribute("value"));if(o===r)return!0;if(o>r)return!1;i=a})||i}updateBadgeText(r){this.selectedOffer.badgeText===""?r.badgeText=null:this.selectedOffer.badgeText?r.badgeText=this.selectedOffer.badgeText:r.badgeText=this.defaults.badgeText}updateContainer(){let r=this.closest(this.getAttribute("container"));!r||!this.selectedOffer||(this.updateSlot("cta",r),this.updateSlot("secondary-cta",r),this.updateSlot("price",r),!this.manageableMode&&(this.updateSlot("description",r),this.updateBadgeText(r)))}render(){return f``}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.handleFocusin),this.addEventListener("click",this.handleFocusin),this.addEventListener(_t,this.handleOfferSelectReady);let r=this.closest("merch-quantity-select");this.manageableMode=r,this.offers=[...this.querySelectorAll("merch-offer")],y(this,rr,this.handleOfferSelectionByQuantity.bind(this)),this.manageableMode?r.addEventListener(ae,h(this,rr)):this.defaults=this.saveContainerDefaultValues(),this.selectedOffer=this.offers[0],this.planType&&this.updateContainer()}get miniCompareMobileCard(){return this.merchCard?.variant==="mini-compare-chart"&&this.isMobile}get merchCard(){return this.closest("merch-card")}get isMobile(){return window.matchMedia("(max-width: 767px)").matches}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(ae,h(this,rr)),this.removeEventListener(_t,this.handleOfferSelectReady),this.removeEventListener("focusin",this.handleFocusin),this.removeEventListener("click",this.handleFocusin)}get price(){return this.querySelector('merch-offer[aria-selected] [is="inline-price"]')}get customerSegment(){return this.selectedOffer?.customerSegment}get marketSegment(){return this.selectedOffer?.marketSegment}handleFocusin(r){r.target?.nodeName==="MERCH-OFFER"&&(r.preventDefault(),r.stopImmediatePropagation(),this.selectOffer(r.target))}async handleOfferSelectReady(){this.planType||this.querySelector("merch-offer:not([plan-type])")||(this.planType=this.selectedOffer.planType,await this.updateComplete,this.selectOffer(this.selectedOffer??this.querySelector("merch-offer[aria-selected]")??this.querySelector("merch-offer")),this.dispatchEvent(new CustomEvent(lr,{bubbles:!0})))}};rr=new WeakMap,m(Wr,"styles",b`
:host {
display: inline-block;
}
@@ -6464,7 +6464,7 @@ merch-card [slot='callout-content'] .icon-button::before {
flex-direction: column;
gap: var(--consonant-merch-spacing-xs);
}
- `),m(Wr,"properties",{offers:{type:Array},selectedOffer:{type:Object},defaults:{type:Object},variant:{type:String,attribute:"variant",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0},stock:{type:Boolean,reflect:!0}});customElements.define("merch-offer-select",Wr);R();R();var Dc=b`
+ `),m(Wr,"properties",{offers:{type:Array},selectedOffer:{type:Object},defaults:{type:Object},variant:{type:String,attribute:"variant",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0},stock:{type:Boolean,reflect:!0}});customElements.define("merch-offer-select",Wr);R();R();var $c=b`
:host {
--merch-radio: rgba(82, 88, 228);
--merch-radio-hover: rgba(64, 70, 202);
@@ -6675,7 +6675,7 @@ merch-card [slot='callout-content'] .icon-button::before {
position: relative;
height: 40px;
}
-`;var Jh="merch-offer",Yr=class extends ${constructor(){super();m(this,"tr");this.type="radio",this.selected=!1}getOptionValue(r){return this.querySelector(`[slot="${r}"]`)}connectedCallback(){super.connectedCallback(),this.initOffer(),this.configuration=this.closest("quantity-selector"),!this.hasAttribute("tabindex")&&!this.configuration&&(this.tabIndex=0),!this.hasAttribute("role")&&!this.configuration&&(this.role="radio")}get asRadioOption(){return f`
+`;var rp="merch-offer",Yr=class extends ${constructor(){super();m(this,"tr");this.type="radio",this.selected=!1}getOptionValue(r){return this.querySelector(`[slot="${r}"]`)}connectedCallback(){super.connectedCallback(),this.initOffer(),this.configuration=this.closest("quantity-selector"),!this.hasAttribute("tabindex")&&!this.configuration&&(this.tabIndex=0),!this.hasAttribute("role")&&!this.configuration&&(this.role="radio")}get asRadioOption(){return f`
${this.text}
@@ -6692,7 +6692,7 @@ merch-card [slot='callout-content'] .icon-button::before {
>
-
`}render(){return this.configuration||!this.price?"":this.type==="subscription-option"?this.asSubscriptionOption:this.asRadioOption}get price(){return this.querySelector('span[is="inline-price"]:not([data-template="strikethrough"])')}get cta(){return this.querySelector(ye)}get prices(){return this.querySelectorAll('span[is="inline-price"]')}get customerSegment(){return this.price?.value?.[0].customerSegment}get marketSegment(){return this.price?.value?.[0].marketSegments[0]}async initOffer(){if(!this.price)return;this.prices.forEach(i=>i.setAttribute("slot","price")),await this.updateComplete,await Promise.all([...this.prices].map(i=>i.onceSettled()));let{value:[r]}=this.price;this.planType=r.planType,await this.updateComplete,this.dispatchEvent(new CustomEvent(_t,{bubbles:!0}))}};m(Yr,"properties",{text:{type:String},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},badgeText:{type:String,attribute:"badge-text"},type:{type:String,attribute:"type",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0}}),m(Yr,"styles",[Dc]);customElements.define(Jh,Yr);R();R();var zc=b`
+
`}render(){return this.configuration||!this.price?"":this.type==="subscription-option"?this.asSubscriptionOption:this.asRadioOption}get price(){return this.querySelector('span[is="inline-price"]:not([data-template="strikethrough"])')}get cta(){return this.querySelector(ye)}get prices(){return this.querySelectorAll('span[is="inline-price"]')}get customerSegment(){return this.price?.value?.[0].customerSegment}get marketSegment(){return this.price?.value?.[0].marketSegments[0]}async initOffer(){if(!this.price)return;this.prices.forEach(i=>i.setAttribute("slot","price")),await this.updateComplete,await Promise.all([...this.prices].map(i=>i.onceSettled()));let{value:[r]}=this.price;this.planType=r.planType,await this.updateComplete,this.dispatchEvent(new CustomEvent(_t,{bubbles:!0}))}};m(Yr,"properties",{text:{type:String},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},badgeText:{type:String,attribute:"badge-text"},type:{type:String,attribute:"type",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0}}),m(Yr,"styles",[$c]);customElements.define(rp,Yr);R();R();var Hc=b`
:host {
box-sizing: border-box;
--background-color: var(--qs-background-color, #f6f6f6);
@@ -6847,7 +6847,7 @@ merch-card [slot='callout-content'] .icon-button::before {
background-position: right 7px center;
background-repeat: no-repeat;
}
-`;var[rb,ib,Ca,ka,$c,Hc]=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter","Tab"];var Pa=class extends ${static get properties(){return{closed:{type:Boolean,reflect:!0},selected:{type:Number},min:{type:Number},max:{type:Number},step:{type:Number},maxInput:{type:Number,attribute:"max-input"},options:{type:Array},highlightedIndex:{type:Number},defaultValue:{type:Number,attribute:"default-value",reflect:!0},title:{type:String}}}static get styles(){return zc}constructor(){super(),this.options=[],this.title="",this.closed=!0,this.min=0,this.max=0,this.step=0,this.maxInput=void 0,this.defaultValue=void 0,this.selectedValue=0,this.highlightedIndex=0,this.toggleMenu=this.toggleMenu.bind(this),this.closeMenu=this.closeMenu.bind(this),this.openMenu=this.openMenu.bind(this),this.handleClickOutside=this.handleClickOutside.bind(this),this.boundKeydownListener=this.handleKeydown.bind(this),this.handleKeyupDebounced=Tr(this.handleKeyup.bind(this),500),this.debouncedQuantityUpdate=Tr(this.handleQuantityUpdate.bind(this),500)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.boundKeydownListener),window.addEventListener("mousedown",this.handleClickOutside),this.addEventListener(Tt,this.debouncedQuantityUpdate)}get button(){return this.shadowRoot.querySelector("button")}handleKeyup(t){t.key===ka||t.key===Ca||(this.handleInput(),this.sendEvent())}selectValue(){if(!this.closed){let t=this.options[this.highlightedIndex];if(!t){this.closed=!0;return}this.selectedValue=t,this.handleMenuOption(this.selectedValue),this.closed=!0}}handleKeydown(t){switch(t.key){case" ":this.selectValue();break;case"Escape":this.closed=!0;break;case Hc:this.selectValue();break;case ka:this.closed?this.openMenu():this.highlightedIndex=(this.highlightedIndex+1)%this.options.length,t.preventDefault();break;case Ca:this.closed||(this.highlightedIndex=(this.highlightedIndex-1+this.options.length)%this.options.length),t.preventDefault();break;case $c:this.selectValue(),this.button.classList.contains("focused")&&t.preventDefault();break}t.composedPath().includes(this)&&t.stopPropagation()}adjustInput(t,r){this.selectedValue=r,t.value=r,this.highlightedIndex=this.options.indexOf(r)}handleInput(){let t=this.shadowRoot.querySelector(".text-field-input"),r=t.value.replace(/\D/g,"");t.value=r;let i=parseInt(r);if(!isNaN(i))if(i>0&&i!==this.selectedValue){let n=i;this.maxInput&&i>this.maxInput&&(n=this.maxInput),this.min&&n0)for(let r=this.min;r<=this.max;r+=this.step)t.push(r);return t}update(t){(t.has("min")||t.has("max")||t.has("step")||t.has("defaultValue"))&&(this.options=this.generateOptionsArray(),this.highlightedIndex=this.defaultValue?this.options.indexOf(this.defaultValue):0,this.handleMenuOption(this.defaultValue?this.defaultValue:this.options[0])),super.update(t)}handleClickOutside(t){t.composedPath().includes(this)||this.closeMenu()}toggleMenu(){this.closed=!this.closed,this.adjustPopoverPlacement(),this.closed&&(this.highlightedIndex=this.options.indexOf(this.selectedValue))}closeMenu(){this.closed=!0,this.highlightedIndex=this.options.indexOf(this.selectedValue)}openMenu(){this.closed=!1,this.adjustPopoverPlacement()}adjustPopoverPlacement(){let t=this.shadowRoot.querySelector(".popover");this.closed||t.getBoundingClientRect().bottom<=window.innerHeight?t.setAttribute("placement","bottom"):t.setAttribute("placement","top")}handleMouseEnter(t){this.highlightedIndex=t}handleMenuOption(t,r){t===this.max&&this.shadowRoot.querySelector(".text-field-input")?.focus(),this.selectedValue=t,this.sendEvent(),r&&this.closeMenu()}sendEvent(){let t=new CustomEvent(ae,{detail:{option:this.selectedValue},bubbles:!0});this.dispatchEvent(t)}get offerSelect(){return this.querySelector("merch-offer-select")}get popover(){return f` 0&&i!==this.selectedValue){let n=i;this.maxInput&&i>this.maxInput&&(n=this.maxInput),this.min&&n
0)for(let r=this.min;r<=this.max;r+=this.step)t.push(r);return t}update(t){(t.has("min")||t.has("max")||t.has("step")||t.has("defaultValue"))&&(this.options=this.generateOptionsArray(),this.highlightedIndex=this.defaultValue?this.options.indexOf(this.defaultValue):0,this.handleMenuOption(this.defaultValue?this.defaultValue:this.options[0])),super.update(t)}handleClickOutside(t){t.composedPath().includes(this)||this.closeMenu()}toggleMenu(){this.closed=!this.closed,this.adjustPopoverPlacement(),this.closed&&(this.highlightedIndex=this.options.indexOf(this.selectedValue))}closeMenu(){this.closed=!0,this.highlightedIndex=this.options.indexOf(this.selectedValue)}openMenu(){this.closed=!1,this.adjustPopoverPlacement()}adjustPopoverPlacement(){let t=this.shadowRoot.querySelector(".popover");this.closed||t.getBoundingClientRect().bottom<=window.innerHeight?t.setAttribute("placement","bottom"):t.setAttribute("placement","top")}handleMouseEnter(t){this.highlightedIndex=t}handleMenuOption(t,r){t===this.max&&this.shadowRoot.querySelector(".text-field-input")?.focus(),this.selectedValue=t,this.sendEvent(),r&&this.closeMenu()}sendEvent(){let t=new CustomEvent(ae,{detail:{option:this.selectedValue},bubbles:!0});this.dispatchEvent(t)}get offerSelect(){return this.querySelector("merch-offer-select")}get popover(){return f`
${this.popover}
- `}};customElements.define("merch-quantity-select",Pa);Ri();R();var Bc=`
+ `}};customElements.define("merch-quantity-select",Pa);Ri();R();var Fc=`
merch-card[variant="ccd-suggested"] [slot="heading-xs"] {
font-size: var(--consonant-merch-card-heading-xxs-font-size);
@@ -6931,7 +6931,7 @@ merch-card [slot='callout-content'] .icon-button::before {
.spectrum--darkest merch-card[variant="ccd-suggested"]:hover {
--consonant-merch-card-border-color:rgb(73, 73, 73);
}
-`;var Uc={backgroundImage:{attribute:"background-image"},badge:!0,ctas:{slot:"cta",size:"M"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},prices:{tag:"p",slot:"price"},size:[],subtitle:{tag:"h4",slot:"detail-s"},title:{tag:"h3",slot:"heading-xs"}},ir=class extends T{getGlobalCSS(){return Bc}get stripStyle(){return this.card.backgroundImage?`
+`;var Gc={backgroundImage:{attribute:"background-image"},badge:!0,ctas:{slot:"cta",size:"M"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},prices:{tag:"p",slot:"price"},size:[],subtitle:{tag:"h4",slot:"detail-s"},title:{tag:"h3",slot:"heading-xs"}},ir=class extends T{getGlobalCSS(){return Fc}get stripStyle(){return this.card.backgroundImage?`
background: url("${this.card.backgroundImage}");
background-size: auto 100%;
background-repeat: no-repeat;
@@ -7061,7 +7061,7 @@ merch-card [slot='callout-content'] .icon-button::before {
:host([variant='ccd-suggested']) .top-section {
align-items: center;
}
- `);R();var Fc=`
+ `);R();var qc=`
merch-card[variant="ccd-slice"] [slot='image'] img {
overflow: hidden;
@@ -7086,7 +7086,7 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link {
--consonant-merch-card-border-color:rgb(48, 48, 48);
--consonant-merch-card-detail-s-color:rgb(235, 235, 235);
}
-`;var Gc={backgroundImage:{tag:"div",slot:"image"},badge:!0,ctas:{slot:"footer",size:"S"},description:{tag:"div",slot:"body-s"},mnemonics:{size:"m"},size:["wide"]},nr=class extends T{getGlobalCSS(){return Fc}renderLayout(){return f`
+`;var Vc={backgroundImage:{tag:"div",slot:"image"},badge:!0,ctas:{slot:"footer",size:"S"},description:{tag:"div",slot:"body-s"},mnemonics:{size:"m"},size:["wide"]},nr=class extends T{getGlobalCSS(){return qc}renderLayout(){return f`
${this.badge}
@@ -7197,7 +7197,7 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link {
align-items: center;
gap: 8px;
}
- `);R();var qc=`
+ `);R();var jc=`
merch-card[variant="ah-try-buy-widget"] [slot="body-xxs"] {
letter-spacing: normal;
margin-bottom: 16px;
@@ -7340,7 +7340,7 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link {
.spectrum--darkest merch-card[variant="ah-try-buy-widget"]:hover {
--consonant-merch-card-border-color:rgb(73, 73, 73);
}
-`;var La={mnemonics:{size:"s"},title:{tag:"h3",slot:"heading-xxxs",maxCount:40,withSuffix:!0},badge:{tag:"div",slot:"badge",default:"fuchsia"},allowedBadgeColors:["fuchsia"],description:{tag:"div",slot:"body-xxs",maxCount:200,withSuffix:!1},prices:{tag:"p",slot:"price"},ctas:{slot:"cta",size:"S"},backgroundImage:{tag:"div",slot:"image"},backgroundColor:{attribute:"background-color"},borderColor:{attribute:"border-color",specialValues:{}},allowedColors:{gray:"--spectrum-gray-100"},size:["single","double","triple"]},ar=class extends T{getGlobalCSS(){return qc}get aemFragmentMapping(){return La}renderLayout(){return f`
+`;var La={mnemonics:{size:"s"},title:{tag:"h3",slot:"heading-xxxs",maxCount:40,withSuffix:!0},badge:{tag:"div",slot:"badge",default:"fuchsia"},allowedBadgeColors:["fuchsia"],description:{tag:"div",slot:"body-xxs",maxCount:200,withSuffix:!1},prices:{tag:"p",slot:"price"},ctas:{slot:"cta",size:"S"},backgroundImage:{tag:"div",slot:"image"},backgroundColor:{attribute:"background-color"},borderColor:{attribute:"border-color",specialValues:{}},allowedColors:{gray:"--spectrum-gray-100"},size:["single","double","triple"]},ar=class extends T{getGlobalCSS(){return jc}get aemFragmentMapping(){return La}renderLayout(){return f`
- ${this.secureLabelFooter}`}};l(Ee,"variantStyle",Mi`
+ ${this.secureLabelFooter}`}};l(Ee,"variantStyle",Oi`
:host([variant='segment']) {
min-height: 214px;
}
:host([variant='segment']) ::slotted([slot='heading-xs']) {
max-width: var(--consonant-merch-card-heading-xs-max-width, 100%);
}
- `);import{html as Tt,css as Ri}from"./lit-all.min.js";var zr=`
+ `);import{html as Tt,css as Ni}from"./lit-all.min.js";var zr=`
:root {
--consonant-merch-card-special-offers-width: 378px;
}
@@ -3541,7 +3541,7 @@ merch-card[variant="special-offers"] span[is="inline-price"][data-template="stri
${this.secureLabelFooter}
`}
-
`}};l(ke,"variantStyle",Ri`
+
`}};l(ke,"variantStyle",Ni`
:host([variant='special-offers']) {
min-height: 439px;
}
@@ -3553,7 +3553,7 @@ merch-card[variant="special-offers"] span[is="inline-price"][data-template="stri
:host([variant='special-offers'].center) {
text-align: center;
}
- `);import{html as Oi,css as Ni}from"./lit-all.min.js";var Pr=`
+ `);import{html as Di,css as $i}from"./lit-all.min.js";var Pr=`
:root {
--merch-card-simplified-pricing-express-width: 311px;
}
@@ -3901,7 +3901,7 @@ merch-card[variant="simplified-pricing-express"] [slot="cta"] button.spectrum-Bu
merch-card[variant="simplified-pricing-express"] [slot="cta"] a.spectrum-Button.spectrum-Button--accent .spectrum-Button-label {
color: var(--spectrum-white, #ffffff);
}
-`;var Lt={title:{tag:"h3",slot:"heading-xs",maxCount:250,withSuffix:!0},badge:{tag:"div",slot:"badge",default:"spectrum-blue-400"},allowedBadgeColors:["spectrum-blue-400","spectrum-gray-300","spectrum-yellow-300","gradient-purple-blue","gradient-firefly-spectrum"],description:{tag:"div",slot:"body-xs",maxCount:2e3,withSuffix:!1},prices:{tag:"div",slot:"price"},ctas:{slot:"cta",size:"XL"},borderColor:{attribute:"border-color",specialValues:{gray:"var(--spectrum-gray-300)",blue:"var(--spectrum-blue-400)","gradient-purple-blue":"linear-gradient(96deg, #B539C8 0%, #7155FA 66%, #3B63FB 100%)","gradient-firefly-spectrum":"linear-gradient(96deg, #D73220 0%, #D92361 33%, #7155FA 100%)"}},disabledAttributes:["badgeColor","badgeBorderColor","trialBadgeColor","trialBadgeBorderColor"],supportsDefaultChild:!0},Se=class extends x{getGlobalCSS(){return Pr}get aemFragmentMapping(){return Lt}get headingSelector(){return'[slot="heading-xs"]'}syncHeights(){if(this.card.getBoundingClientRect().width===0)return;let t=this.card.querySelector('[slot="body-xs"]');t&&this.updateCardElementMinHeight(t,"description");let e=this.card.querySelector('[slot="price"]');e&&this.updateCardElementMinHeight(e,"price")}async postCardUpdateHook(){if(this.card.isConnected&&(await this.card.updateComplete,this.card.prices?.length&&await Promise.all(this.card.prices.map(t=>t.onceSettled?.())),Oe())){let t=this.getContainer();if(!t)return;let e=`--consonant-merch-card-${this.card.variant}`,r=t.style.getPropertyValue(`${e}-description-height`);requestAnimationFrame(r?()=>{this.syncHeights()}:()=>{t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`).forEach(n=>n.variantLayout?.syncHeights?.())})}}connectedCallbackHook(){!this.card||this.card.failed||(this.setupAccordion(),this.card?.hasAttribute("data-default-card")&&!Oe()&&this.card.setAttribute("data-expanded","true"))}setupAccordion(){let t=this.card;if(!t)return;let e=()=>{if(Oe())t.removeAttribute("data-expanded");else{let a=t.hasAttribute("data-default-card");t.setAttribute("data-expanded",a?"true":"false")}};e();let r=window.matchMedia(A);this.mediaQueryListener=()=>{e()},r.addEventListener("change",this.mediaQueryListener)}disconnectedCallbackHook(){this.mediaQueryListener&&window.matchMedia(A).removeEventListener("change",this.mediaQueryListener)}handleChevronClick(t){t.preventDefault(),t.stopPropagation();let e=this.card;if(!e||Oe())return;let n=e.getAttribute("data-expanded")==="true"?"false":"true";e.setAttribute("data-expanded",n)}renderLayout(){return Oi`
+`;var Lt={title:{tag:"h3",slot:"heading-xs",maxCount:250,withSuffix:!0},badge:{tag:"div",slot:"badge",default:"spectrum-blue-400"},allowedBadgeColors:["spectrum-blue-400","spectrum-gray-300","spectrum-yellow-300","gradient-purple-blue","gradient-firefly-spectrum"],description:{tag:"div",slot:"body-xs",maxCount:2e3,withSuffix:!1},prices:{tag:"div",slot:"price"},ctas:{slot:"cta",size:"XL"},borderColor:{attribute:"border-color",specialValues:{gray:"var(--spectrum-gray-300)",blue:"var(--spectrum-blue-400)","gradient-purple-blue":"linear-gradient(96deg, #B539C8 0%, #7155FA 66%, #3B63FB 100%)","gradient-firefly-spectrum":"linear-gradient(96deg, #D73220 0%, #D92361 33%, #7155FA 100%)"}},disabledAttributes:["badgeColor","badgeBorderColor","trialBadgeColor","trialBadgeBorderColor"],supportsDefaultChild:!0},Se=class extends x{getGlobalCSS(){return Pr}get aemFragmentMapping(){return Lt}get headingSelector(){return'[slot="heading-xs"]'}syncHeights(){if(this.card.getBoundingClientRect().width===0)return;let t=this.card.querySelector('[slot="body-xs"]');t&&this.updateCardElementMinHeight(t,"description");let e=this.card.querySelector('[slot="price"]');e&&this.updateCardElementMinHeight(e,"price")}async postCardUpdateHook(){if(this.card.isConnected&&(await this.card.updateComplete,this.card.prices?.length&&await Promise.all(this.card.prices.map(t=>t.onceSettled?.())),Oe())){let t=this.getContainer();if(!t)return;let e=`--consonant-merch-card-${this.card.variant}`,r=t.style.getPropertyValue(`${e}-description-height`);requestAnimationFrame(r?()=>{this.syncHeights()}:()=>{t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`).forEach(n=>n.variantLayout?.syncHeights?.())})}}connectedCallbackHook(){!this.card||this.card.failed||(this.setupAccordion(),this.card?.hasAttribute("data-default-card")&&!Oe()&&this.card.setAttribute("data-expanded","true"))}setupAccordion(){let t=this.card;if(!t)return;let e=()=>{if(Oe())t.removeAttribute("data-expanded");else{let a=t.hasAttribute("data-default-card");t.setAttribute("data-expanded",a?"true":"false")}};e();let r=window.matchMedia(A);this.mediaQueryListener=()=>{e()},r.addEventListener("change",this.mediaQueryListener)}disconnectedCallbackHook(){this.mediaQueryListener&&window.matchMedia(A).removeEventListener("change",this.mediaQueryListener)}handleChevronClick(t){t.preventDefault(),t.stopPropagation();let e=this.card;if(!e||Oe())return;let n=e.getAttribute("data-expanded")==="true"?"false":"true";e.setAttribute("data-expanded",n)}renderLayout(){return Di`
@@ -3939,7 +3939,7 @@ merch-card[variant="simplified-pricing-express"] [slot="cta"] a.spectrum-Button.
- `}};l(Se,"variantStyle",Ni`
+ `}};l(Se,"variantStyle",$i`
:host([variant='simplified-pricing-express']) {
--merch-card-simplified-pricing-express-width: 365px;
--merch-card-simplified-pricing-express-padding: 24px;
@@ -4294,7 +4294,7 @@ merch-card[variant="simplified-pricing-express"] [slot="cta"] a.spectrum-Button.
padding: 16px 16px 35px 16px;
}
}
- `);import{html as Di,css as $i}from"./lit-all.min.js";var Mr=`
+ `);import{html as Ii,css as Fi}from"./lit-all.min.js";var Mr=`
:root {
--merch-card-full-pricing-express-width: 378px;
--merch-card-full-pricing-express-mobile-width: 365px;
@@ -4759,7 +4759,7 @@ merch-card[variant="full-pricing-express"] mas-tooltip {
margin-bottom: 0;
}
}
-`;var zt={title:{tag:"h3",slot:"heading-xs",maxCount:250,withSuffix:!0},badge:{tag:"div",slot:"badge",default:"spectrum-blue-400"},allowedBadgeColors:["spectrum-blue-400","spectrum-gray-300","spectrum-yellow-300","gradient-purple-blue","gradient-firefly-spectrum"],description:{tag:"div",slot:"body-s",maxCount:2e3,withSuffix:!1},shortDescription:{tag:"div",slot:"short-description",maxCount:3e3,withSuffix:!1},prices:{tag:"div",slot:"price"},trialBadge:{tag:"div",slot:"trial-badge"},ctas:{slot:"cta",size:"XL"},mnemonics:{size:"l"},borderColor:{attribute:"border-color",specialValues:{gray:"var(--spectrum-gray-300)",blue:"var(--spectrum-blue-400)","gradient-purple-blue":"linear-gradient(96deg, #B539C8 0%, #7155FA 66%, #3B63FB 100%)","gradient-firefly-spectrum":"linear-gradient(96deg, #D73220 0%, #D92361 33%, #7155FA 100%)"}},disabledAttributes:[]},Ae=class extends x{getGlobalCSS(){return Mr}get aemFragmentMapping(){return zt}get headingSelector(){return'[slot="heading-xs"]'}syncHeights(){if(this.card.getBoundingClientRect().width<=2)return;let t=this.card.querySelector('[slot="short-description"]');t&&this.updateCardElementMinHeight(t,"short-description");let e=this.card.querySelector('[slot="price"]');e&&this.updateCardElementMinHeight(e,"price");let r=this.card.querySelector('[slot="cta"]');r&&this.updateCardElementMinHeight(r,"cta")}async postCardUpdateHook(){if(this.card.isConnected&&(await this.card.updateComplete,await Promise.all(this.card.prices.map(t=>t.onceSettled())),window.matchMedia("(min-width: 1025px)").matches)){let t=this.getContainer();if(!t)return;let e=`--consonant-merch-card-${this.card.variant}`,r=t.style.getPropertyValue(`${e}-price-height`);requestAnimationFrame(r?()=>{this.syncHeights()}:()=>{t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`).forEach(n=>n.variantLayout?.syncHeights?.())})}}renderLayout(){return Di`
+`;var zt={title:{tag:"h3",slot:"heading-xs",maxCount:250,withSuffix:!0},badge:{tag:"div",slot:"badge",default:"spectrum-blue-400"},allowedBadgeColors:["spectrum-blue-400","spectrum-gray-300","spectrum-yellow-300","gradient-purple-blue","gradient-firefly-spectrum"],description:{tag:"div",slot:"body-s",maxCount:2e3,withSuffix:!1},shortDescription:{tag:"div",slot:"short-description",maxCount:3e3,withSuffix:!1},prices:{tag:"div",slot:"price"},trialBadge:{tag:"div",slot:"trial-badge"},ctas:{slot:"cta",size:"XL"},mnemonics:{size:"l"},borderColor:{attribute:"border-color",specialValues:{gray:"var(--spectrum-gray-300)",blue:"var(--spectrum-blue-400)","gradient-purple-blue":"linear-gradient(96deg, #B539C8 0%, #7155FA 66%, #3B63FB 100%)","gradient-firefly-spectrum":"linear-gradient(96deg, #D73220 0%, #D92361 33%, #7155FA 100%)"}},disabledAttributes:[]},Ae=class extends x{getGlobalCSS(){return Mr}get aemFragmentMapping(){return zt}get headingSelector(){return'[slot="heading-xs"]'}syncHeights(){if(this.card.getBoundingClientRect().width<=2)return;let t=this.card.querySelector('[slot="short-description"]');t&&this.updateCardElementMinHeight(t,"short-description");let e=this.card.querySelector('[slot="price"]');e&&this.updateCardElementMinHeight(e,"price");let r=this.card.querySelector('[slot="cta"]');r&&this.updateCardElementMinHeight(r,"cta")}async postCardUpdateHook(){if(this.card.isConnected&&(await this.card.updateComplete,await Promise.all(this.card.prices.map(t=>t.onceSettled())),window.matchMedia("(min-width: 1025px)").matches)){let t=this.getContainer();if(!t)return;let e=`--consonant-merch-card-${this.card.variant}`,r=t.style.getPropertyValue(`${e}-price-height`);requestAnimationFrame(r?()=>{this.syncHeights()}:()=>{t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`).forEach(n=>n.variantLayout?.syncHeights?.())})}}renderLayout(){return Ii`
@@ -4783,7 +4783,7 @@ merch-card[variant="full-pricing-express"] mas-tooltip {
- `}};l(Ae,"variantStyle",$i`
+ `}};l(Ae,"variantStyle",Fi`
:host([variant='full-pricing-express']) {
/* CSS Variables */
--merch-card-full-pricing-express-width: 437px;
@@ -5078,7 +5078,7 @@ merch-card[variant="full-pricing-express"] mas-tooltip {
margin-bottom: 24px;
}
}
- `);import{css as Ii,html as Fi}from"./lit-all.min.js";var Rr=`
+ `);import{css as Bi,html as Hi}from"./lit-all.min.js";var Rr=`
merch-card[variant="mini"] {
color: var(--spectrum-body-color);
width: 400px;
@@ -5111,7 +5111,7 @@ merch-card[variant="mini"] span.promo-duration-text,
merch-card[variant="mini"] span.renewal-text {
display: block;
}
-`;var Or={title:{tag:"p",slot:"title"},prices:{tag:"p",slot:"prices"},description:{tag:"p",slot:"description"},planType:!0,ctas:{slot:"ctas",size:"S"}},Ce=class extends x{constructor(){super(...arguments);l(this,"legal")}async postCardUpdateHook(){await this.card.updateComplete,this.adjustLegal()}getGlobalCSS(){return Rr}get headingSelector(){return'[slot="title"]'}priceOptionsProvider(e,r){r.literals={...r.literals,strikethroughAriaLabel:"",alternativePriceAriaLabel:""},r.space=!0,r.displayAnnual=this.card.settings?.displayAnnual??!1}adjustLegal(){if(this.legal!==void 0)return;let e=this.card.querySelector(`${y}[data-template="price"]`);if(!e)return;let r=e.cloneNode(!0);this.legal=r,e.dataset.displayTax="false",r.dataset.template="legal",r.dataset.displayPlanType=this.card?.settings?.displayPlanType??!0,r.setAttribute("slot","legal"),this.card.appendChild(r)}renderLayout(){return Fi`
+`;var Or={title:{tag:"p",slot:"title"},prices:{tag:"p",slot:"prices"},description:{tag:"p",slot:"description"},planType:!0,ctas:{slot:"ctas",size:"S"}},Ce=class extends x{constructor(){super(...arguments);l(this,"legal")}async postCardUpdateHook(){await this.card.updateComplete,this.adjustLegal()}getGlobalCSS(){return Rr}get headingSelector(){return'[slot="title"]'}priceOptionsProvider(e,r){r.literals={...r.literals,strikethroughAriaLabel:"",alternativePriceAriaLabel:""},r.space=!0,r.displayAnnual=this.card.settings?.displayAnnual??!1}adjustLegal(){if(this.legal!==void 0)return;let e=this.card.querySelector(`${y}[data-template="price"]`);if(!e)return;let r=e.cloneNode(!0);this.legal=r,e.dataset.displayTax="false",r.dataset.template="legal",r.dataset.displayPlanType=this.card?.settings?.displayPlanType??!0,r.setAttribute("slot","legal"),this.card.appendChild(r)}renderLayout(){return Hi`
${this.badge}
@@ -5120,14 +5120,14 @@ merch-card[variant="mini"] span.renewal-text {
- `}};l(Ce,"variantStyle",Ii`
+ `}};l(Ce,"variantStyle",Bi`
:host([variant='mini']) {
min-width: 209px;
min-height: 103px;
background-color: var(--spectrum-background-base-color);
border: 1px solid var(--consonant-merch-card-border-color, #dadada);
}
- `);var lt=new Map,C=(i,t,e=null,r=null,a)=>{lt.set(i,{class:t,fragmentMapping:e,style:r,collectionOptions:a})};C("catalog",ve,ur,ve.variantStyle);C("image",at);C("inline-heading",nt);C("mini-compare-chart",ye,null,ye.variantStyle);C("plans",z,st,z.variantStyle,z.collectionOptions);C("plans-students",z,kr,z.variantStyle,z.collectionOptions);C("plans-education",z,Er,z.variantStyle,z.collectionOptions);C("plans-v2",Y,Cr,Y.variantStyle,Y.collectionOptions);C("product",we,null,we.variantStyle);C("segment",Ee,null,Ee.variantStyle);C("special-offers",ke,_r,ke.variantStyle);C("simplified-pricing-express",Se,Lt,Se.variantStyle);C("full-pricing-express",Ae,zt,Ae.variantStyle);C("mini",Ce,Or,Ce.variantStyle);var _t=i=>{let t=lt.get(i.variant);if(!t)return;let{class:e,style:r}=t;if(r)try{let a=new CSSStyleSheet;a.replaceSync(r.cssText),i.shadowRoot.adoptedStyleSheets.push(a)}catch{let n=document.createElement("style");n.textContent=r.cssText,i.shadowRoot.appendChild(n)}return new e(i)};function it(i){return lt.get(i)?.fragmentMapping}function Nr(i){return lt.get(i)?.collectionOptions}var Dr=document.createElement("style");Dr.innerHTML=`
+ `);var lt=new Map,Nr=new WeakMap,Dr=new Map,C=(i,t,e=null,r=null,a)=>{lt.set(i,{class:t,fragmentMapping:e,style:r,collectionOptions:a})};C("catalog",ve,ur,ve.variantStyle);C("image",at);C("inline-heading",nt);C("mini-compare-chart",ye,null,ye.variantStyle);C("plans",z,st,z.variantStyle,z.collectionOptions);C("plans-students",z,kr,z.variantStyle,z.collectionOptions);C("plans-education",z,Er,z.variantStyle,z.collectionOptions);C("plans-v2",Y,Cr,Y.variantStyle,Y.collectionOptions);C("product",we,null,we.variantStyle);C("segment",Ee,null,Ee.variantStyle);C("special-offers",ke,_r,ke.variantStyle);C("simplified-pricing-express",Se,Lt,Se.variantStyle);C("full-pricing-express",Ae,zt,Ae.variantStyle);C("mini",Ce,Or,Ce.variantStyle);var qi=(i,t,e)=>{try{let r=Dr.get(i.variant);if(r||(r=new CSSStyleSheet,r.replaceSync(t.cssText),Dr.set(i.variant,r)),e?.styleSheet&&e.styleSheet!==r){let a=i.shadowRoot.adoptedStyleSheets.indexOf(e.styleSheet);a!==-1&&i.shadowRoot.adoptedStyleSheets.splice(a,1)}return i.shadowRoot.adoptedStyleSheets.includes(r)||i.shadowRoot.adoptedStyleSheets.push(r),{styleSheet:r}}catch{let a=document.createElement("style");a.textContent=t.cssText,a.setAttribute("data-variant-style",i.variant);let n=e?.styleElement||i.shadowRoot.querySelector("[data-variant-style]");return n&&n.remove(),i.shadowRoot.appendChild(a),{styleElement:a}}},_t=i=>{let t=lt.get(i.variant);if(!t)return;let{class:e,style:r}=t,a=Nr.get(i);if(a?.appliedVariant===i.variant)return new e(i);let n=r?qi(i,r,a):{};return Nr.set(i,{appliedVariant:i.variant,...n}),new e(i)};function it(i){return lt.get(i)?.fragmentMapping}function $r(i){return lt.get(i)?.collectionOptions}var Ir=document.createElement("style");Ir.innerHTML=`
:root {
--consonant-merch-card-detail-font-size: 12px;
--consonant-merch-card-detail-font-weight: 500;
@@ -5863,8 +5863,8 @@ merch-card [slot='callout-content'] .icon-button::before {
}
}
-`;document.head.appendChild(Dr);function dt(i,t={},{metadata:e=!0,search:r=!0,storage:a=!0}={}){let n;if(r&&n==null){let o=new URLSearchParams(window.location.search),s=Pt(r)?r:i;n=o.get(s)}if(a&&n==null){let o=Pt(a)?a:i;n=window.sessionStorage.getItem(o)??window.localStorage.getItem(o)}if(e&&n==null){let o=Hi(Pt(e)?e:i);n=document.documentElement.querySelector(`meta[name="${o}"]`)?.content}return n??t[i]}var Bi=i=>typeof i=="boolean",pt=i=>typeof i=="function";var Pt=i=>typeof i=="string";function $r(i,t){if(Bi(i))return i;let e=String(i);return e==="1"||e==="true"?!0:e==="0"||e==="false"?!1:t}function Hi(i=""){return String(i).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,e,r)=>`${e}-${r}`).replace(/\W+/gu,"-").toLowerCase()}var te=class i extends Error{constructor(t,e,r){if(super(t,{cause:r}),this.name="MasError",e.response){let a=e.response.headers?.get(Xe);a&&(e.requestId=a),e.response.status&&(e.status=e.response.status,e.statusText=e.response.statusText),e.response.url&&(e.url=e.response.url)}delete e.response,this.context=e,Error.captureStackTrace&&Error.captureStackTrace(this,i)}toString(){let t=Object.entries(this.context||{}).map(([r,a])=>`${r}: ${JSON.stringify(a)}`).join(", "),e=`${this.name}: ${this.message}`;return t&&(e+=` (${t})`),this.cause&&(e+=`
-Caused by: ${this.cause}`),e}};var qi="mas-commerce-service",Ui={requestId:Xe,etag:"Etag",lastModified:"Last-Modified",serverTiming:"server-timing"};var ht=i=>window.setTimeout(i);function Mt(){return document.getElementsByTagName(qi)?.[0]}function Ir(i){let t={};if(!i?.headers)return t;let e=i.headers;for(let[r,a]of Object.entries(Ui)){let n=e.get(a);n&&(n=n.replace(/[,;]/g,"|"),n=n.replace(/[| ]+/g,"|"),t[r]=n)}return t}async function Fr(i,t={},e=2,r=100){let a;for(let n=0;n<=e;n++)try{let o=await fetch(i,t);return o.retryCount=n,o}catch(o){if(a=o,a.retryCount=n,n>e)break;await new Promise(s=>setTimeout(s,r*(n+1)))}throw a}var Br="fragment",Hr="author",qr="preview",Ur="loading",jr="timeout",Rt="aem-fragment",Gr="eager",Vr="cache",ji=[Gr,Vr],I,re,O,Ot=class{constructor(){g(this,I,new Map);g(this,re,new Map);g(this,O,new Map)}clear(){c(this,I).clear(),c(this,re).clear(),c(this,O).clear()}add(t,e=!0){if(!this.has(t.id)&&!this.has(t.fields?.originalId)){if(c(this,I).set(t.id,t),t.fields?.originalId&&c(this,I).set(t.fields.originalId,t),c(this,O).has(t.id)){let[,r]=c(this,O).get(t.id);r()}if(c(this,O).has(t.fields?.originalId)){let[,r]=c(this,O).get(t.fields?.originalId);r()}if(!(!e||typeof t.references!="object"||Array.isArray(t.references)))for(let r in t.references){let{type:a,value:n}=t.references[r];a==="content-fragment"&&(n.settings={...t?.settings,...n.settings},n.placeholders={...t?.placeholders,...n.placeholders},n.dictionary={...t?.dictionary,...n.dictionary},n.priceLiterals={...t?.priceLiterals,...n.priceLiterals},this.add(n,t))}}}has(t){return c(this,I).has(t)}entries(){return c(this,I).entries()}get(t){return c(this,I).get(t)}getAsPromise(t){let[e]=c(this,O).get(t)??[];if(e)return e;let r;return e=new Promise(a=>{r=a,this.has(t)&&a()}),c(this,O).set(t,[e,r]),e}getFetchInfo(t){let e=c(this,re).get(t);return e||(e={url:null,retryCount:0,stale:!1,measure:null,status:null},c(this,re).set(t,e)),e}remove(t){c(this,I).delete(t),c(this,re).delete(t),c(this,O).delete(t)}};I=new WeakMap,re=new WeakMap,O=new WeakMap;var K=new Ot,Te,N,q,M,_,E,Ue,je,D,Ge,Ve,Le,$,Yr,Kr,Nt,Wr,mt=class extends HTMLElement{constructor(){super(...arguments);g(this,$);l(this,"cache",K);g(this,Te);g(this,N,null);g(this,q,null);g(this,M,null);g(this,_);g(this,E);g(this,Ue,Gr);g(this,je,5e3);g(this,D);g(this,Ge,!1);g(this,Ve,0);g(this,Le)}static get observedAttributes(){return[Br,Ur,jr,Hr,qr]}attributeChangedCallback(e,r,a){e===Br&&(m(this,_,a),m(this,E,K.getFetchInfo(a))),e===Ur&&ji.includes(a)&&m(this,Ue,a),e===jr&&m(this,je,parseInt(a,10)),e===Hr&&m(this,Ge,["","true"].includes(a)),e===qr&&m(this,Le,a)}connectedCallback(){if(!c(this,D)){if(c(this,M)??m(this,M,J(this)),m(this,Le,c(this,M).settings?.preview),c(this,Te)??m(this,Te,c(this,M).log.module(`${Rt}[${c(this,_)}]`)),!c(this,_)||c(this,_)==="#"){c(this,E)??m(this,E,K.getFetchInfo("missing-fragment-id")),S(this,$,Nt).call(this,"Missing fragment id");return}this.refresh(!1)}}get fetchInfo(){return Object.fromEntries(Object.entries(c(this,E)).filter(([e,r])=>r!=null).map(([e,r])=>[`aem-fragment:${e}`,r]))}async refresh(e=!0){if(c(this,D)&&!await Promise.race([c(this,D),Promise.resolve(!1)]))return;e&&K.remove(c(this,_)),c(this,Ue)===Vr&&await Promise.race([K.getAsPromise(c(this,_)),new Promise(s=>setTimeout(s,c(this,je)))]);try{m(this,D,S(this,$,Wr).call(this)),await c(this,D)}catch(s){return S(this,$,Nt).call(this,s.message),!1}let{references:r,referencesTree:a,placeholders:n,wcs:o}=c(this,N)||{};return o&&!dt("mas.disableWcsCache")&&c(this,M).prefillWcsCache(o),this.dispatchEvent(new CustomEvent(he,{detail:{...this.data,references:r,referencesTree:a,placeholders:n,...c(this,E)},bubbles:!0,composed:!0})),c(this,D)}get updateComplete(){return c(this,D)??Promise.reject(new Error("AEM fragment cannot be loaded"))}get data(){return c(this,q)?c(this,q):(c(this,Ge)?this.transformAuthorData():this.transformPublishData(),c(this,q))}get rawData(){return c(this,N)}transformAuthorData(){let{fields:e,id:r,tags:a,settings:n={},priceLiterals:o={},dictionary:s={},placeholders:d={}}=c(this,N);m(this,q,e.reduce((h,{name:p,multiple:b,values:P})=>(h.fields[p]=b?P:P[0],h),{fields:{},id:r,tags:a,settings:n,priceLiterals:o,dictionary:s,placeholders:d}))}transformPublishData(){let{fields:e,id:r,tags:a,settings:n={},priceLiterals:o={},dictionary:s={},placeholders:d={}}=c(this,N);m(this,q,Object.entries(e).reduce((h,[p,b])=>(h.fields[p]=b?.mimeType?b.value:b??"",h),{fields:{},id:r,tags:a,settings:n,priceLiterals:o,dictionary:s,placeholders:d}))}getFragmentClientUrl(){let r=new URLSearchParams(window.location.search).get("maslibs");if(!r||r.trim()==="")return"https://mas.adobe.com/studio/libs/fragment-client.js";let a=r.trim().toLowerCase();if(a==="local")return"http://localhost:3030/studio/libs/fragment-client.js";let{hostname:n}=window.location,o=n.endsWith(".page")?"page":"live";return a.includes("--")?`https://${a}.aem.${o}/studio/libs/fragment-client.js`:`https://${a}--mas--adobecom.aem.${o}/studio/libs/fragment-client.js`}async generatePreview(){let e=this.getFragmentClientUrl(),{previewFragment:r}=await import(e);return await r(c(this,_),{locale:c(this,M).settings.locale,apiKey:c(this,M).settings.wcsApiKey})}};Te=new WeakMap,N=new WeakMap,q=new WeakMap,M=new WeakMap,_=new WeakMap,E=new WeakMap,Ue=new WeakMap,je=new WeakMap,D=new WeakMap,Ge=new WeakMap,Ve=new WeakMap,Le=new WeakMap,$=new WeakSet,Yr=async function(e){Kt(this,Ve)._++;let r=`${Rt}:${c(this,_)}:${c(this,Ve)}`,a=`${r}${Ze}`,n=`${r}${Je}`;if(c(this,Le))return await this.generatePreview();performance.mark(a);let o;try{if(c(this,E).stale=!1,c(this,E).url=e,o=await Fr(e,{cache:"default",credentials:"omit"}),S(this,$,Kr).call(this,o),c(this,E).status=o?.status,c(this,E).measure=ge(performance.measure(n,a)),c(this,E).retryCount=o.retryCount,!o?.ok)throw new te("Unexpected fragment response",{response:o,...c(this,M).duration});return await o.json()}catch(s){if(c(this,E).measure=ge(performance.measure(n,a)),c(this,E).retryCount=s.retryCount,c(this,N))return c(this,E).stale=!0,c(this,Te).error("Serving stale data",c(this,E)),c(this,N);let d=s.message??"unknown";throw new te(`Failed to fetch fragment: ${d}`,{})}},Kr=function(e){Object.assign(c(this,E),Ir(e))},Nt=function(e){m(this,D,null),c(this,E).message=e,this.classList.add("error");let r={...c(this,E),...c(this,M).duration};c(this,Te).error(e,r),this.dispatchEvent(new CustomEvent(me,{detail:r,bubbles:!0,composed:!0}))},Wr=async function(){var d;this.classList.remove("error"),m(this,q,null);let e=K.get(c(this,_));if(e)return m(this,N,e),!0;let{masIOUrl:r,wcsApiKey:a,country:n,locale:o}=c(this,M).settings,s=`${r}/fragment?id=${c(this,_)}&api_key=${a}&locale=${o}`;return n&&!o.endsWith(`_${n}`)&&(s+=`&country=${n}`),e=await S(this,$,Yr).call(this,s),(d=e.fields).originalId??(d.originalId=c(this,_)),K.add(e),m(this,N,e),!0},l(mt,"cache",K);customElements.define(Rt,mt);import{LitElement as Gi,html as Vi,css as Yi}from"./lit-all.min.js";var ze=class extends Gi{constructor(){super(),this.color="",this.variant="",this.backgroundColor="",this.borderColor="",this.text=this.textContent}connectedCallback(){this.borderColor&&this.borderColor!=="Transparent"?this.style.setProperty("--merch-badge-border",`1px solid var(--${this.borderColor})`):this.style.setProperty("--merch-badge-border",`1px solid var(--${this.backgroundColor})`),this.style.setProperty("--merch-badge-background-color",`var(--${this.backgroundColor})`),this.style.setProperty("--merch-badge-color",this.color),this.style.setProperty("--merch-badge-padding","2px 10px 3px 10px"),this.style.setProperty("--merch-badge-border-radius","4px 0 0 4px"),this.style.setProperty("--merch-badge-font-size","var(--consonant-merch-card-body-xs-font-size)"),this.textContent="";let t=this.closest("merch-card"),e=t?.getAttribute("size"),r=t?.querySelectorAll(":scope > merch-icon").length||0;this.style.setProperty("--merch-badge-offset",r),this.style.setProperty("--merch-badge-with-offset",r?1:0),this.style.setProperty("--merch-badge-card-size",e?2:1),super.connectedCallback()}render(){return Vi`${this.text}
`}};l(ze,"properties",{color:{type:String},variant:{type:String},backgroundColor:{type:String,attribute:"background-color"},borderColor:{type:String,attribute:"border-color"}}),l(ze,"styles",Yi`
+`;document.head.appendChild(Ir);function dt(i,t={},{metadata:e=!0,search:r=!0,storage:a=!0}={}){let n;if(r&&n==null){let o=new URLSearchParams(window.location.search),s=Pt(r)?r:i;n=o.get(s)}if(a&&n==null){let o=Pt(a)?a:i;n=window.sessionStorage.getItem(o)??window.localStorage.getItem(o)}if(e&&n==null){let o=ji(Pt(e)?e:i);n=document.documentElement.querySelector(`meta[name="${o}"]`)?.content}return n??t[i]}var Ui=i=>typeof i=="boolean",pt=i=>typeof i=="function";var Pt=i=>typeof i=="string";function Fr(i,t){if(Ui(i))return i;let e=String(i);return e==="1"||e==="true"?!0:e==="0"||e==="false"?!1:t}function ji(i=""){return String(i).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,e,r)=>`${e}-${r}`).replace(/\W+/gu,"-").toLowerCase()}var te=class i extends Error{constructor(t,e,r){if(super(t,{cause:r}),this.name="MasError",e.response){let a=e.response.headers?.get(Xe);a&&(e.requestId=a),e.response.status&&(e.status=e.response.status,e.statusText=e.response.statusText),e.response.url&&(e.url=e.response.url)}delete e.response,this.context=e,Error.captureStackTrace&&Error.captureStackTrace(this,i)}toString(){let t=Object.entries(this.context||{}).map(([r,a])=>`${r}: ${JSON.stringify(a)}`).join(", "),e=`${this.name}: ${this.message}`;return t&&(e+=` (${t})`),this.cause&&(e+=`
+Caused by: ${this.cause}`),e}};var Gi="mas-commerce-service",Vi={requestId:Xe,etag:"Etag",lastModified:"Last-Modified",serverTiming:"server-timing"};var ht=i=>window.setTimeout(i);function Mt(){return document.getElementsByTagName(Gi)?.[0]}function Br(i){let t={};if(!i?.headers)return t;let e=i.headers;for(let[r,a]of Object.entries(Vi)){let n=e.get(a);n&&(n=n.replace(/[,;]/g,"|"),n=n.replace(/[| ]+/g,"|"),t[r]=n)}return t}async function Hr(i,t={},e=2,r=100){let a;for(let n=0;n<=e;n++)try{let o=await fetch(i,t);return o.retryCount=n,o}catch(o){if(a=o,a.retryCount=n,n>e)break;await new Promise(s=>setTimeout(s,r*(n+1)))}throw a}var qr="fragment",Ur="author",jr="preview",Gr="loading",Vr="timeout",Rt="aem-fragment",Yr="eager",Kr="cache",Yi=[Yr,Kr],I,re,O,Ot=class{constructor(){g(this,I,new Map);g(this,re,new Map);g(this,O,new Map)}clear(){c(this,I).clear(),c(this,re).clear(),c(this,O).clear()}add(t,e=!0){if(!this.has(t.id)&&!this.has(t.fields?.originalId)){if(c(this,I).set(t.id,t),t.fields?.originalId&&c(this,I).set(t.fields.originalId,t),c(this,O).has(t.id)){let[,r]=c(this,O).get(t.id);r()}if(c(this,O).has(t.fields?.originalId)){let[,r]=c(this,O).get(t.fields?.originalId);r()}if(!(!e||typeof t.references!="object"||Array.isArray(t.references)))for(let r in t.references){let{type:a,value:n}=t.references[r];a==="content-fragment"&&(n.settings={...t?.settings,...n.settings},n.placeholders={...t?.placeholders,...n.placeholders},n.dictionary={...t?.dictionary,...n.dictionary},n.priceLiterals={...t?.priceLiterals,...n.priceLiterals},this.add(n,t))}}}has(t){return c(this,I).has(t)}entries(){return c(this,I).entries()}get(t){return c(this,I).get(t)}getAsPromise(t){let[e]=c(this,O).get(t)??[];if(e)return e;let r;return e=new Promise(a=>{r=a,this.has(t)&&a()}),c(this,O).set(t,[e,r]),e}getFetchInfo(t){let e=c(this,re).get(t);return e||(e={url:null,retryCount:0,stale:!1,measure:null,status:null},c(this,re).set(t,e)),e}remove(t){c(this,I).delete(t),c(this,re).delete(t),c(this,O).delete(t)}};I=new WeakMap,re=new WeakMap,O=new WeakMap;var K=new Ot,Te,N,q,M,_,E,Ue,je,D,Ge,Ve,Le,$,Wr,Qr,Nt,Xr,mt=class extends HTMLElement{constructor(){super(...arguments);g(this,$);l(this,"cache",K);g(this,Te);g(this,N,null);g(this,q,null);g(this,M,null);g(this,_);g(this,E);g(this,Ue,Yr);g(this,je,5e3);g(this,D);g(this,Ge,!1);g(this,Ve,0);g(this,Le)}static get observedAttributes(){return[qr,Gr,Vr,Ur,jr]}attributeChangedCallback(e,r,a){e===qr&&(m(this,_,a),m(this,E,K.getFetchInfo(a))),e===Gr&&Yi.includes(a)&&m(this,Ue,a),e===Vr&&m(this,je,parseInt(a,10)),e===Ur&&m(this,Ge,["","true"].includes(a)),e===jr&&m(this,Le,a)}connectedCallback(){if(!c(this,D)){if(c(this,M)??m(this,M,J(this)),m(this,Le,c(this,M).settings?.preview),c(this,Te)??m(this,Te,c(this,M).log.module(`${Rt}[${c(this,_)}]`)),!c(this,_)||c(this,_)==="#"){c(this,E)??m(this,E,K.getFetchInfo("missing-fragment-id")),S(this,$,Nt).call(this,"Missing fragment id");return}this.refresh(!1)}}get fetchInfo(){return Object.fromEntries(Object.entries(c(this,E)).filter(([e,r])=>r!=null).map(([e,r])=>[`aem-fragment:${e}`,r]))}async refresh(e=!0){if(c(this,D)&&!await Promise.race([c(this,D),Promise.resolve(!1)]))return;e&&K.remove(c(this,_)),c(this,Ue)===Kr&&await Promise.race([K.getAsPromise(c(this,_)),new Promise(s=>setTimeout(s,c(this,je)))]);try{m(this,D,S(this,$,Xr).call(this)),await c(this,D)}catch(s){return S(this,$,Nt).call(this,s.message),!1}let{references:r,referencesTree:a,placeholders:n,wcs:o}=c(this,N)||{};return o&&!dt("mas.disableWcsCache")&&c(this,M).prefillWcsCache(o),this.dispatchEvent(new CustomEvent(he,{detail:{...this.data,references:r,referencesTree:a,placeholders:n,...c(this,E)},bubbles:!0,composed:!0})),c(this,D)}get updateComplete(){return c(this,D)??Promise.reject(new Error("AEM fragment cannot be loaded"))}get data(){return c(this,q)?c(this,q):(c(this,Ge)?this.transformAuthorData():this.transformPublishData(),c(this,q))}get rawData(){return c(this,N)}transformAuthorData(){let{fields:e,id:r,tags:a,settings:n={},priceLiterals:o={},dictionary:s={},placeholders:d={}}=c(this,N);m(this,q,e.reduce((h,{name:p,multiple:b,values:P})=>(h.fields[p]=b?P:P[0],h),{fields:{},id:r,tags:a,settings:n,priceLiterals:o,dictionary:s,placeholders:d}))}transformPublishData(){let{fields:e,id:r,tags:a,settings:n={},priceLiterals:o={},dictionary:s={},placeholders:d={}}=c(this,N);m(this,q,Object.entries(e).reduce((h,[p,b])=>(h.fields[p]=b?.mimeType?b.value:b??"",h),{fields:{},id:r,tags:a,settings:n,priceLiterals:o,dictionary:s,placeholders:d}))}getFragmentClientUrl(){let r=new URLSearchParams(window.location.search).get("maslibs");if(!r||r.trim()==="")return"https://mas.adobe.com/studio/libs/fragment-client.js";let a=r.trim().toLowerCase();if(a==="local")return"http://localhost:3030/studio/libs/fragment-client.js";let{hostname:n}=window.location,o=n.endsWith(".page")?"page":"live";return a.includes("--")?`https://${a}.aem.${o}/studio/libs/fragment-client.js`:`https://${a}--mas--adobecom.aem.${o}/studio/libs/fragment-client.js`}async generatePreview(){let e=this.getFragmentClientUrl(),{previewFragment:r}=await import(e);return await r(c(this,_),{locale:c(this,M).settings.locale,apiKey:c(this,M).settings.wcsApiKey})}};Te=new WeakMap,N=new WeakMap,q=new WeakMap,M=new WeakMap,_=new WeakMap,E=new WeakMap,Ue=new WeakMap,je=new WeakMap,D=new WeakMap,Ge=new WeakMap,Ve=new WeakMap,Le=new WeakMap,$=new WeakSet,Wr=async function(e){Kt(this,Ve)._++;let r=`${Rt}:${c(this,_)}:${c(this,Ve)}`,a=`${r}${Ze}`,n=`${r}${Je}`;if(c(this,Le))return await this.generatePreview();performance.mark(a);let o;try{if(c(this,E).stale=!1,c(this,E).url=e,o=await Hr(e,{cache:"default",credentials:"omit"}),S(this,$,Qr).call(this,o),c(this,E).status=o?.status,c(this,E).measure=ge(performance.measure(n,a)),c(this,E).retryCount=o.retryCount,!o?.ok)throw new te("Unexpected fragment response",{response:o,...c(this,M).duration});return await o.json()}catch(s){if(c(this,E).measure=ge(performance.measure(n,a)),c(this,E).retryCount=s.retryCount,c(this,N))return c(this,E).stale=!0,c(this,Te).error("Serving stale data",c(this,E)),c(this,N);let d=s.message??"unknown";throw new te(`Failed to fetch fragment: ${d}`,{})}},Qr=function(e){Object.assign(c(this,E),Br(e))},Nt=function(e){m(this,D,null),c(this,E).message=e,this.classList.add("error");let r={...c(this,E),...c(this,M).duration};c(this,Te).error(e,r),this.dispatchEvent(new CustomEvent(me,{detail:r,bubbles:!0,composed:!0}))},Xr=async function(){var d;this.classList.remove("error"),m(this,q,null);let e=K.get(c(this,_));if(e)return m(this,N,e),!0;let{masIOUrl:r,wcsApiKey:a,country:n,locale:o}=c(this,M).settings,s=`${r}/fragment?id=${c(this,_)}&api_key=${a}&locale=${o}`;return n&&!o.endsWith(`_${n}`)&&(s+=`&country=${n}`),e=await S(this,$,Wr).call(this,s),(d=e.fields).originalId??(d.originalId=c(this,_)),K.add(e),m(this,N,e),!0},l(mt,"cache",K);customElements.define(Rt,mt);import{LitElement as Ki,html as Wi,css as Qi}from"./lit-all.min.js";var ze=class extends Ki{constructor(){super(),this.color="",this.variant="",this.backgroundColor="",this.borderColor="",this.text=this.textContent}connectedCallback(){this.borderColor&&this.borderColor!=="Transparent"?this.style.setProperty("--merch-badge-border",`1px solid var(--${this.borderColor})`):this.style.setProperty("--merch-badge-border",`1px solid var(--${this.backgroundColor})`),this.style.setProperty("--merch-badge-background-color",`var(--${this.backgroundColor})`),this.style.setProperty("--merch-badge-color",this.color),this.style.setProperty("--merch-badge-padding","2px 10px 3px 10px"),this.style.setProperty("--merch-badge-border-radius","4px 0 0 4px"),this.style.setProperty("--merch-badge-font-size","var(--consonant-merch-card-body-xs-font-size)"),this.textContent="";let t=this.closest("merch-card"),e=t?.getAttribute("size"),r=t?.querySelectorAll(":scope > merch-icon").length||0;this.style.setProperty("--merch-badge-offset",r),this.style.setProperty("--merch-badge-with-offset",r?1:0),this.style.setProperty("--merch-badge-card-size",e?2:1),super.connectedCallback()}render(){return Wi`${this.text}
`}};l(ze,"properties",{color:{type:String},variant:{type:String},backgroundColor:{type:String,attribute:"background-color"},borderColor:{type:String,attribute:"border-color"}}),l(ze,"styles",Qi`
:host {
display: block;
background-color: var(--merch-badge-background-color);
@@ -5877,10 +5877,10 @@ Caused by: ${this.cause}`),e}};var qi="mas-commerce-service",Ui={requestId:Xe,et
position: relative;
left: 1px;
}
- `);customElements.define("merch-badge",ze);import{html as Ki,css as Wi,LitElement as Qi}from"./lit-all.min.js";var Ye=class extends Qi{constructor(){super()}render(){return Ki`
+ `);customElements.define("merch-badge",ze);import{html as Xi,css as Zi,LitElement as Ji}from"./lit-all.min.js";var Ye=class extends Ji{constructor(){super()}render(){return Xi`
${this.description}
- `}};l(Ye,"styles",Wi`
+ `}};l(Ye,"styles",Zi`
:host {
display: flex;
flex-wrap: nowrap;
@@ -5905,11 +5905,11 @@ Caused by: ${this.cause}`),e}};var qi="mas-commerce-service",Ui={requestId:Xe,et
:host .hidden {
display: none;
}
- `),l(Ye,"properties",{description:{type:String,attribute:!0}});customElements.define("merch-mnemonic-list",Ye);import{html as Dt,css as Xi,LitElement as Zi}from"./lit-all.min.js";var Ke=class extends Zi{updated(){this.hideSeeMoreEls()}hideSeeMoreEls(){this.isMobile&&this.rows.forEach((t,e)=>{e>=5&&(t.style.display=this.showAll?"flex":"none")})}constructor(){super(),this.showAll=!1,this.mobileRows=this.mobileRows===void 0?5:this.mobileRows}toggle(){this.showAll=!this.showAll,this.dispatchEvent(new CustomEvent("hide-see-more-elements",{bubbles:!0,composed:!0})),this.requestUpdate()}render(){return Dt`
+ `),l(Ye,"properties",{description:{type:String,attribute:!0}});customElements.define("merch-mnemonic-list",Ye);import{html as Dt,css as ea,LitElement as ta}from"./lit-all.min.js";var Ke=class extends ta{updated(){this.hideSeeMoreEls()}hideSeeMoreEls(){this.isMobile&&this.rows.forEach((t,e)=>{e>=5&&(t.style.display=this.showAll?"flex":"none")})}constructor(){super(),this.showAll=!1,this.mobileRows=this.mobileRows===void 0?5:this.mobileRows}toggle(){this.showAll=!this.showAll,this.dispatchEvent(new CustomEvent("hide-see-more-elements",{bubbles:!0,composed:!0})),this.requestUpdate()}render(){return Dt`
${this.isMobile&&this.rows.length>this.mobileRows?Dt`
${this.showAll?"- See less":"+ See more"}
-
`:Dt``}`}get isMobile(){return window.matchMedia("(max-width: 767px)").matches}get rows(){return this.querySelectorAll("merch-mnemonic-list")}};l(Ke,"styles",Xi`
+ `:Dt``}`}get isMobile(){return window.matchMedia("(max-width: 767px)").matches}get rows(){return this.querySelectorAll("merch-mnemonic-list")}};l(Ke,"styles",ea`
:host {
display: flex;
flex-wrap: wrap;
@@ -5938,4 +5938,4 @@ Caused by: ${this.cause}`),e}};var qi="mas-commerce-service",Ui={requestId:Xe,et
text-decoration: underline;
color: var(--link-color-dark);
}
- `),l(Ke,"properties",{heading:{type:String,attribute:!0},mobileRows:{type:Number,attribute:!0}});customElements.define("merch-whats-included",Ke);var ie={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals","element"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},Qr=1e3;function Ji(i){return i instanceof Error||typeof i?.originatingRequest=="string"}function Xr(i){if(i==null)return;let t=typeof i;if(t==="function")return i.name?`function ${i.name}`:"function";if(t==="object"){if(i instanceof Error)return i.message;if(typeof i.originatingRequest=="string"){let{message:r,originatingRequest:a,status:n}=i;return[r,n,a].filter(Boolean).join(" ")}let e=i[Symbol.toStringTag]??Object.getPrototypeOf(i).constructor.name;if(!ie.serializableTypes.includes(e))return e}return i}function ea(i,t){if(!ie.ignoredProperties.includes(i))return Xr(t)}var $t={append(i){if(i.level!=="error")return;let{message:t,params:e}=i,r=[],a=[],n=t;e.forEach(h=>{h!=null&&(Ji(h)?r:a).push(h)}),r.length&&(n+=" "+r.map(Xr).join(" "));let{pathname:o,search:s}=window.location,d=`${ie.delimiter}page=${o}${s}`;d.length>Qr&&(d=`${d.slice(0,Qr)}`),n+=d,a.length&&(n+=`${ie.delimiter}facts=`,n+=JSON.stringify(a,ea)),window.lana?.log(n,ie)}};function Zr(i){Object.assign(ie,Object.fromEntries(Object.entries(i).filter(([t,e])=>t in ie&&e!==""&&e!==null&&e!==void 0&&!Number.isNaN(e))))}var Jr={LOCAL:"local",PROD:"prod",STAGE:"stage"},It={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Ft=new Set,Bt=new Set,ei=new Map,ti={append({level:i,message:t,params:e,timestamp:r,source:a}){console[i](`${r}ms [${a}] %c${t}`,"font-weight: bold;",...e)}},ri={filter:({level:i})=>i!==It.DEBUG},ta={filter:()=>!1};function ra(i,t,e,r,a){return{level:i,message:t,namespace:e,get params(){return r.length===1&&pt(r[0])&&(r=r[0](),Array.isArray(r)||(r=[r])),r},source:a,timestamp:performance.now().toFixed(3)}}function ia(i){[...Bt].every(t=>t(i))&&Ft.forEach(t=>t(i))}function ii(i){let t=(ei.get(i)??0)+1;ei.set(i,t);let e=`${i} #${t}`,r={id:e,namespace:i,module:a=>ii(`${r.namespace}/${a}`),updateConfig:Zr};return Object.values(It).forEach(a=>{r[a]=(n,...o)=>ia(ra(a,n,i,o,e))}),Object.seal(r)}function gt(...i){i.forEach(t=>{let{append:e,filter:r}=t;pt(r)&&Bt.add(r),pt(e)&&Ft.add(e)})}function aa(i={}){let{name:t}=i,e=$r(dt("commerce.debug",{search:!0,storage:!0}),t===Jr.LOCAL);return gt(e?ti:ri),t===Jr.PROD&>($t),Ht}function na(){Ft.clear(),Bt.clear()}var Ht={...ii(pr),Level:It,Plugins:{consoleAppender:ti,debugFilter:ri,quietFilter:ta,lanaAppender:$t},init:aa,reset:na,use:gt};var oa={[G]:sr,[Z]:cr,[V]:lr},sa={[G]:dr,[V]:Ne},We,ut=class{constructor(t){g(this,We);l(this,"changes",new Map);l(this,"connected",!1);l(this,"error");l(this,"log");l(this,"options");l(this,"promises",[]);l(this,"state",Z);l(this,"timer",null);l(this,"value");l(this,"version",0);l(this,"wrapperElement");this.wrapperElement=t,this.log=Ht.module("mas-element")}update(){[G,Z,V].forEach(t=>{this.wrapperElement.classList.toggle(oa[t],t===this.state)})}notify(){(this.state===V||this.state===G)&&(this.state===V?this.promises.forEach(({resolve:e})=>e(this.wrapperElement)):this.state===G&&this.promises.forEach(({reject:e})=>e(this.error)),this.promises=[]);let t=this.error;this.error instanceof te&&(t={message:this.error.message,...this.error.context}),this.wrapperElement.dispatchEvent(new CustomEvent(sa[this.state],{bubbles:!0,detail:t}))}attributeChangedCallback(t,e,r){this.changes.set(t,r),this.requestUpdate()}connectedCallback(){m(this,We,Mt()),this.requestUpdate(!0)}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement}))}onceSettled(){let{error:t,promises:e,state:r}=this;return V===r?Promise.resolve(this.wrapperElement):G===r?Promise.reject(t):new Promise((a,n)=>{e.push({resolve:a,reject:n})})}toggleResolved(t,e,r){return t!==this.version?!1:(r!==void 0&&(this.options=r),this.state=V,this.value=e,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:e}),ht(()=>this.notify()),!0)}toggleFailed(t,e,r){if(t!==this.version)return!1;r!==void 0&&(this.options=r),this.error=e,this.state=G,this.update();let a=this.wrapperElement.getAttribute("is");return this.log?.error(`${a}: Failed to render: ${e.message}`,{element:this.wrapperElement,...e.context,...c(this,We)?.duration}),ht(()=>this.notify()),!0}togglePending(t){return this.version++,t&&(this.options=t),this.state=Z,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!Mt()||this.timer)return;let{error:e,options:r,state:a,value:n,version:o}=this;this.state=Z,this.timer=ht(async()=>{this.timer=null;let s=null;if(this.changes.size&&(s=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:s}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:s})),s||t)try{await this.wrapperElement.render?.()===!1&&this.state===Z&&this.version===o&&(this.state=a,this.error=e,this.value=n,this.update(),this.notify())}catch(d){this.toggleFailed(this.version,d,r)}})}};We=new WeakMap;function ca(i){return`https://${i==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var ne,ae=class ae extends HTMLAnchorElement{constructor(){super();l(this,"masElement",new ut(this));g(this,ne);this.setAttribute("is",ae.is)}get isUptLink(){return!0}initializeWcsData(e,r){this.setAttribute("data-wcs-osi",e),r&&this.setAttribute("data-promotion-code",r)}attributeChangedCallback(e,r,a){this.masElement.attributeChangedCallback(e,r,a)}connectedCallback(){this.masElement.connectedCallback(),m(this,ne,J()),c(this,ne)&&(this.log=c(this,ne).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),m(this,ne,void 0)}requestUpdate(e=!1){this.masElement.requestUpdate(e)}onceSettled(){return this.masElement.onceSettled()}async render(){let e=J();if(!e)return!1;this.dataset.imsCountry||e.imsCountryPromise.then(o=>{o&&(this.dataset.imsCountry=o)});let r=e.collectCheckoutOptions({},this);if(!r.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let a=this.masElement.togglePending(r),n=e.resolveOfferSelectors(r);try{let[[o]]=await Promise.all(n),{country:s,language:d,env:h}=r,p=`locale=${d}_${s}&country=${s}&offer_id=${o.offerId}`,b=this.getAttribute("data-promotion-code");b&&(p+=`&promotion_code=${encodeURIComponent(b)}`),this.href=`${ca(h)}?${p}`,this.masElement.toggleResolved(a,o,r)}catch(o){let s=new Error(`Could not resolve offer selectors for id: ${r.wcsOsi}.`,o.message);return this.masElement.toggleFailed(a,s,r),!1}}static createFrom(e){let r=new ae;for(let a of e.attributes)a.name!=="is"&&(a.name==="class"&&a.value.includes("upt-link")?r.setAttribute("class",a.value.replace("upt-link","").trim()):r.setAttribute(a.name,a.value));return r.innerHTML=e.innerHTML,r.setAttribute("tabindex",0),r}};ne=new WeakMap,l(ae,"is","upt-link"),l(ae,"tag","a"),l(ae,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var W=ae;window.customElements.get(W.is)||window.customElements.define(W.is,W,{extends:W.tag});var la="#000000",qt="#F8D904",da="#EAEAEA",pa="#31A547",ha=/(accent|primary|secondary)(-(outline|link))?/,ma="mas:product_code/",ga="daa-ll",ft="daa-lh",ua=["XL","L","M","S"],Ut="...";function R(i,t,e,r){let a=r[i];if(t[i]&&a){let n={slot:a?.slot,...a?.attributes},o=t[i];if(a.maxCount&&typeof o=="string"){let[d,h]=Ma(o,a.maxCount,a.withSuffix);d!==o&&(n.title=h,o=d)}let s=L(a.tag,n,o);e.append(s)}}function fa(i,t,e){let r=i.mnemonicIcon?.map((n,o)=>({icon:n,alt:i.mnemonicAlt[o]??"",link:i.mnemonicLink[o]??""}));r?.forEach(({icon:n,alt:o,link:s})=>{if(s&&!/^https?:/.test(s))try{s=new URL(`https://${s}`).href.toString()}catch{s="#"}let d={slot:"icons",src:n,loading:t.loading,size:e?.size??"l"};o&&(d.alt=o),s&&(d.href=s);let h=L("merch-icon",d);t.append(h)});let a=t.shadowRoot.querySelector('slot[name="icons"]');a&&(a.style.display=r?.length?null:"none")}function xa(i,t,e){if(e.badge?.slot){if(i.badge?.length&&!i.badge?.startsWith("${i.badge}`}R("badge",i,t,e)}else i.badge?(t.setAttribute("badge-text",i.badge),e.disabledAttributes?.includes("badgeColor")||t.setAttribute("badge-color",i.badgeColor||la),e.disabledAttributes?.includes("badgeBackgroundColor")||t.setAttribute("badge-background-color",i.badgeBackgroundColor||qt),t.setAttribute("border-color",i.badgeBackgroundColor||qt)):t.setAttribute("border-color",i.borderColor||da)}function va(i,t,e){if(e.trialBadge&&i.trialBadge){if(!i.trialBadge.startsWith("${i.trialBadge}`}R("trialBadge",i,t,e)}}function ba(i,t,e){e?.includes(i.size)&&t.setAttribute("size",i.size)}function ya(i,t){i.cardName&&t.setAttribute("name",i.cardName)}function wa(i,t,e){i.cardTitle&&(i.cardTitle=_e(i.cardTitle)),R("cardTitle",i,t,{cardTitle:e})}function Ea(i,t,e){R("subtitle",i,t,e)}function ka(i,t,e,r){if(!i.backgroundColor||i.backgroundColor.toLowerCase()==="default"){t.style.removeProperty("--merch-card-custom-background-color"),t.removeAttribute("background-color");return}e?.[i.backgroundColor]?(t.style.setProperty("--merch-card-custom-background-color",`var(${e[i.backgroundColor]})`),t.setAttribute("background-color",i.backgroundColor)):r?.attribute&&i.backgroundColor&&(t.setAttribute(r.attribute,i.backgroundColor),t.style.removeProperty("--merch-card-custom-background-color"))}function Sa(i,t,e){let r=e?.borderColor,a="--consonant-merch-card-border-color";if(i.borderColor?.toLowerCase()==="transparent")t.style.setProperty(a,"transparent");else if(i.borderColor&&r){let o=r?.specialValues?.[i.borderColor]?.includes("gradient")||/-gradient/.test(i.borderColor),s=/^spectrum-.*-plans$/.test(i.borderColor);if(o){t.setAttribute("gradient-border","true");let d=i.borderColor;if(r?.specialValues){for(let[h,p]of Object.entries(r.specialValues))if(p===i.borderColor){d=h;break}}t.setAttribute("border-color",d),t.style.removeProperty(a)}else s?(t.setAttribute("border-color",i.borderColor),t.style.setProperty(a,`var(--${i.borderColor})`)):t.style.setProperty(a,`var(--${i.borderColor})`)}}function Aa(i,t,e){if(i.backgroundImage){let r={loading:t.loading??"lazy",src:i.backgroundImage};if(i.backgroundImageAltText?r.alt=i.backgroundImageAltText:r.role="none",!e)return;if(e?.attribute){t.setAttribute(e.attribute,i.backgroundImage);return}t.append(L(e.tag,{slot:e.slot},L("img",r)))}}function _e(i){return!i||typeof i!="string"||i.includes("(wt(),yt)).catch(console.error),i}function Ca(i,t,e){i.prices&&(i.prices=_e(i.prices)),R("prices",i,t,e)}function ni(i,t,e){let r=i.hasAttribute("data-wcs-osi")&&!!i.getAttribute("data-wcs-osi"),a=i.className||"",n=ha.exec(a)?.[0]??"accent",o=n.includes("accent"),s=n.includes("primary"),d=n.includes("secondary"),h=n.includes("-outline"),p=n.includes("-link");i.classList.remove("accent","primary","secondary");let b;if(t.consonant)b=Da(i,o,r,p,s);else if(p)b=i;else{let P;o?P="accent":s?P="primary":d&&(P="secondary"),b=t.spectrum==="swc"?Na(i,e,h,P,r):Oa(i,e,h,P,r)}return b}function Ta(i,t){let{slot:e}=t?.description,r=i.querySelectorAll(`[slot="${e}"] a[data-wcs-osi]`);r.length&&r.forEach(a=>{let n=ni(a,i,t);a.replaceWith(n)})}function La(i,t,e){i.description&&(i.description=_e(i.description)),i.promoText&&(i.promoText=_e(i.promoText)),i.shortDescription&&(i.shortDescription=_e(i.shortDescription)),R("promoText",i,t,e),R("description",i,t,e),R("shortDescription",i,t,e),i.shortDescription&&(t.setAttribute("action-menu","true"),i.actionMenuLabel||t.setAttribute("action-menu-label","More options")),Ta(t,e),R("callout",i,t,e),R("quantitySelect",i,t,e),R("whatsIncluded",i,t,e)}function za(i,t,e){if(!e.addon)return;let r=i.addon?.replace(/[{}]/g,"");if(!r||/disabled/.test(r))return;let a=L("merch-addon",{slot:"addon"},r);[...a.querySelectorAll(y)].forEach(n=>{let o=n.parentElement;o?.nodeName==="P"&&o.setAttribute("data-plan-type","")}),t.append(a)}function _a(i,t,e){i.addonConfirmation&&R("addonConfirmation",i,t,e)}function Pa(i,t,e,r){r?.secureLabel&&e?.secureLabel&&t.setAttribute("secure-label",r.secureLabel)}function Ma(i,t,e=!0){try{let r=typeof i!="string"?"":i,a=ai(r);if(a.length<=t)return[r,a];let n=0,o=!1,s=e?t-Ut.length<1?1:t-Ut.length:t,d=[];for(let b of r){if(n++,b==="<")if(o=!0,r[n]==="/")d.pop();else{let P="";for(let le of r.substring(n)){if(le===" "||le===">")break;P+=le}d.push(P)}if(b==="/"&&r[n]===">"&&d.pop(),b===">"){o=!1;continue}if(!o&&(s--,s===0))break}let h=r.substring(0,n).trim();if(d.length>0){d[0]==="p"&&d.shift();for(let b of d.reverse())h+=`${b}>`}return[`${h}${e?Ut:""}`,a]}catch{let a=typeof i=="string"?i:"",n=ai(a);return[a,n]}}function ai(i){if(!i)return"";let t="",e=!1;for(let r of i){if(r==="<"&&(e=!0),r===">"){e=!1;continue}e||(t+=r)}return t}function Ra(i,t){t.querySelectorAll("a.upt-link").forEach(r=>{let a=W.createFrom(r);r.replaceWith(a),a.initializeWcsData(i.osi,i.promoCode)})}function Oa(i,t,e,r,a){let n=i;a?n=customElements.get("checkout-button").createCheckoutButton({},i.innerHTML):n.innerHTML=`${n.textContent}`,n.setAttribute("tabindex",0);for(let p of i.attributes)["class","is"].includes(p.name)||n.setAttribute(p.name,p.value);n.firstElementChild?.classList.add("spectrum-Button-label");let o=t?.ctas?.size??"M",s=`spectrum-Button--${r}`,d=ua.includes(o)?`spectrum-Button--size${o}`:"spectrum-Button--sizeM",h=["spectrum-Button",s,d];return e&&h.push("spectrum-Button--outline"),n.classList.add(...h),n}function Na(i,t,e,r,a){let n=i;a&&(n=customElements.get("checkout-button").createCheckoutButton(i.dataset),n.connectedCallback(),n.render());let o="fill";e&&(o="outline");let s=L("sp-button",{treatment:o,variant:r,tabIndex:0,size:t?.ctas?.size??"m",...i.dataset.analyticsId&&{"data-analytics-id":i.dataset.analyticsId}},i.innerHTML);return s.source=n,(a?n.onceSettled():Promise.resolve(n)).then(d=>{s.setAttribute("data-navigation-url",d.href)}),s.addEventListener("click",d=>{d.defaultPrevented||n.click()}),s}function Da(i,t,e,r,a){let n=i;return e&&(n=customElements.get("checkout-link").createCheckoutLink(i.dataset,i.innerHTML)),r||(n.classList.add("button","con-button"),t&&n.classList.add("blue"),a&&n.classList.add("primary")),n}function $a(i,t,e,r){if(i.ctas){i.ctas=_e(i.ctas);let{slot:a}=e.ctas,n=L("div",{slot:a},i.ctas),o=[...n.querySelectorAll("a")].map(s=>ni(s,t,e));n.innerHTML="",n.append(...o),t.append(n)}}function Ia(i,t){let{tags:e}=i,r=e?.find(n=>n.startsWith(ma))?.split("/").pop();if(!r)return;t.setAttribute(ft,r),[...t.shadowRoot.querySelectorAll("a[data-analytics-id],button[data-analytics-id]"),...t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]")].forEach((n,o)=>{n.setAttribute(ga,`${n.dataset.analyticsId}-${o+1}`)})}function Fa(i){i.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,e])=>{i.querySelectorAll(`a.${t}`).forEach(r=>{r.classList.remove(t),r.classList.add("spectrum-Link",`spectrum-Link--${e}`)})})}function Ba(i){i.querySelectorAll("[slot]").forEach(r=>{r.remove()}),i.variant=void 0,["checkbox-label","stock-offer-osis","secure-label","background-image","background-color","border-color","badge-background-color","badge-color","badge-text","gradient-border","size",ft].forEach(r=>i.removeAttribute(r));let e=["wide-strip","thin-strip"];i.classList.remove(...e)}async function oi(i,t){if(!i){let d=t?.id||"unknown";throw console.error(`hydrate: Fragment is undefined. Cannot hydrate card (merchCard id: ${d}).`),new Error(`hydrate: Fragment is undefined for card (merchCard id: ${d}).`)}if(!i.fields){let d=i.id||"unknown",h=t?.id||"unknown";throw console.error(`hydrate: Fragment for card ID '${d}' (merchCard id: ${h}) is missing 'fields'. Cannot hydrate.`),new Error(`hydrate: Fragment for card ID '${d}' (merchCard id: ${h}) is missing 'fields'.`)}let{id:e,fields:r,settings:a={},priceLiterals:n}=i,{variant:o}=r;if(!o)throw new Error(`hydrate: no variant found in payload ${e}`);Ba(t),t.settings=a,n&&(t.priceLiterals=n),t.id??(t.id=i.id),t.variant=o,await t.updateComplete;let{aemFragmentMapping:s}=t.variantLayout;if(!s)throw new Error(`hydrate: variant mapping not found for ${e}`);s.style==="consonant"&&t.setAttribute("consonant",!0),fa(r,t,s.mnemonics),xa(r,t,s),va(r,t,s),ba(r,t,s.size),ya(r,t),wa(r,t,s.title),Ea(r,t,s),Ca(r,t,s),Aa(r,t,s.backgroundImage),ka(r,t,s.allowedColors,s.backgroundColor),Sa(r,t,s),La(r,t,s),za(r,t,s),_a(r,t,s),Pa(r,t,s,a),Ra(r,t),$a(r,t,s,o),Ia(r,t),Fa(t)}var Gt="merch-card",jt=2e4,si="merch-card:",qa=["full-pricing-express","simplified-pricing-express"];function ci(i,t){let e=i.closest(Gt);if(!e)return t;e.priceLiterals&&(t.literals??(t.literals={}),Object.assign(t.literals,e.priceLiterals)),e.aemFragment&&(t[hr]=!0),e.variantLayout?.priceOptionsProvider?.(i,t)}function Ua(i){i.providers.has(ci)||i.providers.price(ci)}var li=new IntersectionObserver(i=>{i.forEach(t=>{t.target.clientHeight!==0&&(li.unobserve(t.target),t.target.requestUpdate())})}),ja=0,Pe,Me,Re,U,se,F,ce,k,oe,xt,di,vt,Q=class extends Ha{constructor(){super();g(this,k);g(this,Pe);g(this,Me);g(this,Re);g(this,U);g(this,se);g(this,F);g(this,ce,new Promise(e=>{m(this,F,e)}));l(this,"customerSegment");l(this,"marketSegment");l(this,"variantLayout");this.id=null,this.failed=!1,this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.loading="lazy",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this),this.handleMerchOfferSelectReady=this.handleMerchOfferSelectReady.bind(this)}firstUpdated(){this.variantLayout=_t(this),this.variantLayout?.connectedCallbackHook()}willUpdate(e){(e.has("variant")||!this.variantLayout)&&(this.variantLayout?.disconnectedCallbackHook(),this.variantLayout=_t(this),this.variantLayout?.connectedCallbackHook())}updated(e){(e.has("badgeBackgroundColor")||e.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),e.has("backgroundColor")&&this.style.setProperty("--merch-card-custom-background-color",this.backgroundColor?`var(--${this.backgroundColor})`:"");try{this.variantLayoutPromise=this.variantLayout?.postCardUpdateHook(e)}catch(r){S(this,k,oe).call(this,`Error in postCardUpdateHook: ${r.message}`,{},!1)}}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["ccd-slice","ccd-suggested","ah-promoted-plans","simplified-pricing-express","full-pricing-express"].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 descriptionSlot(){return this.shadowRoot.querySelector('slot[name="body-xs"')?.assignedElements()[0]}get descriptionSlotCompare(){return this.shadowRoot.querySelector('slot[name="body-m"')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector(y)}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll(j)??[]]}get checkoutLinksDescription(){return[...this.descriptionSlot?.querySelectorAll(j)??[]]}get checkoutLinkDescriptionCompare(){return[...this.descriptionSlotCompare?.querySelectorAll(j)??[]]}get activeDescriptionLinks(){return this.variant==="mini-compare-chart"?this.checkoutLinkDescriptionCompare:this.checkoutLinksDescription}async toggleStockOffer({target:e}){if(!this.stockOfferOsis)return;let r=this.checkoutLinks;if(r.length!==0)for(let a of r){await a.onceSettled();let n=a.value?.[0]?.planType;if(!n)return;let o=this.stockOfferOsis[n];if(!o)return;let s=a.dataset.wcsOsi.split(",").filter(d=>d!==o);e.checked&&s.push(o),a.dataset.wcsOsi=s.join(",")}}changeHandler(e){e.target.tagName==="MERCH-ADDON"&&this.toggleAddon(e.target)}toggleAddon(e){this.variantLayout?.toggleAddon?.(e);let r=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(r.length===0)return;let a=n=>{let{offerType:o,planType:s}=n.value?.[0]??{};if(!o||!s)return;let d=e.getOsi(s,o),h=(n.dataset.wcsOsi||"").split(",").filter(p=>p&&p!==d);e.checked&&h.push(d),n.dataset.wcsOsi=h.join(",")};r.forEach(a)}handleQuantitySelection(e){let r=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(r.length!==0)for(let a of r)a.dataset.quantity=e.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(e){let r={...this.filters};Object.keys(r).forEach(a=>{if(e){r[a].order=Math.min(r[a].order||2,2);return}let n=r[a].order;n===1||isNaN(n)||(r[a].order=Number(n)+1)}),this.filters=r}includes(e){return this.textContent.match(new RegExp(e,"i"))!==null}connectedCallback(){var r;super.connectedCallback(),c(this,Me)||m(this,Me,ja++),this.aemFragment||((r=c(this,F))==null||r.call(this),m(this,F,void 0)),this.id??(this.id=this.getAttribute("id")??this.aemFragment?.getAttribute("fragment"));let e=this.id??c(this,Me);m(this,se,`${si}${e}${Ze}`),m(this,Pe,`${si}${e}${Je}`),performance.mark(c(this,se)),m(this,U,J()),Ua(c(this,U)),m(this,Re,c(this,U).Log.module(Gt)),this.addEventListener(B,this.handleQuantitySelection),this.addEventListener(Et,this.handleAddonAndQuantityUpdate),this.addEventListener(rr,this.handleMerchOfferSelectReady),this.addEventListener(me,this.handleAemFragmentEvents),this.addEventListener(he,this.handleAemFragmentEvents),this.addEventListener("change",this.changeHandler),this.variantLayout&&this.variantLayout.connectedCallbackHook(),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(B,this.handleQuantitySelection),this.removeEventListener(me,this.handleAemFragmentEvents),this.removeEventListener(he,this.handleAemFragmentEvents),this.removeEventListener("change",this.changeHandler),this.removeEventListener(Et,this.handleAddonAndQuantityUpdate)}async handleAemFragmentEvents(e){var r;if(this.isConnected&&(e.type===me&&S(this,k,oe).call(this,"AEM fragment cannot be loaded"),e.type===he&&(this.failed=!1,e.target.nodeName==="AEM-FRAGMENT"))){let a=e.detail;try{c(this,F)||m(this,ce,new Promise(n=>{m(this,F,n)})),oi(a,this)}catch(n){S(this,k,oe).call(this,`hydration has failed: ${n.message}`)}finally{(r=c(this,F))==null||r.call(this),m(this,F,void 0)}this.checkReady()}}async checkReady(){if(!this.isConnected)return;c(this,ce)&&(await c(this,ce),qa.includes(this.variantLayout)&&li.observe(this),m(this,ce,void 0)),this.variantLayoutPromise&&(await this.variantLayoutPromise,this.variantLayoutPromise=void 0);let e=new Promise(o=>setTimeout(()=>o("timeout"),jt));if(this.aemFragment){let o=await Promise.race([this.aemFragment.updateComplete,e]);if(o===!1||o==="timeout"){let s=o==="timeout"?`AEM fragment was not resolved within ${jt} timeout`:"AEM fragment cannot be loaded";S(this,k,oe).call(this,s,{},!1);return}}let r=[...this.querySelectorAll(tr)],a=Promise.all(r.map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(s=>s.classList.contains("placeholder-resolved"))),n=await Promise.race([a,e]);if(n===!0){this.measure=performance.measure(c(this,Pe),c(this,se));let o={...this.aemFragment?.fetchInfo,...c(this,U).duration,measure:ge(this.measure)};return this.dispatchEvent(new CustomEvent(nr,{bubbles:!0,composed:!0,detail:o})),this}else{this.measure=performance.measure(c(this,Pe),c(this,se));let o={measure:ge(this.measure),...c(this,U).duration};n==="timeout"?S(this,k,oe).call(this,`Contains offers that were not resolved within ${jt} timeout`,o):S(this,k,oe).call(this,"Contains unresolved offers",o)}}get aemFragment(){return this.querySelector("aem-fragment")}get addon(){return this.querySelector("merch-addon")}get quantitySelect(){return this.querySelector("merch-quantity-select")}get addonCheckbox(){return this.querySelector("merch-addon")}displayFooterElementsInColumn(){if(!this.classList.contains("product"))return;let e=this.shadowRoot.querySelector(".secure-transaction-label");(this.footerSlot?.querySelectorAll(j)).length===2&&e&&e.parentElement.classList.add("footer-column")}handleMerchOfferSelectReady(){this.offerSelect&&!this.offerSelect.planType||this.displayFooterElementsInColumn()}get dynamicPrice(){return this.querySelector('[slot="price"]')}handleAddonAndQuantityUpdate({detail:{id:e,items:r}}){if(!e||!r?.length||this.closest('[role="tabpanel"][hidden="true"]'))return;let n=this.checkoutLinks.find(p=>p.getAttribute("data-modal-id")===e);if(!n)return;let s=new URL(n.getAttribute("href")).searchParams.get("pa"),d=r.find(p=>p.productArrangementCode===s)?.quantity,h=!!r.find(p=>p.productArrangementCode!==s);if(d&&this.quantitySelect?.dispatchEvent(new CustomEvent(ar,{detail:{quantity:d},bubbles:!0,composed:!0})),this.addonCheckbox&&this.addonCheckbox.checked!==h){this.toggleStockOffer({target:this.addonCheckbox});let p=new Event("change",{bubbles:!0,cancelable:!0});Object.defineProperty(p,"target",{writable:!1,value:{checked:h}}),this.addonCheckbox.handleChange(p)}}get prices(){return Array.from(this.querySelectorAll(y))}get promoPrice(){if(!this.querySelector("span.price-strikethrough"))return;let e=this.querySelector(".price.price-alternative");if(e||(e=this.querySelector(`${y}[data-template="price"] > span`)),!!e)return e=e.innerText,e}get regularPrice(){return c(this,k,xt)?.innerText}get promotionCode(){let e=[...this.querySelectorAll(`${y}[data-promotion-code],${j}[data-promotion-code]`)].map(a=>a.dataset.promotionCode),r=[...new Set(e)];return r.length>1&&c(this,Re)?.warn(`Multiple different promotion codes found: ${r.join(", ")}`),e[0]}get annualPrice(){return this.querySelector(`${y}[data-template="price"] > .price.price-annual`)?.innerText}get promoText(){}get taxText(){return(c(this,k,di)??c(this,k,xt))?.querySelector("span.price-tax-inclusivity")?.textContent?.trim()||void 0}get recurrenceText(){return c(this,k,xt)?.querySelector("span.price-recurrence")?.textContent?.trim()}get planTypeText(){return this.querySelector('[is="inline-price"][data-template="legal"] span.price-plan-type')?.textContent?.trim()}get seeTermsInfo(){let e=this.querySelector('a[is="upt-link"]');if(e)return S(this,k,vt).call(this,e)}get renewalText(){return this.querySelector("span.renewal-text")?.textContent?.trim()}get promoDurationText(){return this.querySelector("span.promo-duration-text")?.textContent?.trim()}get ctas(){let e=this.querySelector('[slot="ctas"], [slot="footer"]')?.querySelectorAll(`${j}, a`);return Array.from(e??[])}get primaryCta(){return S(this,k,vt).call(this,this.ctas.find(e=>e.variant==="accent"||e.matches(".spectrum-Button--accent,.con-button.blue")))}get secondaryCta(){return S(this,k,vt).call(this,this.ctas.find(e=>e.variant!=="accent"&&!e.matches(".spectrum-Button--accent,.con-button.blue")))}};Pe=new WeakMap,Me=new WeakMap,Re=new WeakMap,U=new WeakMap,se=new WeakMap,F=new WeakMap,ce=new WeakMap,k=new WeakSet,oe=function(e,r={},a=!0){if(!this.isConnected)return;let o=this.aemFragment?.getAttribute("fragment");o=`[${o}]`;let s={...this.aemFragment.fetchInfo,...c(this,U).duration,...r,message:e};c(this,Re).error(`merch-card${o}: ${e}`,s),this.failed=!0,a&&this.dispatchEvent(new CustomEvent(or,{bubbles:!0,composed:!0,detail:s}))},xt=function(){return this.querySelector("span.price-strikethrough")??this.querySelector(`${y}[data-template="price"] > span`)},di=function(){return this.querySelector(`${y}[data-template="legal"]`)},vt=function(e){if(e)return{text:e.innerText.trim(),analyticsId:e.dataset.analyticsId,href:e.getAttribute("href")??e.dataset.href}},l(Q,"properties",{id:{type:String,attribute:"id",reflect:!0},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},backgroundColor:{type:String,attribute:"background-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"},actionMenuLabel:{type:String,attribute:"action-menu-label"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},failed:{type:Boolean,attribute:"failed",reflect:!0},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},addonTitle:{type:String,attribute:"addon-title"},addonOffers:{type:Object,attribute:"addon-offers"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0},settings:{type:Object,attribute:!1},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:e=>{if(!e)return;let[r,a,n]=e.split(",");return{PUF:r,ABM:a,M2M:n}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:e=>Object.fromEntries(e.split(",").map(r=>{let[a,n,o]=r.split(":"),s=Number(n);return[a,{order:isNaN(s)?void 0:s,size:o}]})),toAttribute:e=>Object.entries(e).map(([r,{order:a,size:n}])=>[r,a,n].filter(o=>o!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:ft,reflect:!0},loading:{type:String},priceLiterals:{type:Object}}),l(Q,"styles",[Zt,...Jt()]),l(Q,"registerVariant",C),l(Q,"getCollectionOptions",Nr),l(Q,"getFragmentMapping",it);customElements.define(Gt,Q);export{Q as MerchCard};
+ `),l(Ke,"properties",{heading:{type:String,attribute:!0},mobileRows:{type:Number,attribute:!0}});customElements.define("merch-whats-included",Ke);var ie={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals","element"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},Zr=1e3;function ra(i){return i instanceof Error||typeof i?.originatingRequest=="string"}function Jr(i){if(i==null)return;let t=typeof i;if(t==="function")return i.name?`function ${i.name}`:"function";if(t==="object"){if(i instanceof Error)return i.message;if(typeof i.originatingRequest=="string"){let{message:r,originatingRequest:a,status:n}=i;return[r,n,a].filter(Boolean).join(" ")}let e=i[Symbol.toStringTag]??Object.getPrototypeOf(i).constructor.name;if(!ie.serializableTypes.includes(e))return e}return i}function ia(i,t){if(!ie.ignoredProperties.includes(i))return Jr(t)}var $t={append(i){if(i.level!=="error")return;let{message:t,params:e}=i,r=[],a=[],n=t;e.forEach(h=>{h!=null&&(ra(h)?r:a).push(h)}),r.length&&(n+=" "+r.map(Jr).join(" "));let{pathname:o,search:s}=window.location,d=`${ie.delimiter}page=${o}${s}`;d.length>Zr&&(d=`${d.slice(0,Zr)}`),n+=d,a.length&&(n+=`${ie.delimiter}facts=`,n+=JSON.stringify(a,ia)),window.lana?.log(n,ie)}};function ei(i){Object.assign(ie,Object.fromEntries(Object.entries(i).filter(([t,e])=>t in ie&&e!==""&&e!==null&&e!==void 0&&!Number.isNaN(e))))}var ti={LOCAL:"local",PROD:"prod",STAGE:"stage"},It={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Ft=new Set,Bt=new Set,ri=new Map,ii={append({level:i,message:t,params:e,timestamp:r,source:a}){console[i](`${r}ms [${a}] %c${t}`,"font-weight: bold;",...e)}},ai={filter:({level:i})=>i!==It.DEBUG},aa={filter:()=>!1};function na(i,t,e,r,a){return{level:i,message:t,namespace:e,get params(){return r.length===1&&pt(r[0])&&(r=r[0](),Array.isArray(r)||(r=[r])),r},source:a,timestamp:performance.now().toFixed(3)}}function oa(i){[...Bt].every(t=>t(i))&&Ft.forEach(t=>t(i))}function ni(i){let t=(ri.get(i)??0)+1;ri.set(i,t);let e=`${i} #${t}`,r={id:e,namespace:i,module:a=>ni(`${r.namespace}/${a}`),updateConfig:ei};return Object.values(It).forEach(a=>{r[a]=(n,...o)=>oa(na(a,n,i,o,e))}),Object.seal(r)}function gt(...i){i.forEach(t=>{let{append:e,filter:r}=t;pt(r)&&Bt.add(r),pt(e)&&Ft.add(e)})}function sa(i={}){let{name:t}=i,e=Fr(dt("commerce.debug",{search:!0,storage:!0}),t===ti.LOCAL);return gt(e?ii:ai),t===ti.PROD&>($t),Ht}function ca(){Ft.clear(),Bt.clear()}var Ht={...ni(pr),Level:It,Plugins:{consoleAppender:ii,debugFilter:ai,quietFilter:aa,lanaAppender:$t},init:sa,reset:ca,use:gt};var la={[G]:sr,[Z]:cr,[V]:lr},da={[G]:dr,[V]:Ne},We,ut=class{constructor(t){g(this,We);l(this,"changes",new Map);l(this,"connected",!1);l(this,"error");l(this,"log");l(this,"options");l(this,"promises",[]);l(this,"state",Z);l(this,"timer",null);l(this,"value");l(this,"version",0);l(this,"wrapperElement");this.wrapperElement=t,this.log=Ht.module("mas-element")}update(){[G,Z,V].forEach(t=>{this.wrapperElement.classList.toggle(la[t],t===this.state)})}notify(){(this.state===V||this.state===G)&&(this.state===V?this.promises.forEach(({resolve:e})=>e(this.wrapperElement)):this.state===G&&this.promises.forEach(({reject:e})=>e(this.error)),this.promises=[]);let t=this.error;this.error instanceof te&&(t={message:this.error.message,...this.error.context}),this.wrapperElement.dispatchEvent(new CustomEvent(da[this.state],{bubbles:!0,detail:t}))}attributeChangedCallback(t,e,r){this.changes.set(t,r),this.requestUpdate()}connectedCallback(){m(this,We,Mt()),this.requestUpdate(!0)}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement}))}onceSettled(){let{error:t,promises:e,state:r}=this;return V===r?Promise.resolve(this.wrapperElement):G===r?Promise.reject(t):new Promise((a,n)=>{e.push({resolve:a,reject:n})})}toggleResolved(t,e,r){return t!==this.version?!1:(r!==void 0&&(this.options=r),this.state=V,this.value=e,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:e}),ht(()=>this.notify()),!0)}toggleFailed(t,e,r){if(t!==this.version)return!1;r!==void 0&&(this.options=r),this.error=e,this.state=G,this.update();let a=this.wrapperElement.getAttribute("is");return this.log?.error(`${a}: Failed to render: ${e.message}`,{element:this.wrapperElement,...e.context,...c(this,We)?.duration}),ht(()=>this.notify()),!0}togglePending(t){return this.version++,t&&(this.options=t),this.state=Z,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!Mt()||this.timer)return;let{error:e,options:r,state:a,value:n,version:o}=this;this.state=Z,this.timer=ht(async()=>{this.timer=null;let s=null;if(this.changes.size&&(s=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:s}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:s})),s||t)try{await this.wrapperElement.render?.()===!1&&this.state===Z&&this.version===o&&(this.state=a,this.error=e,this.value=n,this.update(),this.notify())}catch(d){this.toggleFailed(this.version,d,r)}})}};We=new WeakMap;function pa(i){return`https://${i==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var ne,ae=class ae extends HTMLAnchorElement{constructor(){super();l(this,"masElement",new ut(this));g(this,ne);this.setAttribute("is",ae.is)}get isUptLink(){return!0}initializeWcsData(e,r){this.setAttribute("data-wcs-osi",e),r&&this.setAttribute("data-promotion-code",r)}attributeChangedCallback(e,r,a){this.masElement.attributeChangedCallback(e,r,a)}connectedCallback(){this.masElement.connectedCallback(),m(this,ne,J()),c(this,ne)&&(this.log=c(this,ne).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),m(this,ne,void 0)}requestUpdate(e=!1){this.masElement.requestUpdate(e)}onceSettled(){return this.masElement.onceSettled()}async render(){let e=J();if(!e)return!1;this.dataset.imsCountry||e.imsCountryPromise.then(o=>{o&&(this.dataset.imsCountry=o)});let r=e.collectCheckoutOptions({},this);if(!r.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let a=this.masElement.togglePending(r),n=e.resolveOfferSelectors(r);try{let[[o]]=await Promise.all(n),{country:s,language:d,env:h}=r,p=`locale=${d}_${s}&country=${s}&offer_id=${o.offerId}`,b=this.getAttribute("data-promotion-code");b&&(p+=`&promotion_code=${encodeURIComponent(b)}`),this.href=`${pa(h)}?${p}`,this.masElement.toggleResolved(a,o,r)}catch(o){let s=new Error(`Could not resolve offer selectors for id: ${r.wcsOsi}.`,o.message);return this.masElement.toggleFailed(a,s,r),!1}}static createFrom(e){let r=new ae;for(let a of e.attributes)a.name!=="is"&&(a.name==="class"&&a.value.includes("upt-link")?r.setAttribute("class",a.value.replace("upt-link","").trim()):r.setAttribute(a.name,a.value));return r.innerHTML=e.innerHTML,r.setAttribute("tabindex",0),r}};ne=new WeakMap,l(ae,"is","upt-link"),l(ae,"tag","a"),l(ae,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var W=ae;window.customElements.get(W.is)||window.customElements.define(W.is,W,{extends:W.tag});var ha="#000000",qt="#F8D904",ma="#EAEAEA",ga="#31A547",ua=/(accent|primary|secondary)(-(outline|link))?/,fa="mas:product_code/",xa="daa-ll",ft="daa-lh",va=["XL","L","M","S"],Ut="...";function R(i,t,e,r){let a=r[i];if(t[i]&&a){let n={slot:a?.slot,...a?.attributes},o=t[i];if(a.maxCount&&typeof o=="string"){let[d,h]=Na(o,a.maxCount,a.withSuffix);d!==o&&(n.title=h,o=d)}let s=L(a.tag,n,o);e.append(s)}}function ba(i,t,e){let r=i.mnemonicIcon?.map((n,o)=>({icon:n,alt:i.mnemonicAlt[o]??"",link:i.mnemonicLink[o]??""}));r?.forEach(({icon:n,alt:o,link:s})=>{if(s&&!/^https?:/.test(s))try{s=new URL(`https://${s}`).href.toString()}catch{s="#"}let d={slot:"icons",src:n,loading:t.loading,size:e?.size??"l"};o&&(d.alt=o),s&&(d.href=s);let h=L("merch-icon",d);t.append(h)});let a=t.shadowRoot.querySelector('slot[name="icons"]');a&&(a.style.display=r?.length?null:"none")}function ya(i,t,e){if(e.badge?.slot){if(i.badge?.length&&!i.badge?.startsWith("${i.badge}`}R("badge",i,t,e)}else i.badge?(t.setAttribute("badge-text",i.badge),e.disabledAttributes?.includes("badgeColor")||t.setAttribute("badge-color",i.badgeColor||ha),e.disabledAttributes?.includes("badgeBackgroundColor")||t.setAttribute("badge-background-color",i.badgeBackgroundColor||qt),t.setAttribute("border-color",i.badgeBackgroundColor||qt)):t.setAttribute("border-color",i.borderColor||ma)}function wa(i,t,e){if(e.trialBadge&&i.trialBadge){if(!i.trialBadge.startsWith("${i.trialBadge}`}R("trialBadge",i,t,e)}}function Ea(i,t,e){e?.includes(i.size)&&t.setAttribute("size",i.size)}function ka(i,t){i.cardName&&t.setAttribute("name",i.cardName)}function Sa(i,t,e){i.cardTitle&&(i.cardTitle=_e(i.cardTitle)),R("cardTitle",i,t,{cardTitle:e})}function Aa(i,t,e){R("subtitle",i,t,e)}function Ca(i,t,e,r){if(!i.backgroundColor||i.backgroundColor.toLowerCase()==="default"){t.style.removeProperty("--merch-card-custom-background-color"),t.removeAttribute("background-color");return}e?.[i.backgroundColor]?(t.style.setProperty("--merch-card-custom-background-color",`var(${e[i.backgroundColor]})`),t.setAttribute("background-color",i.backgroundColor)):r?.attribute&&i.backgroundColor&&(t.setAttribute(r.attribute,i.backgroundColor),t.style.removeProperty("--merch-card-custom-background-color"))}function Ta(i,t,e){let r=e?.borderColor,a="--consonant-merch-card-border-color";if(i.borderColor?.toLowerCase()==="transparent")t.style.setProperty(a,"transparent");else if(i.borderColor&&r){let o=r?.specialValues?.[i.borderColor]?.includes("gradient")||/-gradient/.test(i.borderColor),s=/^spectrum-.*-plans$/.test(i.borderColor);if(o){t.setAttribute("gradient-border","true");let d=i.borderColor;if(r?.specialValues){for(let[h,p]of Object.entries(r.specialValues))if(p===i.borderColor){d=h;break}}t.setAttribute("border-color",d),t.style.removeProperty(a)}else s?(t.setAttribute("border-color",i.borderColor),t.style.setProperty(a,`var(--${i.borderColor})`)):t.style.setProperty(a,`var(--${i.borderColor})`)}}function La(i,t,e){if(i.backgroundImage){let r={loading:t.loading??"lazy",src:i.backgroundImage};if(i.backgroundImageAltText?r.alt=i.backgroundImageAltText:r.role="none",!e)return;if(e?.attribute){t.setAttribute(e.attribute,i.backgroundImage);return}t.append(L(e.tag,{slot:e.slot},L("img",r)))}}function _e(i){return!i||typeof i!="string"||i.includes("(wt(),yt)).catch(console.error),i}function za(i,t,e){i.prices&&(i.prices=_e(i.prices)),R("prices",i,t,e)}function si(i,t,e){let r=i.hasAttribute("data-wcs-osi")&&!!i.getAttribute("data-wcs-osi"),a=i.className||"",n=ua.exec(a)?.[0]??"accent",o=n.includes("accent"),s=n.includes("primary"),d=n.includes("secondary"),h=n.includes("-outline"),p=n.includes("-link");i.classList.remove("accent","primary","secondary");let b;if(t.consonant)b=Fa(i,o,r,p,s);else if(p)b=i;else{let P;o?P="accent":s?P="primary":d&&(P="secondary"),b=t.spectrum==="swc"?Ia(i,e,h,P,r):$a(i,e,h,P,r)}return b}function _a(i,t){let{slot:e}=t?.description,r=i.querySelectorAll(`[slot="${e}"] a[data-wcs-osi]`);r.length&&r.forEach(a=>{let n=si(a,i,t);a.replaceWith(n)})}function Pa(i,t,e){i.description&&(i.description=_e(i.description)),i.promoText&&(i.promoText=_e(i.promoText)),i.shortDescription&&(i.shortDescription=_e(i.shortDescription)),R("promoText",i,t,e),R("description",i,t,e),R("shortDescription",i,t,e),i.shortDescription&&(t.setAttribute("action-menu","true"),i.actionMenuLabel||t.setAttribute("action-menu-label","More options")),_a(t,e),R("callout",i,t,e),R("quantitySelect",i,t,e),R("whatsIncluded",i,t,e)}function Ma(i,t,e){if(!e.addon)return;let r=i.addon?.replace(/[{}]/g,"");if(!r||/disabled/.test(r))return;let a=L("merch-addon",{slot:"addon"},r);[...a.querySelectorAll(y)].forEach(n=>{let o=n.parentElement;o?.nodeName==="P"&&o.setAttribute("data-plan-type","")}),t.append(a)}function Ra(i,t,e){i.addonConfirmation&&R("addonConfirmation",i,t,e)}function Oa(i,t,e,r){r?.secureLabel&&e?.secureLabel&&t.setAttribute("secure-label",r.secureLabel)}function Na(i,t,e=!0){try{let r=typeof i!="string"?"":i,a=oi(r);if(a.length<=t)return[r,a];let n=0,o=!1,s=e?t-Ut.length<1?1:t-Ut.length:t,d=[];for(let b of r){if(n++,b==="<")if(o=!0,r[n]==="/")d.pop();else{let P="";for(let le of r.substring(n)){if(le===" "||le===">")break;P+=le}d.push(P)}if(b==="/"&&r[n]===">"&&d.pop(),b===">"){o=!1;continue}if(!o&&(s--,s===0))break}let h=r.substring(0,n).trim();if(d.length>0){d[0]==="p"&&d.shift();for(let b of d.reverse())h+=`${b}>`}return[`${h}${e?Ut:""}`,a]}catch{let a=typeof i=="string"?i:"",n=oi(a);return[a,n]}}function oi(i){if(!i)return"";let t="",e=!1;for(let r of i){if(r==="<"&&(e=!0),r===">"){e=!1;continue}e||(t+=r)}return t}function Da(i,t){t.querySelectorAll("a.upt-link").forEach(r=>{let a=W.createFrom(r);r.replaceWith(a),a.initializeWcsData(i.osi,i.promoCode)})}function $a(i,t,e,r,a){let n=i;a?n=customElements.get("checkout-button").createCheckoutButton({},i.innerHTML):n.innerHTML=`${n.textContent}`,n.setAttribute("tabindex",0);for(let p of i.attributes)["class","is"].includes(p.name)||n.setAttribute(p.name,p.value);n.firstElementChild?.classList.add("spectrum-Button-label");let o=t?.ctas?.size??"M",s=`spectrum-Button--${r}`,d=va.includes(o)?`spectrum-Button--size${o}`:"spectrum-Button--sizeM",h=["spectrum-Button",s,d];return e&&h.push("spectrum-Button--outline"),n.classList.add(...h),n}function Ia(i,t,e,r,a){let n=i;a&&(n=customElements.get("checkout-button").createCheckoutButton(i.dataset),n.connectedCallback(),n.render());let o="fill";e&&(o="outline");let s=L("sp-button",{treatment:o,variant:r,tabIndex:0,size:t?.ctas?.size??"m",...i.dataset.analyticsId&&{"data-analytics-id":i.dataset.analyticsId}},i.innerHTML);return s.source=n,(a?n.onceSettled():Promise.resolve(n)).then(d=>{s.setAttribute("data-navigation-url",d.href)}),s.addEventListener("click",d=>{d.defaultPrevented||n.click()}),s}function Fa(i,t,e,r,a){let n=i;return e&&(n=customElements.get("checkout-link").createCheckoutLink(i.dataset,i.innerHTML)),r||(n.classList.add("button","con-button"),t&&n.classList.add("blue"),a&&n.classList.add("primary")),n}function Ba(i,t,e,r){if(i.ctas){i.ctas=_e(i.ctas);let{slot:a}=e.ctas,n=L("div",{slot:a},i.ctas),o=[...n.querySelectorAll("a")].map(s=>si(s,t,e));n.innerHTML="",n.append(...o),t.append(n)}}function Ha(i,t){let{tags:e}=i,r=e?.find(n=>n.startsWith(fa))?.split("/").pop();if(!r)return;t.setAttribute(ft,r),[...t.shadowRoot.querySelectorAll("a[data-analytics-id],button[data-analytics-id]"),...t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]")].forEach((n,o)=>{n.setAttribute(xa,`${n.dataset.analyticsId}-${o+1}`)})}function qa(i){i.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,e])=>{i.querySelectorAll(`a.${t}`).forEach(r=>{r.classList.remove(t),r.classList.add("spectrum-Link",`spectrum-Link--${e}`)})})}function Ua(i){i.querySelectorAll("[slot]").forEach(r=>{r.remove()}),i.variant=void 0,["checkbox-label","stock-offer-osis","secure-label","background-image","background-color","border-color","badge-background-color","badge-color","badge-text","gradient-border","size",ft].forEach(r=>i.removeAttribute(r));let e=["wide-strip","thin-strip"];i.classList.remove(...e)}async function ci(i,t){if(!i){let d=t?.id||"unknown";throw console.error(`hydrate: Fragment is undefined. Cannot hydrate card (merchCard id: ${d}).`),new Error(`hydrate: Fragment is undefined for card (merchCard id: ${d}).`)}if(!i.fields){let d=i.id||"unknown",h=t?.id||"unknown";throw console.error(`hydrate: Fragment for card ID '${d}' (merchCard id: ${h}) is missing 'fields'. Cannot hydrate.`),new Error(`hydrate: Fragment for card ID '${d}' (merchCard id: ${h}) is missing 'fields'.`)}let{id:e,fields:r,settings:a={},priceLiterals:n}=i,{variant:o}=r;if(!o)throw new Error(`hydrate: no variant found in payload ${e}`);Ua(t),t.settings=a,n&&(t.priceLiterals=n),t.id??(t.id=i.id),t.variant=o,await t.updateComplete;let{aemFragmentMapping:s}=t.variantLayout;if(!s)throw new Error(`hydrate: variant mapping not found for ${e}`);s.style==="consonant"&&t.setAttribute("consonant",!0),ba(r,t,s.mnemonics),ya(r,t,s),wa(r,t,s),Ea(r,t,s.size),ka(r,t),Sa(r,t,s.title),Aa(r,t,s),za(r,t,s),La(r,t,s.backgroundImage),Ca(r,t,s.allowedColors,s.backgroundColor),Ta(r,t,s),Pa(r,t,s),Ma(r,t,s),Ra(r,t,s),Oa(r,t,s,a),Da(r,t),Ba(r,t,s,o),Ha(r,t),qa(t)}var Gt="merch-card",jt=2e4,li="merch-card:",Ga=["full-pricing-express","simplified-pricing-express"];function di(i,t){let e=i.closest(Gt);if(!e)return t;e.priceLiterals&&(t.literals??(t.literals={}),Object.assign(t.literals,e.priceLiterals)),e.aemFragment&&(t[hr]=!0),e.variantLayout?.priceOptionsProvider?.(i,t)}function Va(i){i.providers.has(di)||i.providers.price(di)}var pi=new IntersectionObserver(i=>{i.forEach(t=>{t.target.clientHeight!==0&&(pi.unobserve(t.target),t.target.requestUpdate())})}),Ya=0,Pe,Me,Re,U,se,F,ce,k,oe,xt,hi,vt,Q=class extends ja{constructor(){super();g(this,k);g(this,Pe);g(this,Me);g(this,Re);g(this,U);g(this,se);g(this,F);g(this,ce,new Promise(e=>{m(this,F,e)}));l(this,"customerSegment");l(this,"marketSegment");l(this,"variantLayout");this.id=null,this.failed=!1,this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.loading="lazy",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this),this.handleMerchOfferSelectReady=this.handleMerchOfferSelectReady.bind(this)}firstUpdated(){this.variantLayout=_t(this),this.variantLayout?.connectedCallbackHook()}willUpdate(e){(e.has("variant")||!this.variantLayout)&&(this.variantLayout?.disconnectedCallbackHook(),this.variantLayout=_t(this),this.variantLayout?.connectedCallbackHook())}updated(e){(e.has("badgeBackgroundColor")||e.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),e.has("backgroundColor")&&this.style.setProperty("--merch-card-custom-background-color",this.backgroundColor?`var(--${this.backgroundColor})`:"");try{this.variantLayoutPromise=this.variantLayout?.postCardUpdateHook(e)}catch(r){S(this,k,oe).call(this,`Error in postCardUpdateHook: ${r.message}`,{},!1)}}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["ccd-slice","ccd-suggested","ah-promoted-plans","simplified-pricing-express","full-pricing-express"].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 descriptionSlot(){return this.shadowRoot.querySelector('slot[name="body-xs"')?.assignedElements()[0]}get descriptionSlotCompare(){return this.shadowRoot.querySelector('slot[name="body-m"')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector(y)}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll(j)??[]]}get checkoutLinksDescription(){return[...this.descriptionSlot?.querySelectorAll(j)??[]]}get checkoutLinkDescriptionCompare(){return[...this.descriptionSlotCompare?.querySelectorAll(j)??[]]}get activeDescriptionLinks(){return this.variant==="mini-compare-chart"?this.checkoutLinkDescriptionCompare:this.checkoutLinksDescription}async toggleStockOffer({target:e}){if(!this.stockOfferOsis)return;let r=this.checkoutLinks;if(r.length!==0)for(let a of r){await a.onceSettled();let n=a.value?.[0]?.planType;if(!n)return;let o=this.stockOfferOsis[n];if(!o)return;let s=a.dataset.wcsOsi.split(",").filter(d=>d!==o);e.checked&&s.push(o),a.dataset.wcsOsi=s.join(",")}}changeHandler(e){e.target.tagName==="MERCH-ADDON"&&this.toggleAddon(e.target)}toggleAddon(e){this.variantLayout?.toggleAddon?.(e);let r=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(r.length===0)return;let a=n=>{let{offerType:o,planType:s}=n.value?.[0]??{};if(!o||!s)return;let d=e.getOsi(s,o),h=(n.dataset.wcsOsi||"").split(",").filter(p=>p&&p!==d);e.checked&&h.push(d),n.dataset.wcsOsi=h.join(",")};r.forEach(a)}handleQuantitySelection(e){let r=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(r.length!==0)for(let a of r)a.dataset.quantity=e.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(e){let r={...this.filters};Object.keys(r).forEach(a=>{if(e){r[a].order=Math.min(r[a].order||2,2);return}let n=r[a].order;n===1||isNaN(n)||(r[a].order=Number(n)+1)}),this.filters=r}includes(e){return this.textContent.match(new RegExp(e,"i"))!==null}connectedCallback(){var r;super.connectedCallback(),c(this,Me)||m(this,Me,Ya++),this.aemFragment||((r=c(this,F))==null||r.call(this),m(this,F,void 0)),this.id??(this.id=this.getAttribute("id")??this.aemFragment?.getAttribute("fragment"));let e=this.id??c(this,Me);m(this,se,`${li}${e}${Ze}`),m(this,Pe,`${li}${e}${Je}`),performance.mark(c(this,se)),m(this,U,J()),Va(c(this,U)),m(this,Re,c(this,U).Log.module(Gt)),this.addEventListener(B,this.handleQuantitySelection),this.addEventListener(Et,this.handleAddonAndQuantityUpdate),this.addEventListener(rr,this.handleMerchOfferSelectReady),this.addEventListener(me,this.handleAemFragmentEvents),this.addEventListener(he,this.handleAemFragmentEvents),this.addEventListener("change",this.changeHandler),this.variantLayout&&this.variantLayout.connectedCallbackHook(),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(B,this.handleQuantitySelection),this.removeEventListener(me,this.handleAemFragmentEvents),this.removeEventListener(he,this.handleAemFragmentEvents),this.removeEventListener("change",this.changeHandler),this.removeEventListener(Et,this.handleAddonAndQuantityUpdate)}async handleAemFragmentEvents(e){var r;if(this.isConnected&&(e.type===me&&S(this,k,oe).call(this,"AEM fragment cannot be loaded"),e.type===he&&(this.failed=!1,e.target.nodeName==="AEM-FRAGMENT"))){let a=e.detail;try{c(this,F)||m(this,ce,new Promise(n=>{m(this,F,n)})),ci(a,this)}catch(n){S(this,k,oe).call(this,`hydration has failed: ${n.message}`)}finally{(r=c(this,F))==null||r.call(this),m(this,F,void 0)}this.checkReady()}}async checkReady(){if(!this.isConnected)return;c(this,ce)&&(await c(this,ce),Ga.includes(this.variantLayout)&&pi.observe(this),m(this,ce,void 0)),this.variantLayoutPromise&&(await this.variantLayoutPromise,this.variantLayoutPromise=void 0);let e=new Promise(o=>setTimeout(()=>o("timeout"),jt));if(this.aemFragment){let o=await Promise.race([this.aemFragment.updateComplete,e]);if(o===!1||o==="timeout"){let s=o==="timeout"?`AEM fragment was not resolved within ${jt} timeout`:"AEM fragment cannot be loaded";S(this,k,oe).call(this,s,{},!1);return}}let r=[...this.querySelectorAll(tr)],a=Promise.all(r.map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(s=>s.classList.contains("placeholder-resolved"))),n=await Promise.race([a,e]);if(n===!0){this.measure=performance.measure(c(this,Pe),c(this,se));let o={...this.aemFragment?.fetchInfo,...c(this,U).duration,measure:ge(this.measure)};return this.dispatchEvent(new CustomEvent(nr,{bubbles:!0,composed:!0,detail:o})),this}else{this.measure=performance.measure(c(this,Pe),c(this,se));let o={measure:ge(this.measure),...c(this,U).duration};n==="timeout"?S(this,k,oe).call(this,`Contains offers that were not resolved within ${jt} timeout`,o):S(this,k,oe).call(this,"Contains unresolved offers",o)}}get aemFragment(){return this.querySelector("aem-fragment")}get addon(){return this.querySelector("merch-addon")}get quantitySelect(){return this.querySelector("merch-quantity-select")}get addonCheckbox(){return this.querySelector("merch-addon")}displayFooterElementsInColumn(){if(!this.classList.contains("product"))return;let e=this.shadowRoot.querySelector(".secure-transaction-label");(this.footerSlot?.querySelectorAll(j)).length===2&&e&&e.parentElement.classList.add("footer-column")}handleMerchOfferSelectReady(){this.offerSelect&&!this.offerSelect.planType||this.displayFooterElementsInColumn()}get dynamicPrice(){return this.querySelector('[slot="price"]')}handleAddonAndQuantityUpdate({detail:{id:e,items:r}}){if(!e||!r?.length||this.closest('[role="tabpanel"][hidden="true"]'))return;let n=this.checkoutLinks.find(p=>p.getAttribute("data-modal-id")===e);if(!n)return;let s=new URL(n.getAttribute("href")).searchParams.get("pa"),d=r.find(p=>p.productArrangementCode===s)?.quantity,h=!!r.find(p=>p.productArrangementCode!==s);if(d&&this.quantitySelect?.dispatchEvent(new CustomEvent(ar,{detail:{quantity:d},bubbles:!0,composed:!0})),this.addonCheckbox&&this.addonCheckbox.checked!==h){this.toggleStockOffer({target:this.addonCheckbox});let p=new Event("change",{bubbles:!0,cancelable:!0});Object.defineProperty(p,"target",{writable:!1,value:{checked:h}}),this.addonCheckbox.handleChange(p)}}get prices(){return Array.from(this.querySelectorAll(y))}get promoPrice(){if(!this.querySelector("span.price-strikethrough"))return;let e=this.querySelector(".price.price-alternative");if(e||(e=this.querySelector(`${y}[data-template="price"] > span`)),!!e)return e=e.innerText,e}get regularPrice(){return c(this,k,xt)?.innerText}get promotionCode(){let e=[...this.querySelectorAll(`${y}[data-promotion-code],${j}[data-promotion-code]`)].map(a=>a.dataset.promotionCode),r=[...new Set(e)];return r.length>1&&c(this,Re)?.warn(`Multiple different promotion codes found: ${r.join(", ")}`),e[0]}get annualPrice(){return this.querySelector(`${y}[data-template="price"] > .price.price-annual`)?.innerText}get promoText(){}get taxText(){return(c(this,k,hi)??c(this,k,xt))?.querySelector("span.price-tax-inclusivity")?.textContent?.trim()||void 0}get recurrenceText(){return c(this,k,xt)?.querySelector("span.price-recurrence")?.textContent?.trim()}get planTypeText(){return this.querySelector('[is="inline-price"][data-template="legal"] span.price-plan-type')?.textContent?.trim()}get seeTermsInfo(){let e=this.querySelector('a[is="upt-link"]');if(e)return S(this,k,vt).call(this,e)}get renewalText(){return this.querySelector("span.renewal-text")?.textContent?.trim()}get promoDurationText(){return this.querySelector("span.promo-duration-text")?.textContent?.trim()}get ctas(){let e=this.querySelector('[slot="ctas"], [slot="footer"]')?.querySelectorAll(`${j}, a`);return Array.from(e??[])}get primaryCta(){return S(this,k,vt).call(this,this.ctas.find(e=>e.variant==="accent"||e.matches(".spectrum-Button--accent,.con-button.blue")))}get secondaryCta(){return S(this,k,vt).call(this,this.ctas.find(e=>e.variant!=="accent"&&!e.matches(".spectrum-Button--accent,.con-button.blue")))}};Pe=new WeakMap,Me=new WeakMap,Re=new WeakMap,U=new WeakMap,se=new WeakMap,F=new WeakMap,ce=new WeakMap,k=new WeakSet,oe=function(e,r={},a=!0){if(!this.isConnected)return;let o=this.aemFragment?.getAttribute("fragment");o=`[${o}]`;let s={...this.aemFragment.fetchInfo,...c(this,U).duration,...r,message:e};c(this,Re).error(`merch-card${o}: ${e}`,s),this.failed=!0,a&&this.dispatchEvent(new CustomEvent(or,{bubbles:!0,composed:!0,detail:s}))},xt=function(){return this.querySelector("span.price-strikethrough")??this.querySelector(`${y}[data-template="price"] > span`)},hi=function(){return this.querySelector(`${y}[data-template="legal"]`)},vt=function(e){if(e)return{text:e.innerText.trim(),analyticsId:e.dataset.analyticsId,href:e.getAttribute("href")??e.dataset.href}},l(Q,"properties",{id:{type:String,attribute:"id",reflect:!0},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},backgroundColor:{type:String,attribute:"background-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"},actionMenuLabel:{type:String,attribute:"action-menu-label"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},failed:{type:Boolean,attribute:"failed",reflect:!0},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},addonTitle:{type:String,attribute:"addon-title"},addonOffers:{type:Object,attribute:"addon-offers"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0},settings:{type:Object,attribute:!1},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:e=>{if(!e)return;let[r,a,n]=e.split(",");return{PUF:r,ABM:a,M2M:n}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:e=>Object.fromEntries(e.split(",").map(r=>{let[a,n,o]=r.split(":"),s=Number(n);return[a,{order:isNaN(s)?void 0:s,size:o}]})),toAttribute:e=>Object.entries(e).map(([r,{order:a,size:n}])=>[r,a,n].filter(o=>o!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:ft,reflect:!0},loading:{type:String},priceLiterals:{type:Object}}),l(Q,"styles",[Zt,...Jt()]),l(Q,"registerVariant",C),l(Q,"getCollectionOptions",$r),l(Q,"getFragmentMapping",it);customElements.define(Gt,Q);export{Q as MerchCard};
diff --git a/web-components/src/variants/variant-layout.js b/web-components/src/variants/variant-layout.js
index 4eb3ed17a..82e172fd1 100644
--- a/web-components/src/variants/variant-layout.js
+++ b/web-components/src/variants/variant-layout.js
@@ -19,8 +19,9 @@ export class VariantLayout {
}
insertVariantStyle() {
- if (!VariantLayout.styleMap[this.card.variant]) {
- VariantLayout.styleMap[this.card.variant] = true;
+ const styleKey = this.constructor.name;
+ if (!VariantLayout.styleMap[styleKey]) {
+ VariantLayout.styleMap[styleKey] = true;
const styles = document.createElement('style');
styles.innerHTML = this.getGlobalCSS();
document.head.appendChild(styles);
diff --git a/web-components/src/variants/variants.js b/web-components/src/variants/variants.js
index 97e943274..251ab237d 100644
--- a/web-components/src/variants/variants.js
+++ b/web-components/src/variants/variants.js
@@ -28,6 +28,11 @@ import { Mini, MINI_AEM_FRAGMENT_MAPPING } from './mini.js';
// Registry for dynamic variants
const variantRegistry = new Map();
+const variantState = new WeakMap();
+
+// Cache for variant stylesheets to avoid duplicates
+const variantStyleSheets = new Map();
+
// Function to register a new variant
export const registerVariant = (
name,
@@ -109,24 +114,64 @@ registerVariant(
);
registerVariant('mini', Mini, MINI_AEM_FRAGMENT_MAPPING, Mini.variantStyle);
-const getVariantLayout = (card) => {
- const variantInfo = variantRegistry.get(card.variant);
- if (!variantInfo) {
- return undefined;
- }
- const { class: VariantClass, style } = variantInfo;
- if (style) {
- try {
- const sheet = new CSSStyleSheet();
+const applyStyleSheet = (card, style, state) => {
+ try {
+ let sheet = variantStyleSheets.get(card.variant);
+ if (!sheet) {
+ sheet = new CSSStyleSheet();
sheet.replaceSync(style.cssText);
+ variantStyleSheets.set(card.variant, sheet);
+ }
+
+ // Remove old sheet if exists and it's different
+ if (state?.styleSheet && state.styleSheet !== sheet) {
+ const index = card.shadowRoot.adoptedStyleSheets.indexOf(
+ state.styleSheet,
+ );
+ if (index !== -1) {
+ card.shadowRoot.adoptedStyleSheets.splice(index, 1);
+ }
+ }
+
+ if (!card.shadowRoot.adoptedStyleSheets.includes(sheet)) {
card.shadowRoot.adoptedStyleSheets.push(sheet);
- } catch (e) {
- // If CSSStyleSheet constructor fails, fall back to style element
- const styleElement = document.createElement('style');
- styleElement.textContent = style.cssText;
- card.shadowRoot.appendChild(styleElement);
}
+
+ return { styleSheet: sheet };
+ } catch (e) {
+ // Fallback for browsers without CSSStyleSheet constructor
+ const styleElement = document.createElement('style');
+ styleElement.textContent = style.cssText;
+ styleElement.setAttribute('data-variant-style', card.variant);
+
+ // Remove old style element
+ const oldElement =
+ state?.styleElement ||
+ card.shadowRoot.querySelector('[data-variant-style]');
+ if (oldElement) oldElement.remove();
+
+ card.shadowRoot.appendChild(styleElement);
+ return { styleElement };
+ }
+};
+
+const getVariantLayout = (card) => {
+ const variantInfo = variantRegistry.get(card.variant);
+ if (!variantInfo) return undefined;
+
+ const { class: VariantClass, style } = variantInfo;
+ const state = variantState.get(card);
+
+ if (state?.appliedVariant === card.variant) {
+ return new VariantClass(card);
}
+
+ const styleState = style ? applyStyleSheet(card, style, state) : {};
+ variantState.set(card, {
+ appliedVariant: card.variant,
+ ...styleState,
+ });
+
return new VariantClass(card);
};
diff --git a/web-components/test/merch-card.test.html.js b/web-components/test/merch-card.test.html.js
index 6dc3fbb4e..abfefd869 100644
--- a/web-components/test/merch-card.test.html.js
+++ b/web-components/test/merch-card.test.html.js
@@ -98,4 +98,59 @@ runTests(async () => {
expect(borderColor).to.exist;
expect(borderColor).to.not.equal('');
});
+
+ describe('variant stylesheet handling', () => {
+ it('should apply variant stylesheet to shadowRoot.adoptedStyleSheets', async () => {
+ const plansCard = document.querySelector(
+ 'merch-card[variant="plans"]',
+ );
+ expect(plansCard.shadowRoot.adoptedStyleSheets).to.be.an('array');
+ expect(
+ plansCard.shadowRoot.adoptedStyleSheets.length,
+ ).to.be.greaterThan(0);
+ });
+
+ it('should cache stylesheet for same variant cards', async () => {
+ const plansCards = document.querySelectorAll(
+ 'merch-card[variant="plans"]',
+ );
+ expect(plansCards.length).to.be.greaterThan(1);
+ const sheets1 = plansCards[0].shadowRoot.adoptedStyleSheets;
+ const sheets2 = plansCards[1].shadowRoot.adoptedStyleSheets;
+ const variantSheet1 = sheets1[sheets1.length - 1];
+ const variantSheet2 = sheets2[sheets2.length - 1];
+ expect(variantSheet1).to.equal(variantSheet2);
+ });
+
+ it('should not have duplicate stylesheets in adoptedStyleSheets', async () => {
+ const plansCard = document.querySelector(
+ 'merch-card[variant="plans"]',
+ );
+ const sheets = plansCard.shadowRoot.adoptedStyleSheets;
+ const uniqueSheets = new Set(sheets);
+ expect(sheets.length).to.equal(uniqueSheets.size);
+ });
+
+ it('should have different stylesheets for different variants', async () => {
+ const plansCard = document.querySelector(
+ 'merch-card[variant="plans"]',
+ );
+ const segmentCard = document.querySelector(
+ 'merch-card[variant="segment"]',
+ );
+ const plansSheets = plansCard.shadowRoot.adoptedStyleSheets;
+ const segmentSheets = segmentCard.shadowRoot.adoptedStyleSheets;
+ const plansVariantSheet = plansSheets[plansSheets.length - 1];
+ const segmentVariantSheet = segmentSheets[segmentSheets.length - 1];
+ expect(plansVariantSheet).to.not.equal(segmentVariantSheet);
+ });
+
+ it('should have variantLayout property set on card', async () => {
+ const plansCard = document.querySelector(
+ 'merch-card[variant="plans"]',
+ );
+ expect(plansCard.variantLayout).to.exist;
+ expect(plansCard.variantLayout.card).to.equal(plansCard);
+ });
+ });
});