diff --git a/.github/workflows/merge-to-stage.js b/.github/workflows/merge-to-stage.js index c48c478933..36e6e26cf4 100644 --- a/.github/workflows/merge-to-stage.js +++ b/.github/workflows/merge-to-stage.js @@ -52,7 +52,12 @@ let body = ` const isHighPrio = (labels) => labels.includes(LABELS.highPriority); const isZeroImpact = (labels) => labels.includes(LABELS.zeroImpact); -const hasFailingChecks = (checks) => checks.some(({ conclusion, name }) => name !== 'merge-to-stage' && conclusion === 'failure'); +const hasFailingChecks = (checks) => + checks.some( + ({ conclusion, name }) => + name !== 'merge-to-stage' && + (conclusion === 'in_progress' || conclusion === 'failure') + ); const commentOnPR = async (comment, prNumber) => { console.log(comment); // Logs for debugging the action. @@ -90,7 +95,7 @@ const getPRs = async () => { prs = prs.filter(({ checks, reviews, number, title }) => { if (hasFailingChecks(checks)) { - commentOnPR(`Skipped merging ${number}: ${title} due to failing checks`, number); + commentOnPR(`Skipped merging ${number}: ${title} due to failing or running checks`, number); return false; } diff --git a/libs/blocks/accordion/accordion.js b/libs/blocks/accordion/accordion.js index f67abbcbc6..2c1fced2e5 100644 --- a/libs/blocks/accordion/accordion.js +++ b/libs/blocks/accordion/accordion.js @@ -17,11 +17,9 @@ function toggleMedia(con, trig, status) { trig.setAttribute('hidden', ''); trig.setAttribute('aria-expanded', 'false'); con.setAttribute('hidden', ''); - con.setAttribute('aria-expanded', 'false'); } else { trig.setAttribute('aria-expanded', 'true'); trig.removeAttribute('hidden'); - con.setAttribute('aria-expanded', 'true'); con.removeAttribute('hidden'); } } diff --git a/libs/blocks/global-footer/global-footer.js b/libs/blocks/global-footer/global-footer.js index 0b370ab828..e257c3d781 100644 --- a/libs/blocks/global-footer/global-footer.js +++ b/libs/blocks/global-footer/global-footer.js @@ -209,8 +209,6 @@ class Footer {
`:x` ${this.alt}`}};p(St,"properties",{size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}}),p(St,"styles",C` :host { --img-width: 32px; --img-height: 32px; @@ -2109,9 +2111,7 @@ body.merch-modal { width: var(--mod-img-width, var(--img-width)); height: var(--mod-img-height, var(--img-height)); } - `);customElements.define("merch-icon",mt);var Jo=new CSSStyleSheet;Jo.replaceSync(":host { display: contents; }");var Nc=document.querySelector('meta[name="aem-base-url"]')?.content??"https://odin.adobe.com",Wo="fragment",qo="author",kc="ims",Zo=e=>{throw new Error(`Failed to get fragment: ${e}`)};async function Oc(e,t,r,n){let i=r?`${e}/adobe/sites/cf/fragments/${t}`:`${e}/adobe/sites/fragments/${t}`,o=await fetch(i,{cache:"default",credentials:"omit",headers:n}).catch(a=>Zo(a.message));return o?.ok||Zo(`${o.status} ${o.statusText}`),o.json()}var zn,Se,Fn=class{constructor(){G(this,Se,new Map)}clear(){L(this,Se).clear()}add(...t){t.forEach(r=>{let{id:n}=r;n&&L(this,Se).set(n,r)})}has(t){return L(this,Se).has(t)}get(t){return L(this,Se).get(t)}remove(t){L(this,Se).delete(t)}};Se=new WeakMap;var Er=new Fn,De,me,ye,Mt,pe,pt,fe,jn,Qo,ea,Kn=class extends HTMLElement{constructor(){super();G(this,fe);p(this,"cache",Er);G(this,De);G(this,me);G(this,ye);G(this,Mt,!1);G(this,pe);G(this,pt,!1);this.attachShadow({mode:"open"}),this.shadowRoot.adoptedStyleSheets=[Jo];let r=this.getAttribute(kc);["",!0,"true"].includes(r)&&(F(this,Mt,!0),zn||(zn={Authorization:`Bearer ${window.adobeid?.authorize?.()}`}))}static get observedAttributes(){return[Wo,qo]}attributeChangedCallback(r,n,i){r===Wo&&(F(this,ye,i),this.refresh(!1)),r===qo&&F(this,pt,["","true"].includes(i))}connectedCallback(){if(!L(this,ye)){xe(this,fe,jn).call(this,"Missing fragment id");return}}async refresh(r=!0){L(this,pe)&&!await Promise.race([L(this,pe),Promise.resolve(!1)])||(r&&Er.remove(L(this,ye)),F(this,pe,this.fetchData().then(()=>(this.dispatchEvent(new CustomEvent($e,{detail:this.data,bubbles:!0,composed:!0})),!0)).catch(n=>(xe(this,fe,jn).call(this,"Network error: failed to load fragment"),F(this,pe,null),!1))),L(this,pe))}async fetchData(){F(this,De,null),F(this,me,null);let r=Er.get(L(this,ye));r||(r=await Oc(Nc,L(this,ye),L(this,pt),L(this,Mt)?zn:void 0),Er.add(r)),F(this,De,r)}get updateComplete(){return L(this,pe)??Promise.reject(new Error("AEM fragment cannot be loaded"))}get data(){return L(this,me)?L(this,me):(L(this,pt)?xe(this,fe,Qo).call(this):xe(this,fe,ea).call(this),L(this,me))}};De=new WeakMap,me=new WeakMap,ye=new WeakMap,Mt=new WeakMap,pe=new WeakMap,pt=new WeakMap,fe=new WeakSet,jn=function(r){this.classList.add("error"),this.dispatchEvent(new CustomEvent(Me,{detail:r,bubbles:!0,composed:!0}))},Qo=function(){let{fields:r,id:n,tags:i}=L(this,De);F(this,me,r.reduce((o,{name:a,multiple:s,values:c})=>(o.fields[a]=s?c:c[0],o),{fields:{},id:n,tags:i}))},ea=function(){let{fields:r,id:n,tags:i}=L(this,De);F(this,me,Object.entries(r).reduce((o,[a,s])=>(o.fields[a]=s?.mimeType?s.value:s??"",o),{fields:{},id:n,tags:i}))};customElements.define("aem-fragment",Kn);var Be={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},ta=1e3,ra=new Set;function Rc(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function na(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:i,status:o}=e;return[n,o,i].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Be.serializableTypes.includes(r))return r}return e}function Vc(e,t){if(!Be.ignoredProperties.includes(e))return na(t)}var Yn={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],i=[],o=t;r.forEach(l=>{l!=null&&(Rc(l)?n:i).push(l)}),n.length&&(o+=" "+n.map(na).join(" "));let{pathname:a,search:s}=window.location,c=`${Be.delimiter}page=${a}${s}`;c.length>ta&&(c=`${c.slice(0,ta)}`),o+=c,i.length&&(o+=`${Be.delimiter}facts=`,o+=JSON.stringify(i,Vc)),ra.has(o)||(ra.add(o),window.lana?.log(o,Be))}};function ft(e){Object.assign(Be,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Be&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var Ht;(function(e){e.STAGE="STAGE",e.PRODUCTION="PRODUCTION",e.LOCAL="LOCAL"})(Ht||(Ht={}));var Xn;(function(e){e.STAGE="STAGE",e.PRODUCTION="PROD",e.LOCAL="LOCAL"})(Xn||(Xn={}));var Ut;(function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"})(Ut||(Ut={}));var Ge;(function(e){e.V2="UCv2",e.V3="UCv3"})(Ge||(Ge={}));var J;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(J||(J={}));var Wn=function(e){var t;return(t=$c.get(e))!==null&&t!==void 0?t:e},$c=new Map([["countrySpecific","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["offerType","ot"],["marketSegment","ms"]]);var ia=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},oa=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function gt(e,t,r){var n,i;try{for(var o=ia(Object.entries(e)),a=o.next();!a.done;a=o.next()){var s=oa(a.value,2),c=s[0],l=s[1],h=Wn(c);l!=null&&r.has(h)&&t.set(h,l)}}catch(d){n={error:d}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function Sr(e){switch(e){case Ht.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function yr(e,t){var r,n;for(var i in e){var o=e[i];try{for(var a=(r=void 0,ia(Object.entries(o))),s=a.next();!s.done;s=a.next()){var c=oa(s.value,2),l=c[0],h=c[1];if(h!=null){var d=Wn(l);t.set("items["+i+"]["+d+"]",h)}}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}}var Mc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function aa(e){Bc(e);var t=e.env,r=e.items,n=e.workflowStep,i=Mc(e,["env","items","workflowStep"]),o=new URL(Sr(t));return o.pathname=n+"/",yr(r,o.searchParams),gt(i,o.searchParams,Uc),o.toString()}var Uc=new Set(["cli","co","lang","ctx","cUrl","mv","nglwfdata","otac","promoid","rUrl","sdid","spint","trackingid","code","campaignid","appctxid"]),Dc=["env","workflowStep","clientId","country","items"];function Bc(e){var t,r;try{for(var n=Hc(Dc),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!0}var Gc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Fc="p_draft_landscape",Kc="/store/";function Zn(e){Yc(e);var t=e.env,r=e.items,n=e.workflowStep,i=e.ms,o=e.marketSegment,a=e.ot,s=e.offerType,c=e.pa,l=e.productArrangementCode,h=e.landscape,d=Gc(e,["env","items","workflowStep","ms","marketSegment","ot","offerType","pa","productArrangementCode","landscape"]),u={marketSegment:o??i,offerType:s??a,productArrangementCode:l??c},m=new URL(Sr(t));return m.pathname=""+Kc+n,n!==J.SEGMENTATION&&n!==J.CHANGE_PLAN_TEAM_PLANS&&yr(r,m.searchParams),n===J.SEGMENTATION&>(u,m.searchParams,qn),gt(d,m.searchParams,qn),h===Ut.DRAFT&>({af:Fc},m.searchParams,qn),m.toString()}var qn=new Set(["af","ai","apc","appctxid","cli","co","csm","ctx","ctxRtUrl","DCWATC","dp","fr","gsp","ijt","lang","lo","mal","ms","mv","mv2","nglwfdata","ot","otac","pa","pcid","promoid","q","rf","sc","scl","sdid","sid","spint","svar","th","thm","trackingid","usid","workflowid","context.guid","so.ca","so.su","so.tr","so.va"]),jc=["env","workflowStep","clientId","country"];function Yc(e){var t,r;try{for(var n=zc(jc),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}if(e.workflowStep!==J.SEGMENTATION&&e.workflowStep!==J.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}function Jn(e,t){switch(e){case Ge.V2:return aa(t);case Ge.V3:return Zn(t);default:return console.warn("Unsupported CheckoutType, will use UCv3 as default. Given type: "+e),Zn(t)}}var Qn;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Qn||(Qn={}));var U;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(U||(U={}));var k;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(k||(k={}));var ei;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(ei||(ei={}));var ti;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(ti||(ti={}));var ri;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(ri||(ri={}));var ni;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(ni||(ni={}));var sa="tacocat.js";var Tr=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),ca=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function O(e,t={},{metadata:r=!0,search:n=!0,storage:i=!0}={}){let o;if(n&&o==null){let a=new URLSearchParams(window.location.search),s=xt(n)?n:e;o=a.get(s)}if(i&&o==null){let a=xt(i)?i:e;o=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&o==null){let a=Xc(xt(r)?r:e);o=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return o??t[e]}var bt=()=>{};var la=e=>typeof e=="boolean",Dt=e=>typeof e=="function",Lr=e=>typeof e=="number",ha=e=>e!=null&&typeof e=="object";var xt=e=>typeof e=="string",ii=e=>xt(e)&&e,vt=e=>Lr(e)&&Number.isFinite(e)&&e>0;function At(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,n])=>{t(n)&&delete e[r]}),e}function T(e,t){if(la(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Te(e,t,r){let n=Object.values(t);return n.find(i=>Tr(i,e))??r??n[0]}function Xc(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function Et(e,t=1){return Lr(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Wc=Date.now(),oi=()=>`(+${Date.now()-Wc}ms)`,_r=new Set,qc=T(O("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function da(e){let t=`[${sa}/${e}]`,r=(a,s,...c)=>a?!0:(i(s,...c),!1),n=qc?(a,...s)=>{console.debug(`${t} ${a}`,...s,oi())}:()=>{},i=(a,...s)=>{let c=`${t} ${a}`;_r.forEach(([l])=>l(c,...s))};return{assert:r,debug:n,error:i,warn:(a,...s)=>{let c=`${t} ${a}`;_r.forEach(([,l])=>l(c,...s))}}}function Zc(e,t){let r=[e,t];return _r.add(r),()=>{_r.delete(r)}}Zc((e,...t)=>{console.error(e,...t,oi())},(e,...t)=>{console.warn(e,...t,oi())});var Jc="no promo",ua="promo-tag",Qc="yellow",el="neutral",tl=(e,t,r)=>{let n=o=>o||Jc,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},rl="cancel-context",Bt=(e,t)=>{let r=e===rl,n=!r&&e?.length>0,i=(n||r)&&(t&&t!=e||!t&&!r),o=i&&n||!i&&!!t,a=o?e||t:void 0;return{effectivePromoCode:a,overridenPromoCode:e,className:o?ua:`${ua} no-promo`,text:tl(a,t,i),variant:o?Qc:el,isOverriden:i}};var ai="ABM",si="PUF",ci="M2M",li="PERPETUAL",hi="P3Y",nl="TAX_INCLUSIVE_DETAILS",il="TAX_EXCLUSIVE",ma={ABM:ai,PUF:si,M2M:ci,PERPETUAL:li,P3Y:hi},Nm={[ai]:{commitment:U.YEAR,term:k.MONTHLY},[si]:{commitment:U.YEAR,term:k.ANNUAL},[ci]:{commitment:U.MONTH,term:k.MONTHLY},[li]:{commitment:U.PERPETUAL,term:void 0},[hi]:{commitment:U.THREE_MONTHS,term:k.P3Y}},pa="Value is not an offer",wr=e=>{if(typeof e!="object")return pa;let{commitment:t,term:r}=e,n=ol(t,r);return{...e,planType:n}};var ol=(e,t)=>{switch(e){case void 0:return pa;case"":return"";case U.YEAR:return t===k.MONTHLY?ai:t===k.ANNUAL?si:"";case U.MONTH:return t===k.MONTHLY?ci:"";case U.PERPETUAL:return li;case U.TERM_LICENSE:return t===k.P3Y?hi:"";default:return""}};function di(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:a}=t;if(a!==nl)return e;let s={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:il}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var ui=function(e,t){return ui=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ui(e,t)};function Gt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ui(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var A=function(){return A=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0}),r=[],n=0,i=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(cl,function(c,l,h,d,u,m){if(l)t.minimumIntegerDigits=h.length;else{if(d&&u)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Ta.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(va.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(va,function(c,l,h,d,u,m){return h==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:u&&m?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+m.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var o=i.options[0];o==="w"?t=A(A({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=A(A({},t),Aa(o)));continue}if(ya.test(i.stem)){t=A(A({},t),Aa(i.stem));continue}var a=La(i.stem);a&&(t=A(A({},t),a));var s=ll(i.stem);s&&(t=A(A({},t),s))}return t}var Ft={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function wa(e,t){for(var r="",n=0;n>1),c="a",l=hl(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;a-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function hl(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=Ft[n||""]||Ft[r||""]||Ft["".concat(r,"-001")]||Ft["001"];return i[0]}var fi,dl=new RegExp("^".concat(pi.source,"*")),ul=new RegExp("".concat(pi.source,"*$"));function E(e,t){return{start:e,end:t}}var ml=!!String.prototype.startsWith,pl=!!String.fromCodePoint,fl=!!Object.fromEntries,gl=!!String.prototype.codePointAt,xl=!!String.prototype.trimStart,bl=!!String.prototype.trimEnd,vl=!!Number.isSafeInteger,Al=vl?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},xi=!0;try{Pa=ka("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),xi=((fi=Pa.exec("a"))===null||fi===void 0?void 0:fi[0])==="a"}catch{xi=!1}var Pa,Ca=ml?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},bi=pl?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(a=t[o++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Ia=fl?Object.fromEntries:function(t){for(var r={},n=0,i=t;n=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},El=xl?function(t){return t.trimStart()}:function(t){return t.replace(dl,"")},Sl=bl?function(t){return t.trimEnd()}:function(t){return t.replace(ul,"")};function ka(e,t){return new RegExp(e,t)}var vi;xi?(gi=ka("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),vi=function(t,r){var n;gi.lastIndex=r;var i=gi.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):vi=function(t,r){for(var n=[];;){var i=Na(t,r);if(i===void 0||Ra(i)||Ll(i))break;n.push(i),r+=i>=65536?2:1}return bi.apply(void 0,n)};var gi,Oa=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(t,n);if(a.err)return a;i.push(a.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:P.pound,location:E(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(v.UNMATCHED_CLOSING_TAG,E(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Ai(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:P.literal,value:"<".concat(i,"/>"),location:E(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:P.tag,value:i,children:a,location:E(n,this.clonePosition())},err:null}:this.error(v.INVALID_TAG,E(s,this.clonePosition())))}else return this.error(v.UNCLOSED_TAG,E(n,this.clonePosition()))}else return this.error(v.INVALID_TAG,E(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Tl(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var a=this.tryParseUnquoted(t,r);if(a){i+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var c=E(n,this.clonePosition());return{val:{type:P.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!yl(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return bi.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),bi(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(v.EMPTY_ARGUMENT,E(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(v.MALFORMED_ARGUMENT,E(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:P.argument,value:i,location:E(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(v.MALFORMED_ARGUMENT,E(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=vi(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),a=E(t,o);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(v.EXPECT_ARGUMENT_TYPE,E(a,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var u=Sl(d.val);if(u.length===0)return this.error(v.EXPECT_ARGUMENT_STYLE,E(this.clonePosition(),this.clonePosition()));var m=E(h,this.clonePosition());l={style:u,styleLocation:m}}var g=this.tryParseArgumentClose(i);if(g.err)return g;var f=E(i,this.clonePosition());if(l&&Ca(l?.style,"::",0)){var S=El(l.style.slice(2));if(s==="number"){var d=this.parseNumberSkeletonFromString(S,l.styleLocation);return d.err?d:{val:{type:P.number,value:n,location:f,style:d.val},err:null}}else{if(S.length===0)return this.error(v.EXPECT_DATE_TIME_SKELETON,f);var w=S;this.locale&&(w=wa(S,this.locale));var u={type:ze.dateTime,pattern:w,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?xa(w):{}},b=s==="date"?P.date:P.time;return{val:{type:b,value:n,location:f,style:u},err:null}}}return{val:{type:s==="number"?P.number:s==="date"?P.date:P.time,value:n,location:f,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var y=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(v.EXPECT_SELECT_ARGUMENT_OPTIONS,E(y,A({},y)));this.bumpSpace();var N=this.parseIdentifierIfPossible(),R=0;if(s!=="select"&&N.value==="offset"){if(!this.bumpIf(":"))return this.error(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,E(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),N=this.parseIdentifierIfPossible(),R=d.val}var V=this.tryParsePluralOrSelectOptions(t,s,r,N);if(V.err)return V;var g=this.tryParseArgumentClose(i);if(g.err)return g;var H=E(i,this.clonePosition());return s==="select"?{val:{type:P.select,value:n,options:Ia(V.val),location:H},err:null}:{val:{type:P.plural,value:n,options:Ia(V.val),offset:R,pluralType:s==="plural"?"cardinal":"ordinal",location:H},err:null}}default:return this.error(v.INVALID_ARGUMENT_TYPE,E(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,E(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(v.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,E(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=Sa(t)}catch{return this.error(v.INVALID_NUMBER_SKELETON,r)}return{val:{type:ze.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?_a(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,a=!1,s=[],c=new Set,l=i.value,h=i.location;;){if(l.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_SELECTOR,v.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;h=E(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?v.DUPLICATE_SELECT_ARGUMENT_SELECTOR:v.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?v.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:v.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,E(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,r,n);if(g.err)return g;var f=this.tryParseArgumentClose(m);if(f.err)return f;s.push([l,{value:g.val,location:E(m,this.clonePosition())}]),c.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,h=o.location}return s.length===0?this.error(r==="select"?v.EXPECT_SELECT_ARGUMENT_SELECTOR:v.EXPECT_PLURAL_ARGUMENT_SELECTOR,E(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(v.MISSING_OTHER_CLAUSE,E(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var c=E(i,this.clonePosition());return o?(a*=n,Al(a)?{val:a,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Na(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Ca(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ra(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Ai(e){return e>=97&&e<=122||e>=65&&e<=90}function yl(e){return Ai(e)||e===47}function Tl(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Ra(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ll(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Ei(e){e.forEach(function(t){if(delete t.location,kr(t)||Or(t))for(var r in t.options)delete t.options[r].location,Ei(t.options[r].value);else Cr(t)&&Vr(t.style)||(Ir(t)||Nr(t))&&zt(t.style)?delete t.style.location:Rr(t)&&Ei(t.children)})}function Va(e,t){t===void 0&&(t={}),t=A({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Oa(e,t).parse();if(r.err){var n=SyntaxError(v[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Ei(r.val),r.val}function Kt(e,t){var r=t&&t.cache?t.cache:Nl,n=t&&t.serializer?t.serializer:Il,i=t&&t.strategy?t.strategy:wl;return i(e,{cache:r,serializer:n})}function _l(e){return e==null||typeof e=="number"||typeof e=="boolean"}function $a(e,t,r,n){var i=_l(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function Ma(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function Si(e,t,r,n,i){return r.bind(t,e,n,i)}function wl(e,t){var r=e.length===1?$a:Ma;return Si(e,this,r,t.cache.create(),t.serializer)}function Pl(e,t){return Si(e,this,Ma,t.cache.create(),t.serializer)}function Cl(e,t){return Si(e,this,$a,t.cache.create(),t.serializer)}var Il=function(){return JSON.stringify(arguments)};function yi(){this.cache=Object.create(null)}yi.prototype.get=function(e){return this.cache[e]};yi.prototype.set=function(e,t){this.cache[e]=t};var Nl={create:function(){return new yi}},$r={variadic:Pl,monadic:Cl};var Fe;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Fe||(Fe={}));var jt=function(e){Gt(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Ti=function(e){Gt(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Fe.INVALID_VALUE,o)||this}return t}(jt);var Ha=function(e){Gt(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Fe.INVALID_VALUE,i)||this}return t}(jt);var Ua=function(e){Gt(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Fe.MISSING_VALUE,n)||this}return t}(jt);var j;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(j||(j={}));function kl(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==j.literal||r.type!==j.literal?t.push(r):n.value+=r.value,t},[])}function Ol(e){return typeof e=="function"}function Yt(e,t,r,n,i,o,a){if(e.length===1&&mi(e[0]))return[{type:j.literal,value:e[0].value}];for(var s=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Va,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Ba=Da;var Ml=/[0-9\-+#]/,Hl=/[^\d\-+#]/g;function Ga(e){return e.search(Ml)}function Ul(e="#.##"){let t={},r=e.length,n=Ga(e);t.prefix=n>0?e.substring(0,n):"";let i=Ga(e.split("").reverse().join("")),o=r-i,a=e.substring(o,o+1),s=o+(a==="."||a===","?1:0);t.suffix=i>0?e.substring(s,r):"",t.mask=e.substring(n,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(Hl);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function Dl(e,t,r){let n=!1,i={value:e};e<0&&(n=!0,i.value=-i.value),i.sign=n?"-":"",i.value=Number(i.value).toFixed(t.fraction&&t.fraction.length),i.value=Number(i.value).toString();let o=t.fraction&&t.fraction.lastIndexOf("0"),[a="0",s=""]=i.value.split(".");return(!s||s&&s.length<=o)&&(s=o<0?"":(+("0."+s)).toFixed(o+1).replace("0.","")),i.integer=a,i.fraction=s,Bl(i,t),(i.result==="0"||i.result==="")&&(n=!1,i.sign=""),!n&&t.maskHasPositiveSign?i.sign="+":n&&t.maskHasPositiveSign?i.sign="-":n&&(i.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),i}function Bl(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),i=n&&n.indexOf("0");if(i>-1)for(;e.integer.length({accept:e,round:t}),Kl=[_i(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),_i(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),_i(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],wi={[U.YEAR]:{[k.MONTHLY]:Xt.MONTH,[k.ANNUAL]:Xt.YEAR},[U.MONTH]:{[k.MONTHLY]:Xt.MONTH}},jl=(e,t)=>e.indexOf(`'${t}'`)===0,Yl=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Wa(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Wl(e)),r},Xl=e=>{let t=ql(e),r=jl(e,t),n=e.replace(/'.*?'/,""),i=ja.test(n)||Ya.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Xa=e=>e.replace(ja,Ka).replace(Ya,Ka),Wl=e=>e.match(/#(.?)#/)?.[1]===Fa?zl:Fa,ql=e=>e.match(/'(.*?)'/)?.[1]??"",Wa=e=>e.match(/0(.?)0/)?.[1]??"";function Mr({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=Xl(e),l=r?Wa(e):"",h=Yl(e,r),d=r?2:0,u=o(t,{currencySymbol:a}),m=n?u.toLocaleString("hi-IN",{minimumFractionDigits:d,maximumFractionDigits:d}):za(h,u),g=r?m.lastIndexOf(l):m.length,f=m.substring(0,g),S=m.substring(g+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,m).replace(/SYMBOL/,a),currencySymbol:a,decimals:S,decimalsDelimiter:l,hasCurrencySpace:c,integer:f,isCurrencyFirst:s,recurrenceTerm:i}}var qa=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=Fl[r]??1;return Mr(e,i>1?Xt.MONTH:wi[t]?.[r],o=>{let a={divisor:i,price:o,usePrecision:n},{round:s}=Kl.find(({accept:c})=>c(a));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return s(a)})},Za=({commitment:e,term:t,...r})=>Mr(r,wi[e]?.[t]),Ja=e=>{let{commitment:t,term:r}=e;return t===U.YEAR&&r===k.MONTHLY?Mr(e,Xt.YEAR,n=>n*12):Mr(e,wi[t]?.[r])};var Zl={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},Jl=da("ConsonantTemplates/price"),Ql=/<\/?[^>]+(>|$)/g,z={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},Ke={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},eh="TAX_EXCLUSIVE",th=e=>ha(e)?Object.entries(e).filter(([,t])=>xt(t)||Lr(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+ca(n)+'"'}`,""):"",Y=(e,t,r,n=!1)=>`${n?Xa(t):t??""}`;function rh(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},d={}){let u=Y(z.currencySymbol,r),m=Y(z.currencySpace,o?" ":""),g="";return s&&(g+=u+m),g+=Y(z.integer,a),g+=Y(z.decimalsDelimiter,i),g+=Y(z.decimals,n),s||(g+=m+u),g+=Y(z.recurrence,c,null,!0),g+=Y(z.unitType,l,null,!0),g+=Y(z.taxInclusivity,h,!0),Y(e,g,{...d,"aria-label":t})}var W=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1}={})=>({country:n,displayFormatted:i=!0,displayRecurrence:o=!0,displayPerUnit:a=!1,displayTax:s=!1,language:c,literals:l={}}={},{commitment:h,offerSelectorIds:d,formatString:u,price:m,priceWithoutDiscount:g,taxDisplay:f,taxTerm:S,term:w,usePrecision:b}={},y={})=>{Object.entries({country:n,formatString:u,language:c,price:m}).forEach(([ce,Fr])=>{if(Fr==null)throw new Error(`Argument "${ce}" is missing for osi ${d?.toString()}, country ${n}, language ${c}`)});let N={...Zl,...l},R=`${c.toLowerCase()}-${n.toUpperCase()}`;function V(ce,Fr){let Kr=N[ce];if(Kr==null)return"";try{return new Ba(Kr.replace(Ql,""),R).format(Fr)}catch{return Jl.error("Failed to format literal:",Kr),""}}let H=t&&g?g:m,ae=e?qa:Za;r&&(ae=Ja);let{accessiblePrice:Xe,recurrenceTerm:_e,...We}=ae({commitment:h,formatString:u,term:w,price:e?m:H,usePrecision:b,isIndianPrice:n==="IN"}),Q=Xe,ge="";if(T(o)&&_e){let ce=V(Ke.recurrenceAriaLabel,{recurrenceTerm:_e});ce&&(Q+=" "+ce),ge=V(Ke.recurrenceLabel,{recurrenceTerm:_e})}let se="";if(T(a)){se=V(Ke.perUnitLabel,{perUnit:"LICENSE"});let ce=V(Ke.perUnitAriaLabel,{perUnit:"LICENSE"});ce&&(Q+=" "+ce)}let ee="";T(s)&&S&&(ee=V(f===eh?Ke.taxExclusiveLabel:Ke.taxInclusiveLabel,{taxTerm:S}),ee&&(Q+=" "+ee)),t&&(Q=V(Ke.strikethroughAriaLabel,{strikethroughPrice:Q}));let we=z.container;if(e&&(we+=" "+z.containerOptical),t&&(we+=" "+z.containerStrikethrough),r&&(we+=" "+z.containerAnnual),T(i))return rh(we,{...We,accessibleLabel:Q,recurrenceLabel:ge,perUnitLabel:se,taxInclusivityLabel:ee},y);let{currencySymbol:Ki,decimals:bs,decimalsDelimiter:vs,hasCurrencySpace:ji,integer:As,isCurrencyFirst:Es}=We,qe=[As,vs,bs];Es?(qe.unshift(ji?"\xA0":""),qe.unshift(Ki)):(qe.push(ji?"\xA0":""),qe.push(Ki)),qe.push(ge,se,ee);let Ss=qe.join("");return Y(we,Ss,y)},Qa=()=>(e,t,r)=>{let i=(e.displayOldPrice===void 0||T(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${W()(e,t,r)}${i?" "+W({displayStrikethrough:!0})(e,t,r):""}`},es=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${(e.displayOldPrice===void 0||T(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price?W({displayStrikethrough:!0})(n,t,r)+" ":""}${W()(e,t,r)}${Y(z.containerAnnualPrefix," (")}${W({displayAnnual:!0})(n,t,r)}${Y(z.containerAnnualSuffix,")")}`},ts=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${W()(e,t,r)}${Y(z.containerAnnualPrefix," (")}${W({displayAnnual:!0})(n,t,r)}${Y(z.containerAnnualSuffix,")")}`};var Pi=W(),Ci=Qa(),Ii=W({displayOptical:!0}),Ni=W({displayStrikethrough:!0}),ki=W({displayAnnual:!0}),Oi=ts(),Ri=es();var nh=(e,t)=>{if(!(!vt(e)||!vt(t)))return Math.floor((t-e)/t*100)},rs=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,i=nh(r,n);return i===void 0?'':`${i}%`};var Vi=rs();var{freeze:Wt}=Object,re=Wt({...Ge}),ne=Wt({...J}),je={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},$i=Wt({...U}),Mi=Wt({...ma}),Hi=Wt({...k});var ns="mas-commerce-service";function is(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(ns);i!==r&&(r=i,i&&e(i))}return document.addEventListener(it,n,{once:t}),Le(n),()=>document.removeEventListener(it,n)}function qt(e,{country:t,forceTaxExclusive:r,perpetual:n}){let i;if(e.length<2)i=e;else{let o=t==="GB"||n?"EN":"MULT",[a,s]=e;i=[a.language===o?a:s]}return r&&(i=i.map(di)),i}var Le=e=>window.setTimeout(e);function St(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(Et).filter(vt);return r.length||(r=[t]),r}function Hr(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(ii)}function q(){return document.getElementsByTagName(ns)?.[0]}var _=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:re.V3,checkoutWorkflowStep:ne.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:je.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:He.PUBLISHED,wcsBufferLimit:1});var Ui=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function ih({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||_.language),t??(t=e?.split("_")?.[1]||_.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function Di(e={}){let{commerce:t={}}=e,r=je.PRODUCTION,n=Hn,i=O("checkoutClientId",t)??_.checkoutClientId,o=Te(O("checkoutWorkflow",t),re,_.checkoutWorkflow),a=ne.CHECKOUT;o===re.V3&&(a=Te(O("checkoutWorkflowStep",t),ne,_.checkoutWorkflowStep));let s=T(O("displayOldPrice",t),_.displayOldPrice),c=T(O("displayPerUnit",t),_.displayPerUnit),l=T(O("displayRecurrence",t),_.displayRecurrence),h=T(O("displayTax",t),_.displayTax),d=T(O("entitlement",t),_.entitlement),u=T(O("modal",t),_.modal),m=T(O("forceTaxExclusive",t),_.forceTaxExclusive),g=O("promotionCode",t)??_.promotionCode,f=St(O("quantity",t)),S=O("wcsApiKey",t)??_.wcsApiKey,w=t?.env==="stage",b=He.PUBLISHED;["true",""].includes(t.allowOverride)&&(w=(O($n,t,{metadata:!1})?.toLowerCase()??t?.env)==="stage",b=Te(O(Mn,t),He,b)),w&&(r=je.STAGE,n=Un);let N=Et(O("wcsBufferDelay",t),_.wcsBufferDelay),R=Et(O("wcsBufferLimit",t),_.wcsBufferLimit);return{...ih(e),displayOldPrice:s,checkoutClientId:i,checkoutWorkflow:o,checkoutWorkflowStep:a,displayPerUnit:c,displayRecurrence:l,displayTax:h,entitlement:d,extraOptions:_.extraOptions,modal:u,env:r,forceTaxExclusive:m,promotionCode:g,quantity:f,wcsApiKey:S,wcsBufferDelay:N,wcsBufferLimit:R,wcsURL:n,landscape:b}}var Bi={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},oh=Date.now(),Gi=new Set,zi=new Set,os=new Map,as={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},ss={filter:({level:e})=>e!==Bi.DEBUG},ah={filter:()=>!1};function sh(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){return n.length===1&&Dt(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:i,timestamp:Date.now()-oh}}function ch(e){[...zi].every(t=>t(e))&&Gi.forEach(t=>t(e))}function cs(e){let t=(os.get(e)??0)+1;os.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:i=>cs(`${n.namespace}/${i}`),updateConfig:ft};return Object.values(Bi).forEach(i=>{n[i]=(o,...a)=>ch(sh(i,o,e,a,r))}),Object.seal(n)}function Ur(...e){e.forEach(t=>{let{append:r,filter:n}=t;Dt(n)&&zi.add(n),Dt(r)&&Gi.add(r)})}function lh(e={}){let{name:t}=e,r=T(O("commerce.debug",{search:!0,storage:!0}),t===Ui.LOCAL);return Ur(r?as:ss),t===Ui.PROD&&Ur(Yn),X}function hh(){Gi.clear(),zi.clear()}var X={...cs(Vn),Level:Bi,Plugins:{consoleAppender:as,debugFilter:ss,quietFilter:ah,lanaAppender:Yn},init:lh,reset:hh,use:Ur};var dh={[he]:Pn,[de]:Cn,[ue]:In},uh={[he]:kn,[de]:On,[ue]:Rn},yt=class{constructor(t){p(this,"changes",new Map);p(this,"connected",!1);p(this,"dispose",bt);p(this,"error");p(this,"log");p(this,"options");p(this,"promises",[]);p(this,"state",de);p(this,"timer",null);p(this,"value");p(this,"version",0);p(this,"wrapperElement");this.wrapperElement=t}update(){[he,de,ue].forEach(t=>{this.wrapperElement.classList.toggle(dh[t],t===this.state)})}notify(){(this.state===ue||this.state===he)&&(this.state===ue?this.promises.forEach(({resolve:t})=>t(this.wrapperElement)):this.state===he&&this.promises.forEach(({reject:t})=>t(this.error)),this.promises=[]),this.wrapperElement.dispatchEvent(new CustomEvent(uh[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=is(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=bt}onceSettled(){let{error:t,promises:r,state:n}=this;return ue===n?Promise.resolve(this.wrapperElement):he===n?Promise.reject(t):new Promise((i,o)=>{r.push({resolve:i,reject:o})})}toggleResolved(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.state=ue,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),Le(()=>this.notify()),!0)}toggleFailed(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.error=r,this.state=he,this.update(),this.log?.error("Failed:",{element:this.wrapperElement,error:r}),Le(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=de,this.update(),Le(()=>this.notify()),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!q()||this.timer)return;let r=X.module("mas-element"),{error:n,options:i,state:o,value:a,version:s}=this;this.state=de,this.timer=Le(async()=>{this.timer=null;let c=null;if(this.changes.size&&(c=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:c}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:c})),c||t)try{await this.wrapperElement.render?.()===!1&&this.state===de&&this.version===s&&(this.state=o,this.error=n,this.value=a,this.update(),this.notify())}catch(l){r.error("Failed to render mas-element: ",l),this.toggleFailed(this.version,l,i)}})}};function ls(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function Dr(e,t={}){let{tag:r,is:n}=e,i=document.createElement(r,{is:n});return i.setAttribute("is",n),Object.assign(i.dataset,ls(t)),i}function Br(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,ls(t)),e):null}var mh="download",ph="upgrade",Ye,Zt=class Zt extends HTMLAnchorElement{constructor(){super();G(this,Ye);p(this,"masElement",new yt(this));this.handleClick=this.handleClick.bind(this)}attributeChangedCallback(r,n,i){this.masElement.attributeChangedCallback(r,n,i)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}static createCheckoutLink(r={},n=""){let i=q();if(!i)return null;let{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:d,promotionCode:u,quantity:m,wcsOsi:g,extraOptions:f}=i.collectCheckoutOptions(r),S=Dr(Zt,{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:d,promotionCode:u,quantity:m,wcsOsi:g,extraOptions:f});return n&&(S.innerHTML=`${n}`),S}get isCheckoutLink(){return!0}handleClick(r){var n;if(r.target!==this){r.preventDefault(),r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}));return}(n=L(this,Ye))==null||n.call(this,r)}async render(r={}){if(!this.isConnected)return!1;let n=q();if(!n)return!1;this.dataset.imsCountry||n.imsCountryPromise.then(h=>{h&&(this.dataset.imsCountry=h)},bt),r.imsCountry=null;let i=n.collectCheckoutOptions(r,this);if(!i.wcsOsi.length)return!1;let o;try{o=JSON.parse(i.extraOptions??"{}")}catch(h){this.masElement.log?.error("cannot parse exta checkout options",h)}let a=this.masElement.togglePending(i);this.href="";let s=n.resolveOfferSelectors(i),c=await Promise.all(s);c=c.map(h=>qt(h,i)),i.country=this.dataset.imsCountry||i.country;let l=await n.buildCheckoutAction?.(c.flat(),{...o,...i},this);return this.renderOffers(c.flat(),i,{},l,a)}renderOffers(r,n,i={},o=void 0,a=void 0){if(!this.isConnected)return!1;let s=q();if(!s)return!1;if(n={...JSON.parse(this.dataset.extraOptions??"null"),...n,...i},a??(a=this.masElement.togglePending(n)),L(this,Ye)&&F(this,Ye,void 0),o){this.classList.remove(mh,ph),this.masElement.toggleResolved(a,r,n);let{url:l,text:h,className:d,handler:u}=o;return l&&(this.href=l),h&&(this.firstElementChild.innerHTML=h),d&&this.classList.add(...d.split(" ")),u&&(this.setAttribute("href","#"),F(this,Ye,u.bind(this))),!0}else if(r.length){if(this.masElement.toggleResolved(a,r,n)){let l=s.buildCheckoutURL(r,n);return this.setAttribute("href",l),!0}}else{let l=new Error(`Not provided: ${n?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(a,l,n))return this.setAttribute("href","#"),!0}}updateOptions(r={}){let n=q();if(!n)return!1;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:d,quantity:u,wcsOsi:m}=n.collectCheckoutOptions(r);return Br(this,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:d,quantity:u,wcsOsi:m}),!0}};Ye=new WeakMap,p(Zt,"is","checkout-link"),p(Zt,"tag","a");var ie=Zt;window.customElements.get(ie.is)||window.customElements.define(ie.is,ie,{extends:ie.tag});function hs({providers:e,settings:t}){function r(o,a){let{checkoutClientId:s,checkoutWorkflow:c,checkoutWorkflowStep:l,country:h,language:d,promotionCode:u,quantity:m}=t,{checkoutMarketSegment:g,checkoutWorkflow:f=c,checkoutWorkflowStep:S=l,imsCountry:w,country:b=w??h,language:y=d,quantity:N=m,entitlement:R,upgrade:V,modal:H,perpetual:ae,promotionCode:Xe=u,wcsOsi:_e,extraOptions:We,...Q}=Object.assign({},a?.dataset??{},o??{}),ge=Te(f,re,_.checkoutWorkflow),se=ne.CHECKOUT;ge===re.V3&&(se=Te(S,ne,_.checkoutWorkflowStep));let ee=At({...Q,extraOptions:We,checkoutClientId:s,checkoutMarketSegment:g,country:b,quantity:St(N,_.quantity),checkoutWorkflow:ge,checkoutWorkflowStep:se,language:y,entitlement:T(R),upgrade:T(V),modal:T(H),perpetual:T(ae),promotionCode:Bt(Xe).effectivePromoCode,wcsOsi:Hr(_e)});if(a)for(let we of e.checkout)we(a,ee);return ee}function n(o,a){if(!Array.isArray(o)||!o.length||!a)return"";let{env:s,landscape:c}=t,{checkoutClientId:l,checkoutMarketSegment:h,checkoutWorkflow:d,checkoutWorkflowStep:u,country:m,promotionCode:g,quantity:f,...S}=r(a),w=window.frameElement?"if":"fp",b={checkoutPromoCode:g,clientId:l,context:w,country:m,env:s,items:[],marketSegment:h,workflowStep:u,landscape:c,...S};if(o.length===1){let[{offerId:y,offerType:N,productArrangementCode:R}]=o,{marketSegments:[V]}=o[0];Object.assign(b,{marketSegment:V,offerType:N,productArrangementCode:R}),b.items.push(f[0]===1?{id:y}:{id:y,quantity:f[0]})}else b.items.push(...o.map(({offerId:y},N)=>({id:y,quantity:f[N]??_.quantity})));return Jn(d,b)}let{createCheckoutLink:i}=ie;return{CheckoutLink:ie,CheckoutWorkflow:re,CheckoutWorkflowStep:ne,buildCheckoutURL:n,collectCheckoutOptions:r,createCheckoutLink:i}}function fh({interval:e=200,maxAttempts:t=25}={}){let r=X.module("ims");return new Promise(n=>{r.debug("Waing for IMS to be ready");let i=0;function o(){window.adobeIMS?.initialized?n():++i>t?(r.debug("Timeout"),n()):setTimeout(o,e)}o()})}function gh(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function xh(e){let t=X.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:n})=>(t.debug("Got user country:",n),n),n=>{t.error("Unable to get user country:",n)}):null)}function ds({}){let e=fh(),t=gh(e),r=xh(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}async function ms(e,t){let{data:r}=t||await Promise.resolve().then(()=>ks(us(),1));if(Array.isArray(r)){let n=o=>r.find(a=>Tr(a.lang,o)),i=n(e.language)??n(_.language);if(i)return Object.freeze(i)}return{}}var ps=["GB_en","AU_en","FR_fr","AT_de","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","FR_fr","GR_el","GR_en","HU_hu","IE_en","IT_it","LU_de","LU_en","LU_fr","NL_nl","NO_nb","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","TR_tr","UA_uk","ID_en","ID_in","IN_en","IN_hi","JP_ja","MY_en","MY_ms","NZ_en","TH_en","TH_th"],vh={INDIVIDUAL_COM:["ZA_en","LT_lt","LV_lv","NG_en","SA_ar","SA_en","ZA_en","SG_en","KR_ko"],TEAM_COM:["ZA_en","LT_lt","LV_lv","NG_en","ZA_en","CO_es","KR_ko"],INDIVIDUAL_EDU:["LT_lt","LV_lv","SA_en","SG_en"],TEAM_EDU:["SG_en","KR_ko"]},Jt=class Jt extends HTMLSpanElement{constructor(){super();p(this,"masElement",new yt(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-perpetual","data-promotion-code","data-tax-exclusive","data-template","data-wcs-osi"]}static createInlinePrice(r){let n=q();if(!n)return null;let{displayOldPrice:i,displayPerUnit:o,displayRecurrence:a,displayTax:s,forceTaxExclusive:c,perpetual:l,promotionCode:h,quantity:d,template:u,wcsOsi:m}=n.collectPriceOptions(r);return Dr(Jt,{displayOldPrice:i,displayPerUnit:o,displayRecurrence:a,displayTax:s,forceTaxExclusive:c,perpetual:l,promotionCode:h,quantity:d,template:u,wcsOsi:m})}get isInlinePrice(){return!0}attributeChangedCallback(r,n,i){this.masElement.attributeChangedCallback(r,n,i)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}resolveDisplayTaxForGeoAndSegment(r,n,i,o){let a=`${r}_${n}`;if(ps.includes(r)||ps.includes(a))return!0;let s=vh[`${i}_${o}`];return s?!!(s.includes(r)||s.includes(a)):!1}async resolveDisplayTax(r,n){let[i]=await r.resolveOfferSelectors(n),o=qt(await i,n);if(o?.length){let{country:a,language:s}=n,c=o[0],[l=""]=c.marketSegments;return this.resolveDisplayTaxForGeoAndSegment(a,s,c.customerSegment,l)}}async render(r={}){if(!this.isConnected)return!1;let n=q();if(!n)return!1;let i=n.collectPriceOptions(r,this);if(!i.wcsOsi.length)return!1;let o=this.masElement.togglePending(i);this.innerHTML="";let[a]=n.resolveOfferSelectors(i);return this.renderOffers(qt(await a,i),i,o)}renderOffers(r,n={},i=void 0){if(!this.isConnected)return;let o=q();if(!o)return!1;let a=o.collectPriceOptions({...this.dataset,...n},this);if(i??(i=this.masElement.togglePending(a)),r.length){if(this.masElement.toggleResolved(i,r,a))return this.innerHTML=o.buildPriceHTML(r,a),!0}else{let s=new Error(`Not provided: ${a?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(i,s,a))return this.innerHTML="",!0}return!1}updateOptions(r){let n=q();if(!n)return!1;let{displayOldPrice:i,displayPerUnit:o,displayRecurrence:a,displayTax:s,forceTaxExclusive:c,perpetual:l,promotionCode:h,quantity:d,template:u,wcsOsi:m}=n.collectPriceOptions(r);return Br(this,{displayOldPrice:i,displayPerUnit:o,displayRecurrence:a,displayTax:s,forceTaxExclusive:c,perpetual:l,promotionCode:h,quantity:d,template:u,wcsOsi:m}),!0}};p(Jt,"is","inline-price"),p(Jt,"tag","span");var oe=Jt;window.customElements.get(oe.is)||window.customElements.define(oe.is,oe,{extends:oe.tag});function fs({literals:e,providers:t,settings:r}){function n(a,s){let{country:c,displayOldPrice:l,displayPerUnit:h,displayRecurrence:d,displayTax:u,forceTaxExclusive:m,language:g,promotionCode:f,quantity:S}=r,{displayOldPrice:w=l,displayPerUnit:b=h,displayRecurrence:y=d,displayTax:N=u,forceTaxExclusive:R=m,country:V=c,language:H=g,perpetual:ae,promotionCode:Xe=f,quantity:_e=S,template:We,wcsOsi:Q,...ge}=Object.assign({},s?.dataset??{},a??{}),se=At({...ge,country:V,displayOldPrice:T(w),displayPerUnit:T(b),displayRecurrence:T(y),displayTax:T(N),forceTaxExclusive:T(R),language:H,perpetual:T(ae),promotionCode:Bt(Xe).effectivePromoCode,quantity:St(_e,_.quantity),template:We,wcsOsi:Hr(Q)});if(s)for(let ee of t.price)ee(s,se);return se}function i(a,s){if(!Array.isArray(a)||!a.length||!s)return"";let{template:c}=s,l;switch(c){case"discount":l=Vi;break;case"strikethrough":l=Ni;break;case"optical":l=Ii;break;case"annual":l=ki;break;default:s.country==="AU"&&a[0].planType==="ABM"?l=s.promotionCode?Ri:Oi:l=s.promotionCode?Ci:Pi}let h=n(s);h.literals=Object.assign({},e.price,At(s.literals??{}));let[d]=a;return d={...d,...d.priceDetails},l(h,d)}let o=oe.createInlinePrice;return{InlinePrice:oe,buildPriceHTML:i,collectPriceOptions:n,createInlinePrice:o}}function gs({settings:e}){let t=X.module("wcs"),{env:r,wcsApiKey:n}=e,i=new Map,o=new Map,a;async function s(d,u,m=!0){let g=Nn;t.debug("Fetching:",d);let f="",S,w=(b,y,N)=>`${b}: ${y?.status}, url: ${N.toString()}`;try{if(d.offerSelectorIds=d.offerSelectorIds.sort(),f=new URL(e.wcsURL),f.searchParams.set("offer_selector_ids",d.offerSelectorIds.join(",")),f.searchParams.set("country",d.country),f.searchParams.set("locale",d.locale),f.searchParams.set("landscape",r===je.STAGE?"ALL":e.landscape),f.searchParams.set("api_key",n),d.language&&f.searchParams.set("language",d.language),d.promotionCode&&f.searchParams.set("promotion_code",d.promotionCode),d.currency&&f.searchParams.set("currency",d.currency),S=await fetch(f.toString(),{credentials:"omit"}),S.ok){let b=await S.json();t.debug("Fetched:",d,b);let y=b.resolvedOffers??[];y=y.map(wr),u.forEach(({resolve:N},R)=>{let V=y.filter(({offerSelectorIds:H})=>H.includes(R)).flat();V.length&&(u.delete(R),N(V))})}else S.status===404&&d.offerSelectorIds.length>1?(t.debug("Multi-osi 404, fallback to fetch-by-one strategy"),await Promise.allSettled(d.offerSelectorIds.map(b=>s({...d,offerSelectorIds:[b]},u,!1)))):g=xr}catch(b){g=xr,t.error(g,d,b)}m&&u.size&&(t.debug("Missing:",{offerSelectorIds:[...u.keys()]}),u.forEach(b=>{b.reject(new Error(w(g,S,f)))}))}function c(){clearTimeout(a);let d=[...o.values()];o.clear(),d.forEach(({options:u,promises:m})=>s(u,m))}function l(){let d=i.size;i.clear(),t.debug(`Flushed ${d} cache entries`)}function h({country:d,language:u,perpetual:m=!1,promotionCode:g="",wcsOsi:f=[]}){let S=`${u}_${d}`;d!=="GB"&&(u=m?"EN":"MULT");let w=[d,u,g].filter(b=>b).join("-").toLowerCase();return f.map(b=>{let y=`${b}-${w}`;if(!i.has(y)){let N=new Promise((R,V)=>{let H=o.get(w);if(!H){let ae={country:d,locale:S,offerSelectorIds:[]};d!=="GB"&&(ae.language=u),H={options:ae,promises:new Map},o.set(w,H)}g&&(H.options.promotionCode=g),H.options.offerSelectorIds.push(b),H.promises.set(b,{resolve:R,reject:V}),H.options.offerSelectorIds.length>=e.wcsBufferLimit?c():(t.debug("Queued:",H.options),a||(a=setTimeout(c,e.wcsBufferDelay)))});i.set(y,N)}return i.get(y)})}return{WcsCommitment:$i,WcsPlanType:Mi,WcsTerm:Hi,resolveOfferSelectors:h,flushWcsCache:l}}var Fi="mas-commerce-service",Ah="mas:start",Eh="mas:ready",zr,xs,Gr=class extends HTMLElement{constructor(){super(...arguments);G(this,zr);p(this,"promise",null)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(n,i,o)=>{let a=await r?.(n,i,this.imsSignedInPromise,o);return a||null})}async activate(){let r=L(this,zr,xs),n=Object.freeze(Di(r));ft(r.lana);let i=X.init(r.hostEnv).module("service");i.debug("Activating:",r);let o={price:{}};try{o.price=await ms(n,r.commerce.priceLiterals)}catch{}let a={checkout:new Set,price:new Set},s={literals:o,providers:a,settings:n};Object.defineProperties(this,Object.getOwnPropertyDescriptors({...hs(s),...ds(s),...fs(s),...gs(s),...Dn,Log:X,get defaults(){return _},get log(){return X},get providers(){return{checkout(c){return a.checkout.add(c),()=>a.checkout.delete(c)},price(c){return a.price.add(c),()=>a.price.delete(c)}}},get settings(){return n}})),i.debug("Activated:",{literals:o,settings:n}),Le(()=>{let c=new CustomEvent(it,{bubbles:!0,cancelable:!1,detail:this});performance.mark(Eh),this.dispatchEvent(c)})}connectedCallback(){this.readyPromise||(performance.mark(Ah),this.readyPromise=this.activate())}disconnectedCallback(){this.readyPromise=null}flushWcsCache(){this.flushWcsCache(),this.log.debug("Flushed WCS cache")}refreshOffers(){this.flushWcsCache(),document.querySelectorAll('span[is="inline-price"],a[is="checkout-link"]').forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers")}refreshFragments(){this.flushWcsCache(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh()),this.log.debug("Refreshed AEM fragments")}};zr=new WeakSet,xs=function(){let r={hostEnv:{name:this.getAttribute("host-env")??"prod"},commerce:{env:this.getAttribute("env")},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate"),10),isProdDomain:this.getAttribute("host-env")==="prod"}};return["locale","country","language"].forEach(n=>{let i=this.getAttribute(n);i&&(r[n]=i)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(n=>{let i=this.getAttribute(n);if(i!=null){let o=n.replace(/-([a-z])/g,a=>a[1].toUpperCase());r.commerce[o]=i}}),r},p(Gr,"instance");window.customElements.get(Fi)||window.customElements.define(Fi,Gr);ft({sampleRate:1});export{ie as CheckoutLink,re as CheckoutWorkflow,ne as CheckoutWorkflowStep,_ as Defaults,oe as InlinePrice,He as Landscape,X as Log,Fi as TAG_NAME_SERVICE,$i as WcsCommitment,Mi as WcsPlanType,Hi as WcsTerm,wr as applyPlanType,Di as getSettings}; + `);customElements.define("merch-icon",St);var ls=new CSSStyleSheet;ls.replaceSync(":host { display: contents; }");var ph=document.querySelector('meta[name="aem-base-url"]')?.content??"https://odin.adobe.com",as="fragment",ss="author",fh="ims",cs=e=>{throw new Error(`Failed to get fragment: ${e}`)};async function gh(e,t,r,n){let i=r?`${e}/adobe/sites/cf/fragments/${t}`:`${e}/adobe/sites/fragments/${t}`,o=await fetch(i,{cache:"default",credentials:"omit",headers:n}).catch(a=>cs(a.message));return o?.ok||cs(`${o.status} ${o.statusText}`),o.json()}var Gi,ye,zi=class{constructor(){K(this,ye,new Map)}clear(){w(this,ye).clear()}add(...t){t.forEach(r=>{let{id:n}=r;n&&w(this,ye).set(n,r)})}has(t){return w(this,ye).has(t)}get(t){return w(this,ye).get(t)}remove(t){w(this,ye).delete(t)}};ye=new WeakMap;var Fr=new zi,Ye,ue,Te,Zt,me,yt,pe,Ki,hs,ds,Fi=class extends HTMLElement{constructor(){super();K(this,pe);p(this,"cache",Fr);K(this,Ye);K(this,ue);K(this,Te);K(this,Zt,!1);K(this,me);K(this,yt,!1);this.attachShadow({mode:"open"}),this.shadowRoot.adoptedStyleSheets=[ls];let r=this.getAttribute(fh);["",!0,"true"].includes(r)&&(Y(this,Zt,!0),Gi||(Gi={Authorization:`Bearer ${window.adobeid?.authorize?.()}`}))}static get observedAttributes(){return[as,ss]}attributeChangedCallback(r,n,i){r===as&&(Y(this,Te,i),this.refresh(!1)),r===ss&&Y(this,yt,["","true"].includes(i))}connectedCallback(){if(!w(this,Te)){ge(this,pe,Ki).call(this,"Missing fragment id");return}}async refresh(r=!0){w(this,me)&&!await Promise.race([w(this,me),Promise.resolve(!1)])||(r&&Fr.remove(w(this,Te)),Y(this,me,this.fetchData().then(()=>(this.dispatchEvent(new CustomEvent(Ve,{detail:this.data,bubbles:!0,composed:!0})),!0)).catch(n=>(ge(this,pe,Ki).call(this,"Network error: failed to load fragment"),Y(this,me,null),!1))),w(this,me))}async fetchData(){Y(this,Ye,null),Y(this,ue,null);let r=Fr.get(w(this,Te));r||(r=await gh(ph,w(this,Te),w(this,yt),w(this,Zt)?Gi:void 0),Fr.add(r)),Y(this,Ye,r)}get updateComplete(){return w(this,me)??Promise.reject(new Error("AEM fragment cannot be loaded"))}get data(){return w(this,ue)?w(this,ue):(w(this,yt)?ge(this,pe,hs).call(this):ge(this,pe,ds).call(this),w(this,ue))}};Ye=new WeakMap,ue=new WeakMap,Te=new WeakMap,Zt=new WeakMap,me=new WeakMap,yt=new WeakMap,pe=new WeakSet,Ki=function(r){this.classList.add("error"),this.dispatchEvent(new CustomEvent(Me,{detail:r,bubbles:!0,composed:!0}))},hs=function(){let{fields:r,id:n,tags:i}=w(this,Ye);Y(this,ue,r.reduce((o,{name:a,multiple:s,values:c})=>(o.fields[a]=s?c:c[0],o),{fields:{},id:n,tags:i}))},ds=function(){let{fields:r,id:n,tags:i}=w(this,Ye);Y(this,ue,Object.entries(r).reduce((o,[a,s])=>(o.fields[a]=s?.mimeType?s.value:s??"",o),{fields:{},id:n,tags:i}))};customElements.define("aem-fragment",Fi);var Jt=class Jt extends Gr(HTMLAnchorElement){static createCheckoutLink(t={},r=""){return Br(Jt,t,r)}setCheckoutUrl(t){this.setAttribute("href",t)}get isCheckoutLink(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}}};p(Jt,"is","checkout-link"),p(Jt,"tag","a");var ie=Jt;window.customElements.get(ie.is)||window.customElements.define(ie.is,ie,{extends:ie.tag});function us({providers:e,settings:t}){function r(o,a){let{checkoutClientId:s,checkoutWorkflow:c,checkoutWorkflowStep:l,country:h,language:d,promotionCode:u,quantity:m}=t,{checkoutMarketSegment:f,checkoutWorkflow:g=c,checkoutWorkflowStep:T=l,imsCountry:_,country:b=_??h,language:S=d,quantity:k=m,entitlement:R,upgrade:V,modal:H,perpetual:ae,promotionCode:Xe=u,wcsOsi:Le,extraOptions:We,...J}=Object.assign({},a?.dataset??{},o??{}),fe=Se(g,re,L.checkoutWorkflow),se=ne.CHECKOUT;fe===re.V3&&(se=Se(T,ne,L.checkoutWorkflowStep));let Q=xt({...J,extraOptions:We,checkoutClientId:s,checkoutMarketSegment:f,country:b,quantity:vt(k,L.quantity),checkoutWorkflow:fe,checkoutWorkflowStep:se,language:S,entitlement:y(R),upgrade:y(V),modal:y(H),perpetual:y(ae),promotionCode:Ht(Xe).effectivePromoCode,wcsOsi:$r(Le)});if(a)for(let _e of e.checkout)_e(a,Q);return Q}function n(o,a){if(!Array.isArray(o)||!o.length||!a)return"";let{env:s,landscape:c}=t,{checkoutClientId:l,checkoutMarketSegment:h,checkoutWorkflow:d,checkoutWorkflowStep:u,country:m,promotionCode:f,quantity:g,...T}=r(a),_=window.frameElement?"if":"fp",b={checkoutPromoCode:f,clientId:l,context:_,country:m,env:s,items:[],marketSegment:h,workflowStep:u,landscape:c,...T};if(o.length===1){let[{offerId:S,offerType:k,productArrangementCode:R}]=o,{marketSegments:[V]}=o[0];Object.assign(b,{marketSegment:V,offerType:k,productArrangementCode:R}),b.items.push(g[0]===1?{id:S}:{id:S,quantity:g[0]})}else b.items.push(...o.map(({offerId:S},k)=>({id:S,quantity:g[k]??L.quantity})));return Xn(d,b)}let{createCheckoutLink:i}=ie;return{CheckoutLink:ie,CheckoutWorkflow:re,CheckoutWorkflowStep:ne,buildCheckoutURL:n,collectCheckoutOptions:r,createCheckoutLink:i}}function xh({interval:e=200,maxAttempts:t=25}={}){let r=X.module("ims");return new Promise(n=>{r.debug("Waing for IMS to be ready");let i=0;function o(){window.adobeIMS?.initialized?n():++i>t?(r.debug("Timeout"),n()):setTimeout(o,e)}o()})}function bh(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function vh(e){let t=X.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:n})=>(t.debug("Got user country:",n),n),n=>{t.error("Unable to get user country:",n)}):null)}function ms({}){let e=xh(),t=bh(e),r=vh(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}async function fs(e,t){let{data:r}=t||await Promise.resolve().then(()=>Rs(ps(),1));if(Array.isArray(r)){let n=o=>r.find(a=>yr(a.lang,o)),i=n(e.language)??n(L.language);if(i)return Object.freeze(i)}return{}}var gs=["GB_en","AU_en","FR_fr","AT_de","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","FR_fr","GR_el","GR_en","HU_hu","IE_en","IT_it","LU_de","LU_en","LU_fr","NL_nl","NO_nb","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","TR_tr","UA_uk","ID_en","ID_in","IN_en","IN_hi","JP_ja","MY_en","MY_ms","NZ_en","TH_en","TH_th"],Eh={INDIVIDUAL_COM:["ZA_en","LT_lt","LV_lv","NG_en","SA_ar","SA_en","ZA_en","SG_en","KR_ko"],TEAM_COM:["ZA_en","LT_lt","LV_lv","NG_en","ZA_en","CO_es","KR_ko"],INDIVIDUAL_EDU:["LT_lt","LV_lv","SA_en","SG_en"],TEAM_EDU:["SG_en","KR_ko"]},Qt=class Qt extends HTMLSpanElement{constructor(){super();p(this,"masElement",new Et(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-perpetual","data-promotion-code","data-tax-exclusive","data-template","data-wcs-osi"]}static createInlinePrice(r){let n=q();if(!n)return null;let{displayOldPrice:i,displayPerUnit:o,displayRecurrence:a,displayTax:s,forceTaxExclusive:c,perpetual:l,promotionCode:h,quantity:d,template:u,wcsOsi:m}=n.collectPriceOptions(r);return Ur(Qt,{displayOldPrice:i,displayPerUnit:o,displayRecurrence:a,displayTax:s,forceTaxExclusive:c,perpetual:l,promotionCode:h,quantity:d,template:u,wcsOsi:m})}get isInlinePrice(){return!0}attributeChangedCallback(r,n,i){this.masElement.attributeChangedCallback(r,n,i)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}resolveDisplayTaxForGeoAndSegment(r,n,i,o){let a=`${r}_${n}`;if(gs.includes(r)||gs.includes(a))return!0;let s=Eh[`${i}_${o}`];return s?!!(s.includes(r)||s.includes(a)):!1}async resolveDisplayTax(r,n){let[i]=await r.resolveOfferSelectors(n),o=Yt(await i,n);if(o?.length){let{country:a,language:s}=n,c=o[0],[l=""]=c.marketSegments;return this.resolveDisplayTaxForGeoAndSegment(a,s,c.customerSegment,l)}}async render(r={}){if(!this.isConnected)return!1;let n=q();if(!n)return!1;let i=n.collectPriceOptions(r,this);if(!i.wcsOsi.length)return!1;let o=this.masElement.togglePending(i);this.innerHTML="";let[a]=n.resolveOfferSelectors(i);return this.renderOffers(Yt(await a,i),i,o)}renderOffers(r,n={},i=void 0){if(!this.isConnected)return;let o=q();if(!o)return!1;let a=o.collectPriceOptions({...this.dataset,...n},this);if(i??(i=this.masElement.togglePending(a)),r.length){if(this.masElement.toggleResolved(i,r,a))return this.innerHTML=o.buildPriceHTML(r,a),!0}else{let s=new Error(`Not provided: ${a?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(i,s,a))return this.innerHTML="",!0}return!1}updateOptions(r){let n=q();if(!n)return!1;let{displayOldPrice:i,displayPerUnit:o,displayRecurrence:a,displayTax:s,forceTaxExclusive:c,perpetual:l,promotionCode:h,quantity:d,template:u,wcsOsi:m}=n.collectPriceOptions(r);return Dr(this,{displayOldPrice:i,displayPerUnit:o,displayRecurrence:a,displayTax:s,forceTaxExclusive:c,perpetual:l,promotionCode:h,quantity:d,template:u,wcsOsi:m}),!0}};p(Qt,"is","inline-price"),p(Qt,"tag","span");var oe=Qt;window.customElements.get(oe.is)||window.customElements.define(oe.is,oe,{extends:oe.tag});function xs({literals:e,providers:t,settings:r}){function n(a,s){let{country:c,displayOldPrice:l,displayPerUnit:h,displayRecurrence:d,displayTax:u,forceTaxExclusive:m,language:f,promotionCode:g,quantity:T}=r,{displayOldPrice:_=l,displayPerUnit:b=h,displayRecurrence:S=d,displayTax:k=u,forceTaxExclusive:R=m,country:V=c,language:H=f,perpetual:ae,promotionCode:Xe=g,quantity:Le=T,template:We,wcsOsi:J,...fe}=Object.assign({},s?.dataset??{},a??{}),se=xt({...fe,country:V,displayOldPrice:y(_),displayPerUnit:y(b),displayRecurrence:y(S),displayTax:y(k),forceTaxExclusive:y(R),language:H,perpetual:y(ae),promotionCode:Ht(Xe).effectivePromoCode,quantity:vt(Le,L.quantity),template:We,wcsOsi:$r(J)});if(s)for(let Q of t.price)Q(s,se);return se}function i(a,s){if(!Array.isArray(a)||!a.length||!s)return"";let{template:c}=s,l;switch(c){case"discount":l=ki;break;case"strikethrough":l=wi;break;case"optical":l=_i;break;case"annual":l=Pi;break;default:s.country==="AU"&&a[0].planType==="ABM"?l=s.promotionCode?Ii:Ci:l=s.promotionCode?Li:Ti}let h=n(s);h.literals=Object.assign({},e.price,xt(s.literals??{}));let[d]=a;return d={...d,...d.priceDetails},l(h,d)}let o=oe.createInlinePrice;return{InlinePrice:oe,buildPriceHTML:i,collectPriceOptions:n,createInlinePrice:o}}function bs({settings:e}){let t=X.module("wcs"),{env:r,wcsApiKey:n}=e,i=new Map,o=new Map,a;async function s(d,u,m=!0){let f=Rn;t.debug("Fetching:",d);let g="",T,_=(b,S,k)=>`${b}: ${S?.status}, url: ${k.toString()}`;try{if(d.offerSelectorIds=d.offerSelectorIds.sort(),g=new URL(e.wcsURL),g.searchParams.set("offer_selector_ids",d.offerSelectorIds.join(",")),g.searchParams.set("country",d.country),g.searchParams.set("locale",d.locale),g.searchParams.set("landscape",r===ze.STAGE?"ALL":e.landscape),g.searchParams.set("api_key",n),d.language&&g.searchParams.set("language",d.language),d.promotionCode&&g.searchParams.set("promotion_code",d.promotionCode),d.currency&&g.searchParams.set("currency",d.currency),T=await fetch(g.toString(),{credentials:"omit"}),T.ok){let b=await T.json();t.debug("Fetched:",d,b);let S=b.resolvedOffers??[];S=S.map(_r),u.forEach(({resolve:k},R)=>{let V=S.filter(({offerSelectorIds:H})=>H.includes(R)).flat();V.length&&(u.delete(R),k(V))})}else T.status===404&&d.offerSelectorIds.length>1?(t.debug("Multi-osi 404, fallback to fetch-by-one strategy"),await Promise.allSettled(d.offerSelectorIds.map(b=>s({...d,offerSelectorIds:[b]},u,!1)))):f=br}catch(b){f=br,t.error(f,d,b)}m&&u.size&&(t.debug("Missing:",{offerSelectorIds:[...u.keys()]}),u.forEach(b=>{b.reject(new Error(_(f,T,g)))}))}function c(){clearTimeout(a);let d=[...o.values()];o.clear(),d.forEach(({options:u,promises:m})=>s(u,m))}function l(){let d=i.size;i.clear(),t.debug(`Flushed ${d} cache entries`)}function h({country:d,language:u,perpetual:m=!1,promotionCode:f="",wcsOsi:g=[]}){let T=`${u}_${d}`;d!=="GB"&&(u=m?"EN":"MULT");let _=[d,u,f].filter(b=>b).join("-").toLowerCase();return g.map(b=>{let S=`${b}-${_}`;if(!i.has(S)){let k=new Promise((R,V)=>{let H=o.get(_);if(!H){let ae={country:d,locale:T,offerSelectorIds:[]};d!=="GB"&&(ae.language=u),H={options:ae,promises:new Map},o.set(_,H)}f&&(H.options.promotionCode=f),H.options.offerSelectorIds.push(b),H.promises.set(b,{resolve:R,reject:V}),H.options.offerSelectorIds.length>=e.wcsBufferLimit?c():(t.debug("Queued:",H.options),a||(a=setTimeout(c,e.wcsBufferDelay)))});i.set(S,k)}return i.get(S)})}return{WcsCommitment:Ni,WcsPlanType:Oi,WcsTerm:Ri,resolveOfferSelectors:h,flushWcsCache:l}}var ji="mas-commerce-service",Sh="mas:start",yh="mas:ready",jr,vs,Kr=class extends HTMLElement{constructor(){super(...arguments);K(this,jr);p(this,"promise",null)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(n,i,o)=>{let a=await r?.(n,i,this.imsSignedInPromise,o);return a||null})}async activate(){let r=w(this,jr,vs),n=Object.freeze($i(r));At(r.lana);let i=X.init(r.hostEnv).module("service");i.debug("Activating:",r);let o={price:{}};try{o.price=await fs(n,r.commerce.priceLiterals)}catch{}let a={checkout:new Set,price:new Set},s={literals:o,providers:a,settings:n};Object.defineProperties(this,Object.getOwnPropertyDescriptors({...us(s),...ms(s),...xs(s),...bs(s),...Gn,Log:X,get defaults(){return L},get log(){return X},get providers(){return{checkout(c){return a.checkout.add(c),()=>a.checkout.delete(c)},price(c){return a.price.add(c),()=>a.price.delete(c)}}},get settings(){return n}})),i.debug("Activated:",{literals:o,settings:n}),Fe(()=>{let c=new CustomEvent(it,{bubbles:!0,cancelable:!1,detail:this});performance.mark(yh),this.dispatchEvent(c)})}connectedCallback(){this.readyPromise||(performance.mark(Sh),this.readyPromise=this.activate())}disconnectedCallback(){this.readyPromise=null}flushWcsCache(){this.flushWcsCache(),this.log.debug("Flushed WCS cache")}refreshOffers(){this.flushWcsCache(),document.querySelectorAll('span[is="inline-price"],a[is="checkout-link"]').forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers")}refreshFragments(){this.flushWcsCache(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh()),this.log.debug("Refreshed AEM fragments")}};jr=new WeakSet,vs=function(){let r={hostEnv:{name:this.getAttribute("host-env")??"prod"},commerce:{env:this.getAttribute("env")},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate"),10),isProdDomain:this.getAttribute("host-env")==="prod"}};return["locale","country","language"].forEach(n=>{let i=this.getAttribute(n);i&&(r[n]=i)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(n=>{let i=this.getAttribute(n);if(i!=null){let o=n.replace(/-([a-z])/g,a=>a[1].toUpperCase());r.commerce[o]=i}}),r},p(Kr,"instance");window.customElements.get(ji)||window.customElements.define(ji,Kr);At({sampleRate:1});export{je as CheckoutButton,ie as CheckoutLink,re as CheckoutWorkflow,ne as CheckoutWorkflowStep,L as Defaults,oe as InlinePrice,$e as Landscape,X as Log,ji as TAG_NAME_SERVICE,Ni as WcsCommitment,Oi as WcsPlanType,Ri as WcsTerm,_r as applyPlanType,$i as getSettings}; /*! Bundled license information: @lit/reactive-element/css-tag.js: diff --git a/libs/deps/mas/merch-card-collection.js b/libs/deps/mas/merch-card-collection.js index db29fc71f6..00941f0f22 100644 --- a/libs/deps/mas/merch-card-collection.js +++ b/libs/deps/mas/merch-card-collection.js @@ -1,4 +1,4 @@ -var N=Object.defineProperty;var y=(s,e,t)=>e in s?N(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var E=(s,e,t)=>y(s,typeof e!="symbol"?e+"":e,t);import{html as l,LitElement as O}from"../lit-all.min.js";var f=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};var x="hashchange";function L(s=window.location.hash){let e=[],t=s.replace(/^#/,"").split("&");for(let o of t){let[n,i=""]=o.split("=");n&&e.push([n,decodeURIComponent(i.replace(/\+/g," "))])}return Object.fromEntries(e)}function d(s){let e=new URLSearchParams(window.location.hash.slice(1));Object.entries(s).forEach(([n,i])=>{i?e.set(n,i):e.delete(n)}),e.sort();let t=e.toString();if(t===window.location.hash)return;let o=window.scrollY||document.documentElement.scrollTop;window.location.hash=t,window.scrollTo(0,o)}function T(s){let e=()=>{if(window.location.hash&&!window.location.hash.includes("="))return;let t=L(window.location.hash);s(t)};return e(),window.addEventListener(x,e),()=>{window.removeEventListener(x,e)}}var g="merch-card-collection:sort",S="merch-card-collection:showmore";var A="(max-width: 1199px)",R="(min-width: 768px)",C="(min-width: 1200px)";import{css as M,unsafeCSS as w}from"../lit-all.min.js";var b=M` +var y=Object.defineProperty;var N=(s,e,t)=>e in s?y(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var E=(s,e,t)=>N(s,typeof e!="symbol"?e+"":e,t);import{html as l,LitElement as O}from"../lit-all.min.js";var f=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};var x="hashchange";function L(s=window.location.hash){let e=[],t=s.replace(/^#/,"").split("&");for(let o of t){let[n,i=""]=o.split("=");n&&e.push([n,decodeURIComponent(i.replace(/\+/g," "))])}return Object.fromEntries(e)}function d(s){let e=new URLSearchParams(window.location.hash.slice(1));Object.entries(s).forEach(([n,i])=>{i?e.set(n,i):e.delete(n)}),e.sort();let t=e.toString();if(t===window.location.hash)return;let o=window.scrollY||document.documentElement.scrollTop;window.location.hash=t,window.scrollTo(0,o)}function T(s){let e=()=>{if(window.location.hash&&!window.location.hash.includes("="))return;let t=L(window.location.hash);s(t)};return e(),window.addEventListener(x,e),()=>{window.removeEventListener(x,e)}}var g="merch-card-collection:sort",S="merch-card-collection:showmore";var A="(max-width: 1199px)",R="(min-width: 768px)",C="(min-width: 1200px)";import{css as M,unsafeCSS as w}from"../lit-all.min.js";var b=M` #header, #resultText, #footer { diff --git a/libs/deps/mas/merch-card.js b/libs/deps/mas/merch-card.js index b77a2cd164..805fee30e5 100644 --- a/libs/deps/mas/merch-card.js +++ b/libs/deps/mas/merch-card.js @@ -1,6 +1,6 @@ -var Nt=Object.defineProperty;var ot=r=>{throw TypeError(r)};var Pt=(r,e,t)=>e in r?Nt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var c=(r,e,t)=>Pt(r,typeof e!="symbol"?e+"":e,t),q=(r,e,t)=>e.has(r)||ot("Cannot "+t);var j=(r,e,t)=>(q(r,e,"read from private field"),t?t.call(r):e.get(r)),N=(r,e,t)=>e.has(r)?ot("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),nt=(r,e,t,o)=>(q(r,e,"write to private field"),o?o.call(r,t):e.set(r,t),t),K=(r,e,t)=>(q(r,e,"access private method"),t);import{LitElement as Ee}from"../lit-all.min.js";import{LitElement as Dt,html as at,css as Bt}from"../lit-all.min.js";var i=class extends Dt{constructor(){super(),this.size="m",this.alt=""}render(){let{href:e}=this;return e?at` +var ho=Object.defineProperty;var ir=e=>{throw TypeError(e)};var mo=(e,t,r)=>t in e?ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var u=(e,t,r)=>mo(e,typeof t!="symbol"?t+"":t,r),lt=(e,t,r)=>t.has(e)||ir("Cannot "+r);var ht=(e,t,r)=>(lt(e,t,"read from private field"),r?r.call(e):t.get(e)),Ie=(e,t,r)=>t.has(e)?ir("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ar=(e,t,r,n)=>(lt(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),mt=(e,t,r)=>(lt(e,t,"access private method"),r);import{LitElement as Ta}from"../lit-all.min.js";import{LitElement as uo,html as sr,css as po}from"../lit-all.min.js";var m=class extends uo{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?sr` ${this.alt} - `:at` ${this.alt}`}};c(i,"properties",{size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}}),c(i,"styles",Bt` + `:sr` ${this.alt}`}};u(m,"properties",{size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}}),u(m,"styles",po` :host { --img-width: 32px; --img-height: 32px; @@ -28,7 +28,7 @@ var Nt=Object.defineProperty;var ot=r=>{throw TypeError(r)};var Pt=(r,e,t)=>e in width: var(--mod-img-width, var(--img-width)); height: var(--mod-img-height, var(--img-height)); } - `);customElements.define("merch-icon",i);import{css as it,unsafeCSS as ct}from"../lit-all.min.js";var v="(max-width: 767px)",P="(max-width: 1199px)",l="(min-width: 768px)",m="(min-width: 1200px)",g="(min-width: 1600px)";var st=it` + `);customElements.define("merch-icon",m);import{css as lr,unsafeCSS as cr}from"../lit-all.min.js";var F="(max-width: 767px)",ke="(max-width: 1199px)",T="(min-width: 768px)",A="(min-width: 1200px)",C="(min-width: 1600px)";var hr=lr` :host { --consonant-merch-card-background-color: #fff; --consonant-merch-card-border: 1px solid var(--consonant-merch-card-border-color); @@ -250,9 +250,9 @@ var Nt=Object.defineProperty;var ot=r=>{throw TypeError(r)};var Pt=(r,e,t)=>e in ::slotted([slot='price']) { color: var(--consonant-merch-card-price-color); } -`,dt=()=>[it` +`,mr=()=>[lr` /* Tablet */ - @media screen and ${ct(l)} { + @media screen and ${cr(T)} { :host([size='wide']), :host([size='super-wide']) { width: 100%; @@ -261,26 +261,26 @@ var Nt=Object.defineProperty;var ot=r=>{throw TypeError(r)};var Pt=(r,e,t)=>e in } /* Laptop */ - @media screen and ${ct(m)} { + @media screen and ${cr(A)} { :host([size='wide']) { grid-column: span 2; } - `];import{html as D}from"../lit-all.min.js";var y,R=class R{constructor(e){c(this,"card");N(this,y);this.card=e,this.insertVariantStyle()}getContainer(){return nt(this,y,j(this,y)??this.card.closest('[class*="-merch-cards"]')??this.card.parentElement),j(this,y)}insertVariantStyle(){if(!R.styleMap[this.card.variant]){R.styleMap[this.card.variant]=!0;let e=document.createElement("style");e.innerHTML=this.getGlobalCSS(),document.head.appendChild(e)}}updateCardElementMinHeight(e,t){if(!e)return;let o=`--consonant-merch-card-${this.card.variant}-${t}-height`,n=Math.max(0,parseInt(window.getComputedStyle(e).height)||0),a=parseInt(this.getContainer().style.getPropertyValue(o))||0;n>a&&this.getContainer().style.setProperty(o,`${n}px`)}get badge(){let e;if(!(!this.card.badgeBackgroundColor||!this.card.badgeColor||!this.card.badgeText))return this.evergreen&&(e=`border: 1px solid ${this.card.badgeBackgroundColor}; border-right: none;`),D` + `];import{html as Be}from"../lit-all.min.js";var te,ge=class ge{constructor(t){u(this,"card");Ie(this,te);this.card=t,this.insertVariantStyle()}getContainer(){return ar(this,te,ht(this,te)??this.card.closest('[class*="-merch-cards"]')??this.card.parentElement),ht(this,te)}insertVariantStyle(){if(!ge.styleMap[this.card.variant]){ge.styleMap[this.card.variant]=!0;let t=document.createElement("style");t.innerHTML=this.getGlobalCSS(),document.head.appendChild(t)}}updateCardElementMinHeight(t,r){if(!t)return;let n=`--consonant-merch-card-${this.card.variant}-${r}-height`,o=Math.max(0,parseInt(window.getComputedStyle(t).height)||0),i=parseInt(this.getContainer().style.getPropertyValue(n))||0;o>i&&this.getContainer().style.setProperty(n,`${o}px`)}get badge(){let t;if(!(!this.card.badgeBackgroundColor||!this.card.badgeColor||!this.card.badgeText))return this.evergreen&&(t=`border: 1px solid ${this.card.badgeBackgroundColor}; border-right: none;`),Be`
${this.card.badgeText}
- `}get cardImage(){return D`
+ `}get cardImage(){return Be`
${this.badge} -
`}getGlobalCSS(){return""}get theme(){return document.querySelector("sp-theme")}get evergreen(){return this.card.classList.contains("intro-pricing")}get promoBottom(){return this.card.classList.contains("promo-bottom")}get headingSelector(){return'[slot="heading-xs"]'}get secureLabelFooter(){let e=this.card.secureLabel?D``}getGlobalCSS(){return""}get theme(){return document.querySelector("sp-theme")}get evergreen(){return this.card.classList.contains("intro-pricing")}get promoBottom(){return this.card.classList.contains("promo-bottom")}get headingSelector(){return'[slot="heading-xs"]'}get secureLabelFooter(){let t=this.card.secureLabel?Be`${this.card.secureLabel}`:"";return D`
${e}
`}async adjustTitleWidth(){let e=this.card.getBoundingClientRect().width,t=this.card.badgeElement?.getBoundingClientRect().width||0;e===0||t===0||this.card.style.setProperty("--consonant-merch-card-heading-xs-max-width",`${Math.round(e-t-16)}px`)}postCardUpdateHook(){}connectedCallbackHook(){}disconnectedCallbackHook(){}renderLayout(){}get aemFragmentMapping(){}};y=new WeakMap,c(R,"styleMap",{});var h=R;import{html as Q,css as Ht}from"../lit-all.min.js";function u(r,e={},t=""){let o=document.createElement(r);t instanceof HTMLElement?o.appendChild(t):o.innerHTML=t;for(let[n,a]of Object.entries(e))o.setAttribute(n,a);return o}function B(){return window.matchMedia("(max-width: 767px)").matches}function ht(){return window.matchMedia("(max-width: 1024px)").matches}var mt="merch-offer-select:ready",lt="merch-card:ready",pt="merch-card:action-menu-toggle";var Y="merch-storage:change",W="merch-quantity-selector:change";var H="aem:load",I="aem:error",gt="mas:ready",ut="mas:error";var xt=` + >`:"";return Be`
${t}
`}async adjustTitleWidth(){let t=this.card.getBoundingClientRect().width,r=this.card.badgeElement?.getBoundingClientRect().width||0;t===0||r===0||this.card.style.setProperty("--consonant-merch-card-heading-xs-max-width",`${Math.round(t-r-16)}px`)}postCardUpdateHook(){}connectedCallbackHook(){}disconnectedCallbackHook(){}renderLayout(){}get aemFragmentMapping(){}};te=new WeakMap,u(ge,"styleMap",{});var w=ge;import{html as gt,css as fo}from"../lit-all.min.js";function B(e,t={},r=null,n=null){let o=n?document.createElement(e,{is:n}):document.createElement(e);r instanceof HTMLElement?o.appendChild(r):o.innerHTML=r;for(let[i,a]of Object.entries(t))o.setAttribute(i,a);return o}function De(){return window.matchMedia("(max-width: 767px)").matches}function dr(){return window.matchMedia("(max-width: 1024px)").matches}var dt="wcms:commerce:ready";var ur="merch-offer-select:ready",pr="merch-card:ready",fr="merch-card:action-menu-toggle";var ut="merch-storage:change",pt="merch-quantity-selector:change";var Ue="aem:load",Ge="aem:error",gr="mas:ready",xr="mas:error",br="placeholder-failed",vr="placeholder-pending",yr="placeholder-resolved";var Er="mas:failed",wr="mas:resolved",Sr="mas/commerce";var $="failed",Y="pending",V="resolved",ft={DRAFT:"DRAFT",PUBLISHED:"PUBLISHED"};var Ar=` :root { --consonant-merch-card-catalog-width: 276px; --consonant-merch-card-catalog-icon-size: 40px; @@ -292,7 +292,7 @@ var Nt=Object.defineProperty;var ot=r=>{throw TypeError(r)};var Pt=(r,e,t)=>e in grid-template-columns: var(--consonant-merch-card-catalog-width); } -@media screen and ${l} { +@media screen and ${T} { :root { --consonant-merch-card-catalog-width: 302px; } @@ -304,7 +304,7 @@ var Nt=Object.defineProperty;var ot=r=>{throw TypeError(r)};var Pt=(r,e,t)=>e in } } -@media screen and ${m} { +@media screen and ${A} { :root { --consonant-merch-card-catalog-width: 276px; } @@ -315,7 +315,7 @@ var Nt=Object.defineProperty;var ot=r=>{throw TypeError(r)};var Pt=(r,e,t)=>e in } } -@media screen and ${g} { +@media screen and ${C} { .four-merch-cards.catalog { grid-template-columns: repeat(4, var(--consonant-merch-card-catalog-width)); } @@ -366,12 +366,12 @@ merch-card[variant="catalog"] .payment-details { font-style: italic; font-weight: 400; line-height: var(--consonant-merch-card-body-line-height); -}`;var It={title:{tag:"h3",slot:"heading-xs"},prices:{tag:"h3",slot:"heading-xs"},description:{tag:"div",slot:"body-xs"},ctas:{slot:"footer",size:"m"},allowedSizes:["wide","super-wide"]},w=class extends h{constructor(t){super(t);c(this,"dispatchActionMenuToggle",()=>{this.card.dispatchEvent(new CustomEvent(pt,{bubbles:!0,composed:!0,detail:{card:this.card.name,type:"action-menu"}}))});c(this,"toggleActionMenu",t=>{let o=this.card.shadowRoot.querySelector('slot[name="action-menu-content"]');!o||!t||t.type!=="click"&&t.code!=="Space"&&t.code!=="Enter"||(t.preventDefault(),o.classList.toggle("hidden"),o.classList.contains("hidden")||this.dispatchActionMenuToggle())});c(this,"toggleActionMenuFromCard",t=>{let o=t?.type==="mouseleave"?!0:void 0,n=this.card.shadowRoot,a=n.querySelector(".action-menu");this.card.blur(),a?.classList.remove("always-visible");let d=n.querySelector('slot[name="action-menu-content"]');d&&(o||this.dispatchActionMenuToggle(),d.classList.toggle("hidden",o))});c(this,"hideActionMenu",t=>{this.card.shadowRoot.querySelector('slot[name="action-menu-content"]')?.classList.add("hidden")});c(this,"focusEventHandler",t=>{let o=this.card.shadowRoot.querySelector(".action-menu");o&&(o.classList.add("always-visible"),(t.relatedTarget?.nodeName==="MERCH-CARD-COLLECTION"||t.relatedTarget?.nodeName==="MERCH-CARD"&&t.target.nodeName!=="MERCH-ICON")&&o.classList.remove("always-visible"))})}get aemFragmentMapping(){return It}renderLayout(){return Q`
+}`;var go={title:{tag:"h3",slot:"heading-xs"},prices:{tag:"h3",slot:"heading-xs"},description:{tag:"div",slot:"body-xs"},ctas:{slot:"footer",size:"m"},allowedSizes:["wide","super-wide"]},re=class extends w{constructor(r){super(r);u(this,"dispatchActionMenuToggle",()=>{this.card.dispatchEvent(new CustomEvent(fr,{bubbles:!0,composed:!0,detail:{card:this.card.name,type:"action-menu"}}))});u(this,"toggleActionMenu",r=>{let n=this.card.shadowRoot.querySelector('slot[name="action-menu-content"]');!n||!r||r.type!=="click"&&r.code!=="Space"&&r.code!=="Enter"||(r.preventDefault(),n.classList.toggle("hidden"),n.classList.contains("hidden")||this.dispatchActionMenuToggle())});u(this,"toggleActionMenuFromCard",r=>{let n=r?.type==="mouseleave"?!0:void 0,o=this.card.shadowRoot,i=o.querySelector(".action-menu");this.card.blur(),i?.classList.remove("always-visible");let a=o.querySelector('slot[name="action-menu-content"]');a&&(n||this.dispatchActionMenuToggle(),a.classList.toggle("hidden",n))});u(this,"hideActionMenu",r=>{this.card.shadowRoot.querySelector('slot[name="action-menu-content"]')?.classList.add("hidden")});u(this,"focusEventHandler",r=>{let n=this.card.shadowRoot.querySelector(".action-menu");n&&(n.classList.add("always-visible"),(r.relatedTarget?.nodeName==="MERCH-CARD-COLLECTION"||r.relatedTarget?.nodeName==="MERCH-CARD"&&r.target.nodeName!=="MERCH-ICON")&&n.classList.remove("always-visible"))})}get aemFragmentMapping(){return go}renderLayout(){return gt`
${this.badge}
- ${this.promoBottom?"":Q``} - ${this.promoBottom?Q``:""}
${this.secureLabelFooter} - `}getGlobalCSS(){return xt}connectedCallbackHook(){this.card.addEventListener("mouseleave",this.toggleActionMenuFromCard),this.card.addEventListener("focusout",this.focusEventHandler)}disconnectedCallbackHook(){this.card.removeEventListener("mouseleave",this.toggleActionMenuFromCard),this.card.removeEventListener("focusout",this.focusEventHandler)}};c(w,"variantStyle",Ht` + `}getGlobalCSS(){return Ar}connectedCallbackHook(){this.card.addEventListener("mouseleave",this.toggleActionMenuFromCard),this.card.addEventListener("focusout",this.focusEventHandler)}disconnectedCallbackHook(){this.card.removeEventListener("mouseleave",this.toggleActionMenuFromCard),this.card.removeEventListener("focusout",this.focusEventHandler)}};u(re,"variantStyle",fo` :host([variant='catalog']) { min-height: 330px; width: var(--consonant-merch-card-catalog-width); @@ -414,7 +414,7 @@ merch-card[variant="catalog"] .payment-details { margin-left: var(--consonant-merch-spacing-xxs); box-sizing: border-box; } - `);import{html as M}from"../lit-all.min.js";var ft=` + `);import{html as xe}from"../lit-all.min.js";var Tr=` :root { --consonant-merch-card-image-width: 300px; } @@ -426,7 +426,7 @@ merch-card[variant="catalog"] .payment-details { grid-template-columns: var(--consonant-merch-card-image-width); } -@media screen and ${l} { +@media screen and ${T} { .two-merch-cards.image, .three-merch-cards.image, .four-merch-cards.image { @@ -434,7 +434,7 @@ merch-card[variant="catalog"] .payment-details { } } -@media screen and ${m} { +@media screen and ${A} { :root { --consonant-merch-card-image-width: 378px; } @@ -445,29 +445,29 @@ merch-card[variant="catalog"] .payment-details { } } -@media screen and ${g} { +@media screen and ${C} { .four-merch-cards.image { grid-template-columns: repeat(4, var(--consonant-merch-card-image-width)); } } -`;var F=class extends h{constructor(e){super(e)}getGlobalCSS(){return ft}renderLayout(){return M`${this.cardImage} +`;var ze=class extends w{constructor(t){super(t)}getGlobalCSS(){return Tr}renderLayout(){return xe`${this.cardImage}
- ${this.promoBottom?M``:M``} + ${this.promoBottom?xe``:xe``}
- ${this.evergreen?M` + ${this.evergreen?xe`
- `:M` + `:xe`
${this.secureLabelFooter} - `}`}};import{html as bt}from"../lit-all.min.js";var vt=` + `}`}};import{html as Lr}from"../lit-all.min.js";var _r=` :root { --consonant-merch-card-inline-heading-width: 300px; } @@ -479,7 +479,7 @@ merch-card[variant="catalog"] .payment-details { grid-template-columns: var(--consonant-merch-card-inline-heading-width); } -@media screen and ${l} { +@media screen and ${T} { .two-merch-cards.inline-heading, .three-merch-cards.inline-heading, .four-merch-cards.inline-heading { @@ -487,7 +487,7 @@ merch-card[variant="catalog"] .payment-details { } } -@media screen and ${m} { +@media screen and ${A} { :root { --consonant-merch-card-inline-heading-width: 378px; } @@ -498,12 +498,12 @@ merch-card[variant="catalog"] .payment-details { } } -@media screen and ${g} { +@media screen and ${C} { .four-merch-cards.inline-heading { grid-template-columns: repeat(4, var(--consonant-merch-card-inline-heading-width)); } } -`;var U=class extends h{constructor(e){super(e)}getGlobalCSS(){return vt}renderLayout(){return bt` ${this.badge} +`;var Fe=class extends w{constructor(t){super(t)}getGlobalCSS(){return _r}renderLayout(){return Lr` ${this.badge}
@@ -511,7 +511,7 @@ merch-card[variant="catalog"] .payment-details {
- ${this.card.customHr?"":bt`
`} ${this.secureLabelFooter}`}};import{html as E,css as Ft,unsafeCSS as wt}from"../lit-all.min.js";var yt=` + ${this.card.customHr?"":Lr`
`} ${this.secureLabelFooter}`}};import{html as ne,css as xo,unsafeCSS as Pr}from"../lit-all.min.js";var Cr=` :root { --consonant-merch-card-mini-compare-chart-icon-size: 32px; --consonant-merch-card-mini-compare-mobile-cta-font-size: 15px; @@ -702,7 +702,7 @@ merch-card[variant="catalog"] .payment-details { } /* mini compare mobile */ -@media screen and ${v} { +@media screen and ${F} { :root { --consonant-merch-card-mini-compare-chart-width: 302px; --consonant-merch-card-mini-compare-chart-wide-width: 302px; @@ -740,7 +740,7 @@ merch-card[variant="catalog"] .payment-details { } } -@media screen and ${P} { +@media screen and ${ke} { merch-card[variant="mini-compare-chart"] [slot='heading-m'] { font-size: var(--consonant-merch-card-body-s-font-size); line-height: var(--consonant-merch-card-body-s-line-height); @@ -766,7 +766,7 @@ merch-card[variant="catalog"] .payment-details { line-height: var(--consonant-merch-card-body-xs-line-height); } } -@media screen and ${l} { +@media screen and ${T} { :root { --consonant-merch-card-mini-compare-chart-width: 302px; --consonant-merch-card-mini-compare-chart-wide-width: 302px; @@ -784,7 +784,7 @@ merch-card[variant="catalog"] .payment-details { } /* desktop */ -@media screen and ${m} { +@media screen and ${A} { :root { --consonant-merch-card-mini-compare-chart-width: 378px; --consonant-merch-card-mini-compare-chart-wide-width: 484px; @@ -805,7 +805,7 @@ merch-card[variant="catalog"] .payment-details { } } -@media screen and ${g} { +@media screen and ${C} { .four-merch-cards.mini-compare-chart { grid-template-columns: repeat(4, var(--consonant-merch-card-mini-compare-chart-width)); } @@ -842,16 +842,16 @@ merch-card .footer-row-cell:nth-child(7) { merch-card .footer-row-cell:nth-child(8) { min-height: var(--consonant-merch-card-footer-row-8-min-height); } -`;var Ut=32,S=class extends h{constructor(t){super(t);c(this,"getRowMinHeightPropertyName",t=>`--consonant-merch-card-footer-row-${t}-min-height`);c(this,"getMiniCompareFooter",()=>{let t=this.card.secureLabel?E` +`;var bo=32,oe=class extends w{constructor(r){super(r);u(this,"getRowMinHeightPropertyName",r=>`--consonant-merch-card-footer-row-${r}-min-height`);u(this,"getMiniCompareFooter",()=>{let r=this.card.secureLabel?ne` ${this.card.secureLabel}`:E``;return E`
${t}
`})}getGlobalCSS(){return yt}adjustMiniCompareBodySlots(){if(this.card.getBoundingClientRect().width<=2)return;this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(".top-section"),"top-section");let t=["heading-m","body-m","heading-m-price","body-xxs","price-commitment","offers","promo-text","callout-content"];this.card.classList.contains("bullet-list")&&t.push("footer-rows"),t.forEach(n=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${n}"]`),n)),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer");let o=this.card.shadowRoot.querySelector(".mini-compare-chart-badge");o&&o.textContent!==""&&this.getContainer().style.setProperty("--consonant-merch-card-mini-compare-chart-top-section-mobile-height","32px")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;[...this.card.querySelector('[slot="footer-rows"] ul')?.children].forEach((o,n)=>{let a=Math.max(Ut,parseFloat(window.getComputedStyle(o).height)||0),d=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(n+1)))||0;a>d&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(n+1),`${a}px`)})}removeEmptyRows(){this.card.querySelectorAll(".footer-row-cell").forEach(o=>{let n=o.querySelector(".footer-row-cell-description");n&&!n.textContent.trim()&&o.remove()})}renderLayout(){return E`
+ >`:ne``;return ne`
${r}
`})}getGlobalCSS(){return Cr}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(o=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${o}"]`),o)),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer");let n=this.card.shadowRoot.querySelector(".mini-compare-chart-badge");n&&n.textContent!==""&&this.getContainer().style.setProperty("--consonant-merch-card-mini-compare-chart-top-section-mobile-height","32px")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;[...this.card.querySelector('[slot="footer-rows"] ul')?.children].forEach((n,o)=>{let i=Math.max(bo,parseFloat(window.getComputedStyle(n).height)||0),a=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(o+1)))||0;i>a&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(o+1),`${i}px`)})}removeEmptyRows(){this.card.querySelectorAll(".footer-row-cell").forEach(n=>{let o=n.querySelector(".footer-row-cell-description");o&&!o.textContent.trim()&&n.remove()})}renderLayout(){return ne`
${this.badge}
- ${this.card.classList.contains("bullet-list")?E` - `:E` + ${this.card.classList.contains("bullet-list")?ne` + `:ne` `} @@ -859,7 +859,7 @@ merch-card .footer-row-cell:nth-child(8) { ${this.getMiniCompareFooter()} - `}async postCardUpdateHook(){B()?this.removeEmptyRows():(await Promise.all(this.card.prices.map(t=>t.onceSettled())),this.adjustMiniCompareBodySlots(),this.adjustMiniCompareFooterRows())}};c(S,"variantStyle",Ft` + `}async postCardUpdateHook(){De()?this.removeEmptyRows():(await Promise.all(this.card.prices.map(r=>r.onceSettled())),this.adjustMiniCompareBodySlots(),this.adjustMiniCompareFooterRows())}};u(oe,"variantStyle",xo` :host([variant='mini-compare-chart']) > slot:not([name='icons']) { display: block; } @@ -892,7 +892,7 @@ merch-card .footer-row-cell:nth-child(8) { color: var(--merch-color-grey-700); } - @media screen and ${wt(P)} { + @media screen and ${Pr(ke)} { [class*'-merch-cards'] :host([variant='mini-compare-chart']) footer { flex-direction: column; align-items: stretch; @@ -900,7 +900,7 @@ merch-card .footer-row-cell:nth-child(8) { } } - @media screen and ${wt(m)} { + @media screen and ${Pr(A)} { :host([variant='mini-compare-chart']) footer { padding: var(--consonant-merch-spacing-xs) var(--consonant-merch-spacing-s) @@ -951,7 +951,7 @@ merch-card .footer-row-cell:nth-child(8) { :host([variant='mini-compare-chart']) slot[name='footer-rows'] { justify-content: flex-start; } - `);import{html as G,css as Gt}from"../lit-all.min.js";var Et=` + `);import{html as $e,css as vo}from"../lit-all.min.js";var Rr=` :root { --consonant-merch-card-plans-width: 300px; --consonant-merch-card-plans-icon-size: 40px; @@ -977,7 +977,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { } /* Tablet */ -@media screen and ${l} { +@media screen and ${T} { :root { --consonant-merch-card-plans-width: 302px; } @@ -989,7 +989,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { } /* desktop */ -@media screen and ${m} { +@media screen and ${A} { :root { --consonant-merch-card-plans-width: 276px; } @@ -1000,28 +1000,28 @@ merch-card[variant="plans"] [slot="quantity-select"] { } /* Large desktop */ - @media screen and ${g} { + @media screen and ${C} { .four-merch-cards.plans { grid-template-columns: repeat(4, var(--consonant-merch-card-plans-width)); } } -`;var k=class extends h{constructor(e){super(e)}getGlobalCSS(){return Et}postCardUpdateHook(){this.adjustTitleWidth()}get stockCheckbox(){return this.card.checkboxLabel?G``:""}renderLayout(){return $e` ${this.badge}
- ${this.promoBottom?"":G` `} + ${this.promoBottom?"":$e` `} - ${this.promoBottom?G` `:""} + ${this.promoBottom?$e` `:""} ${this.stockCheckbox}
- ${this.secureLabelFooter}`}};c(k,"variantStyle",Gt` + ${this.secureLabelFooter}`}};u(ie,"variantStyle",vo` :host([variant='plans']) { min-height: 348px; } @@ -1029,7 +1029,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { :host([variant='plans']) ::slotted([slot='heading-xs']) { max-width: var(--consonant-merch-card-heading-xs-max-width, 100%); } - `);import{html as X,css as Vt}from"../lit-all.min.js";var St=` + `);import{html as xt,css as yo}from"../lit-all.min.js";var Nr=` :root { --consonant-merch-card-product-width: 300px; } @@ -1043,7 +1043,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { } /* Tablet */ -@media screen and ${l} { +@media screen and ${T} { .two-merch-cards.product, .three-merch-cards.product, .four-merch-cards.product { @@ -1052,7 +1052,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { } /* desktop */ -@media screen and ${m} { +@media screen and ${A} { :root { --consonant-merch-card-product-width: 378px; } @@ -1064,23 +1064,23 @@ merch-card[variant="plans"] [slot="quantity-select"] { } /* Large desktop */ -@media screen and ${g} { +@media screen and ${C} { .four-merch-cards.product { grid-template-columns: repeat(4, var(--consonant-merch-card-product-width)); } } -`;var b=class extends h{constructor(e){super(e),this.postCardUpdateHook=this.postCardUpdateHook.bind(this)}getGlobalCSS(){return St}adjustProductBodySlots(){if(this.card.getBoundingClientRect().width===0)return;["heading-xs","body-xxs","body-xs","promo-text","callout-content","body-lower"].forEach(t=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${t}"]`),t))}renderLayout(){return X` ${this.badge} +`;var W=class extends w{constructor(t){super(t),this.postCardUpdateHook=this.postCardUpdateHook.bind(this)}getGlobalCSS(){return Nr}adjustProductBodySlots(){if(this.card.getBoundingClientRect().width===0)return;["heading-xs","body-xxs","body-xs","promo-text","callout-content","body-lower"].forEach(r=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${r}"]`),r))}renderLayout(){return xt` ${this.badge}
- ${this.promoBottom?"":X``} + ${this.promoBottom?"":xt``} - ${this.promoBottom?X``:""} + ${this.promoBottom?xt``:""}
- ${this.secureLabelFooter}`}connectedCallbackHook(){window.addEventListener("resize",this.postCardUpdateHook)}disconnectedCallbackHook(){window.removeEventListener("resize",this.postCardUpdateHook)}postCardUpdateHook(){this.card.isConnected&&(B()||this.adjustProductBodySlots(),this.adjustTitleWidth())}};c(b,"variantStyle",Vt` + ${this.secureLabelFooter}`}connectedCallbackHook(){window.addEventListener("resize",this.postCardUpdateHook)}disconnectedCallbackHook(){window.removeEventListener("resize",this.postCardUpdateHook)}postCardUpdateHook(){this.card.isConnected&&(De()||this.adjustProductBodySlots(),this.adjustTitleWidth())}};u(W,"variantStyle",yo` :host([variant='product']) > slot:not([name='icons']) { display: block; } @@ -1108,7 +1108,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { :host([variant='product']) ::slotted([slot='heading-xs']) { max-width: var(--consonant-merch-card-heading-xs-max-width, 100%); } - `);import{html as Z,css as qt}from"../lit-all.min.js";var kt=` + `);import{html as bt,css as Eo}from"../lit-all.min.js";var Or=` :root { --consonant-merch-card-segment-width: 378px; } @@ -1122,13 +1122,13 @@ merch-card[variant="plans"] [slot="quantity-select"] { } /* Mobile */ -@media screen and ${v} { +@media screen and ${F} { :root { --consonant-merch-card-segment-width: 276px; } } -@media screen and ${l} { +@media screen and ${T} { :root { --consonant-merch-card-segment-width: 276px; } @@ -1141,7 +1141,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { } /* desktop */ -@media screen and ${m} { +@media screen and ${A} { :root { --consonant-merch-card-segment-width: 302px; } @@ -1154,23 +1154,23 @@ merch-card[variant="plans"] [slot="quantity-select"] { grid-template-columns: repeat(4, minmax(276px, var(--consonant-merch-card-segment-width))); } } -`;var A=class extends h{constructor(e){super(e)}getGlobalCSS(){return kt}postCardUpdateHook(){this.adjustTitleWidth()}renderLayout(){return Z` ${this.badge} +`;var ae=class extends w{constructor(t){super(t)}getGlobalCSS(){return Or}postCardUpdateHook(){this.adjustTitleWidth()}renderLayout(){return bt` ${this.badge}
- ${this.promoBottom?"":Z``} + ${this.promoBottom?"":bt``} - ${this.promoBottom?Z``:""} + ${this.promoBottom?bt``:""}

- ${this.secureLabelFooter}`}};c(A,"variantStyle",qt` + ${this.secureLabelFooter}`}};u(ae,"variantStyle",Eo` :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 J,css as jt}from"../lit-all.min.js";var At=` + `);import{html as vt,css as wo}from"../lit-all.min.js";var Hr=` :root { --consonant-merch-card-special-offers-width: 378px; } @@ -1187,13 +1187,13 @@ merch-card[variant="special-offers"] span[is="inline-price"][data-template="stri grid-template-columns: minmax(300px, var(--consonant-merch-card-special-offers-width)); } -@media screen and ${v} { +@media screen and ${F} { :root { --consonant-merch-card-special-offers-width: 302px; } } -@media screen and ${l} { +@media screen and ${T} { :root { --consonant-merch-card-special-offers-width: 302px; } @@ -1206,36 +1206,36 @@ merch-card[variant="special-offers"] span[is="inline-price"][data-template="stri } /* desktop */ -@media screen and ${m} { +@media screen and ${A} { .three-merch-cards.special-offers, .four-merch-cards.special-offers { grid-template-columns: repeat(3, minmax(300px, var(--consonant-merch-card-special-offers-width))); } } -@media screen and ${g} { +@media screen and ${C} { .four-merch-cards.special-offers { grid-template-columns: repeat(4, minmax(300px, var(--consonant-merch-card-special-offers-width))); } } -`;var Kt={name:{tag:"h4",slot:"detail-m"},title:{tag:"h4",slot:"detail-m"},backgroundImage:{tag:"div",slot:"bg-image"},prices:{tag:"h3",slot:"heading-xs"},description:{tag:"div",slot:"body-xs"},ctas:{slot:"footer",size:"l"}},_=class extends h{constructor(e){super(e)}getGlobalCSS(){return At}get headingSelector(){return'[slot="detail-m"]'}get aemFragmentMapping(){return Kt}renderLayout(){return J`${this.cardImage} +`;var So={name:{tag:"h4",slot:"detail-m"},title:{tag:"h4",slot:"detail-m"},backgroundImage:{tag:"div",slot:"bg-image"},prices:{tag:"h3",slot:"heading-xs"},description:{tag:"div",slot:"body-xs"},ctas:{slot:"footer",size:"l"}},se=class extends w{constructor(t){super(t)}getGlobalCSS(){return Hr}get headingSelector(){return'[slot="detail-m"]'}get aemFragmentMapping(){return So}renderLayout(){return vt`${this.cardImage}
- ${this.evergreen?J` + ${this.evergreen?vt`
- `:J` + `:vt`
${this.secureLabelFooter} `} - `}};c(_,"variantStyle",jt` + `}};u(se,"variantStyle",wo` :host([variant='special-offers']) { min-height: 439px; } @@ -1247,7 +1247,7 @@ merch-card[variant="special-offers"] span[is="inline-price"][data-template="stri :host([variant='special-offers'].center) { text-align: center; } - `);import{html as Yt,css as Wt}from"../lit-all.min.js";var _t=` + `);import{html as Ao,css as To}from"../lit-all.min.js";var Mr=` :root { --consonant-merch-card-twp-width: 268px; --consonant-merch-card-twp-mobile-width: 300px; @@ -1302,7 +1302,7 @@ merch-card[variant='twp'] merch-offer-select { grid-template-columns: var(--consonant-merch-card-image-width); } -@media screen and ${v} { +@media screen and ${F} { :root { --consonant-merch-card-twp-width: 300px; } @@ -1313,7 +1313,7 @@ merch-card[variant='twp'] merch-offer-select { } } -@media screen and ${l} { +@media screen and ${T} { :root { --consonant-merch-card-twp-width: 268px; } @@ -1326,7 +1326,7 @@ merch-card[variant='twp'] merch-offer-select { } } -@media screen and ${m} { +@media screen and ${A} { :root { --consonant-merch-card-twp-width: 268px; } @@ -1339,7 +1339,7 @@ merch-card[variant='twp'] merch-offer-select { } } -@media screen and ${g} { +@media screen and ${C} { .one-merch-card.twp .two-merch-cards.twp { grid-template-columns: repeat(2, var(--consonant-merch-card-twp-width)); @@ -1348,7 +1348,7 @@ merch-card[variant='twp'] merch-offer-select { grid-template-columns: repeat(3, var(--consonant-merch-card-twp-width)); } } -`;var L=class extends h{constructor(e){super(e)}getGlobalCSS(){return _t}renderLayout(){return Yt`${this.badge} +`;var ce=class extends w{constructor(t){super(t)}getGlobalCSS(){return Mr}renderLayout(){return Ao`${this.badge}
@@ -1357,7 +1357,7 @@ merch-card[variant='twp'] merch-offer-select {
-
`}};c(L,"variantStyle",Wt` +
`}};u(ce,"variantStyle",To` :host([variant='twp']) { padding: 4px 10px 5px 10px; } @@ -1396,7 +1396,7 @@ merch-card[variant='twp'] merch-offer-select { flex-direction: column; align-self: flex-start; } - `);import{html as Qt,css as Xt}from"../lit-all.min.js";var Lt=` + `);import{html as _o,css as Lo}from"../lit-all.min.js";var Ir=` merch-card[variant="ccd-suggested"] [slot="heading-xs"] { font-size: var(--consonant-merch-card-heading-xxs-font-size); @@ -1421,12 +1421,12 @@ merch-card[variant='twp'] merch-offer-select { .spectrum--darkest merch-card[variant="ccd-suggested"]:hover { --consonant-merch-card-border-color:rgb(73, 73, 73); } -`;var Zt={mnemonics:{size:"l"},subtitle:{tag:"h4",slot:"detail-s"},backgroundImage:{attribute:"background-image"},title:{tag:"h3",slot:"heading-xs"},prices:{tag:"p",slot:"price"},description:{tag:"div",slot:"body-xs"},ctas:{slot:"cta",size:"M"}},C=class extends h{getGlobalCSS(){return Lt}get aemFragmentMapping(){return Zt}get stripStyle(){return this.card.backgroundImage?` +`;var Co={mnemonics:{size:"l"},subtitle:{tag:"h4",slot:"detail-s"},backgroundImage:{attribute:"background-image"},title:{tag:"h3",slot:"heading-xs"},prices:{tag:"p",slot:"price"},description:{tag:"div",slot:"body-xs"},ctas:{slot:"cta",size:"M"}},le=class extends w{getGlobalCSS(){return Ir}get aemFragmentMapping(){return Co}get stripStyle(){return this.card.backgroundImage?` background: url("${this.card.backgroundImage}"); background-size: auto 100%; background-repeat: no-repeat; background-position: ${this.card.dir==="ltr"?"left":"right"}; - `:""}renderLayout(){return Qt`
+ `:""}renderLayout(){return _o`
@@ -1443,7 +1443,7 @@ merch-card[variant='twp'] merch-offer-select {
- `}postCardUpdateHook(e){e.has("backgroundImage")&&this.styleBackgroundImage()}styleBackgroundImage(){if(this.card.classList.remove("thin-strip"),this.card.classList.remove("wide-strip"),!this.card.backgroundImage)return;let e=new Image;e.src=this.card.backgroundImage,e.onload=()=>{e.width>8?this.card.classList.add("wide-strip"):e.width===8&&this.card.classList.add("thin-strip")}}};c(C,"variantStyle",Xt` + `}postCardUpdateHook(t){t.has("backgroundImage")&&this.styleBackgroundImage()}styleBackgroundImage(){if(this.card.classList.remove("thin-strip"),this.card.classList.remove("wide-strip"),!this.card.backgroundImage)return;let t=new Image;t.src=this.card.backgroundImage,t.onload=()=>{t.width>8?this.card.classList.add("wide-strip"):t.width===8&&this.card.classList.add("thin-strip")}}};u(le,"variantStyle",Lo` :host([variant='ccd-suggested']) { --consonant-merch-card-background-color: rgb(245, 245, 245); --consonant-merch-card-body-xs-color: rgb(75, 75, 75); @@ -1552,7 +1552,7 @@ merch-card[variant='twp'] merch-offer-select { :host([variant='ccd-suggested']) .top-section { align-items: center; } - `);import{html as Jt,css as te}from"../lit-all.min.js";var Ct=` + `);import{html as Po,css as Ro}from"../lit-all.min.js";var kr=` merch-card[variant="ccd-slice"] [slot='image'] img { overflow: hidden; @@ -1572,23 +1572,23 @@ 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 ee={mnemonics:{size:"m"},backgroundImage:{tag:"div",slot:"image"},description:{tag:"div",slot:"body-s"},ctas:{slot:"footer",size:"S"},allowedSizes:["wide"]},z=class extends h{getGlobalCSS(){return Ct}get aemFragmentMapping(){return ee}renderLayout(){return Jt`
+`;var No={mnemonics:{size:"m"},backgroundImage:{tag:"div",slot:"image"},description:{tag:"div",slot:"body-s"},ctas:{slot:"footer",size:"S"},allowedSizes:["wide"]},he=class extends w{getGlobalCSS(){return kr}get aemFragmentMapping(){return No}renderLayout(){return Po`
- - ${this.badge} -
+ + ${this.badge} +
- `}};c(z,"variantStyle",te` + `}};u(he,"variantStyle",Ro` :host([variant='ccd-slice']) { --consonant-merch-card-background-color: rgb(248, 248, 248); - --consonant-merch-card-border-color:rgb(230, 230, 230); + --consonant-merch-card-border-color: rgb(230, 230, 230); --consonant-merch-card-body-s-color: rgb(34, 34, 34); --merch-color-inline-price-strikethrough: var(--spectrum-gray-600); --mod-img-height: 29px; - + box-sizing: border-box; min-width: 290px; max-width: 322px; @@ -1601,7 +1601,7 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link { } :host([variant='ccd-slice']) * { - overflow: hidden; + overflow: hidden; } :host([variant='ccd-slice']) ::slotted([slot='body-s']) { @@ -1609,12 +1609,15 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link { line-height: var(--consonant-merch-card-body-xxs-line-height); min-width: 154px; max-width: 171px; - max-height: 54px; + height: 55px; overflow: hidden; } :host([variant='ccd-slice'][size='wide']) ::slotted([slot='body-s']) { - max-width: 425px; + max-width: 425px; + display: flex; + flex-direction: column; + justify-content: center; } :host([variant='ccd-slice'][size='wide']) { @@ -1627,7 +1630,8 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link { gap: var(--consonant-merch-spacing-xxs); padding: 15px; padding-inline-end: 0; - width: 154px; + height: 154px; + box-sizing: border-box; min-height: 123px; flex-direction: column; justify-content: space-between; @@ -1680,7 +1684,7 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link { align-items: center; gap: 8px; } - `);var tt=(r,e=!1)=>{switch(r.variant){case"catalog":return new w(r);case"image":return new F(r);case"inline-heading":return new U(r);case"mini-compare-chart":return new S(r);case"plans":return new k(r);case"product":return new b(r);case"segment":return new A(r);case"special-offers":return new _(r);case"twp":return new L(r);case"ccd-suggested":return new C(r);case"ccd-slice":return new z(r);default:return e?void 0:new b(r)}},zt=()=>{let r=[];return r.push(w.variantStyle),r.push(S.variantStyle),r.push(b.variantStyle),r.push(k.variantStyle),r.push(A.variantStyle),r.push(_.variantStyle),r.push(L.variantStyle),r.push(C.variantStyle),r.push(z.variantStyle),r};var Tt=document.createElement("style");Tt.innerHTML=` + `);var yt=(e,t=!1)=>{switch(e.variant){case"catalog":return new re(e);case"image":return new ze(e);case"inline-heading":return new Fe(e);case"mini-compare-chart":return new oe(e);case"plans":return new ie(e);case"product":return new W(e);case"segment":return new ae(e);case"special-offers":return new se(e);case"twp":return new ce(e);case"ccd-suggested":return new le(e);case"ccd-slice":return new he(e);default:return t?void 0:new W(e)}},Br=()=>{let e=[];return e.push(re.variantStyle),e.push(oe.variantStyle),e.push(W.variantStyle),e.push(ie.variantStyle),e.push(ae.variantStyle),e.push(se.variantStyle),e.push(ce.variantStyle),e.push(le.variantStyle),e.push(he.variantStyle),e};var Dr=document.createElement("style");Dr.innerHTML=` :root { --consonant-merch-card-detail-font-size: 12px; --consonant-merch-card-detail-font-weight: 500; @@ -1850,10 +1854,6 @@ merch-card span[is='inline-price'] { display: inline-block; } -merch-card button a[is='checkout-link'] { - pointer-events: auto; -} - merch-card [slot^='heading-'] { color: var(--consonant-merch-card-heading-color); font-weight: 700; @@ -2104,4 +2104,6 @@ body.merch-modal { height: 100vh; } -`;document.head.appendChild(Tt);var re="#000000",oe="#F8D904",ne=/(accent|primary|secondary)(-(outline|link))?/,ae="mas:product_code/",ce="daa-ll",V="daa-lh",ie=["XL","L","M","S"];function se(r,e,t){r.mnemonicIcon?.map((n,a)=>({icon:n,alt:r.mnemonicAlt[a]??"",link:r.mnemonicLink[a]??""}))?.forEach(({icon:n,alt:a,link:d})=>{if(d&&!/^https?:/.test(d))try{d=new URL(`https://${d}`).href.toString()}catch{d="#"}let p={slot:"icons",src:n,size:t?.size??"l"};a&&(p.alt=a),d&&(p.href=d);let f=u("merch-icon",p);e.append(f)})}function de(r,e){r.badge&&(e.setAttribute("badge-text",r.badge),e.setAttribute("badge-color",r.badgeColor||re),e.setAttribute("badge-background-color",r.badgeBackgroundColor||oe))}function he(r,e,t){t?.includes(r.size)&&e.setAttribute("size",r.size)}function me(r,e,t){r.cardTitle&&t&&e.append(u(t.tag,{slot:t.slot},r.cardTitle))}function le(r,e,t){r.subtitle&&t&&e.append(u(t.tag,{slot:t.slot},r.subtitle))}function pe(r,e,t){if(t?.tag&&r.backgroundImage){let o={loading:"lazy",src:r.backgroundImage};r.backgroundImageAltText?o.alt=r.backgroundImageAltText:o.role="none",e.append(u(t.tag,{slot:t.slot},u("img",o)))}t?.attribute&&e.setAttribute(t.attribute,r.backgroundImage)}function ge(r,e,t){if(r.prices&&t){let o=u(t.tag,{slot:t.slot},r.prices);e.append(o)}}function ue(r,e,t){if(r.description&&t){let o=u(t.tag,{slot:t.slot},r.description);e.append(o)}}function xe(r,e,t,o){let n=e.ctas.size??"M",a=`spectrum-Button--${o}`,d=t?" spectrum-Button--outline":"";r.classList.add("spectrum-Button-label");let p=ie.includes(n)?` spectrum-Button--size${n}`:" spectrum-Button--sizeM",f=`spectrum-Button ${a}${d}${p}`,x=u("button",{class:f,tabIndex:0},r);return x.addEventListener("click",O=>{O.target!==r&&(O.stopPropagation(),r.click())}),x}function fe(r,e,t,o){let n="fill";t&&(n="outline");let a=u("sp-button",{treatment:n,variant:o,tabIndex:0,size:e.ctas.size??"m"},r);return a.addEventListener("click",d=>{d.target!==r&&(d.stopPropagation(),r.click())}),a}function ve(r,e){return r.classList.add("con-button"),e&&r.classList.add("blue"),r}function be(r,e,t,o){if(r.ctas){let{slot:n}=t.ctas,a=u("div",{slot:n},r.ctas),d=[...a.querySelectorAll("a")].map(p=>{let f=p.parentElement.tagName==="STRONG";if(e.consonant)return ve(p,f);let x=ne.exec(p.className)?.[0]??"accent",O=x.includes("accent"),$t=x.includes("primary"),Ot=x.includes("secondary"),rt=x.includes("-outline");if(x.includes("-link"))return p;let T;return O||f?T="accent":$t?T="primary":Ot&&(T="secondary"),p.tabIndex=-1,e.spectrum==="swc"?fe(p,t,rt,T):xe(p,t,rt,T)});a.innerHTML="",a.append(...d),e.append(a)}}function ye(r,e){let{tags:t}=r,o=t?.find(n=>n.startsWith(ae))?.split("/").pop();o&&(e.setAttribute(V,o),e.querySelectorAll("a[data-analytics-id]").forEach((n,a)=>{n.setAttribute(ce,`${n.dataset.analyticsId}-${a+1}`)}))}function we(r){[["primary-link","primary"],["secondary-link","secondary"]].forEach(([e,t])=>{r.querySelectorAll(`a.${e}`).forEach(o=>{o.classList.remove(e),o.classList.add("spectrum-Link",`spectrum-Link--${t}`)})})}async function Rt(r,e){let{fields:t}=r,{variant:o}=t;if(!o)return;e.id=r.id,e.querySelectorAll("[slot]").forEach(a=>{a.remove()}),e.removeAttribute("background-image"),e.removeAttribute("badge-background-color"),e.removeAttribute("badge-color"),e.removeAttribute("badge-text"),e.removeAttribute("size"),e.classList.remove("wide-strip"),e.classList.remove("thin-strip"),e.removeAttribute(V),e.variant=o,await e.updateComplete;let{aemFragmentMapping:n}=e.variantLayout;n&&(se(t,e,n.mnemonics),de(t,e),he(t,e,n.allowedSizes),me(t,e,n.title),le(t,e,n.subtitle),ge(t,e,n.prices),pe(t,e,n.backgroundImage,o),ue(t,e,n.description),be(t,e,n,o),ye(t,e),we(e))}var Se="merch-card",ke=":start",Ae=":ready",_e=1e4,Mt="merch-card:",$,et,s=class extends Ee{constructor(){super();N(this,$);c(this,"customerSegment");c(this,"marketSegment");c(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}firstUpdated(){this.variantLayout=tt(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(t){(t.has("variant")||!this.variantLayout)&&(this.variantLayout=tt(this),this.variantLayout.connectedCallbackHook())}updated(t){(t.has("badgeBackgroundColor")||t.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(t)}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice","ccd-suggested"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:t}){if(!this.stockOfferOsis)return;let o=this.checkoutLinks;if(o.length!==0)for(let n of o){await n.onceSettled();let a=n.value?.[0]?.planType;if(!a)return;let d=this.stockOfferOsis[a];if(!d)return;let p=n.dataset.wcsOsi.split(",").filter(f=>f!==d);t.checked&&p.push(d),n.dataset.wcsOsi=p.join(",")}}handleQuantitySelection(t){let o=this.checkoutLinks;for(let n of o)n.dataset.quantity=t.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(t){let o={...this.filters};Object.keys(o).forEach(n=>{if(t){o[n].order=Math.min(o[n].order||2,2);return}let a=o[n].order;a===1||isNaN(a)||(o[n].order=Number(a)+1)}),this.filters=o}includes(t){return this.textContent.match(new RegExp(t,"i"))!==null}connectedCallback(){super.connectedCallback();let t=this.querySelector("aem-fragment")?.getAttribute("fragment");performance.mark(`${Mt}${t}${ke}`),this.addEventListener(W,this.handleQuantitySelection),this.addEventListener(mt,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(I,this.handleAemFragmentEvents),this.addEventListener(H,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(W,this.handleQuantitySelection),this.storageOptions?.removeEventListener(Y,this.handleStorageChange),this.removeEventListener(I,this.handleAemFragmentEvents),this.removeEventListener(H,this.handleAemFragmentEvents)}async handleAemFragmentEvents(t){if(t.type===I&&K(this,$,et).call(this,"AEM fragment cannot be loaded"),t.type===H&&t.target.nodeName==="AEM-FRAGMENT"){let o=t.detail;await Rt(o,this),this.checkReady()}}async checkReady(){let t=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(a=>a.onceSettled().catch(()=>a))).then(a=>a.every(d=>d.classList.contains("placeholder-resolved"))),o=new Promise(a=>setTimeout(()=>a(!1),_e));if(await Promise.race([t,o])===!0){performance.mark(`${Mt}${this.id}${Ae}`),this.dispatchEvent(new CustomEvent(gt,{bubbles:!0,composed:!0}));return}K(this,$,et).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let t=this.storageOptions?.selected;if(t){let o=this.querySelector(`merch-offer-select[storage="${t}"]`);if(o)return o}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||this.dispatchEvent(new CustomEvent(lt,{bubbles:!0}))}handleStorageChange(){let t=this.closest("merch-card")?.offerSelect.cloneNode(!0);t&&this.dispatchEvent(new CustomEvent(Y,{detail:{offerSelect:t},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(t){if(t===this.merchOffer)return;this.merchOffer=t;let o=this.dynamicPrice;if(t.price&&o){let n=t.price.cloneNode(!0);o.onceSettled?o.onceSettled().then(()=>{o.replaceWith(n)}):o.replaceWith(n)}}};$=new WeakSet,et=function(t){this.dispatchEvent(new CustomEvent(ut,{detail:t,bubbles:!0,composed:!0}))},c(s,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:t=>{let[o,n,a]=t.split(",");return{PUF:o,ABM:n,M2M:a}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:t=>Object.fromEntries(t.split(",").map(o=>{let[n,a,d]=o.split(":"),p=Number(a);return[n,{order:isNaN(p)?void 0:p,size:d}]})),toAttribute:t=>Object.entries(t).map(([o,{order:n,size:a}])=>[o,n,a].filter(d=>d!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:V,reflect:!0}}),c(s,"styles",[st,zt(),...dt()]);customElements.define(Se,s); +`;document.head.appendChild(Dr);var be;(function(e){e.V2="UCv2",e.V3="UCv3"})(be||(be={}));var ve;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(ve||(ve={}));var Et;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Et||(Et={}));var R;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(R||(R={}));var _;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(_||(_={}));var wt;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(wt||(wt={}));var St;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(St||(St={}));var At;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(At||(At={}));var Tt;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Tt||(Tt={}));var Ur="tacocat.js";var Gr=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function me(e,t={},{metadata:r=!0,search:n=!0,storage:o=!0}={}){let i;if(n&&i==null){let a=new URLSearchParams(window.location.search),s=ye(n)?n:e;i=a.get(s)}if(o&&i==null){let a=ye(o)?o:e;i=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&i==null){let a=Oo(ye(r)?r:e);i=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return i??t[e]}var de=()=>{};var zr=e=>typeof e=="boolean",Ee=e=>typeof e=="function",_t=e=>typeof e=="number",Fr=e=>e!=null&&typeof e=="object";var ye=e=>typeof e=="string";var we=e=>_t(e)&&Number.isFinite(e)&&e>0;function H(e,t){if(zr(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Oo(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}var Ho=Date.now(),Lt=()=>`(+${Date.now()-Ho}ms)`,Ve=new Set,Mo=H(me("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function $r(e){let t=`[${Ur}/${e}]`,r=(a,s,...c)=>a?!0:(o(s,...c),!1),n=Mo?(a,...s)=>{console.debug(`${t} ${a}`,...s,Lt())}:()=>{},o=(a,...s)=>{let c=`${t} ${a}`;Ve.forEach(([l])=>l(c,...s))};return{assert:r,debug:n,error:o,warn:(a,...s)=>{let c=`${t} ${a}`;Ve.forEach(([,l])=>l(c,...s))}}}function Io(e,t){let r=[e,t];return Ve.add(r),()=>{Ve.delete(r)}}Io((e,...t)=>{console.error(e,...t,Lt())},(e,...t)=>{console.warn(e,...t,Lt())});var Vr="ABM",jr="PUF",Yr="M2M",Wr="PERPETUAL",qr="P3Y",ko="TAX_INCLUSIVE_DETAILS",Bo="TAX_EXCLUSIVE",Xr={ABM:Vr,PUF:jr,M2M:Yr,PERPETUAL:Wr,P3Y:qr},th={[Vr]:{commitment:R.YEAR,term:_.MONTHLY},[jr]:{commitment:R.YEAR,term:_.ANNUAL},[Yr]:{commitment:R.MONTH,term:_.MONTHLY},[Wr]:{commitment:R.PERPETUAL,term:void 0},[qr]:{commitment:R.THREE_MONTHS,term:_.P3Y}};function Ct(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:o,priceWithoutDiscountAndTax:i,taxDisplay:a}=t;if(a!==ko)return e;let s={...e,priceDetails:{...t,price:o??r,priceWithoutDiscount:i??n,taxDisplay:Bo}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var Pt=function(e,t){return Pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Pt(e,t)};function Se(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Pt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var b=function(){return b=Object.assign||function(t){for(var r,n=1,o=arguments.length;n0}),r=[],n=0,o=t;n1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(Go,function(c,l,h,f,p,g){if(l)t.minimumIntegerDigits=h.length;else{if(f&&p)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if(an.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(en.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(en,function(c,l,h,f,p,g){return h==="*"?t.minimumFractionDigits=l.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:p&&g?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+g.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var i=o.options[0];i==="w"?t=b(b({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=b(b({},t),tn(i)));continue}if(on.test(o.stem)){t=b(b({},t),tn(o.stem));continue}var a=sn(o.stem);a&&(t=b(b({},t),a));var s=zo(o.stem);s&&(t=b(b({},t),s))}return t}var Te={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function ln(e,t){for(var r="",n=0;n>1),c="a",l=Fo(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;a-- >0;)r=l+r}else o==="J"?r+="H":r+=o}return r}function Fo(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var o=Te[n||""]||Te[r||""]||Te["".concat(r,"-001")]||Te["001"];return o[0]}var Ot,$o=new RegExp("^".concat(Nt.source,"*")),Vo=new RegExp("".concat(Nt.source,"*$"));function v(e,t){return{start:e,end:t}}var jo=!!String.prototype.startsWith,Yo=!!String.fromCodePoint,Wo=!!Object.fromEntries,qo=!!String.prototype.codePointAt,Xo=!!String.prototype.trimStart,Ko=!!String.prototype.trimEnd,Zo=!!Number.isSafeInteger,Qo=Zo?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Mt=!0;try{hn=pn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Mt=((Ot=hn.exec("a"))===null||Ot===void 0?void 0:Ot[0])==="a"}catch{Mt=!1}var hn,mn=jo?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},It=Yo?String.fromCodePoint:function(){for(var t=[],r=0;ri;){if(a=t[i++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},dn=Wo?Object.fromEntries:function(t){for(var r={},n=0,o=t;n=n)){var o=t.charCodeAt(r),i;return o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},Jo=Xo?function(t){return t.trimStart()}:function(t){return t.replace($o,"")},ei=Ko?function(t){return t.trimEnd()}:function(t){return t.replace(Vo,"")};function pn(e,t){return new RegExp(e,t)}var kt;Mt?(Ht=pn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),kt=function(t,r){var n;Ht.lastIndex=r;var o=Ht.exec(t);return(n=o[1])!==null&&n!==void 0?n:""}):kt=function(t,r){for(var n=[];;){var o=un(t,r);if(o===void 0||gn(o)||ni(o))break;n.push(o),r+=o>=65536?2:1}return It.apply(void 0,n)};var Ht,fn=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(t,n);if(a.err)return a;o.push(a.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),o.push({type:E.pound,location:v(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(x.UNMATCHED_CLOSING_TAG,v(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Bt(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;o.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;o.push(a.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:E.literal,value:"<".concat(o,"/>"),location:v(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var a=i.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:E.tag,value:o,children:a,location:v(n,this.clonePosition())},err:null}:this.error(x.INVALID_TAG,v(s,this.clonePosition())))}else return this.error(x.UNCLOSED_TAG,v(n,this.clonePosition()))}else return this.error(x.INVALID_TAG,v(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ri(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),o="";;){var i=this.tryParseQuote(r);if(i){o+=i;continue}var a=this.tryParseUnquoted(t,r);if(a){o+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){o+=s;continue}break}var c=v(n,this.clonePosition());return{val:{type:E.literal,value:o,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!ti(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return It.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),It(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(x.EMPTY_ARGUMENT,v(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(x.MALFORMED_ARGUMENT,v(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:E.argument,value:o,location:v(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(n,this.clonePosition())):this.parseArgumentOptions(t,r,o,n);default:return this.error(x.MALFORMED_ARGUMENT,v(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=kt(this.message,r),o=r+n.length;this.bumpTo(o);var i=this.clonePosition(),a=v(t,i);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,o){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(x.EXPECT_ARGUMENT_TYPE,v(a,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var p=ei(f.val);if(p.length===0)return this.error(x.EXPECT_ARGUMENT_STYLE,v(this.clonePosition(),this.clonePosition()));var g=v(h,this.clonePosition());l={style:p,styleLocation:g}}var y=this.tryParseArgumentClose(o);if(y.err)return y;var S=v(o,this.clonePosition());if(l&&mn(l?.style,"::",0)){var M=Jo(l.style.slice(2));if(s==="number"){var f=this.parseNumberSkeletonFromString(M,l.styleLocation);return f.err?f:{val:{type:E.number,value:n,location:S,style:f.val},err:null}}else{if(M.length===0)return this.error(x.EXPECT_DATE_TIME_SKELETON,S);var G=M;this.locale&&(G=ln(M,this.locale));var p={type:q.dateTime,pattern:G,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Qr(G):{}},z=s==="date"?E.date:E.time;return{val:{type:z,value:n,location:S,style:p},err:null}}}return{val:{type:s==="number"?E.number:s==="date"?E.date:E.time,value:n,location:S,style:(i=l?.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var O=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(x.EXPECT_SELECT_ARGUMENT_OPTIONS,v(O,b({},O)));this.bumpSpace();var j=this.parseIdentifierIfPossible(),D=0;if(s!=="select"&&j.value==="offset"){if(!this.bumpIf(":"))return this.error(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),j=this.parseIdentifierIfPossible(),D=f.val}var k=this.tryParsePluralOrSelectOptions(t,s,r,j);if(k.err)return k;var y=this.tryParseArgumentClose(o);if(y.err)return y;var Me=v(o,this.clonePosition());return s==="select"?{val:{type:E.select,value:n,options:dn(k.val),location:Me},err:null}:{val:{type:E.plural,value:n,options:dn(k.val),offset:D,pluralType:s==="plural"?"cardinal":"ordinal",location:Me},err:null}}default:return this.error(x.INVALID_ARGUMENT_TYPE,v(a,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,v(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(x.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,v(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=nn(t)}catch{return this.error(x.INVALID_NUMBER_SKELETON,r)}return{val:{type:q.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?cn(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,o){for(var i,a=!1,s=[],c=new Set,l=o.value,h=o.location;;){if(l.length===0){var f=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_SELECTOR,x.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;h=v(f,this.clonePosition()),l=this.message.slice(f.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?x.DUPLICATE_SELECT_ARGUMENT_SELECTOR:x.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);l==="other"&&(a=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:x.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,v(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,r,n);if(y.err)return y;var S=this.tryParseArgumentClose(g);if(S.err)return S;s.push([l,{value:y.val,location:v(g,this.clonePosition())}]),c.add(l),this.bumpSpace(),i=this.parseIdentifierIfPossible(),l=i.value,h=i.location}return s.length===0?this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR:x.EXPECT_PLURAL_ARGUMENT_SELECTOR,v(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(x.MISSING_OTHER_CLAUSE,v(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)i=!0,a=a*10+(s-48),this.bump();else break}var c=v(o,this.clonePosition());return i?(a*=n,Qo(a)?{val:a,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=un(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(mn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&gn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Bt(e){return e>=97&&e<=122||e>=65&&e<=90}function ti(e){return Bt(e)||e===47}function ri(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function gn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ni(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Dt(e){e.forEach(function(t){if(delete t.location,Xe(t)||Ke(t))for(var r in t.options)delete t.options[r].location,Dt(t.options[r].value);else Ye(t)&&Qe(t.style)||(We(t)||qe(t))&&Ae(t.style)?delete t.style.location:Ze(t)&&Dt(t.children)})}function xn(e,t){t===void 0&&(t={}),t=b({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new fn(e,t).parse();if(r.err){var n=SyntaxError(x[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Dt(r.val),r.val}function _e(e,t){var r=t&&t.cache?t.cache:li,n=t&&t.serializer?t.serializer:ci,o=t&&t.strategy?t.strategy:ii;return o(e,{cache:r,serializer:n})}function oi(e){return e==null||typeof e=="number"||typeof e=="boolean"}function bn(e,t,r,n){var o=oi(n)?n:r(n),i=t.get(o);return typeof i>"u"&&(i=e.call(this,n),t.set(o,i)),i}function vn(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,n),t.set(o,i)),i}function Ut(e,t,r,n,o){return r.bind(t,e,n,o)}function ii(e,t){var r=e.length===1?bn:vn;return Ut(e,this,r,t.cache.create(),t.serializer)}function ai(e,t){return Ut(e,this,vn,t.cache.create(),t.serializer)}function si(e,t){return Ut(e,this,bn,t.cache.create(),t.serializer)}var ci=function(){return JSON.stringify(arguments)};function Gt(){this.cache=Object.create(null)}Gt.prototype.get=function(e){return this.cache[e]};Gt.prototype.set=function(e,t){this.cache[e]=t};var li={create:function(){return new Gt}},Je={variadic:ai,monadic:si};var X;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(X||(X={}));var Le=function(e){Se(t,e);function t(r,n,o){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var zt=function(e){Se(t,e);function t(r,n,o,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(o).join('", "'),'"'),X.INVALID_VALUE,i)||this}return t}(Le);var yn=function(e){Se(t,e);function t(r,n,o){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),X.INVALID_VALUE,o)||this}return t}(Le);var En=function(e){Se(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),X.MISSING_VALUE,n)||this}return t}(Le);var P;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(P||(P={}));function hi(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==P.literal||r.type!==P.literal?t.push(r):n.value+=r.value,t},[])}function mi(e){return typeof e=="function"}function Ce(e,t,r,n,o,i,a){if(e.length===1&&Rt(e[0]))return[{type:P.literal,value:e[0].value}];for(var s=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=xn,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Sn=wn;var fi=/[0-9\-+#]/,gi=/[^\d\-+#]/g;function An(e){return e.search(fi)}function xi(e="#.##"){let t={},r=e.length,n=An(e);t.prefix=n>0?e.substring(0,n):"";let o=An(e.split("").reverse().join("")),i=r-o,a=e.substring(i,i+1),s=i+(a==="."||a===","?1:0);t.suffix=o>0?e.substring(s,r):"",t.mask=e.substring(n,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(gi);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function bi(e,t,r){let n=!1,o={value:e};e<0&&(n=!0,o.value=-o.value),o.sign=n?"-":"",o.value=Number(o.value).toFixed(t.fraction&&t.fraction.length),o.value=Number(o.value).toString();let i=t.fraction&&t.fraction.lastIndexOf("0"),[a="0",s=""]=o.value.split(".");return(!s||s&&s.length<=i)&&(s=i<0?"":(+("0."+s)).toFixed(i+1).replace("0.","")),o.integer=a,o.fraction=s,vi(o,t),(o.result==="0"||o.result==="")&&(n=!1,o.sign=""),!n&&t.maskHasPositiveSign?o.sign="+":n&&t.maskHasPositiveSign?o.sign="-":n&&(o.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),o}function vi(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),o=n&&n.indexOf("0");if(o>-1)for(;e.integer.length({accept:e,round:t}),Si=[$t(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),$t(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),$t(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Vt={[R.YEAR]:{[_.MONTHLY]:Pe.MONTH,[_.ANNUAL]:Pe.YEAR},[R.MONTH]:{[_.MONTHLY]:Pe.MONTH}},Ai=(e,t)=>e.indexOf(`'${t}'`)===0,Ti=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Nn(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Li(e)),r},_i=e=>{let t=Ci(e),r=Ai(e,t),n=e.replace(/'.*?'/,""),o=Cn.test(n)||Pn.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:o}},Rn=e=>e.replace(Cn,Ln).replace(Pn,Ln),Li=e=>e.match(/#(.?)#/)?.[1]===_n?Ei:_n,Ci=e=>e.match(/'(.*?)'/)?.[1]??"",Nn=e=>e.match(/0(.?)0/)?.[1]??"";function et({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},o,i=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=_i(e),l=r?Nn(e):"",h=Ti(e,r),f=r?2:0,p=i(t,{currencySymbol:a}),g=n?p.toLocaleString("hi-IN",{minimumFractionDigits:f,maximumFractionDigits:f}):Tn(h,p),y=r?g.lastIndexOf(l):g.length,S=g.substring(0,y),M=g.substring(y+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,g).replace(/SYMBOL/,a),currencySymbol:a,decimals:M,decimalsDelimiter:l,hasCurrencySpace:c,integer:S,isCurrencyFirst:s,recurrenceTerm:o}}var On=e=>{let{commitment:t,term:r,usePrecision:n}=e,o=wi[r]??1;return et(e,o>1?Pe.MONTH:Vt[t]?.[r],i=>{let a={divisor:o,price:i,usePrecision:n},{round:s}=Si.find(({accept:c})=>c(a));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return s(a)})},Hn=({commitment:e,term:t,...r})=>et(r,Vt[e]?.[t]),Mn=e=>{let{commitment:t,term:r}=e;return t===R.YEAR&&r===_.MONTHLY?et(e,Pe.YEAR,n=>n*12):et(e,Vt[t]?.[r])};var Pi={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},Ri=$r("ConsonantTemplates/price"),Ni=/<\/?[^>]+(>|$)/g,L={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},K={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Oi="TAX_EXCLUSIVE",Hi=e=>Fr(e)?Object.entries(e).filter(([,t])=>ye(t)||_t(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Gr(n)+'"'}`,""):"",N=(e,t,r,n=!1)=>`${n?Rn(t):t??""}`;function Mi(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:o,hasCurrencySpace:i,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},f={}){let p=N(L.currencySymbol,r),g=N(L.currencySpace,i?" ":""),y="";return s&&(y+=p+g),y+=N(L.integer,a),y+=N(L.decimalsDelimiter,o),y+=N(L.decimals,n),s||(y+=g+p),y+=N(L.recurrence,c,null,!0),y+=N(L.unitType,l,null,!0),y+=N(L.taxInclusivity,h,!0),N(e,y,{...f,"aria-label":t})}var I=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1}={})=>({country:n,displayFormatted:o=!0,displayRecurrence:i=!0,displayPerUnit:a=!1,displayTax:s=!1,language:c,literals:l={}}={},{commitment:h,offerSelectorIds:f,formatString:p,price:g,priceWithoutDiscount:y,taxDisplay:S,taxTerm:M,term:G,usePrecision:z}={},O={})=>{Object.entries({country:n,formatString:p,language:c,price:g}).forEach(([U,st])=>{if(st==null)throw new Error(`Argument "${U}" is missing for osi ${f?.toString()}, country ${n}, language ${c}`)});let j={...Pi,...l},D=`${c.toLowerCase()}-${n.toUpperCase()}`;function k(U,st){let ct=j[U];if(ct==null)return"";try{return new Sn(ct.replace(Ni,""),D).format(st)}catch{return Ri.error("Failed to format literal:",ct),""}}let Me=t&&y?y:g,tr=e?On:Hn;r&&(tr=Mn);let{accessiblePrice:oo,recurrenceTerm:ot,...rr}=tr({commitment:h,formatString:p,term:G,price:e?g:Me,usePrecision:z,isIndianPrice:n==="IN"}),J=oo,it="";if(H(i)&&ot){let U=k(K.recurrenceAriaLabel,{recurrenceTerm:ot});U&&(J+=" "+U),it=k(K.recurrenceLabel,{recurrenceTerm:ot})}let at="";if(H(a)){at=k(K.perUnitLabel,{perUnit:"LICENSE"});let U=k(K.perUnitAriaLabel,{perUnit:"LICENSE"});U&&(J+=" "+U)}let pe="";H(s)&&M&&(pe=k(S===Oi?K.taxExclusiveLabel:K.taxInclusiveLabel,{taxTerm:M}),pe&&(J+=" "+pe)),t&&(J=k(K.strikethroughAriaLabel,{strikethroughPrice:J}));let fe=L.container;if(e&&(fe+=" "+L.containerOptical),t&&(fe+=" "+L.containerStrikethrough),r&&(fe+=" "+L.containerAnnual),H(o))return Mi(fe,{...rr,accessibleLabel:J,recurrenceLabel:it,perUnitLabel:at,taxInclusivityLabel:pe},O);let{currencySymbol:nr,decimals:io,decimalsDelimiter:ao,hasCurrencySpace:or,integer:so,isCurrencyFirst:co}=rr,ee=[so,ao,io];co?(ee.unshift(or?"\xA0":""),ee.unshift(nr)):(ee.push(or?"\xA0":""),ee.push(nr)),ee.push(it,at,pe);let lo=ee.join("");return N(fe,lo,O)},In=()=>(e,t,r)=>{let o=(e.displayOldPrice===void 0||H(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${I()(e,t,r)}${o?" "+I({displayStrikethrough:!0})(e,t,r):""}`},kn=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${(e.displayOldPrice===void 0||H(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price?I({displayStrikethrough:!0})(n,t,r)+" ":""}${I()(e,t,r)}${N(L.containerAnnualPrefix," (")}${I({displayAnnual:!0})(n,t,r)}${N(L.containerAnnualSuffix,")")}`},Bn=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${I()(e,t,r)}${N(L.containerAnnualPrefix," (")}${I({displayAnnual:!0})(n,t,r)}${N(L.containerAnnualSuffix,")")}`};var Ii=I(),ki=In(),Bi=I({displayOptical:!0}),Di=I({displayStrikethrough:!0}),Ui=I({displayAnnual:!0}),Gi=Bn(),zi=kn();var Fi=(e,t)=>{if(!(!we(e)||!we(t)))return Math.floor((t-e)/t*100)},Dn=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,o=Fi(r,n);return o===void 0?'':`${o}%`};var $i=Dn();var{freeze:Re}=Object,jt=Re({...be}),Yt=Re({...ve}),Wt={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},dd=Re({...R}),ud=Re({...Xr}),pd=Re({..._});var Gn="mas-commerce-service";function zn(e,{once:t=!1}={}){let r=null;function n(){let o=document.querySelector(Gn);o!==r&&(r=o,o&&e(o))}return document.addEventListener(dt,n,{once:t}),Ne(n),()=>document.removeEventListener(dt,n)}function Fn(e,{country:t,forceTaxExclusive:r,perpetual:n}){let o;if(e.length<2)o=e;else{let i=t==="GB"||n?"EN":"MULT",[a,s]=e;o=[a.language===i?a:s]}return r&&(o=o.map(Ct)),o}var Ne=e=>window.setTimeout(e);function Z(){return document.getElementsByTagName(Gn)?.[0]}var Q={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},$n=1e3,Vn=new Set;function Yi(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function jn(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:o,status:i}=e;return[n,i,o].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Q.serializableTypes.includes(r))return r}return e}function Wi(e,t){if(!Q.ignoredProperties.includes(e))return jn(t)}var qt={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],o=[],i=t;r.forEach(l=>{l!=null&&(Yi(l)?n:o).push(l)}),n.length&&(i+=" "+n.map(jn).join(" "));let{pathname:a,search:s}=window.location,c=`${Q.delimiter}page=${a}${s}`;c.length>$n&&(c=`${c.slice(0,$n)}`),i+=c,o.length&&(i+=`${Q.delimiter}facts=`,i+=JSON.stringify(o,Wi)),Vn.has(i)||(Vn.add(i),window.lana?.log(i,Q))}};function Yn(e){Object.assign(Q,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Q&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var qi=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:jt.V3,checkoutWorkflowStep:Yt.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:Wt.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:ft.PUBLISHED,wcsBufferLimit:1});var Xt=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});var Kt={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Xi=Date.now(),Zt=new Set,Qt=new Set,Wn=new Map,qn={append({level:e,message:t,params:r,timestamp:n,source:o}){console[e](`${n}ms [${o}] %c${t}`,"font-weight: bold;",...r)}},Xn={filter:({level:e})=>e!==Kt.DEBUG},Ki={filter:()=>!1};function Zi(e,t,r,n,o){return{level:e,message:t,namespace:r,get params(){return n.length===1&&Ee(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:o,timestamp:Date.now()-Xi}}function Qi(e){[...Qt].every(t=>t(e))&&Zt.forEach(t=>t(e))}function Kn(e){let t=(Wn.get(e)??0)+1;Wn.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:o=>Kn(`${n.namespace}/${o}`),updateConfig:Yn};return Object.values(Kt).forEach(o=>{n[o]=(i,...a)=>Qi(Zi(o,i,e,a,r))}),Object.seal(n)}function tt(...e){e.forEach(t=>{let{append:r,filter:n}=t;Ee(n)&&Qt.add(n),Ee(r)&&Zt.add(r)})}function Ji(e={}){let{name:t}=e,r=H(me("commerce.debug",{search:!0,storage:!0}),t===Xt.LOCAL);return tt(r?qn:Xn),t===Xt.PROD&&tt(qt),Jt}function ea(){Zt.clear(),Qt.clear()}var Jt={...Kn(Sr),Level:Kt,Plugins:{consoleAppender:qn,debugFilter:Xn,quietFilter:Ki,lanaAppender:qt},init:Ji,reset:ea,use:tt};var ta={[$]:br,[Y]:vr,[V]:yr},ra={[$]:Er,[V]:wr},rt=class{constructor(t){u(this,"changes",new Map);u(this,"connected",!1);u(this,"dispose",de);u(this,"error");u(this,"log");u(this,"options");u(this,"promises",[]);u(this,"state",Y);u(this,"timer",null);u(this,"value");u(this,"version",0);u(this,"wrapperElement");this.wrapperElement=t}update(){[$,Y,V].forEach(t=>{this.wrapperElement.classList.toggle(ta[t],t===this.state)})}notify(){(this.state===V||this.state===$)&&(this.state===V?this.promises.forEach(({resolve:t})=>t(this.wrapperElement)):this.state===$&&this.promises.forEach(({reject:t})=>t(this.error)),this.promises=[]),this.wrapperElement.dispatchEvent(new CustomEvent(ra[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=zn(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=de}onceSettled(){let{error:t,promises:r,state:n}=this;return V===n?Promise.resolve(this.wrapperElement):$===n?Promise.reject(t):new Promise((o,i)=>{r.push({resolve:o,reject:i})})}toggleResolved(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.state=V,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),Ne(()=>this.notify()),!0)}toggleFailed(t,r,n){return t!==this.version?!1:(n!==void 0&&(this.options=n),this.error=r,this.state=$,this.update(),this.log?.error("Failed:",{element:this.wrapperElement,error:r}),Ne(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=Y,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!Z()||this.timer)return;let r=Jt.module("mas-element"),{error:n,options:o,state:i,value:a,version:s}=this;this.state=Y,this.timer=Ne(async()=>{this.timer=null;let c=null;if(this.changes.size&&(c=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:c}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:c})),c||t)try{await this.wrapperElement.render?.()===!1&&this.state===Y&&this.version===s&&(this.state=i,this.error=n,this.value=a,this.update(),this.notify())}catch(l){r.error("Failed to render mas-element: ",l),this.toggleFailed(this.version,l,o)}})}};function Zn(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function Qn(e,t={}){let{tag:r,is:n}=e,o=document.createElement(r,{is:n});return o.setAttribute("is",n),Object.assign(o.dataset,Zn(t)),o}function Jn(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,Zn(t)),e):null}var na="download",oa="upgrade";function eo(e,t={},r=""){let n=Z();if(!n)return null;let{checkoutMarketSegment:o,checkoutWorkflow:i,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:f,quantity:p,wcsOsi:g,extraOptions:y}=n.collectCheckoutOptions(t),S=Qn(e,{checkoutMarketSegment:o,checkoutWorkflow:i,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:f,quantity:p,wcsOsi:g,extraOptions:y});return r&&(S.innerHTML=`${r}`),S}function to(e){return class extends e{constructor(){super(...arguments);u(this,"checkoutActionHandler");u(this,"masElement",new rt(this))}attributeChangedCallback(n,o,i){this.masElement.attributeChangedCallback(n,o,i)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}requestUpdate(n=!1){return this.masElement.requestUpdate(n)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}async render(n={}){if(!this.isConnected)return!1;let o=Z();if(!o)return!1;this.dataset.imsCountry||o.imsCountryPromise.then(f=>{f&&(this.dataset.imsCountry=f)},de),n.imsCountry=null;let i=o.collectCheckoutOptions(n,this);if(!i.wcsOsi.length)return!1;let a;try{a=JSON.parse(i.extraOptions??"{}")}catch(f){this.masElement.log?.error("cannot parse exta checkout options",f)}let s=this.masElement.togglePending(i);this.setCheckoutUrl("");let c=o.resolveOfferSelectors(i),l=await Promise.all(c);l=l.map(f=>Fn(f,i)),i.country=this.dataset.imsCountry||i.country;let h=await o.buildCheckoutAction?.(l.flat(),{...a,...i},this);return this.renderOffers(l.flat(),i,{},h,s)}renderOffers(n,o,i={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=Z();if(!c)return!1;if(o={...JSON.parse(this.dataset.extraOptions??"null"),...o,...i},s??(s=this.masElement.togglePending(o)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(na,oa),this.masElement.toggleResolved(s,n,o);let{url:h,text:f,className:p,handler:g}=a;return h&&this.setCheckoutUrl(h),f&&(this.firstElementChild.innerHTML=f),p&&this.classList.add(...p.split(" ")),g&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=g.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,o)){let h=c.buildCheckoutURL(n,o);return this.setCheckoutUrl(h),!0}}else{let h=new Error(`Not provided: ${o?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,h,o))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let o=Z();if(!o)return!1;let{checkoutMarketSegment:i,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:f,promotionCode:p,quantity:g,wcsOsi:y}=o.collectCheckoutOptions(n);return Jn(this,{checkoutMarketSegment:i,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:f,promotionCode:p,quantity:g,wcsOsi:y}),!0}}}var Oe=class Oe extends to(HTMLButtonElement){static createCheckoutButton(t={},r=""){return eo(Oe,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};u(Oe,"is","checkout-button"),u(Oe,"tag","button");var ue=Oe;window.customElements.get(ue.is)||window.customElements.define(ue.is,ue,{extends:ue.tag});var ia="#000000",aa="#F8D904",sa=/(accent|primary|secondary)(-(outline|link))?/,ca="mas:product_code/",la="daa-ll",nt="daa-lh",ha=["XL","L","M","S"];function ma(e,t,r){e.mnemonicIcon?.map((o,i)=>({icon:o,alt:e.mnemonicAlt[i]??"",link:e.mnemonicLink[i]??""}))?.forEach(({icon:o,alt:i,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:o,size:r?.size??"l"};i&&(s.alt=i),a&&(s.href=a);let c=B("merch-icon",s);t.append(c)})}function da(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||ia),t.setAttribute("badge-background-color",e.badgeBackgroundColor||aa))}function ua(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function pa(e,t,r){e.cardTitle&&r&&t.append(B(r.tag,{slot:r.slot},e.cardTitle))}function fa(e,t,r){e.subtitle&&r&&t.append(B(r.tag,{slot:r.slot},e.subtitle))}function ga(e,t,r){if(r?.tag&&e.backgroundImage){let n={loading:"lazy",src:e.backgroundImage};e.backgroundImageAltText?n.alt=e.backgroundImageAltText:n.role="none",t.append(B(r.tag,{slot:r.slot},B("img",n)))}r?.attribute&&t.setAttribute(r.attribute,e.backgroundImage)}function xa(e,t,r){if(e.prices&&r){let n=B(r.tag,{slot:r.slot},e.prices);t.append(n)}}function ba(e,t,r){if(e.description&&r){let n=B(r.tag,{slot:r.slot},e.description);t.append(n)}}function va(e,t,r,n){let i=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);i.setAttribute("tabindex",0);for(let h of e.attributes)["class","is"].includes(h.name)||i.setAttribute(h.name,h.value);i.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=ha.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),i.classList.add(...l),i}function ya(e,t,r,n){let o="fill";r&&(o="outline");let i=B("sp-button",{treatment:o,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return i.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),i}function Ea(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function wa(e,t,r,n){if(e.ctas){let{slot:o}=r.ctas,i=B("div",{slot:o},e.ctas),a=[...i.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return Ea(s,c);let l=sa.exec(s.className)?.[0]??"accent",h=l.includes("accent"),f=l.includes("primary"),p=l.includes("secondary"),g=l.includes("-outline");if(l.includes("-link"))return s;let S;return h||c?S="accent":f?S="primary":p&&(S="secondary"),t.spectrum==="swc"?ya(s,r,g,S):va(s,r,g,S)});i.innerHTML="",i.append(...a),t.append(i)}}function Sa(e,t){let{tags:r}=e,n=r?.find(o=>o.startsWith(ca))?.split("/").pop();n&&(t.setAttribute(nt,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((o,i)=>{o.setAttribute(la,`${o.dataset.analyticsId}-${i+1}`)}))}function Aa(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(n=>{n.classList.remove(t),n.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}async function ro(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.id=e.id,t.querySelectorAll("[slot]").forEach(i=>{i.remove()}),t.removeAttribute("background-image"),t.removeAttribute("badge-background-color"),t.removeAttribute("badge-color"),t.removeAttribute("badge-text"),t.removeAttribute("size"),t.classList.remove("wide-strip"),t.classList.remove("thin-strip"),t.removeAttribute(nt),t.variant=n,await t.updateComplete;let{aemFragmentMapping:o}=t.variantLayout;o&&(ma(r,t,o.mnemonics),da(r,t),ua(r,t,o.allowedSizes),pa(r,t,o.title),fa(r,t,o.subtitle),xa(r,t,o.prices),ga(r,t,o.backgroundImage,n),ba(r,t,o.description),wa(r,t,o,n),Sa(r,t),Aa(t))}var _a="merch-card",La=":start",Ca=":ready",Pa=1e4,no="merch-card:",He,er,d=class extends Ta{constructor(){super();Ie(this,He);u(this,"customerSegment");u(this,"marketSegment");u(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}firstUpdated(){this.variantLayout=yt(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=yt(this),this.variantLayout.connectedCallbackHook())}updated(r){(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border",this.computedBorderStyle),this.variantLayout?.postCardUpdateHook(r)}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}get prices(){return Array.from(this.querySelectorAll('span[is="inline-price"][data-wcs-osi]'))}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderStyle(){return["twp","ccd-slice","ccd-suggested"].includes(this.variant)?"":`1px solid ${this.borderColor?this.borderColor:this.badgeBackgroundColor}`}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get price(){return this.headingmMSlot?.querySelector('span[is="inline-price"]')}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll('a[is="checkout-link"]')??[]]}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let n=this.checkoutLinks;if(n.length!==0)for(let o of n){await o.onceSettled();let i=o.value?.[0]?.planType;if(!i)return;let a=this.stockOfferOsis[i];if(!a)return;let s=o.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),o.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let o of n)o.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(o=>{if(r){n[o].order=Math.min(n[o].order||2,2);return}let i=n[o].order;i===1||isNaN(i)||(n[o].order=Number(i)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback();let r=this.querySelector("aem-fragment")?.getAttribute("fragment");performance.mark(`${no}${r}${La}`),this.addEventListener(pt,this.handleQuantitySelection),this.addEventListener(ur,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(Ge,this.handleAemFragmentEvents),this.addEventListener(Ue,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(pt,this.handleQuantitySelection),this.storageOptions?.removeEventListener(ut,this.handleStorageChange),this.removeEventListener(Ge,this.handleAemFragmentEvents),this.removeEventListener(Ue,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===Ge&&mt(this,He,er).call(this,"AEM fragment cannot be loaded"),r.type===Ue&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await ro(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(i=>i.onceSettled().catch(()=>i))).then(i=>i.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(i=>setTimeout(()=>i(!1),Pa));if(await Promise.race([r,n])===!0){performance.mark(`${no}${this.id}${Ca}`),this.dispatchEvent(new CustomEvent(gr,{bubbles:!0,composed:!0}));return}mt(this,He,er).call(this,"Contains unresolved offers")}get aemFragment(){return this.querySelector("aem-fragment")}get storageOptions(){return this.querySelector("sp-radio-group#storage")}get storageSpecificOfferSelect(){let r=this.storageOptions?.selected;if(r){let n=this.querySelector(`merch-offer-select[storage="${r}"]`);if(n)return n}return this.querySelector("merch-offer-select")}get offerSelect(){return this.storageOptions?this.storageSpecificOfferSelect:this.querySelector("merch-offer-select")}get quantitySelect(){return this.querySelector("merch-quantity-select")}merchCardReady(){this.offerSelect&&!this.offerSelect.planType||this.dispatchEvent(new CustomEvent(pr,{bubbles:!0}))}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(ut,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let o=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(o)}):n.replaceWith(o)}}};He=new WeakSet,er=function(r){this.dispatchEvent(new CustomEvent(xr,{detail:r,bubbles:!0,composed:!0}))},u(d,"properties",{name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{let[n,o,i]=r.split(",");return{PUF:n,ABM:o,M2M:i}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[o,i,a]=n.split(":"),s=Number(i);return[o,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:o,size:i}])=>[n,o,i].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:nt,reflect:!0}}),u(d,"styles",[hr,Br(),...mr()]);customElements.define(_a,d); diff --git a/libs/deps/mas/merch-sidenav.js b/libs/deps/mas/merch-sidenav.js index 7fdb7f9ab1..13f40f2b2b 100644 --- a/libs/deps/mas/merch-sidenav.js +++ b/libs/deps/mas/merch-sidenav.js @@ -1,4 +1,4 @@ -var M=Object.defineProperty;var g=o=>{throw TypeError(o)};var V=(o,e,t)=>e in o?M(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var i=(o,e,t)=>V(o,typeof e!="symbol"?e+"":e,t),v=(o,e,t)=>e.has(o)||g("Cannot "+t);var S=(o,e,t)=>(v(o,e,"read from private field"),t?t.call(o):e.get(o)),b=(o,e,t)=>e.has(o)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),C=(o,e,t,s)=>(v(o,e,"write to private field"),s?s.call(o,t):e.set(o,t),t);import{html as I,css as K,LitElement as W}from"/libs/deps/lit-all.min.js";var c=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};import{css as P}from"/libs/deps/lit-all.min.js";var u=P` +var I=Object.defineProperty;var v=o=>{throw TypeError(o)};var V=(o,e,t)=>e in o?I(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var i=(o,e,t)=>V(o,typeof e!="symbol"?e+"":e,t),g=(o,e,t)=>e.has(o)||v("Cannot "+t);var S=(o,e,t)=>(g(o,e,"read from private field"),t?t.call(o):e.get(o)),b=(o,e,t)=>e.has(o)?v("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),C=(o,e,t,s)=>(g(o,e,"write to private field"),s?s.call(o,t):e.set(o,t),t);import{html as M,css as K,LitElement as W}from"/libs/deps/lit-all.min.js";var c=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};import{css as P}from"/libs/deps/lit-all.min.js";var u=P` h2 { font-size: 11px; font-style: normal; @@ -66,7 +66,7 @@ var M=Object.defineProperty;var g=o=>{throw TypeError(o)};var V=(o,e,t)=>e in o? display: flex; flex-direction: column; } - `);customElements.define("merch-sidenav-checkbox-group",d);var L="(max-width: 700px)";var N="(max-width: 1199px)";var D=/iP(ad|hone|od)/.test(window?.navigator?.platform)||window?.navigator?.platform==="MacIntel"&&window.navigator.maxTouchPoints>1,_=!1,x,k=o=>{o&&(D?(document.body.style.position="fixed",o.ontouchmove=e=>{e.targetTouches.length===1&&e.stopPropagation()},_||(document.addEventListener("touchmove",e=>e.preventDefault()),_=!0)):(x=document.body.style.overflow,document.body.style.overflow="hidden"))},O=o=>{o&&(D?(o.ontouchstart=null,o.ontouchmove=null,document.body.style.position="",document.removeEventListener("touchmove",e=>e.preventDefault()),_=!1):x!==void 0&&(document.body.style.overflow=x,x=void 0))};var p,h=class extends W{constructor(){super();b(this,p);i(this,"mobileDevice",new c(this,L));i(this,"mobileAndTablet",new c(this,N));this.modal=!1}get filters(){return this.querySelector("merch-sidenav-list")}get search(){return this.querySelector("merch-search")}render(){return this.mobileAndTablet.matches?this.asDialog:this.asAside}get asDialog(){if(this.modal)return I` + `);customElements.define("merch-sidenav-checkbox-group",d);var L="(max-width: 700px)";var N="(max-width: 1199px)";var D=/iP(ad|hone|od)/.test(window?.navigator?.platform)||window?.navigator?.platform==="MacIntel"&&window.navigator.maxTouchPoints>1,_=!1,x,k=o=>{o&&(D?(document.body.style.position="fixed",o.ontouchmove=e=>{e.targetTouches.length===1&&e.stopPropagation()},_||(document.addEventListener("touchmove",e=>e.preventDefault()),_=!0)):(x=document.body.style.overflow,document.body.style.overflow="hidden"))},O=o=>{o&&(D?(o.ontouchstart=null,o.ontouchmove=null,document.body.style.position="",document.removeEventListener("touchmove",e=>e.preventDefault()),_=!1):x!==void 0&&(document.body.style.overflow=x,x=void 0))};var p,h=class extends W{constructor(){super();b(this,p);i(this,"mobileDevice",new c(this,L));i(this,"mobileAndTablet",new c(this,N));this.modal=!1}get filters(){return this.querySelector("merch-sidenav-list")}get search(){return this.querySelector("merch-search")}render(){return this.mobileAndTablet.matches?this.asDialog:this.asAside}get asDialog(){if(this.modal)return M` {throw TypeError(o)};var V=(o,e,t)=>e in o?
- `}get asAside(){return I`

${this.sidenavTitle}

`}get dialog(){return this.shadowRoot.querySelector("sp-dialog-base")}closeModal(t){t.preventDefault(),this.dialog?.close(),document.body.classList.remove("merch-modal")}openModal(){this.updateComplete.then(async()=>{k(this.dialog),document.body.classList.add("merch-modal");let t={trigger:S(this,p),notImmediatelyClosable:!0,type:"auto"},s=await window.__merch__spectrum_Overlay.open(this.dialog,t);s.addEventListener("close",()=>{this.modal=!1,document.body.classList.remove("merch-modal"),O(this.dialog)}),this.shadowRoot.querySelector("sp-theme").append(s)})}updated(){this.modal&&this.openModal()}showModal({target:t}){C(this,p,t),this.modal=!0}};p=new WeakMap,i(h,"properties",{sidenavTitle:{type:String},closeText:{type:String,attribute:"close-text"},modal:{type:Boolean,attribute:"modal",reflect:!0}}),i(h,"styles",[K` diff --git a/libs/deps/mas/merch-subscription-panel.js b/libs/deps/mas/merch-subscription-panel.js index af89d0dfd9..195b9a7202 100644 --- a/libs/deps/mas/merch-subscription-panel.js +++ b/libs/deps/mas/merch-subscription-panel.js @@ -1,4 +1,4 @@ -var y=Object.defineProperty;var u=o=>{throw TypeError(o)};var T=(o,e,t)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var h=(o,e,t)=>T(o,typeof e!="symbol"?e+"":e,t),C=(o,e,t)=>e.has(o)||u("Cannot "+t);var _=(o,e,t)=>(C(o,e,"read from private field"),t?t.call(o):e.get(o)),S=(o,e,t)=>e.has(o)?u("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t);import{html as n,LitElement as g}from"../lit-all.min.js";var i=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};import{css as R}from"../lit-all.min.js";var x=R` +var y=Object.defineProperty;var u=o=>{throw TypeError(o)};var C=(o,e,t)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var h=(o,e,t)=>C(o,typeof e!="symbol"?e+"":e,t),T=(o,e,t)=>e.has(o)||u("Cannot "+t);var _=(o,e,t)=>(T(o,e,"read from private field"),t?t.call(o):e.get(o)),S=(o,e,t)=>e.has(o)?u("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t);import{html as n,LitElement as L}from"../lit-all.min.js";var i=class{constructor(e,t){this.key=Symbol("match-media-key"),this.matches=!1,this.host=e,this.host.addController(this),this.media=window.matchMedia(t),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),e.addController(this)}hostConnected(){var e;(e=this.media)==null||e.addEventListener("change",this.onChange)}hostDisconnected(){var e;(e=this.media)==null||e.removeEventListener("change",this.onChange)}onChange(e){this.matches!==e.matches&&(this.matches=e.matches,this.host.requestUpdate(this.key,!this.matches))}};import{css as R}from"../lit-all.min.js";var x=R` :host { --merch-focused-outline: var(--merch-color-focus-ring) auto 1px; background-color: #f5f5f5; @@ -112,7 +112,7 @@ var y=Object.defineProperty;var u=o=>{throw TypeError(o)};var T=(o,e,t)=>e in o? a[is='checkout-link'] { display: none; } -`;var l="merch-offer-select:ready";var d="merch-offer:selected",E="merch-stock:change";var p="merch-quantity-selector:change";var A="(max-width: 1199px)";var c,r=class extends g{constructor(){super();S(this,c,new i(this,A));this.ready=!1,this.continueText="Continue"}get listLayout(){return n` +`;var l="merch-offer-select:ready";var d="merch-offer:selected",E="merch-stock:change";var p="merch-quantity-selector:change";var A="(max-width: 1199px)";var c,r=class extends L{constructor(){super();S(this,c,new i(this,A));this.ready=!1,this.continueText="Continue"}get listLayout(){return n`