diff --git a/libs/deps/mas/mas.js b/libs/deps/mas/mas.js index 321077dc79..b94133df90 100644 --- a/libs/deps/mas/mas.js +++ b/libs/deps/mas/mas.js @@ -1971,7 +1971,7 @@ body.merch-modal { `;document.head.appendChild(qo);var Mt;(function(e){e.STAGE="STAGE",e.PRODUCTION="PRODUCTION",e.LOCAL="LOCAL"})(Mt||(Mt={}));var jn;(function(e){e.STAGE="STAGE",e.PRODUCTION="PROD",e.LOCAL="LOCAL"})(jn||(jn={}));var Ht;(function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"})(Ht||(Ht={}));var De;(function(e){e.V2="UCv2",e.V3="UCv3"})(De||(De={}));var Z;(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"})(Z||(Z={}));var Yn=function(e){var t;return(t=hc.get(e))!==null&&t!==void 0?t:e},hc=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 Zo=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.")},Jo=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 pt(e,t,r){var n,i;try{for(var o=Zo(Object.entries(e)),a=o.next();!a.done;a=o.next()){var s=Jo(a.value,2),c=s[0],l=s[1],h=Yn(c);l!=null&&r.has(h)&&t.set(h,l)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function Sr(e){switch(e){case Mt.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function Tr(e,t){var r,n;for(var i in e){var o=e[i];try{for(var a=(r=void 0,Zo(Object.entries(o))),s=a.next();!s.done;s=a.next()){var c=Jo(s.value,2),l=c[0],h=c[1];if(h!=null){var u=Yn(l);t.set("items["+i+"]["+u+"]",h)}}}catch(d){r={error:d}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}}var uc=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 Qo(e){fc(e);var t=e.env,r=e.items,n=e.workflowStep,i=uc(e,["env","items","workflowStep"]),o=new URL(Sr(t));return o.pathname=n+"/",Tr(r,o.searchParams),pt(i,o.searchParams,mc),o.toString()}var mc=new Set(["cli","co","lang","ctx","cUrl","mv","nglwfdata","otac","promoid","rUrl","sdid","spint","trackingid","code","campaignid","appctxid"]),pc=["env","workflowStep","clientId","country","items"];function fc(e){var t,r;try{for(var n=dc(pc),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.")},bc="p_draft_landscape",vc="/store/";function Wn(e){Ec(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,u=gc(e,["env","items","workflowStep","ms","marketSegment","ot","offerType","pa","productArrangementCode","landscape"]),d={marketSegment:o??i,offerType:s??a,productArrangementCode:l??c},m=new URL(Sr(t));return m.pathname=""+vc+n,n!==Z.SEGMENTATION&&n!==Z.CHANGE_PLAN_TEAM_PLANS&&Tr(r,m.searchParams),n===Z.SEGMENTATION&&pt(d,m.searchParams,Xn),pt(u,m.searchParams,Xn),h===Ht.DRAFT&&pt({af:bc},m.searchParams,Xn),m.toString()}var Xn=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"]),Ac=["env","workflowStep","clientId","country"];function Ec(e){var t,r;try{for(var n=xc(Ac),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!==Z.SEGMENTATION&&e.workflowStep!==Z.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}function qn(e,t){switch(e){case De.V2:return Qo(t);case De.V3:return Wn(t);default:return console.warn("Unsupported CheckoutType, will use UCv3 as default. Given type: "+e),Wn(t)}}var Zn;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Zn||(Zn={}));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 Jn;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(Jn||(Jn={}));var Qn;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(Qn||(Qn={}));var ei;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(ei||(ei={}));var ti;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(ti||(ti={}));var ea="tacocat.js";var yr=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),ta=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=ft(n)?n:e;o=a.get(s)}if(i&&o==null){let a=ft(i)?i:e;o=window.sessionStorage.getItem(a)??window.localStorage.getItem(a)}if(r&&o==null){let a=Sc(ft(r)?r:e);o=document.documentElement.querySelector(`meta[name="${a}"]`)?.content}return o??t[e]}var gt=()=>{};var ra=e=>typeof e=="boolean",$t=e=>typeof e=="function",Lr=e=>typeof e=="number",na=e=>e!=null&&typeof e=="object";var ft=e=>typeof e=="string",ri=e=>ft(e)&&e,xt=e=>Lr(e)&&Number.isFinite(e)&&e>0;function bt(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(ra(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Se(e,t,r){let n=Object.values(t);return n.find(i=>yr(i,e))??r??n[0]}function Sc(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function vt(e,t=1){return Lr(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Tc=Date.now(),ni=()=>`(+${Date.now()-Tc}ms)`,_r=new Set,yc=T(O("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function ia(e){let t=`[${ea}/${e}]`,r=(a,s,...c)=>a?!0:(i(s,...c),!1),n=yc?(a,...s)=>{console.debug(`${t} ${a}`,...s,ni())}:()=>{},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 Lc(e,t){let r=[e,t];return _r.add(r),()=>{_r.delete(r)}}Lc((e,...t)=>{console.error(e,...t,ni())},(e,...t)=>{console.warn(e,...t,ni())});var _c="no promo",oa="promo-tag",wc="yellow",Cc="neutral",Pc=(e,t,r)=>{let n=o=>o||_c,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},Ic="cancel-context",Ut=(e,t)=>{let r=e===Ic,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?oa:`${oa} no-promo`,text:Pc(a,t,i),variant:o?wc:Cc,isOverriden:i}};var ii="ABM",oi="PUF",ai="M2M",si="PERPETUAL",ci="P3Y",Nc="TAX_INCLUSIVE_DETAILS",kc="TAX_EXCLUSIVE",aa={ABM:ii,PUF:oi,M2M:ai,PERPETUAL:si,P3Y:ci},dm={[ii]:{commitment:U.YEAR,term:k.MONTHLY},[oi]:{commitment:U.YEAR,term:k.ANNUAL},[ai]:{commitment:U.MONTH,term:k.MONTHLY},[si]:{commitment:U.PERPETUAL,term:void 0},[ci]:{commitment:U.THREE_MONTHS,term:k.P3Y}},sa="Value is not an offer",wr=e=>{if(typeof e!="object")return sa;let{commitment:t,term:r}=e,n=Oc(t,r);return{...e,planType:n}};var Oc=(e,t)=>{switch(e){case void 0:return sa;case"":return"";case U.YEAR:return t===k.MONTHLY?ii:t===k.ANNUAL?oi:"";case U.MONTH:return t===k.MONTHLY?ai:"";case U.PERPETUAL:return si;case U.TERM_LICENSE:return t===k.P3Y?ci:"";default:return""}};function li(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:a}=t;if(a!==Nc)return e;let s={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:kc}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var hi=function(e,t){return hi=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])},hi(e,t)};function Dt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");hi(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(Mc,function(c,l,h,u,d,m){if(l)t.minimumIntegerDigits=h.length;else{if(u&&d)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(xa.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(da.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(da,function(c,l,h,u,d,m){return h==="*"?t.minimumFractionDigits=l.length:u&&u[0]==="#"?t.maximumFractionDigits=u.length:d&&m?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.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),ma(o)));continue}if(ga.test(i.stem)){t=A(A({},t),ma(i.stem));continue}var a=ba(i.stem);a&&(t=A(A({},t),a));var s=Hc(i.stem);s&&(t=A(A({},t),s))}return t}var Gt={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 Aa(e,t){for(var r="",n=0;n>1),c="a",l=$c(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 $c(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=Gt[n||""]||Gt[r||""]||Gt["".concat(r,"-001")]||Gt["001"];return i[0]}var mi,Uc=new RegExp("^".concat(di.source,"*")),Dc=new RegExp("".concat(di.source,"*$"));function E(e,t){return{start:e,end:t}}var Bc=!!String.prototype.startsWith,Gc=!!String.fromCodePoint,zc=!!Object.fromEntries,Fc=!!String.prototype.codePointAt,Kc=!!String.prototype.trimStart,jc=!!String.prototype.trimEnd,Yc=!!Number.isSafeInteger,Xc=Yc?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},fi=!0;try{Ea=La("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),fi=((mi=Ea.exec("a"))===null||mi===void 0?void 0:mi[0])==="a"}catch{fi=!1}var Ea,Sa=Bc?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},gi=Gc?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},Ta=zc?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}},Wc=Kc?function(t){return t.trimStart()}:function(t){return t.replace(Uc,"")},qc=jc?function(t){return t.trimEnd()}:function(t){return t.replace(Dc,"")};function La(e,t){return new RegExp(e,t)}var xi;fi?(pi=La("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),xi=function(t,r){var n;pi.lastIndex=r;var i=pi.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):xi=function(t,r){for(var n=[];;){var i=ya(t,r);if(i===void 0||wa(i)||Qc(i))break;n.push(i),r+=i>=65536?2:1}return gi.apply(void 0,n)};var pi,_a=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:C.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&&bi(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:C.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:C.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()&&Jc(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:C.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Zc(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 gi.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(),gi(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:C.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=xi(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(),u=this.parseSimpleArgStyleIfPossible();if(u.err)return u;var d=qc(u.val);if(d.length===0)return this.error(v.EXPECT_ARGUMENT_STYLE,E(this.clonePosition(),this.clonePosition()));var m=E(h,this.clonePosition());l={style:d,styleLocation:m}}var f=this.tryParseArgumentClose(i);if(f.err)return f;var g=E(i,this.clonePosition());if(l&&Sa(l?.style,"::",0)){var L=Wc(l.style.slice(2));if(s==="number"){var u=this.parseNumberSkeletonFromString(L,l.styleLocation);return u.err?u:{val:{type:C.number,value:n,location:g,style:u.val},err:null}}else{if(L.length===0)return this.error(v.EXPECT_DATE_TIME_SKELETON,g);var w=L;this.locale&&(w=Aa(L,this.locale));var d={type:Be.dateTime,pattern:w,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?ha(w):{}},b=s==="date"?C.date:C.time;return{val:{type:b,value:n,location:g,style:d},err:null}}}return{val:{type:s==="number"?C.number:s==="date"?C.date:C.time,value:n,location:g,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(v.EXPECT_SELECT_ARGUMENT_OPTIONS,E(S,A({},S)));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 u=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(u.err)return u;this.bumpSpace(),N=this.parseIdentifierIfPossible(),R=u.val}var V=this.tryParsePluralOrSelectOptions(t,s,r,N);if(V.err)return V;var f=this.tryParseArgumentClose(i);if(f.err)return f;var $=E(i,this.clonePosition());return s==="select"?{val:{type:C.select,value:n,options:Ta(V.val),location:$},err:null}:{val:{type:C.plural,value:n,options:Ta(V.val),offset:R,pluralType:s==="plural"?"cardinal":"ordinal",location:$},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=fa(t)}catch{return this.error(v.INVALID_NUMBER_SKELETON,r)}return{val:{type:Be.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?va(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 u=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_SELECTOR,v.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;h=E(u,this.clonePosition()),l=this.message.slice(u.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 f=this.parseMessage(t+1,r,n);if(f.err)return f;var g=this.tryParseArgumentClose(m);if(g.err)return g;s.push([l,{value:f.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,Xc(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=ya(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(Sa(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()&&wa(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 bi(e){return e>=97&&e<=122||e>=65&&e<=90}function Zc(e){return bi(e)||e===47}function Jc(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 wa(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Qc(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 vi(e){e.forEach(function(t){if(delete t.location,kr(t)||Or(t))for(var r in t.options)delete t.options[r].location,vi(t.options[r].value);else Pr(t)&&Vr(t.style)||(Ir(t)||Nr(t))&&Bt(t.style)?delete t.style.location:Rr(t)&&vi(t.children)})}function Ca(e,t){t===void 0&&(t={}),t=A({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new _a(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||vi(r.val),r.val}function zt(e,t){var r=t&&t.cache?t.cache:ol,n=t&&t.serializer?t.serializer:il,i=t&&t.strategy?t.strategy:tl;return i(e,{cache:r,serializer:n})}function el(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Pa(e,t,r,n){var i=el(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function Ia(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 Ai(e,t,r,n,i){return r.bind(t,e,n,i)}function tl(e,t){var r=e.length===1?Pa:Ia;return Ai(e,this,r,t.cache.create(),t.serializer)}function rl(e,t){return Ai(e,this,Ia,t.cache.create(),t.serializer)}function nl(e,t){return Ai(e,this,Pa,t.cache.create(),t.serializer)}var il=function(){return JSON.stringify(arguments)};function Ei(){this.cache=Object.create(null)}Ei.prototype.get=function(e){return this.cache[e]};Ei.prototype.set=function(e,t){this.cache[e]=t};var ol={create:function(){return new Ei}},Mr={variadic:rl,monadic:nl};var Ge;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ge||(Ge={}));var Ft=function(e){Dt(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 Si=function(e){Dt(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('", "'),'"'),Ge.INVALID_VALUE,o)||this}return t}(Ft);var Na=function(e){Dt(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Ge.INVALID_VALUE,i)||this}return t}(Ft);var ka=function(e){Dt(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,'"'),Ge.MISSING_VALUE,n)||this}return t}(Ft);var K;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(K||(K={}));function al(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==K.literal||r.type!==K.literal?t.push(r):n.value+=r.value,t},[])}function sl(e){return typeof e=="function"}function Kt(e,t,r,n,i,o,a){if(e.length===1&&ui(e[0]))return[{type:K.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=Ca,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 Ra=Oa;var ul=/[0-9\-+#]/,dl=/[^\d\-+#]/g;function Va(e){return e.search(ul)}function ml(e="#.##"){let t={},r=e.length,n=Va(e);t.prefix=n>0?e.substring(0,n):"";let i=Va(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(dl);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 pl(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,fl(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 fl(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.lengthMath.round(e*20)/20},yi=(e,t)=>({accept:e,round:t}),Al=[yi(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),yi(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.ceil(Math.floor(t*1e4/e)/100)/100),yi(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Li={[U.YEAR]:{[k.MONTHLY]:jt.MONTH,[k.ANNUAL]:jt.YEAR},[U.MONTH]:{[k.MONTHLY]:jt.MONTH}},El=(e,t)=>e.indexOf(`'${t}'`)===0,Sl=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Ga(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+yl(e)),r},Tl=e=>{let t=Ll(e),r=El(e,t),n=e.replace(/'.*?'/,""),i=Ua.test(n)||Da.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Ba=e=>e.replace(Ua,$a).replace(Da,$a),yl=e=>e.match(/#(.?)#/)?.[1]===Ha?xl:Ha,Ll=e=>e.match(/'(.*?)'/)?.[1]??"",Ga=e=>e.match(/0(.?)0/)?.[1]??"";function Hr({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=Tl(e),l=r?Ga(e):"",h=Sl(e,r),u=r?2:0,d=o(t,{currencySymbol:a}),m=n?d.toLocaleString("hi-IN",{minimumFractionDigits:u,maximumFractionDigits:u}):Ma(h,d),f=r?m.lastIndexOf(l):m.length,g=m.substring(0,f),L=m.substring(f+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,m).replace(/SYMBOL/,a),currencySymbol:a,decimals:L,decimalsDelimiter:l,hasCurrencySpace:c,integer:g,isCurrencyFirst:s,recurrenceTerm:i}}var za=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=bl[r]??1;return Hr(e,i>1?jt.MONTH:Li[t]?.[r],(o,{currencySymbol:a})=>{let s={divisor:i,price:o,usePrecision:n},{round:c}=Al.find(({accept:h})=>h(s));if(!c)throw new Error(`Missing rounding rule for: ${JSON.stringify(s)}`);return(vl[a]??(h=>h))(c(s))})},Fa=({commitment:e,term:t,...r})=>Hr(r,Li[e]?.[t]),Ka=e=>{let{commitment:t,term:r}=e;return t===U.YEAR&&r===k.MONTHLY?Hr(e,jt.YEAR,n=>n*12):Hr(e,Li[t]?.[r])};var _l={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}"},wl=ia("ConsonantTemplates/price"),Cl=/<\/?[^>]+(>|$)/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"},ze={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Pl="TAX_EXCLUSIVE",Il=e=>na(e)?Object.entries(e).filter(([,t])=>ft(t)||Lr(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+ta(n)+'"'}`,""):"",Y=(e,t,r,n=!1)=>`${n?Ba(t):t??""}`;function Nl(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},u={}){let d=Y(z.currencySymbol,r),m=Y(z.currencySpace,o?" ":""),f="";return s&&(f+=d+m),f+=Y(z.integer,a),f+=Y(z.decimalsDelimiter,i),f+=Y(z.decimals,n),s||(f+=m+d),f+=Y(z.recurrence,c,null,!0),f+=Y(z.unitType,l,null,!0),f+=Y(z.taxInclusivity,h,!0),Y(e,f,{...u,"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:u,formatString:d,price:m,priceWithoutDiscount:f,taxDisplay:g,taxTerm:L,term:w,usePrecision:b}={},S={})=>{Object.entries({country:n,formatString:d,language:c,price:m}).forEach(([se,Xr])=>{if(Xr==null)throw new Error(`Argument "${se}" is missing for osi ${u?.toString()}, country ${n}, language ${c}`)});let N={..._l,...l},R=`${c.toLowerCase()}-${n.toUpperCase()}`;function V(se,Xr){let Wr=N[se];if(Wr==null)return"";try{return new Ra(Wr.replace(Cl,""),R).format(Xr)}catch{return wl.error("Failed to format literal:",Wr),""}}let $=t&&f?f:m,oe=e?za:Fa;r&&(oe=Ka);let{accessiblePrice:We,recurrenceTerm:_e,...qe}=oe({commitment:h,formatString:d,term:w,price:e?m:$,usePrecision:b,isIndianPrice:n==="IN"}),J=We,ge="";if(T(o)&&_e){let se=V(ze.recurrenceAriaLabel,{recurrenceTerm:_e});se&&(J+=" "+se),ge=V(ze.recurrenceLabel,{recurrenceTerm:_e})}let ae="";if(T(a)){ae=V(ze.perUnitLabel,{perUnit:"LICENSE"});let se=V(ze.perUnitAriaLabel,{perUnit:"LICENSE"});se&&(J+=" "+se)}let Q="";T(s)&&L&&(Q=V(g===Pl?ze.taxExclusiveLabel:ze.taxInclusiveLabel,{taxTerm:L}),Q&&(J+=" "+Q)),t&&(J=V(ze.strikethroughAriaLabel,{strikethroughPrice:J}));let we=z.container;if(e&&(we+=" "+z.containerOptical),t&&(we+=" "+z.containerStrikethrough),r&&(we+=" "+z.containerAnnual),T(i))return Nl(we,{...qe,accessibleLabel:J,recurrenceLabel:ge,perUnitLabel:ae,taxInclusivityLabel:Q},S);let{currencySymbol:Wi,decimals:Es,decimalsDelimiter:Ss,hasCurrencySpace:qi,integer:Ts,isCurrencyFirst:ys}=qe,Ze=[Ts,Ss,Es];ys?(Ze.unshift(qi?"\xA0":""),Ze.unshift(Wi)):(Ze.push(qi?"\xA0":""),Ze.push(Wi)),Ze.push(ge,ae,Q);let Ls=Ze.join("");return Y(we,Ls,S)},ja=()=>(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):""}`},Ya=()=>(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,")")}`},Xa=()=>(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 _i=W(),wi=ja(),Ci=W({displayOptical:!0}),Pi=W({displayStrikethrough:!0}),Ii=W({displayAnnual:!0}),Ni=Xa(),ki=Ya();var kl=(e,t)=>{if(!(!xt(e)||!xt(t)))return Math.floor((t-e)/t*100)},Wa=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,i=kl(r,n);return i===void 0?'':`${i}%`};var Oi=Wa();var{freeze:Yt}=Object,te=Yt({...De}),re=Yt({...Z}),Fe={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},Ri=Yt({...U}),Vi=Yt({...aa}),Mi=Yt({...k});var qa="mas-commerce-service";function Za(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(qa);i!==r&&(r=i,i&&e(i))}return document.addEventListener(ot,n,{once:t}),Te(n),()=>document.removeEventListener(ot,n)}function Xt(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(li)),i}var Te=e=>window.setTimeout(e);function At(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(vt).filter(xt);return r.length||(r=[t]),r}function $r(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(ri)}function q(){return document.getElementsByTagName(qa)?.[0]}var Ke={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},Ja=1e3,Qa=new Set;function Ol(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function es(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(!Ke.serializableTypes.includes(r))return r}return e}function Rl(e,t){if(!Ke.ignoredProperties.includes(e))return es(t)}var Hi={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],i=[],o=t;r.forEach(l=>{l!=null&&(Ol(l)?n:i).push(l)}),n.length&&(o+=" "+n.map(es).join(" "));let{pathname:a,search:s}=window.location,c=`${Ke.delimiter}page=${a}${s}`;c.length>Ja&&(c=`${c.slice(0,Ja)}`),o+=c,i.length&&(o+=`${Ke.delimiter}facts=`,o+=JSON.stringify(i,Rl)),Qa.has(o)||(Qa.add(o),window.lana?.log(o,Ke))}};function Et(e){Object.assign(Ke,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Ke&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var _=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:te.V3,checkoutWorkflowStep:re.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:Fe.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:$e.PUBLISHED,wcsBufferLimit:1});var $i=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function Vl({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 Ui(e={}){let{commerce:t={}}=e,r=Fe.PRODUCTION,n=Gn,i=O("checkoutClientId",t)??_.checkoutClientId,o=Se(O("checkoutWorkflow",t),te,_.checkoutWorkflow),a=re.CHECKOUT;o===te.V3&&(a=Se(O("checkoutWorkflowStep",t),re,_.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),u=T(O("entitlement",t),_.entitlement),d=T(O("modal",t),_.modal),m=T(O("forceTaxExclusive",t),_.forceTaxExclusive),f=O("promotionCode",t)??_.promotionCode,g=At(O("quantity",t)),L=O("wcsApiKey",t)??_.wcsApiKey,w=t?.env==="stage",b=$e.PUBLISHED;["true",""].includes(t.allowOverride)&&(w=(O(Dn,t,{metadata:!1})?.toLowerCase()??t?.env)==="stage",b=Se(O(Bn,t),$e,b)),w&&(r=Fe.STAGE,n=zn);let N=vt(O("wcsBufferDelay",t),_.wcsBufferDelay),R=vt(O("wcsBufferLimit",t),_.wcsBufferLimit);return{...Vl(e),displayOldPrice:s,checkoutClientId:i,checkoutWorkflow:o,checkoutWorkflowStep:a,displayPerUnit:c,displayRecurrence:l,displayTax:h,entitlement:u,extraOptions:_.extraOptions,modal:d,env:r,forceTaxExclusive:m,promotionCode:f,quantity:g,wcsApiKey:L,wcsBufferDelay:N,wcsBufferLimit:R,wcsURL:n,landscape:b}}var Di={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Ml=Date.now(),Bi=new Set,Gi=new Set,ts=new Map,rs={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},ns={filter:({level:e})=>e!==Di.DEBUG},Hl={filter:()=>!1};function $l(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){return n.length===1&&$t(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:i,timestamp:Date.now()-Ml}}function Ul(e){[...Gi].every(t=>t(e))&&Bi.forEach(t=>t(e))}function is(e){let t=(ts.get(e)??0)+1;ts.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:i=>is(`${n.namespace}/${i}`),updateConfig:Et};return Object.values(Di).forEach(i=>{n[i]=(o,...a)=>Ul($l(i,o,e,a,r))}),Object.seal(n)}function Ur(...e){e.forEach(t=>{let{append:r,filter:n}=t;$t(n)&&Gi.add(n),$t(r)&&Bi.add(r)})}function Dl(e={}){let{name:t}=e,r=T(O("commerce.debug",{search:!0,storage:!0}),t===$i.LOCAL);return Ur(r?rs:ns),t===$i.PROD&&Ur(Hi),X}function Bl(){Bi.clear(),Gi.clear()}var X={...is(Un),Level:Di,Plugins:{consoleAppender:rs,debugFilter:ns,quietFilter:Hl,lanaAppender:Hi},init:Dl,reset:Bl,use:Ur};var Gl={[he]:kn,[ue]:On,[de]:Rn},zl={[he]:Mn,[ue]:Hn,[de]:$n},St=class{constructor(t){p(this,"changes",new Map);p(this,"connected",!1);p(this,"dispose",gt);p(this,"error");p(this,"log");p(this,"options");p(this,"promises",[]);p(this,"state",ue);p(this,"timer",null);p(this,"value");p(this,"version",0);p(this,"wrapperElement");this.wrapperElement=t}update(){[he,ue,de].forEach(t=>{this.wrapperElement.classList.toggle(Gl[t],t===this.state)})}notify(){(this.state===de||this.state===he)&&(this.state===de?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(zl[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=Za(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=gt}onceSettled(){let{error:t,promises:r,state:n}=this;return de===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=de,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),Te(()=>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}),Te(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=ue,this.update(),Te(()=>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=ue,this.timer=Te(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===ue&&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 os(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,os(t)),i}function Br(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,os(t)),e):null}var Fl="download",Kl="upgrade";function Gr(e,t={},r=""){let n=q();if(!n)return null;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:u,quantity:d,wcsOsi:m,extraOptions:f}=n.collectCheckoutOptions(t),g=Dr(e,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:u,quantity:d,wcsOsi:m,extraOptions:f});return r&&(g.innerHTML=`${r}`),g}function zr(e){return class extends e{constructor(){super(...arguments);p(this,"checkoutActionHandler");p(this,"masElement",new St(this))}attributeChangedCallback(n,i,o){this.masElement.attributeChangedCallback(n,i,o)}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 i=q();if(!i)return!1;this.dataset.imsCountry||i.imsCountryPromise.then(u=>{u&&(this.dataset.imsCountry=u)},gt),n.imsCountry=null;let o=i.collectCheckoutOptions(n,this);if(!o.wcsOsi.length)return!1;let a;try{a=JSON.parse(o.extraOptions??"{}")}catch(u){this.masElement.log?.error("cannot parse exta checkout options",u)}let s=this.masElement.togglePending(o);this.setCheckoutUrl("");let c=i.resolveOfferSelectors(o),l=await Promise.all(c);l=l.map(u=>Xt(u,o)),o.country=this.dataset.imsCountry||o.country;let h=await i.buildCheckoutAction?.(l.flat(),{...a,...o},this);return this.renderOffers(l.flat(),o,{},h,s)}renderOffers(n,i,o={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=q();if(!c)return!1;if(i={...JSON.parse(this.dataset.extraOptions??"null"),...i,...o},s??(s=this.masElement.togglePending(i)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(Fl,Kl),this.masElement.toggleResolved(s,n,i);let{url:h,text:u,className:d,handler:m}=a;return h&&this.setCheckoutUrl(h),u&&(this.firstElementChild.innerHTML=u),d&&this.classList.add(...d.split(" ")),m&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=m.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,i)){let h=c.buildCheckoutURL(n,i);return this.setCheckoutUrl(h),!0}}else{let h=new Error(`Not provided: ${i?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,h,i))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let i=q();if(!i)return!1;let{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:u,promotionCode:d,quantity:m,wcsOsi:f}=i.collectCheckoutOptions(n);return Br(this,{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:u,promotionCode:d,quantity:m,wcsOsi:f}),!0}}}var Ye,Wt=class Wt extends zr(HTMLButtonElement){constructor(){super(...arguments);G(this,Ye)}static createCheckoutButton(r={},n=""){return Gr(Wt,r,n)}setCheckoutUrl(r){j(this,Ye,r)}get href(){return y(this,Ye)}get isCheckoutButton(){return!0}clickHandler(r){if(this.checkoutActionHandler){this.checkoutActionHandler?.(r);return}y(this,Ye)&&(window.location.href=y(this,Ye))}};Ye=new WeakMap,p(Wt,"is","checkout-button"),p(Wt,"tag","button");var je=Wt;window.customElements.get(je.is)||window.customElements.define(je.is,je,{extends:je.tag});var jl="#000000",Yl="#F8D904",Xl=/(accent|primary|secondary)(-(outline|link))?/,Wl="mas:product_code/",ql="daa-ll",Fr="daa-lh",Zl=["XL","L","M","S"];function Jl(e,t,r){e.mnemonicIcon?.map((i,o)=>({icon:i,alt:e.mnemonicAlt[o]??"",link:e.mnemonicLink[o]??""}))?.forEach(({icon:i,alt:o,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:i,size:r?.size??"l"};o&&(s.alt=o),a&&(s.href=a);let c=le("merch-icon",s);t.append(c)})}function Ql(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||jl),t.setAttribute("badge-background-color",e.badgeBackgroundColor||Yl))}function eh(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function th(e,t,r){e.cardTitle&&r&&t.append(le(r.tag,{slot:r.slot},e.cardTitle))}function rh(e,t,r){e.subtitle&&r&&t.append(le(r.tag,{slot:r.slot},e.subtitle))}function nh(e,t,r,n){if(e.backgroundImage)switch(n){case"ccd-slice":r&&t.append(le(r.tag,{slot:r.slot},``));break;case"ccd-suggested":t.setAttribute("background-image",e.backgroundImage);break}}function ih(e,t,r){if(e.prices&&r){let n=le(r.tag,{slot:r.slot},e.prices);t.append(n)}}function oh(e,t,r){if(e.description&&r){let n=le(r.tag,{slot:r.slot},e.description);t.append(n)}}function ah(e,t,r,n){let o=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);o.setAttribute("tabindex",0);for(let h of e.attributes)["class","is"].includes(h.name)||o.setAttribute(h.name,h.value);o.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=Zl.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),o.classList.add(...l),o}function sh(e,t,r,n){let i="fill";r&&(i="outline");let o=le("sp-button",{treatment:i,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return o.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),o}function ch(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function lh(e,t,r,n){if(e.ctas){let{slot:i}=r.ctas,o=le("div",{slot:i},e.ctas),a=[...o.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return ch(s,c);let l=Xl.exec(s.className)?.[0]??"accent",h=l.includes("accent"),u=l.includes("primary"),d=l.includes("secondary"),m=l.includes("-outline");if(l.includes("-link"))return s;let g;return h||c?g="accent":u?g="primary":d&&(g="secondary"),t.spectrum==="swc"?sh(s,r,m,g):ah(s,r,m,g)});o.innerHTML="",o.append(...a),t.append(o)}}function hh(e,t){let{tags:r}=e,n=r?.find(i=>i.startsWith(Wl))?.split("/").pop();n&&(t.setAttribute(Fr,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((i,o)=>{i.setAttribute(ql,`${i.dataset.analyticsId}-${o+1}`)}))}function uh(e){[["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 as(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.querySelectorAll("[slot]").forEach(o=>{o.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(Fr),t.variant=n,await t.updateComplete;let{aemFragmentMapping:i}=t.variantLayout;i&&(Jl(r,t,i.mnemonics),Ql(r,t),eh(r,t,i.allowedSizes),th(r,t,i.title),rh(r,t,i.subtitle),ih(r,t,i.prices),nh(r,t,i.backgroundImage,n),oh(r,t,i.description),lh(r,t,i,n),hh(r,t),uh(t))}var dh="merch-card",mh=1e4,Zt,zi,qt=class extends ee{constructor(){super();G(this,Zt);p(this,"customerSegment");p(this,"marketSegment");p(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}firstUpdated(){this.variantLayout=Kn(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=Kn(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 i of n){await i.onceSettled();let o=i.value?.[0]?.planType;if(!o)return;let a=this.stockOfferOsis[o];if(!a)return;let s=i.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),i.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let i of n)i.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(i=>{if(r){n[i].order=Math.min(n[i].order||2,2);return}let o=n[i].order;o===1||isNaN(o)||(n[i].order=Number(o)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback(),this.addEventListener(br,this.handleQuantitySelection),this.addEventListener(wn,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(He,this.handleAemFragmentEvents),this.addEventListener(Me,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(br,this.handleQuantitySelection),this.storageOptions?.removeEventListener(xr,this.handleStorageChange),this.removeEventListener(He,this.handleAemFragmentEvents),this.removeEventListener(Me,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===He&&xe(this,Zt,zi).call(this,"AEM fragment cannot be loaded"),r.type===Me&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await as(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(o=>setTimeout(()=>o(!1),mh));if(await Promise.race([r,n])===!0){this.dispatchEvent(new CustomEvent(In,{bubbles:!0,composed:!0}));return}xe(this,Zt,zi).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(Cn,{bubbles:!0}))}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(xr,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let i=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(i)}):n.replaceWith(i)}}};Zt=new WeakSet,zi=function(r){this.dispatchEvent(new CustomEvent(Nn,{detail:r,bubbles:!0,composed:!0}))},p(qt,"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,i,o]=r.split(",");return{PUF:n,ABM:i,M2M:o}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[i,o,a]=n.split(":"),s=Number(o);return[i,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:i,size:o}])=>[n,i,o].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:Fr,reflect:!0}}),p(qt,"styles",[Vo,Wo(),...Mo()]);customElements.define(dh,qt);var Tt=class extends ee{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?x` +`,Ge.MISSING_INTL_API,a);var N=r.getPluralRules(t,{type:h.pluralType}).select(d-(h.offset||0));S=h.options[N]||h.options.other}if(!S)throw new Si(h.value,d,Object.keys(h.options),a);s.push.apply(s,Kt(S.value,t,r,n,i,d-(h.offset||0)));continue}}return al(s)}function cl(e,t){return t?A(A(A({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=A(A({},e[n]),t[n]||{}),r},{})):e}function ll(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=cl(e[n],t[n]),r},A({},e)):e}function Ti(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function hl(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:zt(function(){for(var t,r=[],n=0;n0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Ca,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 Ra=Oa;var ul=/[0-9\-+#]/,dl=/[^\d\-+#]/g;function Va(e){return e.search(ul)}function ml(e="#.##"){let t={},r=e.length,n=Va(e);t.prefix=n>0?e.substring(0,n):"";let i=Va(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(dl);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 pl(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,fl(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 fl(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.lengthMath.round(e*20)/20},yi=(e,t)=>({accept:e,round:t}),Al=[yi(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),yi(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.ceil(Math.floor(t*1e4/e)/100)/100),yi(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Li={[U.YEAR]:{[k.MONTHLY]:jt.MONTH,[k.ANNUAL]:jt.YEAR},[U.MONTH]:{[k.MONTHLY]:jt.MONTH}},El=(e,t)=>e.indexOf(`'${t}'`)===0,Sl=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Ga(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+yl(e)),r},Tl=e=>{let t=Ll(e),r=El(e,t),n=e.replace(/'.*?'/,""),i=Ua.test(n)||Da.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Ba=e=>e.replace(Ua,$a).replace(Da,$a),yl=e=>e.match(/#(.?)#/)?.[1]===Ha?xl:Ha,Ll=e=>e.match(/'(.*?)'/)?.[1]??"",Ga=e=>e.match(/0(.?)0/)?.[1]??"";function Hr({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=a=>a){let{currencySymbol:a,isCurrencyFirst:s,hasCurrencySpace:c}=Tl(e),l=r?Ga(e):"",h=Sl(e,r),u=r?2:0,d=o(t,{currencySymbol:a}),m=n?d.toLocaleString("hi-IN",{minimumFractionDigits:u,maximumFractionDigits:u}):Ma(h,d),f=r?m.lastIndexOf(l):m.length,g=m.substring(0,f),L=m.substring(f+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,m).replace(/SYMBOL/,a),currencySymbol:a,decimals:L,decimalsDelimiter:l,hasCurrencySpace:c,integer:g,isCurrencyFirst:s,recurrenceTerm:i}}var za=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=bl[r]??1;return Hr(e,i>1?jt.MONTH:Li[t]?.[r],(o,{currencySymbol:a})=>{let s={divisor:i,price:o,usePrecision:n},{round:c}=Al.find(({accept:h})=>h(s));if(!c)throw new Error(`Missing rounding rule for: ${JSON.stringify(s)}`);return(vl[a]??(h=>h))(c(s))})},Fa=({commitment:e,term:t,...r})=>Hr(r,Li[e]?.[t]),Ka=e=>{let{commitment:t,term:r}=e;return t===U.YEAR&&r===k.MONTHLY?Hr(e,jt.YEAR,n=>n*12):Hr(e,Li[t]?.[r])};var _l={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}"},wl=ia("ConsonantTemplates/price"),Cl=/<\/?[^>]+(>|$)/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"},ze={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Pl="TAX_EXCLUSIVE",Il=e=>na(e)?Object.entries(e).filter(([,t])=>ft(t)||Lr(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+ta(n)+'"'}`,""):"",Y=(e,t,r,n=!1)=>`${n?Ba(t):t??""}`;function Nl(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:a,isCurrencyFirst:s,recurrenceLabel:c,perUnitLabel:l,taxInclusivityLabel:h},u={}){let d=Y(z.currencySymbol,r),m=Y(z.currencySpace,o?" ":""),f="";return s&&(f+=d+m),f+=Y(z.integer,a),f+=Y(z.decimalsDelimiter,i),f+=Y(z.decimals,n),s||(f+=m+d),f+=Y(z.recurrence,c,null,!0),f+=Y(z.unitType,l,null,!0),f+=Y(z.taxInclusivity,h,!0),Y(e,f,{...u,"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:u,formatString:d,price:m,priceWithoutDiscount:f,taxDisplay:g,taxTerm:L,term:w,usePrecision:b}={},S={})=>{Object.entries({country:n,formatString:d,language:c,price:m}).forEach(([se,Xr])=>{if(Xr==null)throw new Error(`Argument "${se}" is missing for osi ${u?.toString()}, country ${n}, language ${c}`)});let N={..._l,...l},R=`${c.toLowerCase()}-${n.toUpperCase()}`;function V(se,Xr){let Wr=N[se];if(Wr==null)return"";try{return new Ra(Wr.replace(Cl,""),R).format(Xr)}catch{return wl.error("Failed to format literal:",Wr),""}}let $=t&&f?f:m,oe=e?za:Fa;r&&(oe=Ka);let{accessiblePrice:We,recurrenceTerm:_e,...qe}=oe({commitment:h,formatString:d,term:w,price:e?m:$,usePrecision:b,isIndianPrice:n==="IN"}),J=We,ge="";if(T(o)&&_e){let se=V(ze.recurrenceAriaLabel,{recurrenceTerm:_e});se&&(J+=" "+se),ge=V(ze.recurrenceLabel,{recurrenceTerm:_e})}let ae="";if(T(a)){ae=V(ze.perUnitLabel,{perUnit:"LICENSE"});let se=V(ze.perUnitAriaLabel,{perUnit:"LICENSE"});se&&(J+=" "+se)}let Q="";T(s)&&L&&(Q=V(g===Pl?ze.taxExclusiveLabel:ze.taxInclusiveLabel,{taxTerm:L}),Q&&(J+=" "+Q)),t&&(J=V(ze.strikethroughAriaLabel,{strikethroughPrice:J}));let we=z.container;if(e&&(we+=" "+z.containerOptical),t&&(we+=" "+z.containerStrikethrough),r&&(we+=" "+z.containerAnnual),T(i))return Nl(we,{...qe,accessibleLabel:J,recurrenceLabel:ge,perUnitLabel:ae,taxInclusivityLabel:Q},S);let{currencySymbol:Wi,decimals:Es,decimalsDelimiter:Ss,hasCurrencySpace:qi,integer:Ts,isCurrencyFirst:ys}=qe,Ze=[Ts,Ss,Es];ys?(Ze.unshift(qi?"\xA0":""),Ze.unshift(Wi)):(Ze.push(qi?"\xA0":""),Ze.push(Wi)),Ze.push(ge,ae,Q);let Ls=Ze.join("");return Y(we,Ls,S)},ja=()=>(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):""}`},Ya=()=>(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,")")}`},Xa=()=>(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 _i=W(),wi=ja(),Ci=W({displayOptical:!0}),Pi=W({displayStrikethrough:!0}),Ii=W({displayAnnual:!0}),Ni=Xa(),ki=Ya();var kl=(e,t)=>{if(!(!xt(e)||!xt(t)))return Math.floor((t-e)/t*100)},Wa=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,i=kl(r,n);return i===void 0?'':`${i}%`};var Oi=Wa();var{freeze:Yt}=Object,te=Yt({...De}),re=Yt({...Z}),Fe={STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"},Ri=Yt({...U}),Vi=Yt({...aa}),Mi=Yt({...k});var qa="mas-commerce-service";function Za(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(qa);i!==r&&(r=i,i&&e(i))}return document.addEventListener(ot,n,{once:t}),Te(n),()=>document.removeEventListener(ot,n)}function Xt(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(li)),i}var Te=e=>window.setTimeout(e);function At(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(vt).filter(xt);return r.length||(r=[t]),r}function $r(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(ri)}function q(){return document.getElementsByTagName(qa)?.[0]}var Ke={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},Ja=1e3,Qa=new Set;function Ol(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function es(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(!Ke.serializableTypes.includes(r))return r}return e}function Rl(e,t){if(!Ke.ignoredProperties.includes(e))return es(t)}var Hi={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],i=[],o=t;r.forEach(l=>{l!=null&&(Ol(l)?n:i).push(l)}),n.length&&(o+=" "+n.map(es).join(" "));let{pathname:a,search:s}=window.location,c=`${Ke.delimiter}page=${a}${s}`;c.length>Ja&&(c=`${c.slice(0,Ja)}`),o+=c,i.length&&(o+=`${Ke.delimiter}facts=`,o+=JSON.stringify(i,Rl)),Qa.has(o)||(Qa.add(o),window.lana?.log(o,Ke))}};function Et(e){Object.assign(Ke,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Ke&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var _=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:te.V3,checkoutWorkflowStep:re.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:Fe.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:$e.PUBLISHED,wcsBufferLimit:1});var $i=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function Vl({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 Ui(e={}){let{commerce:t={}}=e,r=Fe.PRODUCTION,n=Gn,i=O("checkoutClientId",t)??_.checkoutClientId,o=Se(O("checkoutWorkflow",t),te,_.checkoutWorkflow),a=re.CHECKOUT;o===te.V3&&(a=Se(O("checkoutWorkflowStep",t),re,_.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),u=T(O("entitlement",t),_.entitlement),d=T(O("modal",t),_.modal),m=T(O("forceTaxExclusive",t),_.forceTaxExclusive),f=O("promotionCode",t)??_.promotionCode,g=At(O("quantity",t)),L=O("wcsApiKey",t)??_.wcsApiKey,w=t?.env==="stage",b=$e.PUBLISHED;["true",""].includes(t.allowOverride)&&(w=(O(Dn,t,{metadata:!1})?.toLowerCase()??t?.env)==="stage",b=Se(O(Bn,t),$e,b)),w&&(r=Fe.STAGE,n=zn);let N=vt(O("wcsBufferDelay",t),_.wcsBufferDelay),R=vt(O("wcsBufferLimit",t),_.wcsBufferLimit);return{...Vl(e),displayOldPrice:s,checkoutClientId:i,checkoutWorkflow:o,checkoutWorkflowStep:a,displayPerUnit:c,displayRecurrence:l,displayTax:h,entitlement:u,extraOptions:_.extraOptions,modal:d,env:r,forceTaxExclusive:m,promotionCode:f,quantity:g,wcsApiKey:L,wcsBufferDelay:N,wcsBufferLimit:R,wcsURL:n,landscape:b}}var Di={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Ml=Date.now(),Bi=new Set,Gi=new Set,ts=new Map,rs={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},ns={filter:({level:e})=>e!==Di.DEBUG},Hl={filter:()=>!1};function $l(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){return n.length===1&&$t(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:i,timestamp:Date.now()-Ml}}function Ul(e){[...Gi].every(t=>t(e))&&Bi.forEach(t=>t(e))}function is(e){let t=(ts.get(e)??0)+1;ts.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:i=>is(`${n.namespace}/${i}`),updateConfig:Et};return Object.values(Di).forEach(i=>{n[i]=(o,...a)=>Ul($l(i,o,e,a,r))}),Object.seal(n)}function Ur(...e){e.forEach(t=>{let{append:r,filter:n}=t;$t(n)&&Gi.add(n),$t(r)&&Bi.add(r)})}function Dl(e={}){let{name:t}=e,r=T(O("commerce.debug",{search:!0,storage:!0}),t===$i.LOCAL);return Ur(r?rs:ns),t===$i.PROD&&Ur(Hi),X}function Bl(){Bi.clear(),Gi.clear()}var X={...is(Un),Level:Di,Plugins:{consoleAppender:rs,debugFilter:ns,quietFilter:Hl,lanaAppender:Hi},init:Dl,reset:Bl,use:Ur};var Gl={[he]:kn,[ue]:On,[de]:Rn},zl={[he]:Mn,[ue]:Hn,[de]:$n},St=class{constructor(t){p(this,"changes",new Map);p(this,"connected",!1);p(this,"dispose",gt);p(this,"error");p(this,"log");p(this,"options");p(this,"promises",[]);p(this,"state",ue);p(this,"timer",null);p(this,"value");p(this,"version",0);p(this,"wrapperElement");this.wrapperElement=t}update(){[he,ue,de].forEach(t=>{this.wrapperElement.classList.toggle(Gl[t],t===this.state)})}notify(){(this.state===de||this.state===he)&&(this.state===de?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(zl[this.state],{bubbles:!0}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){this.dispose=Za(()=>this.requestUpdate(!0))}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement})),this.dispose(),this.dispose=gt}onceSettled(){let{error:t,promises:r,state:n}=this;return de===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=de,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),Te(()=>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}),Te(()=>this.notify()),!0)}togglePending(t){return this.version++,t&&(this.options=t),this.state=ue,this.update(),Te(()=>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=ue,this.timer=Te(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===ue&&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 os(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,os(t)),i}function Br(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,os(t)),e):null}var Fl="download",Kl="upgrade";function Gr(e,t={},r=""){let n=q();if(!n)return null;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:u,quantity:d,wcsOsi:m,extraOptions:f}=n.collectCheckoutOptions(t),g=Dr(e,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:a,entitlement:s,upgrade:c,modal:l,perpetual:h,promotionCode:u,quantity:d,wcsOsi:m,extraOptions:f});return r&&(g.innerHTML=`${r}`),g}function zr(e){return class extends e{constructor(){super(...arguments);p(this,"checkoutActionHandler");p(this,"masElement",new St(this))}attributeChangedCallback(n,i,o){this.masElement.attributeChangedCallback(n,i,o)}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 i=q();if(!i)return!1;this.dataset.imsCountry||i.imsCountryPromise.then(u=>{u&&(this.dataset.imsCountry=u)},gt),n.imsCountry=null;let o=i.collectCheckoutOptions(n,this);if(!o.wcsOsi.length)return!1;let a;try{a=JSON.parse(o.extraOptions??"{}")}catch(u){this.masElement.log?.error("cannot parse exta checkout options",u)}let s=this.masElement.togglePending(o);this.setCheckoutUrl("");let c=i.resolveOfferSelectors(o),l=await Promise.all(c);l=l.map(u=>Xt(u,o)),o.country=this.dataset.imsCountry||o.country;let h=await i.buildCheckoutAction?.(l.flat(),{...a,...o},this);return this.renderOffers(l.flat(),o,{},h,s)}renderOffers(n,i,o={},a=void 0,s=void 0){if(!this.isConnected)return!1;let c=q();if(!c)return!1;if(i={...JSON.parse(this.dataset.extraOptions??"null"),...i,...o},s??(s=this.masElement.togglePending(i)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),a){this.classList.remove(Fl,Kl),this.masElement.toggleResolved(s,n,i);let{url:h,text:u,className:d,handler:m}=a;return h&&this.setCheckoutUrl(h),u&&(this.firstElementChild.innerHTML=u),d&&this.classList.add(...d.split(" ")),m&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=m.bind(this)),!0}else if(n.length){if(this.masElement.toggleResolved(s,n,i)){let h=c.buildCheckoutURL(n,i);return this.setCheckoutUrl(h),!0}}else{let h=new Error(`Not provided: ${i?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,h,i))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let i=q();if(!i)return!1;let{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:u,promotionCode:d,quantity:m,wcsOsi:f}=i.collectCheckoutOptions(n);return Br(this,{checkoutMarketSegment:o,checkoutWorkflow:a,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:h,perpetual:u,promotionCode:d,quantity:m,wcsOsi:f}),!0}}}var Ye,Wt=class Wt extends zr(HTMLButtonElement){constructor(){super(...arguments);G(this,Ye)}static createCheckoutButton(r={},n=""){return Gr(Wt,r,n)}setCheckoutUrl(r){j(this,Ye,r)}get href(){return y(this,Ye)}get isCheckoutButton(){return!0}clickHandler(r){if(this.checkoutActionHandler){this.checkoutActionHandler?.(r);return}y(this,Ye)&&(window.location.href=y(this,Ye))}};Ye=new WeakMap,p(Wt,"is","checkout-button"),p(Wt,"tag","button");var je=Wt;window.customElements.get(je.is)||window.customElements.define(je.is,je,{extends:je.tag});var jl="#000000",Yl="#F8D904",Xl=/(accent|primary|secondary)(-(outline|link))?/,Wl="mas:product_code/",ql="daa-ll",Fr="daa-lh",Zl=["XL","L","M","S"];function Jl(e,t,r){e.mnemonicIcon?.map((i,o)=>({icon:i,alt:e.mnemonicAlt[o]??"",link:e.mnemonicLink[o]??""}))?.forEach(({icon:i,alt:o,link:a})=>{if(a&&!/^https?:/.test(a))try{a=new URL(`https://${a}`).href.toString()}catch{a="#"}let s={slot:"icons",src:i,size:r?.size??"l"};o&&(s.alt=o),a&&(s.href=a);let c=le("merch-icon",s);t.append(c)})}function Ql(e,t){e.badge&&(t.setAttribute("badge-text",e.badge),t.setAttribute("badge-color",e.badgeColor||jl),t.setAttribute("badge-background-color",e.badgeBackgroundColor||Yl))}function eh(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function th(e,t,r){e.cardTitle&&r&&t.append(le(r.tag,{slot:r.slot},e.cardTitle))}function rh(e,t,r){e.subtitle&&r&&t.append(le(r.tag,{slot:r.slot},e.subtitle))}function nh(e,t,r,n){if(e.backgroundImage)switch(n){case"ccd-slice":r&&t.append(le(r.tag,{slot:r.slot},``));break;case"ccd-suggested":t.setAttribute("background-image",e.backgroundImage);break}}function ih(e,t,r){if(e.prices&&r){let n=le(r.tag,{slot:r.slot},e.prices);t.append(n)}}function oh(e,t,r){if(e.description&&r){let n=le(r.tag,{slot:r.slot},e.description);t.append(n)}}function ah(e,t,r,n){let o=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML);o.setAttribute("tabindex",0);for(let h of e.attributes)["class","is"].includes(h.name)||o.setAttribute(h.name,h.value);o.firstElementChild?.classList.add("spectrum-Button-label");let a=t.ctas.size??"M",s=`spectrum-Button--${n}`,c=Zl.includes(a)?`spectrum-Button--size${a}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),o.classList.add(...l),o}function sh(e,t,r,n){let i="fill";r&&(i="outline");let o=le("sp-button",{treatment:i,variant:n,tabIndex:0,size:t.ctas.size??"m"},e);return o.addEventListener("click",a=>{a.target!==e&&(a.stopPropagation(),e.click())}),o}function ch(e,t){return e.classList.add("con-button"),t&&e.classList.add("blue"),e}function lh(e,t,r,n){if(e.ctas){let{slot:i}=r.ctas,o=le("div",{slot:i},e.ctas),a=[...o.querySelectorAll("a")].map(s=>{let c=s.parentElement.tagName==="STRONG";if(t.consonant)return ch(s,c);let l=Xl.exec(s.className)?.[0]??"accent",h=l.includes("accent"),u=l.includes("primary"),d=l.includes("secondary"),m=l.includes("-outline");if(l.includes("-link"))return s;let g;return h||c?g="accent":u?g="primary":d&&(g="secondary"),t.spectrum==="swc"?sh(s,r,m,g):ah(s,r,m,g)});o.innerHTML="",o.append(...a),t.append(o)}}function hh(e,t){let{tags:r}=e,n=r?.find(i=>i.startsWith(Wl))?.split("/").pop();n&&(t.setAttribute(Fr,n),t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]").forEach((i,o)=>{i.setAttribute(ql,`${i.dataset.analyticsId}-${o+1}`)}))}function uh(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 as(e,t){let{fields:r}=e,{variant:n}=r;if(!n)return;t.querySelectorAll("[slot]").forEach(o=>{o.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(Fr),t.variant=n,await t.updateComplete;let{aemFragmentMapping:i}=t.variantLayout;i&&(Jl(r,t,i.mnemonics),Ql(r,t),eh(r,t,i.allowedSizes),th(r,t,i.title),rh(r,t,i.subtitle),ih(r,t,i.prices),nh(r,t,i.backgroundImage,n),oh(r,t,i.description),lh(r,t,i,n),hh(r,t),uh(t))}var dh="merch-card",mh=1e4,Zt,zi,qt=class extends ee{constructor(){super();G(this,Zt);p(this,"customerSegment");p(this,"marketSegment");p(this,"variantLayout");this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this)}firstUpdated(){this.variantLayout=Kn(this,!1),this.variantLayout?.connectedCallbackHook(),this.aemFragment?.updateComplete.catch(()=>{this.style.display="none"})}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout=Kn(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 i of n){await i.onceSettled();let o=i.value?.[0]?.planType;if(!o)return;let a=this.stockOfferOsis[o];if(!a)return;let s=i.dataset.wcsOsi.split(",").filter(c=>c!==a);r.checked&&s.push(a),i.dataset.wcsOsi=s.join(",")}}handleQuantitySelection(r){let n=this.checkoutLinks;for(let i of n)i.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let n={...this.filters};Object.keys(n).forEach(i=>{if(r){n[i].order=Math.min(n[i].order||2,2);return}let o=n[i].order;o===1||isNaN(o)||(n[i].order=Number(o)+1)}),this.filters=n}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){super.connectedCallback(),this.addEventListener(br,this.handleQuantitySelection),this.addEventListener(wn,this.merchCardReady,{once:!0}),this.updateComplete.then(()=>{this.merchCardReady()}),this.storageOptions?.addEventListener("change",this.handleStorageChange),this.addEventListener(He,this.handleAemFragmentEvents),this.addEventListener(Me,this.handleAemFragmentEvents),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(br,this.handleQuantitySelection),this.storageOptions?.removeEventListener(xr,this.handleStorageChange),this.removeEventListener(He,this.handleAemFragmentEvents),this.removeEventListener(Me,this.handleAemFragmentEvents)}async handleAemFragmentEvents(r){if(r.type===He&&xe(this,Zt,zi).call(this,"AEM fragment cannot be loaded"),r.type===Me&&r.target.nodeName==="AEM-FRAGMENT"){let n=r.detail;await as(n,this),this.checkReady()}}async checkReady(){let r=Promise.all([...this.querySelectorAll('span[is="inline-price"][data-wcs-osi],a[is="checkout-link"][data-wcs-osi]')].map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(a=>a.classList.contains("placeholder-resolved"))),n=new Promise(o=>setTimeout(()=>o(!1),mh));if(await Promise.race([r,n])===!0){this.dispatchEvent(new CustomEvent(In,{bubbles:!0,composed:!0}));return}xe(this,Zt,zi).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(Cn,{bubbles:!0}))}handleStorageChange(){let r=this.closest("merch-card")?.offerSelect.cloneNode(!0);r&&this.dispatchEvent(new CustomEvent(xr,{detail:{offerSelect:r},bubbles:!0}))}get dynamicPrice(){return this.querySelector('[slot="price"]')}selectMerchOffer(r){if(r===this.merchOffer)return;this.merchOffer=r;let n=this.dynamicPrice;if(r.price&&n){let i=r.price.cloneNode(!0);n.onceSettled?n.onceSettled().then(()=>{n.replaceWith(i)}):n.replaceWith(i)}}};Zt=new WeakSet,zi=function(r){this.dispatchEvent(new CustomEvent(Nn,{detail:r,bubbles:!0,composed:!0}))},p(qt,"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,i,o]=r.split(",");return{PUF:n,ABM:i,M2M:o}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(n=>{let[i,o,a]=n.split(":"),s=Number(o);return[i,{order:isNaN(s)?void 0:s,size:a}]})),toAttribute:r=>Object.entries(r).map(([n,{order:i,size:o}])=>[n,i,o].filter(a=>a!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:Fr,reflect:!0}}),p(qt,"styles",[Vo,Wo(),...Mo()]);customElements.define(dh,qt);var Tt=class extends ee{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?x` ${this.alt} `:x` ${this.alt}`}};p(Tt,"properties",{size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}}),p(Tt,"styles",P` :host { diff --git a/libs/deps/mas/merch-card.js b/libs/deps/mas/merch-card.js index 6133b300f4..3a766fc0a7 100644 --- a/libs/deps/mas/merch-card.js +++ b/libs/deps/mas/merch-card.js @@ -1,6 +1,6 @@ -var po=Object.defineProperty;var hr=e=>{throw TypeError(e)};var fo=(e,t,r)=>t in e?po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var f=(e,t,r)=>fo(e,typeof t!="symbol"?t+"":t,r),pt=(e,t,r)=>t.has(e)||hr("Cannot "+r);var X=(e,t,r)=>(pt(e,t,"read from private field"),r?r.call(e):t.get(e)),ie=(e,t,r)=>t.has(e)?hr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ue=(e,t,r,n)=>(pt(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ft=(e,t,r)=>(pt(e,t,"access private method"),r);import{LitElement as Pa}from"../lit-all.min.js";import{LitElement as go,html as lr,css as xo}from"../lit-all.min.js";var d=class extends go{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?lr` +var po=Object.defineProperty;var lr=e=>{throw TypeError(e)};var fo=(e,t,r)=>t in e?po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var f=(e,t,r)=>fo(e,typeof t!="symbol"?t+"":t,r),pt=(e,t,r)=>t.has(e)||lr("Cannot "+r);var X=(e,t,r)=>(pt(e,t,"read from private field"),r?r.call(e):t.get(e)),ie=(e,t,r)=>t.has(e)?lr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ue=(e,t,r,n)=>(pt(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ft=(e,t,r)=>(pt(e,t,"access private method"),r);import{LitElement as Pa}from"../lit-all.min.js";import{LitElement as go,html as hr,css as xo}from"../lit-all.min.js";var d=class extends go{constructor(){super(),this.size="m",this.alt=""}render(){let{href:t}=this;return t?hr` ${this.alt} - `:lr` ${this.alt}`}};f(d,"properties",{size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}}),f(d,"styles",xo` + `:hr` ${this.alt}`}};f(d,"properties",{size:{type:String,attribute:!0},src:{type:String,attribute:!0},alt:{type:String,attribute:!0},href:{type:String,attribute:!0}}),f(d,"styles",xo` :host { --img-width: 32px; --img-height: 32px; @@ -280,7 +280,7 @@ var po=Object.defineProperty;var hr=e=>{throw TypeError(e)};var fo=(e,t,r)=>t in ${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 t=this.card.secureLabel?ze`${this.card.secureLabel}`:"";return ze`
${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(){}};ae=new WeakMap,f(Ee,"styleMap",{});var A=Ee;import{html as yt,css as bo}from"../lit-all.min.js";function z(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 Fe(){return window.matchMedia("(max-width: 767px)").matches}function fr(){return window.matchMedia("(max-width: 1024px)").matches}var gt="wcms:commerce:ready";var gr="merch-offer-select:ready",xr="merch-card:ready",br="merch-card:action-menu-toggle";var xt="merch-storage:change",bt="merch-quantity-selector:change";var $e="aem:load",Ve="aem:error",vr="mas:ready",yr="mas:error",Er="placeholder-failed",wr="placeholder-pending",Sr="placeholder-resolved";var Ar="mas:failed",Tr="mas:pending",_r="mas:resolved",Lr="mas/commerce";var j="failed",Y="pending",W="resolved",vt={DRAFT:"DRAFT",PUBLISHED:"PUBLISHED"};var Cr=` + >`:"";return ze`
${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(){}};ae=new WeakMap,f(Ee,"styleMap",{});var A=Ee;import{html as yt,css as bo}from"../lit-all.min.js";function z(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 Fe(){return window.matchMedia("(max-width: 767px)").matches}function fr(){return window.matchMedia("(max-width: 1024px)").matches}var gt="wcms:commerce:ready";var gr="merch-offer-select:ready",xr="merch-card:ready",br="merch-card:action-menu-toggle";var xt="merch-storage:change",bt="merch-quantity-selector:change";var $e="aem:load",Ve="aem:error",vr="mas:ready",yr="mas:error",Er="placeholder-failed",Sr="placeholder-pending",wr="placeholder-resolved";var Ar="mas:failed",Tr="mas:pending",_r="mas:resolved",Lr="mas/commerce";var j="failed",Y="pending",W="resolved",vt={DRAFT:"DRAFT",PUBLISHED:"PUBLISHED"};var Cr=` :root { --consonant-merch-card-catalog-width: 276px; --consonant-merch-card-catalog-icon-size: 40px; @@ -414,7 +414,7 @@ merch-card[variant="catalog"] .payment-details { margin-left: var(--consonant-merch-spacing-xxs); box-sizing: border-box; } - `);import{html as we}from"../lit-all.min.js";var Pr=` + `);import{html as Se}from"../lit-all.min.js";var Pr=` :root { --consonant-merch-card-image-width: 300px; } @@ -450,21 +450,21 @@ merch-card[variant="catalog"] .payment-details { grid-template-columns: repeat(4, var(--consonant-merch-card-image-width)); } } -`;var je=class extends A{constructor(t){super(t)}getGlobalCSS(){return Pr}renderLayout(){return we`${this.cardImage} +`;var je=class extends A{constructor(t){super(t)}getGlobalCSS(){return Pr}renderLayout(){return Se`${this.cardImage}
- ${this.promoBottom?we``:we``} + ${this.promoBottom?Se``:Se``}
- ${this.evergreen?we` + ${this.evergreen?Se`
- `:we` + `:Se`
${this.secureLabelFooter} `}`}};import{html as Rr}from"../lit-all.min.js";var Nr=` @@ -851,7 +851,7 @@ merch-card .footer-row-cell:nth-child(8) { --consonant-merch-card-mini-compare-chart-callout-content-height ); } - `);import{html as qe,css as wo}from"../lit-all.min.js";var Mr=` + `);import{html as qe,css as So}from"../lit-all.min.js";var Mr=` :root { --consonant-merch-card-plans-width: 300px; --consonant-merch-card-plans-icon-size: 40px; @@ -905,7 +905,7 @@ merch-card[variant="plans"] [slot="quantity-select"] { grid-template-columns: repeat(4, var(--consonant-merch-card-plans-width)); } } -`;var he=class extends A{constructor(t){super(t)}getGlobalCSS(){return Mr}postCardUpdateHook(){this.adjustTitleWidth()}get stockCheckbox(){return this.card.checkboxLabel?qe`