1"use strict";(self.webpackChunkclient_panel=self.webpackChunkclient_panel||[]).push([[8944],{60980:(B,S,s)=>{s.d(S,{i:()=>O});var o=s(54438),e=s(7673),h=s(96697),C=s(25558),b=s(70980),P=s(96354),y=s(99437),U=s(51040),M=s(42635),m=s(12791),x=s(58677),l=s(37281),_=s(46631);const f=["upgradePlanModal"],w=["upgradeSummaryModal"];let O=(()=>{class A{administrationService;cdr;router;freeTrialService;upgradePlanModal;upgradeSummaryModal;flowCompleted=new o.bkB;openingState=new o.bkB;upgradePlanModalMode="slotsOnly";targetUpgradePlanName="";isUpdatingSubscriptionPlan=!1;isPreviewingSubscriptionPlan=!1;isRefreshingUpgradePreview=!1;upgradePreviewSummary=null;upgradePreviewNextAmountLabel="";upgradePreviewIncludedCampaigns=0;upgradePreviewAddOnCampaigns=0;upgradeSummaryVm=null;upgradeModalCurrentSubscriptionAddonCampaigns=0;campaignUsageUsed=0;slotLimitGate=null;pendingUpgradePlan=null;billingCycle="monthly";subscriptions=[];constructor(t,r,a,d){this.administrationService=t,this.cdr=r,this.router=a,this.freeTrialService=d}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}open(t){if(this.isPreviewingSubscriptionPlan||this.isUpdatingSubscriptionPlan)return;if(this.freeTrialService.shouldHideSelfServeBilling())return void(0,U.b1)("Campaign limit reached","warning",null,"Got it",!1,!1,void 0,null,"You've reached the campaign limit for your plan. Please contact the support team to increase it.");this.openingState.emit(!0);const r=t?.slotLimitGate??null;this.slotLimitGate=r,this.isPreviewingSubscriptionPlan=!0,this.upgradePreviewSummary=null,this.cdr.detectChanges(),this.upgradePlanModal?.open();const a=this.administrationService.prepareManageCampaignSlotsFlow().pipe((0,h.s)(1)).subscribe({next:d=>{if(!d)return this.slotLimitGate=null,this.isPreviewingSubscriptionPlan=!1,this.upgradePlanModal?.close(),this.openingState.emit(!1),this.cdr.markForCheck(),void(null!=r&&this.showManageSlotsUnavailable());this.billingCycle=d.billingCycle,this.applyOverviewUsage(d.overview),this.upgradeModalCurrentSubscriptionAddonCampaigns=d.subscriptionAddonCampaigns,this.targetUpgradePlanName=d.plan.name||"",this.pendingUpgradePlan=d.plan,this.startSlotsPreview(d.plan)},error:()=>{this.openingState.emit(!1)}});this.subscriptions.push(a)}showManageSlotsUnavailable(){(0,U.b1)("You've reached your campaign slot limit. Upgrade your plan under Billing to add more campaigns.","warning","/administration-and-finance-settings/billing/plans-pricing","View plans",!1,!1,void 0,this.router,void 0,void 0)}applyOverviewUsage(t){t?.campaignUsage&&(this.campaignUsageUsed=Number(t.campaignUsage.used??0))}confirmPlanUpgrade(){this.syncPendingUpgradePlanFromState();const t=this.pendingUpgradePlan;if(this.pendingUpgradePlan=null,!t||this.isUpdatingSubscriptionPlan)return;const a=this.getAddedCampaignCount(t)>Number(this.upgradeModalCurrentSubscriptionAddonCampaigns||0);this.isUpdatingSubscriptionPlan=!0;const d=this.administrationService.scheduleSubscriptionUpgrade(t,this.billingCycle,this.upgradePreviewSummary?.prorationDate).pipe((0,C.n)(u=>this.handleUpgradeResult(u,t.name||"selected plan",!1,a)),(0,b.j)(()=>{this.isUpdatingSubscriptionPlan=!1})).subscribe(u=>{u&&this.flowCompleted.emit()});this.subscriptions.push(d)}upgradeTargetSupportsAddonStepper(){const t=this.pendingUpgradePlan?.tier;return"growth"===t||"pro"===t}get upgradeModalNextBillingSuffix(){return"annual"===this.billingCycle?"/year":"/month"}syncPendingUpgradePlanFromState(){const t=this.pendingUpgradePlan?.id;if(!t)return;const r=this.administrationService.billingState.plans.find(a=>a.id===t);r&&(this.pendingUpgradePlan=r)}onUpgradeModalDecreaseAddon(){this.syncPendingUpgradePlanFromState();const t=this.pendingUpgradePlan;!t||t.addedBlocks<=0||t.addedBlocks<=0||(this.administrationService.decreaseCampaignBlock(t.id),this.syncPendingUpgradePlanFromState(),this.refreshUpgradePreviewFromModal())}onUpgradeModalIncreaseAddon(){this.syncPendingUpgradePlanFromState();const t=this.pendingUpgradePlan;t&&(this.administrationService.increaseCampaignBlock(t.id),this.syncPendingUpgradePlanFromState(),this.refreshUpgradePreviewFromModal())}refreshUpgradePreviewFromModal(){this.syncPendingUpgradePlanFromState();const t=this.pendingUpgradePlan;if(!t)return;this.upgradePreviewIncludedCampaigns=t.baseCampaigns,this.upgradePreviewAddOnCampaigns=this.getAddedCampaignCount(t),this.upgradePreviewNextAmountLabel=this.buildNextBillingAmountLabel(t),this.cdr.detectChanges(),this.isRefreshingUpgradePreview=!0;const r=this.administrationService.previewManageAddonSlots(t,this.billingCycle).pipe((0,h.s)(1),(0,b.j)(()=>{this.isRefreshingUpgradePreview=!1,this.cdr.detectChanges()})).subscribe(a=>{this.upgradePreviewSummary=a,this.cdr.detectChanges()});this.subscriptions.push(r)}startSlotsPreview(t){this.isPreviewingSubscriptionPlan=!0,this.upgradePreviewSummary=null,this.upgradePreviewIncludedCampaigns=t.baseCampaigns,this.upgradePreviewAddOnCampaigns=this.getAddedCampaignCount(t),this.upgradePreviewNextAmountLabel=this.buildNextBillingAmountLabel(t),this.cdr.detectChanges();const r=this.administrationService.previewManageAddonSlots(t,this.billingCycle).pipe((0,h.s)(1),(0,b.j)(()=>{this.isPreviewingSubscriptionPlan=!1,this.openingState.emit(!1),this.cdr.detectChanges()})).subscribe(a=>{this.upgradePreviewSummary=a,this.cdr.detectChanges()});this.subscriptions.push(r)}handleUpgradeResult(t,r,a,d=!1){if(!t)return(0,e.of)(!1);if("string"==typeof t)return this.upgradePlanModal?.close(),window.open(t,"_self"),(0,e.of)(!0);if("object"!=typeof t)return this.administrationService.syncCurrentPlanFromOverview().pipe((0,P.T)(()=>(this.upgradePlanModal?.close(),!0)));const u=t.paymentActionUrl||"";return u?(this.upgradePlanModal?.close(),window.open(u,"_self"),(0,e.of)(!0)):(a?this.administrationService.loadAllBillingRules().pipe((0,y.W)(()=>(0,e.of)(!1)),(0,P.T)(()=>!0)):(0,e.of)(!0)).pipe((0,C.n)(()=>this.administrationService.syncCurrentPlanFromOverview()),(0,P.T)(()=>(d&&"object"==typeof t?this.showUpgradeSummary(t,r):this.showSlotsUpdatedSuccess(r),!0)))}
1showUpgradeSummary(t,r){this.upgradePlanModal?.close();const a=t.invoiceSummary;if(!a)return void this.showSlotsUpdatedSuccess(r);const d=(a.currency||"usd").toUpperCase(),u=p=>{const n=Number(p||0)/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:d}).format(n)},i=(a.lines||[]).map(p=>({description:p.description||"Proration adjustment",amountLabel:u(p.amount),isCredit:Number(p.amount||0)<0}));this.upgradeSummaryVm={title:`${r.replace(/\s*plan\s*$/i,"").trim()} plan updated successfully`,subtitle:"Proration has been applied for your current billing period.",lines:i,netAmountLabel:u(a.total),paidAmountLabel:u(a.amountPaid),invoiceUrl:t.stripeHostedPaymentUrl||void 0},this.cdr.detectChanges(),this.upgradeSummaryModal?.open()}showSlotsUpdatedSuccess(t){this.upgradePlanModal?.close(),(0,U.b1)("Slot is updated successfully","success","","Okay",!1,!0,"svgIconHtml",null,"",()=>{})}buildNextBillingAmountLabel(t){const r=(t.currency||"usd").toUpperCase(),u=this.getDisplayedPrice(t)+this.getDisplayedAddOnCost(t);return new Intl.NumberFormat("en-US",{style:"currency",currency:r}).format(u)}getDisplayedPrice(t){return"annual"===this.billingCycle?t.priceYearly:t.priceMonthly}getDisplayedAddOnCost(t){const r=this.administrationService.getMonthlyAddOnCost(t);return"annual"===this.billingCycle?12*r:r}getAddedCampaignCount(t){return 5*t.addedBlocks}static \u0275fac=function(r){return new(r||A)(o.rXU(M.Y),o.rXU(o.gRc),o.rXU(m.Ix),o.rXU(x.O))};static \u0275cmp=o.VBU({type:A,selectors:[["app-manage-campaign-slots-flow"]],viewQuery:function(r,a){if(1&r&&(o.GBs(f,5),o.GBs(w,5)),2&r){let d;o.mGM(d=o.lsd())&&(a.upgradePlanModal=d.first),o.mGM(d=o.lsd())&&(a.upgradeSummaryModal=d.first)}},outputs:{flowCompleted:"flowCompleted",openingState:"openingState"},decls:4,vars:17,consts:[[3,"mode","targetPlanName","isSubmitting","isInitialLoading","isRefreshingPreview","previewSummary","nextBillingAmountLabel","nextBillingPeriodSuffix","includedCampaigns","addOnCampaigns","totalCampaigns","consumedAgents","currentSubscriptionAddonCampaigns","minAddOnCampaigns","slotLimitGate","showAddonStepper","decreaseAddonBlocks","increaseAddonBlocks","confirmUpgrade"],["upgradePlanModal",""],[3,"summary","done"],["upgradeSummaryModal",""]],template:function(r,a){1&r&&(o.j41(0,"app-billing-upgrade-plan-modal",0,1),o.bIt("decreaseAddonBlocks",function(){return a.onUpgradeModalDecreaseAddon()})("increaseAddonBlocks",function(){return a.onUpgradeModalIncreaseAddon()})("confirmUpgrade",function(){return a.confirmPlanUpgrade()}),o.k0s(),o.j41(2,"app-billing-upgrade-summary-modal",2,3),o.bIt("done",function(){return a.upgradeSummaryVm=null}),o.k0s()),2&r&&(o.Y8G("mode",a.upgradePlanModalMode)("targetPlanName",a.targetUpgradePlanName)("isSubmitting",a.isUpdatingSubscriptionPlan)("isInitialLoading",a.isPreviewingSubscriptionPlan)("isRefreshingPreview",a.isRefreshingUpgradePreview)("previewSummary",a.upgradePreviewSummary)("nextBillingAmountLabel",a.upgradePreviewNextAmountLabel)("nextBillingPeriodSuffix",a.upgradeModalNextBillingSuffix)("includedCampaigns",a.upgradePreviewIncludedCampaigns)("addOnCampaigns",a.upgradePreviewAddOnCampaigns)("totalCampaigns",a.upgradePreviewIncludedCampaigns+a.upgradePreviewAddOnCampaigns)("consumedAgents",a.campaignUsageUsed)("currentSubscriptionAddonCampaigns",a.upgradeModalCurrentSubscriptionAddonCampaigns)("minAddOnCampaigns",0)("slotLimitGate",a.slotLimitGate)("showAddonStepper",a.upgradeTargetSupportsAddonStepper()),o.R7$(2),o.Y8G("summary",a.upgradeSummaryVm))},dependencies:[l.L,_.g],encapsulation:2})}return A})()},70067:(B,S,s)=>{s.d(S,{z:()=>P});var o=s(60177),e=s(12791),h=s(72242),C=s(84362),b=s(54438);let P=(()=>{class y{static \u0275fac=function(m){return new(m||y)};static \u0275mod=b.$C({type:y});static \u0275inj=b.G2t({imports:[o.MD,e.iI,h.r,C.Dk]})}return y})()},37281:(B,S,s)=>{s.d(S,{L:()=>u});var o=s(10467),e=s(54438),h=s(97801),C=s(60177),b=s(10426);const P=["upgradePlanModal"];function y(i,p){1&i&&e.nrm(0,"img",6)}function U(i,p){if(1&i&&(e.qex(0),e.j41(1,"div",7)(2,"div",8),e.nrm(3,"lottie-player",9),e.k0s(),e.j41(4,"h3",10),e.EFF(5,"Please wait..."),e.k0s(),e.j41(6,"p",11),e.EFF(7,"This will only take a few seconds."),e.k0s()(),e.bVm()),2&i){const n=e.XpG();e.R7$(3),e.Y8G("src",n.lottieUrl)}}
1function M(i,p){if(1&i&&(e.j41(0,"h3",23),e.EFF(1),e.k0s()),2&i){const n=e.XpG(3);e.R7$(),e.JRh(n.headlineText)}}function m(i,p){if(1&i&&(e.qex(0),e.j41(1,"p",25),e.EFF(2," You\u2019ll be charged "),e.j41(3,"span",26),e.EFF(4),e.k0s(),e.EFF(5," today (prorated for the remaining billing period). Your next billing cycle will be "),e.j41(6,"span",26),e.EFF(7),e.k0s(),e.EFF(8,", including additional campaign slots. "),e.k0s(),e.bVm()),2&i){const n=e.XpG(4);e.R7$(4),e.JRh(n.chargedTodayLabel),e.R7$(3),e.Lme("",n.nextBillingAmountLabel,"",n.nextBillingPeriodSuffix,"")}}function x(i,p){if(1&i&&(e.j41(0,"p",27),e.EFF(1),e.k0s()),2&i){const n=e.XpG(4);e.R7$(),e.SpI(" ",n.planSummarySubtitlePlain," ")}}function l(i,p){if(1&i&&(e.qex(0),e.DNE(1,m,9,3,"ng-container",3)(2,x,2,1,"ng-template",null,24,e.C5r),e.bVm()),2&i){const n=e.sdS(3),g=e.XpG(3);e.R7$(),e.Y8G("ngIf",g.hasPreview)("ngIfElse",n)}}function _(i,p){if(1&i&&(e.j41(0,"div",28)(1,"p",29),e.EFF(2," You've reached the maximum number of campaign slots "),e.nrm(3,"br"),e.j41(4,"span",30),e.EFF(5),e.k0s(),e.EFF(6,". "),e.k0s()()),2&i){const n=e.XpG(3);e.R7$(5),e.Lme("(",n.slotLimitGate,"/",n.slotLimitGate,")")}}function f(i,p){if(1&i){const n=e.RV6();e.j41(0,"div",31)(1,"div",32)(2,"button",33),e.bIt("click",function(){e.eBV(n);const c=e.XpG(3);return e.Njj(c.onDecreaseAddon())}),e.nrm(3,"img",34),e.k0s(),e.j41(4,"span",35),e.EFF(5),e.k0s(),e.j41(6,"button",36),e.bIt("click",function(){e.eBV(n);const c=e.XpG(3);return e.Njj(c.onIncreaseAddon())}),e.nrm(7,"img",37),e.k0s()(),e.j41(8,"p",38),e.EFF(9," Increase campaign slots to optimize more campaigns with AI agents. "),e.k0s()()}if(2&i){const n=e.XpG(3);e.R7$(2),e.Y8G("disabled",n.isSubmitting||n.isRefreshingPreview||n.addOnCampaigns<=n.minAddOnCampaigns),e.R7$(3),e.JRh(n.addOnCampaigns),e.R7$(),e.Y8G("disabled",n.isSubmitting||n.isRefreshingPreview)}}function w(i,p){if(1&i&&(e.j41(0,"div",39),e.nrm(1,"img",40),e.j41(2,"div",41)(3,"p",42),e.EFF(4," You\u2019re using "),e.j41(5,"span",43),e.EFF(6),e.k0s(),e.EFF(7," with AI agents. Release some campaigns from agents to continue. "),e.k0s()()()),2&i){const n=e.XpG(3);e.R7$(6),e.SpI("",n.consumedAgents," campaigns")}}function O(i,p){if(1&i&&(e.qex(0),e.j41(1,"p",45),e.EFF(2," You\u2019ll be charged "),e.j41(3,"span",46),e.EFF(4),e.k0s(),e.EFF(5," today (prorated for the remaining billing period). Your next billing cycle will be "),e.j41(6,"span",46),e.EFF(7),e.k0s(),e.EFF(8,", including additional campaign slots. "),e.k0s(),e.bVm()),2&i){const n=e.XpG(4);e.R7$(4),e.JRh(n.chargedTodayLabel),e.R7$(3),e.Lme("",n.nextBillingAmountLabel,"",n.nextBillingPeriodSuffix,"")}}function A(i,p){if(1&i&&(e.j41(0,"p",47),e.EFF(1),e.k0s()),2&i){const n=e.XpG(4);e.R7$(),e.SpI(" ",n.planSummarySubtitlePlain," ")}}function R(i,p){if(1&i&&(e.qex(0),e.DNE(1,O,9,3,"ng-container",13)(2,A,2,1,"p",44),e.bVm()),2&i){const n=e.XpG(3);e.R7$(),e.Y8G("ngIf",n.hasPreview),e.R7$(),e.Y8G("ngIf",!n.hasPreview)}}function t(i,p){if(1&i&&(e.j41(0,"div",48)(1,"div",49),e.EFF(2,"Campaign Limits & Usage"),e.k0s(),e.j41(3,"div",50)(4,"span",51),e.EFF(5,"Included in plan"),e.k0s(),e.j41(6,"span",52),e.EFF(7,":"),e.k0s(),e.j41(8,"span",53),e.EFF(9),e.k0s()(),e.j41(10,"div",50)(11,"span",51),e.EFF(12,"Add-on Campaigns"),e.k0s(),e.j41(13,"span",52),e.EFF(14,":"),e.k0s(),e.j41(15,"span",53),e.EFF(16),e.k0s()(),e.j41(17,"div",50)(18,"span",51),e.EFF(19,"Total Campaigns"),e.k0s(),e.j41(20,"span",52),e.EFF(21,":"),e.k0s(),e.j41(22,"span",53),e.EFF(23),e.k0s()(),e.j41(24,"div",54)(25,"span",51),e.EFF(26,"Consumed AI Agent"),e.k0s(),e.j41(27,"span",52),e.EFF(28,":"),e.k0s(),e.j41(29,"span",53),e.EFF(30),e.k0s()()()),2&i){const n=e.XpG(3);e.R7$(9),e.JRh(n.includedCampaigns),e.R7$(7),e.JRh(n.addOnCampaigns),e.R7$(7),e.JRh(n.totalCampaigns),e.R7$(7),e.JRh(n.consumedAgents)}}function r(i,p){if(1&i){const n=e.RV6();e.qex(0),e.DNE(1,M,2,1,"h3",12)(2,l,4,2,"ng-container",13),e.j41(3,"div",14),e.DNE(4,_,7,2,"div",15)(5,f,10,3,"div",16)(6,w,8,1,"div",17)(7,R,3,2,"ng-container",13)(8,t,31,4,"div",18),e.j41(9,"div",19)(10,"button",20),e.bIt("click",function(){e.eBV(n);const c=e.XpG(2);return e.Njj(c.close())}),e.EFF(11," Cancel "),e.k0s(),e.j41(12,"button",21),e.bIt("click",function(){e.eBV(n);const c=e.XpG(2);return e.Njj(c.onConfirmUpgrade())}),e.nrm(13,"img",22),e.EFF(14),e.k0s()()(),e.bVm()}if(2&i){const n=e.XpG(2);e.R7$(),e.Y8G("ngIf",n.headlineText),e.R7$(),e.Y8G("ngIf",!n.isSlotsOnly),e.R7$(2),e.Y8G("ngIf",n.showSlotLimitReachedContext),e.R7$(),e.Y8G("ngIf",n.showAddonStepper),e.R7$(),e.Y8G("ngIf",n.showUpgradeAgentWarning),e.R7$(),e.Y8G("ngIf",n.isSlotsOnly),e.R7$(),e.Y8G("ngIf",n.hasPreview||n.showAddonStepper),e.R7$(2),e.Y8G("disabled",n.isSubmitting),e.R7$(2),e.Y8G("ngClass",n.canConfirmUpgrade?"bg-active-semantic-orange text-white border-0":"upgrade-plan-confirm-disabled text-white border-0")("disabled",n.isSubmitting||!n.canConfirmUpgrade),e.R7$(2),e.SpI(" ",n.confirmButtonLabel," ")}}function a(i,p){if(1&i&&e.DNE(0,r,15,11,"ng-container",3),2&i){const n=e.XpG(),g=e.sdS(8);e.Y8G("ngIf",!n.isSubmitting)("ngIfElse",g)}}function d(i,p){if(1&i&&(e.j41(0,"div",7)(1,"div",8),e.nrm(2,"lottie-player",9),e.k0s(),e.j41(3,"h3",10),e.EFF(4),e.k0s(),e.j41(5,"p",11),e.EFF(6,"This will only take a few seconds."),e.k0s()()),2&i){const n=e.XpG();e.R7$(2),e.Y8G("src",n.lottieUrl),e.R7$(2),e.JRh(n.processingTitle)}}let u=(()=>{class i{mode="upgrade";targetPlanName="";isSubmitting=!1;isInitialLoading=!1;isRefreshingPreview=!1;previewSummary=null;nextBillingAmountLabel="";nextBillingPeriodSuffix="/month";includedCampaigns=0;addOnCampaigns=0;totalCampaigns=0;consumedAgents=0;showAddonStepper=!1;currentSubscriptionAddonCampaigns=0;minAddOnCampaigns=0;slotLimitGate=null;confirmUpgrade=new e.bkB;decreaseAddonBlocks=new e.bkB;increaseAddonBlocks=new e.bkB;modalComponent;modalConfig={modalTitle:"Upgrade Plan",centered:!0,size:"md",modalBodyClasses:"p-0",modalTitleClasses:"fs-4 fw-bold"};ngOnChanges(n){(n.mode||n.slotLimitGate)&&this.syncModalChrome()}get isSlotsOnly(){return"slotsOnly"===this.mode}get headlineText(){return this.isSlotsOnly?this.showSlotLimitReachedContext?"":"Adjust campaign slots":`You're upgrading to the ${this.normalizedPlanName} plan.`}get confirmButtonLabel(){return this.isSlotsOnly?"Update Slots":"Upgrade Now"}get processingTitle(){return this.isSlotsOnly?"Updating campaign slots...":"Upgrading your plan..."}get slotsOnlyIntro(){return""}get showSlotLimitReachedContext(){return this.isSlotsOnly&&null!=this.slotLimitGate}syncModalChrome(){this.modalConfig={...this.modalConfig,modalTitle:this.showSlotLimitReachedContext?"Campaign Slot Limit Reached":this.isSlotsOnly?"Update Campaign Slots":"Upgrade Plan"}}open(){var n=this;return(0,o.A)(function*(){return n.syncModalChrome(),n.modalComponent.open()})()}close(){var n=this;return(0,o.A)(function*(){yield n.modalComponent.dismiss()})()}onConfirmUpgrade(){var n=this;return(0,o.A)(function*(){n.isSubmitting||!n.canConfirmUpgrade||n.confirmUpgrade.emit()})()}get lottieUrl(){return h.A.LOTTIE_LOADER_URL}get isOverAgentCapacity(){const n=Number(this.totalCampaigns||0);return Number(this.consumedAgents||0)>n}get isAddOnSelectionBelowCurrent(){if(!this.showAddonStepper||this.isSlotsOnly)return!1;const n=Number(this.currentSubscriptionAddonCampaigns||0);return!(n<=0)&&Number(this.addOnCampaigns||0)<n}get showUpgradeAgentWarning(){return!(!this.showAddonStepper&&!this.hasPreview)&&(this.isOverAgentCapacity||this.isAddOnSelectionBelowCurrent)}get canConfirmUpgrade(){return!(!this.previewSummary||this.isOverAgentCapacity||this.isAddOnSelectionBelowCurrent)}onDecreaseAddon(){this.isSubmitting||this.isRefreshingPreview||this.addOnCampaigns<=this.minAddOnCampaigns||this.decreaseAddonBlocks.emit()}onIncreaseAddon(){this.isSubmitting||this.isRefreshingPreview||this.increaseAddonBlocks.emit()}get chargedTodayLabel(){const n=this.previewSummary,g=(n?.currency||"usd").toUpperCase();if(!n)return new Intl.NumberFormat("en-US",{style:"currency",currency:g}).format(0);const c=n.todayAmount,v=n.prorationNetAmount,E=n.amountDue;let F;return F=null!=c&&Number.isFinite(c)?Number(c):null!=v&&Number.isFinite(v)?Number(v):null!=E&&Number.isFinite(E)?Number(E):Number(n.total??0),new Intl.NumberFormat("en-US",{style:"currency",currency:g}).format(F/100)}get hasPreview(){return!!this.previewSummary}get planSummarySubtitlePlain(){return this.hasPreview?`You'll be charged ${this.chargedTodayLabel} today (prorated for the remaining billing period). Your next billing cycle will be ${this.nextBillingAmountLabel||""}${this.nextBillingPeriodSuffix||"/month"}, including additional campaign slots.`:"You\u2019ll be charged a prorated amount for the remaining billing period. Your next billing cycle will reflect the full plan price."}get normalizedPlanName(){return(this.targetPlanName||"").replace(/\s*plan\s*$/i,"").trim()||"selected plan"}static \u0275fac=function(g){return new(g||i)};static \u0275cmp=e.VBU({type:i,selectors:[["app-billing-upgrade-plan-modal"]],viewQuery:function(g,c){if(1&g&&e.GBs(P,5),2&g){let v;e.mGM(v=e.lsd())&&(c.modalComponent=v.first)}},inputs:{mode:"mode",targetPlanName:"targetPlanName",isSubmitting:"isSubmitting",isInitialLoading:"isInitialLoading",isRefreshingPreview:"isRefreshingPreview",previewSummary:"previewSummary",nextBillingAmountLabel:"nextBillingAmountLabel",nextBillingPeriodSuffix:"nextBillingPeriodSuffix",includedCampaigns:"includedCampaigns",addOnCampaigns:"addOnCampaigns",totalCampaigns:"totalCampaigns",consumedAgents:"consumedAgents",showAddonStepper:"showAddonStepper",currentSubscriptionAddonCampaigns:"currentSubscriptionAddonCampaigns",minAddOnCampaigns:"minAddOnCampaigns",slotLimitGate:"slotLimitGate"},outputs:{confirmUpgrade:"confirmUpgrade",decreaseAddonBlocks:"decreaseAddonBlocks",increaseAddonBlocks:"increaseAddonBlocks"},features:[e.OA$],decls:9,vars:4,consts:[[3,"modalConfig","additionalBackButton"],["upgradePlanModal",""],["lockHeaderIcon",""],[4,"ngIf","ngIfElse"],["readyTemplate",""],["processingTemplate",""],["src","./assets/media/recotap-assets/icons/lock-duotone.svg","alt","",1,"w-20px","h-20px","object-fit-contain","object-position-center","mt-1"],[1,"px-8","py-10","text-center"],[1,"d-flex","justify-content-center","mb-6"],["background","transparent","speed","1","direction","1","mode","normal","loop","","autoplay","",2,"width","130px","height","130px",3,"src"],[1,"fs-1","fw-semibold","text-gray-900","text-center","lh-sm","mb-2"],[1,"text-gray-500","fs-6"],["class","fs-1 fw-semibold text-gray-900 text-center lh-sm mt-4",4,"ngIf"],[4,"ngIf"],[1,"upgrade-plan-content","px-8","py-4","text-center"],["class"," mb-6 text-center",4,"ngIf"],["class","upgrade-plan-addon-panel border bg-light-semantic-orange rounded-4 py-5 px-4 mb-5 text-center",4,"ngIf"],["class","d-flex gap-3 p-4 rounded-2 border border-pale-semantic-red bg-light-semantic-red mb-5 text-start align-items-center","role","alert",4,"ngIf"],["class","upgrade-plan-usage-card border border-gray-300 bg-gray-50 rounded-2 p-4 mb-6 text-start",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-center","gap-3","flex-wrap"],["type","button",1,"btn","btn-lg","btn-light","border","border-gray-900","text-gray-900","rounded-pill","px-5","py-3","fw-semibold",3,"disabled","click"],["type","button",1,"btn","btn-lg","rounded-pill","px-5","py-3","fw-semibold","d-inline-flex","align-items-center","gap-2",3,"ngClass","disabled","click"],["src","./assets/media/recotap-assets/icons/flash-circle-outline.svg","alt","","width","18","height","18",1,"upgrade-plan-flash-icon"],[1,"fs-1","fw-semibold","text-gray-900","text-center","lh-sm","mt-4"],["upgradeNoPreview",""],[1,"text-gray-700","fs-6","fw-normal","lh-sm","text-center","px-8"],[1,"fw-semibold","text-gray-900","fs-6","lh-sm"],[1,"text-gray-700","fs-6","fw-normal","text-center","px-8"],[1,"mb-6","text-center"],[1,"text-gray-900","fs-1","fw-semibold","mb-2","mx-auto","lh-sm",2,"max-width","420px"],[1,"fw-bold","text-gray-900","fs-1","lh-sm"],[1,"upgrade-plan-addon-panel","border","bg-light-semantic-orange","rounded-4","py-5","px-4","mb-5","text-center"],[1,"d-flex","align-items-center","justify-content-center","gap-6px","mb
1-3"],["type","button","aria-label","Decrease add-on campaign slots",1,"d-inline-flex","align-items-center","justify-content-center","rounded-circle","border","border-gray-500","bg-white","p-0","w-35px","h-35px",3,"disabled","click"],["src","./assets/media/recotap-assets/icons/minus-solid-2.svg","alt","",1,"w-24px","h-24px","object-fit-contain","object-position-center"],[1,"text-gray-900","fs-2","fw-bold","min-w-35px","text-center"],["type","button","aria-label","Increase add-on campaign slots",1,"d-inline-flex","align-items-center","justify-content-center","rounded-circle","border","border-gray-500","bg-white","p-0","w-35px","h-35px",3,"disabled","click"],["src","./assets/media/recotap-assets/icons/plus-solid.svg","alt","",1,"w-24px","h-24px","object-fit-contain","object-position-center"],[1,"text-gray-700","fs-6","fw-medium","lh-sm","text-center","mb-0","px-3"],["role","alert",1,"d-flex","gap-3","p-4","rounded-2","border","border-pale-semantic-red","bg-light-semantic-red","mb-5","text-start","align-items-center"],["src","./assets/media/recotap-assets/icons/warning-triangle.svg","alt","","width","20","height","20",1,"upgrade-plan-warn-icon","flex-shrink-0"],[1,"flex-grow-1","min-w-0"],[1,"text-gray-900","fs-6","lh-base","mb-0"],[1,"fw-bold"],["class","text-gray-600 fs-3 mb-6 lh-lg",4,"ngIf"],[1,"text-gray-600","fs-3","mb-6","lh-lg","px-lg-2"],[1,"fw-bold","text-gray-900"],[1,"text-gray-600","fs-3","mb-6","lh-lg"],[1,"upgrade-plan-usage-card","border","border-gray-300","bg-gray-50","rounded-2","p-4","mb-6","text-start"],[1,"fs-6","fw-semibold","text-gray-900","lh-sm","text-start","mb-4"],[1,"d-flex","align-items-center","mb-2"],[1,"fs-7","fw-normal","text-gray-900","lh-133","w-50","text-start"],[1,"fs-7","fw-semibold","text-gray-900","lh-133","text-center","px-2"],[1,"text-gray-900","text-end","fs-7","fw-semibold","lh-133","w-50"],[1,"d-flex","align-items-center"]],template:function(g,c){if(1&g&&(e.j41(0,"app-modal",0,1),e.DNE(2,y,1,0,"ng-template",null,2,e.C5r)(4,U,8,1,"ng-container",3)(5,a,1,2,"ng-template",null,4,e.C5r)(7,d,7,2,"ng-template",null,5,e.C5r),e.k0s()),2&g){const v=e.sdS(3),E=e.sdS(6);e.Y8G("modalConfig",c.modalConfig)("additionalBackButton",c.showSlotLimitReachedContext?v:void 0),e.R7$(4),e.Y8G("ngIf",c.isInitialLoading)("ngIfElse",E)}},dependencies:[C.YU,C.bT,b.z],styles:[".upgrade-plan-content[_ngcontent-%COMP%]{min-height:280px}.upgrade-plan-addon-panel[_ngcontent-%COMP%]{box-shadow:0 1px #181c320a}.upgrade-plan-slot-btn[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:50%;border:1px solid #dfe3e9;background:#fff;color:#3f4254;display:inline-flex;align-items:center;justify-content:center;font-size:1.25rem;font-weight:700;line-height:1;padding:0;transition:opacity .15s ease}.upgrade-plan-slot-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.upgrade-plan-slot-btn[_ngcontent-%COMP%]:not(:disabled):hover{background:#f9f9fb}.upgrade-plan-usage-card[_ngcontent-%COMP%]{box-shadow:inset 0 1px #fff9}.upgrade-plan-warn-icon[_ngcontent-%COMP%]{object-fit:contain}.upgrade-plan-flash-icon[_ngcontent-%COMP%]{flex-shrink:0;filter:brightness(0) invert(1)}.upgrade-plan-confirm-disabled[_ngcontent-%COMP%]{background:#9ca3af!important;cursor:not-allowed;opacity:.95}.min-w-35px[_ngcontent-%COMP%]{min-width:35px}"]})}return i})()},46631:(B,S,s)=>{s.d(S,{g:()=>M});var o=s(10467),e=s(54438),h=s(60177),C=s(10426);const b=["upgradeSummaryModal"];function P(m,x){if(1&m&&(e.j41(0,"div",21)(1,"span",22),e.EFF(2),e.k0s(),e.j41(3,"span",11),e.EFF(4,":"),e.k0s(),e.j41(5,"span",23),e.EFF(6),e.k0s()()),2&m){const l=x.$implicit;e.R7$(2),e.JRh(l.description),e.R7$(3),e.Y8G("ngClass",l.isCredit?"text-active-semantic-green":"text-gray-900"),e.R7$(),e.JRh(l.amountLabel)}}function y(m,x){if(1&m){const l=e.RV6();e.j41(0,"button",24),e.bIt("click",function(){e.eBV(l);const f=e.XpG().ngIf,w=e.XpG();return e.Njj(w.openInvoice(f.invoiceUrl))}),e.EFF(1," View invoice "),e.k0s()}}function U(m,x){if(1&m){const l=e.RV6();e.j41(0,"div",3)(1,"h3",4),e.EFF(2),e.k0s(),e.j41(3,"p",5),e.EFF(4),e.k0s(),e.j41(5,"div",6)(6,"div",7),e.EFF(7,"Campaign Slots"),e.k0s(),e.DNE(8,P,7,3,"div",8),e.j41(9,"div",9)(10,"span",10),e.EFF(11,"Net amount"),e.k0s(),e.j41(12,"span",11),e.EFF(13,":"),e.k0s(),e.j41(14,"span",12),e.EFF(15),e.k0s()(),e.j41(16,"div",13)(17,"span",14),e.EFF(18,"Amount paid"),e.k0s(),e.j41(19,"span",15),e.EFF(20,":"),e.k0s(),e.j41(21,"span",16),e.EFF(22),e.k0s()()(),e.j41(23,"div",17),e.DNE(24,y,2,0,"button",18),e.j41(25,"button",19),e.bIt("click",function(){e.eBV(l);const f=e.XpG();return e.Njj(f.close())}),e.nrm(26,"img",20),e.EFF(27," Done "),e.k0s()()()}if(2&m){const l=x.ngIf;e.R7$(2),e.JRh(l.title),e.R7$(2),e.JRh(l.subtitle),e.R7$(4),e.Y8G("ngForOf",l.lines),e.R7$(7),e.JRh(l.netAmountLabel),e.R7$(7),e.JRh(l.paidAmountLabel),e.R7$(2),e.Y8G("ngIf",l.invoiceUrl)}}let M=(()=>{class m{summary=null;done=new e.bkB;modalComponent;modalConfig={modalTitle:"Upgrade Summary",centered:!0,size:"md",modalBodyClasses:"p-0",modalTitleClasses:"fs-2"};open(){var l=this;return(0,o.A)(function*(){return l.modalComponent.open()})()}close(){var l=this;return(0,o.A)(function*(){yield l.modalComponent.dismiss(),l.done.emit()})()}openInvoice(l){l&&window.open(l,"_blank")}static \u0275fac=function(_){return new(_||m)};static \u0275cmp=e.VBU({type:m,selectors:[["app-billing-upgrade-summary-modal"]],viewQuery:function(_,f){if(1&_&&e.GBs(b,5),2&_){let w;e.mGM(w=e.lsd())&&(f.modalComponent=w.first)}},inputs:{summary:"summary"},outputs:{done:"done"}
1,decls:3,vars:2,consts:[[3,"modalConfig"],["upgradeSummaryModal",""],["class","upgrade-summary-modal px-8 py-8",4,"ngIf"],[1,"upgrade-summary-modal","px-8","py-8"],[1,"fs-1","fw-semibold","text-gray-900","text-center","lh-sm","mb-3"],[1,"text-gray-700","fs-4","fw-normal","lh-sm","text-center","mb-6"],[1,"upgrade-plan-usage-card","border","border-gray-300","bg-gray-50","rounded-2","p-4","mb-6","text-start"],[1,"fs-4","fw-semibold","text-gray-900","lh-sm","text-start","mb-3"],["class","d-flex align-items-center mb-2",4,"ngFor","ngForOf"],[1,"border-top","border-gray-300","mt-3","pt-3","d-flex","align-items-center","mb-2"],[1,"fs-6","fw-semibold","text-gray-900","lh-sm","w-50","text-start"],[1,"fs-6","fw-semibold","text-gray-900","lh-sm","text-center","px-2"],[1,"text-gray-900","text-end","fs-6","fw-bold","lh-sm","w-50"],[1,"d-flex","align-items-center"],[1,"fs-7","fw-normal","text-gray-700","lh-sm","w-50","text-start"],[1,"fs-7","fw-semibold","text-gray-900","lh-sm","text-center","px-2"],[1,"text-gray-900","text-end","fs-7","fw-semibold","lh-sm","w-50"],[1,"d-flex","align-items-center","justify-content-center","gap-3","flex-wrap"],["type","button","class","btn btn-lg btn-light border border-gray-900 text-gray-900 rounded-pill px-5 py-3 fw-semibold",3,"click",4,"ngIf"],["type","button",1,"btn","btn-lg","bg-active-semantic-orange","text-white","rounded-pill","px-5","py-3","fw-semibold","d-inline-flex","align-items-center","gap-2",3,"click"],["src","./assets/media/recotap-assets/icons/flash-circle-outline.svg","alt","",1,"w-18px","h-18px","object-fit-contain","object-position-center"],[1,"d-flex","align-items-center","mb-2"],[1,"fs-6","fw-normal","text-gray-900","lh-sm","w-50","text-start"],[1,"text-end","fs-6","fw-semibold","lh-sm","w-50",3,"ngClass"],["type","button",1,"btn","btn-lg","btn-light","border","border-gray-900","text-gray-900","rounded-pill","px-5","py-3","fw-semibold",3,"click"]],template:function(_,f){1&_&&(e.j41(0,"app-modal",0,1),e.DNE(2,U,28,6,"div",2),e.k0s()),2&_&&(e.Y8G("modalConfig",f.modalConfig),e.R7$(2),e.Y8G("ngIf",f.summary))},dependencies:[h.YU,h.Sq,h.bT,C.z],styles:[".upgrade-summary-modal[_ngcontent-%COMP%]{min-height:340px}"]})}return m})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.