Build 533169stable
Module 745299
1,807 characters · in b9999b4583975d25.js, aca7018765200529.jsDependencies
Source Raw
function(e,t,n){n.d(t,{A:()=>E});var i=n(627968);n(64700);var l=n(110259),s=n(496431),a=n(793574),r=n(688810),o=n(139286),d=n(532794),c=n(954571),u=n(975571),h=n(927578),A=n(234419),_=n(635995),m=n(915516),p=n(788868),g=n(652215),f=n(985018);let E=function(e){let{dismissCurrentNotice:t,subscriptionTier:n}=e,{analyticsLocations:E}=(0,r.Ay)(function(e){switch(e){case p.pe.TIER_0:return a.A.PREMIUM_TIER_0_TRIAL_ENDING_NOTICE;case p.pe.TIER_2:return a.A.PREMIUM_TIER_2_TRIAL_ENDING_NOTICE;default:throw Error(`Unsupported subscription tier: ${e}`)}}(n)),x=(0,A.V)(),I=(0,s.A)(null!=x&&null!=x.expires_at?Date.parse(x.expires_at):0),C=null==x||x.subscription_trial?.sku_id!==n||null==x.expires_at||Object.values(I).every(e=>0===e);if((0,o.A)({type:l.ImpressionTypes.VIEW,name:l.ImpressionNames.TRIAL_NOTICE,properties:{trial_id:x?.trial_id}},{disableTrack:C}),C)return null;let N=n===p.pe.TIER_2?g.kqX.PREMIUM_TIER_2_TRIAL_ENDING:g.kqX.PREMIUM_TIER_0_TRIAL_ENDING,T=(0,h.re)({intervalType:x.subscription_trial?.interval,intervalCount:x.subscription_trial?.interval_count}),S=u.A.getArticleURL(x.trial_id===p.yo?g.MVz.NITRO_TRIAL_FOR_ALL:g.MVz.PREMIUM_TRIAL);return(0,i.jsxs)(_.T0,{onClick:()=>{t(),c.default.track(g.HAw.APP_NOTICE_CLOSED,{notice_type:N,trial_id:x.trial_id})},children:[(0,i.jsx)(_.In,{children:(0,m.GZ)(n,I,T,S)}),(0,i.jsx)(_.fY,{onClick:()=>{(0,d.A)({trialId:x.trial_id,subscriptionTier:n,analyticsLocations:E,analyticsObject:{page:g.liQ.IN_APP,section:g.JJy.NOTIFICATION_BAR,object:g.ZSU.BUTTON_CTA}}),c.default.track(g.HAw.APP_NOTICE_PRIMARY_CTA_OPENED,{notice_type:N,trial_id:x.trial_id})},text:function(e){switch(e){case p.pe.TIER_0:return f.intl.string(f.t.mCG023);case p.pe.TIER_2:return f.intl.string(f.t.J61px0);default:throw Error(`Unsupported subscription tier: ${e}`)}}(n)})]})}}