Loading
function(e,t,n){n.d(t,{U_:()=>eT,yq:()=>eN,LR:()=>eU,$p:()=>eG,cD:()=>eM,O8:()=>eb,Ct:()=>ek,RO:()=>ej});var l=n(477900),i=n(582128),r=n(284009),a=n.n(r),s=n(17928),o=n(785007),u=n(331322),c=n(297264),d=n(834730),p=n(726656),m=n(463376),h=n(558620),C=n(642639),f=n(34188),S=n(661531),E=n(939249),y=n(398590),I=n(793574),A=n(688810),g=n(878678),P=n(361158),v=n(976860),x=n(815996),_=n(403689),T=n(652215),N=n(660183),b=n(909753);let j=function(e){let{onClose:t}=e,{analyticsLocations:n}=(0,A.Ay)(),{isHidden:i}=_.A.useConfig({location:"CollectiblesGiftPremiumPlanSelectUpsell"});function r(){t(),(0,v.pX)(T.BVt.COLLECTIBLES_SHOP),(0,x.Cz)({analyticsSource:I.A.PREMIUM_PAYMENT_MODAL,analyticsLocations:n}),(0,y.jH)(),(0,P.dF)(g.Zt)}return i?null:(0,l.jsxs)("div",{className:b.kL,children:[(0,l.jsx)("div",{className:b.Wk,children:(0,l.jsx)(f.U,{size:"custom",width:20,height:20,color:S.A.colors.ICON_DEFAULT})}),(0,l.jsx)(d.E,{variant:"text-sm/normal",children:N.intl.format(N.t.twSHte,{checkItOut:e=>(0,l.jsx)(E.D,{className:b.nf,onClick:r,children:e})})})]})};var R=n(951305),O=n(222707),M=n(594832),L=n(97352),k=n(45938),w=n(975571),D=n(158045),U=n(580630),G=n(881489),F=n(774962),B=n(332026),H=n(810498),W=n(557679),Y=n(452027),V=n(403581),K=n(202541),Z=n(341535),q=n(318824);let z=[1,2,5,10];function $(e){return z.some(t=>t===e)}function Q(e){return Number.isInteger(e)&&e>=C.y0&&e<=50}function J(e){let{amount:t,currency:n,selected:i,announce:r,id:a}=e;return(0,l.jsx)("div",{id:a,className:q.eg,"aria-live":r?"polite":void 0,children:(0,l.jsx)(d.E,{tag:"span",variant:"text-sm/semibold",color:i?"text-default":"text-subtle",children:(0,U.$g)(t,n)})})}function X(e){let{selectedPlanId:t,planOptions:n,unitPrice:r}=e,a=(0,s.yK)([L.A],()=>n.map(e=>L.A.get(e))),{quantity:o,setQuantity:c,setSelectedPlanId:p,checkoutPriceOptions:m}=(0,C.t4)(e=>({quantity:e.quantity,setQuantity:e.setQuantity,setSelectedPlanId:e.setSelectedPlanId,checkoutPriceOptions:e.checkoutPriceOptions})),h=!$(o)&&Q(o)?o:3,[f,E]=i.useState(()=>$(o)?"preset":"custom"),[y,I]=i.useState(()=>String(h)),[A,g]=i.useState(h),P=i.useId(),v=i.useId(),x=i.useId(),_=a.filter(e=>null!=e&&(0,W.b)(e.id)).map(e=>({plan:e,label:N.intl.formatToPlainString(e.interval===K.WT.YEAR?Z.default.Aq6Jxd:Z.default["0nFw35"],{durationCount:e.intervalCount}),savingsPercent:(0,D.L_)({planId:e.id,isGift:!0,priceOptions:m,subscriptionPlan:e})}));return(0,l.jsxs)(u.B,{gap:24,padding:{bottom:12},children:[(0,l.jsx)(Y.D,{label:N.intl.string(Z.default.UWycjR),role:"radiogroup",children:(0,l.jsx)("div",{className:q.bH,children:_.map(e=>{let{plan:n,label:i,savingsPercent:r}=e,a=n.id===t;return(0,l.jsxs)("label",{className:q.Ap,"data-selected":a,children:[(0,l.jsx)("input",{className:q.Ts,type:"radio",name:P,value:n.id,checked:a,onChange:()=>{n.id!==t&&p(n.id,{shouldUpdateQuantity:!1})}}),(0,l.jsx)("span",{"aria-hidden":"true",className:q.FC}),(0,l.jsx)(d.E,{tag:"span",variant:"text-sm/semibold",color:"text-default",children:i}),null!=r&&r>0?(0,l.jsx)(d.E,{tag:"span",variant:"text-sm/medium",color:"text-feedback-positive",className:q.eQ,children:N.intl.formatToPlainString(Z.default.rr3AQS,{percent:r})}):null]},n.id)})})}),(0,l.jsx)(Y.D,{label:N.intl.string(Z.default.H3pTAa),role:"group",children:(0,l.jsxs)("div",{className:q._L,children:[z.map(e=>{let t="preset"===f&&o===e,n=N.intl.formatToPlainString(Z.default["AxON/M"],{giftCount:e});return(0,l.jsxs)("button",{type:"button","aria-pressed":t,className:q.Jy,onClick:()=>{E("preset"),c(e)},children:[(0,l.jsx)("div",{className:q.E6,"aria-hidden":"true",children:(0,l.jsx)(V.t,{size:"md",color:S.A.colors.ICON_STRONG})}),(0,l.jsxs)(u.B,{gap:4,fullWidth:!1,className:q.Ng,children:[(0,l.jsx)(d.E,{tag:"span",variant:"text-md/semibold",color:t?"text-strong":"text-default",children:n}),(0,l.jsx)(J,{amount:r.amount*e,currency:r.currency,selected:t})]})]},e)}),(0,l.jsxs)("label",{className:q.r8,"data-selected":"custom"===f,onPointerUp:function(){"custom"!==f&&(E("custom"),c(A))},children:[(0,l.jsx)("input",{className:q.Wb,type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:String(50).length,value:y,"aria-labelledby":v,"aria-describedby":x,onChange:function(e){let t=e.currentTarget.value;if(!/^\d*$/.test(t))return;if(""!==t&&Number(t)>50){let e=String(50);E("custom"),I(e),g(50),c(50);return}I(t);let n=Number(t);Q(n)&&(E("custom"),g(n),c(n))},onBlur:function(){let e=Number(y);I(String(Q(e)?e:A))}}),(0,l.jsxs)(u.B,{gap:4,fullWidth:!1,className:q.Ng,children:[(0,l.jsx)(d.E,{id:v,tag:"span",variant:"text-md/semibold",color:"custom"===f?"text-strong":"text-default",children:N.intl.string(Z.default.jhNRIe)}),(0,l.jsx)(J,{id:x,amount:r.amount*A,currency:r.currency,selected:"custom"===f,announce:"custom"===f})]})]})]})})]})}var ee=n(554146),et=n(508770),en=n(408278),el=n(834040),ei=n(663341),er=n(131607),ea=n(503698),es=n.n(ea),eo=n(346689);function eu(e){let{className:t,unitPrice:n}=e,i=(0,C.t4)(e=>e.quantity);return(0,l.jsx)("div",{className:es()(eo.z,t),"aria-live":"polite",children:(0,l.jsxs)("div",{className:eo.y,children:[(0,l.jsx)(d.E,{variant:"text-md/medium",color:"text-default",children:N.intl.string(N.t["0YJHm5"])}),(0,l.jsx)(d.E,{tag:"span",variant:"heading-md/semibold",color:"text-default",children:(0,U.$g)(n.amount*i,n.currency)})]})})}var ec=n(49999),ed=n(649102);let ep=ee.M.PREMIUM_GIFT_QUANTITY_STEPPER_NEW_BADGE;function em(e){let{unitPrice:t}=e,{quantity:n,setQuantity:r}=(0,C.t4)(e=>({quantity:e.quantity,setQuantity:e.setQuantity})),[a,s]=i.useState(n),o=function(){let[e,t]=(0,er.kn)([ep]),n=e===ep;return i.useEffect(()=>{if(n)return()=>t(ec.i.AUTO_DISMISS,!0)},[n,t]),n}();i.useEffect(()=>{s(n)},[n]);let u="number"==typeof a,c=!u||a<=C.y0,p=!u||a>=50;function m(e){s(e),r(e)}return(0,l.jsxs)("div",{className:ed.kL,children:[(0,l.jsxs)("div",{className:ed.W_,children:[(0,l.jsxs)("div",{className:ed.l_,children:[(0,l.jsx)(d.E,{variant:"text-md/medium",color:"text-default",children:N.intl.string(Z.default.WnnzG7)}),o&&(0,l.jsx)("div",{className:ed.qS,children:(0,l.jsx)(et.E,{type:"new",variant:"brand"})})]}),(0,l.jsxs)("div",{className:ed.Im,role:"group","aria-label":N.intl.string(Z.default.WnnzG7),children:[(0,l.jsx)(en.K,{variant:"secondary",size:"md",icon:el.MinusIcon,onClick:()=>{c||m(a-1)},"aria-label":N.intl.string(N.t["k+ohJm"]),disabled:c}),(0,l.jsx)("div",{className:ed.t3,children:(0,l.jsx)("input",{className:ed.Ax,"aria-label":N.intl.string(Z.default.WnnzG7),inputMode:"numeric",value:`${a}`,onChange:e=>(function(e){if(""===e)return void s(e);let t=parseInt(e,10);if(!isNaN(t)){if(t<=C.y0)return void m(C.y0);if(t>=50)return void m(50);m(t)}})(e.currentTarget.value),onBlur:function(){""===a&&s(n)}})}),(0,l.jsx)(en.K,{variant:"secondary",size:"md",icon:ei.PlusLargeIcon,onClick:()=>{p||m(a+1)},"aria-label":N.intl.string(N.t.w8Sc4B),disabled:p})]})]}),(0,l.jsx)(eu,{unitPrice:t})]})}var eh=n(477421),eC=n(35587),ef=n(511484),eS=n(735164),eE=n(428212);function ey(e){let{price:t,currency:n,intervalType:i,className:r,intervalCount:a=1,isPrepaidPaymentSource:s=!1}=e,o=(0,U.$g)(t,n),u=null;return i===K.WT.YEAR?u=N.intl.format(N.t["3U719t"],{price:o}):i===K.WT.MONTH&&1===a?u=N.intl.format(N.t.NkR7BU,{price:o}):i===K.WT.MONTH&&a>1&&(u=N.intl.format(N.t.CNAGg4,{price:o,intervalCount:a})),(0,l.jsx)("div",{className:es()(eE.zz,r),"data-testid":`PricePerInterval-${n}`,children:null==i||s?(0,l.jsx)("strong",{children:o}):u})}var eI=n(898697),eA=n(968060),eg=n(274076),eP=n(448013),ev=n(948388);n(26279);var ex=n(818348),e_=n(305828);function eT(e,t){let{isEligibleForBOGOPromotion:n}=t;return null!=e&&!n}function eN(e,t){let n=N.intl.string(N.t.BYa62u),l=N.intl.string(N.t.CDa6Dq),i=(()=>{switch(e.interval){case K.WT.YEAR:return n;case K.WT.MONTH:default:return l}})(),r=e.skuId;switch(t){case K.pe.TIER_0:switch(r){case K.pe.TIER_1:return N.intl.string(N.t.q6mxDS);case K.pe.TIER_2:return N.intl.string(N.t.seZVS0);default:return i}case K.pe.TIER_1:switch(r){case K.pe.TIER_0:return N.intl.string(N.t["7+u2zg"]);case K.pe.TIER_2:return N.intl.string(N.t.NG2qcc);default:return i}case K.pe.TIER_2:switch(r){case K.pe.TIER_0:case K.pe.TIER_1:return N.intl.string(N.t["eB0/w9"]);case K.pe.TIER_2:return e.interval===K.WT.MONTH?N.intl.formatToPlainString(N.t.RqUv86,{numFreeGuildSubscriptions:K.M4}):i;default:return i}default:return i}}function eb(){let{userTrialOffer:e}=(0,m.i)(),t=e?.subscriptionTrial,{daysCount:n,copy:l}=i.useMemo(()=>t?.interval===K.WT.DAY?t?.intervalCount>7?{daysCount:14,copy:N.intl.string(N.t.Z1V2cs)}:{daysCount:7,copy:N.intl.string(N.t.MI1rHs)}:{daysCount:30,copy:N.intl.string(N.t["+S5lrV"])},[t]);return{daysCount:n,copy:l,userTrialOffer:e}}function ej(e){let{selectedPlanId:t,priceOptions:n,planOptions:l,subscriptionPeriodEnd:r,showTotal:u}=e,{selectedSkuId:c,setSelectedPlanId:d,checkoutPriceOptions:p,activeSubscription:f}=(0,C.t4)(e=>({selectedSkuId:e.selectedSkuId,setSelectedPlanId:e.setSelectedPlanId,checkoutPriceOptions:e.checkoutPriceOptions,activeSubscription:e.activeSubscription})),{userTrialOffer:S,isEligibleForTrial:E,discountOffer:y}=(0,m.i)(),I=(0,ef.YJ)(y),{isGift:A,giftRecipient:g,selectedGiftStyle:P,customGiftMessage:v,setCustomGiftMessage:x,claimableRewards:_,setSelectedGiftingPromotionRewards:T}=(0,R.Pv)(),N=(0,h.A)(),b=(0,H.kz)(N,A&&(0,k.Ik)(g),_),j=(0,M.tA)({giftRecipient:g,isGift:A});a()(void 0!==f,"should not be undefined");let[O,w]=(0,s.yK)([L.A],()=>[null!=f?L.A.get(f.planId):null,null!=t?L.A.get(t):null]),U=S?.subscriptionTrial,G=S?.isReferralTrial===!0,F=(0,eC.Sq)()&&!G,B=w??N,W=n??p;a()(null!=W,"Price option has to be set");let Y=y?.discount?.planIds,V=null!=y&&l.some(e=>Y?.includes(e))&&null!=y.discount,K=null!=I&&l.includes(I)?(0,D.y8)(I,!1,A,W):void 0,Z=null!=B?B.id:void 0,q=null!=Z&&l.includes(Z);i.useEffect(()=>{if(q)return void d(Z,{shouldUpdateQuantity:!1});let e=!A&&null!=I&&l.includes(I)?I:null;if(null==O||A)d(e??l[0]);else if(null!=O){let e=l.find(e=>e!==O.id);null!=e&&d(e)}},[q,A,l,O,d,Z,I]),i.useEffect(()=>{b&&null!=_&&_.length>0&&T(_)},[_,T,b]);let{ref:z,...$}=(0,o._u)(),Q=B?.id!=null?(0,D.y8)(B.id,!1,A,W):void 0,{ipCountryCode:J}=(0,eh.A)(),X="HR"===J&&null!=Q&&Q.currency===ex.Yr.EUR,ee=(0,D.J$)(W.paymentSourceId),et=!A&&(V||null!=U&&E&&null!=r),{copy:en}=eb();return{skuId:c,selectedPlan:B,selectedPlanPrice:Q,premiumSubscriptionPlan:O,premiumSubscription:f,thePriceOptions:W,hasSeenCollectiblesInSkuSelect:j,shouldShowTrialOrDiscountLayout:et,shouldShowHRKEuroWarning:X,shouldShowTotalInSubscriptionFlow:!E&&!V&&q&&u,canContinue:q,isPrepaid:ee,radioGroupRef:z,radioGroupProps:$,isGift:A,giftRecipient:g,customGiftMessage:v,setCustomGiftMessage:x,selectedGiftStyle:P,isEligibleForBOGOPromotion:F,isEligibleForTrial:E,userTrialOffer:S,trialPeriodCopy:en,isPlansEligibleForDiscount:V,discountedPlanRegularPrice:K}}function eR(e){let{isPrepaid:t,selectedPlan:n,selectedPlanPrice:i,intervalType:r,className:a}=e;return(0,l.jsxs)("div",{className:a,children:[(0,l.jsx)("div",{className:e_.T}),(0,l.jsx)(eS.Sd,{label:N.intl.string(N.t.txajQG),value:(0,l.jsx)(ey,{price:i.amount,currency:i.currency,intervalType:r,intervalCount:n.intervalCount,isPrepaidPaymentSource:t}),className:e_.M3})]})}function eO(e){let{giftRecipient:t,customGiftMessage:n,setCustomGiftMessage:i,selectedGiftStyle:r,hasSeenCollectiblesInSkuSelect:a,isPrepaid:s,canContinue:o,selectedPlan:d,selectedPlanPrice:p,useCompactGiftComponents:m,showQuantityStepper:h,quantityPresetsSelector:C,handleClose:f,showTotal:S,switchPlanSelectComponent:E,warningComponent:y}=e;function I(){var e;return e=h&&null!=p?(0,l.jsxs)("div",{className:e_.SL,children:[E,(0,l.jsx)(em,{unitPrice:p})]}):E,(0,l.jsxs)(u.B,{gap:8,children:[(0,l.jsx)(c.D,{variant:"heading-md/semibold",color:"text-strong",children:N.intl.string(N.t["3E5hXj"])}),e]})}return null!=C?(0,l.jsxs)(l.Fragment,{children:[C,y,!a&&(0,l.jsx)(j,{onClose:f})]}):(0,k.Ik)(t)?(0,l.jsxs)("div",{className:e_.mh,children:[(0,l.jsx)("div",{className:e_.MU,children:null!=r&&(0,l.jsx)(eg.t,{})}),(0,l.jsxs)("div",{className:e_.Tc,children:[(0,l.jsx)(ev.Z,{className:m?e_.KW:void 0,giftRecipient:t}),function(){if((0,k.lo)(t)===k.tB.CUSTOM_MESSAGE_EMOJI_SOUNDBOARD&&null!=i)return(0,l.jsx)(eA.A,{className:e_.iX,innerClassName:e_.pt,onTextChange:e=>i(e),pendingText:n,currentText:n})}(),I(),y,!a&&(0,l.jsx)(j,{onClose:f})]})]}):(0,l.jsxs)("div",{className:e_.Du,children:[(0,l.jsx)(ev.Z,{className:m?e_.KW:void 0,giftRecipient:t}),I(),!h&&o&&S&&null!=d&&null!=p&&(0,l.jsx)(eR,{selectedPlan:d,selectedPlanPrice:p,intervalType:null,isPrepaid:s}),y,!a&&(0,l.jsx)(j,{onClose:f})]})}function eM(e,t){let n=null!=e&&e.planId===t,l=n||t===K.gD.PREMIUM_MONTH_TIER_2&&null!=e&&[K.gD.PREMIUM_YEAR_TIER_0,K.gD.PREMIUM_YEAR_TIER_1].includes(e.planId);return{isCurrentPlan:n,disabled:l}}function eL(e){let{isPrepaid:t,planOptions:n,radioGroupRef:r,selectedPlan:a,radioGroupProps:s,shouldShowTrialOrDiscountLayout:o,thePriceOptions:u,isPlansEligibleForDiscount:c,isEligibleForTrial:d}=e,{currentPremiumSubscriptionForCheckout:p}=(0,C.t4)(e=>({currentPremiumSubscriptionForCheckout:e.isGift?null:e.activeSubscription})),m=i.useMemo(()=>n.map(n=>{let{isCurrentPlan:i,disabled:r}=eM(p,n);return(0,l.jsx)(eP.Ay,{planId:n,selected:a?.id===n,isCurrentPlan:i,disabled:e.disabled||r,premiumSubscription:p,isPrepaid:t,priceOptions:u,shouldShowTrialOrDiscountLayout:o,isEligibleForDiscount:c,isEligibleForTrial:d},n)}),[e.disabled,n,a,p,t,u,o,c,d]);return(0,l.jsx)("div",{ref:r,...s,children:m})}function ek(e,t){let{subscriptionPeriodEnd:n,trialPeriodCopy:l}=t,i=e?.isReferralTrial===!0;return null==n?null:i?N.intl.format(N.t.nG95hA,{endDate:n}):N.intl.format(N.t.s4E7kb,{trialEnd:n,trialPeriod:l})}function ew(e){let{shouldShowHRKEuroWarning:t,selectedPlanPrice:n}=e;return t&&null!=n?(0,l.jsx)(p.A,{message:N.intl.formatToPlainString(N.t["9hnZoK"],{kunaPriceWithCurrency:(0,U.$g)(7.5345*n.amount,ex.Yr.HRK)})}):null}function eD(){let e=(0,F.p)("StatefulUnifiedCheckoutPremiumPlanSelect");return(0,l.jsx)(p.A,{message:e?N.intl.string(N.t.jHqrJW):N.intl.format(N.t.Om31w8,{documentationLink:w.A.getArticleURL(T.MVz.LOCALIZED_PRICING)})})}function eU(e){let{selectedPlan:t,selectedPlanPrice:n,isPrepaid:i,shouldShowHRKEuroWarning:r,shouldShowTrialOrDiscountLayout:a,showTotal:s,shouldShowTotalInSubscriptionFlow:o,previewTotalSectionClassName:u}=e;return(0,l.jsxs)(l.Fragment,{children:[o&&null!=t&&null!=n&&(0,l.jsx)(eR,{className:u,selectedPlan:t,selectedPlanPrice:n,intervalType:t.interval,isPrepaid:i}),ew({shouldShowHRKEuroWarning:r,selectedPlanPrice:n}),!a&&s&&(0,l.jsx)(eD,{})]})}function eG(e){let{disabled:t,selectedPlanId:n,planGroup:i,priceOptions:r,planOptions:a,subscriptionPeriodEnd:s,showTotal:o=!0,useCompactGiftComponents:u,handleClose:p}=e,{skuId:m,selectedPlan:h,premiumSubscription:f,premiumSubscriptionPlan:S,isEligibleForBOGOPromotion:E,isGift:y,thePriceOptions:I,isEligibleForTrial:A,giftRecipient:g,customGiftMessage:P,setCustomGiftMessage:v,selectedGiftStyle:x,isPlansEligibleForDiscount:_,discountedPlanRegularPrice:T,hasSeenCollectiblesInSkuSelect:b,userTrialOffer:j,shouldShowTrialOrDiscountLayout:R,isPrepaid:M,radioGroupRef:L,radioGroupProps:k,selectedPlanPrice:w,shouldShowHRKEuroWarning:D,shouldShowTotalInSubscriptionFlow:F,canContinue:H,trialPeriodCopy:Y}=ej({selectedPlanId:n,priceOptions:r,planOptions:a,subscriptionPeriodEnd:s,showTotal:o}),{discountAmountOff:V,applicablePlan:Z,discountOffer:q}=(0,C.t4)(e=>e.premiumDiscountInfo),z=(0,G.ds)(),$=B.Ay.useConfig({location:"PremiumSwitchPlanSelectBody"}),Q=(0,W.M)({isGift:y,giftRecipient:g,selectedPlanId:h?.id}),J=Q&&$===B.o3.STEPPER,ee=Q&&$===B.o3.PRESETS;function et(){return(0,l.jsx)(eL,{disabled:t,planOptions:a,radioGroupRef:L,radioGroupProps:k,isGift:y,isPrepaid:M,premiumSubscription:f,selectedPlan:h,thePriceOptions:I,shouldShowTrialOrDiscountLayout:R,isEligibleForTrial:A,isPlansEligibleForDiscount:_})}let{showFractionalPremiumBanner:en,fractionalPremiumInfo:el}=(0,O._V)({premiumSubscription:f,selectedPlanId:n,planGroup:i,isGift:y,fractionalPremiumInfoArgs:{forceFetch:!1,excludeReverseTrial:!1,excludeReverseTrialFromCountdown:!0}});if(y)return(0,l.jsx)(eO,{giftRecipient:g,customGiftMessage:P,setCustomGiftMessage:v,selectedGiftStyle:x,hasSeenCollectiblesInSkuSelect:b,isPrepaid:M,canContinue:H,selectedPlan:h,selectedPlanPrice:w,useCompactGiftComponents:u,showQuantityStepper:J,quantityPresetsSelector:ee&&null!=h&&null!=w?(0,l.jsx)(X,{selectedPlanId:h.id,planOptions:a,unitPrice:w}):null,handleClose:p,showTotal:o,switchPlanSelectComponent:et(),warningComponent:ew({shouldShowHRKEuroWarning:D,selectedPlanPrice:w})});let ei=!(A&&en&&!z),er=eT(S,{isEligibleForBOGOPromotion:E});return(0,l.jsxs)("div",{children:[en&&!z&&(0,l.jsx)(eI.vi,{fractionalPremiumInfo:el,enablePremiumBrandRefresh:!0,variant:A?eI.uA.TRIAL:void 0,trialPeriod:A?Y:void 0,trialEnd:A?s:void 0}),er&&!en&&(0,l.jsx)(d.E,{variant:"text-md/medium",color:"interactive-text-default",className:e_.G3,children:eN(S,m)}),ei&&function(e,t,i){if(!R)return(0,l.jsx)(c.D,{variant:"heading-md/semibold",color:"text-strong",className:e_.VZ,children:N.intl.string(N.t.a19jpU)});if(t)return(0,l.jsxs)("div",{children:[(0,l.jsx)(d.E,{variant:"text-sm/normal",className:e_.Tz,children:ek(e,{subscriptionPeriodEnd:s,trialPeriodCopy:Y})}),(0,l.jsx)("hr",{className:e_.RA})]});if(i&&null!=V&&null!=T&&null!=Z&&n===Z){let e=h?.interval===K.WT.YEAR,t=(0,U.$g)(T.amount-V,T.currency),n=(0,U.$g)(T.amount,T.currency);return(0,l.jsxs)("div",{children:[(0,l.jsx)(d.E,{variant:"text-sm/normal",className:e_.Tz,children:e?N.intl.format(N.t.ofweWu,{numYears:q?.discount.intervalCount??"",discountedPrice:t,regularPrice:n}):N.intl.format(N.t["nG7g/E"],{numMonths:q?.discount.intervalCount??"",discountedPrice:t,regularPrice:n})}),(0,l.jsx)("hr",{className:e_.RA})]})}}(j,A,_),et(),eU({selectedPlan:h,selectedPlanPrice:w,isPrepaid:M,shouldShowHRKEuroWarning:D,shouldShowTrialOrDiscountLayout:R,showTotal:o,shouldShowTotalInSubscriptionFlow:F})]})}}