PageSourceSearch

https://vedius-brasil.firebaseapp.com/chunk-NGOCKPWK.js

js vedius-brasil.firebaseapp.com collected 2026-10-03 14:09:12 UTC 18,243 bytes, 2 lines download raw bytes

1import{a as le,b as de,c as n,d as ue,e as Se,f as me,g as he}from"./chunk-BRARETZ3.js";import{a as se,c as re,d as oe,j as ae,l as ce,m as pe}from"./chunk-LE44DDZT.js";import{a as ee}from"./chunk-5HI72EE4.js";import{a as ne}from"./chunk-DMB4Z5T6.js";import{c as ie}from"./chunk-BQSYM23H.js";import"./chunk-UJLMMLUM.js";import{a as te}from"./chunk-5CRQFKDA.js";import"./chunk-7AAUCWQR.js";import"./chunk-4TJQHVPV.js";import"./chunk-XGHI7KS5.js";import"./chunk-Z36TISWV.js";import{z as Z}from"./chunk-SRUBCUSW.js";import"./chunk-52TU3IL6.js";import"./chunk-TDIWFVPA.js";import"./chunk-MN2F2UI2.js";import"./chunk-LJV7ZYHU.js";import"./chunk-25QDB3SE.js";import"./chunk-KJ3PV2LN.js";import"./chunk-35M7AFQZ.js";import"./chunk-HCVRNL4G.js";import"./chunk-INMDLS22.js";import"./chunk-AJZMXFMA.js";import"./chunk-YE7HTOLI.js";import"./chunk-NZ4I6U2Z.js";import"./chunk-23N7CA4O.js";import"./chunk-YI7ZQONV.js";import"./chunk-54IZQ3MU.js";import"./chunk-QUO3WGUK.js";import"./chunk-GZLC4DDF.js";import"./chunk-74YMZKOK.js";import"./chunk-6IH4M65S.js";import"./chunk-NGAT3XSV.js";import{a as Q}from"./chunk-6DMACB4X.js";import{a as $}from"./chunk-SXLHBEO2.js";import"./chunk-IUPWKUGB.js";import"./chunk-C5J3HTKX.js";import"./chunk-56FUNJ2L.js";import"./chunk-KORPXNVS.js";import"./chunk-W4BNGQYG.js";import"./chunk-OSVOK6WL.js";import"./chunk-WXXKR7LF.js";import"./chunk-R2NO6V5K.js";import"./chunk-FV2Q4OA6.js";import"./chunk-QPZCEWML.js";import"./chunk-L44SDTPC.js";import"./chunk-CLQP3QCS.js";import{a as J}from"./chunk-TWVMK4TV.js";import"./chunk-EGNI2XJ3.js";import{a as G}from"./chunk-A3N634GV.js";import"./chunk-F457L6VT.js";import"./chunk-6BC3ZOBR.js";import{K as A,O as h}from"./chunk-4U4PLY73.js";import"./chunk-RQ4F2COW.js";import"./chunk-7RWCIHFI.js";import"./chunk-GP7G4HVV.js";import"./chunk-X5ROTD3U.js";import{a as q}from"./chunk-V4NS6LW3.js";import"./chunk-VFTYDXHH.js";import"./chunk-LJSWAOQY.js";import"./chunk-RFPVTC6I.js";import"./chunk-SPFBMSSO.js";import"./chunk-TZOYHBJT.js";import"./chunk-34KEMFZC.js";import{j as W,k as Y}from"./chunk-4BUGZAA4.js";import"./chunk-3TCRHIAB.js";import{p as K}from"./chunk-76JNFTGE.js";import{Ua as j,g as F}from"./chunk-C7VFP4N4.js";import{c as z,d as X}from"./chunk-CYMQMRSQ.js";import"./chunk-SAPP7HDL.js";import"./chunk-YJOTM47P.js";import{g as U}from"./chunk-2PJAPLDY.js";import"./chunk-UQ5LDOFJ.js";import"./chunk-C2CO7BOS.js";import"./chunk-UVTXHEDZ.js";import{f as B,i as D,k as H}from"./chunk-3APTCJCW.js";import"./chunk-EMVJM2S7.js";import"./chunk-KDTKTPR2.js";import"./chunk-TPWGF6XO.js";import{Cb as o,Cc as E,Dc as N,Ia as b,Ib as p,Ic as g,Ja as f,Jc as S,Tb as w,Wc as v,Xc as C,Yb as x,Yc as k,Zc as P,lc as c,pd as y,qd as T,sd as O,xc as l,yc as d,zc as R}from"./chunk-MH4BPXDL.js";import{a as V,b as L,l as M}from"./chunk-CU44V7JF.js";function xe(s,a){s&1&&E(0)}function Ee(s,a){s&1&&E(0)}function ve(s,a){s&1&&E(0)}function Oe(s,a){s&1&&E(0)}function Ae(s,a){if(s&1&&R(0,"app-subscription-step-header",11),s&2){let t=S();c("options",t.subscriptionStepHeaderOption)}}function Ie(s,a){if(s&1&&(l(0,"vedius-text",14),C(1),y(2,"translate"),d()),s&2){let t=S(2);o(),P(" ",T(2,1,t.TranslationKeys.AssistantSubscriptionStepCurrentPlanTitle)," ")}}function Me(s,a){if(s&1&&(l(0,"vedius-text",14),C(1),y(2,"translate"),d()),s&2){let t=S(2);o(),P(" ",T(2,1,t.TranslationKeys.AssistantSubscriptionSelectPlanTitle)," ")}}function Re(s,a){s&1&&(l(0,"vedius-text",14),C(1),y(2,"translate"),d()),s&2&&(o(),P(" ",T(2,1,"CUSTOMER_SUBSCRIPTION.CHOOSE_YOUR_PAYMENT_METHOD")," "))}function Ne(s,a){s&1&&(l(0,"vedius-text",14),C(1),y(2,"translate"),d()),s&2&&(o(),P(" ",T(2,1,"CUSTOMER_SUBSCRIPTION.SUBSCRIPTION_OVERVIEW")," "))}function Ve(s,a){if(s&1&&(l(0,"div",12),x(1,Ie,3,3,"vedius-text",13)(2,Me,3,3,"vedius-text",13)(3,Re,3,3,"vedius-text",13)(4,Ne,3,3,"vedius-text",13),d()),s&2){let t=S();o(),c("ngIf",t.currentStep===t.AssistantSubscriptionStepType.CHOOSE_PLAN),o(),c("ngIf",t.currentStep===t.AssistantSubscriptionStepType.SELECT_PLAN),o(),c("ngIf",t.currentStep===t.AssistantSubscriptionStepType.SELECT_PAYMENT_METHOD),o(),c("ngIf",t.currentStep===t.AssistantSubscriptionStepType.SUBSCRIPTION_OVERVIEW)}}function Le(s,a){if(s&1){let t=N();l(0,"app-choose-assistant-plan-subscription",15),g("planTierSelected",function(i){b(t);let r=S();return f(r.onPlanTierSelected(i))}),d(),l(1,"app-subscription-assistant-available-plans",16),g("plansSelected",function(i){b(t);let r=S();return f(r.onPlansSelected(i))}),d(),l(2,"app-subscription-storage-payment-methods-options",17),g("paymentMethodSelected",function(i){b(t);let r=S();return f(r.onPaymentMethodSelected(i))}),d(),l(3,"app-subscription-assistant-overview",18),g("onChangeCardInfo",function(i){b(t);let r=S();return f(r.onOverviewChangeCardInfo(i))}),d()}if(s&2){let t=S();c("hidden",t.currentStep!==t.AssistantSubscriptionStepType.CHOOSE_PLAN)("initialSelectedPlanTier",t.userPlanTierSelected),o(),c("hidden",t.currentStep!==t.AssistantSubscriptionStepType.SELECT_PLAN)("planTierSelected",t.userPlanTierSelected)("initialSelectedPlanKey",t.initialSelectedPlanKey),o(),c("hidden",t.currentStep!==t.AssistantSubscriptionStepType.SELECT_PAYMENT_METHOD)("selectedPaymentMethod",t.paymentMethodSelected)("initialCardInfo",t.initialCardInfo)("paymentMethodCodes",t.userAvailablePaymentMethodCodes),o(),c("hidden",t.currentStep!==t.AssistantSubscriptionStepType.SUBSCRIPTION_OVERVIEW)("isSmallScreen",t.isSmallScreen)("option",t.subscriptionOverviewOption)}}function we(s,a){if(s&1){let t=N();l(0,"div",19)(1,"vedius-button",20),g("onClick",function(){b(t);let i=S();return f(i.onBack())}),C(2),y(3,"translate"),d()(),l(4,"div",21)(5,"vedius-button",22),g("onClick",function(){b(t);let i=S();return f(i.onNext())}),C(6),y(7,"translate"),d(),l(8,"vedius-button",23),g("click",function(){b(t);let i=S();return f(i.changeSubscription())}),C(9),y(10,"translate"),d()()}if(s&2){let t=S();o(2),k(T(3,6,"BUTTONS.BACK")),o(3),c("hidden",t.currentStep===t.AssistantSubscriptionStepType.SUBSCRIPTION_OVERVIEW)("disabled",t.isActionButtonDisabledBasedOnState()),o(),P(" ",T(7,8,"BUTTONS.NEXT"),""),o(2),c("hidden",t.currentStep!==t.AssistantSubscriptionStepType.SUBSCRIPTION_OVERVIEW),o(),P(" ",T(10,10,"BUTTONS.CONFIRM_SUBSCRIPTION"),"")}}var ft=(()=>{let a=class a{handleKeyUp(e){e.key===J&&!this.isActionButtonDisabledBasedOnState()&&this.onNext()}constructor(e,i,r,u,m,_,I,_e,ge,be,fe,Ce,ye,Te,Pe){this.sidebarService=e,this.evolutionProgressTrackerService=i,this.toastService=r,this.userVediusContext=u,this.assistantSubscriptionErrorFeedbackRouteStrategy=m,this.pixPaymentAssistantDetailsRouteStrategy=_,this.bankslipPaymentAssistantDetailsRouteStrategy=I,this.breakpointObserver=_e,this.translationService=ge,this.assistantSubscriptionSuccessFeedbackRouteStrategy=be,this.managementSubscriptionRouteStrategy=fe,this.assistantSubscriptionRouteStrategy=Ce,this.location=ye,this.route=Te,this.TranslationKeys=F,this.AssistantSubscriptionStepType=n,this.currentStep=n.CHOOSE_PLAN,this.userPlansSelected=[],this.userAvailablePaymentMethodCodes=[],this.isLoading=!1,this.translateLoaded=!1,this.paymentMethodStepMapping={[h.CREDIT_CARD]:[n.CHOOSE_PLAN,n.SELECT_PLAN,n.SELECT_PAYMENT_METHOD,n.SUBSCRIPTION_OVERVIEW],[h.BANK_SLIP]:[n.CHOOSE_PLAN,n.SELECT_PLAN,n.SELECT_PAYMENT_METHOD,n.SUBSCRIPTION_OVERVIEW],[h.PIX]:[n.CHOOSE_PLAN,n.SELECT_PLAN,n.SELECT_PAYMENT_METHOD,n.SUBSCRIPTION_OVERVIEW]},this.buttonStateChecks={[n.CHOOSE_PLAN]:()=>!this.userPlanTierSelected,[n.SELECT_PLAN]:()=>this.userPlansSelected.length===0,[n.SELECT_PAYMENT_METHOD]:()=>!this.paymentMethodSelected,[n.SUBSCRIPTION_OVERVIEW]:()=>!1},this.stepValidityMapping={[n.CHOOSE_PLAN]:()=>!!this.userPlanTierSelected,[n.SELECT_PLAN]:()=>this.userPlansSelected.length>0,[n.SELECT_PAYMENT_METHOD]:()=>!!this.paymentMethodSelected,[n.SUBSCRIPTION_OVERVIEW]:()=>this.currentStep===n.SUBSCRIPTION_OVERVIEW},this.percentageStepMapping={[h.CREDIT_CARD]:{[n.CHOOSE_PLAN]:25,[n.SELECT_PLAN]:25,[n.SELECT_PAYMENT_METHOD]:25,[n.SUBSCRIPTION_OVERVIEW]:25},[h.PIX]:{[n.CHOOSE_PLAN]:25,[n.SELECT_PLAN]:25,[n.SELECT_PAYMENT_METHOD]:25,[n.SUBSCRIPTION_OVERVIEW]:25},[h.BANK_SLIP]:{[n.CHOOSE_PLAN]:25,[n.SELECT_PLAN]:25,[n.SELECT_PAYMENT_METHOD]:25,[n.SUBSCRIPTION_OVERVIEW]:25}},this.isSmallScreen=!1,e.hideSidebar(),i.invisible(),this.customerSubscriptionService=Pe.create()}ngAfterViewInit(){setTimeout(()=>{this.evolutionProgressTrackerService.invisible()},500)}ngOnInit(){this.applyPreselectedPlanTierFromRoute(),this.checkPlanSelected(),this.checkPaymentMethodSelected(),this.updateTimelineProgress(),this.listenScreenSize(),this.translationService.loaded().then(()=>{this.translateLoaded=!0})}ngOnDestroy(){this.sidebarService.showSidebar(),this.evolutionProgressTrackerService.visible()}listenScreenSize(){this.breakpointObserver.observe([j]).subscribe(e=>{this.isSmallScreen=e.matches})}get userVedius(){return this.userVediusContext.current}get paymentMethodCodeSelectedOrDefault(){return this.paymentMethodSelected?.paymentMethodCode||h.CREDIT_CARD}get userPlanSelected(){return this.userPlansSelected.find(e=>e.paymentMethodCode===this.paymentMethodSelected?.paymentMethodCode)}
1get fromErrorRoute(){return this.route.snapshot.queryParams.fromError==="true"}onPlanTierSelected(e){this.userPlanTierSelected=e,this.updateTimelineProgress()}onPlansSelected(e){this.userPlansSelected=e,this.userPlansSelected?.length&&(this.userAvailablePaymentMethodCodes=this.userPlansSelected?.map(i=>i.paymentMethodCode)),this.updateTimelineProgress()}onPaymentMethodSelected(e){if(this.paymentMethodSelected=e?.paymentMethodSelected,this.paymentMethodSelected){let i=this.userPlansSelected.find(r=>r.paymentMethodCode===this.paymentMethodSelected?.paymentMethodCode);this.createSubscriptionOverviewOption(i,this.paymentMethodSelected),e?.cardRegisteredAction===oe.FromModal&&this.onNext()}else this.subscriptionOverviewOption=void 0;this.updateTimelineProgress()}checkSubscriptionOverviewOption(){if(this.paymentMethodSelected){let e=this.userPlansSelected.find(i=>i.paymentMethodCode===this.paymentMethodSelected?.paymentMethodCode);this.createSubscriptionOverviewOption(e,this.paymentMethodSelected)}}onBack(){let e=this.paymentMethodStepMapping[this.paymentMethodCodeSelectedOrDefault],i=e.indexOf(this.currentStep);i>0?this.currentStep=e[i-1]:i===0&&this.currentStep===n.CHOOSE_PLAN&&(this.fromErrorRoute?this.assistantSubscriptionRouteStrategy.redirect():this.location.back()),this.updateTimelineProgress()}onNext(){this.checkSubscriptionOverviewOption(),this.goToNextStep(),this.updateTimelineProgress()}isActionButtonDisabledBasedOnState(){let e=this.buttonStateChecks[this.currentStep];return e?e():!0}onOverviewChangeCardInfo(e){this.initialCardInfo=e}changeSubscription(){let{paymentMethodCodeSelectedOrDefault:e}=this;e===h.CREDIT_CARD?this.changeSubscriptionWithCreditCard():this.changeSubscriptionWithPixOrBankSlip()}applyPreselectedPlanTierFromRoute(){let e=ne(this.route);e&&(this.userPlanTierSelected=e)}goToNextStep(){let e=this.paymentMethodStepMapping[this.paymentMethodCodeSelectedOrDefault],i=e.indexOf(this.currentStep);i<e.length-1&&(this.currentStep=e[i+1])}checkPlanSelected(){this.userVedius.subscriptions?.vediusAssistantDetails&&(this.initialSelectedPlanKey=this.userVedius.subscriptions?.vediusAssistantSelectedPlanKey?.value)}checkPaymentMethodSelected(){if(this.userVedius.subscriptions?.vediusAssistantDetails){let i=this.userVedius.subscriptions?.getSelectedPaymentMethodCode(A.VEDIUS_ASSISTANT),r=i===h.CREDIT_CARD,u={paymentMethodCode:i};if(r){let m=this.userVedius.subscriptions?.getActivePaymentProfileInfo(A.VEDIUS_ASSISTANT);if(m){let _=re.fromPaymentProfileSubscription(m);u=L(V({},u),{cardInfo:_}),this.initialCardInfo=_}}this.initialPaymentMethodSelected=u,this.paymentMethodSelected=u}}redirectToPaymentFailed(){this.assistantSubscriptionErrorFeedbackRouteStrategy.redirect()}changeSubscriptionWithCreditCard(){return M(this,null,function*(){let e=this.userPlanSelected,i=e.key,r=e.paymentMethodCode,u=this.paymentMethodSelected?.cardInfo;this.isLoading=!0;try{let m=!!e.discountedPrice,_=yield this.customerSubscriptionService.changeCustomerSubscriptionPlan({planSubscriptionKey:i,paymentMethodCode:r,type:A.VEDIUS_ASSISTANT,cardInfo:u});if(_?.error||!_?.isAccessGranted){this.redirectToPaymentFailed();return}m?this.assistantSubscriptionSuccessFeedbackRouteStrategy.redirect():(this.toastService.showDefaultUpdateSuccessMessage(),this.managementSubscriptionRouteStrategy.redirect())}catch(m){console.error(m),this.redirectToPaymentFailed()}finally{this.isLoading=!1}})}changeSubscriptionWithPixOrBankSlip(){return M(this,null,function*(){let e=this.userPlanSelected,i=e.key,r=e.paymentMethodCode;this.isLoading=!0;try{let u=!!e.discountedPrice;if((yield this.customerSubscriptionService.changeCustomerSubscriptionPlan({planSubscriptionKey:i,paymentMethodCode:r,type:A.VEDIUS_ASSISTANT}))?.error){this.redirectToPaymentFailed();return}u?(r===h.PIX&&this.pixPaymentAssistantDetailsRouteStrategy.redirect(),r===h.BANK_SLIP&&this.bankslipPaymentAssistantDetailsRouteStrategy.redirect()):(this.toastService.showDefaultUpdateSuccessMessage(),this.managementSubscriptionRouteStrategy.redirect())}catch(u){console.error(u),this.redirectToPaymentFailed()}finally{this.isLoading=!1}})}createSubscriptionOverviewOption(e,i){this.subscriptionOverviewOption={planSelected:e,paymentMethodSelected:i,availablePlans:this.userPlansSelected}}updateTimelineProgress(){this.subscriptionStepHeaderOption={currentSubscriptionStep:this.currentStep,currentPaymentMethodCode:this.paymentMethodSelected?.paymentMethodCode,paymentMethodStepMapping:this.paymentMethodStepMapping,stepValidityMapping:this.stepValidityMapping,percentageStepMapping:this.percentageStepMapping}}};a.\u0275fac=function(i){return new(i||a)(p(ee),p(te),p(G),p(Q),p(me),p(ce),p(he),p(K),p(q),p(Se),p(Z),p(ie),p(B),p(U),p(se))},a.\u0275cmp=w({type:a,selectors:[["app-change-assistant-subscription"]],hostBindings:function(i,r){i&1&&g("keyup",function(m){return r.handleKeyUp(m)})},decls:18,vars:5,consts:[["HeaderPage",""],["stepHeaderLabel",""],["stepContent",""],["FooterActions",""],[1,"change-assistant-subscription-page"],[1,"container"],[1,"subscription-header-content"],[4,"ngTemplateOutlet"],[1,"first-subscription-body-content"],[1,"subcription-footer-content"],[3,"active"],[3,"options"],[1,"text-content"],["class","title","variant","display","size","micro",4,"ngIf"],["variant","display","size","micro",1,"title"],[3,"planTierSelected","hidden","initialSelectedPlanTier"],[3,"plansSelected","hidden","planTierSelected","initialSelectedPlanKey"],[3,"paymentMethodSelected","hidden","selectedPaymentMethod","initialCardInfo","paymentMethodCodes"],[3,"onChangeCardInfo","hidden","isSmallScreen","option"],[1,"content-1"],["variant","tertiary",3,"onClick"],[1,"content-2"],["variant","primary",3,"onClick","hidden","disabled"],["variant","primary",1,"confirm-subscription-button",3,"click","hidden"]],template:function(i,r){if(i&1&&(l(0,"aside",4)(1,"div",5)(2,"header",6),x(3,xe,1,0,"ng-container",7),d(),l(4,"div",8),x(5,Ee,1,0,"ng-container",7)(6,ve,1,0,"ng-container",7),d(),l(7,"div",9),x(8,Oe,1,0,"ng-container",7),d()()(),x(9,Ae,1,1,"ng-template",null,0,O)(11,Ve,5,4,"ng-template",null,1,O)(13,Le,4,12,"ng-template",null,2,O)(15,we,11,12,"ng-template",null,3,O),R(17,"vedius-page-loading",10)),i&2){let u=v(10),m=v(12),_=v(14),I=v(16);o(3),c("ngTemplateOutlet",u),o(2),c("ngTemplateOutlet",m),o(),c("ngTemplateOutlet",_),o(2),c("ngTemplateOutlet",I),o(9),c("active",r.isLoading)}},dependencies:[H,ae,W,Y,$,X,z,pe,D,ue,de,le],styles:[`.disable-text-copies{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.enable-text-copies{-webkit-user-select:text!important;-moz-user-select:text!important;
1-ms-user-select:text!important;user-select:text!important}.icon-circle{width:40px;height:40px;padding:8px;background:#f5f6f8;border-radius:100px;justify-content:center;align-items:center;gap:10px;display:inline-flex;box-sizing:border-box}.change-assistant-subscription-page{padding:40px 0;flex-direction:row;box-sizing:border-box;display:flex;place-content:center;min-height:100vh;background-color:#fff}.change-assistant-subscription-page .container{width:615px;display:flex;flex-direction:column}.change-assistant-subscription-page .container .subscription-header-content{width:100%}.change-assistant-subscription-page .container .first-subscription-body-content{display:flex;flex-direction:column;gap:48px}.change-assistant-subscription-page .container .first-subscription-body-content .text-content .select-plan-container{display:flex;flex-direction:column;gap:16px}.change-assistant-subscription-page .container .first-subscription-body-content .text-content .select-plan-container .title-info{color:#6d7a8e}.change-assistant-subscription-page .container .first-subscription-body-content .text-content .select-plan-container .title-info .bold{font-weight:700}.change-assistant-subscription-page .container .first-subscription-body-content .text-content .title{color:#192840}.change-assistant-subscription-page .container .first-subscription-body-content .text-content .sub-title{color:#425168}.change-assistant-subscription-page .container .subcription-footer-content{width:100%;margin-top:48px;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.change-assistant-subscription-page .container .subcription-footer-content .content-1{display:flex;align-items:flex-start;justify-content:flex-start;flex:1}.change-assistant-subscription-page .container .subcription-footer-content .content-2{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-end;flex:1}@media screen and (max-width: 960px){.change-assistant-subscription-page{padding:32px 24px 24px}.change-assistant-subscription-page .container{width:100%}.change-assistant-subscription-page .container .first-subscription-body-content{gap:40px}.change-assistant-subscription-page .container .subcription-footer-content{gap:8px;margin-top:40px}.change-assistant-subscription-page .container .subcription-footer-content .confirm-subscription-button{min-width:200
1px}}
2`],encapsulation:2});let s=a;return s})();export{ft as ChangeAssistantSubscriptionComponent};

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.