From 5ef6ad54029091a5104cffb957d53256bb5ebcaf Mon Sep 17 00:00:00 2001 From: Bozo Jovicic Date: Thu, 18 Dec 2025 10:36:03 +0100 Subject: [PATCH 1/3] MWPW-185302 Make prices tax exclusive for all segments in africa --- web-components/dist/commerce.js | 2 +- web-components/dist/mas.js | 2 +- web-components/src/inline-price.js | 6 +++--- web-components/test/price.test.js | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web-components/dist/commerce.js b/web-components/dist/commerce.js index 350c1bea7..50a58fb34 100644 --- a/web-components/dist/commerce.js +++ b/web-components/dist/commerce.js @@ -504,4 +504,4 @@ window.masPriceLiterals = { var Or=Object.defineProperty;var Ir=e=>{throw TypeError(e)};var Di=(e,t,r)=>t in e?Or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ui=(e,t)=>{for(var r in t)Or(e,r,{get:t[r],enumerable:!0})};var b=(e,t,r)=>Di(e,typeof t!="symbol"?t+"":t,r),_t=(e,t,r)=>t.has(e)||Ir("Cannot "+r);var z=(e,t,r)=>(_t(e,t,"read from private field"),r?r.call(e):t.get(e)),ie=(e,t,r)=>t.has(e)?Ir("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),oe=(e,t,r,n)=>(_t(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Mr=(e,t,r)=>(_t(e,t,"access private method"),r);var Ft={};Ui(Ft,{CLASS_NAME_FAILED:()=>St,CLASS_NAME_HIDDEN:()=>ki,CLASS_NAME_PENDING:()=>Pt,CLASS_NAME_RESOLVED:()=>vt,CheckoutWorkflow:()=>Br,CheckoutWorkflowStep:()=>G,Commitment:()=>ue,ERROR_MESSAGE_BAD_REQUEST:()=>Ct,ERROR_MESSAGE_MISSING_LITERALS_URL:()=>ao,ERROR_MESSAGE_OFFER_NOT_FOUND:()=>Lt,EVENT_AEM_ERROR:()=>io,EVENT_AEM_LOAD:()=>no,EVENT_MAS_ERROR:()=>so,EVENT_MAS_READY:()=>oo,EVENT_MERCH_ADDON_AND_QUANTITY_UPDATE:()=>zi,EVENT_MERCH_CARD_ACTION_MENU_TOGGLE:()=>Yi,EVENT_MERCH_CARD_COLLECTION_LITERALS_CHANGED:()=>Ji,EVENT_MERCH_CARD_COLLECTION_SHOWMORE:()=>to,EVENT_MERCH_CARD_COLLECTION_SIDENAV_ATTACHED:()=>eo,EVENT_MERCH_CARD_COLLECTION_SORT:()=>Qi,EVENT_MERCH_CARD_QUANTITY_CHANGE:()=>Ki,EVENT_MERCH_OFFER_READY:()=>Vi,EVENT_MERCH_OFFER_SELECT_READY:()=>$i,EVENT_MERCH_QUANTITY_SELECTOR_CHANGE:()=>qi,EVENT_MERCH_SEARCH_CHANGE:()=>Zi,EVENT_MERCH_SIDENAV_SELECT:()=>ro,EVENT_MERCH_STOCK_CHANGE:()=>ji,EVENT_MERCH_STORAGE_CHANGE:()=>Xi,EVENT_OFFER_SELECTED:()=>Wi,EVENT_TYPE_FAILED:()=>Rt,EVENT_TYPE_READY:()=>qe,EVENT_TYPE_RESOLVED:()=>wt,Env:()=>Z,FF_DEFAULTS:()=>J,HEADER_X_REQUEST_ID:()=>Re,LOG_NAMESPACE:()=>Nt,Landscape:()=>ae,MARK_DURATION_SUFFIX:()=>kt,MARK_START_SUFFIX:()=>Bt,MODAL_TYPE_3_IN_1:()=>he,NAMESPACE:()=>Bi,PARAM_AOS_API_KEY:()=>co,PARAM_ENV:()=>It,PARAM_LANDSCAPE:()=>Mt,PARAM_MAS_PREVIEW:()=>Ot,PARAM_WCS_API_KEY:()=>lo,PROVIDER_ENVIRONMENT:()=>Ut,SELECTOR_MAS_CHECKOUT_LINK:()=>Dr,SELECTOR_MAS_ELEMENT:()=>bt,SELECTOR_MAS_INLINE_PRICE:()=>Hr,SELECTOR_MAS_SP_BUTTON:()=>Fi,SELECTOR_MAS_UPT_LINK:()=>Ur,SORT_ORDER:()=>mo,STATE_FAILED:()=>q,STATE_PENDING:()=>se,STATE_RESOLVED:()=>Q,SUPPORTED_COUNTRIES:()=>Gt,TAG_NAME_SERVICE:()=>Gi,TEMPLATE_PRICE:()=>uo,TEMPLATE_PRICE_ANNUAL:()=>fo,TEMPLATE_PRICE_LEGAL:()=>po,TEMPLATE_PRICE_STRIKETHROUGH:()=>ho,Term:()=>j,WCS_PROD_URL:()=>Ht,WCS_STAGE_URL:()=>Dt});var ue=Object.freeze({MONTH:"MONTH",YEAR:"YEAR",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",PERPETUAL:"PERPETUAL",TERM_LICENSE:"TERM_LICENSE",ACCESS_PASS:"ACCESS_PASS",THREE_MONTHS:"THREE_MONTHS",SIX_MONTHS:"SIX_MONTHS"}),j=Object.freeze({ANNUAL:"ANNUAL",MONTHLY:"MONTHLY",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",P1D:"P1D",P1Y:"P1Y",P3Y:"P3Y",P10Y:"P10Y",P15Y:"P15Y",P3D:"P3D",P7D:"P7D",P30D:"P30D",HALF_YEARLY:"HALF_YEARLY",QUARTERLY:"QUARTERLY"}),Bi="merch",ki="hidden",qe="wcms:commerce:ready",Gi="mas-commerce-service",Hr='span[is="inline-price"][data-wcs-osi]',Dr='a[is="checkout-link"][data-wcs-osi],button[is="checkout-button"][data-wcs-osi]',Fi="sp-button[data-wcs-osi]",Ur='a[is="upt-link"]',bt=`${Hr},${Dr},${Ur}`,Vi="merch-offer:ready",$i="merch-offer-select:ready",Yi="merch-card:action-menu-toggle",Wi="merch-offer:selected",ji="merch-stock:change",Xi="merch-storage:change",qi="merch-quantity-selector:change",Ki="merch-card-quantity:change",zi="merch-modal:addon-and-quantity-update",Zi="merch-search:change",Qi="merch-card-collection:sort",Ji="merch-card-collection:literals-changed",eo="merch-card-collection:sidenav-attached",to="merch-card-collection:showmore",ro="merch-sidenav:select",no="aem:load",io="aem:error",oo="mas:ready",so="mas:error",St="placeholder-failed",Pt="placeholder-pending",vt="placeholder-resolved",Ct="Bad WCS request",Lt="Commerce offer not found",ao="Literals URL not provided",Rt="mas:failed",wt="mas:resolved",Nt="mas/commerce",Ot="mas.preview",It="commerce.env",Mt="commerce.landscape",co="commerce.aosKey",lo="commerce.wcsKey",Ht="https://www.adobe.com/web_commerce_artifact",Dt="https://www.stage.adobe.com/web_commerce_artifact_stage",q="failed",se="pending",Q="resolved",ae={DRAFT:"DRAFT",PUBLISHED:"PUBLISHED"},Re="X-Request-Id",G=Object.freeze({SEGMENTATION:"segmentation",BUNDLE:"bundle",COMMITMENT:"commitment",RECOMMENDATION:"recommendation",EMAIL:"email",PAYMENT:"payment",CHANGE_PLAN_TEAM_PLANS:"change-plan/team-upgrade/plans",CHANGE_PLAN_TEAM_PAYMENT:"change-plan/team-upgrade/payment"}),Br="UCv3",Z=Object.freeze({STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"}),Ut={PRODUCTION:"PRODUCTION"},he={TWP:"twp",D2P:"d2p",CRM:"crm"},Bt=":start",kt=":duration",uo="price",ho="price-strikethrough",fo="annual",po="legal",J="mas-ff-defaults",mo={alphabetical:"alphabetical",authored:"authored"},Gt=["AE","AM","AR","AT","AU","AZ","BB","BD","BE","BG","BH","BO","BR","BS","BY","CA","CH","CL","CN","CO","CR","CY","CZ","DE","DK","DO","DZ","EC","EE","EG","ES","FI","FR","GB","GE","GH","GR","GT","HK","HN","HR","HU","ID","IE","IL","IN","IQ","IS","IT","JM","JO","JP","KE","KG","KR","KW","KZ","LA","LB","LK","LT","LU","LV","MA","MD","MO","MT","MU","MX","MY","NG","NI","NL","NO","NP","NZ","OM","PA","PE","PH","PK","PL","PR","PT","PY","QA","RO","RS","RU","SA","SE","SG","SI","SK","SV","TH","TJ","TM","TN","TR","TT","TW","TZ","UA","US","UY","UZ","VE","VN","YE","ZA"];var kr="tacocat.js";var Vt=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),Gr=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function w(e,t={},{metadata:r=!0,search:n=!0,storage:i=!0}={}){let o;if(n&&o==null){let s=new URLSearchParams(window.location.search),a=ye(n)?n:e;o=s.get(a)}if(i&&o==null){let s=ye(i)?i:e;o=window.sessionStorage.getItem(s)??window.localStorage.getItem(s)}if(r&&o==null){let s=go(ye(r)?r:e);o=document.documentElement.querySelector(`meta[name="${s}"]`)?.content}return o??t[e]}var Eo=e=>typeof e=="boolean",Ke=e=>typeof e=="function",ze=e=>typeof e=="number",Fr=e=>e!=null&&typeof e=="object";var ye=e=>typeof e=="string",Vr=e=>ye(e)&&e,we=e=>ze(e)&&Number.isFinite(e)&&e>0;function Ze(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,n])=>{t(n)&&delete e[r]}),e}function A(e,t){if(Eo(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Ne(e,t,r){let n=Object.values(t);return n.find(i=>Vt(i,e))??r??n[0]}function go(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function $r(e,t=1){return ze(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var xo=Date.now(),$t=()=>`(+${Date.now()-xo}ms)`,Qe=new Set,Ao=A(w("tacocat.debug",{},{metadata:!1}),!1);function Yr(e){let t=`[${kr}/${e}]`,r=(s,a,...c)=>s?!0:(i(a,...c),!1),n=Ao?(s,...a)=>{console.debug(`${t} ${s}`,...a,$t())}:()=>{},i=(s,...a)=>{let c=`${t} ${s}`;Qe.forEach(([u])=>u(c,...a))};return{assert:r,debug:n,error:i,warn:(s,...a)=>{let c=`${t} ${s}`;Qe.forEach(([,u])=>u(c,...a))}}}function To(e,t){let r=[e,t];return Qe.add(r),()=>{Qe.delete(r)}}To((e,...t)=>{console.error(e,...t,$t())},(e,...t)=>{console.warn(e,...t,$t())});var yo="no promo",Wr="promo-tag",_o="yellow",bo="neutral",So=(e,t,r)=>{let n=o=>o||yo,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},Po="cancel-context",Je=(e,t)=>{let r=e===Po,n=!r&&e?.length>0,i=(n||r)&&(t&&t!=e||!t&&!r),o=i&&n||!i&&!!t,s=o?e||t:void 0;return{effectivePromoCode:s,overridenPromoCode:e,className:o?Wr:`${Wr} no-promo`,text:So(s,t,i),variant:o?_o:bo,isOverriden:i}};var Yt;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Yt||(Yt={}));var $;(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"})($||($={}));var X;(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"})(X||(X={}));var Wt;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(Wt||(Wt={}));var jt;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(jt||(jt={}));var Xt;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(Xt||(Xt={}));var qt;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(qt||(qt={}));var Kt="ABM",zt="PUF",Zt="M2M",Qt="PERPETUAL",Jt="P3Y",vo="TAX_INCLUSIVE_DETAILS",Co="TAX_EXCLUSIVE",jr={ABM:Kt,PUF:zt,M2M:Zt,PERPETUAL:Qt,P3Y:Jt},da={[Kt]:{commitment:$.YEAR,term:X.MONTHLY},[zt]:{commitment:$.YEAR,term:X.ANNUAL},[Zt]:{commitment:$.MONTH,term:X.MONTHLY},[Qt]:{commitment:$.PERPETUAL,term:void 0},[Jt]:{commitment:$.THREE_MONTHS,term:X.P3Y}},Xr="Value is not an offer",Oe=e=>{if(typeof e!="object")return Xr;let{commitment:t,term:r}=e,n=Lo(t,r);return{...e,planType:n}};var Lo=(e,t)=>{switch(e){case void 0:return Xr;case"":return"";case $.YEAR:return t===X.MONTHLY?Kt:t===X.ANNUAL?zt:"";case $.MONTH:return t===X.MONTHLY?Zt:"";case $.PERPETUAL:return Qt;case $.TERM_LICENSE:return t===X.P3Y?Jt:"";default:return""}};function qr(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:s}=t;if(s!==vo)return e;let a={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:Co}};return a.offerType==="TRIAL"&&a.priceDetails.price===0&&(a.priceDetails.price=a.priceDetails.priceWithoutDiscount),a}var Ro="mas-commerce-service",wo={requestId:Re,etag:"Etag",lastModified:"Last-Modified",serverTiming:"server-timing"};function Ie(e,{country:t,forceTaxExclusive:r}){let n;if(e.length<2)n=e;else{let i=t==="GB"?"EN":"MULT";e.sort((o,s)=>o.language===i?-1:s.language===i?1:0),e.sort((o,s)=>!o.term&&s.term?-1:o.term&&!s.term?1:0),n=[e[0]]}return r&&(n=n.map(qr)),n}var et=e=>window.setTimeout(e);function _e(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map($r).filter(we);return r.length||(r=[t]),r}function tt(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(Vr)}function V(){return document.getElementsByTagName(Ro)?.[0]}function Kr(e){let t={};if(!e?.headers)return t;let r=e.headers;for(let[n,i]of Object.entries(wo)){let o=r.get(i);o&&(o=o.replace(/[,;]/g,"|"),o=o.replace(/[| ]+/g,"|"),t[n]=o)}return t}var fe={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals","element"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},zr=1e3;function No(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function Zr(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(!fe.serializableTypes.includes(r))return r}return e}function Oo(e,t){if(!fe.ignoredProperties.includes(e))return Zr(t)}var er={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,n=[],i=[],o=t;r.forEach(u=>{u!=null&&(No(u)?n:i).push(u)}),n.length&&(o+=" "+n.map(Zr).join(" "));let{pathname:s,search:a}=window.location,c=`${fe.delimiter}page=${s}${a}`;c.length>zr&&(c=`${c.slice(0,zr)}`),o+=c,i.length&&(o+=`${fe.delimiter}facts=`,o+=JSON.stringify(i,Oo)),window.lana?.log(o,fe)}};function rt(e){Object.assign(fe,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in fe&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var Qr={LOCAL:"local",PROD:"prod",STAGE:"stage"},tr={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},rr=new Set,nr=new Set,Jr=new Map,en={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},tn={filter:({level:e})=>e!==tr.DEBUG},Io={filter:()=>!1};function Mo(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){return n.length===1&&Ke(n[0])&&(n=n[0](),Array.isArray(n)||(n=[n])),n},source:i,timestamp:performance.now().toFixed(3)}}function Ho(e){[...nr].every(t=>t(e))&&rr.forEach(t=>t(e))}function rn(e){let t=(Jr.get(e)??0)+1;Jr.set(e,t);let r=`${e} #${t}`,n={id:r,namespace:e,module:i=>rn(`${n.namespace}/${i}`),updateConfig:rt};return Object.values(tr).forEach(i=>{n[i]=(o,...s)=>Ho(Mo(i,o,e,s,r))}),Object.seal(n)}function nt(...e){e.forEach(t=>{let{append:r,filter:n}=t;Ke(n)&&nr.add(n),Ke(r)&&rr.add(r)})}function Do(e={}){let{name:t}=e,r=A(w("commerce.debug",{search:!0,storage:!0}),t===Qr.LOCAL);return nt(r?en:tn),t===Qr.PROD&&nt(er),Y}function Uo(){rr.clear(),nr.clear()}var Y={...rn(Nt),Level:tr,Plugins:{consoleAppender:en,debugFilter:tn,quietFilter:Io,lanaAppender:er},init:Do,reset:Uo,use:nt};var be=class e extends Error{constructor(t,r,n){if(super(t,{cause:n}),this.name="MasError",r.response){let i=r.response.headers?.get(Re);i&&(r.requestId=i),r.response.status&&(r.status=r.response.status,r.statusText=r.response.statusText),r.response.url&&(r.url=r.response.url)}delete r.response,this.context=r,Error.captureStackTrace&&Error.captureStackTrace(this,e)}toString(){let t=Object.entries(this.context||{}).map(([n,i])=>`${n}: ${JSON.stringify(i)}`).join(", "),r=`${this.name}: ${this.message}`;return t&&(r+=` (${t})`),this.cause&&(r+=` Caused by: ${this.cause}`),r}};var Bo={[q]:St,[se]:Pt,[Q]:vt},ko={[q]:Rt,[Q]:wt},Me,ce=class{constructor(t){ie(this,Me);b(this,"changes",new Map);b(this,"connected",!1);b(this,"error");b(this,"log");b(this,"options");b(this,"promises",[]);b(this,"state",se);b(this,"timer",null);b(this,"value");b(this,"version",0);b(this,"wrapperElement");this.wrapperElement=t,this.log=Y.module("mas-element")}update(){[q,se,Q].forEach(t=>{this.wrapperElement.classList.toggle(Bo[t],t===this.state)})}notify(){(this.state===Q||this.state===q)&&(this.state===Q?this.promises.forEach(({resolve:r})=>r(this.wrapperElement)):this.state===q&&this.promises.forEach(({reject:r})=>r(this.error)),this.promises=[]);let t=this.error;this.error instanceof be&&(t={message:this.error.message,...this.error.context}),this.wrapperElement.dispatchEvent(new CustomEvent(ko[this.state],{bubbles:!0,detail:t}))}attributeChangedCallback(t,r,n){this.changes.set(t,n),this.requestUpdate()}connectedCallback(){oe(this,Me,V()),this.requestUpdate(!0)}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement}))}onceSettled(){let{error:t,promises:r,state:n}=this;return Q===n?Promise.resolve(this.wrapperElement):q===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=Q,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),et(()=>this.notify()),!0)}toggleFailed(t,r,n){if(t!==this.version)return!1;n!==void 0&&(this.options=n),this.error=r,this.state=q,this.update();let i=this.wrapperElement.getAttribute("is");return this.log?.error(`${i}: Failed to render: ${r.message}`,{element:this.wrapperElement,...r.context,...z(this,Me)?.duration}),et(()=>this.notify()),!0}togglePending(t){return this.version++,t&&(this.options=t),this.state=se,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!V()||this.timer)return;let{error:r,options:n,state:i,value:o,version:s}=this;this.state=se,this.timer=et(async()=>{this.timer=null;let a=null;if(this.changes.size&&(a=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:a}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:a})),a||t)try{await this.wrapperElement.render?.()===!1&&this.state===se&&this.version===s&&(this.state=i,this.error=r,this.value=o,this.update(),this.notify())}catch(c){this.toggleFailed(this.version,c,n)}})}};Me=new WeakMap;function nn(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function it(e,t={}){let{tag:r,is:n}=e,i=document.createElement(r,{is:n});return i.setAttribute("is",n),Object.assign(i.dataset,nn(t)),i}function on(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,nn(t)),e):null}var Go=/[0-9\-+#]/,Fo=/[^\d\-+#]/g;function sn(e){return e.search(Go)}function Vo(e="#.##"){let t={},r=e.length,n=sn(e);t.prefix=n>0?e.substring(0,n):"";let i=sn(e.split("").reverse().join("")),o=r-i,s=e.substring(o,o+1),a=o+(s==="."||s===","?1:0);t.suffix=i>0?e.substring(a,r):"",t.mask=e.substring(n,a),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(Fo);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 $o(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"),[s="0",a=""]=i.value.split(".");return(!a||a&&a.length<=o)&&(a=o<0?"":(+("0."+a)).toFixed(o+1).replace("0.","")),i.integer=s,i.fraction=a,Yo(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 Yo(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.lengthe*12,me=(e,t,r=1)=>{if(!e)return!1;let{start:n,end:i,displaySummary:{amount:o,duration:s,minProductQuantity:a=1,outcomeType:c}={}}=e;if(!(o&&s&&c)||r=l&&u<=p},pe={MONTH:"MONTH",YEAR:"YEAR"},Xo={[j.ANNUAL]:12,[j.MONTHLY]:1,[j.THREE_YEARS]:36,[j.TWO_YEARS]:24},or=(e,t)=>({accept:e,round:t}),qo=[or(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),or(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),or(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],sr={[ue.YEAR]:{[j.MONTHLY]:pe.MONTH,[j.ANNUAL]:pe.YEAR},[ue.MONTH]:{[j.MONTHLY]:pe.MONTH}},Ko=(e,t)=>e.indexOf(`'${t}'`)===0,zo=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=pn(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Qo(e)),r},Zo=e=>{let t=Jo(e),r=Ko(e,t),n=e.replace(/'.*?'/,""),i=un.test(n)||hn.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},fn=e=>e.replace(un,ln).replace(hn,ln),Qo=e=>e.match(/#(.?)#/)?.[1]===cn?jo:cn,Jo=e=>e.match(/'(.*?)'/)?.[1]??"",pn=e=>e.match(/0(.?)0/)?.[1]??"";function Se({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=s=>s){let{currencySymbol:s,isCurrencyFirst:a,hasCurrencySpace:c}=Zo(e),u=r?pn(e):"",l=zo(e,r),p=r?2:0,f=o(t,{currencySymbol:s}),h=n?f.toLocaleString("hi-IN",{minimumFractionDigits:p,maximumFractionDigits:p}):an(l,f),m=r?h.lastIndexOf(u):h.length,d=h.substring(0,m),g=h.substring(m+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,h).replace(/SYMBOL/,s),currencySymbol:s,decimals:g,decimalsDelimiter:u,hasCurrencySpace:c,integer:d,isCurrencyFirst:a,recurrenceTerm:i}}var mn=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=Xo[r]??1;return Se(e,i>1?pe.MONTH:sr[t]?.[r],o=>{let s={divisor:i,price:o,usePrecision:n},{round:a}=qo.find(({accept:c})=>c(s));if(!a)throw new Error(`Missing rounding rule for: ${JSON.stringify(s)}`);return a(s)})},dn=({commitment:e,term:t,...r})=>Se(r,sr[e]?.[t]),En=e=>{let{commitment:t,instant:r,price:n,originalPrice:i,priceWithoutDiscount:o,promotion:s,quantity:a=1,term:c}=e;if(t===ue.YEAR&&c===j.MONTHLY){if(!s)return Se(e,pe.YEAR,ir);let{displaySummary:{outcomeType:u,duration:l}={}}=s;switch(u){case"PERCENTAGE_DISCOUNT":if(me(s,r,a)){let p=parseInt(l.replace("P","").replace("M",""));if(isNaN(p))return ir(n);let f=i*p,h=o*(12-p),m=Math.round((f+h)*100)/100;return Se({...e,price:m},pe.YEAR)}default:return Se(e,pe.YEAR,()=>ir(o??n))}}return Se(e,sr[t]?.[c])};var gn="download",xn="upgrade",An={e:"EDU",t:"TEAM"};function ot(e,t={},r=""){let n=V();if(!n)return null;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:a,upgrade:c,modal:u,perpetual:l,promotionCode:p,quantity:f,wcsOsi:h,extraOptions:m,analyticsId:d}=n.collectCheckoutOptions(t),g=it(e,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:a,upgrade:c,modal:u,perpetual:l,promotionCode:p,quantity:f,wcsOsi:h,extraOptions:m,analyticsId:d});return r&&(g.innerHTML=`${r}`),g}function st(e){return class extends e{constructor(){super(...arguments);b(this,"checkoutActionHandler");b(this,"masElement",new ce(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}get marketSegment(){let n=this.options?.ms??this.value?.[0].marketSegments?.[0];return An[n]??n}get customerSegment(){let n=this.options?.cs??this.value?.[0]?.customerSegment;return An[n]??n}get is3in1Modal(){return Object.values(he).includes(this.getAttribute("data-modal"))}get isOpen3in1Modal(){let n=document.querySelector("meta[name=mas-ff-3in1]");return this.is3in1Modal&&(!n||n.content!=="off")}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={}){let i=V();if(!i)return!1;this.dataset.imsCountry||i.imsCountryPromise.then(h=>{h&&(this.dataset.imsCountry=h)}),n.imsCountry=null;let o=i.collectCheckoutOptions(n,this);if(!o.wcsOsi.length)return!1;let s;try{s=JSON.parse(o.extraOptions??"{}")}catch(h){this.masElement.log?.error("cannot parse exta checkout options",h)}let a=this.masElement.togglePending(o);this.setCheckoutUrl("");let c=i.resolveOfferSelectors(o),u=await Promise.all(c);u=u.map(h=>Ie(h,o));let l=u.flat().find(h=>h.promotion);!me(l?.promotion,l?.promotion?.displaySummary?.instant,o.quantity[0])&&o.promotionCode&&delete o.promotionCode,o.country=this.dataset.imsCountry||o.country;let f=await i.buildCheckoutAction?.(u.flat(),{...s,...o},this);return this.renderOffers(u.flat(),o,{},f,a)}renderOffers(n,i,o={},s=void 0,a=void 0){let c=V();if(!c)return!1;if(i={...JSON.parse(this.dataset.extraOptions??"{}"),...i,...o},a??(a=this.masElement.togglePending(i)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),s){this.classList.remove(gn,xn),this.masElement.toggleResolved(a,n,i);let{url:l,text:p,className:f,handler:h}=s;l&&this.setCheckoutUrl(l),p&&(this.firstElementChild.innerHTML=p),f&&this.classList.add(...f.split(" ")),h&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=h.bind(this))}if(n.length){if(this.masElement.toggleResolved(a,n,i)){if(!this.classList.contains(gn)&&!this.classList.contains(xn)){let l=c.buildCheckoutURL(n,i);this.setCheckoutUrl(i.modal==="true"?"#":l)}return!0}}else{let l=new Error(`Not provided: ${i?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(a,l,i))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(n){}updateOptions(n={}){let i=V();if(!i)return!1;let{checkoutMarketSegment:o,checkoutWorkflow:s,checkoutWorkflowStep:a,entitlement:c,upgrade:u,modal:l,perpetual:p,promotionCode:f,quantity:h,wcsOsi:m}=i.collectCheckoutOptions(n);return on(this,{checkoutMarketSegment:o,checkoutWorkflow:s,checkoutWorkflowStep:a,entitlement:c,upgrade:u,modal:l,perpetual:p,promotionCode:f,quantity:h,wcsOsi:m}),!0}}}var He=class He extends st(HTMLAnchorElement){static createCheckoutLink(t={},r=""){return ot(He,t,r)}setCheckoutUrl(t){this.setAttribute("href",t)}get isCheckoutLink(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}}};b(He,"is","checkout-link"),b(He,"tag","a");var ee=He;window.customElements.get(ee.is)||window.customElements.define(ee.is,ee,{extends:ee.tag});var es="p_draft_landscape",ts="/store/",rs=new Map([["countrySpecific","cs"],["customerSegment","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["addonProductArrangementCode","ao"],["offerType","ot"],["marketSegment","ms"]]),ar=new Set(["af","ai","ao","apc","appctxid","cli","co","cs","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"]),ns=["env","workflowStep","clientId","country"],Tn=new Set(["gid","gtoken","notifauditid","cohortid","productname","sdid","attimer","gcsrc","gcprog","gcprogcat","gcpagetype"]),yn=e=>rs.get(e)??e;function at(e,t,r){for(let[n,i]of Object.entries(e)){let o=yn(n);i!=null&&r.has(o)&&t.set(o,i)}}function is(e){switch(e){case Ut.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function os(e,t){for(let r in e){let n=e[r];for(let[i,o]of Object.entries(n)){if(o==null)continue;let s=yn(i);t.set(`items[${r}][${s}]`,o)}}}function ss({url:e,modal:t,is3in1:r}){if(!r||!e?.searchParams)return e;e.searchParams.set("rtc","t"),e.searchParams.set("lo","sl");let n=e.searchParams.get("af");return e.searchParams.set("af",[n,"uc_new_user_iframe","uc_new_system_close"].filter(Boolean).join(",")),e.searchParams.get("cli")!=="doc_cloud"&&e.searchParams.set("cli",t===he.CRM?"creative":"mini_plans"),e}function as(e){let t=new URLSearchParams(window.location.search),r={};Tn.forEach(n=>{let i=t.get(n);i!==null&&(r[n]=i)}),Object.keys(r).length>0&&at(r,e.searchParams,Tn)}function _n(e){cs(e);let{env:t,items:r,workflowStep:n,marketSegment:i,customerSegment:o,offerType:s,productArrangementCode:a,landscape:c,modal:u,is3in1:l,preselectPlan:p,...f}=e,h=new URL(is(t));if(h.pathname=`${ts}${n}`,n!==G.SEGMENTATION&&n!==G.CHANGE_PLAN_TEAM_PLANS&&os(r,h.searchParams),at({...f},h.searchParams,ar),as(h),c===ae.DRAFT&&at({af:es},h.searchParams,ar),n===G.SEGMENTATION){let m={marketSegment:i,offerType:s,customerSegment:o,productArrangementCode:a,quantity:r?.[0]?.quantity,addonProductArrangementCode:a?r?.find(d=>d.productArrangementCode!==a)?.productArrangementCode:r?.[1]?.productArrangementCode};p?.toLowerCase()==="edu"?h.searchParams.set("ms","EDU"):p?.toLowerCase()==="team"&&h.searchParams.set("cs","TEAM"),at(m,h.searchParams,ar),h.searchParams.get("ot")==="PROMOTION"&&h.searchParams.delete("ot"),h=ss({url:h,modal:u,is3in1:l})}return h.toString()}function cs(e){for(let t of ns)if(!e[t])throw new Error(`Argument "checkoutData" is not valid, missing: ${t}`);if(e.workflowStep!==G.SEGMENTATION&&e.workflowStep!==G.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}var _=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflowStep:G.EMAIL,country:"US",displayOldPrice:!1,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,displayPlanType:!1,env:Z.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,alternativePrice:!1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:ae.PUBLISHED});function bn({settings:e,providers:t}){function r(o,s){let{checkoutClientId:a,checkoutWorkflowStep:c,country:u,language:l,promotionCode:p,quantity:f,preselectPlan:h,env:m}=e,d={checkoutClientId:a,checkoutWorkflowStep:c,country:u,language:l,promotionCode:p,quantity:f,preselectPlan:h,env:m};if(s)for(let ne of t.checkout)ne(s,d);let{checkoutMarketSegment:g,checkoutWorkflowStep:P=c,imsCountry:S,country:E=S??u,language:v=l,quantity:O=f,entitlement:R,upgrade:H,modal:U,perpetual:F,promotionCode:D=p,wcsOsi:I,extraOptions:C,...W}=Object.assign(d,s?.dataset??{},o??{}),K=Ne(P,G,_.checkoutWorkflowStep);return d=Ze({...W,extraOptions:C,checkoutClientId:a,checkoutMarketSegment:g,country:E,quantity:_e(O,_.quantity),checkoutWorkflowStep:K,language:v,entitlement:A(R),upgrade:A(H),modal:U,perpetual:A(F),promotionCode:Je(D).effectivePromoCode,wcsOsi:tt(I),preselectPlan:h}),d}function n(o,s){if(!Array.isArray(o)||!o.length||!s)return"";let{env:a,landscape:c}=e,{checkoutClientId:u,checkoutMarketSegment:l,checkoutWorkflowStep:p,country:f,promotionCode:h,quantity:m,preselectPlan:d,ms:g,cs:P,...S}=r(s),E=document.querySelector("meta[name=mas-ff-3in1]"),v=Object.values(he).includes(s.modal)&&(!E||E.content!=="off"),O=window.frameElement||v?"if":"fp",[{productArrangementCode:R,marketSegments:[H],customerSegment:U,offerType:F}]=o,D=g??H??l,I=P??U;d?.toLowerCase()==="edu"?D="EDU":d?.toLowerCase()==="team"&&(I="TEAM");let C={is3in1:v,checkoutPromoCode:h,clientId:u,context:O,country:f,env:a,items:[],marketSegment:D,customerSegment:I,offerType:F,productArrangementCode:R,workflowStep:p,landscape:c,...S},W=m[0]>1?m[0]:void 0;if(o.length===1){let{offerId:K}=o[0];C.items.push({id:K,quantity:W})}else C.items.push(...o.map(({offerId:K,productArrangementCode:ne})=>({id:K,quantity:W,...v?{productArrangementCode:ne}:{}})));return _n(C)}let{createCheckoutLink:i}=ee;return{CheckoutLink:ee,CheckoutWorkflowStep:G,buildCheckoutURL:n,collectCheckoutOptions:r,createCheckoutLink:i}}function ls({interval:e=200,maxAttempts:t=25}={}){let r=Y.module("ims");return new Promise(n=>{r.debug("Waing for IMS to be ready");let i=0;function o(){window.adobeIMS?.initialized?n():++i>t?(r.debug("Timeout"),n()):setTimeout(o,e)}o()})}function us(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function hs(e){let t=Y.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:n})=>(t.debug("Got user country:",n),n),n=>{t.error("Unable to get user country:",n)}):null)}function Sn({}){let e=ls(),t=us(e),r=hs(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}var Pn=window.masPriceLiterals;function vn(e){if(Array.isArray(Pn)){let t=n=>Pn.find(i=>Vt(i.lang,n)),r=t(e.language)??t(_.language);if(r)return Object.freeze(r)}return{}}var cr=function(e,t){return cr=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])},cr(e,t)};function De(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");cr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var T=function(){return T=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(ms,function(c,u,l,p,f,h){if(u)t.minimumIntegerDigits=l.length;else{if(p&&f)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Dn.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Nn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Nn,function(c,u,l,p,f,h){return l==="*"?t.minimumFractionDigits=u.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:f&&h?(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length+h.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var o=i.options[0];o==="w"?t=T(T({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=T(T({},t),On(o)));continue}if(Hn.test(i.stem)){t=T(T({},t),On(i.stem));continue}var s=Un(i.stem);s&&(t=T(T({},t),s));var a=ds(i.stem);a&&(t=T(T({},t),a))}return t}var Be={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 kn(e,t){for(var r="",n=0;n>1),c="a",u=Es(t);for((u=="H"||u=="k")&&(a=0);a-- >0;)r+=c;for(;s-- >0;)r=u+r}else i==="J"?r+="H":r+=i}return r}function Es(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=Be[n||""]||Be[r||""]||Be["".concat(r,"-001")]||Be["001"];return i[0]}var hr,gs=new RegExp("^".concat(ur.source,"*")),xs=new RegExp("".concat(ur.source,"*$"));function y(e,t){return{start:e,end:t}}var As=!!String.prototype.startsWith,Ts=!!String.fromCodePoint,ys=!!Object.fromEntries,_s=!!String.prototype.codePointAt,bs=!!String.prototype.trimStart,Ss=!!String.prototype.trimEnd,Ps=!!Number.isSafeInteger,vs=Ps?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},pr=!0;try{Gn=Yn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),pr=((hr=Gn.exec("a"))===null||hr===void 0?void 0:hr[0])==="a"}catch{pr=!1}var Gn,Fn=As?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},mr=Ts?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},Vn=ys?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}},Cs=bs?function(t){return t.trimStart()}:function(t){return t.replace(gs,"")},Ls=Ss?function(t){return t.trimEnd()}:function(t){return t.replace(xs,"")};function Yn(e,t){return new RegExp(e,t)}var dr;pr?(fr=Yn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),dr=function(t,r){var n;fr.lastIndex=r;var i=fr.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):dr=function(t,r){for(var n=[];;){var i=$n(t,r);if(i===void 0||jn(i)||Ns(i))break;n.push(i),r+=i>=65536?2:1}return mr.apply(void 0,n)};var fr,Wn=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 s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:L.pound,location:y(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(x.UNMATCHED_CLOSING_TAG,y(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Er(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.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:L.literal,value:"<".concat(i,"/>"),location:y(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:L.tag,value:i,children:s,location:y(n,this.clonePosition())},err:null}:this.error(x.INVALID_TAG,y(a,this.clonePosition())))}else return this.error(x.UNCLOSED_TAG,y(n,this.clonePosition()))}else return this.error(x.INVALID_TAG,y(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ws(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 s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=y(n,this.clonePosition());return{val:{type:L.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Rs(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 mr.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(),mr(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(x.EMPTY_ARGUMENT,y(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(x.MALFORMED_ARGUMENT,y(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:L.argument,value:i,location:y(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(x.MALFORMED_ARGUMENT,y(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=dr(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),s=y(t,o);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){case"":return this.error(x.EXPECT_ARGUMENT_TYPE,y(s,c));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var f=Ls(p.val);if(f.length===0)return this.error(x.EXPECT_ARGUMENT_STYLE,y(this.clonePosition(),this.clonePosition()));var h=y(l,this.clonePosition());u={style:f,styleLocation:h}}var m=this.tryParseArgumentClose(i);if(m.err)return m;var d=y(i,this.clonePosition());if(u&&Fn(u?.style,"::",0)){var g=Cs(u.style.slice(2));if(a==="number"){var p=this.parseNumberSkeletonFromString(g,u.styleLocation);return p.err?p:{val:{type:L.number,value:n,location:d,style:p.val},err:null}}else{if(g.length===0)return this.error(x.EXPECT_DATE_TIME_SKELETON,d);var P=g;this.locale&&(P=kn(g,this.locale));var f={type:de.dateTime,pattern:P,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Rn(P):{}},S=a==="date"?L.date:L.time;return{val:{type:S,value:n,location:d,style:f},err:null}}}return{val:{type:a==="number"?L.number:a==="date"?L.date:L.time,value:n,location:d,style:(o=u?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var E=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(x.EXPECT_SELECT_ARGUMENT_OPTIONS,y(E,T({},E)));this.bumpSpace();var v=this.parseIdentifierIfPossible(),O=0;if(a!=="select"&&v.value==="offset"){if(!this.bumpIf(":"))return this.error(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,y(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),v=this.parseIdentifierIfPossible(),O=p.val}var R=this.tryParsePluralOrSelectOptions(t,a,r,v);if(R.err)return R;var m=this.tryParseArgumentClose(i);if(m.err)return m;var H=y(i,this.clonePosition());return a==="select"?{val:{type:L.select,value:n,options:Vn(R.val),location:H},err:null}:{val:{type:L.plural,value:n,options:Vn(R.val),offset:O,pluralType:a==="plural"?"cardinal":"ordinal",location:H},err:null}}default:return this.error(x.INVALID_ARGUMENT_TYPE,y(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(x.EXPECT_ARGUMENT_CLOSING_BRACE,y(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(x.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,y(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=Mn(t)}catch{return this.error(x.INVALID_NUMBER_SKELETON,r)}return{val:{type:de.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?Bn(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,s=!1,a=[],c=new Set,u=i.value,l=i.location;;){if(u.length===0){var p=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(x.EXPECT_PLURAL_ARGUMENT_SELECTOR,x.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;l=y(p,this.clonePosition()),u=this.message.slice(p.offset,this.offset())}else break}if(c.has(u))return this.error(r==="select"?x.DUPLICATE_SELECT_ARGUMENT_SELECTOR:x.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);u==="other"&&(s=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:x.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,y(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(t+1,r,n);if(m.err)return m;var d=this.tryParseArgumentClose(h);if(d.err)return d;a.push([u,{value:m.val,location:y(h,this.clonePosition())}]),c.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,l=o.location}return a.length===0?this.error(r==="select"?x.EXPECT_SELECT_ARGUMENT_SELECTOR:x.EXPECT_PLURAL_ARGUMENT_SELECTOR,y(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(x.MISSING_OTHER_CLAUSE,y(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=y(i,this.clonePosition());return o?(s*=n,vs(s)?{val:s,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=$n(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(Fn(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()&&jn(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 Er(e){return e>=97&&e<=122||e>=65&&e<=90}function Rs(e){return Er(e)||e===47}function ws(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 jn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ns(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 gr(e){e.forEach(function(t){if(delete t.location,ft(t)||pt(t))for(var r in t.options)delete t.options[r].location,gr(t.options[r].value);else lt(t)&&dt(t.style)||(ut(t)||ht(t))&&Ue(t.style)?delete t.style.location:mt(t)&&gr(t.children)})}function Xn(e,t){t===void 0&&(t={}),t=T({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Wn(e,t).parse();if(r.err){var n=SyntaxError(x[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||gr(r.val),r.val}function ke(e,t){var r=t&&t.cache?t.cache:Us,n=t&&t.serializer?t.serializer:Ds,i=t&&t.strategy?t.strategy:Is;return i(e,{cache:r,serializer:n})}function Os(e){return e==null||typeof e=="number"||typeof e=="boolean"}function qn(e,t,r,n){var i=Os(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function Kn(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 xr(e,t,r,n,i){return r.bind(t,e,n,i)}function Is(e,t){var r=e.length===1?qn:Kn;return xr(e,this,r,t.cache.create(),t.serializer)}function Ms(e,t){return xr(e,this,Kn,t.cache.create(),t.serializer)}function Hs(e,t){return xr(e,this,qn,t.cache.create(),t.serializer)}var Ds=function(){return JSON.stringify(arguments)};function Ar(){this.cache=Object.create(null)}Ar.prototype.get=function(e){return this.cache[e]};Ar.prototype.set=function(e,t){this.cache[e]=t};var Us={create:function(){return new Ar}},Et={variadic:Ms,monadic:Hs};var Ee;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ee||(Ee={}));var Ge=function(e){De(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 Tr=function(e){De(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('", "'),'"'),Ee.INVALID_VALUE,o)||this}return t}(Ge);var zn=function(e){De(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Ee.INVALID_VALUE,i)||this}return t}(Ge);var Zn=function(e){De(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,'"'),Ee.MISSING_VALUE,n)||this}return t}(Ge);var B;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(B||(B={}));function Bs(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==B.literal||r.type!==B.literal?t.push(r):n.value+=r.value,t},[])}function ks(e){return typeof e=="function"}function Fe(e,t,r,n,i,o,s){if(e.length===1&&lr(e[0]))return[{type:B.literal,value:e[0].value}];for(var a=[],c=0,u=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Xn,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Jn=Qn;var _r={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",strikethroughAriaLabel:"Regularly at",planTypeLabel:"{planType, select, ABM {Annual, billed monthly} other {}}"},$s=Yr("ConsonantTemplates/price"),Ys=/<\/?[^>]+(>|$)/g,N={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAlternative:"price-alternative",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"},le={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel",alternativePriceAriaLabel:"alternativePriceAriaLabel"},br="TAX_EXCLUSIVE",Ws=e=>Fr(e)?Object.entries(e).filter(([,t])=>ye(t)||ze(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Gr(n)+'"'}`,""):"",M=(e,t,r,n=!1)=>`${n?fn(t):t??""}`;function js(e){e=e.replaceAll("","</a>");let t=/]+(>|$)/g;return e.match(t)?.forEach(n=>{let i=n.replace("",">");e=e.replaceAll(n,i)}),e}function Xs(e){e=e.replaceAll("</a>","");let t=/<a (?!>)(.*?)(>|$)/g;return e.match(t)?.forEach(n=>{let i=n.replace("<a ","");e=e.replaceAll(n,i)}),e}function te(e,t,r,n){let i=e[r];if(i==null)return"";let o=i.includes("<"),s=i.includes("${t}`:r&&(d=`${r}`),c&&(d+=h+m),d+=M(N.integer,a),d+=M(N.decimalsDelimiter,o),d+=M(N.decimals,i),c||(d+=m+h),d+=M(N.recurrence,u,null,!0),d+=M(N.unitType,l,null,!0),d+=M(N.taxInclusivity,p,!0),M(e,d,{...f})}var k=({isAlternativePrice:e=!1,displayOptical:t=!1,displayStrikethrough:r=!1,displayAnnual:n=!1,instant:i=void 0}={})=>({country:o,displayFormatted:s=!0,displayRecurrence:a=!0,displayPerUnit:c=!1,displayTax:u=!1,language:l,literals:p={},quantity:f=1,space:h=!1,isPromoApplied:m=!1}={},{commitment:d,offerSelectorIds:g,formatString:P,price:S,priceWithoutDiscount:E,taxDisplay:v,taxTerm:O,term:R,usePrecision:H,promotion:U}={},F={})=>{Object.entries({country:o,formatString:P,language:l,price:S}).forEach(([Mi,Hi])=>{if(Hi==null)throw new Error(`Argument "${Mi}" is missing for osi ${g?.toString()}, country ${o}, language ${l}`)});let D={..._r,...p},I=`${l.toLowerCase()}-${o.toUpperCase()}`,C;U&&!m&&E?C=e?S:E:r&&E?C=E:C=S;let W=t?mn:dn;n&&(W=En);let{accessiblePrice:K,recurrenceTerm:ne,...Rr}=W({commitment:d,formatString:P,instant:i,isIndianPrice:o==="IN",originalPrice:S,priceWithoutDiscount:E,price:t?S:C,promotion:U,quantity:f,term:R,usePrecision:H}),At="",Tt="",yt="";A(a)&&ne&&(yt=te(D,I,le.recurrenceLabel,{recurrenceTerm:ne}));let je="";A(c)&&(h&&(je+=" "),je+=te(D,I,le.perUnitLabel,{perUnit:"LICENSE"}));let Xe="";A(u)&&O&&(h&&(Xe+=" "),Xe+=te(D,I,v===br?le.taxExclusiveLabel:le.taxInclusiveLabel,{taxTerm:O})),r&&(At=te(D,I,le.strikethroughAriaLabel,{strikethroughPrice:At})),e&&(Tt=te(D,I,le.alternativePriceAriaLabel,{alternativePrice:Tt}));let Ae=N.container;if(t&&(Ae+=" "+N.containerOptical),r&&(Ae+=" "+N.containerStrikethrough),e&&(Ae+=" "+N.containerAlternative),n&&(Ae+=" "+N.containerAnnual),A(s))return qs(Ae,{...Rr,accessibleLabel:At,altAccessibleLabel:Tt,recurrenceLabel:yt,perUnitLabel:je,taxInclusivityLabel:Xe},F);let{currencySymbol:wr,decimals:Ri,decimalsDelimiter:wi,hasCurrencySpace:Nr,integer:Ni,isCurrencyFirst:Oi}=Rr,Te=[Ni,wi,Ri];Oi?(Te.unshift(Nr?"\xA0":""),Te.unshift(wr)):(Te.push(Nr?"\xA0":""),Te.push(wr)),Te.push(yt,je,Xe);let Ii=Te.join("");return M(Ae,Ii,F)},ei=()=>(e,t,r)=>{let n=me(t.promotion,t.promotion?.displaySummary?.instant,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),o=(e.displayOldPrice===void 0||A(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price&&(!t.promotion||n);return`${o?k({displayStrikethrough:!0})({isPromoApplied:n,...e},t,r)+" ":""}${k({isAlternativePrice:o})({isPromoApplied:n,...e},t,r)}`},ti=()=>(e,t,r)=>{let{instant:n}=e;try{n||(n=new URLSearchParams(document.location.search).get("instant")),n&&(n=new Date(n))}catch{n=void 0}let i=me(t.promotion,n,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),o={...e,displayTax:!1,displayPerUnit:!1,isPromoApplied:i};if(!i)return k()(e,{...t,price:t.priceWithoutDiscount},r)+M(N.containerAnnualPrefix," (")+k({displayAnnual:!0,instant:n})(o,{...t,price:t.priceWithoutDiscount},r)+M(N.containerAnnualSuffix,")");let a=(e.displayOldPrice===void 0||A(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${a?k({displayStrikethrough:!0})(o,t,r)+" ":""}${k({isAlternativePrice:a})({isPromoApplied:i,...e},t,r)}${M(N.containerAnnualPrefix," (")}${k({displayAnnual:!0,instant:n})(o,t,r)}${M(N.containerAnnualSuffix,")")}`},ri=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${k({isAlternativePrice:e.displayOldPrice})(e,t,r)}${M(N.containerAnnualPrefix," (")}${k({displayAnnual:!0})(n,t,r)}${M(N.containerAnnualSuffix,")")}`};var Ve={...N,containerLegal:"price-legal",planType:"price-plan-type"},gt={...le,planTypeLabel:"planTypeLabel"};function Ks(e,{perUnitLabel:t,taxInclusivityLabel:r,planTypeLabel:n},i={}){let o="";return o+=M(Ve.unitType,t,null,!0),r&&n&&(r+=". "),o+=M(Ve.taxInclusivity,r,!0),o+=M(Ve.planType,n,null),M(e,o,{...i})}var ni=({country:e,displayPerUnit:t=!1,displayTax:r=!1,displayPlanType:n=!1,language:i,literals:o={}}={},{taxDisplay:s,taxTerm:a,planType:c}={},u={})=>{let l={..._r,...o},p=`${i.toLowerCase()}-${e.toUpperCase()}`,f="";A(t)&&(f=te(l,p,gt.perUnitLabel,{perUnit:"LICENSE"}));let h="";e==="US"&&i==="en"&&(r=!1),A(r)&&a&&(h=te(l,p,s===br?gt.taxExclusiveLabel:gt.taxInclusiveLabel,{taxTerm:a}));let m="";A(n)&&c&&(m=te(l,p,gt.planTypeLabel,{planType:c}));let d=Ve.container;return d+=" "+Ve.containerLegal,Ks(d,{perUnitLabel:f,taxInclusivityLabel:h,planTypeLabel:m},u)};var ii=k(),oi=ei(),si=k({displayOptical:!0}),ai=k({displayStrikethrough:!0}),ci=k({displayAnnual:!0}),li=k({displayOptical:!0,isAlternativePrice:!0}),ui=k({isAlternativePrice:!0}),hi=ri(),fi=ti(),pi=ni;var zs=(e,t)=>{if(!(!we(e)||!we(t)))return Math.floor((t-e)/t*100)},mi=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,i=zs(r,n);return i===void 0?'':`${i}%`};var di=mi();var gi="INDIVIDUAL_COM",Sr="TEAM_COM",xi="INDIVIDUAL_EDU",Pr="TEAM_EDU",Ei=["GB_en","AU_en","FR_fr","AT_de","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","GR_el","GR_en","HU_hu","IE_en","IT_it","LU_de","LU_en","LU_fr","NL_nl","NO_nb","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","TR_tr","UA_uk","ID_en","ID_in","IN_en","IN_hi","JP_ja","MY_en","MY_ms","NZ_en","TH_en","TH_th"],Zs={[gi]:["MU_en","LT_lt","LV_lv","NG_en","SA_ar","SA_en","SG_en","KR_ko"],[Sr]:["MU_en","LT_lt","LV_lv","NG_en","CO_es","KR_ko"],[xi]:["LT_lt","LV_lv","SA_en","SG_en"],[Pr]:["SG_en","KR_ko"]},Qs={MU_en:[!1,!1,!1,!1],NG_en:[!1,!1,!1,!1],AU_en:[!1,!1,!1,!1],JP_ja:[!1,!1,!1,!1],NZ_en:[!1,!1,!1,!1],TH_en:[!1,!1,!1,!1],TH_th:[!1,!1,!1,!1],CO_es:[!1,!0,!1,!1],AT_de:[!1,!1,!1,!0],SG_en:[!1,!1,!1,!0]},Js=[gi,Sr,xi,Pr],ea=e=>[Sr,Pr].includes(e),ta=(e,t,r,n)=>{let i=`${e}_${t}`,o=`${r}_${n}`,s=Qs[i];if(s){let a=Js.indexOf(o);return s[a]}return ea(o)},ra=(e,t,r,n)=>{let i=`${e}_${t}`;if(Ei.includes(e)||Ei.includes(i))return!0;let o=Zs[`${r}_${n}`];return o?o.includes(e)||o.includes(i)?!0:_.displayTax:_.displayTax},Ai=async(e,t,r,n)=>{let i=ra(e,t,r,n);return{displayTax:i,forceTaxExclusive:i?ta(e,t,r,n):_.forceTaxExclusive}},$e=class $e extends HTMLSpanElement{constructor(){super();b(this,"masElement",new ce(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-display-plan-type","data-display-annual","data-perpetual","data-promotion-code","data-force-tax-exclusive","data-template","data-wcs-osi","data-quantity"]}static createInlinePrice(r){let n=V();if(!n)return null;let{displayOldPrice:i,displayPerUnit:o,displayRecurrence:s,displayTax:a,displayPlanType:c,displayAnnual:u,forceTaxExclusive:l,perpetual:p,promotionCode:f,quantity:h,alternativePrice:m,template:d,wcsOsi:g}=n.collectPriceOptions(r);return it($e,{displayOldPrice:i,displayPerUnit:o,displayRecurrence:s,displayTax:a,displayPlanType:c,displayAnnual:u,forceTaxExclusive:l,perpetual:p,promotionCode:f,quantity:h,alternativePrice:m,template:d,wcsOsi:g})}get isInlinePrice(){return!0}attributeChangedCallback(r,n,i){this.masElement.attributeChangedCallback(r,n,i)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get isFailed(){return this.masElement.state===q}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}async render(r={}){if(!this.isConnected)return!1;let n=V();if(!n)return!1;let i=n.collectPriceOptions(r,this),o={...n.settings,...i};if(!o.wcsOsi.length)return!1;try{let s=this.masElement.togglePending({});this.innerHTML="";let[a]=await n.resolveOfferSelectors(o),c=Ie(await a,o),[u]=c;if(n.featureFlags[J]||o[J]){if(i.displayPerUnit===void 0&&(o.displayPerUnit=u.customerSegment!=="INDIVIDUAL"),i.displayTax===void 0||i.forceTaxExclusive===void 0){let{country:l,language:p}=o,[f=""]=u.marketSegments,h=await Ai(l,p,u.customerSegment,f);i.displayTax===void 0&&(o.displayTax=h?.displayTax||o.displayTax),i.forceTaxExclusive===void 0&&(o.forceTaxExclusive=h?.forceTaxExclusive||o.forceTaxExclusive),o.forceTaxExclusive&&(c=Ie(c,o))}}else i.displayOldPrice===void 0&&(o.displayOldPrice=!0);return this.renderOffers(c,o,s)}catch(s){throw this.innerHTML="",s}}renderOffers(r,n,i=void 0){if(!this.isConnected)return;let o=V();if(!o)return!1;if(i??(i=this.masElement.togglePending()),r.length){if(this.masElement.toggleResolved(i,r,n)){this.innerHTML=o.buildPriceHTML(r,this.options);let s=this.closest("p, h3, div");if(!s||!s.querySelector('span[data-template="strikethrough"]')||s.querySelector(".alt-aria-label"))return!0;let a=s?.querySelectorAll('span[is="inline-price"]');return a.length>1&&a.length===s.querySelectorAll('span[data-template="strikethrough"]').length*2&&a.forEach(c=>{c.dataset.template!=="strikethrough"&&c.options&&!c.options.alternativePrice&&!c.isFailed&&(c.options.alternativePrice=!0,c.innerHTML=o.buildPriceHTML(r,c.options))}),!0}}else{let s=new Error(`Not provided: ${this.options?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(i,s,this.options))return this.innerHTML="",!0}return!1}};b($e,"is","inline-price"),b($e,"tag","span");var re=$e;window.customElements.get(re.is)||window.customElements.define(re.is,re,{extends:re.tag});function Ti({literals:e,providers:t,settings:r}){function n(s,a=null){let c={country:r.country,language:r.language,locale:r.locale,literals:{...e.price}};if(a&&t?.price)for(let R of t.price)R(a,c);let{displayOldPrice:u,displayPerUnit:l,displayRecurrence:p,displayTax:f,displayPlanType:h,forceTaxExclusive:m,perpetual:d,displayAnnual:g,promotionCode:P,quantity:S,alternativePrice:E,wcsOsi:v,...O}=Object.assign(c,a?.dataset??{},s??{});return c=Ze(Object.assign({...c,...O,displayOldPrice:A(u),displayPerUnit:A(l),displayRecurrence:A(p),displayTax:A(f),displayPlanType:A(h),forceTaxExclusive:A(m),perpetual:A(d),displayAnnual:A(g),promotionCode:Je(P).effectivePromoCode,quantity:_e(S,_.quantity),alternativePrice:A(E),wcsOsi:tt(v)})),c}function i(s,a){if(!Array.isArray(s)||!s.length||!a)return"";let{template:c}=a,u;switch(c){case"discount":u=di;break;case"strikethrough":u=ai;break;case"annual":u=ci;break;case"legal":u=pi;break;default:a.template==="optical"&&a.alternativePrice?u=li:a.template==="optical"?u=si:a.displayAnnual&&s[0].planType==="ABM"?u=a.promotionCode?fi:hi:a.alternativePrice?u=ui:u=a.promotionCode?oi:ii}let[l]=s;return l={...l,...l.priceDetails},u({...r,...a},l)}let o=re.createInlinePrice;return{InlinePrice:re,buildPriceHTML:i,collectPriceOptions:n,createInlinePrice:o}}function na({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 yi(e={},t){let r=t.featureFlags[J],{commerce:n={}}=e,i=Z.PRODUCTION,o=Ht,s=w("checkoutClientId",n)??_.checkoutClientId,a=Ne(w("checkoutWorkflowStep",n),G,_.checkoutWorkflowStep),c=_.displayOldPrice,u=_.displayPerUnit,l=A(w("displayRecurrence",n),_.displayRecurrence),p=A(w("displayTax",n),_.displayTax),f=A(w("displayPlanType",n),_.displayPlanType),h=A(w("entitlement",n),_.entitlement),m=A(w("modal",n),_.modal),d=A(w("forceTaxExclusive",n),_.forceTaxExclusive),g=w("promotionCode",n)??_.promotionCode,P=_e(w("quantity",n)),S=w("wcsApiKey",n)??_.wcsApiKey,E=n?.env==="stage",v=ae.PUBLISHED;["true",""].includes(n.allowOverride)&&(E=(w(It,n,{metadata:!1})?.toLowerCase()??n?.env)==="stage",v=Ne(w(Mt,n),ae,v)),E&&(i=Z.STAGE,o=Dt);let R=w(Ot)??e.preview,H=typeof R<"u"&&R!=="off"&&R!=="false",U={};H&&(U={preview:H});let F=w("mas-io-url")??e.masIOUrl??`https://www${i===Z.STAGE?".stage":""}.adobe.com/mas/io`,D=w("preselect-plan")??void 0;return{...na(e),...U,displayOldPrice:c,checkoutClientId:s,checkoutWorkflowStep:a,displayPerUnit:u,displayRecurrence:l,displayTax:p,displayPlanType:f,entitlement:h,extraOptions:_.extraOptions,modal:m,env:i,forceTaxExclusive:d,promotionCode:g,quantity:P,alternativePrice:_.alternativePrice,wcsApiKey:S,wcsURL:o,landscape:v,masIOUrl:F,...D&&{preselectPlan:D}}}async function _i(e,t={},r=2,n=100){let i;for(let o=0;o<=r;o++)try{let s=await fetch(e,t);return s.retryCount=o,s}catch(s){if(i=s,i.retryCount=o,o>r)break;await new Promise(a=>setTimeout(a,n*(o+1)))}throw i}var ia="mas-commerce-service";function xt(e){return`startTime:${e.startTime.toFixed(2)}|duration:${e.duration.toFixed(2)}`}function vr(){return document.getElementsByTagName(ia)?.[0]}var Cr="wcs";function bi({settings:e}){let t=Y.module(Cr),{env:r,wcsApiKey:n}=e,i=new Map,o=new Map,s,a=new Map;async function c(m,d,g=!0){let P=V(),S=Lt;t.debug("Fetching:",m);let E="",v;if(m.offerSelectorIds.length>1)throw new Error("Multiple OSIs are not supported anymore");let O=new Map(d),[R]=m.offerSelectorIds,H=Date.now()+Math.random().toString(36).substring(2,7),U=`${Cr}:${R}:${H}${Bt}`,F=`${Cr}:${R}:${H}${kt}`,D;try{if(performance.mark(U),E=new URL(e.wcsURL),E.searchParams.set("offer_selector_ids",R),E.searchParams.set("country",m.country),E.searchParams.set("locale",m.locale),E.searchParams.set("landscape",r===Z.STAGE?"ALL":e.landscape),E.searchParams.set("api_key",n),m.language&&E.searchParams.set("language",m.language),m.promotionCode&&E.searchParams.set("promotion_code",m.promotionCode),m.currency&&E.searchParams.set("currency",m.currency),v=await _i(E.toString(),{credentials:"omit"}),v.ok){let I=[];try{let C=await v.json();t.debug("Fetched:",m,C),I=C.resolvedOffers??[]}catch(C){t.error(`Error parsing JSON: ${C.message}`,{...C.context,...P?.duration})}I=I.map(Oe),d.forEach(({resolve:C},W)=>{let K=I.filter(({offerSelectorIds:ne})=>ne.includes(W)).flat();K.length&&(O.delete(W),d.delete(W),C(K))})}else S=Ct}catch(I){S=`Network error: ${I.message}`}finally{D=performance.measure(F,U),performance.clearMarks(U),performance.clearMeasures(F)}if(g&&d.size){t.debug("Missing:",{offerSelectorIds:[...d.keys()]});let I=Kr(v);d.forEach(C=>{C.reject(new be(S,{...m,...I,response:v,measure:xt(D),...P?.duration}))})}}function u(){clearTimeout(s);let m=[...o.values()];o.clear(),m.forEach(({options:d,promises:g})=>c(d,g))}function l(m){if(!m||typeof m!="object")throw new TypeError("Cache must be a Map or similar object");let d=r===Z.STAGE?"stage":"prod",g=m[d];if(!g||typeof g!="object"){t.warn(`No cache found for environment: ${r}`);return}for(let[P,S]of Object.entries(g))i.set(P,Promise.resolve(S.map(Oe)));t.debug(`Prefilled WCS cache with ${g.size} entries`)}function p(){let m=i.size;a=new Map(i),i.clear(),t.debug(`Moved ${m} cache entries to stale cache`)}function f(m,d,g){let P=m!=="GB"&&!g?"MULT":"en",S=Gt.includes(m)?m:_.country;return{validCountry:S,validLanguage:P,locale:`${d}_${S}`}}function h({country:m,language:d,perpetual:g=!1,promotionCode:P="",wcsOsi:S=[]}){let{validCountry:E,validLanguage:v,locale:O}=f(m,d,g),R=[E,v,P].filter(H=>H).join("-").toLowerCase();return S.map(H=>{let U=`${H}-${R}`;if(i.has(U))return i.get(U);let F=new Promise((D,I)=>{let C=o.get(R);C||(C={options:{country:E,locale:O,...v==="MULT"&&{language:v},offerSelectorIds:[]},promises:new Map},o.set(R,C)),P&&(C.options.promotionCode=P),C.options.offerSelectorIds.push(H),C.promises.set(H,{resolve:D,reject:I}),u()}).catch(D=>{if(a.has(U))return a.get(U);throw D});return i.set(U,F),F})}return{Commitment:ue,PlanType:jr,Term:j,applyPlanType:Oe,resolveOfferSelectors:h,flushWcsCacheInternal:p,prefillWcsCache:l,normalizeCountryLanguageAndLocale:f}}var Si="mas-commerce-service",Pi="mas-commerce-service:start",vi="mas-commerce-service:ready",Ye,Pe,ve,Ci,Li,Lr=class extends HTMLElement{constructor(){super(...arguments);ie(this,ve);ie(this,Ye);ie(this,Pe);b(this,"lastLoggingTime",0)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(n,i,o)=>{let s=await r?.(n,i,this.imsSignedInPromise,o);return s||null})}get featureFlags(){return z(this,Pe)||oe(this,Pe,{[J]:Mr(this,ve,Li).call(this,J)}),z(this,Pe)}activate(){let r=z(this,ve,Ci),n=yi(r,this);rt(r.lana);let i=Y.init(r.hostEnv).module("service");i.debug("Activating:",r);let s={price:vn(n)},a={checkout:new Set,price:new Set},c={literals:s,providers:a,settings:n};Object.defineProperties(this,Object.getOwnPropertyDescriptors({...bn(c),...Sn(c),...Ti(c),...bi(c),...Ft,Log:Y,get defaults(){return _},get log(){return Y},get providers(){return{checkout(l){return a.checkout.add(l),()=>a.checkout.delete(l)},price(l){return a.price.add(l),()=>a.price.delete(l)},has:l=>a.price.has(l)||a.checkout.has(l)}},get settings(){return n}})),i.debug("Activated:",{literals:s,settings:n});let u=new CustomEvent(qe,{bubbles:!0,cancelable:!1,detail:this});performance.mark(vi),oe(this,Ye,performance.measure(vi,Pi)),this.dispatchEvent(u),setTimeout(()=>{this.logFailedRequests()},1e4)}connectedCallback(){performance.mark(Pi),this.activate()}flushWcsCache(){this.flushWcsCacheInternal(),this.log.debug("Flushed WCS cache")}refreshOffers(){this.flushWcsCacheInternal(),document.querySelectorAll(bt).forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers"),this.logFailedRequests()}refreshFragments(){this.flushWcsCacheInternal(),customElements.get("aem-fragment")?.cache.clear(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh(!1)),this.log.debug("Refreshed AEM fragments"),this.logFailedRequests()}get duration(){return{"mas-commerce-service:measure":xt(z(this,Ye))}}logFailedRequests(){let r=[...performance.getEntriesByType("resource")].filter(({startTime:i})=>i>this.lastLoggingTime).filter(({transferSize:i,duration:o,responseStatus:s})=>i===0&&o===0&&s<200||s>=400),n=Array.from(new Map(r.map(i=>[i.name,i])).values());if(n.some(({name:i})=>/(\/fragment\?|web_commerce_artifact)/.test(i))){let i=n.map(({name:o})=>o);this.log.error("Failed requests:",{failedUrls:i,...this.duration})}this.lastLoggingTime=performance.now().toFixed(3)}};Ye=new WeakMap,Pe=new WeakMap,ve=new WeakSet,Ci=function(){let r=this.getAttribute("env")??"prod",n={commerce:{env:r},hostEnv:{name:r},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate")??1,10),isProdDomain:r==="prod"},masIOUrl:this.getAttribute("mas-io-url")};return["locale","country","language","preview"].forEach(i=>{let o=this.getAttribute(i);o&&(n[i]=o)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(i=>{let o=this.getAttribute(i);if(o!=null){let s=i.replace(/-([a-z])/g,a=>a[1].toUpperCase());n.commerce[s]=o}}),n},Li=function(r){return["on","true",!0].includes(this.getAttribute(`data-${r}`)||w(r))};window.customElements.get(Si)||window.customElements.define(Si,Lr);var We=class We extends st(HTMLButtonElement){static createCheckoutButton(t={},r=""){return ot(We,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};b(We,"is","checkout-button"),b(We,"tag","button");var Ce=We;window.customElements.get(Ce.is)||window.customElements.define(Ce.is,Ce,{extends:Ce.tag});function oa(e){return`https://${e==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var xe,ge=class ge extends HTMLAnchorElement{constructor(){super();b(this,"masElement",new ce(this));ie(this,xe);this.setAttribute("is",ge.is)}get isUptLink(){return!0}initializeWcsData(r,n){this.setAttribute("data-wcs-osi",r),n&&this.setAttribute("data-promotion-code",n)}attributeChangedCallback(r,n,i){this.masElement.attributeChangedCallback(r,n,i)}connectedCallback(){this.masElement.connectedCallback(),oe(this,xe,vr()),z(this,xe)&&(this.log=z(this,xe).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),oe(this,xe,void 0)}requestUpdate(r=!1){this.masElement.requestUpdate(r)}onceSettled(){return this.masElement.onceSettled()}async render(){let r=vr();if(!r)return!1;this.dataset.imsCountry||r.imsCountryPromise.then(s=>{s&&(this.dataset.imsCountry=s)});let n=r.collectCheckoutOptions({},this);if(!n.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let i=this.masElement.togglePending(n),o=r.resolveOfferSelectors(n);try{let[[s]]=await Promise.all(o),{country:a,language:c,env:u}=n,l=`locale=${c}_${a}&country=${a}&offer_id=${s.offerId}`,p=this.getAttribute("data-promotion-code");p&&(l+=`&promotion_code=${encodeURIComponent(p)}`),this.href=`${oa(u)}?${l}`,this.masElement.toggleResolved(i,s,n)}catch(s){let a=new Error(`Could not resolve offer selectors for id: ${n.wcsOsi}.`,s.message);return this.masElement.toggleFailed(i,a,n),!1}}static createFrom(r){let n=new ge;for(let i of r.attributes)i.name!=="is"&&(i.name==="class"&&i.value.includes("upt-link")?n.setAttribute("class",i.value.replace("upt-link","").trim()):n.setAttribute(i.name,i.value));return n.innerHTML=r.innerHTML,n.setAttribute("tabindex",0),n}};xe=new WeakMap,b(ge,"is","upt-link"),b(ge,"tag","a"),b(ge,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var Le=ge;window.customElements.get(Le.is)||window.customElements.define(Le.is,Le,{extends:Le.tag});export{Br as CheckoutWorkflow,G as CheckoutWorkflowStep,_ as Defaults,Y as Log,Oe as applyPlanType,Ai as resolvePriceTaxFlags}; +`,Ee.MISSING_INTL_API,s);var v=r.getPluralRules(t,{type:l.pluralType}).select(f-(l.offset||0));E=l.options[v]||l.options.other}if(!E)throw new Tr(l.value,f,Object.keys(l.options),s);a.push.apply(a,Fe(E.value,t,r,n,i,f-(l.offset||0)));continue}}return Bs(a)}function Gs(e,t){return t?T(T(T({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=T(T({},e[n]),t[n]||{}),r},{})):e}function Fs(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Gs(e[n],t[n]),r},T({},e)):e}function yr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Vs(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ke(function(){for(var t,r=[],n=0;n0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Xn,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var Jn=Qn;var _r={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",strikethroughAriaLabel:"Regularly at",planTypeLabel:"{planType, select, ABM {Annual, billed monthly} other {}}"},$s=Yr("ConsonantTemplates/price"),Ys=/<\/?[^>]+(>|$)/g,N={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAlternative:"price-alternative",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"},le={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel",alternativePriceAriaLabel:"alternativePriceAriaLabel"},br="TAX_EXCLUSIVE",Ws=e=>Fr(e)?Object.entries(e).filter(([,t])=>ye(t)||ze(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Gr(n)+'"'}`,""):"",M=(e,t,r,n=!1)=>`${n?fn(t):t??""}`;function js(e){e=e.replaceAll("","</a>");let t=/]+(>|$)/g;return e.match(t)?.forEach(n=>{let i=n.replace("",">");e=e.replaceAll(n,i)}),e}function Xs(e){e=e.replaceAll("</a>","");let t=/<a (?!>)(.*?)(>|$)/g;return e.match(t)?.forEach(n=>{let i=n.replace("<a ","");e=e.replaceAll(n,i)}),e}function te(e,t,r,n){let i=e[r];if(i==null)return"";let o=i.includes("<"),s=i.includes("${t}`:r&&(d=`${r}`),c&&(d+=h+m),d+=M(N.integer,a),d+=M(N.decimalsDelimiter,o),d+=M(N.decimals,i),c||(d+=m+h),d+=M(N.recurrence,u,null,!0),d+=M(N.unitType,l,null,!0),d+=M(N.taxInclusivity,p,!0),M(e,d,{...f})}var k=({isAlternativePrice:e=!1,displayOptical:t=!1,displayStrikethrough:r=!1,displayAnnual:n=!1,instant:i=void 0}={})=>({country:o,displayFormatted:s=!0,displayRecurrence:a=!0,displayPerUnit:c=!1,displayTax:u=!1,language:l,literals:p={},quantity:f=1,space:h=!1,isPromoApplied:m=!1}={},{commitment:d,offerSelectorIds:g,formatString:P,price:S,priceWithoutDiscount:E,taxDisplay:v,taxTerm:O,term:R,usePrecision:H,promotion:U}={},F={})=>{Object.entries({country:o,formatString:P,language:l,price:S}).forEach(([Mi,Hi])=>{if(Hi==null)throw new Error(`Argument "${Mi}" is missing for osi ${g?.toString()}, country ${o}, language ${l}`)});let D={..._r,...p},I=`${l.toLowerCase()}-${o.toUpperCase()}`,C;U&&!m&&E?C=e?S:E:r&&E?C=E:C=S;let W=t?mn:dn;n&&(W=En);let{accessiblePrice:K,recurrenceTerm:ne,...Rr}=W({commitment:d,formatString:P,instant:i,isIndianPrice:o==="IN",originalPrice:S,priceWithoutDiscount:E,price:t?S:C,promotion:U,quantity:f,term:R,usePrecision:H}),At="",Tt="",yt="";A(a)&&ne&&(yt=te(D,I,le.recurrenceLabel,{recurrenceTerm:ne}));let je="";A(c)&&(h&&(je+=" "),je+=te(D,I,le.perUnitLabel,{perUnit:"LICENSE"}));let Xe="";A(u)&&O&&(h&&(Xe+=" "),Xe+=te(D,I,v===br?le.taxExclusiveLabel:le.taxInclusiveLabel,{taxTerm:O})),r&&(At=te(D,I,le.strikethroughAriaLabel,{strikethroughPrice:At})),e&&(Tt=te(D,I,le.alternativePriceAriaLabel,{alternativePrice:Tt}));let Ae=N.container;if(t&&(Ae+=" "+N.containerOptical),r&&(Ae+=" "+N.containerStrikethrough),e&&(Ae+=" "+N.containerAlternative),n&&(Ae+=" "+N.containerAnnual),A(s))return qs(Ae,{...Rr,accessibleLabel:At,altAccessibleLabel:Tt,recurrenceLabel:yt,perUnitLabel:je,taxInclusivityLabel:Xe},F);let{currencySymbol:wr,decimals:Ri,decimalsDelimiter:wi,hasCurrencySpace:Nr,integer:Ni,isCurrencyFirst:Oi}=Rr,Te=[Ni,wi,Ri];Oi?(Te.unshift(Nr?"\xA0":""),Te.unshift(wr)):(Te.push(Nr?"\xA0":""),Te.push(wr)),Te.push(yt,je,Xe);let Ii=Te.join("");return M(Ae,Ii,F)},ei=()=>(e,t,r)=>{let n=me(t.promotion,t.promotion?.displaySummary?.instant,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),o=(e.displayOldPrice===void 0||A(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price&&(!t.promotion||n);return`${o?k({displayStrikethrough:!0})({isPromoApplied:n,...e},t,r)+" ":""}${k({isAlternativePrice:o})({isPromoApplied:n,...e},t,r)}`},ti=()=>(e,t,r)=>{let{instant:n}=e;try{n||(n=new URLSearchParams(document.location.search).get("instant")),n&&(n=new Date(n))}catch{n=void 0}let i=me(t.promotion,n,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),o={...e,displayTax:!1,displayPerUnit:!1,isPromoApplied:i};if(!i)return k()(e,{...t,price:t.priceWithoutDiscount},r)+M(N.containerAnnualPrefix," (")+k({displayAnnual:!0,instant:n})(o,{...t,price:t.priceWithoutDiscount},r)+M(N.containerAnnualSuffix,")");let a=(e.displayOldPrice===void 0||A(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${a?k({displayStrikethrough:!0})(o,t,r)+" ":""}${k({isAlternativePrice:a})({isPromoApplied:i,...e},t,r)}${M(N.containerAnnualPrefix," (")}${k({displayAnnual:!0,instant:n})(o,t,r)}${M(N.containerAnnualSuffix,")")}`},ri=()=>(e,t,r)=>{let n={...e,displayTax:!1,displayPerUnit:!1};return`${k({isAlternativePrice:e.displayOldPrice})(e,t,r)}${M(N.containerAnnualPrefix," (")}${k({displayAnnual:!0})(n,t,r)}${M(N.containerAnnualSuffix,")")}`};var Ve={...N,containerLegal:"price-legal",planType:"price-plan-type"},gt={...le,planTypeLabel:"planTypeLabel"};function Ks(e,{perUnitLabel:t,taxInclusivityLabel:r,planTypeLabel:n},i={}){let o="";return o+=M(Ve.unitType,t,null,!0),r&&n&&(r+=". "),o+=M(Ve.taxInclusivity,r,!0),o+=M(Ve.planType,n,null),M(e,o,{...i})}var ni=({country:e,displayPerUnit:t=!1,displayTax:r=!1,displayPlanType:n=!1,language:i,literals:o={}}={},{taxDisplay:s,taxTerm:a,planType:c}={},u={})=>{let l={..._r,...o},p=`${i.toLowerCase()}-${e.toUpperCase()}`,f="";A(t)&&(f=te(l,p,gt.perUnitLabel,{perUnit:"LICENSE"}));let h="";e==="US"&&i==="en"&&(r=!1),A(r)&&a&&(h=te(l,p,s===br?gt.taxExclusiveLabel:gt.taxInclusiveLabel,{taxTerm:a}));let m="";A(n)&&c&&(m=te(l,p,gt.planTypeLabel,{planType:c}));let d=Ve.container;return d+=" "+Ve.containerLegal,Ks(d,{perUnitLabel:f,taxInclusivityLabel:h,planTypeLabel:m},u)};var ii=k(),oi=ei(),si=k({displayOptical:!0}),ai=k({displayStrikethrough:!0}),ci=k({displayAnnual:!0}),li=k({displayOptical:!0,isAlternativePrice:!0}),ui=k({isAlternativePrice:!0}),hi=ri(),fi=ti(),pi=ni;var zs=(e,t)=>{if(!(!we(e)||!we(t)))return Math.floor((t-e)/t*100)},mi=()=>(e,t)=>{let{price:r,priceWithoutDiscount:n}=t,i=zs(r,n);return i===void 0?'':`${i}%`};var di=mi();var gi="INDIVIDUAL_COM",Sr="TEAM_COM",xi="INDIVIDUAL_EDU",Pr="TEAM_EDU",Ei=["GB_en","AU_en","FR_fr","AT_de","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","GR_el","GR_en","HU_hu","IE_en","IT_it","LU_de","LU_en","LU_fr","NL_nl","NO_nb","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","TR_tr","UA_uk","ID_en","ID_in","IN_en","IN_hi","JP_ja","MY_en","MY_ms","NZ_en","TH_en","TH_th","MU_en"],Zs={[gi]:["LT_lt","LV_lv","NG_en","SA_ar","SA_en","SG_en","KR_ko"],[Sr]:["LT_lt","LV_lv","NG_en","CO_es","KR_ko"],[xi]:["LT_lt","LV_lv","SA_en","SG_en"],[Pr]:["SG_en","KR_ko"]},Qs={MU_en:[!0,!0,!0,!0],NG_en:[!1,!1,!1,!1],AU_en:[!1,!1,!1,!1],JP_ja:[!1,!1,!1,!1],NZ_en:[!1,!1,!1,!1],TH_en:[!1,!1,!1,!1],TH_th:[!1,!1,!1,!1],CO_es:[!1,!0,!1,!1],AT_de:[!1,!1,!1,!0],SG_en:[!1,!1,!1,!0]},Js=[gi,Sr,xi,Pr],ea=e=>[Sr,Pr].includes(e),ta=(e,t,r,n)=>{let i=`${e}_${t}`,o=`${r}_${n}`,s=Qs[i];if(s){let a=Js.indexOf(o);return s[a]}return ea(o)},ra=(e,t,r,n)=>{let i=`${e}_${t}`;if(Ei.includes(e)||Ei.includes(i))return!0;let o=Zs[`${r}_${n}`];return o?o.includes(e)||o.includes(i)?!0:_.displayTax:_.displayTax},Ai=async(e,t,r,n)=>{let i=ra(e,t,r,n);return{displayTax:i,forceTaxExclusive:i?ta(e,t,r,n):_.forceTaxExclusive}},$e=class $e extends HTMLSpanElement{constructor(){super();b(this,"masElement",new ce(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-display-plan-type","data-display-annual","data-perpetual","data-promotion-code","data-force-tax-exclusive","data-template","data-wcs-osi","data-quantity"]}static createInlinePrice(r){let n=V();if(!n)return null;let{displayOldPrice:i,displayPerUnit:o,displayRecurrence:s,displayTax:a,displayPlanType:c,displayAnnual:u,forceTaxExclusive:l,perpetual:p,promotionCode:f,quantity:h,alternativePrice:m,template:d,wcsOsi:g}=n.collectPriceOptions(r);return it($e,{displayOldPrice:i,displayPerUnit:o,displayRecurrence:s,displayTax:a,displayPlanType:c,displayAnnual:u,forceTaxExclusive:l,perpetual:p,promotionCode:f,quantity:h,alternativePrice:m,template:d,wcsOsi:g})}get isInlinePrice(){return!0}attributeChangedCallback(r,n,i){this.masElement.attributeChangedCallback(r,n,i)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get isFailed(){return this.masElement.state===q}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}async render(r={}){if(!this.isConnected)return!1;let n=V();if(!n)return!1;let i=n.collectPriceOptions(r,this),o={...n.settings,...i};if(!o.wcsOsi.length)return!1;try{let s=this.masElement.togglePending({});this.innerHTML="";let[a]=await n.resolveOfferSelectors(o),c=Ie(await a,o),[u]=c;if(n.featureFlags[J]||o[J]){if(i.displayPerUnit===void 0&&(o.displayPerUnit=u.customerSegment!=="INDIVIDUAL"),i.displayTax===void 0||i.forceTaxExclusive===void 0){let{country:l,language:p}=o,[f=""]=u.marketSegments,h=await Ai(l,p,u.customerSegment,f);i.displayTax===void 0&&(o.displayTax=h?.displayTax||o.displayTax),i.forceTaxExclusive===void 0&&(o.forceTaxExclusive=h?.forceTaxExclusive||o.forceTaxExclusive),o.forceTaxExclusive&&(c=Ie(c,o))}}else i.displayOldPrice===void 0&&(o.displayOldPrice=!0);return this.renderOffers(c,o,s)}catch(s){throw this.innerHTML="",s}}renderOffers(r,n,i=void 0){if(!this.isConnected)return;let o=V();if(!o)return!1;if(i??(i=this.masElement.togglePending()),r.length){if(this.masElement.toggleResolved(i,r,n)){this.innerHTML=o.buildPriceHTML(r,this.options);let s=this.closest("p, h3, div");if(!s||!s.querySelector('span[data-template="strikethrough"]')||s.querySelector(".alt-aria-label"))return!0;let a=s?.querySelectorAll('span[is="inline-price"]');return a.length>1&&a.length===s.querySelectorAll('span[data-template="strikethrough"]').length*2&&a.forEach(c=>{c.dataset.template!=="strikethrough"&&c.options&&!c.options.alternativePrice&&!c.isFailed&&(c.options.alternativePrice=!0,c.innerHTML=o.buildPriceHTML(r,c.options))}),!0}}else{let s=new Error(`Not provided: ${this.options?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(i,s,this.options))return this.innerHTML="",!0}return!1}};b($e,"is","inline-price"),b($e,"tag","span");var re=$e;window.customElements.get(re.is)||window.customElements.define(re.is,re,{extends:re.tag});function Ti({literals:e,providers:t,settings:r}){function n(s,a=null){let c={country:r.country,language:r.language,locale:r.locale,literals:{...e.price}};if(a&&t?.price)for(let R of t.price)R(a,c);let{displayOldPrice:u,displayPerUnit:l,displayRecurrence:p,displayTax:f,displayPlanType:h,forceTaxExclusive:m,perpetual:d,displayAnnual:g,promotionCode:P,quantity:S,alternativePrice:E,wcsOsi:v,...O}=Object.assign(c,a?.dataset??{},s??{});return c=Ze(Object.assign({...c,...O,displayOldPrice:A(u),displayPerUnit:A(l),displayRecurrence:A(p),displayTax:A(f),displayPlanType:A(h),forceTaxExclusive:A(m),perpetual:A(d),displayAnnual:A(g),promotionCode:Je(P).effectivePromoCode,quantity:_e(S,_.quantity),alternativePrice:A(E),wcsOsi:tt(v)})),c}function i(s,a){if(!Array.isArray(s)||!s.length||!a)return"";let{template:c}=a,u;switch(c){case"discount":u=di;break;case"strikethrough":u=ai;break;case"annual":u=ci;break;case"legal":u=pi;break;default:a.template==="optical"&&a.alternativePrice?u=li:a.template==="optical"?u=si:a.displayAnnual&&s[0].planType==="ABM"?u=a.promotionCode?fi:hi:a.alternativePrice?u=ui:u=a.promotionCode?oi:ii}let[l]=s;return l={...l,...l.priceDetails},u({...r,...a},l)}let o=re.createInlinePrice;return{InlinePrice:re,buildPriceHTML:i,collectPriceOptions:n,createInlinePrice:o}}function na({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 yi(e={},t){let r=t.featureFlags[J],{commerce:n={}}=e,i=Z.PRODUCTION,o=Ht,s=w("checkoutClientId",n)??_.checkoutClientId,a=Ne(w("checkoutWorkflowStep",n),G,_.checkoutWorkflowStep),c=_.displayOldPrice,u=_.displayPerUnit,l=A(w("displayRecurrence",n),_.displayRecurrence),p=A(w("displayTax",n),_.displayTax),f=A(w("displayPlanType",n),_.displayPlanType),h=A(w("entitlement",n),_.entitlement),m=A(w("modal",n),_.modal),d=A(w("forceTaxExclusive",n),_.forceTaxExclusive),g=w("promotionCode",n)??_.promotionCode,P=_e(w("quantity",n)),S=w("wcsApiKey",n)??_.wcsApiKey,E=n?.env==="stage",v=ae.PUBLISHED;["true",""].includes(n.allowOverride)&&(E=(w(It,n,{metadata:!1})?.toLowerCase()??n?.env)==="stage",v=Ne(w(Mt,n),ae,v)),E&&(i=Z.STAGE,o=Dt);let R=w(Ot)??e.preview,H=typeof R<"u"&&R!=="off"&&R!=="false",U={};H&&(U={preview:H});let F=w("mas-io-url")??e.masIOUrl??`https://www${i===Z.STAGE?".stage":""}.adobe.com/mas/io`,D=w("preselect-plan")??void 0;return{...na(e),...U,displayOldPrice:c,checkoutClientId:s,checkoutWorkflowStep:a,displayPerUnit:u,displayRecurrence:l,displayTax:p,displayPlanType:f,entitlement:h,extraOptions:_.extraOptions,modal:m,env:i,forceTaxExclusive:d,promotionCode:g,quantity:P,alternativePrice:_.alternativePrice,wcsApiKey:S,wcsURL:o,landscape:v,masIOUrl:F,...D&&{preselectPlan:D}}}async function _i(e,t={},r=2,n=100){let i;for(let o=0;o<=r;o++)try{let s=await fetch(e,t);return s.retryCount=o,s}catch(s){if(i=s,i.retryCount=o,o>r)break;await new Promise(a=>setTimeout(a,n*(o+1)))}throw i}var ia="mas-commerce-service";function xt(e){return`startTime:${e.startTime.toFixed(2)}|duration:${e.duration.toFixed(2)}`}function vr(){return document.getElementsByTagName(ia)?.[0]}var Cr="wcs";function bi({settings:e}){let t=Y.module(Cr),{env:r,wcsApiKey:n}=e,i=new Map,o=new Map,s,a=new Map;async function c(m,d,g=!0){let P=V(),S=Lt;t.debug("Fetching:",m);let E="",v;if(m.offerSelectorIds.length>1)throw new Error("Multiple OSIs are not supported anymore");let O=new Map(d),[R]=m.offerSelectorIds,H=Date.now()+Math.random().toString(36).substring(2,7),U=`${Cr}:${R}:${H}${Bt}`,F=`${Cr}:${R}:${H}${kt}`,D;try{if(performance.mark(U),E=new URL(e.wcsURL),E.searchParams.set("offer_selector_ids",R),E.searchParams.set("country",m.country),E.searchParams.set("locale",m.locale),E.searchParams.set("landscape",r===Z.STAGE?"ALL":e.landscape),E.searchParams.set("api_key",n),m.language&&E.searchParams.set("language",m.language),m.promotionCode&&E.searchParams.set("promotion_code",m.promotionCode),m.currency&&E.searchParams.set("currency",m.currency),v=await _i(E.toString(),{credentials:"omit"}),v.ok){let I=[];try{let C=await v.json();t.debug("Fetched:",m,C),I=C.resolvedOffers??[]}catch(C){t.error(`Error parsing JSON: ${C.message}`,{...C.context,...P?.duration})}I=I.map(Oe),d.forEach(({resolve:C},W)=>{let K=I.filter(({offerSelectorIds:ne})=>ne.includes(W)).flat();K.length&&(O.delete(W),d.delete(W),C(K))})}else S=Ct}catch(I){S=`Network error: ${I.message}`}finally{D=performance.measure(F,U),performance.clearMarks(U),performance.clearMeasures(F)}if(g&&d.size){t.debug("Missing:",{offerSelectorIds:[...d.keys()]});let I=Kr(v);d.forEach(C=>{C.reject(new be(S,{...m,...I,response:v,measure:xt(D),...P?.duration}))})}}function u(){clearTimeout(s);let m=[...o.values()];o.clear(),m.forEach(({options:d,promises:g})=>c(d,g))}function l(m){if(!m||typeof m!="object")throw new TypeError("Cache must be a Map or similar object");let d=r===Z.STAGE?"stage":"prod",g=m[d];if(!g||typeof g!="object"){t.warn(`No cache found for environment: ${r}`);return}for(let[P,S]of Object.entries(g))i.set(P,Promise.resolve(S.map(Oe)));t.debug(`Prefilled WCS cache with ${g.size} entries`)}function p(){let m=i.size;a=new Map(i),i.clear(),t.debug(`Moved ${m} cache entries to stale cache`)}function f(m,d,g){let P=m!=="GB"&&!g?"MULT":"en",S=Gt.includes(m)?m:_.country;return{validCountry:S,validLanguage:P,locale:`${d}_${S}`}}function h({country:m,language:d,perpetual:g=!1,promotionCode:P="",wcsOsi:S=[]}){let{validCountry:E,validLanguage:v,locale:O}=f(m,d,g),R=[E,v,P].filter(H=>H).join("-").toLowerCase();return S.map(H=>{let U=`${H}-${R}`;if(i.has(U))return i.get(U);let F=new Promise((D,I)=>{let C=o.get(R);C||(C={options:{country:E,locale:O,...v==="MULT"&&{language:v},offerSelectorIds:[]},promises:new Map},o.set(R,C)),P&&(C.options.promotionCode=P),C.options.offerSelectorIds.push(H),C.promises.set(H,{resolve:D,reject:I}),u()}).catch(D=>{if(a.has(U))return a.get(U);throw D});return i.set(U,F),F})}return{Commitment:ue,PlanType:jr,Term:j,applyPlanType:Oe,resolveOfferSelectors:h,flushWcsCacheInternal:p,prefillWcsCache:l,normalizeCountryLanguageAndLocale:f}}var Si="mas-commerce-service",Pi="mas-commerce-service:start",vi="mas-commerce-service:ready",Ye,Pe,ve,Ci,Li,Lr=class extends HTMLElement{constructor(){super(...arguments);ie(this,ve);ie(this,Ye);ie(this,Pe);b(this,"lastLoggingTime",0)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(n,i,o)=>{let s=await r?.(n,i,this.imsSignedInPromise,o);return s||null})}get featureFlags(){return z(this,Pe)||oe(this,Pe,{[J]:Mr(this,ve,Li).call(this,J)}),z(this,Pe)}activate(){let r=z(this,ve,Ci),n=yi(r,this);rt(r.lana);let i=Y.init(r.hostEnv).module("service");i.debug("Activating:",r);let s={price:vn(n)},a={checkout:new Set,price:new Set},c={literals:s,providers:a,settings:n};Object.defineProperties(this,Object.getOwnPropertyDescriptors({...bn(c),...Sn(c),...Ti(c),...bi(c),...Ft,Log:Y,get defaults(){return _},get log(){return Y},get providers(){return{checkout(l){return a.checkout.add(l),()=>a.checkout.delete(l)},price(l){return a.price.add(l),()=>a.price.delete(l)},has:l=>a.price.has(l)||a.checkout.has(l)}},get settings(){return n}})),i.debug("Activated:",{literals:s,settings:n});let u=new CustomEvent(qe,{bubbles:!0,cancelable:!1,detail:this});performance.mark(vi),oe(this,Ye,performance.measure(vi,Pi)),this.dispatchEvent(u),setTimeout(()=>{this.logFailedRequests()},1e4)}connectedCallback(){performance.mark(Pi),this.activate()}flushWcsCache(){this.flushWcsCacheInternal(),this.log.debug("Flushed WCS cache")}refreshOffers(){this.flushWcsCacheInternal(),document.querySelectorAll(bt).forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers"),this.logFailedRequests()}refreshFragments(){this.flushWcsCacheInternal(),customElements.get("aem-fragment")?.cache.clear(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh(!1)),this.log.debug("Refreshed AEM fragments"),this.logFailedRequests()}get duration(){return{"mas-commerce-service:measure":xt(z(this,Ye))}}logFailedRequests(){let r=[...performance.getEntriesByType("resource")].filter(({startTime:i})=>i>this.lastLoggingTime).filter(({transferSize:i,duration:o,responseStatus:s})=>i===0&&o===0&&s<200||s>=400),n=Array.from(new Map(r.map(i=>[i.name,i])).values());if(n.some(({name:i})=>/(\/fragment\?|web_commerce_artifact)/.test(i))){let i=n.map(({name:o})=>o);this.log.error("Failed requests:",{failedUrls:i,...this.duration})}this.lastLoggingTime=performance.now().toFixed(3)}};Ye=new WeakMap,Pe=new WeakMap,ve=new WeakSet,Ci=function(){let r=this.getAttribute("env")??"prod",n={commerce:{env:r},hostEnv:{name:r},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate")??1,10),isProdDomain:r==="prod"},masIOUrl:this.getAttribute("mas-io-url")};return["locale","country","language","preview"].forEach(i=>{let o=this.getAttribute(i);o&&(n[i]=o)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(i=>{let o=this.getAttribute(i);if(o!=null){let s=i.replace(/-([a-z])/g,a=>a[1].toUpperCase());n.commerce[s]=o}}),n},Li=function(r){return["on","true",!0].includes(this.getAttribute(`data-${r}`)||w(r))};window.customElements.get(Si)||window.customElements.define(Si,Lr);var We=class We extends st(HTMLButtonElement){static createCheckoutButton(t={},r=""){return ot(We,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};b(We,"is","checkout-button"),b(We,"tag","button");var Ce=We;window.customElements.get(Ce.is)||window.customElements.define(Ce.is,Ce,{extends:Ce.tag});function oa(e){return`https://${e==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var xe,ge=class ge extends HTMLAnchorElement{constructor(){super();b(this,"masElement",new ce(this));ie(this,xe);this.setAttribute("is",ge.is)}get isUptLink(){return!0}initializeWcsData(r,n){this.setAttribute("data-wcs-osi",r),n&&this.setAttribute("data-promotion-code",n)}attributeChangedCallback(r,n,i){this.masElement.attributeChangedCallback(r,n,i)}connectedCallback(){this.masElement.connectedCallback(),oe(this,xe,vr()),z(this,xe)&&(this.log=z(this,xe).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),oe(this,xe,void 0)}requestUpdate(r=!1){this.masElement.requestUpdate(r)}onceSettled(){return this.masElement.onceSettled()}async render(){let r=vr();if(!r)return!1;this.dataset.imsCountry||r.imsCountryPromise.then(s=>{s&&(this.dataset.imsCountry=s)});let n=r.collectCheckoutOptions({},this);if(!n.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let i=this.masElement.togglePending(n),o=r.resolveOfferSelectors(n);try{let[[s]]=await Promise.all(o),{country:a,language:c,env:u}=n,l=`locale=${c}_${a}&country=${a}&offer_id=${s.offerId}`,p=this.getAttribute("data-promotion-code");p&&(l+=`&promotion_code=${encodeURIComponent(p)}`),this.href=`${oa(u)}?${l}`,this.masElement.toggleResolved(i,s,n)}catch(s){let a=new Error(`Could not resolve offer selectors for id: ${n.wcsOsi}.`,s.message);return this.masElement.toggleFailed(i,a,n),!1}}static createFrom(r){let n=new ge;for(let i of r.attributes)i.name!=="is"&&(i.name==="class"&&i.value.includes("upt-link")?n.setAttribute("class",i.value.replace("upt-link","").trim()):n.setAttribute(i.name,i.value));return n.innerHTML=r.innerHTML,n.setAttribute("tabindex",0),n}};xe=new WeakMap,b(ge,"is","upt-link"),b(ge,"tag","a"),b(ge,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var Le=ge;window.customElements.get(Le.is)||window.customElements.define(Le.is,Le,{extends:Le.tag});export{Br as CheckoutWorkflow,G as CheckoutWorkflowStep,_ as Defaults,Y as Log,Oe as applyPlanType,Ai as resolvePriceTaxFlags}; diff --git a/web-components/dist/mas.js b/web-components/dist/mas.js index f146af686..5fe1ce29d 100644 --- a/web-components/dist/mas.js +++ b/web-components/dist/mas.js @@ -639,7 +639,7 @@ var Da=Object.defineProperty;var za=e=>{throw TypeError(e)};var el=(e,t,r)=>t in `);customElements.define("mas-mnemonic",xt)});var Ze={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals","element"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},Ba=1e3;function tl(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function Ua(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:i,originatingRequest:n,status:a}=e;return[i,a,n].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Ze.serializableTypes.includes(r))return r}return e}function rl(e,t){if(!Ze.ignoredProperties.includes(e))return Ua(t)}var ji={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,i=[],n=[],a=t;r.forEach(l=>{l!=null&&(tl(l)?i:n).push(l)}),i.length&&(a+=" "+i.map(Ua).join(" "));let{pathname:o,search:s}=window.location,c=`${Ze.delimiter}page=${o}${s}`;c.length>Ba&&(c=`${c.slice(0,Ba)}`),a+=c,n.length&&(a+=`${Ze.delimiter}facts=`,a+=JSON.stringify(n,rl)),window.lana?.log(a,Ze)}};function Qr(e){Object.assign(Ze,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Ze&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var pn={};$a(pn,{CLASS_NAME_FAILED:()=>Qi,CLASS_NAME_HIDDEN:()=>nl,CLASS_NAME_PENDING:()=>Zi,CLASS_NAME_RESOLVED:()=>Ji,CheckoutWorkflow:()=>Ga,CheckoutWorkflowStep:()=>oe,Commitment:()=>Je,ERROR_MESSAGE_BAD_REQUEST:()=>en,ERROR_MESSAGE_MISSING_LITERALS_URL:()=>ul,ERROR_MESSAGE_OFFER_NOT_FOUND:()=>tn,EVENT_AEM_ERROR:()=>rt,EVENT_AEM_LOAD:()=>tt,EVENT_MAS_ERROR:()=>Ki,EVENT_MAS_READY:()=>Xi,EVENT_MERCH_ADDON_AND_QUANTITY_UPDATE:()=>Jr,EVENT_MERCH_CARD_ACTION_MENU_TOGGLE:()=>Wi,EVENT_MERCH_CARD_COLLECTION_LITERALS_CHANGED:()=>et,EVENT_MERCH_CARD_COLLECTION_SHOWMORE:()=>pl,EVENT_MERCH_CARD_COLLECTION_SIDENAV_ATTACHED:()=>hl,EVENT_MERCH_CARD_COLLECTION_SORT:()=>dl,EVENT_MERCH_CARD_QUANTITY_CHANGE:()=>Tt,EVENT_MERCH_OFFER_READY:()=>_t,EVENT_MERCH_OFFER_SELECT_READY:()=>lr,EVENT_MERCH_QUANTITY_SELECTOR_CHANGE:()=>ae,EVENT_MERCH_SEARCH_CHANGE:()=>ll,EVENT_MERCH_SIDENAV_SELECT:()=>ml,EVENT_MERCH_STOCK_CHANGE:()=>sl,EVENT_MERCH_STORAGE_CHANGE:()=>cl,EVENT_OFFER_SELECTED:()=>Yi,EVENT_TYPE_FAILED:()=>rn,EVENT_TYPE_READY:()=>Zr,EVENT_TYPE_RESOLVED:()=>Ct,Env:()=>Pe,FF_DEFAULTS:()=>we,HEADER_X_REQUEST_ID:()=>dr,LOG_NAMESPACE:()=>nn,Landscape:()=>Ge,MARK_DURATION_SUFFIX:()=>at,MARK_START_SUFFIX:()=>nt,MODAL_TYPE_3_IN_1:()=>it,NAMESPACE:()=>il,PARAM_AOS_API_KEY:()=>gl,PARAM_ENV:()=>on,PARAM_LANDSCAPE:()=>sn,PARAM_MAS_PREVIEW:()=>an,PARAM_WCS_API_KEY:()=>fl,PROVIDER_ENVIRONMENT:()=>dn,SELECTOR_MAS_CHECKOUT_LINK:()=>ye,SELECTOR_MAS_ELEMENT:()=>cr,SELECTOR_MAS_INLINE_PRICE:()=>H,SELECTOR_MAS_SP_BUTTON:()=>ol,SELECTOR_MAS_UPT_LINK:()=>Fa,SORT_ORDER:()=>yl,STATE_FAILED:()=>Ee,STATE_PENDING:()=>Fe,STATE_RESOLVED:()=>Oe,SUPPORTED_COUNTRIES:()=>hn,TAG_NAME_SERVICE:()=>al,TEMPLATE_PRICE:()=>xl,TEMPLATE_PRICE_ANNUAL:()=>bl,TEMPLATE_PRICE_LEGAL:()=>hr,TEMPLATE_PRICE_STRIKETHROUGH:()=>vl,Term:()=>fe,WCS_PROD_URL:()=>cn,WCS_STAGE_URL:()=>ln});var Je=Object.freeze({MONTH:"MONTH",YEAR:"YEAR",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",PERPETUAL:"PERPETUAL",TERM_LICENSE:"TERM_LICENSE",ACCESS_PASS:"ACCESS_PASS",THREE_MONTHS:"THREE_MONTHS",SIX_MONTHS:"SIX_MONTHS"}),fe=Object.freeze({ANNUAL:"ANNUAL",MONTHLY:"MONTHLY",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",P1D:"P1D",P1Y:"P1Y",P3Y:"P3Y",P10Y:"P10Y",P15Y:"P15Y",P3D:"P3D",P7D:"P7D",P30D:"P30D",HALF_YEARLY:"HALF_YEARLY",QUARTERLY:"QUARTERLY"}),il="merch",nl="hidden",Zr="wcms:commerce:ready",al="mas-commerce-service",H='span[is="inline-price"][data-wcs-osi]',ye='a[is="checkout-link"][data-wcs-osi],button[is="checkout-button"][data-wcs-osi]',ol="sp-button[data-wcs-osi]",Fa='a[is="upt-link"]',cr=`${H},${ye},${Fa}`,_t="merch-offer:ready",lr="merch-offer-select:ready",Wi="merch-card:action-menu-toggle",Yi="merch-offer:selected",sl="merch-stock:change",cl="merch-storage:change",ae="merch-quantity-selector:change",Tt="merch-card-quantity:change",Jr="merch-modal:addon-and-quantity-update",ll="merch-search:change",dl="merch-card-collection:sort",et="merch-card-collection:literals-changed",hl="merch-card-collection:sidenav-attached",pl="merch-card-collection:showmore",ml="merch-sidenav:select",tt="aem:load",rt="aem:error",Xi="mas:ready",Ki="mas:error",Qi="placeholder-failed",Zi="placeholder-pending",Ji="placeholder-resolved",en="Bad WCS request",tn="Commerce offer not found",ul="Literals URL not provided",rn="mas:failed",Ct="mas:resolved",nn="mas/commerce",an="mas.preview",on="commerce.env",sn="commerce.landscape",gl="commerce.aosKey",fl="commerce.wcsKey",cn="https://www.adobe.com/web_commerce_artifact",ln="https://www.stage.adobe.com/web_commerce_artifact_stage",Ee="failed",Fe="pending",Oe="resolved",Ge={DRAFT:"DRAFT",PUBLISHED:"PUBLISHED"},dr="X-Request-Id",oe=Object.freeze({SEGMENTATION:"segmentation",BUNDLE:"bundle",COMMITMENT:"commitment",RECOMMENDATION:"recommendation",EMAIL:"email",PAYMENT:"payment",CHANGE_PLAN_TEAM_PLANS:"change-plan/team-upgrade/plans",CHANGE_PLAN_TEAM_PAYMENT:"change-plan/team-upgrade/payment"}),Ga="UCv3",Pe=Object.freeze({STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"}),dn={PRODUCTION:"PRODUCTION"},it={TWP:"twp",D2P:"d2p",CRM:"crm"},nt=":start",at=":duration",xl="price",vl="price-strikethrough",bl="annual",hr="legal",we="mas-ff-defaults",yl={alphabetical:"alphabetical",authored:"authored"},hn=["AE","AM","AR","AT","AU","AZ","BB","BD","BE","BG","BH","BO","BR","BS","BY","CA","CH","CL","CN","CO","CR","CY","CZ","DE","DK","DO","DZ","EC","EE","EG","ES","FI","FR","GB","GE","GH","GR","GT","HK","HN","HR","HU","ID","IE","IL","IN","IQ","IS","IT","JM","JO","JP","KE","KG","KR","KW","KZ","LA","LB","LK","LT","LU","LV","MA","MD","MO","MT","MU","MX","MY","NG","NI","NL","NO","NP","NZ","OM","PA","PE","PH","PK","PL","PR","PT","PY","QA","RO","RS","RU","SA","SE","SG","SI","SK","SV","TH","TJ","TM","TN","TR","TT","TW","TZ","UA","US","UY","UZ","VE","VN","YE","ZA"];var qa="tacocat.js";var mn=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),Va=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function B(e,t={},{metadata:r=!0,search:i=!0,storage:n=!0}={}){let a;if(i&&a==null){let o=new URLSearchParams(window.location.search),s=kt(i)?i:e;a=o.get(s)}if(n&&a==null){let o=kt(n)?n:e;a=window.sessionStorage.getItem(o)??window.localStorage.getItem(o)}if(r&&a==null){let o=wl(kt(r)?r:e);a=document.documentElement.querySelector(`meta[name="${o}"]`)?.content}return a??t[e]}var El=e=>typeof e=="boolean",ei=e=>typeof e=="function",ti=e=>typeof e=="number",ja=e=>e!=null&&typeof e=="object";var kt=e=>typeof e=="string",Wa=e=>kt(e)&&e,pr=e=>ti(e)&&Number.isFinite(e)&&e>0;function ri(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,i])=>{t(i)&&delete e[r]}),e}function _(e,t){if(El(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function mr(e,t,r){let i=Object.values(t);return i.find(n=>mn(n,e))??r??i[0]}function wl(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,i)=>`${r}-${i}`).replace(/\W+/gu,"-").toLowerCase()}function Ya(e,t=1){return ti(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Al=Date.now(),un=()=>`(+${Date.now()-Al}ms)`,ii=new Set,Sl=_(B("tacocat.debug",{},{metadata:!1}),!1);function Xa(e){let t=`[${qa}/${e}]`,r=(o,s,...c)=>o?!0:(n(s,...c),!1),i=Sl?(o,...s)=>{console.debug(`${t} ${o}`,...s,un())}:()=>{},n=(o,...s)=>{let c=`${t} ${o}`;ii.forEach(([l])=>l(c,...s))};return{assert:r,debug:i,error:n,warn:(o,...s)=>{let c=`${t} ${o}`;ii.forEach(([,l])=>l(c,...s))}}}function _l(e,t){let r=[e,t];return ii.add(r),()=>{ii.delete(r)}}_l((e,...t)=>{console.error(e,...t,un())},(e,...t)=>{console.warn(e,...t,un())});var Tl="no promo",Ka="promo-tag",Cl="yellow",kl="neutral",Pl=(e,t,r)=>{let i=a=>a||Tl,n=r?` (was "${i(t)}")`:"";return`${i(e)}${n}`},Ll="cancel-context",ni=(e,t)=>{let r=e===Ll,i=!r&&e?.length>0,n=(i||r)&&(t&&t!=e||!t&&!r),a=n&&i||!n&&!!t,o=a?e||t:void 0;return{effectivePromoCode:o,overridenPromoCode:e,className:a?Ka:`${Ka} no-promo`,text:Pl(o,t,n),variant:a?Cl:kl,isOverriden:n}};var gn;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(gn||(gn={}));var me;(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"})(me||(me={}));var xe;(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"})(xe||(xe={}));var fn;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(fn||(fn={}));var xn;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(xn||(xn={}));var vn;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(vn||(vn={}));var bn;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(bn||(bn={}));var yn="ABM",En="PUF",wn="M2M",An="PERPETUAL",Sn="P3Y",Rl="TAX_INCLUSIVE_DETAILS",Ml="TAX_EXCLUSIVE",Qa={ABM:yn,PUF:En,M2M:wn,PERPETUAL:An,P3Y:Sn},dp={[yn]:{commitment:me.YEAR,term:xe.MONTHLY},[En]:{commitment:me.YEAR,term:xe.ANNUAL},[wn]:{commitment:me.MONTH,term:xe.MONTHLY},[An]:{commitment:me.PERPETUAL,term:void 0},[Sn]:{commitment:me.THREE_MONTHS,term:xe.P3Y}},Za="Value is not an offer",ur=e=>{if(typeof e!="object")return Za;let{commitment:t,term:r}=e,i=Ol(t,r);return{...e,planType:i}};var Ol=(e,t)=>{switch(e){case void 0:return Za;case"":return"";case me.YEAR:return t===xe.MONTHLY?yn:t===xe.ANNUAL?En:"";case me.MONTH:return t===xe.MONTHLY?wn:"";case me.PERPETUAL:return An;case me.TERM_LICENSE:return t===xe.P3Y?Sn:"";default:return""}};function Ja(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:i,priceWithoutTax:n,priceWithoutDiscountAndTax:a,taxDisplay:o}=t;if(o!==Rl)return e;let s={...e,priceDetails:{...t,price:n??r,priceWithoutDiscount:a??i,taxDisplay:Ml}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var Nl="mas-commerce-service",Il={requestId:dr,etag:"Etag",lastModified:"Last-Modified",serverTiming:"server-timing"};function gr(e,{country:t,forceTaxExclusive:r}){let i;if(e.length<2)i=e;else{let n=t==="GB"?"EN":"MULT";e.sort((a,o)=>a.language===n?-1:o.language===n?1:0),e.sort((a,o)=>!a.term&&o.term?-1:a.term&&!o.term?1:0),i=[e[0]]}return r&&(i=i.map(Ja)),i}var ai=e=>window.setTimeout(e);function Pt(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(Ya).filter(pr);return r.length||(r=[t]),r}function oi(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(Wa)}function le(){return document.getElementsByTagName(Nl)?.[0]}function si(e){let t={};if(!e?.headers)return t;let r=e.headers;for(let[i,n]of Object.entries(Il)){let a=r.get(n);a&&(a=a.replace(/[,;]/g,"|"),a=a.replace(/[| ]+/g,"|"),t[i]=a)}return t}var eo={LOCAL:"local",PROD:"prod",STAGE:"stage"},_n={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},Tn=new Set,Cn=new Set,to=new Map,ro={append({level:e,message:t,params:r,timestamp:i,source:n}){console[e](`${i}ms [${n}] %c${t}`,"font-weight: bold;",...r)}},io={filter:({level:e})=>e!==_n.DEBUG},Dl={filter:()=>!1};function zl(e,t,r,i,n){return{level:e,message:t,namespace:r,get params(){return i.length===1&&ei(i[0])&&(i=i[0](),Array.isArray(i)||(i=[i])),i},source:n,timestamp:performance.now().toFixed(3)}}function $l(e){[...Cn].every(t=>t(e))&&Tn.forEach(t=>t(e))}function no(e){let t=(to.get(e)??0)+1;to.set(e,t);let r=`${e} #${t}`,i={id:r,namespace:e,module:n=>no(`${i.namespace}/${n}`),updateConfig:Qr};return Object.values(_n).forEach(n=>{i[n]=(a,...o)=>$l(zl(n,a,e,o,r))}),Object.seal(i)}function ci(...e){e.forEach(t=>{let{append:r,filter:i}=t;ei(i)&&Cn.add(i),ei(r)&&Tn.add(r)})}function Hl(e={}){let{name:t}=e,r=_(B("commerce.debug",{search:!0,storage:!0}),t===eo.LOCAL);return ci(r?ro:io),t===eo.PROD&&ci(ji),ue}function Bl(){Tn.clear(),Cn.clear()}var ue={...no(nn),Level:_n,Plugins:{consoleAppender:ro,debugFilter:io,quietFilter:Dl,lanaAppender:ji},init:Hl,reset:Bl,use:ci};var Ne=class e extends Error{constructor(t,r,i){if(super(t,{cause:i}),this.name="MasError",r.response){let n=r.response.headers?.get(dr);n&&(r.requestId=n),r.response.status&&(r.status=r.response.status,r.statusText=r.response.statusText),r.response.url&&(r.url=r.response.url)}delete r.response,this.context=r,Error.captureStackTrace&&Error.captureStackTrace(this,e)}toString(){let t=Object.entries(this.context||{}).map(([i,n])=>`${i}: ${JSON.stringify(n)}`).join(", "),r=`${this.name}: ${this.message}`;return t&&(r+=` (${t})`),this.cause&&(r+=` Caused by: ${this.cause}`),r}};var Ul={[Ee]:Qi,[Fe]:Zi,[Oe]:Ji},Fl={[Ee]:rn,[Oe]:Ct},fr,qe=class{constructor(t){E(this,fr);m(this,"changes",new Map);m(this,"connected",!1);m(this,"error");m(this,"log");m(this,"options");m(this,"promises",[]);m(this,"state",Fe);m(this,"timer",null);m(this,"value");m(this,"version",0);m(this,"wrapperElement");this.wrapperElement=t,this.log=ue.module("mas-element")}update(){[Ee,Fe,Oe].forEach(t=>{this.wrapperElement.classList.toggle(Ul[t],t===this.state)})}notify(){(this.state===Oe||this.state===Ee)&&(this.state===Oe?this.promises.forEach(({resolve:r})=>r(this.wrapperElement)):this.state===Ee&&this.promises.forEach(({reject:r})=>r(this.error)),this.promises=[]);let t=this.error;this.error instanceof Ne&&(t={message:this.error.message,...this.error.context}),this.wrapperElement.dispatchEvent(new CustomEvent(Fl[this.state],{bubbles:!0,detail:t}))}attributeChangedCallback(t,r,i){this.changes.set(t,i),this.requestUpdate()}connectedCallback(){y(this,fr,le()),this.requestUpdate(!0)}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement}))}onceSettled(){let{error:t,promises:r,state:i}=this;return Oe===i?Promise.resolve(this.wrapperElement):Ee===i?Promise.reject(t):new Promise((n,a)=>{r.push({resolve:n,reject:a})})}toggleResolved(t,r,i){return t!==this.version?!1:(i!==void 0&&(this.options=i),this.state=Oe,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),ai(()=>this.notify()),!0)}toggleFailed(t,r,i){if(t!==this.version)return!1;i!==void 0&&(this.options=i),this.error=r,this.state=Ee,this.update();let n=this.wrapperElement.getAttribute("is");return this.log?.error(`${n}: Failed to render: ${r.message}`,{element:this.wrapperElement,...r.context,...h(this,fr)?.duration}),ai(()=>this.notify()),!0}togglePending(t){return this.version++,t&&(this.options=t),this.state=Fe,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!le()||this.timer)return;let{error:r,options:i,state:n,value:a,version:o}=this;this.state=Fe,this.timer=ai(async()=>{this.timer=null;let s=null;if(this.changes.size&&(s=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:s}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:s})),s||t)try{await this.wrapperElement.render?.()===!1&&this.state===Fe&&this.version===o&&(this.state=n,this.error=r,this.value=a,this.update(),this.notify())}catch(c){this.toggleFailed(this.version,c,i)}})}};fr=new WeakMap;function ao(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function li(e,t={}){let{tag:r,is:i}=e,n=document.createElement(r,{is:i});return n.setAttribute("is",i),Object.assign(n.dataset,ao(t)),n}function oo(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,ao(t)),e):null}var Gl=/[0-9\-+#]/,ql=/[^\d\-+#]/g;function so(e){return e.search(Gl)}function Vl(e="#.##"){let t={},r=e.length,i=so(e);t.prefix=i>0?e.substring(0,i):"";let n=so(e.split("").reverse().join("")),a=r-n,o=e.substring(a,a+1),s=a+(o==="."||o===","?1:0);t.suffix=n>0?e.substring(s,r):"",t.mask=e.substring(i,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(ql);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 jl(e,t,r){let i=!1,n={value:e};e<0&&(i=!0,n.value=-n.value),n.sign=i?"-":"",n.value=Number(n.value).toFixed(t.fraction&&t.fraction.length),n.value=Number(n.value).toString();let a=t.fraction&&t.fraction.lastIndexOf("0"),[o="0",s=""]=n.value.split(".");return(!s||s&&s.length<=a)&&(s=a<0?"":(+("0."+s)).toFixed(a+1).replace("0.","")),n.integer=o,n.fraction=s,Wl(n,t),(n.result==="0"||n.result==="")&&(i=!1,n.sign=""),!i&&t.maskHasPositiveSign?n.sign="+":i&&t.maskHasPositiveSign?n.sign="-":i&&(n.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),n}function Wl(e,t){e.result="";let r=t.integer.split(t.separator),i=r.join(""),n=i&&i.indexOf("0");if(n>-1)for(;e.integer.lengthe*12,st=(e,t,r=1)=>{if(!e)return!1;let{start:i,end:n,displaySummary:{amount:a,duration:o,minProductQuantity:s=1,outcomeType:c}={}}=e;if(!(a&&o&&c)||r=d&&l<=p},ot={MONTH:"MONTH",YEAR:"YEAR"},Kl={[fe.ANNUAL]:12,[fe.MONTHLY]:1,[fe.THREE_YEARS]:36,[fe.TWO_YEARS]:24},Pn=(e,t)=>({accept:e,round:t}),Ql=[Pn(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Pn(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Pn(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Ln={[Je.YEAR]:{[fe.MONTHLY]:ot.MONTH,[fe.ANNUAL]:ot.YEAR},[Je.MONTH]:{[fe.MONTHLY]:ot.MONTH}},Zl=(e,t)=>e.indexOf(`'${t}'`)===0,Jl=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),i=go(r);return!!i?t||(r=r.replace(/[,\.]0+/,i)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+td(e)),r},ed=e=>{let t=rd(e),r=Zl(e,t),i=e.replace(/'.*?'/,""),n=po.test(i)||mo.test(i);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:n}},uo=e=>e.replace(po,ho).replace(mo,ho),td=e=>e.match(/#(.?)#/)?.[1]===lo?Xl:lo,rd=e=>e.match(/'(.*?)'/)?.[1]??"",go=e=>e.match(/0(.?)0/)?.[1]??"";function Lt({formatString:e,price:t,usePrecision:r,isIndianPrice:i=!1},n,a=o=>o){let{currencySymbol:o,isCurrencyFirst:s,hasCurrencySpace:c}=ed(e),l=r?go(e):"",d=Jl(e,r),p=r?2:0,u=a(t,{currencySymbol:o}),g=i?u.toLocaleString("hi-IN",{minimumFractionDigits:p,maximumFractionDigits:p}):co(d,u),x=r?g.lastIndexOf(l):g.length,v=g.substring(0,x),A=g.substring(x+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,g).replace(/SYMBOL/,o),currencySymbol:o,decimals:A,decimalsDelimiter:l,hasCurrencySpace:c,integer:v,isCurrencyFirst:s,recurrenceTerm:n}}var fo=e=>{let{commitment:t,term:r,usePrecision:i}=e,n=Kl[r]??1;return Lt(e,n>1?ot.MONTH:Ln[t]?.[r],a=>{let o={divisor:n,price:a,usePrecision:i},{round:s}=Ql.find(({accept:c})=>c(o));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(o)}`);return s(o)})},xo=({commitment:e,term:t,...r})=>Lt(r,Ln[e]?.[t]),vo=e=>{let{commitment:t,instant:r,price:i,originalPrice:n,priceWithoutDiscount:a,promotion:o,quantity:s=1,term:c}=e;if(t===Je.YEAR&&c===fe.MONTHLY){if(!o)return Lt(e,ot.YEAR,kn);let{displaySummary:{outcomeType:l,duration:d}={}}=o;switch(l){case"PERCENTAGE_DISCOUNT":if(st(o,r,s)){let p=parseInt(d.replace("P","").replace("M",""));if(isNaN(p))return kn(i);let u=n*p,g=a*(12-p),x=Math.round((u+g)*100)/100;return Lt({...e,price:x},ot.YEAR)}default:return Lt(e,ot.YEAR,()=>kn(a??i))}}return Lt(e,Ln[t]?.[c])};var bo="download",yo="upgrade",Eo={e:"EDU",t:"TEAM"};function di(e,t={},r=""){let i=le();if(!i)return null;let{checkoutMarketSegment:n,checkoutWorkflow:a,checkoutWorkflowStep:o,entitlement:s,upgrade:c,modal:l,perpetual:d,promotionCode:p,quantity:u,wcsOsi:g,extraOptions:x,analyticsId:v}=i.collectCheckoutOptions(t),A=li(e,{checkoutMarketSegment:n,checkoutWorkflow:a,checkoutWorkflowStep:o,entitlement:s,upgrade:c,modal:l,perpetual:d,promotionCode:p,quantity:u,wcsOsi:g,extraOptions:x,analyticsId:v});return r&&(A.innerHTML=`${r}`),A}function hi(e){return class extends e{constructor(){super(...arguments);m(this,"checkoutActionHandler");m(this,"masElement",new qe(this))}attributeChangedCallback(i,n,a){this.masElement.attributeChangedCallback(i,n,a)}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}get marketSegment(){let i=this.options?.ms??this.value?.[0].marketSegments?.[0];return Eo[i]??i}get customerSegment(){let i=this.options?.cs??this.value?.[0]?.customerSegment;return Eo[i]??i}get is3in1Modal(){return Object.values(it).includes(this.getAttribute("data-modal"))}get isOpen3in1Modal(){let i=document.querySelector("meta[name=mas-ff-3in1]");return this.is3in1Modal&&(!i||i.content!=="off")}requestUpdate(i=!1){return this.masElement.requestUpdate(i)}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(i={}){let n=le();if(!n)return!1;this.dataset.imsCountry||n.imsCountryPromise.then(g=>{g&&(this.dataset.imsCountry=g)}),i.imsCountry=null;let a=n.collectCheckoutOptions(i,this);if(!a.wcsOsi.length)return!1;let o;try{o=JSON.parse(a.extraOptions??"{}")}catch(g){this.masElement.log?.error("cannot parse exta checkout options",g)}let s=this.masElement.togglePending(a);this.setCheckoutUrl("");let c=n.resolveOfferSelectors(a),l=await Promise.all(c);l=l.map(g=>gr(g,a));let d=l.flat().find(g=>g.promotion);!st(d?.promotion,d?.promotion?.displaySummary?.instant,a.quantity[0])&&a.promotionCode&&delete a.promotionCode,a.country=this.dataset.imsCountry||a.country;let u=await n.buildCheckoutAction?.(l.flat(),{...o,...a},this);return this.renderOffers(l.flat(),a,{},u,s)}renderOffers(i,n,a={},o=void 0,s=void 0){let c=le();if(!c)return!1;if(n={...JSON.parse(this.dataset.extraOptions??"{}"),...n,...a},s??(s=this.masElement.togglePending(n)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),o){this.classList.remove(bo,yo),this.masElement.toggleResolved(s,i,n);let{url:d,text:p,className:u,handler:g}=o;d&&this.setCheckoutUrl(d),p&&(this.firstElementChild.innerHTML=p),u&&this.classList.add(...u.split(" ")),g&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=g.bind(this))}if(i.length){if(this.masElement.toggleResolved(s,i,n)){if(!this.classList.contains(bo)&&!this.classList.contains(yo)){let d=c.buildCheckoutURL(i,n);this.setCheckoutUrl(n.modal==="true"?"#":d)}return!0}}else{let d=new Error(`Not provided: ${n?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,d,n))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(i){}updateOptions(i={}){let n=le();if(!n)return!1;let{checkoutMarketSegment:a,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:d,perpetual:p,promotionCode:u,quantity:g,wcsOsi:x}=n.collectCheckoutOptions(i);return oo(this,{checkoutMarketSegment:a,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:d,perpetual:p,promotionCode:u,quantity:g,wcsOsi:x}),!0}}}var xr=class xr extends hi(HTMLAnchorElement){static createCheckoutLink(t={},r=""){return di(xr,t,r)}setCheckoutUrl(t){this.setAttribute("href",t)}get isCheckoutLink(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}}};m(xr,"is","checkout-link"),m(xr,"tag","a");var Ie=xr;window.customElements.get(Ie.is)||window.customElements.define(Ie.is,Ie,{extends:Ie.tag});var id="p_draft_landscape",nd="/store/",ad=new Map([["countrySpecific","cs"],["customerSegment","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["addonProductArrangementCode","ao"],["offerType","ot"],["marketSegment","ms"]]),Rn=new Set(["af","ai","ao","apc","appctxid","cli","co","cs","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"]),od=["env","workflowStep","clientId","country"],wo=new Set(["gid","gtoken","notifauditid","cohortid","productname","sdid","attimer","gcsrc","gcprog","gcprogcat","gcpagetype"]),Ao=e=>ad.get(e)??e;function pi(e,t,r){for(let[i,n]of Object.entries(e)){let a=Ao(i);n!=null&&r.has(a)&&t.set(a,n)}}function sd(e){switch(e){case dn.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function cd(e,t){for(let r in e){let i=e[r];for(let[n,a]of Object.entries(i)){if(a==null)continue;let o=Ao(n);t.set(`items[${r}][${o}]`,a)}}}function ld({url:e,modal:t,is3in1:r}){if(!r||!e?.searchParams)return e;e.searchParams.set("rtc","t"),e.searchParams.set("lo","sl");let i=e.searchParams.get("af");return e.searchParams.set("af",[i,"uc_new_user_iframe","uc_new_system_close"].filter(Boolean).join(",")),e.searchParams.get("cli")!=="doc_cloud"&&e.searchParams.set("cli",t===it.CRM?"creative":"mini_plans"),e}function dd(e){let t=new URLSearchParams(window.location.search),r={};wo.forEach(i=>{let n=t.get(i);n!==null&&(r[i]=n)}),Object.keys(r).length>0&&pi(r,e.searchParams,wo)}function So(e){hd(e);let{env:t,items:r,workflowStep:i,marketSegment:n,customerSegment:a,offerType:o,productArrangementCode:s,landscape:c,modal:l,is3in1:d,preselectPlan:p,...u}=e,g=new URL(sd(t));if(g.pathname=`${nd}${i}`,i!==oe.SEGMENTATION&&i!==oe.CHANGE_PLAN_TEAM_PLANS&&cd(r,g.searchParams),pi({...u},g.searchParams,Rn),dd(g),c===Ge.DRAFT&&pi({af:id},g.searchParams,Rn),i===oe.SEGMENTATION){let x={marketSegment:n,offerType:o,customerSegment:a,productArrangementCode:s,quantity:r?.[0]?.quantity,addonProductArrangementCode:s?r?.find(v=>v.productArrangementCode!==s)?.productArrangementCode:r?.[1]?.productArrangementCode};p?.toLowerCase()==="edu"?g.searchParams.set("ms","EDU"):p?.toLowerCase()==="team"&&g.searchParams.set("cs","TEAM"),pi(x,g.searchParams,Rn),g.searchParams.get("ot")==="PROMOTION"&&g.searchParams.delete("ot"),g=ld({url:g,modal:l,is3in1:d})}return g.toString()}function hd(e){for(let t of od)if(!e[t])throw new Error(`Argument "checkoutData" is not valid, missing: ${t}`);if(e.workflowStep!==oe.SEGMENTATION&&e.workflowStep!==oe.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}var P=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflowStep:oe.EMAIL,country:"US",displayOldPrice:!1,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,displayPlanType:!1,env:Pe.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,alternativePrice:!1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:Ge.PUBLISHED});function _o({settings:e,providers:t}){function r(a,o){let{checkoutClientId:s,checkoutWorkflowStep:c,country:l,language:d,promotionCode:p,quantity:u,preselectPlan:g,env:x}=e,v={checkoutClientId:s,checkoutWorkflowStep:c,country:l,language:d,promotionCode:p,quantity:u,preselectPlan:g,env:x};if(o)for(let Ue of t.checkout)Ue(o,v);let{checkoutMarketSegment:A,checkoutWorkflowStep:N=c,imsCountry:M,country:w=M??l,language:I=d,quantity:j=u,entitlement:G,upgrade:X,modal:Z,perpetual:ce,promotionCode:K=p,wcsOsi:W,extraOptions:z,...ge}=Object.assign(v,o?.dataset??{},a??{}),ke=mr(N,oe,P.checkoutWorkflowStep);return v=ri({...ge,extraOptions:z,checkoutClientId:s,checkoutMarketSegment:A,country:w,quantity:Pt(j,P.quantity),checkoutWorkflowStep:ke,language:I,entitlement:_(G),upgrade:_(X),modal:Z,perpetual:_(ce),promotionCode:ni(K).effectivePromoCode,wcsOsi:oi(W),preselectPlan:g}),v}function i(a,o){if(!Array.isArray(a)||!a.length||!o)return"";let{env:s,landscape:c}=e,{checkoutClientId:l,checkoutMarketSegment:d,checkoutWorkflowStep:p,country:u,promotionCode:g,quantity:x,preselectPlan:v,ms:A,cs:N,...M}=r(o),w=document.querySelector("meta[name=mas-ff-3in1]"),I=Object.values(it).includes(o.modal)&&(!w||w.content!=="off"),j=window.frameElement||I?"if":"fp",[{productArrangementCode:G,marketSegments:[X],customerSegment:Z,offerType:ce}]=a,K=A??X??d,W=N??Z;v?.toLowerCase()==="edu"?K="EDU":v?.toLowerCase()==="team"&&(W="TEAM");let z={is3in1:I,checkoutPromoCode:g,clientId:l,context:j,country:u,env:s,items:[],marketSegment:K,customerSegment:W,offerType:ce,productArrangementCode:G,workflowStep:p,landscape:c,...M},ge=x[0]>1?x[0]:void 0;if(a.length===1){let{offerId:ke}=a[0];z.items.push({id:ke,quantity:ge})}else z.items.push(...a.map(({offerId:ke,productArrangementCode:Ue})=>({id:ke,quantity:ge,...I?{productArrangementCode:Ue}:{}})));return So(z)}let{createCheckoutLink:n}=Ie;return{CheckoutLink:Ie,CheckoutWorkflowStep:oe,buildCheckoutURL:i,collectCheckoutOptions:r,createCheckoutLink:n}}function pd({interval:e=200,maxAttempts:t=25}={}){let r=ue.module("ims");return new Promise(i=>{r.debug("Waing for IMS to be ready");let n=0;function a(){window.adobeIMS?.initialized?i():++n>t?(r.debug("Timeout"),i()):setTimeout(a,e)}a()})}function md(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function ud(e){let t=ue.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:i})=>(t.debug("Got user country:",i),i),i=>{t.error("Unable to get user country:",i)}):null)}function To({}){let e=pd(),t=md(e),r=ud(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}var Co=window.masPriceLiterals;function ko(e){if(Array.isArray(Co)){let t=i=>Co.find(n=>mn(n.lang,i)),r=t(e.language)??t(P.language);if(r)return Object.freeze(r)}return{}}var Mn=function(e,t){return Mn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},Mn(e,t)};function vr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Mn(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var C=function(){return C=Object.assign||function(t){for(var r,i=1,n=arguments.length;i0}),r=[],i=0,n=t;i1)throw new RangeError("integer-width stems only accept a single optional option");n.options[0].replace(xd,function(c,l,d,p,u,g){if(l)t.minimumIntegerDigits=d.length;else{if(p&&u)throw new Error("We currently do not support maximum integer digits");if(g)throw new Error("We currently do not support exact integer digits")}return""});continue}if($o.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(Oo.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(Oo,function(c,l,d,p,u,g){return d==="*"?t.minimumFractionDigits=l.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:u&&g?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+g.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var a=n.options[0];a==="w"?t=C(C({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=C(C({},t),No(a)));continue}if(zo.test(n.stem)){t=C(C({},t),No(n.stem));continue}var o=Ho(n.stem);o&&(t=C(C({},t),o));var s=vd(n.stem);s&&(t=C(C({},t),s))}return t}var yr={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 Uo(e,t){for(var r="",i=0;i>1),c="a",l=bd(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;o-- >0;)r=l+r}else n==="J"?r+="H":r+=n}return r}function bd(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,i;r!=="root"&&(i=e.maximize().region);var n=yr[i||""]||yr[r||""]||yr["".concat(r,"-001")]||yr["001"];return n[0]}var In,yd=new RegExp("^".concat(Nn.source,"*")),Ed=new RegExp("".concat(Nn.source,"*$"));function k(e,t){return{start:e,end:t}}var wd=!!String.prototype.startsWith,Ad=!!String.fromCodePoint,Sd=!!Object.fromEntries,_d=!!String.prototype.codePointAt,Td=!!String.prototype.trimStart,Cd=!!String.prototype.trimEnd,kd=!!Number.isSafeInteger,Pd=kd?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},zn=!0;try{Fo=jo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),zn=((In=Fo.exec("a"))===null||In===void 0?void 0:In[0])==="a"}catch{zn=!1}var Fo,Go=wd?function(t,r,i){return t.startsWith(r,i)}:function(t,r,i){return t.slice(i,i+r.length)===r},$n=Ad?String.fromCodePoint:function(){for(var t=[],r=0;ra;){if(o=t[a++],o>1114111)throw RangeError(o+" is not a valid code point");i+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return i},qo=Sd?Object.fromEntries:function(t){for(var r={},i=0,n=t;i=i)){var n=t.charCodeAt(r),a;return n<55296||n>56319||r+1===i||(a=t.charCodeAt(r+1))<56320||a>57343?n:(n-55296<<10)+(a-56320)+65536}},Ld=Td?function(t){return t.trimStart()}:function(t){return t.replace(yd,"")},Rd=Cd?function(t){return t.trimEnd()}:function(t){return t.replace(Ed,"")};function jo(e,t){return new RegExp(e,t)}var Hn;zn?(Dn=jo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Hn=function(t,r){var i;Dn.lastIndex=r;var n=Dn.exec(t);return(i=n[1])!==null&&i!==void 0?i:""}):Hn=function(t,r){for(var i=[];;){var n=Vo(t,r);if(n===void 0||Yo(n)||Nd(n))break;i.push(n),r+=n>=65536?2:1}return $n.apply(void 0,i)};var Dn,Wo=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,i){for(var n=[];!this.isEOF();){var a=this.char();if(a===123){var o=this.parseArgument(t,i);if(o.err)return o;n.push(o.val)}else{if(a===125&&t>0)break;if(a===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),n.push({type:U.pound,location:k(s,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(S.UNMATCHED_CLOSING_TAG,k(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Bn(this.peek()||0)){var o=this.parseTag(t,r);if(o.err)return o;n.push(o.val)}else{var o=this.parseLiteral(t,r);if(o.err)return o;n.push(o.val)}}}return{val:n,err:null}},e.prototype.parseTag=function(t,r){var i=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:U.literal,value:"<".concat(n,"/>"),location:k(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,r,!0);if(a.err)return a;var o=a.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:U.tag,value:n,children:o,location:k(i,this.clonePosition())},err:null}:this.error(S.INVALID_TAG,k(s,this.clonePosition())))}else return this.error(S.UNCLOSED_TAG,k(i,this.clonePosition()))}else return this.error(S.INVALID_TAG,k(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Od(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var i=this.clonePosition(),n="";;){var a=this.tryParseQuote(r);if(a){n+=a;continue}var o=this.tryParseUnquoted(t,r);if(o){n+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){n+=s;continue}break}var c=k(i,this.clonePosition());return{val:{type:U.literal,value:n,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Md(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 i=this.char();if(i===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(i);this.bump()}return $n.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(r==="plural"||r==="selectordinal")||i===125&&t>0?null:(this.bump(),$n(i))},e.prototype.parseArgument=function(t,r){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(S.EXPECT_ARGUMENT_CLOSING_BRACE,k(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(S.EMPTY_ARGUMENT,k(i,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(S.MALFORMED_ARGUMENT,k(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(S.EXPECT_ARGUMENT_CLOSING_BRACE,k(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:U.argument,value:n,location:k(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(S.EXPECT_ARGUMENT_CLOSING_BRACE,k(i,this.clonePosition())):this.parseArgumentOptions(t,r,n,i);default:return this.error(S.MALFORMED_ARGUMENT,k(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),i=Hn(this.message,r),n=r+i.length;this.bumpTo(n);var a=this.clonePosition(),o=k(t,a);return{value:i,location:o}},e.prototype.parseArgumentOptions=function(t,r,i,n){var a,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(S.EXPECT_ARGUMENT_TYPE,k(o,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var u=Rd(p.val);if(u.length===0)return this.error(S.EXPECT_ARGUMENT_STYLE,k(this.clonePosition(),this.clonePosition()));var g=k(d,this.clonePosition());l={style:u,styleLocation:g}}var x=this.tryParseArgumentClose(n);if(x.err)return x;var v=k(n,this.clonePosition());if(l&&Go(l?.style,"::",0)){var A=Ld(l.style.slice(2));if(s==="number"){var p=this.parseNumberSkeletonFromString(A,l.styleLocation);return p.err?p:{val:{type:U.number,value:i,location:v,style:p.val},err:null}}else{if(A.length===0)return this.error(S.EXPECT_DATE_TIME_SKELETON,v);var N=A;this.locale&&(N=Uo(A,this.locale));var u={type:ct.dateTime,pattern:N,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Ro(N):{}},M=s==="date"?U.date:U.time;return{val:{type:M,value:i,location:v,style:u},err:null}}}return{val:{type:s==="number"?U.number:s==="date"?U.date:U.time,value:i,location:v,style:(a=l?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(S.EXPECT_SELECT_ARGUMENT_OPTIONS,k(w,C({},w)));this.bumpSpace();var I=this.parseIdentifierIfPossible(),j=0;if(s!=="select"&&I.value==="offset"){if(!this.bumpIf(":"))return this.error(S.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,k(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(S.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,S.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),I=this.parseIdentifierIfPossible(),j=p.val}var G=this.tryParsePluralOrSelectOptions(t,s,r,I);if(G.err)return G;var x=this.tryParseArgumentClose(n);if(x.err)return x;var X=k(n,this.clonePosition());return s==="select"?{val:{type:U.select,value:i,options:qo(G.val),location:X},err:null}:{val:{type:U.plural,value:i,options:qo(G.val),offset:j,pluralType:s==="plural"?"cardinal":"ordinal",location:X},err:null}}default:return this.error(S.INVALID_ARGUMENT_TYPE,k(o,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(S.EXPECT_ARGUMENT_CLOSING_BRACE,k(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(S.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,k(n,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 i=[];try{i=Do(t)}catch{return this.error(S.INVALID_NUMBER_SKELETON,r)}return{val:{type:ct.number,tokens:i,location:r,parsedOptions:this.shouldParseSkeletons?Bo(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,i,n){for(var a,o=!1,s=[],c=new Set,l=n.value,d=n.location;;){if(l.length===0){var p=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(S.EXPECT_PLURAL_ARGUMENT_SELECTOR,S.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;d=k(p,this.clonePosition()),l=this.message.slice(p.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?S.DUPLICATE_SELECT_ARGUMENT_SELECTOR:S.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(o=!0),this.bumpSpace();var g=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?S.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:S.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,k(this.clonePosition(),this.clonePosition()));var x=this.parseMessage(t+1,r,i);if(x.err)return x;var v=this.tryParseArgumentClose(g);if(v.err)return v;s.push([l,{value:x.val,location:k(g,this.clonePosition())}]),c.add(l),this.bumpSpace(),a=this.parseIdentifierIfPossible(),l=a.value,d=a.location}return s.length===0?this.error(r==="select"?S.EXPECT_SELECT_ARGUMENT_SELECTOR:S.EXPECT_PLURAL_ARGUMENT_SELECTOR,k(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(S.MISSING_OTHER_CLAUSE,k(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var i=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var a=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)a=!0,o=o*10+(s-48),this.bump();else break}var c=k(n,this.clonePosition());return a?(o*=i,Pd(o)?{val:o,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=Vo(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(Go(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(i),!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()&&Yo(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),i=this.message.charCodeAt(r+(t>=65536?2:1));return i??null},e}();function Bn(e){return e>=97&&e<=122||e>=65&&e<=90}function Md(e){return Bn(e)||e===47}function Od(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 Yo(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Nd(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 Un(e){e.forEach(function(t){if(delete t.location,xi(t)||vi(t))for(var r in t.options)delete t.options[r].location,Un(t.options[r].value);else ui(t)&&yi(t.style)||(gi(t)||fi(t))&&br(t.style)?delete t.style.location:bi(t)&&Un(t.children)})}function Xo(e,t){t===void 0&&(t={}),t=C({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Wo(e,t).parse();if(r.err){var i=SyntaxError(S[r.err.kind]);throw i.location=r.err.location,i.originalMessage=r.err.message,i}return t?.captureLocation||Un(r.val),r.val}function Er(e,t){var r=t&&t.cache?t.cache:Bd,i=t&&t.serializer?t.serializer:Hd,n=t&&t.strategy?t.strategy:Dd;return n(e,{cache:r,serializer:i})}function Id(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Ko(e,t,r,i){var n=Id(i)?i:r(i),a=t.get(n);return typeof a>"u"&&(a=e.call(this,i),t.set(n,a)),a}function Qo(e,t,r){var i=Array.prototype.slice.call(arguments,3),n=r(i),a=t.get(n);return typeof a>"u"&&(a=e.apply(this,i),t.set(n,a)),a}function Fn(e,t,r,i,n){return r.bind(t,e,i,n)}function Dd(e,t){var r=e.length===1?Ko:Qo;return Fn(e,this,r,t.cache.create(),t.serializer)}function zd(e,t){return Fn(e,this,Qo,t.cache.create(),t.serializer)}function $d(e,t){return Fn(e,this,Ko,t.cache.create(),t.serializer)}var Hd=function(){return JSON.stringify(arguments)};function Gn(){this.cache=Object.create(null)}Gn.prototype.get=function(e){return this.cache[e]};Gn.prototype.set=function(e,t){this.cache[e]=t};var Bd={create:function(){return new Gn}},Ei={variadic:zd,monadic:$d};var lt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(lt||(lt={}));var wr=function(e){vr(t,e);function t(r,i,n){var a=e.call(this,r)||this;return a.code=i,a.originalMessage=n,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var qn=function(e){vr(t,e);function t(r,i,n,a){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(i,'". Options are "').concat(Object.keys(n).join('", "'),'"'),lt.INVALID_VALUE,a)||this}return t}(wr);var Zo=function(e){vr(t,e);function t(r,i,n){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(i),lt.INVALID_VALUE,n)||this}return t}(wr);var Jo=function(e){vr(t,e);function t(r,i){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(i,'"'),lt.MISSING_VALUE,i)||this}return t}(wr);var re;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(re||(re={}));function Ud(e){return e.length<2?e:e.reduce(function(t,r){var i=t[t.length-1];return!i||i.type!==re.literal||r.type!==re.literal?t.push(r):i.value+=r.value,t},[])}function Fd(e){return typeof e=="function"}function Ar(e,t,r,i,n,a,o){if(e.length===1&&On(e[0]))return[{type:re.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=Xo,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 ts=es;var jn={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",strikethroughAriaLabel:"Regularly at",planTypeLabel:"{planType, select, ABM {Annual, billed monthly} other {}}"},jd=Xa("ConsonantTemplates/price"),Wd=/<\/?[^>]+(>|$)/g,q={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAlternative:"price-alternative",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"},Ve={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel",alternativePriceAriaLabel:"alternativePriceAriaLabel"},Wn="TAX_EXCLUSIVE",Yd=e=>ja(e)?Object.entries(e).filter(([,t])=>kt(t)||ti(t)||t===!0).reduce((t,[r,i])=>t+` ${r}${i===!0?"":'="'+Va(i)+'"'}`,""):"",Y=(e,t,r,i=!1)=>`${i?uo(t):t??""}`;function Xd(e){e=e.replaceAll("","</a>");let t=/]+(>|$)/g;return e.match(t)?.forEach(i=>{let n=i.replace("",">");e=e.replaceAll(i,n)}),e}function Kd(e){e=e.replaceAll("</a>","");let t=/<a (?!>)(.*?)(>|$)/g;return e.match(t)?.forEach(i=>{let n=i.replace("<a ","");e=e.replaceAll(i,n)}),e}function De(e,t,r,i){let n=e[r];if(n==null)return"";let a=n.includes("<"),o=n.includes("${t}`:r&&(v=`${r}`),c&&(v+=g+x),v+=Y(q.integer,s),v+=Y(q.decimalsDelimiter,a),v+=Y(q.decimals,n),c||(v+=x+g),v+=Y(q.recurrence,l,null,!0),v+=Y(q.unitType,d,null,!0),v+=Y(q.taxInclusivity,p,!0),Y(e,v,{...u})}var ie=({isAlternativePrice:e=!1,displayOptical:t=!1,displayStrikethrough:r=!1,displayAnnual:i=!1,instant:n=void 0}={})=>({country:a,displayFormatted:o=!0,displayRecurrence:s=!0,displayPerUnit:c=!1,displayTax:l=!1,language:d,literals:p={},quantity:u=1,space:g=!1,isPromoApplied:x=!1}={},{commitment:v,offerSelectorIds:A,formatString:N,price:M,priceWithoutDiscount:w,taxDisplay:I,taxTerm:j,term:G,usePrecision:X,promotion:Z}={},ce={})=>{Object.entries({country:a,formatString:N,language:d,price:M}).forEach(([Zc,Jc])=>{if(Jc==null)throw new Error(`Argument "${Zc}" is missing for osi ${A?.toString()}, country ${a}, language ${d}`)});let K={...jn,...p},W=`${d.toLowerCase()}-${a.toUpperCase()}`,z;Z&&!x&&w?z=e?M:w:r&&w?z=w:z=M;let ge=t?fo:xo;i&&(ge=vo);let{accessiblePrice:ke,recurrenceTerm:Ue,...Oa}=ge({commitment:v,formatString:N,instant:n,isIndianPrice:a==="IN",originalPrice:M,priceWithoutDiscount:w,price:t?M:z,promotion:Z,quantity:u,term:G,usePrecision:X}),Fi="",Gi="",qi="";_(s)&&Ue&&(qi=De(K,W,Ve.recurrenceLabel,{recurrenceTerm:Ue}));let Xr="";_(c)&&(g&&(Xr+=" "),Xr+=De(K,W,Ve.perUnitLabel,{perUnit:"LICENSE"}));let Kr="";_(l)&&j&&(g&&(Kr+=" "),Kr+=De(K,W,I===Wn?Ve.taxExclusiveLabel:Ve.taxInclusiveLabel,{taxTerm:j})),r&&(Fi=De(K,W,Ve.strikethroughAriaLabel,{strikethroughPrice:Fi})),e&&(Gi=De(K,W,Ve.alternativePriceAriaLabel,{alternativePrice:Gi}));let At=q.container;if(t&&(At+=" "+q.containerOptical),r&&(At+=" "+q.containerStrikethrough),e&&(At+=" "+q.containerAlternative),i&&(At+=" "+q.containerAnnual),_(o))return Qd(At,{...Oa,accessibleLabel:Fi,altAccessibleLabel:Gi,recurrenceLabel:qi,perUnitLabel:Xr,taxInclusivityLabel:Kr},ce);let{currencySymbol:Na,decimals:Wc,decimalsDelimiter:Yc,hasCurrencySpace:Ia,integer:Xc,isCurrencyFirst:Kc}=Oa,St=[Xc,Yc,Wc];Kc?(St.unshift(Ia?"\xA0":""),St.unshift(Na)):(St.push(Ia?"\xA0":""),St.push(Na)),St.push(qi,Xr,Kr);let Qc=St.join("");return Y(At,Qc,ce)},rs=()=>(e,t,r)=>{let i=st(t.promotion,t.promotion?.displaySummary?.instant,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),a=(e.displayOldPrice===void 0||_(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price&&(!t.promotion||i);return`${a?ie({displayStrikethrough:!0})({isPromoApplied:i,...e},t,r)+" ":""}${ie({isAlternativePrice:a})({isPromoApplied:i,...e},t,r)}`},is=()=>(e,t,r)=>{let{instant:i}=e;try{i||(i=new URLSearchParams(document.location.search).get("instant")),i&&(i=new Date(i))}catch{i=void 0}let n=st(t.promotion,i,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),a={...e,displayTax:!1,displayPerUnit:!1,isPromoApplied:n};if(!n)return ie()(e,{...t,price:t.priceWithoutDiscount},r)+Y(q.containerAnnualPrefix," (")+ie({displayAnnual:!0,instant:i})(a,{...t,price:t.priceWithoutDiscount},r)+Y(q.containerAnnualSuffix,")");let s=(e.displayOldPrice===void 0||_(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${s?ie({displayStrikethrough:!0})(a,t,r)+" ":""}${ie({isAlternativePrice:s})({isPromoApplied:n,...e},t,r)}${Y(q.containerAnnualPrefix," (")}${ie({displayAnnual:!0,instant:i})(a,t,r)}${Y(q.containerAnnualSuffix,")")}`},ns=()=>(e,t,r)=>{let i={...e,displayTax:!1,displayPerUnit:!1};return`${ie({isAlternativePrice:e.displayOldPrice})(e,t,r)}${Y(q.containerAnnualPrefix," (")}${ie({displayAnnual:!0})(i,t,r)}${Y(q.containerAnnualSuffix,")")}`};var Sr={...q,containerLegal:"price-legal",planType:"price-plan-type"},wi={...Ve,planTypeLabel:"planTypeLabel"};function Zd(e,{perUnitLabel:t,taxInclusivityLabel:r,planTypeLabel:i},n={}){let a="";return a+=Y(Sr.unitType,t,null,!0),r&&i&&(r+=". "),a+=Y(Sr.taxInclusivity,r,!0),a+=Y(Sr.planType,i,null),Y(e,a,{...n})}var as=({country:e,displayPerUnit:t=!1,displayTax:r=!1,displayPlanType:i=!1,language:n,literals:a={}}={},{taxDisplay:o,taxTerm:s,planType:c}={},l={})=>{let d={...jn,...a},p=`${n.toLowerCase()}-${e.toUpperCase()}`,u="";_(t)&&(u=De(d,p,wi.perUnitLabel,{perUnit:"LICENSE"}));let g="";e==="US"&&n==="en"&&(r=!1),_(r)&&s&&(g=De(d,p,o===Wn?wi.taxExclusiveLabel:wi.taxInclusiveLabel,{taxTerm:s}));let x="";_(i)&&c&&(x=De(d,p,wi.planTypeLabel,{planType:c}));let v=Sr.container;return v+=" "+Sr.containerLegal,Zd(v,{perUnitLabel:u,taxInclusivityLabel:g,planTypeLabel:x},l)};var os=ie(),ss=rs(),cs=ie({displayOptical:!0}),ls=ie({displayStrikethrough:!0}),ds=ie({displayAnnual:!0}),hs=ie({displayOptical:!0,isAlternativePrice:!0}),ps=ie({isAlternativePrice:!0}),ms=ns(),us=is(),gs=as;var Jd=(e,t)=>{if(!(!pr(e)||!pr(t)))return Math.floor((t-e)/t*100)},fs=()=>(e,t)=>{let{price:r,priceWithoutDiscount:i}=t,n=Jd(r,i);return n===void 0?'':`${n}%`};var xs=fs();var bs="INDIVIDUAL_COM",Yn="TEAM_COM",ys="INDIVIDUAL_EDU",Xn="TEAM_EDU",vs=["GB_en","AU_en","FR_fr","AT_de","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","GR_el","GR_en","HU_hu","IE_en","IT_it","LU_de","LU_en","LU_fr","NL_nl","NO_nb","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","TR_tr","UA_uk","ID_en","ID_in","IN_en","IN_hi","JP_ja","MY_en","MY_ms","NZ_en","TH_en","TH_th"],eh={[bs]:["MU_en","LT_lt","LV_lv","NG_en","SA_ar","SA_en","SG_en","KR_ko"],[Yn]:["MU_en","LT_lt","LV_lv","NG_en","CO_es","KR_ko"],[ys]:["LT_lt","LV_lv","SA_en","SG_en"],[Xn]:["SG_en","KR_ko"]},th={MU_en:[!1,!1,!1,!1],NG_en:[!1,!1,!1,!1],AU_en:[!1,!1,!1,!1],JP_ja:[!1,!1,!1,!1],NZ_en:[!1,!1,!1,!1],TH_en:[!1,!1,!1,!1],TH_th:[!1,!1,!1,!1],CO_es:[!1,!0,!1,!1],AT_de:[!1,!1,!1,!0],SG_en:[!1,!1,!1,!0]},rh=[bs,Yn,ys,Xn],ih=e=>[Yn,Xn].includes(e),nh=(e,t,r,i)=>{let n=`${e}_${t}`,a=`${r}_${i}`,o=th[n];if(o){let s=rh.indexOf(a);return o[s]}return ih(a)},ah=(e,t,r,i)=>{let n=`${e}_${t}`;if(vs.includes(e)||vs.includes(n))return!0;let a=eh[`${r}_${i}`];return a?a.includes(e)||a.includes(n)?!0:P.displayTax:P.displayTax},Es=async(e,t,r,i)=>{let n=ah(e,t,r,i);return{displayTax:n,forceTaxExclusive:n?nh(e,t,r,i):P.forceTaxExclusive}},_r=class _r extends HTMLSpanElement{constructor(){super();m(this,"masElement",new qe(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-display-plan-type","data-display-annual","data-perpetual","data-promotion-code","data-force-tax-exclusive","data-template","data-wcs-osi","data-quantity"]}static createInlinePrice(r){let i=le();if(!i)return null;let{displayOldPrice:n,displayPerUnit:a,displayRecurrence:o,displayTax:s,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:p,promotionCode:u,quantity:g,alternativePrice:x,template:v,wcsOsi:A}=i.collectPriceOptions(r);return li(_r,{displayOldPrice:n,displayPerUnit:a,displayRecurrence:o,displayTax:s,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:p,promotionCode:u,quantity:g,alternativePrice:x,template:v,wcsOsi:A})}get isInlinePrice(){return!0}attributeChangedCallback(r,i,n){this.masElement.attributeChangedCallback(r,i,n)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get isFailed(){return this.masElement.state===Ee}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}async render(r={}){if(!this.isConnected)return!1;let i=le();if(!i)return!1;let n=i.collectPriceOptions(r,this),a={...i.settings,...n};if(!a.wcsOsi.length)return!1;try{let o=this.masElement.togglePending({});this.innerHTML="";let[s]=await i.resolveOfferSelectors(a),c=gr(await s,a),[l]=c;if(i.featureFlags[we]||a[we]){if(n.displayPerUnit===void 0&&(a.displayPerUnit=l.customerSegment!=="INDIVIDUAL"),n.displayTax===void 0||n.forceTaxExclusive===void 0){let{country:d,language:p}=a,[u=""]=l.marketSegments,g=await Es(d,p,l.customerSegment,u);n.displayTax===void 0&&(a.displayTax=g?.displayTax||a.displayTax),n.forceTaxExclusive===void 0&&(a.forceTaxExclusive=g?.forceTaxExclusive||a.forceTaxExclusive),a.forceTaxExclusive&&(c=gr(c,a))}}else n.displayOldPrice===void 0&&(a.displayOldPrice=!0);return this.renderOffers(c,a,o)}catch(o){throw this.innerHTML="",o}}renderOffers(r,i,n=void 0){if(!this.isConnected)return;let a=le();if(!a)return!1;if(n??(n=this.masElement.togglePending()),r.length){if(this.masElement.toggleResolved(n,r,i)){this.innerHTML=a.buildPriceHTML(r,this.options);let o=this.closest("p, h3, div");if(!o||!o.querySelector('span[data-template="strikethrough"]')||o.querySelector(".alt-aria-label"))return!0;let s=o?.querySelectorAll('span[is="inline-price"]');return s.length>1&&s.length===o.querySelectorAll('span[data-template="strikethrough"]').length*2&&s.forEach(c=>{c.dataset.template!=="strikethrough"&&c.options&&!c.options.alternativePrice&&!c.isFailed&&(c.options.alternativePrice=!0,c.innerHTML=a.buildPriceHTML(r,c.options))}),!0}}else{let o=new Error(`Not provided: ${this.options?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(n,o,this.options))return this.innerHTML="",!0}return!1}};m(_r,"is","inline-price"),m(_r,"tag","span");var ze=_r;window.customElements.get(ze.is)||window.customElements.define(ze.is,ze,{extends:ze.tag});function ws({literals:e,providers:t,settings:r}){function i(o,s=null){let c={country:r.country,language:r.language,locale:r.locale,literals:{...e.price}};if(s&&t?.price)for(let G of t.price)G(s,c);let{displayOldPrice:l,displayPerUnit:d,displayRecurrence:p,displayTax:u,displayPlanType:g,forceTaxExclusive:x,perpetual:v,displayAnnual:A,promotionCode:N,quantity:M,alternativePrice:w,wcsOsi:I,...j}=Object.assign(c,s?.dataset??{},o??{});return c=ri(Object.assign({...c,...j,displayOldPrice:_(l),displayPerUnit:_(d),displayRecurrence:_(p),displayTax:_(u),displayPlanType:_(g),forceTaxExclusive:_(x),perpetual:_(v),displayAnnual:_(A),promotionCode:ni(N).effectivePromoCode,quantity:Pt(M,P.quantity),alternativePrice:_(w),wcsOsi:oi(I)})),c}function n(o,s){if(!Array.isArray(o)||!o.length||!s)return"";let{template:c}=s,l;switch(c){case"discount":l=xs;break;case"strikethrough":l=ls;break;case"annual":l=ds;break;case"legal":l=gs;break;default:s.template==="optical"&&s.alternativePrice?l=hs:s.template==="optical"?l=cs:s.displayAnnual&&o[0].planType==="ABM"?l=s.promotionCode?us:ms:s.alternativePrice?l=ps:l=s.promotionCode?ss:os}let[d]=o;return d={...d,...d.priceDetails},l({...r,...s},d)}let a=ze.createInlinePrice;return{InlinePrice:ze,buildPriceHTML:n,collectPriceOptions:i,createInlinePrice:a}}function oh({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||P.language),t??(t=e?.split("_")?.[1]||P.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function As(e={},t){let r=t.featureFlags[we],{commerce:i={}}=e,n=Pe.PRODUCTION,a=cn,o=B("checkoutClientId",i)??P.checkoutClientId,s=mr(B("checkoutWorkflowStep",i),oe,P.checkoutWorkflowStep),c=P.displayOldPrice,l=P.displayPerUnit,d=_(B("displayRecurrence",i),P.displayRecurrence),p=_(B("displayTax",i),P.displayTax),u=_(B("displayPlanType",i),P.displayPlanType),g=_(B("entitlement",i),P.entitlement),x=_(B("modal",i),P.modal),v=_(B("forceTaxExclusive",i),P.forceTaxExclusive),A=B("promotionCode",i)??P.promotionCode,N=Pt(B("quantity",i)),M=B("wcsApiKey",i)??P.wcsApiKey,w=i?.env==="stage",I=Ge.PUBLISHED;["true",""].includes(i.allowOverride)&&(w=(B(on,i,{metadata:!1})?.toLowerCase()??i?.env)==="stage",I=mr(B(sn,i),Ge,I)),w&&(n=Pe.STAGE,a=ln);let G=B(an)??e.preview,X=typeof G<"u"&&G!=="off"&&G!=="false",Z={};X&&(Z={preview:X});let ce=B("mas-io-url")??e.masIOUrl??`https://www${n===Pe.STAGE?".stage":""}.adobe.com/mas/io`,K=B("preselect-plan")??void 0;return{...oh(e),...Z,displayOldPrice:c,checkoutClientId:o,checkoutWorkflowStep:s,displayPerUnit:l,displayRecurrence:d,displayTax:p,displayPlanType:u,entitlement:g,extraOptions:P.extraOptions,modal:x,env:n,forceTaxExclusive:v,promotionCode:A,quantity:N,alternativePrice:P.alternativePrice,wcsApiKey:M,wcsURL:a,landscape:I,masIOUrl:ce,...K&&{preselectPlan:K}}}async function Ai(e,t={},r=2,i=100){let n;for(let a=0;a<=r;a++)try{let o=await fetch(e,t);return o.retryCount=a,o}catch(o){if(n=o,n.retryCount=a,a>r)break;await new Promise(s=>setTimeout(s,i*(a+1)))}throw n}var sh="mas-commerce-service";function Tr(e,t){let r;return function(){let i=this,n=arguments;clearTimeout(r),r=setTimeout(()=>e.apply(i,n),t)}}function de(e,t={},r=null,i=null){let n=i?document.createElement(e,{is:i}):document.createElement(e);r instanceof HTMLElement?n.appendChild(r):n.innerHTML=r;for(let[a,o]of Object.entries(t))n.setAttribute(a,o);return n}function Le(e){return`startTime:${e.startTime.toFixed(2)}|duration:${e.duration.toFixed(2)}`}function Kn(){return window.matchMedia("(max-width: 1024px)").matches}function dt(){return document.getElementsByTagName(sh)?.[0]}function Cr(e){let t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom)}var Qn="wcs";function Ss({settings:e}){let t=ue.module(Qn),{env:r,wcsApiKey:i}=e,n=new Map,a=new Map,o,s=new Map;async function c(x,v,A=!0){let N=le(),M=tn;t.debug("Fetching:",x);let w="",I;if(x.offerSelectorIds.length>1)throw new Error("Multiple OSIs are not supported anymore");let j=new Map(v),[G]=x.offerSelectorIds,X=Date.now()+Math.random().toString(36).substring(2,7),Z=`${Qn}:${G}:${X}${nt}`,ce=`${Qn}:${G}:${X}${at}`,K;try{if(performance.mark(Z),w=new URL(e.wcsURL),w.searchParams.set("offer_selector_ids",G),w.searchParams.set("country",x.country),w.searchParams.set("locale",x.locale),w.searchParams.set("landscape",r===Pe.STAGE?"ALL":e.landscape),w.searchParams.set("api_key",i),x.language&&w.searchParams.set("language",x.language),x.promotionCode&&w.searchParams.set("promotion_code",x.promotionCode),x.currency&&w.searchParams.set("currency",x.currency),I=await Ai(w.toString(),{credentials:"omit"}),I.ok){let W=[];try{let z=await I.json();t.debug("Fetched:",x,z),W=z.resolvedOffers??[]}catch(z){t.error(`Error parsing JSON: ${z.message}`,{...z.context,...N?.duration})}W=W.map(ur),v.forEach(({resolve:z},ge)=>{let ke=W.filter(({offerSelectorIds:Ue})=>Ue.includes(ge)).flat();ke.length&&(j.delete(ge),v.delete(ge),z(ke))})}else M=en}catch(W){M=`Network error: ${W.message}`}finally{K=performance.measure(ce,Z),performance.clearMarks(Z),performance.clearMeasures(ce)}if(A&&v.size){t.debug("Missing:",{offerSelectorIds:[...v.keys()]});let W=si(I);v.forEach(z=>{z.reject(new Ne(M,{...x,...W,response:I,measure:Le(K),...N?.duration}))})}}function l(){clearTimeout(o);let x=[...a.values()];a.clear(),x.forEach(({options:v,promises:A})=>c(v,A))}function d(x){if(!x||typeof x!="object")throw new TypeError("Cache must be a Map or similar object");let v=r===Pe.STAGE?"stage":"prod",A=x[v];if(!A||typeof A!="object"){t.warn(`No cache found for environment: ${r}`);return}for(let[N,M]of Object.entries(A))n.set(N,Promise.resolve(M.map(ur)));t.debug(`Prefilled WCS cache with ${A.size} entries`)}function p(){let x=n.size;s=new Map(n),n.clear(),t.debug(`Moved ${x} cache entries to stale cache`)}function u(x,v,A){let N=x!=="GB"&&!A?"MULT":"en",M=hn.includes(x)?x:P.country;return{validCountry:M,validLanguage:N,locale:`${v}_${M}`}}function g({country:x,language:v,perpetual:A=!1,promotionCode:N="",wcsOsi:M=[]}){let{validCountry:w,validLanguage:I,locale:j}=u(x,v,A),G=[w,I,N].filter(X=>X).join("-").toLowerCase();return M.map(X=>{let Z=`${X}-${G}`;if(n.has(Z))return n.get(Z);let ce=new Promise((K,W)=>{let z=a.get(G);z||(z={options:{country:w,locale:j,...I==="MULT"&&{language:I},offerSelectorIds:[]},promises:new Map},a.set(G,z)),N&&(z.options.promotionCode=N),z.options.offerSelectorIds.push(X),z.promises.set(X,{resolve:K,reject:W}),l()}).catch(K=>{if(s.has(Z))return s.get(Z);throw K});return n.set(Z,ce),ce})}return{Commitment:Je,PlanType:Qa,Term:fe,applyPlanType:ur,resolveOfferSelectors:g,flushWcsCacheInternal:p,prefillWcsCache:d,normalizeCountryLanguageAndLocale:u}}var _s="mas-commerce-service",Ts="mas-commerce-service:start",Cs="mas-commerce-service:ready",kr,Rt,Mt,ks,Ps,Zn=class extends HTMLElement{constructor(){super(...arguments);E(this,Mt);E(this,kr);E(this,Rt);m(this,"lastLoggingTime",0)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(i,n,a)=>{let o=await r?.(i,n,this.imsSignedInPromise,a);return o||null})}get featureFlags(){return h(this,Rt)||y(this,Rt,{[we]:te(this,Mt,Ps).call(this,we)}),h(this,Rt)}activate(){let r=h(this,Mt,ks),i=As(r,this);Qr(r.lana);let n=ue.init(r.hostEnv).module("service");n.debug("Activating:",r);let o={price:ko(i)},s={checkout:new Set,price:new Set},c={literals:o,providers:s,settings:i};Object.defineProperties(this,Object.getOwnPropertyDescriptors({..._o(c),...To(c),...ws(c),...Ss(c),...pn,Log:ue,get defaults(){return P},get log(){return ue},get providers(){return{checkout(d){return s.checkout.add(d),()=>s.checkout.delete(d)},price(d){return s.price.add(d),()=>s.price.delete(d)},has:d=>s.price.has(d)||s.checkout.has(d)}},get settings(){return i}})),n.debug("Activated:",{literals:o,settings:i});let l=new CustomEvent(Zr,{bubbles:!0,cancelable:!1,detail:this});performance.mark(Cs),y(this,kr,performance.measure(Cs,Ts)),this.dispatchEvent(l),setTimeout(()=>{this.logFailedRequests()},1e4)}connectedCallback(){performance.mark(Ts),this.activate()}flushWcsCache(){this.flushWcsCacheInternal(),this.log.debug("Flushed WCS cache")}refreshOffers(){this.flushWcsCacheInternal(),document.querySelectorAll(cr).forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers"),this.logFailedRequests()}refreshFragments(){this.flushWcsCacheInternal(),customElements.get("aem-fragment")?.cache.clear(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh(!1)),this.log.debug("Refreshed AEM fragments"),this.logFailedRequests()}get duration(){return{"mas-commerce-service:measure":Le(h(this,kr))}}logFailedRequests(){let r=[...performance.getEntriesByType("resource")].filter(({startTime:n})=>n>this.lastLoggingTime).filter(({transferSize:n,duration:a,responseStatus:o})=>n===0&&a===0&&o<200||o>=400),i=Array.from(new Map(r.map(n=>[n.name,n])).values());if(i.some(({name:n})=>/(\/fragment\?|web_commerce_artifact)/.test(n))){let n=i.map(({name:a})=>a);this.log.error("Failed requests:",{failedUrls:n,...this.duration})}this.lastLoggingTime=performance.now().toFixed(3)}};kr=new WeakMap,Rt=new WeakMap,Mt=new WeakSet,ks=function(){let r=this.getAttribute("env")??"prod",i={commerce:{env:r},hostEnv:{name:r},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate")??1,10),isProdDomain:r==="prod"},masIOUrl:this.getAttribute("mas-io-url")};return["locale","country","language","preview"].forEach(n=>{let a=this.getAttribute(n);a&&(i[n]=a)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(n=>{let a=this.getAttribute(n);if(a!=null){let o=n.replace(/-([a-z])/g,s=>s[1].toUpperCase());i.commerce[o]=a}}),i},Ps=function(r){return["on","true",!0].includes(this.getAttribute(`data-${r}`)||B(r))};window.customElements.get(_s)||window.customElements.define(_s,Zn);var Pr=class Pr extends hi(HTMLButtonElement){static createCheckoutButton(t={},r=""){return di(Pr,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};m(Pr,"is","checkout-button"),m(Pr,"tag","button");var Ot=Pr;window.customElements.get(Ot.is)||window.customElements.define(Ot.is,Ot,{extends:Ot.tag});function ch(e){return`https://${e==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var pt,ht=class ht extends HTMLAnchorElement{constructor(){super();m(this,"masElement",new qe(this));E(this,pt);this.setAttribute("is",ht.is)}get isUptLink(){return!0}initializeWcsData(r,i){this.setAttribute("data-wcs-osi",r),i&&this.setAttribute("data-promotion-code",i)}attributeChangedCallback(r,i,n){this.masElement.attributeChangedCallback(r,i,n)}connectedCallback(){this.masElement.connectedCallback(),y(this,pt,dt()),h(this,pt)&&(this.log=h(this,pt).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),y(this,pt,void 0)}requestUpdate(r=!1){this.masElement.requestUpdate(r)}onceSettled(){return this.masElement.onceSettled()}async render(){let r=dt();if(!r)return!1;this.dataset.imsCountry||r.imsCountryPromise.then(o=>{o&&(this.dataset.imsCountry=o)});let i=r.collectCheckoutOptions({},this);if(!i.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let n=this.masElement.togglePending(i),a=r.resolveOfferSelectors(i);try{let[[o]]=await Promise.all(a),{country:s,language:c,env:l}=i,d=`locale=${c}_${s}&country=${s}&offer_id=${o.offerId}`,p=this.getAttribute("data-promotion-code");p&&(d+=`&promotion_code=${encodeURIComponent(p)}`),this.href=`${ch(l)}?${d}`,this.masElement.toggleResolved(n,o,i)}catch(o){let s=new Error(`Could not resolve offer selectors for id: ${i.wcsOsi}.`,o.message);return this.masElement.toggleFailed(n,s,i),!1}}static createFrom(r){let i=new ht;for(let n of r.attributes)n.name!=="is"&&(n.name==="class"&&n.value.includes("upt-link")?i.setAttribute("class",n.value.replace("upt-link","").trim()):i.setAttribute(n.name,n.value));return i.innerHTML=r.innerHTML,i.setAttribute("tabindex",0),i}};pt=new WeakMap,m(ht,"is","upt-link"),m(ht,"tag","a"),m(ht,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var je=ht;window.customElements.get(je.is)||window.customElements.define(je.is,je,{extends:je.tag});R();R();var Q="(max-width: 767px)",ne="(max-width: 1199px)",F="(min-width: 768px)",O="(min-width: 1200px)",se="(min-width: 1600px)",Ks={matchMobile:window.matchMedia(Q),matchDesktop:window.matchMedia(`${O} and (not ${se})`),matchDesktopOrUp:window.matchMedia(O),matchLargeDesktop:window.matchMedia(se),get isMobile(){return this.matchMobile.matches},get isDesktop(){return this.matchDesktop.matches},get isDesktopOrUp(){return this.matchDesktopOrUp.matches}},D=Ks;function Dr(){return Ks.isDesktop}var Qs=b` +`,lt.MISSING_INTL_API,o);var I=r.getPluralRules(t,{type:d.pluralType}).select(u-(d.offset||0));w=d.options[I]||d.options.other}if(!w)throw new qn(d.value,u,Object.keys(d.options),o);s.push.apply(s,Ar(w.value,t,r,i,n,u-(d.offset||0)));continue}}return Ud(s)}function Gd(e,t){return t?C(C(C({},e||{}),t||{}),Object.keys(e).reduce(function(r,i){return r[i]=C(C({},e[i]),t[i]||{}),r},{})):e}function qd(e,t){return t?Object.keys(e).reduce(function(r,i){return r[i]=Gd(e[i],t[i]),r},C({},e)):e}function Vn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Vd(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Er(function(){for(var t,r=[],i=0;i0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Xo,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 ts=es;var jn={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",strikethroughAriaLabel:"Regularly at",planTypeLabel:"{planType, select, ABM {Annual, billed monthly} other {}}"},jd=Xa("ConsonantTemplates/price"),Wd=/<\/?[^>]+(>|$)/g,q={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAlternative:"price-alternative",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"},Ve={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel",alternativePriceAriaLabel:"alternativePriceAriaLabel"},Wn="TAX_EXCLUSIVE",Yd=e=>ja(e)?Object.entries(e).filter(([,t])=>kt(t)||ti(t)||t===!0).reduce((t,[r,i])=>t+` ${r}${i===!0?"":'="'+Va(i)+'"'}`,""):"",Y=(e,t,r,i=!1)=>`${i?uo(t):t??""}`;function Xd(e){e=e.replaceAll("","</a>");let t=/]+(>|$)/g;return e.match(t)?.forEach(i=>{let n=i.replace("",">");e=e.replaceAll(i,n)}),e}function Kd(e){e=e.replaceAll("</a>","");let t=/<a (?!>)(.*?)(>|$)/g;return e.match(t)?.forEach(i=>{let n=i.replace("<a ","");e=e.replaceAll(i,n)}),e}function De(e,t,r,i){let n=e[r];if(n==null)return"";let a=n.includes("<"),o=n.includes("${t}`:r&&(v=`${r}`),c&&(v+=g+x),v+=Y(q.integer,s),v+=Y(q.decimalsDelimiter,a),v+=Y(q.decimals,n),c||(v+=x+g),v+=Y(q.recurrence,l,null,!0),v+=Y(q.unitType,d,null,!0),v+=Y(q.taxInclusivity,p,!0),Y(e,v,{...u})}var ie=({isAlternativePrice:e=!1,displayOptical:t=!1,displayStrikethrough:r=!1,displayAnnual:i=!1,instant:n=void 0}={})=>({country:a,displayFormatted:o=!0,displayRecurrence:s=!0,displayPerUnit:c=!1,displayTax:l=!1,language:d,literals:p={},quantity:u=1,space:g=!1,isPromoApplied:x=!1}={},{commitment:v,offerSelectorIds:A,formatString:N,price:M,priceWithoutDiscount:w,taxDisplay:I,taxTerm:j,term:G,usePrecision:X,promotion:Z}={},ce={})=>{Object.entries({country:a,formatString:N,language:d,price:M}).forEach(([Zc,Jc])=>{if(Jc==null)throw new Error(`Argument "${Zc}" is missing for osi ${A?.toString()}, country ${a}, language ${d}`)});let K={...jn,...p},W=`${d.toLowerCase()}-${a.toUpperCase()}`,z;Z&&!x&&w?z=e?M:w:r&&w?z=w:z=M;let ge=t?fo:xo;i&&(ge=vo);let{accessiblePrice:ke,recurrenceTerm:Ue,...Oa}=ge({commitment:v,formatString:N,instant:n,isIndianPrice:a==="IN",originalPrice:M,priceWithoutDiscount:w,price:t?M:z,promotion:Z,quantity:u,term:G,usePrecision:X}),Fi="",Gi="",qi="";_(s)&&Ue&&(qi=De(K,W,Ve.recurrenceLabel,{recurrenceTerm:Ue}));let Xr="";_(c)&&(g&&(Xr+=" "),Xr+=De(K,W,Ve.perUnitLabel,{perUnit:"LICENSE"}));let Kr="";_(l)&&j&&(g&&(Kr+=" "),Kr+=De(K,W,I===Wn?Ve.taxExclusiveLabel:Ve.taxInclusiveLabel,{taxTerm:j})),r&&(Fi=De(K,W,Ve.strikethroughAriaLabel,{strikethroughPrice:Fi})),e&&(Gi=De(K,W,Ve.alternativePriceAriaLabel,{alternativePrice:Gi}));let At=q.container;if(t&&(At+=" "+q.containerOptical),r&&(At+=" "+q.containerStrikethrough),e&&(At+=" "+q.containerAlternative),i&&(At+=" "+q.containerAnnual),_(o))return Qd(At,{...Oa,accessibleLabel:Fi,altAccessibleLabel:Gi,recurrenceLabel:qi,perUnitLabel:Xr,taxInclusivityLabel:Kr},ce);let{currencySymbol:Na,decimals:Wc,decimalsDelimiter:Yc,hasCurrencySpace:Ia,integer:Xc,isCurrencyFirst:Kc}=Oa,St=[Xc,Yc,Wc];Kc?(St.unshift(Ia?"\xA0":""),St.unshift(Na)):(St.push(Ia?"\xA0":""),St.push(Na)),St.push(qi,Xr,Kr);let Qc=St.join("");return Y(At,Qc,ce)},rs=()=>(e,t,r)=>{let i=st(t.promotion,t.promotion?.displaySummary?.instant,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),a=(e.displayOldPrice===void 0||_(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price&&(!t.promotion||i);return`${a?ie({displayStrikethrough:!0})({isPromoApplied:i,...e},t,r)+" ":""}${ie({isAlternativePrice:a})({isPromoApplied:i,...e},t,r)}`},is=()=>(e,t,r)=>{let{instant:i}=e;try{i||(i=new URLSearchParams(document.location.search).get("instant")),i&&(i=new Date(i))}catch{i=void 0}let n=st(t.promotion,i,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),a={...e,displayTax:!1,displayPerUnit:!1,isPromoApplied:n};if(!n)return ie()(e,{...t,price:t.priceWithoutDiscount},r)+Y(q.containerAnnualPrefix," (")+ie({displayAnnual:!0,instant:i})(a,{...t,price:t.priceWithoutDiscount},r)+Y(q.containerAnnualSuffix,")");let s=(e.displayOldPrice===void 0||_(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${s?ie({displayStrikethrough:!0})(a,t,r)+" ":""}${ie({isAlternativePrice:s})({isPromoApplied:n,...e},t,r)}${Y(q.containerAnnualPrefix," (")}${ie({displayAnnual:!0,instant:i})(a,t,r)}${Y(q.containerAnnualSuffix,")")}`},ns=()=>(e,t,r)=>{let i={...e,displayTax:!1,displayPerUnit:!1};return`${ie({isAlternativePrice:e.displayOldPrice})(e,t,r)}${Y(q.containerAnnualPrefix," (")}${ie({displayAnnual:!0})(i,t,r)}${Y(q.containerAnnualSuffix,")")}`};var Sr={...q,containerLegal:"price-legal",planType:"price-plan-type"},wi={...Ve,planTypeLabel:"planTypeLabel"};function Zd(e,{perUnitLabel:t,taxInclusivityLabel:r,planTypeLabel:i},n={}){let a="";return a+=Y(Sr.unitType,t,null,!0),r&&i&&(r+=". "),a+=Y(Sr.taxInclusivity,r,!0),a+=Y(Sr.planType,i,null),Y(e,a,{...n})}var as=({country:e,displayPerUnit:t=!1,displayTax:r=!1,displayPlanType:i=!1,language:n,literals:a={}}={},{taxDisplay:o,taxTerm:s,planType:c}={},l={})=>{let d={...jn,...a},p=`${n.toLowerCase()}-${e.toUpperCase()}`,u="";_(t)&&(u=De(d,p,wi.perUnitLabel,{perUnit:"LICENSE"}));let g="";e==="US"&&n==="en"&&(r=!1),_(r)&&s&&(g=De(d,p,o===Wn?wi.taxExclusiveLabel:wi.taxInclusiveLabel,{taxTerm:s}));let x="";_(i)&&c&&(x=De(d,p,wi.planTypeLabel,{planType:c}));let v=Sr.container;return v+=" "+Sr.containerLegal,Zd(v,{perUnitLabel:u,taxInclusivityLabel:g,planTypeLabel:x},l)};var os=ie(),ss=rs(),cs=ie({displayOptical:!0}),ls=ie({displayStrikethrough:!0}),ds=ie({displayAnnual:!0}),hs=ie({displayOptical:!0,isAlternativePrice:!0}),ps=ie({isAlternativePrice:!0}),ms=ns(),us=is(),gs=as;var Jd=(e,t)=>{if(!(!pr(e)||!pr(t)))return Math.floor((t-e)/t*100)},fs=()=>(e,t)=>{let{price:r,priceWithoutDiscount:i}=t,n=Jd(r,i);return n===void 0?'':`${n}%`};var xs=fs();var bs="INDIVIDUAL_COM",Yn="TEAM_COM",ys="INDIVIDUAL_EDU",Xn="TEAM_EDU",vs=["GB_en","AU_en","FR_fr","AT_de","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","GR_el","GR_en","HU_hu","IE_en","IT_it","LU_de","LU_en","LU_fr","NL_nl","NO_nb","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","TR_tr","UA_uk","ID_en","ID_in","IN_en","IN_hi","JP_ja","MY_en","MY_ms","NZ_en","TH_en","TH_th","MU_en"],eh={[bs]:["LT_lt","LV_lv","NG_en","SA_ar","SA_en","SG_en","KR_ko"],[Yn]:["LT_lt","LV_lv","NG_en","CO_es","KR_ko"],[ys]:["LT_lt","LV_lv","SA_en","SG_en"],[Xn]:["SG_en","KR_ko"]},th={MU_en:[!0,!0,!0,!0],NG_en:[!1,!1,!1,!1],AU_en:[!1,!1,!1,!1],JP_ja:[!1,!1,!1,!1],NZ_en:[!1,!1,!1,!1],TH_en:[!1,!1,!1,!1],TH_th:[!1,!1,!1,!1],CO_es:[!1,!0,!1,!1],AT_de:[!1,!1,!1,!0],SG_en:[!1,!1,!1,!0]},rh=[bs,Yn,ys,Xn],ih=e=>[Yn,Xn].includes(e),nh=(e,t,r,i)=>{let n=`${e}_${t}`,a=`${r}_${i}`,o=th[n];if(o){let s=rh.indexOf(a);return o[s]}return ih(a)},ah=(e,t,r,i)=>{let n=`${e}_${t}`;if(vs.includes(e)||vs.includes(n))return!0;let a=eh[`${r}_${i}`];return a?a.includes(e)||a.includes(n)?!0:P.displayTax:P.displayTax},Es=async(e,t,r,i)=>{let n=ah(e,t,r,i);return{displayTax:n,forceTaxExclusive:n?nh(e,t,r,i):P.forceTaxExclusive}},_r=class _r extends HTMLSpanElement{constructor(){super();m(this,"masElement",new qe(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-display-plan-type","data-display-annual","data-perpetual","data-promotion-code","data-force-tax-exclusive","data-template","data-wcs-osi","data-quantity"]}static createInlinePrice(r){let i=le();if(!i)return null;let{displayOldPrice:n,displayPerUnit:a,displayRecurrence:o,displayTax:s,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:p,promotionCode:u,quantity:g,alternativePrice:x,template:v,wcsOsi:A}=i.collectPriceOptions(r);return li(_r,{displayOldPrice:n,displayPerUnit:a,displayRecurrence:o,displayTax:s,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:p,promotionCode:u,quantity:g,alternativePrice:x,template:v,wcsOsi:A})}get isInlinePrice(){return!0}attributeChangedCallback(r,i,n){this.masElement.attributeChangedCallback(r,i,n)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get isFailed(){return this.masElement.state===Ee}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}async render(r={}){if(!this.isConnected)return!1;let i=le();if(!i)return!1;let n=i.collectPriceOptions(r,this),a={...i.settings,...n};if(!a.wcsOsi.length)return!1;try{let o=this.masElement.togglePending({});this.innerHTML="";let[s]=await i.resolveOfferSelectors(a),c=gr(await s,a),[l]=c;if(i.featureFlags[we]||a[we]){if(n.displayPerUnit===void 0&&(a.displayPerUnit=l.customerSegment!=="INDIVIDUAL"),n.displayTax===void 0||n.forceTaxExclusive===void 0){let{country:d,language:p}=a,[u=""]=l.marketSegments,g=await Es(d,p,l.customerSegment,u);n.displayTax===void 0&&(a.displayTax=g?.displayTax||a.displayTax),n.forceTaxExclusive===void 0&&(a.forceTaxExclusive=g?.forceTaxExclusive||a.forceTaxExclusive),a.forceTaxExclusive&&(c=gr(c,a))}}else n.displayOldPrice===void 0&&(a.displayOldPrice=!0);return this.renderOffers(c,a,o)}catch(o){throw this.innerHTML="",o}}renderOffers(r,i,n=void 0){if(!this.isConnected)return;let a=le();if(!a)return!1;if(n??(n=this.masElement.togglePending()),r.length){if(this.masElement.toggleResolved(n,r,i)){this.innerHTML=a.buildPriceHTML(r,this.options);let o=this.closest("p, h3, div");if(!o||!o.querySelector('span[data-template="strikethrough"]')||o.querySelector(".alt-aria-label"))return!0;let s=o?.querySelectorAll('span[is="inline-price"]');return s.length>1&&s.length===o.querySelectorAll('span[data-template="strikethrough"]').length*2&&s.forEach(c=>{c.dataset.template!=="strikethrough"&&c.options&&!c.options.alternativePrice&&!c.isFailed&&(c.options.alternativePrice=!0,c.innerHTML=a.buildPriceHTML(r,c.options))}),!0}}else{let o=new Error(`Not provided: ${this.options?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(n,o,this.options))return this.innerHTML="",!0}return!1}};m(_r,"is","inline-price"),m(_r,"tag","span");var ze=_r;window.customElements.get(ze.is)||window.customElements.define(ze.is,ze,{extends:ze.tag});function ws({literals:e,providers:t,settings:r}){function i(o,s=null){let c={country:r.country,language:r.language,locale:r.locale,literals:{...e.price}};if(s&&t?.price)for(let G of t.price)G(s,c);let{displayOldPrice:l,displayPerUnit:d,displayRecurrence:p,displayTax:u,displayPlanType:g,forceTaxExclusive:x,perpetual:v,displayAnnual:A,promotionCode:N,quantity:M,alternativePrice:w,wcsOsi:I,...j}=Object.assign(c,s?.dataset??{},o??{});return c=ri(Object.assign({...c,...j,displayOldPrice:_(l),displayPerUnit:_(d),displayRecurrence:_(p),displayTax:_(u),displayPlanType:_(g),forceTaxExclusive:_(x),perpetual:_(v),displayAnnual:_(A),promotionCode:ni(N).effectivePromoCode,quantity:Pt(M,P.quantity),alternativePrice:_(w),wcsOsi:oi(I)})),c}function n(o,s){if(!Array.isArray(o)||!o.length||!s)return"";let{template:c}=s,l;switch(c){case"discount":l=xs;break;case"strikethrough":l=ls;break;case"annual":l=ds;break;case"legal":l=gs;break;default:s.template==="optical"&&s.alternativePrice?l=hs:s.template==="optical"?l=cs:s.displayAnnual&&o[0].planType==="ABM"?l=s.promotionCode?us:ms:s.alternativePrice?l=ps:l=s.promotionCode?ss:os}let[d]=o;return d={...d,...d.priceDetails},l({...r,...s},d)}let a=ze.createInlinePrice;return{InlinePrice:ze,buildPriceHTML:n,collectPriceOptions:i,createInlinePrice:a}}function oh({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||P.language),t??(t=e?.split("_")?.[1]||P.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function As(e={},t){let r=t.featureFlags[we],{commerce:i={}}=e,n=Pe.PRODUCTION,a=cn,o=B("checkoutClientId",i)??P.checkoutClientId,s=mr(B("checkoutWorkflowStep",i),oe,P.checkoutWorkflowStep),c=P.displayOldPrice,l=P.displayPerUnit,d=_(B("displayRecurrence",i),P.displayRecurrence),p=_(B("displayTax",i),P.displayTax),u=_(B("displayPlanType",i),P.displayPlanType),g=_(B("entitlement",i),P.entitlement),x=_(B("modal",i),P.modal),v=_(B("forceTaxExclusive",i),P.forceTaxExclusive),A=B("promotionCode",i)??P.promotionCode,N=Pt(B("quantity",i)),M=B("wcsApiKey",i)??P.wcsApiKey,w=i?.env==="stage",I=Ge.PUBLISHED;["true",""].includes(i.allowOverride)&&(w=(B(on,i,{metadata:!1})?.toLowerCase()??i?.env)==="stage",I=mr(B(sn,i),Ge,I)),w&&(n=Pe.STAGE,a=ln);let G=B(an)??e.preview,X=typeof G<"u"&&G!=="off"&&G!=="false",Z={};X&&(Z={preview:X});let ce=B("mas-io-url")??e.masIOUrl??`https://www${n===Pe.STAGE?".stage":""}.adobe.com/mas/io`,K=B("preselect-plan")??void 0;return{...oh(e),...Z,displayOldPrice:c,checkoutClientId:o,checkoutWorkflowStep:s,displayPerUnit:l,displayRecurrence:d,displayTax:p,displayPlanType:u,entitlement:g,extraOptions:P.extraOptions,modal:x,env:n,forceTaxExclusive:v,promotionCode:A,quantity:N,alternativePrice:P.alternativePrice,wcsApiKey:M,wcsURL:a,landscape:I,masIOUrl:ce,...K&&{preselectPlan:K}}}async function Ai(e,t={},r=2,i=100){let n;for(let a=0;a<=r;a++)try{let o=await fetch(e,t);return o.retryCount=a,o}catch(o){if(n=o,n.retryCount=a,a>r)break;await new Promise(s=>setTimeout(s,i*(a+1)))}throw n}var sh="mas-commerce-service";function Tr(e,t){let r;return function(){let i=this,n=arguments;clearTimeout(r),r=setTimeout(()=>e.apply(i,n),t)}}function de(e,t={},r=null,i=null){let n=i?document.createElement(e,{is:i}):document.createElement(e);r instanceof HTMLElement?n.appendChild(r):n.innerHTML=r;for(let[a,o]of Object.entries(t))n.setAttribute(a,o);return n}function Le(e){return`startTime:${e.startTime.toFixed(2)}|duration:${e.duration.toFixed(2)}`}function Kn(){return window.matchMedia("(max-width: 1024px)").matches}function dt(){return document.getElementsByTagName(sh)?.[0]}function Cr(e){let t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom)}var Qn="wcs";function Ss({settings:e}){let t=ue.module(Qn),{env:r,wcsApiKey:i}=e,n=new Map,a=new Map,o,s=new Map;async function c(x,v,A=!0){let N=le(),M=tn;t.debug("Fetching:",x);let w="",I;if(x.offerSelectorIds.length>1)throw new Error("Multiple OSIs are not supported anymore");let j=new Map(v),[G]=x.offerSelectorIds,X=Date.now()+Math.random().toString(36).substring(2,7),Z=`${Qn}:${G}:${X}${nt}`,ce=`${Qn}:${G}:${X}${at}`,K;try{if(performance.mark(Z),w=new URL(e.wcsURL),w.searchParams.set("offer_selector_ids",G),w.searchParams.set("country",x.country),w.searchParams.set("locale",x.locale),w.searchParams.set("landscape",r===Pe.STAGE?"ALL":e.landscape),w.searchParams.set("api_key",i),x.language&&w.searchParams.set("language",x.language),x.promotionCode&&w.searchParams.set("promotion_code",x.promotionCode),x.currency&&w.searchParams.set("currency",x.currency),I=await Ai(w.toString(),{credentials:"omit"}),I.ok){let W=[];try{let z=await I.json();t.debug("Fetched:",x,z),W=z.resolvedOffers??[]}catch(z){t.error(`Error parsing JSON: ${z.message}`,{...z.context,...N?.duration})}W=W.map(ur),v.forEach(({resolve:z},ge)=>{let ke=W.filter(({offerSelectorIds:Ue})=>Ue.includes(ge)).flat();ke.length&&(j.delete(ge),v.delete(ge),z(ke))})}else M=en}catch(W){M=`Network error: ${W.message}`}finally{K=performance.measure(ce,Z),performance.clearMarks(Z),performance.clearMeasures(ce)}if(A&&v.size){t.debug("Missing:",{offerSelectorIds:[...v.keys()]});let W=si(I);v.forEach(z=>{z.reject(new Ne(M,{...x,...W,response:I,measure:Le(K),...N?.duration}))})}}function l(){clearTimeout(o);let x=[...a.values()];a.clear(),x.forEach(({options:v,promises:A})=>c(v,A))}function d(x){if(!x||typeof x!="object")throw new TypeError("Cache must be a Map or similar object");let v=r===Pe.STAGE?"stage":"prod",A=x[v];if(!A||typeof A!="object"){t.warn(`No cache found for environment: ${r}`);return}for(let[N,M]of Object.entries(A))n.set(N,Promise.resolve(M.map(ur)));t.debug(`Prefilled WCS cache with ${A.size} entries`)}function p(){let x=n.size;s=new Map(n),n.clear(),t.debug(`Moved ${x} cache entries to stale cache`)}function u(x,v,A){let N=x!=="GB"&&!A?"MULT":"en",M=hn.includes(x)?x:P.country;return{validCountry:M,validLanguage:N,locale:`${v}_${M}`}}function g({country:x,language:v,perpetual:A=!1,promotionCode:N="",wcsOsi:M=[]}){let{validCountry:w,validLanguage:I,locale:j}=u(x,v,A),G=[w,I,N].filter(X=>X).join("-").toLowerCase();return M.map(X=>{let Z=`${X}-${G}`;if(n.has(Z))return n.get(Z);let ce=new Promise((K,W)=>{let z=a.get(G);z||(z={options:{country:w,locale:j,...I==="MULT"&&{language:I},offerSelectorIds:[]},promises:new Map},a.set(G,z)),N&&(z.options.promotionCode=N),z.options.offerSelectorIds.push(X),z.promises.set(X,{resolve:K,reject:W}),l()}).catch(K=>{if(s.has(Z))return s.get(Z);throw K});return n.set(Z,ce),ce})}return{Commitment:Je,PlanType:Qa,Term:fe,applyPlanType:ur,resolveOfferSelectors:g,flushWcsCacheInternal:p,prefillWcsCache:d,normalizeCountryLanguageAndLocale:u}}var _s="mas-commerce-service",Ts="mas-commerce-service:start",Cs="mas-commerce-service:ready",kr,Rt,Mt,ks,Ps,Zn=class extends HTMLElement{constructor(){super(...arguments);E(this,Mt);E(this,kr);E(this,Rt);m(this,"lastLoggingTime",0)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(i,n,a)=>{let o=await r?.(i,n,this.imsSignedInPromise,a);return o||null})}get featureFlags(){return h(this,Rt)||y(this,Rt,{[we]:te(this,Mt,Ps).call(this,we)}),h(this,Rt)}activate(){let r=h(this,Mt,ks),i=As(r,this);Qr(r.lana);let n=ue.init(r.hostEnv).module("service");n.debug("Activating:",r);let o={price:ko(i)},s={checkout:new Set,price:new Set},c={literals:o,providers:s,settings:i};Object.defineProperties(this,Object.getOwnPropertyDescriptors({..._o(c),...To(c),...ws(c),...Ss(c),...pn,Log:ue,get defaults(){return P},get log(){return ue},get providers(){return{checkout(d){return s.checkout.add(d),()=>s.checkout.delete(d)},price(d){return s.price.add(d),()=>s.price.delete(d)},has:d=>s.price.has(d)||s.checkout.has(d)}},get settings(){return i}})),n.debug("Activated:",{literals:o,settings:i});let l=new CustomEvent(Zr,{bubbles:!0,cancelable:!1,detail:this});performance.mark(Cs),y(this,kr,performance.measure(Cs,Ts)),this.dispatchEvent(l),setTimeout(()=>{this.logFailedRequests()},1e4)}connectedCallback(){performance.mark(Ts),this.activate()}flushWcsCache(){this.flushWcsCacheInternal(),this.log.debug("Flushed WCS cache")}refreshOffers(){this.flushWcsCacheInternal(),document.querySelectorAll(cr).forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers"),this.logFailedRequests()}refreshFragments(){this.flushWcsCacheInternal(),customElements.get("aem-fragment")?.cache.clear(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh(!1)),this.log.debug("Refreshed AEM fragments"),this.logFailedRequests()}get duration(){return{"mas-commerce-service:measure":Le(h(this,kr))}}logFailedRequests(){let r=[...performance.getEntriesByType("resource")].filter(({startTime:n})=>n>this.lastLoggingTime).filter(({transferSize:n,duration:a,responseStatus:o})=>n===0&&a===0&&o<200||o>=400),i=Array.from(new Map(r.map(n=>[n.name,n])).values());if(i.some(({name:n})=>/(\/fragment\?|web_commerce_artifact)/.test(n))){let n=i.map(({name:a})=>a);this.log.error("Failed requests:",{failedUrls:n,...this.duration})}this.lastLoggingTime=performance.now().toFixed(3)}};kr=new WeakMap,Rt=new WeakMap,Mt=new WeakSet,ks=function(){let r=this.getAttribute("env")??"prod",i={commerce:{env:r},hostEnv:{name:r},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate")??1,10),isProdDomain:r==="prod"},masIOUrl:this.getAttribute("mas-io-url")};return["locale","country","language","preview"].forEach(n=>{let a=this.getAttribute(n);a&&(i[n]=a)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(n=>{let a=this.getAttribute(n);if(a!=null){let o=n.replace(/-([a-z])/g,s=>s[1].toUpperCase());i.commerce[o]=a}}),i},Ps=function(r){return["on","true",!0].includes(this.getAttribute(`data-${r}`)||B(r))};window.customElements.get(_s)||window.customElements.define(_s,Zn);var Pr=class Pr extends hi(HTMLButtonElement){static createCheckoutButton(t={},r=""){return di(Pr,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};m(Pr,"is","checkout-button"),m(Pr,"tag","button");var Ot=Pr;window.customElements.get(Ot.is)||window.customElements.define(Ot.is,Ot,{extends:Ot.tag});function ch(e){return`https://${e==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var pt,ht=class ht extends HTMLAnchorElement{constructor(){super();m(this,"masElement",new qe(this));E(this,pt);this.setAttribute("is",ht.is)}get isUptLink(){return!0}initializeWcsData(r,i){this.setAttribute("data-wcs-osi",r),i&&this.setAttribute("data-promotion-code",i)}attributeChangedCallback(r,i,n){this.masElement.attributeChangedCallback(r,i,n)}connectedCallback(){this.masElement.connectedCallback(),y(this,pt,dt()),h(this,pt)&&(this.log=h(this,pt).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),y(this,pt,void 0)}requestUpdate(r=!1){this.masElement.requestUpdate(r)}onceSettled(){return this.masElement.onceSettled()}async render(){let r=dt();if(!r)return!1;this.dataset.imsCountry||r.imsCountryPromise.then(o=>{o&&(this.dataset.imsCountry=o)});let i=r.collectCheckoutOptions({},this);if(!i.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let n=this.masElement.togglePending(i),a=r.resolveOfferSelectors(i);try{let[[o]]=await Promise.all(a),{country:s,language:c,env:l}=i,d=`locale=${c}_${s}&country=${s}&offer_id=${o.offerId}`,p=this.getAttribute("data-promotion-code");p&&(d+=`&promotion_code=${encodeURIComponent(p)}`),this.href=`${ch(l)}?${d}`,this.masElement.toggleResolved(n,o,i)}catch(o){let s=new Error(`Could not resolve offer selectors for id: ${i.wcsOsi}.`,o.message);return this.masElement.toggleFailed(n,s,i),!1}}static createFrom(r){let i=new ht;for(let n of r.attributes)n.name!=="is"&&(n.name==="class"&&n.value.includes("upt-link")?i.setAttribute("class",n.value.replace("upt-link","").trim()):i.setAttribute(n.name,n.value));return i.innerHTML=r.innerHTML,i.setAttribute("tabindex",0),i}};pt=new WeakMap,m(ht,"is","upt-link"),m(ht,"tag","a"),m(ht,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var je=ht;window.customElements.get(je.is)||window.customElements.define(je.is,je,{extends:je.tag});R();R();var Q="(max-width: 767px)",ne="(max-width: 1199px)",F="(min-width: 768px)",O="(min-width: 1200px)",se="(min-width: 1600px)",Ks={matchMobile:window.matchMedia(Q),matchDesktop:window.matchMedia(`${O} and (not ${se})`),matchDesktopOrUp:window.matchMedia(O),matchLargeDesktop:window.matchMedia(se),get isMobile(){return this.matchMobile.matches},get isDesktop(){return this.matchDesktop.matches},get isDesktopOrUp(){return this.matchDesktopOrUp.matches}},D=Ks;function Dr(){return Ks.isDesktop}var Qs=b` :host { --consonant-merch-card-background-color: #fff; --consonant-merch-card-border: 1px solid diff --git a/web-components/src/inline-price.js b/web-components/src/inline-price.js index 02179862e..f9935aaa6 100644 --- a/web-components/src/inline-price.js +++ b/web-components/src/inline-price.js @@ -57,12 +57,12 @@ const DISPLAY_ALL_TAX_COUNTRIES = [ 'NZ_en', 'TH_en', 'TH_th', + 'MU_en', ]; // countries where tax is displayed for some segments only by default const DISPLAY_TAX_MAP = { [INDIVIDUAL]: [ - 'MU_en', 'LT_lt', 'LV_lv', 'NG_en', @@ -71,7 +71,7 @@ const DISPLAY_TAX_MAP = { 'SG_en', 'KR_ko', ], - [BUSINESS]: ['MU_en', 'LT_lt', 'LV_lv', 'NG_en', 'CO_es', 'KR_ko'], + [BUSINESS]: ['LT_lt', 'LV_lv', 'NG_en', 'CO_es', 'KR_ko'], [STUDENT]: ['LT_lt', 'LV_lv', 'SA_en', 'SG_en'], [UNIVERSITY]: ['SG_en', 'KR_ko'], }; @@ -79,7 +79,7 @@ const DISPLAY_TAX_MAP = { // For most countries where tax label is displayed the tax is included for Individuals and Students // and excluded for Business and Universities. This is the map of TaxExclusive values for other countries const TAX_EXCLUDED_MAP = { - ['MU_en']: [false, false, false, false], + ['MU_en']: [true, true, true, true], ['NG_en']: [false, false, false, false], ['AU_en']: [false, false, false, false], ['JP_ja']: [false, false, false, false], diff --git a/web-components/test/price.test.js b/web-components/test/price.test.js index 91b413f20..3017bab3f 100644 --- a/web-components/test/price.test.js +++ b/web-components/test/price.test.js @@ -812,10 +812,10 @@ describe('class "InlinePrice"', () => { { locale: 'MU_en', expected: [ - [true, false], - [true, false], - [false, false], - [false, false], + [true, true], + [true, true], + [true, true], + [true, true], ], }, { From 449d85620a5368c8cddfb7bd40e1987d209765f2 Mon Sep 17 00:00:00 2001 From: Bozo Jovicic Date: Thu, 18 Dec 2025 10:45:48 +0100 Subject: [PATCH 2/3] MWPW-185302 Make prices tax exclusive for all segments in africa --- web-components/dist/merch-card-collection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-components/dist/merch-card-collection.js b/web-components/dist/merch-card-collection.js index 99b4dfa53..9cc996a64 100644 --- a/web-components/dist/merch-card-collection.js +++ b/web-components/dist/merch-card-collection.js @@ -4612,7 +4612,7 @@ merch-card[variant="mini"] span.renewal-text { `);var xa=new Map,J=(e,t,r=null,i=null,a)=>{xa.set(e,{class:t,fragmentMapping:r,style:i,collectionOptions:a})};J("catalog",Ge,Zi,Ge.variantStyle);J("image",Gt);J("inline-heading",Vt);J("mini-compare-chart",qe,null,qe.variantStyle);J("plans",Q,jt,Q.variantStyle,Q.collectionOptions);J("plans-students",Q,na,Q.variantStyle,Q.collectionOptions);J("plans-education",Q,aa,Q.variantStyle,Q.collectionOptions);J("plans-v2",Se,ca,Se.variantStyle,Se.collectionOptions);J("product",je,null,je.variantStyle);J("segment",We,null,We.variantStyle);J("special-offers",Ye,ha,Ye.variantStyle);J("simplified-pricing-express",Xe,Qr,Xe.variantStyle);J("full-pricing-express",Ke,Jr,Ke.variantStyle);J("mini",Ze,ga,Ze.variantStyle);function $t(e){return xa.get(e)?.fragmentMapping}var va="tacocat.js";var ei=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),ba=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function H(e,t={},{metadata:r=!0,search:i=!0,storage:a=!0}={}){let n;if(i&&n==null){let s=new URLSearchParams(window.location.search),o=Qe(i)?i:e;n=s.get(o)}if(a&&n==null){let s=Qe(a)?a:e;n=window.sessionStorage.getItem(s)??window.localStorage.getItem(s)}if(r&&n==null){let s=ls(Qe(r)?r:e);n=document.documentElement.querySelector(`meta[name="${s}"]`)?.content}return n??t[e]}var cs=e=>typeof e=="boolean",Yt=e=>typeof e=="function",Xt=e=>typeof e=="number",ya=e=>e!=null&&typeof e=="object";var Qe=e=>typeof e=="string",Ea=e=>Qe(e)&&e,bt=e=>Xt(e)&&Number.isFinite(e)&&e>0;function Kt(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,i])=>{t(i)&&delete e[r]}),e}function w(e,t){if(cs(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function yt(e,t,r){let i=Object.values(t);return i.find(a=>ei(a,e))??r??i[0]}function ls(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,i)=>`${r}-${i}`).replace(/\W+/gu,"-").toLowerCase()}function wa(e,t=1){return Xt(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var ds=Date.now(),ti=()=>`(+${Date.now()-ds}ms)`,Zt=new Set,ps=w(H("tacocat.debug",{},{metadata:!1}),!1);function Aa(e){let t=`[${va}/${e}]`,r=(s,o,...c)=>s?!0:(a(o,...c),!1),i=ps?(s,...o)=>{console.debug(`${t} ${s}`,...o,ti())}:()=>{},a=(s,...o)=>{let c=`${t} ${s}`;Zt.forEach(([l])=>l(c,...o))};return{assert:r,debug:i,error:a,warn:(s,...o)=>{let c=`${t} ${s}`;Zt.forEach(([,l])=>l(c,...o))}}}function hs(e,t){let r=[e,t];return Zt.add(r),()=>{Zt.delete(r)}}hs((e,...t)=>{console.error(e,...t,ti())},(e,...t)=>{console.warn(e,...t,ti())});var ms="no promo",Sa="promo-tag",us="yellow",fs="neutral",gs=(e,t,r)=>{let i=n=>n||ms,a=r?` (was "${i(t)}")`:"";return`${i(e)}${a}`},xs="cancel-context",Qt=(e,t)=>{let r=e===xs,i=!r&&e?.length>0,a=(i||r)&&(t&&t!=e||!t&&!r),n=a&&i||!a&&!!t,s=n?e||t:void 0;return{effectivePromoCode:s,overridenPromoCode:e,className:n?Sa:`${Sa} no-promo`,text:gs(s,t,a),variant:n?us:fs,isOverriden:a}};var ri;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(ri||(ri={}));var ie;(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"})(ie||(ie={}));var oe;(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"})(oe||(oe={}));var ii;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(ii||(ii={}));var ai;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(ai||(ai={}));var ni;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(ni||(ni={}));var oi;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(oi||(oi={}));var si="ABM",ci="PUF",li="M2M",di="PERPETUAL",pi="P3Y",vs="TAX_INCLUSIVE_DETAILS",bs="TAX_EXCLUSIVE",Ta={ABM:si,PUF:ci,M2M:li,PERPETUAL:di,P3Y:pi},Lp={[si]:{commitment:ie.YEAR,term:oe.MONTHLY},[ci]:{commitment:ie.YEAR,term:oe.ANNUAL},[li]:{commitment:ie.MONTH,term:oe.MONTHLY},[di]:{commitment:ie.PERPETUAL,term:void 0},[pi]:{commitment:ie.THREE_MONTHS,term:oe.P3Y}},_a="Value is not an offer",Jt=e=>{if(typeof e!="object")return _a;let{commitment:t,term:r}=e,i=ys(t,r);return{...e,planType:i}};var ys=(e,t)=>{switch(e){case void 0:return _a;case"":return"";case ie.YEAR:return t===oe.MONTHLY?si:t===oe.ANNUAL?ci:"";case ie.MONTH:return t===oe.MONTHLY?li:"";case ie.PERPETUAL:return di;case ie.TERM_LICENSE:return t===oe.P3Y?pi:"";default:return""}};function Ca(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:i,priceWithoutTax:a,priceWithoutDiscountAndTax:n,taxDisplay:s}=t;if(s!==vs)return e;let o={...e,priceDetails:{...t,price:a??r,priceWithoutDiscount:n??i,taxDisplay:bs}};return o.offerType==="TRIAL"&&o.priceDetails.price===0&&(o.priceDetails.price=o.priceDetails.priceWithoutDiscount),o}var Es="mas-commerce-service",ws={requestId:pt,etag:"Etag",lastModified:"Last-Modified",serverTiming:"server-timing"};function Et(e,{country:t,forceTaxExclusive:r}){let i;if(e.length<2)i=e;else{let a=t==="GB"?"EN":"MULT";e.sort((n,s)=>n.language===a?-1:s.language===a?1:0),e.sort((n,s)=>!n.term&&s.term?-1:n.term&&!s.term?1:0),i=[e[0]]}return r&&(i=i.map(Ca)),i}var er=e=>window.setTimeout(e);function Je(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(wa).filter(bt);return r.length||(r=[t]),r}function tr(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(Ea)}function ee(){return document.getElementsByTagName(Es)?.[0]}function Pa(e){let t={};if(!e?.headers)return t;let r=e.headers;for(let[i,a]of Object.entries(ws)){let n=r.get(a);n&&(n=n.replace(/[,;]/g,"|"),n=n.replace(/[| ]+/g,"|"),t[i]=n)}return t}var Re={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals","element"],serializableTypes:["Array","Object"],sampleRate:1,tags:"acom",isProdDomain:!1},La=1e3;function As(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function ka(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:i,originatingRequest:a,status:n}=e;return[i,n,a].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Re.serializableTypes.includes(r))return r}return e}function Ss(e,t){if(!Re.ignoredProperties.includes(e))return ka(t)}var hi={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,i=[],a=[],n=t;r.forEach(l=>{l!=null&&(As(l)?i:a).push(l)}),i.length&&(n+=" "+i.map(ka).join(" "));let{pathname:s,search:o}=window.location,c=`${Re.delimiter}page=${s}${o}`;c.length>La&&(c=`${c.slice(0,La)}`),n+=c,a.length&&(n+=`${Re.delimiter}facts=`,n+=JSON.stringify(a,Ss)),window.lana?.log(n,Re)}};function rr(e){Object.assign(Re,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Re&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var Ma={LOCAL:"local",PROD:"prod",STAGE:"stage"},mi={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},ui=new Set,fi=new Set,Ra=new Map,Na={append({level:e,message:t,params:r,timestamp:i,source:a}){console[e](`${i}ms [${a}] %c${t}`,"font-weight: bold;",...r)}},Oa={filter:({level:e})=>e!==mi.DEBUG},Ts={filter:()=>!1};function _s(e,t,r,i,a){return{level:e,message:t,namespace:r,get params(){return i.length===1&&Yt(i[0])&&(i=i[0](),Array.isArray(i)||(i=[i])),i},source:a,timestamp:performance.now().toFixed(3)}}function Cs(e){[...fi].every(t=>t(e))&&ui.forEach(t=>t(e))}function Ia(e){let t=(Ra.get(e)??0)+1;Ra.set(e,t);let r=`${e} #${t}`,i={id:r,namespace:e,module:a=>Ia(`${i.namespace}/${a}`),updateConfig:rr};return Object.values(mi).forEach(a=>{i[a]=(n,...s)=>Cs(_s(a,n,e,s,r))}),Object.seal(i)}function ir(...e){e.forEach(t=>{let{append:r,filter:i}=t;Yt(i)&&fi.add(i),Yt(r)&&ui.add(r)})}function Ps(e={}){let{name:t}=e,r=w(H("commerce.debug",{search:!0,storage:!0}),t===Ma.LOCAL);return ir(r?Na:Oa),t===Ma.PROD&&ir(hi),se}function Ls(){ui.clear(),fi.clear()}var se={...Ia(Dr),Level:mi,Plugins:{consoleAppender:Na,debugFilter:Oa,quietFilter:Ts,lanaAppender:hi},init:Ps,reset:Ls,use:ir};var et=class e extends Error{constructor(t,r,i){if(super(t,{cause:i}),this.name="MasError",r.response){let a=r.response.headers?.get(pt);a&&(r.requestId=a),r.response.status&&(r.status=r.response.status,r.statusText=r.response.statusText),r.response.url&&(r.url=r.response.url)}delete r.response,this.context=r,Error.captureStackTrace&&Error.captureStackTrace(this,e)}toString(){let t=Object.entries(this.context||{}).map(([i,a])=>`${i}: ${JSON.stringify(a)}`).join(", "),r=`${this.name}: ${this.message}`;return t&&(r+=` (${t})`),this.cause&&(r+=` Caused by: ${this.cause}`),r}};var ks={[le]:Lr,[we]:kr,[ue]:Mr},Ms={[le]:Or,[ue]:Ir},wt,Te=class{constructor(t){V(this,wt);g(this,"changes",new Map);g(this,"connected",!1);g(this,"error");g(this,"log");g(this,"options");g(this,"promises",[]);g(this,"state",we);g(this,"timer",null);g(this,"value");g(this,"version",0);g(this,"wrapperElement");this.wrapperElement=t,this.log=se.module("mas-element")}update(){[le,we,ue].forEach(t=>{this.wrapperElement.classList.toggle(ks[t],t===this.state)})}notify(){(this.state===ue||this.state===le)&&(this.state===ue?this.promises.forEach(({resolve:r})=>r(this.wrapperElement)):this.state===le&&this.promises.forEach(({reject:r})=>r(this.error)),this.promises=[]);let t=this.error;this.error instanceof et&&(t={message:this.error.message,...this.error.context}),this.wrapperElement.dispatchEvent(new CustomEvent(Ms[this.state],{bubbles:!0,detail:t}))}attributeChangedCallback(t,r,i){this.changes.set(t,i),this.requestUpdate()}connectedCallback(){q(this,wt,ee()),this.requestUpdate(!0)}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement}))}onceSettled(){let{error:t,promises:r,state:i}=this;return ue===i?Promise.resolve(this.wrapperElement):le===i?Promise.reject(t):new Promise((a,n)=>{r.push({resolve:a,reject:n})})}toggleResolved(t,r,i){return t!==this.version?!1:(i!==void 0&&(this.options=i),this.state=ue,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),er(()=>this.notify()),!0)}toggleFailed(t,r,i){if(t!==this.version)return!1;i!==void 0&&(this.options=i),this.error=r,this.state=le,this.update();let a=this.wrapperElement.getAttribute("is");return this.log?.error(`${a}: Failed to render: ${r.message}`,{element:this.wrapperElement,...r.context,...A(this,wt)?.duration}),er(()=>this.notify()),!0}togglePending(t){return this.version++,t&&(this.options=t),this.state=we,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!ee()||this.timer)return;let{error:r,options:i,state:a,value:n,version:s}=this;this.state=we,this.timer=er(async()=>{this.timer=null;let o=null;if(this.changes.size&&(o=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:o}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:o})),o||t)try{await this.wrapperElement.render?.()===!1&&this.state===we&&this.version===s&&(this.state=a,this.error=r,this.value=n,this.update(),this.notify())}catch(c){this.toggleFailed(this.version,c,i)}})}};wt=new WeakMap;function Da(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function ar(e,t={}){let{tag:r,is:i}=e,a=document.createElement(r,{is:i});return a.setAttribute("is",i),Object.assign(a.dataset,Da(t)),a}function Ha(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,Da(t)),e):null}function Rs(e){return`https://${e==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var Ie,Ne=class Ne extends HTMLAnchorElement{constructor(){super();g(this,"masElement",new Te(this));V(this,Ie);this.setAttribute("is",Ne.is)}get isUptLink(){return!0}initializeWcsData(r,i){this.setAttribute("data-wcs-osi",r),i&&this.setAttribute("data-promotion-code",i)}attributeChangedCallback(r,i,a){this.masElement.attributeChangedCallback(r,i,a)}connectedCallback(){this.masElement.connectedCallback(),q(this,Ie,ut()),A(this,Ie)&&(this.log=A(this,Ie).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),q(this,Ie,void 0)}requestUpdate(r=!1){this.masElement.requestUpdate(r)}onceSettled(){return this.masElement.onceSettled()}async render(){let r=ut();if(!r)return!1;this.dataset.imsCountry||r.imsCountryPromise.then(s=>{s&&(this.dataset.imsCountry=s)});let i=r.collectCheckoutOptions({},this);if(!i.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let a=this.masElement.togglePending(i),n=r.resolveOfferSelectors(i);try{let[[s]]=await Promise.all(n),{country:o,language:c,env:l}=i,d=`locale=${c}_${o}&country=${o}&offer_id=${s.offerId}`,h=this.getAttribute("data-promotion-code");h&&(d+=`&promotion_code=${encodeURIComponent(h)}`),this.href=`${Rs(l)}?${d}`,this.masElement.toggleResolved(a,s,i)}catch(s){let o=new Error(`Could not resolve offer selectors for id: ${i.wcsOsi}.`,s.message);return this.masElement.toggleFailed(a,o,i),!1}}static createFrom(r){let i=new Ne;for(let a of r.attributes)a.name!=="is"&&(a.name==="class"&&a.value.includes("upt-link")?i.setAttribute("class",a.value.replace("upt-link","").trim()):i.setAttribute(a.name,a.value));return i.innerHTML=r.innerHTML,i.setAttribute("tabindex",0),i}};Ie=new WeakMap,g(Ne,"is","upt-link"),g(Ne,"tag","a"),g(Ne,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var Oe=Ne;window.customElements.get(Oe.is)||window.customElements.define(Oe.is,Oe,{extends:Oe.tag});function Ba(e){return e&&(e.startsWith("plans")?"plans":e)}var Ns=/[0-9\-+#]/,Os=/[^\d\-+#]/g;function Ua(e){return e.search(Ns)}function Is(e="#.##"){let t={},r=e.length,i=Ua(e);t.prefix=i>0?e.substring(0,i):"";let a=Ua(e.split("").reverse().join("")),n=r-a,s=e.substring(n,n+1),o=n+(s==="."||s===","?1:0);t.suffix=a>0?e.substring(o,r):"",t.mask=e.substring(i,o),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(Os);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 Ds(e,t,r){let i=!1,a={value:e};e<0&&(i=!0,a.value=-a.value),a.sign=i?"-":"",a.value=Number(a.value).toFixed(t.fraction&&t.fraction.length),a.value=Number(a.value).toString();let n=t.fraction&&t.fraction.lastIndexOf("0"),[s="0",o=""]=a.value.split(".");return(!o||o&&o.length<=n)&&(o=n<0?"":(+("0."+o)).toFixed(n+1).replace("0.","")),a.integer=s,a.fraction=o,Hs(a,t),(a.result==="0"||a.result==="")&&(i=!1,a.sign=""),!i&&t.maskHasPositiveSign?a.sign="+":i&&t.maskHasPositiveSign?a.sign="-":i&&(a.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),a}function Hs(e,t){e.result="";let r=t.integer.split(t.separator),i=r.join(""),a=i&&i.indexOf("0");if(a>-1)for(;e.integer.lengthe*12,He=(e,t,r=1)=>{if(!e)return!1;let{start:i,end:a,displaySummary:{amount:n,duration:s,minProductQuantity:o=1,outcomeType:c}={}}=e;if(!(n&&s&&c)||r=d&&l<=h},De={MONTH:"MONTH",YEAR:"YEAR"},Fs={[ne.ANNUAL]:12,[ne.MONTHLY]:1,[ne.THREE_YEARS]:36,[ne.TWO_YEARS]:24},xi=(e,t)=>({accept:e,round:t}),zs=[xi(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),xi(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),xi(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],vi={[Pe.YEAR]:{[ne.MONTHLY]:De.MONTH,[ne.ANNUAL]:De.YEAR},[Pe.MONTH]:{[ne.MONTHLY]:De.MONTH}},$s=(e,t)=>e.indexOf(`'${t}'`)===0,Gs=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),i=ja(r);return!!i?t||(r=r.replace(/[,\.]0+/,i)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+qs(e)),r},Vs=e=>{let t=js(e),r=$s(e,t),i=e.replace(/'.*?'/,""),a=Ga.test(i)||Va.test(i);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:a}},qa=e=>e.replace(Ga,$a).replace(Va,$a),qs=e=>e.match(/#(.?)#/)?.[1]===za?Us:za,js=e=>e.match(/'(.*?)'/)?.[1]??"",ja=e=>e.match(/0(.?)0/)?.[1]??"";function tt({formatString:e,price:t,usePrecision:r,isIndianPrice:i=!1},a,n=s=>s){let{currencySymbol:s,isCurrencyFirst:o,hasCurrencySpace:c}=Vs(e),l=r?ja(e):"",d=Gs(e,r),h=r?2:0,u=n(t,{currencySymbol:s}),p=i?u.toLocaleString("hi-IN",{minimumFractionDigits:h,maximumFractionDigits:h}):Fa(d,u),m=r?p.lastIndexOf(l):p.length,f=p.substring(0,m),v=p.substring(m+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,p).replace(/SYMBOL/,s),currencySymbol:s,decimals:v,decimalsDelimiter:l,hasCurrencySpace:c,integer:f,isCurrencyFirst:o,recurrenceTerm:a}}var Wa=e=>{let{commitment:t,term:r,usePrecision:i}=e,a=Fs[r]??1;return tt(e,a>1?De.MONTH:vi[t]?.[r],n=>{let s={divisor:a,price:n,usePrecision:i},{round:o}=zs.find(({accept:c})=>c(s));if(!o)throw new Error(`Missing rounding rule for: ${JSON.stringify(s)}`);return o(s)})},Ya=({commitment:e,term:t,...r})=>tt(r,vi[e]?.[t]),Xa=e=>{let{commitment:t,instant:r,price:i,originalPrice:a,priceWithoutDiscount:n,promotion:s,quantity:o=1,term:c}=e;if(t===Pe.YEAR&&c===ne.MONTHLY){if(!s)return tt(e,De.YEAR,gi);let{displaySummary:{outcomeType:l,duration:d}={}}=s;switch(l){case"PERCENTAGE_DISCOUNT":if(He(s,r,o)){let h=parseInt(d.replace("P","").replace("M",""));if(isNaN(h))return gi(i);let u=a*h,p=n*(12-h),m=Math.round((u+p)*100)/100;return tt({...e,price:m},De.YEAR)}default:return tt(e,De.YEAR,()=>gi(n??i))}}return tt(e,vi[t]?.[c])};var Ka="download",Za="upgrade",Qa={e:"EDU",t:"TEAM"};function Ja(e,t={},r=""){let i=ee();if(!i)return null;let{checkoutMarketSegment:a,checkoutWorkflow:n,checkoutWorkflowStep:s,entitlement:o,upgrade:c,modal:l,perpetual:d,promotionCode:h,quantity:u,wcsOsi:p,extraOptions:m,analyticsId:f}=i.collectCheckoutOptions(t),v=ar(e,{checkoutMarketSegment:a,checkoutWorkflow:n,checkoutWorkflowStep:s,entitlement:o,upgrade:c,modal:l,perpetual:d,promotionCode:h,quantity:u,wcsOsi:p,extraOptions:m,analyticsId:f});return r&&(v.innerHTML=`${r}`),v}function en(e){return class extends e{constructor(){super(...arguments);g(this,"checkoutActionHandler");g(this,"masElement",new Te(this))}attributeChangedCallback(i,a,n){this.masElement.attributeChangedCallback(i,a,n)}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}get marketSegment(){let i=this.options?.ms??this.value?.[0].marketSegments?.[0];return Qa[i]??i}get customerSegment(){let i=this.options?.cs??this.value?.[0]?.customerSegment;return Qa[i]??i}get is3in1Modal(){return Object.values(ke).includes(this.getAttribute("data-modal"))}get isOpen3in1Modal(){let i=document.querySelector("meta[name=mas-ff-3in1]");return this.is3in1Modal&&(!i||i.content!=="off")}requestUpdate(i=!1){return this.masElement.requestUpdate(i)}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(i={}){let a=ee();if(!a)return!1;this.dataset.imsCountry||a.imsCountryPromise.then(p=>{p&&(this.dataset.imsCountry=p)}),i.imsCountry=null;let n=a.collectCheckoutOptions(i,this);if(!n.wcsOsi.length)return!1;let s;try{s=JSON.parse(n.extraOptions??"{}")}catch(p){this.masElement.log?.error("cannot parse exta checkout options",p)}let o=this.masElement.togglePending(n);this.setCheckoutUrl("");let c=a.resolveOfferSelectors(n),l=await Promise.all(c);l=l.map(p=>Et(p,n));let d=l.flat().find(p=>p.promotion);!He(d?.promotion,d?.promotion?.displaySummary?.instant,n.quantity[0])&&n.promotionCode&&delete n.promotionCode,n.country=this.dataset.imsCountry||n.country;let u=await a.buildCheckoutAction?.(l.flat(),{...s,...n},this);return this.renderOffers(l.flat(),n,{},u,o)}renderOffers(i,a,n={},s=void 0,o=void 0){let c=ee();if(!c)return!1;if(a={...JSON.parse(this.dataset.extraOptions??"{}"),...a,...n},o??(o=this.masElement.togglePending(a)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),s){this.classList.remove(Ka,Za),this.masElement.toggleResolved(o,i,a);let{url:d,text:h,className:u,handler:p}=s;d&&this.setCheckoutUrl(d),h&&(this.firstElementChild.innerHTML=h),u&&this.classList.add(...u.split(" ")),p&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=p.bind(this))}if(i.length){if(this.masElement.toggleResolved(o,i,a)){if(!this.classList.contains(Ka)&&!this.classList.contains(Za)){let d=c.buildCheckoutURL(i,a);this.setCheckoutUrl(a.modal==="true"?"#":d)}return!0}}else{let d=new Error(`Not provided: ${a?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(o,d,a))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(i){}updateOptions(i={}){let a=ee();if(!a)return!1;let{checkoutMarketSegment:n,checkoutWorkflow:s,checkoutWorkflowStep:o,entitlement:c,upgrade:l,modal:d,perpetual:h,promotionCode:u,quantity:p,wcsOsi:m}=a.collectCheckoutOptions(i);return Ha(this,{checkoutMarketSegment:n,checkoutWorkflow:s,checkoutWorkflowStep:o,entitlement:c,upgrade:l,modal:d,perpetual:h,promotionCode:u,quantity:p,wcsOsi:m}),!0}}}var At=class At extends en(HTMLAnchorElement){static createCheckoutLink(t={},r=""){return Ja(At,t,r)}setCheckoutUrl(t){this.setAttribute("href",t)}get isCheckoutLink(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}}};g(At,"is","checkout-link"),g(At,"tag","a");var xe=At;window.customElements.get(xe.is)||window.customElements.define(xe.is,xe,{extends:xe.tag});var Ws="p_draft_landscape",Ys="/store/",Xs=new Map([["countrySpecific","cs"],["customerSegment","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["addonProductArrangementCode","ao"],["offerType","ot"],["marketSegment","ms"]]),bi=new Set(["af","ai","ao","apc","appctxid","cli","co","cs","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"]),Ks=["env","workflowStep","clientId","country"],tn=new Set(["gid","gtoken","notifauditid","cohortid","productname","sdid","attimer","gcsrc","gcprog","gcprogcat","gcpagetype"]),rn=e=>Xs.get(e)??e;function nr(e,t,r){for(let[i,a]of Object.entries(e)){let n=rn(i);a!=null&&r.has(n)&&t.set(n,a)}}function Zs(e){switch(e){case $r.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function Qs(e,t){for(let r in e){let i=e[r];for(let[a,n]of Object.entries(i)){if(n==null)continue;let s=rn(a);t.set(`items[${r}][${s}]`,n)}}}function Js({url:e,modal:t,is3in1:r}){if(!r||!e?.searchParams)return e;e.searchParams.set("rtc","t"),e.searchParams.set("lo","sl");let i=e.searchParams.get("af");return e.searchParams.set("af",[i,"uc_new_user_iframe","uc_new_system_close"].filter(Boolean).join(",")),e.searchParams.get("cli")!=="doc_cloud"&&e.searchParams.set("cli",t===ke.CRM?"creative":"mini_plans"),e}function ec(e){let t=new URLSearchParams(window.location.search),r={};tn.forEach(i=>{let a=t.get(i);a!==null&&(r[i]=a)}),Object.keys(r).length>0&&nr(r,e.searchParams,tn)}function an(e){tc(e);let{env:t,items:r,workflowStep:i,marketSegment:a,customerSegment:n,offerType:s,productArrangementCode:o,landscape:c,modal:l,is3in1:d,preselectPlan:h,...u}=e,p=new URL(Zs(t));if(p.pathname=`${Ys}${i}`,i!==Z.SEGMENTATION&&i!==Z.CHANGE_PLAN_TEAM_PLANS&&Qs(r,p.searchParams),nr({...u},p.searchParams,bi),ec(p),c===Ae.DRAFT&&nr({af:Ws},p.searchParams,bi),i===Z.SEGMENTATION){let m={marketSegment:a,offerType:s,customerSegment:n,productArrangementCode:o,quantity:r?.[0]?.quantity,addonProductArrangementCode:o?r?.find(f=>f.productArrangementCode!==o)?.productArrangementCode:r?.[1]?.productArrangementCode};h?.toLowerCase()==="edu"?p.searchParams.set("ms","EDU"):h?.toLowerCase()==="team"&&p.searchParams.set("cs","TEAM"),nr(m,p.searchParams,bi),p.searchParams.get("ot")==="PROMOTION"&&p.searchParams.delete("ot"),p=Js({url:p,modal:l,is3in1:d})}return p.toString()}function tc(e){for(let t of Ks)if(!e[t])throw new Error(`Argument "checkoutData" is not valid, missing: ${t}`);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}var C=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflowStep:Z.EMAIL,country:"US",displayOldPrice:!1,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,displayPlanType:!1,env:me.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,alternativePrice:!1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:Ae.PUBLISHED});function nn({settings:e,providers:t}){function r(n,s){let{checkoutClientId:o,checkoutWorkflowStep:c,country:l,language:d,promotionCode:h,quantity:u,preselectPlan:p,env:m}=e,f={checkoutClientId:o,checkoutWorkflowStep:c,country:l,language:d,promotionCode:h,quantity:u,preselectPlan:p,env:m};if(s)for(let Ee of t.checkout)Ee(s,f);let{checkoutMarketSegment:v,checkoutWorkflowStep:b=c,imsCountry:E,country:x=E??l,language:_=d,quantity:k=u,entitlement:L,upgrade:D,modal:U,perpetual:X,promotionCode:$=h,wcsOsi:F,extraOptions:R,...ae}=Object.assign(f,s?.dataset??{},n??{}),he=yt(b,Z,C.checkoutWorkflowStep);return f=Kt({...ae,extraOptions:R,checkoutClientId:o,checkoutMarketSegment:v,country:x,quantity:Je(k,C.quantity),checkoutWorkflowStep:he,language:_,entitlement:w(L),upgrade:w(D),modal:U,perpetual:w(X),promotionCode:Qt($).effectivePromoCode,wcsOsi:tr(F),preselectPlan:p}),f}function i(n,s){if(!Array.isArray(n)||!n.length||!s)return"";let{env:o,landscape:c}=e,{checkoutClientId:l,checkoutMarketSegment:d,checkoutWorkflowStep:h,country:u,promotionCode:p,quantity:m,preselectPlan:f,ms:v,cs:b,...E}=r(s),x=document.querySelector("meta[name=mas-ff-3in1]"),_=Object.values(ke).includes(s.modal)&&(!x||x.content!=="off"),k=window.frameElement||_?"if":"fp",[{productArrangementCode:L,marketSegments:[D],customerSegment:U,offerType:X}]=n,$=v??D??d,F=b??U;f?.toLowerCase()==="edu"?$="EDU":f?.toLowerCase()==="team"&&(F="TEAM");let R={is3in1:_,checkoutPromoCode:p,clientId:l,context:k,country:u,env:o,items:[],marketSegment:$,customerSegment:F,offerType:X,productArrangementCode:L,workflowStep:h,landscape:c,...E},ae=m[0]>1?m[0]:void 0;if(n.length===1){let{offerId:he}=n[0];R.items.push({id:he,quantity:ae})}else R.items.push(...n.map(({offerId:he,productArrangementCode:Ee})=>({id:he,quantity:ae,..._?{productArrangementCode:Ee}:{}})));return an(R)}let{createCheckoutLink:a}=xe;return{CheckoutLink:xe,CheckoutWorkflowStep:Z,buildCheckoutURL:i,collectCheckoutOptions:r,createCheckoutLink:a}}function rc({interval:e=200,maxAttempts:t=25}={}){let r=se.module("ims");return new Promise(i=>{r.debug("Waing for IMS to be ready");let a=0;function n(){window.adobeIMS?.initialized?i():++a>t?(r.debug("Timeout"),i()):setTimeout(n,e)}n()})}function ic(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function ac(e){let t=se.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:i})=>(t.debug("Got user country:",i),i),i=>{t.error("Unable to get user country:",i)}):null)}function on({}){let e=rc(),t=ic(e),r=ac(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}var sn=window.masPriceLiterals;function cn(e){if(Array.isArray(sn)){let t=i=>sn.find(a=>ei(a.lang,i)),r=t(e.language)??t(C.language);if(r)return Object.freeze(r)}return{}}var yi=function(e,t){return yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},yi(e,t)};function St(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yi(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var S=function(){return S=Object.assign||function(t){for(var r,i=1,a=arguments.length;i0}),r=[],i=0,a=t;i1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(sc,function(c,l,d,h,u,p){if(l)t.minimumIntegerDigits=d.length;else{if(h&&u)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(vn.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(mn.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(mn,function(c,l,d,h,u,p){return d==="*"?t.minimumFractionDigits=l.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:u&&p?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+p.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var n=a.options[0];n==="w"?t=S(S({},t),{trailingZeroDisplay:"stripIfInteger"}):n&&(t=S(S({},t),un(n)));continue}if(xn.test(a.stem)){t=S(S({},t),un(a.stem));continue}var s=bn(a.stem);s&&(t=S(S({},t),s));var o=cc(a.stem);o&&(t=S(S({},t),o))}return t}var _t={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 En(e,t){for(var r="",i=0;i>1),c="a",l=lc(t);for((l=="H"||l=="k")&&(o=0);o-- >0;)r+=c;for(;s-- >0;)r=l+r}else a==="J"?r+="H":r+=a}return r}function lc(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,i;r!=="root"&&(i=e.maximize().region);var a=_t[i||""]||_t[r||""]||_t["".concat(r,"-001")]||_t["001"];return a[0]}var Ai,dc=new RegExp("^".concat(wi.source,"*")),pc=new RegExp("".concat(wi.source,"*$"));function T(e,t){return{start:e,end:t}}var hc=!!String.prototype.startsWith,mc=!!String.fromCodePoint,uc=!!Object.fromEntries,fc=!!String.prototype.codePointAt,gc=!!String.prototype.trimStart,xc=!!String.prototype.trimEnd,vc=!!Number.isSafeInteger,bc=vc?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ti=!0;try{wn=_n("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ti=((Ai=wn.exec("a"))===null||Ai===void 0?void 0:Ai[0])==="a"}catch{Ti=!1}var wn,An=hc?function(t,r,i){return t.startsWith(r,i)}:function(t,r,i){return t.slice(i,i+r.length)===r},_i=mc?String.fromCodePoint:function(){for(var t=[],r=0;rn;){if(s=t[n++],s>1114111)throw RangeError(s+" is not a valid code point");i+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return i},Sn=uc?Object.fromEntries:function(t){for(var r={},i=0,a=t;i=i)){var a=t.charCodeAt(r),n;return a<55296||a>56319||r+1===i||(n=t.charCodeAt(r+1))<56320||n>57343?a:(a-55296<<10)+(n-56320)+65536}},yc=gc?function(t){return t.trimStart()}:function(t){return t.replace(dc,"")},Ec=xc?function(t){return t.trimEnd()}:function(t){return t.replace(pc,"")};function _n(e,t){return new RegExp(e,t)}var Ci;Ti?(Si=_n("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ci=function(t,r){var i;Si.lastIndex=r;var a=Si.exec(t);return(i=a[1])!==null&&i!==void 0?i:""}):Ci=function(t,r){for(var i=[];;){var a=Tn(t,r);if(a===void 0||Pn(a)||Sc(a))break;i.push(a),r+=a>=65536?2:1}return _i.apply(void 0,i)};var Si,Cn=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,i){for(var a=[];!this.isEOF();){var n=this.char();if(n===123){var s=this.parseArgument(t,i);if(s.err)return s;a.push(s.val)}else{if(n===125&&t>0)break;if(n===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),a.push({type:O.pound,location:T(o,this.clonePosition())})}else if(n===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(y.UNMATCHED_CLOSING_TAG,T(this.clonePosition(),this.clonePosition()))}else if(n===60&&!this.ignoreTag&&Pi(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;a.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;a.push(s.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,r){var i=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:O.literal,value:"<".concat(a,"/>"),location:T(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var n=this.parseMessage(t+1,r,!0);if(n.err)return n;var s=n.val,o=this.clonePosition();if(this.bumpIf("")?{val:{type:O.tag,value:a,children:s,location:T(i,this.clonePosition())},err:null}:this.error(y.INVALID_TAG,T(o,this.clonePosition())))}else return this.error(y.UNCLOSED_TAG,T(i,this.clonePosition()))}else return this.error(y.INVALID_TAG,T(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Ac(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var i=this.clonePosition(),a="";;){var n=this.tryParseQuote(r);if(n){a+=n;continue}var s=this.tryParseUnquoted(t,r);if(s){a+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){a+=o;continue}break}var c=T(i,this.clonePosition());return{val:{type:O.literal,value:a,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!wc(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 i=this.char();if(i===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(i);this.bump()}return _i.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(r==="plural"||r==="selectordinal")||i===125&&t>0?null:(this.bump(),_i(i))},e.prototype.parseArgument=function(t,r){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(y.EXPECT_ARGUMENT_CLOSING_BRACE,T(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(y.EMPTY_ARGUMENT,T(i,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(y.MALFORMED_ARGUMENT,T(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(y.EXPECT_ARGUMENT_CLOSING_BRACE,T(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:O.argument,value:a,location:T(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(y.EXPECT_ARGUMENT_CLOSING_BRACE,T(i,this.clonePosition())):this.parseArgumentOptions(t,r,a,i);default:return this.error(y.MALFORMED_ARGUMENT,T(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),i=Ci(this.message,r),a=r+i.length;this.bumpTo(a);var n=this.clonePosition(),s=T(t,n);return{value:i,location:s}},e.prototype.parseArgumentOptions=function(t,r,i,a){var n,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(o){case"":return this.error(y.EXPECT_ARGUMENT_TYPE,T(s,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var u=Ec(h.val);if(u.length===0)return this.error(y.EXPECT_ARGUMENT_STYLE,T(this.clonePosition(),this.clonePosition()));var p=T(d,this.clonePosition());l={style:u,styleLocation:p}}var m=this.tryParseArgumentClose(a);if(m.err)return m;var f=T(a,this.clonePosition());if(l&&An(l?.style,"::",0)){var v=yc(l.style.slice(2));if(o==="number"){var h=this.parseNumberSkeletonFromString(v,l.styleLocation);return h.err?h:{val:{type:O.number,value:i,location:f,style:h.val},err:null}}else{if(v.length===0)return this.error(y.EXPECT_DATE_TIME_SKELETON,f);var b=v;this.locale&&(b=En(v,this.locale));var u={type:Be.dateTime,pattern:b,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?pn(b):{}},E=o==="date"?O.date:O.time;return{val:{type:E,value:i,location:f,style:u},err:null}}}return{val:{type:o==="number"?O.number:o==="date"?O.date:O.time,value:i,location:f,style:(n=l?.style)!==null&&n!==void 0?n:null},err:null}}case"plural":case"selectordinal":case"select":{var x=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(y.EXPECT_SELECT_ARGUMENT_OPTIONS,T(x,S({},x)));this.bumpSpace();var _=this.parseIdentifierIfPossible(),k=0;if(o!=="select"&&_.value==="offset"){if(!this.bumpIf(":"))return this.error(y.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,T(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(y.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,y.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),_=this.parseIdentifierIfPossible(),k=h.val}var L=this.tryParsePluralOrSelectOptions(t,o,r,_);if(L.err)return L;var m=this.tryParseArgumentClose(a);if(m.err)return m;var D=T(a,this.clonePosition());return o==="select"?{val:{type:O.select,value:i,options:Sn(L.val),location:D},err:null}:{val:{type:O.plural,value:i,options:Sn(L.val),offset:k,pluralType:o==="plural"?"cardinal":"ordinal",location:D},err:null}}default:return this.error(y.INVALID_ARGUMENT_TYPE,T(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(y.EXPECT_ARGUMENT_CLOSING_BRACE,T(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(y.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,T(a,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 i=[];try{i=gn(t)}catch{return this.error(y.INVALID_NUMBER_SKELETON,r)}return{val:{type:Be.number,tokens:i,location:r,parsedOptions:this.shouldParseSkeletons?yn(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,i,a){for(var n,s=!1,o=[],c=new Set,l=a.value,d=a.location;;){if(l.length===0){var h=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(y.EXPECT_PLURAL_ARGUMENT_SELECTOR,y.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;d=T(h,this.clonePosition()),l=this.message.slice(h.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?y.DUPLICATE_SELECT_ARGUMENT_SELECTOR:y.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(s=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?y.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:y.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,T(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(t+1,r,i);if(m.err)return m;var f=this.tryParseArgumentClose(p);if(f.err)return f;o.push([l,{value:m.val,location:T(p,this.clonePosition())}]),c.add(l),this.bumpSpace(),n=this.parseIdentifierIfPossible(),l=n.value,d=n.location}return o.length===0?this.error(r==="select"?y.EXPECT_SELECT_ARGUMENT_SELECTOR:y.EXPECT_PLURAL_ARGUMENT_SELECTOR,T(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(y.MISSING_OTHER_CLAUSE,T(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var i=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var n=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)n=!0,s=s*10+(o-48),this.bump();else break}var c=T(a,this.clonePosition());return n?(s*=i,bc(s)?{val:s,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=Tn(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(An(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(i),!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()&&Pn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),i=this.message.charCodeAt(r+(t>=65536?2:1));return i??null},e}();function Pi(e){return e>=97&&e<=122||e>=65&&e<=90}function wc(e){return Pi(e)||e===47}function Ac(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 Pn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Sc(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 Li(e){e.forEach(function(t){if(delete t.location,dr(t)||pr(t))for(var r in t.options)delete t.options[r].location,Li(t.options[r].value);else sr(t)&&mr(t.style)||(cr(t)||lr(t))&&Tt(t.style)?delete t.style.location:hr(t)&&Li(t.children)})}function Ln(e,t){t===void 0&&(t={}),t=S({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Cn(e,t).parse();if(r.err){var i=SyntaxError(y[r.err.kind]);throw i.location=r.err.location,i.originalMessage=r.err.message,i}return t?.captureLocation||Li(r.val),r.val}function Ct(e,t){var r=t&&t.cache?t.cache:kc,i=t&&t.serializer?t.serializer:Lc,a=t&&t.strategy?t.strategy:_c;return a(e,{cache:r,serializer:i})}function Tc(e){return e==null||typeof e=="number"||typeof e=="boolean"}function kn(e,t,r,i){var a=Tc(i)?i:r(i),n=t.get(a);return typeof n>"u"&&(n=e.call(this,i),t.set(a,n)),n}function Mn(e,t,r){var i=Array.prototype.slice.call(arguments,3),a=r(i),n=t.get(a);return typeof n>"u"&&(n=e.apply(this,i),t.set(a,n)),n}function ki(e,t,r,i,a){return r.bind(t,e,i,a)}function _c(e,t){var r=e.length===1?kn:Mn;return ki(e,this,r,t.cache.create(),t.serializer)}function Cc(e,t){return ki(e,this,Mn,t.cache.create(),t.serializer)}function Pc(e,t){return ki(e,this,kn,t.cache.create(),t.serializer)}var Lc=function(){return JSON.stringify(arguments)};function Mi(){this.cache=Object.create(null)}Mi.prototype.get=function(e){return this.cache[e]};Mi.prototype.set=function(e,t){this.cache[e]=t};var kc={create:function(){return new Mi}},ur={variadic:Cc,monadic:Pc};var Ue;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ue||(Ue={}));var Pt=function(e){St(t,e);function t(r,i,a){var n=e.call(this,r)||this;return n.code=i,n.originalMessage=a,n}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Ri=function(e){St(t,e);function t(r,i,a,n){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(i,'". Options are "').concat(Object.keys(a).join('", "'),'"'),Ue.INVALID_VALUE,n)||this}return t}(Pt);var Rn=function(e){St(t,e);function t(r,i,a){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(i),Ue.INVALID_VALUE,a)||this}return t}(Pt);var Nn=function(e){St(t,e);function t(r,i){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(i,'"'),Ue.MISSING_VALUE,i)||this}return t}(Pt);var W;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(W||(W={}));function Mc(e){return e.length<2?e:e.reduce(function(t,r){var i=t[t.length-1];return!i||i.type!==W.literal||r.type!==W.literal?t.push(r):i.value+=r.value,t},[])}function Rc(e){return typeof e=="function"}function Lt(e,t,r,i,a,n,s){if(e.length===1&&Ei(e[0]))return[{type:W.literal,value:e[0].value}];for(var o=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Ln,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 In=On;var Oi={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",strikethroughAriaLabel:"Regularly at",planTypeLabel:"{planType, select, ABM {Annual, billed monthly} other {}}"},Dc=Aa("ConsonantTemplates/price"),Hc=/<\/?[^>]+(>|$)/g,B={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAlternative:"price-alternative",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"},_e={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel",alternativePriceAriaLabel:"alternativePriceAriaLabel"},Ii="TAX_EXCLUSIVE",Bc=e=>ya(e)?Object.entries(e).filter(([,t])=>Qe(t)||Xt(t)||t===!0).reduce((t,[r,i])=>t+` ${r}${i===!0?"":'="'+ba(i)+'"'}`,""):"",z=(e,t,r,i=!1)=>`${i?qa(t):t??""}`;function Uc(e){e=e.replaceAll("","</a>");let t=/]+(>|$)/g;return e.match(t)?.forEach(i=>{let a=i.replace("",">");e=e.replaceAll(i,a)}),e}function Fc(e){e=e.replaceAll("</a>","");let t=/<a (?!>)(.*?)(>|$)/g;return e.match(t)?.forEach(i=>{let a=i.replace("<a ","");e=e.replaceAll(i,a)}),e}function ve(e,t,r,i){let a=e[r];if(a==null)return"";let n=a.includes("<"),s=a.includes("${t}`:r&&(f=`${r}`),c&&(f+=p+m),f+=z(B.integer,o),f+=z(B.decimalsDelimiter,n),f+=z(B.decimals,a),c||(f+=m+p),f+=z(B.recurrence,l,null,!0),f+=z(B.unitType,d,null,!0),f+=z(B.taxInclusivity,h,!0),z(e,f,{...u})}var Y=({isAlternativePrice:e=!1,displayOptical:t=!1,displayStrikethrough:r=!1,displayAnnual:i=!1,instant:a=void 0}={})=>({country:n,displayFormatted:s=!0,displayRecurrence:o=!0,displayPerUnit:c=!1,displayTax:l=!1,language:d,literals:h={},quantity:u=1,space:p=!1,isPromoApplied:m=!1}={},{commitment:f,offerSelectorIds:v,formatString:b,price:E,priceWithoutDiscount:x,taxDisplay:_,taxTerm:k,term:L,usePrecision:D,promotion:U}={},X={})=>{Object.entries({country:n,formatString:b,language:d,price:E}).forEach(([Eo,wo])=>{if(wo==null)throw new Error(`Argument "${Eo}" is missing for osi ${v?.toString()}, country ${n}, language ${d}`)});let $={...Oi,...h},F=`${d.toLowerCase()}-${n.toUpperCase()}`,R;U&&!m&&x?R=e?E:x:r&&x?R=x:R=E;let ae=t?Wa:Ya;i&&(ae=Xa);let{accessiblePrice:he,recurrenceTerm:Ee,...Fi}=ae({commitment:f,formatString:b,instant:a,isIndianPrice:n==="IN",originalPrice:E,priceWithoutDiscount:x,price:t?E:R,promotion:U,quantity:u,term:L,usePrecision:D}),xr="",vr="",br="";w(o)&&Ee&&(br=ve($,F,_e.recurrenceLabel,{recurrenceTerm:Ee}));let Dt="";w(c)&&(p&&(Dt+=" "),Dt+=ve($,F,_e.perUnitLabel,{perUnit:"LICENSE"}));let Ht="";w(l)&&k&&(p&&(Ht+=" "),Ht+=ve($,F,_===Ii?_e.taxExclusiveLabel:_e.taxInclusiveLabel,{taxTerm:k})),r&&(xr=ve($,F,_e.strikethroughAriaLabel,{strikethroughPrice:xr})),e&&(vr=ve($,F,_e.alternativePriceAriaLabel,{alternativePrice:vr}));let Fe=B.container;if(t&&(Fe+=" "+B.containerOptical),r&&(Fe+=" "+B.containerStrikethrough),e&&(Fe+=" "+B.containerAlternative),i&&(Fe+=" "+B.containerAnnual),w(s))return zc(Fe,{...Fi,accessibleLabel:xr,altAccessibleLabel:vr,recurrenceLabel:br,perUnitLabel:Dt,taxInclusivityLabel:Ht},X);let{currencySymbol:zi,decimals:go,decimalsDelimiter:xo,hasCurrencySpace:$i,integer:vo,isCurrencyFirst:bo}=Fi,ze=[vo,xo,go];bo?(ze.unshift($i?"\xA0":""),ze.unshift(zi)):(ze.push($i?"\xA0":""),ze.push(zi)),ze.push(br,Dt,Ht);let yo=ze.join("");return z(Fe,yo,X)},Dn=()=>(e,t,r)=>{let i=He(t.promotion,t.promotion?.displaySummary?.instant,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),n=(e.displayOldPrice===void 0||w(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price&&(!t.promotion||i);return`${n?Y({displayStrikethrough:!0})({isPromoApplied:i,...e},t,r)+" ":""}${Y({isAlternativePrice:n})({isPromoApplied:i,...e},t,r)}`},Hn=()=>(e,t,r)=>{let{instant:i}=e;try{i||(i=new URLSearchParams(document.location.search).get("instant")),i&&(i=new Date(i))}catch{i=void 0}let a=He(t.promotion,i,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),n={...e,displayTax:!1,displayPerUnit:!1,isPromoApplied:a};if(!a)return Y()(e,{...t,price:t.priceWithoutDiscount},r)+z(B.containerAnnualPrefix," (")+Y({displayAnnual:!0,instant:i})(n,{...t,price:t.priceWithoutDiscount},r)+z(B.containerAnnualSuffix,")");let o=(e.displayOldPrice===void 0||w(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${o?Y({displayStrikethrough:!0})(n,t,r)+" ":""}${Y({isAlternativePrice:o})({isPromoApplied:a,...e},t,r)}${z(B.containerAnnualPrefix," (")}${Y({displayAnnual:!0,instant:i})(n,t,r)}${z(B.containerAnnualSuffix,")")}`},Bn=()=>(e,t,r)=>{let i={...e,displayTax:!1,displayPerUnit:!1};return`${Y({isAlternativePrice:e.displayOldPrice})(e,t,r)}${z(B.containerAnnualPrefix," (")}${Y({displayAnnual:!0})(i,t,r)}${z(B.containerAnnualSuffix,")")}`};var kt={...B,containerLegal:"price-legal",planType:"price-plan-type"},fr={..._e,planTypeLabel:"planTypeLabel"};function $c(e,{perUnitLabel:t,taxInclusivityLabel:r,planTypeLabel:i},a={}){let n="";return n+=z(kt.unitType,t,null,!0),r&&i&&(r+=". "),n+=z(kt.taxInclusivity,r,!0),n+=z(kt.planType,i,null),z(e,n,{...a})}var Un=({country:e,displayPerUnit:t=!1,displayTax:r=!1,displayPlanType:i=!1,language:a,literals:n={}}={},{taxDisplay:s,taxTerm:o,planType:c}={},l={})=>{let d={...Oi,...n},h=`${a.toLowerCase()}-${e.toUpperCase()}`,u="";w(t)&&(u=ve(d,h,fr.perUnitLabel,{perUnit:"LICENSE"}));let p="";e==="US"&&a==="en"&&(r=!1),w(r)&&o&&(p=ve(d,h,s===Ii?fr.taxExclusiveLabel:fr.taxInclusiveLabel,{taxTerm:o}));let m="";w(i)&&c&&(m=ve(d,h,fr.planTypeLabel,{planType:c}));let f=kt.container;return f+=" "+kt.containerLegal,$c(f,{perUnitLabel:u,taxInclusivityLabel:p,planTypeLabel:m},l)};var Fn=Y(),zn=Dn(),$n=Y({displayOptical:!0}),Gn=Y({displayStrikethrough:!0}),Vn=Y({displayAnnual:!0}),qn=Y({displayOptical:!0,isAlternativePrice:!0}),jn=Y({isAlternativePrice:!0}),Wn=Bn(),Yn=Hn(),Xn=Un;var Gc=(e,t)=>{if(!(!bt(e)||!bt(t)))return Math.floor((t-e)/t*100)},Kn=()=>(e,t)=>{let{price:r,priceWithoutDiscount:i}=t,a=Gc(r,i);return a===void 0?'':`${a}%`};var Zn=Kn();var Jn="INDIVIDUAL_COM",Di="TEAM_COM",eo="INDIVIDUAL_EDU",Hi="TEAM_EDU",Qn=["GB_en","AU_en","FR_fr","AT_de","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","GR_el","GR_en","HU_hu","IE_en","IT_it","LU_de","LU_en","LU_fr","NL_nl","NO_nb","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","TR_tr","UA_uk","ID_en","ID_in","IN_en","IN_hi","JP_ja","MY_en","MY_ms","NZ_en","TH_en","TH_th"],Vc={[Jn]:["MU_en","LT_lt","LV_lv","NG_en","SA_ar","SA_en","SG_en","KR_ko"],[Di]:["MU_en","LT_lt","LV_lv","NG_en","CO_es","KR_ko"],[eo]:["LT_lt","LV_lv","SA_en","SG_en"],[Hi]:["SG_en","KR_ko"]},qc={MU_en:[!1,!1,!1,!1],NG_en:[!1,!1,!1,!1],AU_en:[!1,!1,!1,!1],JP_ja:[!1,!1,!1,!1],NZ_en:[!1,!1,!1,!1],TH_en:[!1,!1,!1,!1],TH_th:[!1,!1,!1,!1],CO_es:[!1,!0,!1,!1],AT_de:[!1,!1,!1,!0],SG_en:[!1,!1,!1,!0]},jc=[Jn,Di,eo,Hi],Wc=e=>[Di,Hi].includes(e),Yc=(e,t,r,i)=>{let a=`${e}_${t}`,n=`${r}_${i}`,s=qc[a];if(s){let o=jc.indexOf(n);return s[o]}return Wc(n)},Xc=(e,t,r,i)=>{let a=`${e}_${t}`;if(Qn.includes(e)||Qn.includes(a))return!0;let n=Vc[`${r}_${i}`];return n?n.includes(e)||n.includes(a)?!0:C.displayTax:C.displayTax},Kc=async(e,t,r,i)=>{let a=Xc(e,t,r,i);return{displayTax:a,forceTaxExclusive:a?Yc(e,t,r,i):C.forceTaxExclusive}},Mt=class Mt extends HTMLSpanElement{constructor(){super();g(this,"masElement",new Te(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-display-plan-type","data-display-annual","data-perpetual","data-promotion-code","data-force-tax-exclusive","data-template","data-wcs-osi","data-quantity"]}static createInlinePrice(r){let i=ee();if(!i)return null;let{displayOldPrice:a,displayPerUnit:n,displayRecurrence:s,displayTax:o,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:h,promotionCode:u,quantity:p,alternativePrice:m,template:f,wcsOsi:v}=i.collectPriceOptions(r);return ar(Mt,{displayOldPrice:a,displayPerUnit:n,displayRecurrence:s,displayTax:o,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:h,promotionCode:u,quantity:p,alternativePrice:m,template:f,wcsOsi:v})}get isInlinePrice(){return!0}attributeChangedCallback(r,i,a){this.masElement.attributeChangedCallback(r,i,a)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get isFailed(){return this.masElement.state===le}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}async render(r={}){if(!this.isConnected)return!1;let i=ee();if(!i)return!1;let a=i.collectPriceOptions(r,this),n={...i.settings,...a};if(!n.wcsOsi.length)return!1;try{let s=this.masElement.togglePending({});this.innerHTML="";let[o]=await i.resolveOfferSelectors(n),c=Et(await o,n),[l]=c;if(i.featureFlags[fe]||n[fe]){if(a.displayPerUnit===void 0&&(n.displayPerUnit=l.customerSegment!=="INDIVIDUAL"),a.displayTax===void 0||a.forceTaxExclusive===void 0){let{country:d,language:h}=n,[u=""]=l.marketSegments,p=await Kc(d,h,l.customerSegment,u);a.displayTax===void 0&&(n.displayTax=p?.displayTax||n.displayTax),a.forceTaxExclusive===void 0&&(n.forceTaxExclusive=p?.forceTaxExclusive||n.forceTaxExclusive),n.forceTaxExclusive&&(c=Et(c,n))}}else a.displayOldPrice===void 0&&(n.displayOldPrice=!0);return this.renderOffers(c,n,s)}catch(s){throw this.innerHTML="",s}}renderOffers(r,i,a=void 0){if(!this.isConnected)return;let n=ee();if(!n)return!1;if(a??(a=this.masElement.togglePending()),r.length){if(this.masElement.toggleResolved(a,r,i)){this.innerHTML=n.buildPriceHTML(r,this.options);let s=this.closest("p, h3, div");if(!s||!s.querySelector('span[data-template="strikethrough"]')||s.querySelector(".alt-aria-label"))return!0;let o=s?.querySelectorAll('span[is="inline-price"]');return o.length>1&&o.length===s.querySelectorAll('span[data-template="strikethrough"]').length*2&&o.forEach(c=>{c.dataset.template!=="strikethrough"&&c.options&&!c.options.alternativePrice&&!c.isFailed&&(c.options.alternativePrice=!0,c.innerHTML=n.buildPriceHTML(r,c.options))}),!0}}else{let s=new Error(`Not provided: ${this.options?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(a,s,this.options))return this.innerHTML="",!0}return!1}};g(Mt,"is","inline-price"),g(Mt,"tag","span");var be=Mt;window.customElements.get(be.is)||window.customElements.define(be.is,be,{extends:be.tag});function to({literals:e,providers:t,settings:r}){function i(s,o=null){let c={country:r.country,language:r.language,locale:r.locale,literals:{...e.price}};if(o&&t?.price)for(let L of t.price)L(o,c);let{displayOldPrice:l,displayPerUnit:d,displayRecurrence:h,displayTax:u,displayPlanType:p,forceTaxExclusive:m,perpetual:f,displayAnnual:v,promotionCode:b,quantity:E,alternativePrice:x,wcsOsi:_,...k}=Object.assign(c,o?.dataset??{},s??{});return c=Kt(Object.assign({...c,...k,displayOldPrice:w(l),displayPerUnit:w(d),displayRecurrence:w(h),displayTax:w(u),displayPlanType:w(p),forceTaxExclusive:w(m),perpetual:w(f),displayAnnual:w(v),promotionCode:Qt(b).effectivePromoCode,quantity:Je(E,C.quantity),alternativePrice:w(x),wcsOsi:tr(_)})),c}function a(s,o){if(!Array.isArray(s)||!s.length||!o)return"";let{template:c}=o,l;switch(c){case"discount":l=Zn;break;case"strikethrough":l=Gn;break;case"annual":l=Vn;break;case"legal":l=Xn;break;default:o.template==="optical"&&o.alternativePrice?l=qn:o.template==="optical"?l=$n:o.displayAnnual&&s[0].planType==="ABM"?l=o.promotionCode?Yn:Wn:o.alternativePrice?l=jn:l=o.promotionCode?zn:Fn}let[d]=s;return d={...d,...d.priceDetails},l({...r,...o},d)}let n=be.createInlinePrice;return{InlinePrice:be,buildPriceHTML:a,collectPriceOptions:i,createInlinePrice:n}}function Zc({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||C.language),t??(t=e?.split("_")?.[1]||C.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function ro(e={},t){let r=t.featureFlags[fe],{commerce:i={}}=e,a=me.PRODUCTION,n=Fr,s=H("checkoutClientId",i)??C.checkoutClientId,o=yt(H("checkoutWorkflowStep",i),Z,C.checkoutWorkflowStep),c=C.displayOldPrice,l=C.displayPerUnit,d=w(H("displayRecurrence",i),C.displayRecurrence),h=w(H("displayTax",i),C.displayTax),u=w(H("displayPlanType",i),C.displayPlanType),p=w(H("entitlement",i),C.entitlement),m=w(H("modal",i),C.modal),f=w(H("forceTaxExclusive",i),C.forceTaxExclusive),v=H("promotionCode",i)??C.promotionCode,b=Je(H("quantity",i)),E=H("wcsApiKey",i)??C.wcsApiKey,x=i?.env==="stage",_=Ae.PUBLISHED;["true",""].includes(i.allowOverride)&&(x=(H(Br,i,{metadata:!1})?.toLowerCase()??i?.env)==="stage",_=yt(H(Ur,i),Ae,_)),x&&(a=me.STAGE,n=zr);let L=H(Hr)??e.preview,D=typeof L<"u"&&L!=="off"&&L!=="false",U={};D&&(U={preview:D});let X=H("mas-io-url")??e.masIOUrl??`https://www${a===me.STAGE?".stage":""}.adobe.com/mas/io`,$=H("preselect-plan")??void 0;return{...Zc(e),...U,displayOldPrice:c,checkoutClientId:s,checkoutWorkflowStep:o,displayPerUnit:l,displayRecurrence:d,displayTax:h,displayPlanType:u,entitlement:p,extraOptions:C.extraOptions,modal:m,env:a,forceTaxExclusive:f,promotionCode:v,quantity:b,alternativePrice:C.alternativePrice,wcsApiKey:E,wcsURL:n,landscape:_,masIOUrl:X,...$&&{preselectPlan:$}}}async function io(e,t={},r=2,i=100){let a;for(let n=0;n<=r;n++)try{let s=await fetch(e,t);return s.retryCount=n,s}catch(s){if(a=s,a.retryCount=n,n>r)break;await new Promise(o=>setTimeout(o,i*(n+1)))}throw a}var Bi="wcs";function ao({settings:e}){let t=se.module(Bi),{env:r,wcsApiKey:i}=e,a=new Map,n=new Map,s,o=new Map;async function c(m,f,v=!0){let b=ee(),E=Nr;t.debug("Fetching:",m);let x="",_;if(m.offerSelectorIds.length>1)throw new Error("Multiple OSIs are not supported anymore");let k=new Map(f),[L]=m.offerSelectorIds,D=Date.now()+Math.random().toString(36).substring(2,7),U=`${Bi}:${L}:${D}${Gr}`,X=`${Bi}:${L}:${D}${Vr}`,$;try{if(performance.mark(U),x=new URL(e.wcsURL),x.searchParams.set("offer_selector_ids",L),x.searchParams.set("country",m.country),x.searchParams.set("locale",m.locale),x.searchParams.set("landscape",r===me.STAGE?"ALL":e.landscape),x.searchParams.set("api_key",i),m.language&&x.searchParams.set("language",m.language),m.promotionCode&&x.searchParams.set("promotion_code",m.promotionCode),m.currency&&x.searchParams.set("currency",m.currency),_=await io(x.toString(),{credentials:"omit"}),_.ok){let F=[];try{let R=await _.json();t.debug("Fetched:",m,R),F=R.resolvedOffers??[]}catch(R){t.error(`Error parsing JSON: ${R.message}`,{...R.context,...b?.duration})}F=F.map(Jt),f.forEach(({resolve:R},ae)=>{let he=F.filter(({offerSelectorIds:Ee})=>Ee.includes(ae)).flat();he.length&&(k.delete(ae),f.delete(ae),R(he))})}else E=Rr}catch(F){E=`Network error: ${F.message}`}finally{$=performance.measure(X,U),performance.clearMarks(U),performance.clearMeasures(X)}if(v&&f.size){t.debug("Missing:",{offerSelectorIds:[...f.keys()]});let F=Pa(_);f.forEach(R=>{R.reject(new et(E,{...m,...F,response:_,measure:Ft($),...b?.duration}))})}}function l(){clearTimeout(s);let m=[...n.values()];n.clear(),m.forEach(({options:f,promises:v})=>c(f,v))}function d(m){if(!m||typeof m!="object")throw new TypeError("Cache must be a Map or similar object");let f=r===me.STAGE?"stage":"prod",v=m[f];if(!v||typeof v!="object"){t.warn(`No cache found for environment: ${r}`);return}for(let[b,E]of Object.entries(v))a.set(b,Promise.resolve(E.map(Jt)));t.debug(`Prefilled WCS cache with ${v.size} entries`)}function h(){let m=a.size;o=new Map(a),a.clear(),t.debug(`Moved ${m} cache entries to stale cache`)}function u(m,f,v){let b=m!=="GB"&&!v?"MULT":"en",E=qr.includes(m)?m:C.country;return{validCountry:E,validLanguage:b,locale:`${f}_${E}`}}function p({country:m,language:f,perpetual:v=!1,promotionCode:b="",wcsOsi:E=[]}){let{validCountry:x,validLanguage:_,locale:k}=u(m,f,v),L=[x,_,b].filter(D=>D).join("-").toLowerCase();return E.map(D=>{let U=`${D}-${L}`;if(a.has(U))return a.get(U);let X=new Promise(($,F)=>{let R=n.get(L);R||(R={options:{country:x,locale:k,..._==="MULT"&&{language:_},offerSelectorIds:[]},promises:new Map},n.set(L,R)),b&&(R.options.promotionCode=b),R.options.offerSelectorIds.push(D),R.promises.set(D,{resolve:$,reject:F}),l()}).catch($=>{if(o.has(U))return o.get(U);throw $});return a.set(U,X),X})}return{Commitment:Pe,PlanType:Ta,Term:ne,applyPlanType:Jt,resolveOfferSelectors:p,flushWcsCacheInternal:h,prefillWcsCache:d,normalizeCountryLanguageAndLocale:u}}var no="mas-commerce-service",oo="mas-commerce-service:start",so="mas-commerce-service:ready",Rt,rt,it,co,lo,Ui=class extends HTMLElement{constructor(){super(...arguments);V(this,it);V(this,Rt);V(this,rt);g(this,"lastLoggingTime",0)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(i,a,n)=>{let s=await r?.(i,a,this.imsSignedInPromise,n);return s||null})}get featureFlags(){return A(this,rt)||q(this,rt,{[fe]:Bt(this,it,lo).call(this,fe)}),A(this,rt)}activate(){let r=A(this,it,co),i=ro(r,this);rr(r.lana);let a=se.init(r.hostEnv).module("service");a.debug("Activating:",r);let s={price:cn(i)},o={checkout:new Set,price:new Set},c={literals:s,providers:o,settings:i};Object.defineProperties(this,Object.getOwnPropertyDescriptors({...nn(c),...on(c),...to(c),...ao(c),...jr,Log:se,get defaults(){return C},get log(){return se},get providers(){return{checkout(d){return o.checkout.add(d),()=>o.checkout.delete(d)},price(d){return o.price.add(d),()=>o.price.delete(d)},has:d=>o.price.has(d)||o.checkout.has(d)}},get settings(){return i}})),a.debug("Activated:",{literals:s,settings:i});let l=new CustomEvent(Ut,{bubbles:!0,cancelable:!1,detail:this});performance.mark(so),q(this,Rt,performance.measure(so,oo)),this.dispatchEvent(l),setTimeout(()=>{this.logFailedRequests()},1e4)}connectedCallback(){performance.mark(oo),this.activate()}flushWcsCache(){this.flushWcsCacheInternal(),this.log.debug("Flushed WCS cache")}refreshOffers(){this.flushWcsCacheInternal(),document.querySelectorAll(Er).forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers"),this.logFailedRequests()}refreshFragments(){this.flushWcsCacheInternal(),customElements.get("aem-fragment")?.cache.clear(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh(!1)),this.log.debug("Refreshed AEM fragments"),this.logFailedRequests()}get duration(){return{"mas-commerce-service:measure":Ft(A(this,Rt))}}logFailedRequests(){let r=[...performance.getEntriesByType("resource")].filter(({startTime:a})=>a>this.lastLoggingTime).filter(({transferSize:a,duration:n,responseStatus:s})=>a===0&&n===0&&s<200||s>=400),i=Array.from(new Map(r.map(a=>[a.name,a])).values());if(i.some(({name:a})=>/(\/fragment\?|web_commerce_artifact)/.test(a))){let a=i.map(({name:n})=>n);this.log.error("Failed requests:",{failedUrls:a,...this.duration})}this.lastLoggingTime=performance.now().toFixed(3)}};Rt=new WeakMap,rt=new WeakMap,it=new WeakSet,co=function(){let r=this.getAttribute("env")??"prod",i={commerce:{env:r},hostEnv:{name:r},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate")??1,10),isProdDomain:r==="prod"},masIOUrl:this.getAttribute("mas-io-url")};return["locale","country","language","preview"].forEach(a=>{let n=this.getAttribute(a);n&&(i[a]=n)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(a=>{let n=this.getAttribute(a);if(n!=null){let s=a.replace(/-([a-z])/g,o=>o[1].toUpperCase());i.commerce[s]=n}}),i},lo=function(r){return["on","true",!0].includes(this.getAttribute(`data-${r}`)||H(r))};window.customElements.get(no)||window.customElements.define(no,Ui);var uo="merch-card-collection",Qc=2e4,Jc={catalog:["four-merch-cards"],plans:["four-merch-cards"],plansThreeColumns:["three-merch-cards"]},el={plans:!0},tl=(e,{filter:t})=>e.filter(r=>r?.filters&&r?.filters.hasOwnProperty(t)),rl=(e,{types:t})=>t?(t=t.split(","),e.filter(r=>t.some(i=>r.types.includes(i)))):e,il=e=>e.sort((t,r)=>(t.title??"").localeCompare(r.title??"","en",{sensitivity:"base"})),al=(e,{filter:t})=>e.sort((r,i)=>i.filters[t]?.order==null||isNaN(i.filters[t]?.order)?-1:r.filters[t]?.order==null||isNaN(r.filters[t]?.order)?1:r.filters[t].order-i.filters[t].order),nl=(e,{search:t})=>t?.length?(t=t.toLowerCase(),e.filter(r=>(r.title??"").toLowerCase().includes(t))):e,Ce,nt,Ot,It,gr,fo,at=class extends ho{constructor(){super();V(this,gr);V(this,Ce,{});V(this,nt);V(this,Ot);V(this,It);this.id=null,this.filter="all",this.hasMore=!1,this.resultCount=void 0,this.displayResult=!1,this.data=null,this.variant=null,this.hydrating=!1,this.hydrationReady=null,this.literalsHandlerAttached=!1,this.onUnmount=[]}render(){return ye` +`,Ue.MISSING_INTL_API,s);var _=r.getPluralRules(t,{type:d.pluralType}).select(u-(d.offset||0));x=d.options[_]||d.options.other}if(!x)throw new Ri(d.value,u,Object.keys(d.options),s);o.push.apply(o,Lt(x.value,t,r,i,a,u-(d.offset||0)));continue}}return Mc(o)}function Nc(e,t){return t?S(S(S({},e||{}),t||{}),Object.keys(e).reduce(function(r,i){return r[i]=S(S({},e[i]),t[i]||{}),r},{})):e}function Oc(e,t){return t?Object.keys(e).reduce(function(r,i){return r[i]=Nc(e[i],t[i]),r},S({},e)):e}function Ni(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Ic(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ct(function(){for(var t,r=[],i=0;i0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Ln,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 In=On;var Oi={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",strikethroughAriaLabel:"Regularly at",planTypeLabel:"{planType, select, ABM {Annual, billed monthly} other {}}"},Dc=Aa("ConsonantTemplates/price"),Hc=/<\/?[^>]+(>|$)/g,B={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAlternative:"price-alternative",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"},_e={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel",alternativePriceAriaLabel:"alternativePriceAriaLabel"},Ii="TAX_EXCLUSIVE",Bc=e=>ya(e)?Object.entries(e).filter(([,t])=>Qe(t)||Xt(t)||t===!0).reduce((t,[r,i])=>t+` ${r}${i===!0?"":'="'+ba(i)+'"'}`,""):"",z=(e,t,r,i=!1)=>`${i?qa(t):t??""}`;function Uc(e){e=e.replaceAll("","</a>");let t=/]+(>|$)/g;return e.match(t)?.forEach(i=>{let a=i.replace("",">");e=e.replaceAll(i,a)}),e}function Fc(e){e=e.replaceAll("</a>","");let t=/<a (?!>)(.*?)(>|$)/g;return e.match(t)?.forEach(i=>{let a=i.replace("<a ","");e=e.replaceAll(i,a)}),e}function ve(e,t,r,i){let a=e[r];if(a==null)return"";let n=a.includes("<"),s=a.includes("${t}`:r&&(f=`${r}`),c&&(f+=p+m),f+=z(B.integer,o),f+=z(B.decimalsDelimiter,n),f+=z(B.decimals,a),c||(f+=m+p),f+=z(B.recurrence,l,null,!0),f+=z(B.unitType,d,null,!0),f+=z(B.taxInclusivity,h,!0),z(e,f,{...u})}var Y=({isAlternativePrice:e=!1,displayOptical:t=!1,displayStrikethrough:r=!1,displayAnnual:i=!1,instant:a=void 0}={})=>({country:n,displayFormatted:s=!0,displayRecurrence:o=!0,displayPerUnit:c=!1,displayTax:l=!1,language:d,literals:h={},quantity:u=1,space:p=!1,isPromoApplied:m=!1}={},{commitment:f,offerSelectorIds:v,formatString:b,price:E,priceWithoutDiscount:x,taxDisplay:_,taxTerm:k,term:L,usePrecision:D,promotion:U}={},X={})=>{Object.entries({country:n,formatString:b,language:d,price:E}).forEach(([Eo,wo])=>{if(wo==null)throw new Error(`Argument "${Eo}" is missing for osi ${v?.toString()}, country ${n}, language ${d}`)});let $={...Oi,...h},F=`${d.toLowerCase()}-${n.toUpperCase()}`,R;U&&!m&&x?R=e?E:x:r&&x?R=x:R=E;let ae=t?Wa:Ya;i&&(ae=Xa);let{accessiblePrice:he,recurrenceTerm:Ee,...Fi}=ae({commitment:f,formatString:b,instant:a,isIndianPrice:n==="IN",originalPrice:E,priceWithoutDiscount:x,price:t?E:R,promotion:U,quantity:u,term:L,usePrecision:D}),xr="",vr="",br="";w(o)&&Ee&&(br=ve($,F,_e.recurrenceLabel,{recurrenceTerm:Ee}));let Dt="";w(c)&&(p&&(Dt+=" "),Dt+=ve($,F,_e.perUnitLabel,{perUnit:"LICENSE"}));let Ht="";w(l)&&k&&(p&&(Ht+=" "),Ht+=ve($,F,_===Ii?_e.taxExclusiveLabel:_e.taxInclusiveLabel,{taxTerm:k})),r&&(xr=ve($,F,_e.strikethroughAriaLabel,{strikethroughPrice:xr})),e&&(vr=ve($,F,_e.alternativePriceAriaLabel,{alternativePrice:vr}));let Fe=B.container;if(t&&(Fe+=" "+B.containerOptical),r&&(Fe+=" "+B.containerStrikethrough),e&&(Fe+=" "+B.containerAlternative),i&&(Fe+=" "+B.containerAnnual),w(s))return zc(Fe,{...Fi,accessibleLabel:xr,altAccessibleLabel:vr,recurrenceLabel:br,perUnitLabel:Dt,taxInclusivityLabel:Ht},X);let{currencySymbol:zi,decimals:go,decimalsDelimiter:xo,hasCurrencySpace:$i,integer:vo,isCurrencyFirst:bo}=Fi,ze=[vo,xo,go];bo?(ze.unshift($i?"\xA0":""),ze.unshift(zi)):(ze.push($i?"\xA0":""),ze.push(zi)),ze.push(br,Dt,Ht);let yo=ze.join("");return z(Fe,yo,X)},Dn=()=>(e,t,r)=>{let i=He(t.promotion,t.promotion?.displaySummary?.instant,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),n=(e.displayOldPrice===void 0||w(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price&&(!t.promotion||i);return`${n?Y({displayStrikethrough:!0})({isPromoApplied:i,...e},t,r)+" ":""}${Y({isAlternativePrice:n})({isPromoApplied:i,...e},t,r)}`},Hn=()=>(e,t,r)=>{let{instant:i}=e;try{i||(i=new URLSearchParams(document.location.search).get("instant")),i&&(i=new Date(i))}catch{i=void 0}let a=He(t.promotion,i,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),n={...e,displayTax:!1,displayPerUnit:!1,isPromoApplied:a};if(!a)return Y()(e,{...t,price:t.priceWithoutDiscount},r)+z(B.containerAnnualPrefix," (")+Y({displayAnnual:!0,instant:i})(n,{...t,price:t.priceWithoutDiscount},r)+z(B.containerAnnualSuffix,")");let o=(e.displayOldPrice===void 0||w(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${o?Y({displayStrikethrough:!0})(n,t,r)+" ":""}${Y({isAlternativePrice:o})({isPromoApplied:a,...e},t,r)}${z(B.containerAnnualPrefix," (")}${Y({displayAnnual:!0,instant:i})(n,t,r)}${z(B.containerAnnualSuffix,")")}`},Bn=()=>(e,t,r)=>{let i={...e,displayTax:!1,displayPerUnit:!1};return`${Y({isAlternativePrice:e.displayOldPrice})(e,t,r)}${z(B.containerAnnualPrefix," (")}${Y({displayAnnual:!0})(i,t,r)}${z(B.containerAnnualSuffix,")")}`};var kt={...B,containerLegal:"price-legal",planType:"price-plan-type"},fr={..._e,planTypeLabel:"planTypeLabel"};function $c(e,{perUnitLabel:t,taxInclusivityLabel:r,planTypeLabel:i},a={}){let n="";return n+=z(kt.unitType,t,null,!0),r&&i&&(r+=". "),n+=z(kt.taxInclusivity,r,!0),n+=z(kt.planType,i,null),z(e,n,{...a})}var Un=({country:e,displayPerUnit:t=!1,displayTax:r=!1,displayPlanType:i=!1,language:a,literals:n={}}={},{taxDisplay:s,taxTerm:o,planType:c}={},l={})=>{let d={...Oi,...n},h=`${a.toLowerCase()}-${e.toUpperCase()}`,u="";w(t)&&(u=ve(d,h,fr.perUnitLabel,{perUnit:"LICENSE"}));let p="";e==="US"&&a==="en"&&(r=!1),w(r)&&o&&(p=ve(d,h,s===Ii?fr.taxExclusiveLabel:fr.taxInclusiveLabel,{taxTerm:o}));let m="";w(i)&&c&&(m=ve(d,h,fr.planTypeLabel,{planType:c}));let f=kt.container;return f+=" "+kt.containerLegal,$c(f,{perUnitLabel:u,taxInclusivityLabel:p,planTypeLabel:m},l)};var Fn=Y(),zn=Dn(),$n=Y({displayOptical:!0}),Gn=Y({displayStrikethrough:!0}),Vn=Y({displayAnnual:!0}),qn=Y({displayOptical:!0,isAlternativePrice:!0}),jn=Y({isAlternativePrice:!0}),Wn=Bn(),Yn=Hn(),Xn=Un;var Gc=(e,t)=>{if(!(!bt(e)||!bt(t)))return Math.floor((t-e)/t*100)},Kn=()=>(e,t)=>{let{price:r,priceWithoutDiscount:i}=t,a=Gc(r,i);return a===void 0?'':`${a}%`};var Zn=Kn();var Jn="INDIVIDUAL_COM",Di="TEAM_COM",eo="INDIVIDUAL_EDU",Hi="TEAM_EDU",Qn=["GB_en","AU_en","FR_fr","AT_de","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","GR_el","GR_en","HU_hu","IE_en","IT_it","LU_de","LU_en","LU_fr","NL_nl","NO_nb","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","TR_tr","UA_uk","ID_en","ID_in","IN_en","IN_hi","JP_ja","MY_en","MY_ms","NZ_en","TH_en","TH_th","MU_en"],Vc={[Jn]:["LT_lt","LV_lv","NG_en","SA_ar","SA_en","SG_en","KR_ko"],[Di]:["LT_lt","LV_lv","NG_en","CO_es","KR_ko"],[eo]:["LT_lt","LV_lv","SA_en","SG_en"],[Hi]:["SG_en","KR_ko"]},qc={MU_en:[!0,!0,!0,!0],NG_en:[!1,!1,!1,!1],AU_en:[!1,!1,!1,!1],JP_ja:[!1,!1,!1,!1],NZ_en:[!1,!1,!1,!1],TH_en:[!1,!1,!1,!1],TH_th:[!1,!1,!1,!1],CO_es:[!1,!0,!1,!1],AT_de:[!1,!1,!1,!0],SG_en:[!1,!1,!1,!0]},jc=[Jn,Di,eo,Hi],Wc=e=>[Di,Hi].includes(e),Yc=(e,t,r,i)=>{let a=`${e}_${t}`,n=`${r}_${i}`,s=qc[a];if(s){let o=jc.indexOf(n);return s[o]}return Wc(n)},Xc=(e,t,r,i)=>{let a=`${e}_${t}`;if(Qn.includes(e)||Qn.includes(a))return!0;let n=Vc[`${r}_${i}`];return n?n.includes(e)||n.includes(a)?!0:C.displayTax:C.displayTax},Kc=async(e,t,r,i)=>{let a=Xc(e,t,r,i);return{displayTax:a,forceTaxExclusive:a?Yc(e,t,r,i):C.forceTaxExclusive}},Mt=class Mt extends HTMLSpanElement{constructor(){super();g(this,"masElement",new Te(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-display-plan-type","data-display-annual","data-perpetual","data-promotion-code","data-force-tax-exclusive","data-template","data-wcs-osi","data-quantity"]}static createInlinePrice(r){let i=ee();if(!i)return null;let{displayOldPrice:a,displayPerUnit:n,displayRecurrence:s,displayTax:o,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:h,promotionCode:u,quantity:p,alternativePrice:m,template:f,wcsOsi:v}=i.collectPriceOptions(r);return ar(Mt,{displayOldPrice:a,displayPerUnit:n,displayRecurrence:s,displayTax:o,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:h,promotionCode:u,quantity:p,alternativePrice:m,template:f,wcsOsi:v})}get isInlinePrice(){return!0}attributeChangedCallback(r,i,a){this.masElement.attributeChangedCallback(r,i,a)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get isFailed(){return this.masElement.state===le}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}async render(r={}){if(!this.isConnected)return!1;let i=ee();if(!i)return!1;let a=i.collectPriceOptions(r,this),n={...i.settings,...a};if(!n.wcsOsi.length)return!1;try{let s=this.masElement.togglePending({});this.innerHTML="";let[o]=await i.resolveOfferSelectors(n),c=Et(await o,n),[l]=c;if(i.featureFlags[fe]||n[fe]){if(a.displayPerUnit===void 0&&(n.displayPerUnit=l.customerSegment!=="INDIVIDUAL"),a.displayTax===void 0||a.forceTaxExclusive===void 0){let{country:d,language:h}=n,[u=""]=l.marketSegments,p=await Kc(d,h,l.customerSegment,u);a.displayTax===void 0&&(n.displayTax=p?.displayTax||n.displayTax),a.forceTaxExclusive===void 0&&(n.forceTaxExclusive=p?.forceTaxExclusive||n.forceTaxExclusive),n.forceTaxExclusive&&(c=Et(c,n))}}else a.displayOldPrice===void 0&&(n.displayOldPrice=!0);return this.renderOffers(c,n,s)}catch(s){throw this.innerHTML="",s}}renderOffers(r,i,a=void 0){if(!this.isConnected)return;let n=ee();if(!n)return!1;if(a??(a=this.masElement.togglePending()),r.length){if(this.masElement.toggleResolved(a,r,i)){this.innerHTML=n.buildPriceHTML(r,this.options);let s=this.closest("p, h3, div");if(!s||!s.querySelector('span[data-template="strikethrough"]')||s.querySelector(".alt-aria-label"))return!0;let o=s?.querySelectorAll('span[is="inline-price"]');return o.length>1&&o.length===s.querySelectorAll('span[data-template="strikethrough"]').length*2&&o.forEach(c=>{c.dataset.template!=="strikethrough"&&c.options&&!c.options.alternativePrice&&!c.isFailed&&(c.options.alternativePrice=!0,c.innerHTML=n.buildPriceHTML(r,c.options))}),!0}}else{let s=new Error(`Not provided: ${this.options?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(a,s,this.options))return this.innerHTML="",!0}return!1}};g(Mt,"is","inline-price"),g(Mt,"tag","span");var be=Mt;window.customElements.get(be.is)||window.customElements.define(be.is,be,{extends:be.tag});function to({literals:e,providers:t,settings:r}){function i(s,o=null){let c={country:r.country,language:r.language,locale:r.locale,literals:{...e.price}};if(o&&t?.price)for(let L of t.price)L(o,c);let{displayOldPrice:l,displayPerUnit:d,displayRecurrence:h,displayTax:u,displayPlanType:p,forceTaxExclusive:m,perpetual:f,displayAnnual:v,promotionCode:b,quantity:E,alternativePrice:x,wcsOsi:_,...k}=Object.assign(c,o?.dataset??{},s??{});return c=Kt(Object.assign({...c,...k,displayOldPrice:w(l),displayPerUnit:w(d),displayRecurrence:w(h),displayTax:w(u),displayPlanType:w(p),forceTaxExclusive:w(m),perpetual:w(f),displayAnnual:w(v),promotionCode:Qt(b).effectivePromoCode,quantity:Je(E,C.quantity),alternativePrice:w(x),wcsOsi:tr(_)})),c}function a(s,o){if(!Array.isArray(s)||!s.length||!o)return"";let{template:c}=o,l;switch(c){case"discount":l=Zn;break;case"strikethrough":l=Gn;break;case"annual":l=Vn;break;case"legal":l=Xn;break;default:o.template==="optical"&&o.alternativePrice?l=qn:o.template==="optical"?l=$n:o.displayAnnual&&s[0].planType==="ABM"?l=o.promotionCode?Yn:Wn:o.alternativePrice?l=jn:l=o.promotionCode?zn:Fn}let[d]=s;return d={...d,...d.priceDetails},l({...r,...o},d)}let n=be.createInlinePrice;return{InlinePrice:be,buildPriceHTML:a,collectPriceOptions:i,createInlinePrice:n}}function Zc({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||C.language),t??(t=e?.split("_")?.[1]||C.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function ro(e={},t){let r=t.featureFlags[fe],{commerce:i={}}=e,a=me.PRODUCTION,n=Fr,s=H("checkoutClientId",i)??C.checkoutClientId,o=yt(H("checkoutWorkflowStep",i),Z,C.checkoutWorkflowStep),c=C.displayOldPrice,l=C.displayPerUnit,d=w(H("displayRecurrence",i),C.displayRecurrence),h=w(H("displayTax",i),C.displayTax),u=w(H("displayPlanType",i),C.displayPlanType),p=w(H("entitlement",i),C.entitlement),m=w(H("modal",i),C.modal),f=w(H("forceTaxExclusive",i),C.forceTaxExclusive),v=H("promotionCode",i)??C.promotionCode,b=Je(H("quantity",i)),E=H("wcsApiKey",i)??C.wcsApiKey,x=i?.env==="stage",_=Ae.PUBLISHED;["true",""].includes(i.allowOverride)&&(x=(H(Br,i,{metadata:!1})?.toLowerCase()??i?.env)==="stage",_=yt(H(Ur,i),Ae,_)),x&&(a=me.STAGE,n=zr);let L=H(Hr)??e.preview,D=typeof L<"u"&&L!=="off"&&L!=="false",U={};D&&(U={preview:D});let X=H("mas-io-url")??e.masIOUrl??`https://www${a===me.STAGE?".stage":""}.adobe.com/mas/io`,$=H("preselect-plan")??void 0;return{...Zc(e),...U,displayOldPrice:c,checkoutClientId:s,checkoutWorkflowStep:o,displayPerUnit:l,displayRecurrence:d,displayTax:h,displayPlanType:u,entitlement:p,extraOptions:C.extraOptions,modal:m,env:a,forceTaxExclusive:f,promotionCode:v,quantity:b,alternativePrice:C.alternativePrice,wcsApiKey:E,wcsURL:n,landscape:_,masIOUrl:X,...$&&{preselectPlan:$}}}async function io(e,t={},r=2,i=100){let a;for(let n=0;n<=r;n++)try{let s=await fetch(e,t);return s.retryCount=n,s}catch(s){if(a=s,a.retryCount=n,n>r)break;await new Promise(o=>setTimeout(o,i*(n+1)))}throw a}var Bi="wcs";function ao({settings:e}){let t=se.module(Bi),{env:r,wcsApiKey:i}=e,a=new Map,n=new Map,s,o=new Map;async function c(m,f,v=!0){let b=ee(),E=Nr;t.debug("Fetching:",m);let x="",_;if(m.offerSelectorIds.length>1)throw new Error("Multiple OSIs are not supported anymore");let k=new Map(f),[L]=m.offerSelectorIds,D=Date.now()+Math.random().toString(36).substring(2,7),U=`${Bi}:${L}:${D}${Gr}`,X=`${Bi}:${L}:${D}${Vr}`,$;try{if(performance.mark(U),x=new URL(e.wcsURL),x.searchParams.set("offer_selector_ids",L),x.searchParams.set("country",m.country),x.searchParams.set("locale",m.locale),x.searchParams.set("landscape",r===me.STAGE?"ALL":e.landscape),x.searchParams.set("api_key",i),m.language&&x.searchParams.set("language",m.language),m.promotionCode&&x.searchParams.set("promotion_code",m.promotionCode),m.currency&&x.searchParams.set("currency",m.currency),_=await io(x.toString(),{credentials:"omit"}),_.ok){let F=[];try{let R=await _.json();t.debug("Fetched:",m,R),F=R.resolvedOffers??[]}catch(R){t.error(`Error parsing JSON: ${R.message}`,{...R.context,...b?.duration})}F=F.map(Jt),f.forEach(({resolve:R},ae)=>{let he=F.filter(({offerSelectorIds:Ee})=>Ee.includes(ae)).flat();he.length&&(k.delete(ae),f.delete(ae),R(he))})}else E=Rr}catch(F){E=`Network error: ${F.message}`}finally{$=performance.measure(X,U),performance.clearMarks(U),performance.clearMeasures(X)}if(v&&f.size){t.debug("Missing:",{offerSelectorIds:[...f.keys()]});let F=Pa(_);f.forEach(R=>{R.reject(new et(E,{...m,...F,response:_,measure:Ft($),...b?.duration}))})}}function l(){clearTimeout(s);let m=[...n.values()];n.clear(),m.forEach(({options:f,promises:v})=>c(f,v))}function d(m){if(!m||typeof m!="object")throw new TypeError("Cache must be a Map or similar object");let f=r===me.STAGE?"stage":"prod",v=m[f];if(!v||typeof v!="object"){t.warn(`No cache found for environment: ${r}`);return}for(let[b,E]of Object.entries(v))a.set(b,Promise.resolve(E.map(Jt)));t.debug(`Prefilled WCS cache with ${v.size} entries`)}function h(){let m=a.size;o=new Map(a),a.clear(),t.debug(`Moved ${m} cache entries to stale cache`)}function u(m,f,v){let b=m!=="GB"&&!v?"MULT":"en",E=qr.includes(m)?m:C.country;return{validCountry:E,validLanguage:b,locale:`${f}_${E}`}}function p({country:m,language:f,perpetual:v=!1,promotionCode:b="",wcsOsi:E=[]}){let{validCountry:x,validLanguage:_,locale:k}=u(m,f,v),L=[x,_,b].filter(D=>D).join("-").toLowerCase();return E.map(D=>{let U=`${D}-${L}`;if(a.has(U))return a.get(U);let X=new Promise(($,F)=>{let R=n.get(L);R||(R={options:{country:x,locale:k,..._==="MULT"&&{language:_},offerSelectorIds:[]},promises:new Map},n.set(L,R)),b&&(R.options.promotionCode=b),R.options.offerSelectorIds.push(D),R.promises.set(D,{resolve:$,reject:F}),l()}).catch($=>{if(o.has(U))return o.get(U);throw $});return a.set(U,X),X})}return{Commitment:Pe,PlanType:Ta,Term:ne,applyPlanType:Jt,resolveOfferSelectors:p,flushWcsCacheInternal:h,prefillWcsCache:d,normalizeCountryLanguageAndLocale:u}}var no="mas-commerce-service",oo="mas-commerce-service:start",so="mas-commerce-service:ready",Rt,rt,it,co,lo,Ui=class extends HTMLElement{constructor(){super(...arguments);V(this,it);V(this,Rt);V(this,rt);g(this,"lastLoggingTime",0)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(i,a,n)=>{let s=await r?.(i,a,this.imsSignedInPromise,n);return s||null})}get featureFlags(){return A(this,rt)||q(this,rt,{[fe]:Bt(this,it,lo).call(this,fe)}),A(this,rt)}activate(){let r=A(this,it,co),i=ro(r,this);rr(r.lana);let a=se.init(r.hostEnv).module("service");a.debug("Activating:",r);let s={price:cn(i)},o={checkout:new Set,price:new Set},c={literals:s,providers:o,settings:i};Object.defineProperties(this,Object.getOwnPropertyDescriptors({...nn(c),...on(c),...to(c),...ao(c),...jr,Log:se,get defaults(){return C},get log(){return se},get providers(){return{checkout(d){return o.checkout.add(d),()=>o.checkout.delete(d)},price(d){return o.price.add(d),()=>o.price.delete(d)},has:d=>o.price.has(d)||o.checkout.has(d)}},get settings(){return i}})),a.debug("Activated:",{literals:s,settings:i});let l=new CustomEvent(Ut,{bubbles:!0,cancelable:!1,detail:this});performance.mark(so),q(this,Rt,performance.measure(so,oo)),this.dispatchEvent(l),setTimeout(()=>{this.logFailedRequests()},1e4)}connectedCallback(){performance.mark(oo),this.activate()}flushWcsCache(){this.flushWcsCacheInternal(),this.log.debug("Flushed WCS cache")}refreshOffers(){this.flushWcsCacheInternal(),document.querySelectorAll(Er).forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers"),this.logFailedRequests()}refreshFragments(){this.flushWcsCacheInternal(),customElements.get("aem-fragment")?.cache.clear(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh(!1)),this.log.debug("Refreshed AEM fragments"),this.logFailedRequests()}get duration(){return{"mas-commerce-service:measure":Ft(A(this,Rt))}}logFailedRequests(){let r=[...performance.getEntriesByType("resource")].filter(({startTime:a})=>a>this.lastLoggingTime).filter(({transferSize:a,duration:n,responseStatus:s})=>a===0&&n===0&&s<200||s>=400),i=Array.from(new Map(r.map(a=>[a.name,a])).values());if(i.some(({name:a})=>/(\/fragment\?|web_commerce_artifact)/.test(a))){let a=i.map(({name:n})=>n);this.log.error("Failed requests:",{failedUrls:a,...this.duration})}this.lastLoggingTime=performance.now().toFixed(3)}};Rt=new WeakMap,rt=new WeakMap,it=new WeakSet,co=function(){let r=this.getAttribute("env")??"prod",i={commerce:{env:r},hostEnv:{name:r},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate")??1,10),isProdDomain:r==="prod"},masIOUrl:this.getAttribute("mas-io-url")};return["locale","country","language","preview"].forEach(a=>{let n=this.getAttribute(a);n&&(i[a]=n)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(a=>{let n=this.getAttribute(a);if(n!=null){let s=a.replace(/-([a-z])/g,o=>o[1].toUpperCase());i.commerce[s]=n}}),i},lo=function(r){return["on","true",!0].includes(this.getAttribute(`data-${r}`)||H(r))};window.customElements.get(no)||window.customElements.define(no,Ui);var uo="merch-card-collection",Qc=2e4,Jc={catalog:["four-merch-cards"],plans:["four-merch-cards"],plansThreeColumns:["three-merch-cards"]},el={plans:!0},tl=(e,{filter:t})=>e.filter(r=>r?.filters&&r?.filters.hasOwnProperty(t)),rl=(e,{types:t})=>t?(t=t.split(","),e.filter(r=>t.some(i=>r.types.includes(i)))):e,il=e=>e.sort((t,r)=>(t.title??"").localeCompare(r.title??"","en",{sensitivity:"base"})),al=(e,{filter:t})=>e.sort((r,i)=>i.filters[t]?.order==null||isNaN(i.filters[t]?.order)?-1:r.filters[t]?.order==null||isNaN(r.filters[t]?.order)?1:r.filters[t].order-i.filters[t].order),nl=(e,{search:t})=>t?.length?(t=t.toLowerCase(),e.filter(r=>(r.title??"").toLowerCase().includes(t))):e,Ce,nt,Ot,It,gr,fo,at=class extends ho{constructor(){super();V(this,gr);V(this,Ce,{});V(this,nt);V(this,Ot);V(this,It);this.id=null,this.filter="all",this.hasMore=!1,this.resultCount=void 0,this.displayResult=!1,this.data=null,this.variant=null,this.hydrating=!1,this.hydrationReady=null,this.literalsHandlerAttached=!1,this.onUnmount=[]}render(){return ye` ${this.footer}`}checkReady(){if(!this.querySelector("aem-fragment"))return Promise.resolve(!0);let i=new Promise(a=>setTimeout(()=>a(!1),Qc));return Promise.race([this.hydrationReady,i])}updated(r){if(!this.querySelector("merch-card"))return;let i=window.scrollY||document.documentElement.scrollTop,a=[...this.children].filter(l=>l.tagName==="MERCH-CARD");if(a.length===0)return;r.has("singleApp")&&this.singleApp&&a.forEach(l=>{l.updateFilters(l.name===this.singleApp)});let n=this.sort===de.alphabetical?il:al,o=[tl,rl,nl,n].reduce((l,d)=>d(l,this),a).map((l,d)=>[l,d]);if(this.resultCount=o.length,this.page&&this.limit){let l=this.page*this.limit;this.hasMore=o.length>l,o=o.filter(([,d])=>d{c.has(l)?(l.size=l.filters[this.filter]?.size,l.style.removeProperty("display"),l.requestUpdate()):(l.style.display="none",l.size=void 0)}),window.scrollTo(0,i),this.updateComplete.then(()=>{this.dispatchLiteralsChanged(),this.sidenav&&!this.literalsHandlerAttached&&(this.sidenav.addEventListener(Tr,()=>{this.dispatchLiteralsChanged()}),this.literalsHandlerAttached=!0)})}dispatchLiteralsChanged(){this.dispatchEvent(new CustomEvent(ce,{detail:{resultCount:this.resultCount,searchTerm:this.search,filter:this.sidenav?.filters?.selectedText}}))}buildOverrideMap(){q(this,Ce,{}),this.overrides?.split(",").forEach(r=>{let[i,a]=r?.split(":");i&&a&&(A(this,Ce)[i]=a)})}connectedCallback(){super.connectedCallback(),q(this,nt,ut()),A(this,nt)&&q(this,Ot,A(this,nt).Log.module(uo)),q(this,It,customElements.get("merch-card")),this.buildOverrideMap(),this.init()}async init(){await this.hydrate(),this.sidenav=this.parentElement.querySelector("merch-sidenav"),this.filtered?(this.filter=this.filtered,this.page=1):this.startDeeplink(),this.initializePlaceholders()}disconnectedCallback(){super.disconnectedCallback(),this.stopDeeplink?.();for(let r of this.onUnmount)r()}initializeHeader(){let r=document.createElement("merch-card-collection-header");r.collection=this,r.classList.add(this.variant),this.parentElement.insertBefore(r,this),this.header=r,this.querySelectorAll("[placeholder]").forEach(a=>{let n=a.getAttribute("slot");this.header.placeholderKeys.includes(n)&&this.header.append(a)})}initializePlaceholders(){let r=this.data?.placeholders||{};!r.searchText&&this.data?.sidenavSettings?.searchText&&(r.searchText=this.data.sidenavSettings.searchText);for(let i of Object.keys(r)){let a=r[i],n=a.includes("

")?"div":"p",s=document.createElement(n);s.setAttribute("slot",i),s.setAttribute("placeholder",""),s.innerHTML=a,this.append(s)}}attachSidenav(r,i=!0){if(!r)return;i&&this.parentElement.prepend(r),this.sidenav=r,this.sidenav.variant=this.variant,this.sidenav.classList.add(this.variant),el[this.variant]&&this.sidenav.setAttribute("autoclose",""),this.initializeHeader(),this.dispatchEvent(new CustomEvent(dt));let a=A(this,It)?.getCollectionOptions(this.variant)?.onSidenavAttached;a&&a(this)}async hydrate(){if(this.hydrating)return!1;let r=this.querySelector("aem-fragment");if(!r)return;this.id=r.getAttribute("fragment"),this.hydrating=!0;let i;this.hydrationReady=new Promise(o=>{i=o});let a=this;function n(o){let c;return o.fields?.checkboxGroups?c=o.fields.checkboxGroups:o.fields?.tagFilters&&(c=[{title:o.fields?.tagFiltersTitle,label:"types",deeplink:"types",checkboxes:o.fields.tagFilters.map(l=>{let d=l.split("/").pop(),h=o.settings?.tagLabels?.[d]||d;return h=h.startsWith("coll-tag-filter")?d.charAt(0).toUpperCase()+d.slice(1):h,{name:d,label:h}})}]),{searchText:o.fields?.searchText,tagFilters:c,linksTitle:o.fields?.linksTitle,link:o.fields?.link,linkText:o.fields?.linkText,linkIcon:o.fields?.linkIcon}}function s(o,c){let l={cards:[],hierarchy:[],placeholders:o.placeholders,sidenavSettings:n(o)};function d(h,u){for(let p of u){if(p.fieldName==="variations")continue;if(p.fieldName==="cards"){if(l.cards.findIndex(x=>x.id===p.identifier)!==-1)continue;l.cards.push(o.references[p.identifier].value);continue}let m=o.references[p.identifier]?.value,f=p.referencesTree,v=c[p.identifier];if(v){let x=document.querySelector(`aem-fragment[fragment="${v}"]`)?.rawData;x?.fields&&(m=x,f=x.referencesTree,o.references={...o.references,...x.references})}if(!m?.fields)continue;let{fields:b}=m,E={label:b.label||"",icon:b.icon,iconLight:b.iconLight,queryLabel:b.queryLabel,cards:b.cards?b.cards.map(x=>c[x]||x):[],collections:[]};b.defaultchild&&(E.defaultchild=c[b.defaultchild]||b.defaultchild),h.push(E),d(E.collections,f)}}return d(l.hierarchy,o.referencesTree),l.hierarchy.length===0&&(a.filtered="all"),l}r.addEventListener(Cr,o=>{Bt(this,gr,fo).call(this,"Error loading AEM fragment",o.detail),this.hydrating=!1,r.remove()}),r.addEventListener(_r,async o=>{this.limit=27,this.data=s(o.detail,A(this,Ce));let{cards:c,hierarchy:l}=this.data,d=l.length===0&&o.detail.fields?.defaultchild?A(this,Ce)[o.detail.fields.defaultchild]||o.detail.fields.defaultchild:null;r.cache.add(...c);let h=(m,f)=>{for(let v of m)if(v.defaultchild===f||v.collections&&h(v.collections,f))return!0;return!1};for(let m of c){let x=function(k){for(let L of k){let D=L.cards.indexOf(v);if(D===-1)continue;let U=L.queryLabel??L?.label?.toLowerCase()??"";f.filters[U]={order:D+1,size:m.fields.size},x(L.collections)}},f=document.createElement("merch-card"),v=A(this,Ce)[m.id]||m.id;f.setAttribute("consonant",""),f.setAttribute("style","");let b=m.fields.tags?.filter(k=>k.startsWith("mas:types/")).map(k=>k.split("/")[1]).join(",");b&&f.setAttribute("types",b),$t(m.fields.variant)?.supportsDefaultChild&&(d?v===d:h(l,v))&&f.setAttribute("data-default-card","true"),x(l);let _=document.createElement("aem-fragment");_.setAttribute("fragment",v),f.append(_),Object.keys(f.filters).length===0&&(f.filters={all:{order:c.indexOf(m)+1,size:m.fields.size}}),this.append(f)}let u="",p=Ba(c[0]?.fields?.variant);this.variant=p,p==="plans"&&c.length===3&&!c.some(m=>m.fields?.size?.includes("wide"))&&(u="ThreeColumns"),p&&this.classList.add("merch-card-collection",p,...Jc[`${p}${u}`]||[]),this.displayResult=!0,this.hydrating=!1,r.remove(),i(!0)}),await this.hydrationReady}get footer(){if(!this.filtered)return ye`