1import{a as l,b as d}from"./chunk-YAIVQ4SQ.js";import{j as r}from"./chunk-YFR6M5MQ.js";import"./chunk-3QDDXVT5.js";import"./chunk-IA7P7NEI.js";import"@angular/core";import{CommonModule as y}from"@angular/common";import*as e from"@angular/core";import"@angular/core";import*as o from"@angular/core";import*as s from"@angular/common/http";var p=(()=>{class n{http;appApi;baseUrl;constructor(t,i){this.http=t,this.appApi=i,this.baseUrl=this.appApi.getBaseURL(l.NAV)}getCancelDelayInfo(){return this.http.get(`${this.baseUrl}/AccountStatus/cancel-delay`).pipe(r(t=>{let i=t?.data??t?.Data;return this.toLowerCaseKeys(i)}))}toLowerCaseKeys(t){return!t||typeof t!="object"?t:Array.isArray(t)?t.map(i=>this.toLowerCaseKeys(i)):Object.keys(t).reduce((i,a)=>{let f=a.charAt(0).toLowerCase()+a.slice(1);return i[f]=this.toLowerCaseKeys(t[a]),i},{})}static \u0275fac=function(i){return new(i||n)(o.\u0275\u0275inject(s.HttpClient),o.\u0275\u0275inject(d))};static \u0275prov=o.\u0275\u0275defineInjectable({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();import*as _ from"@angular/router";import*as m from"@angular/common";function g(n,c){if(n&1){let t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"button",11),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);let a=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(a.onRescindCancellation())}),e.\u0275\u0275text(1," Rescind Cancellation "),e.\u0275\u0275elementEnd()}}function C(n,c){if(n&1){let t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",3)(1,"div",4)(2,"h2",5),e.\u0275\u0275text(3,"Rescind Cancellation"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"p",6),e.\u0275\u0275text(5," Your account is set to be cancelled on "),e.\u0275\u0275elementStart(6,"strong"),e.\u0275\u0275text(7),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(8,'. If you would like to continue using your account, click "Rescind Cancellation" below. '),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(9,"p",7),e.\u0275\u0275text(10," Note: Accounts that have been cancelled for more than 1 year may not be reactivated. "),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(11,"div",8),e.\u0275\u0275template(12,g,2,0,"button",9),e.\u0275\u0275elementStart(13,"button",10),e.\u0275\u0275listener("click",function(){e.\u0275\u0275restoreView(t);let a=e.\u0275\u0275nextContext();return e.\u0275\u0275resetView(a.onContinueToAccount())}),e.\u0275\u0275text(14," Continue to account "),e.\u0275\u0275elementEnd()()()()}if(n&2){let t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(7),e.\u0275\u0275textInterpolate(t.formattedDate),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",!t.info.isSubUser)}}function x(n,c){n&1&&(e.\u0275\u0275elementStart(0,"div",12)(1,"p"),e.\u0275\u0275text(2,"Loading..."),e.\u0275\u0275elementEnd()())}function h(n,c){if(n&1&&(e.\u0275\u0275elementStart(0,"div",13)(1,"p"),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd()()),n&2){let t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(t.error)}}var A=(()=>{class n{accountStatusService;router;info=null;loading=!0;error="";constructor(t,i){this.accountStatusService=t,this.router=i}ngOnInit(){this.accountStatusService.getCancelDelayInfo().subscribe({next:t=>{this.info=t,this.loading=!1},error:t=>{this.error="Failed to load account information.",this.loading=!1,console.error("Cancel delay info error:",t)}})}onRescindCancellation(){this.info?.billingUrl&&(window.location.href=this.info.billingUrl)}onContinueToAccount(){this.router.navigate(["/home"])}get formattedDate(){return this.info?.nextChargeDate?new Date(this.info.nextChargeDate).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}):""}static \u0275fac=function(i){return new(i||n)(e.\u0275\u0275directiveInject(p),e.\u0275\u0275directiveInject(_.Router))};static \u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["app-cancel-delay"]],decls:3,vars:3,consts:[["class","cancel-delay",4,"ngIf"],["class","cancel-delay__loading",4,"ngIf"],["class","cancel-delay__error",4,"ngIf"],[1,"cancel-delay"],[1,"cancel-delay__card"],[1,"cancel-delay__title"],[1,"cancel-delay__message"],[1,"cancel-delay__note"],[1,"cancel-delay__actions"],["class","cancel-delay__btn cancel-delay__btn--primary",3,"click",4,"ngIf"],[1,"cancel-delay__btn","cancel-delay__btn--secondary",3,"click"],[1,"cancel-delay__btn","cancel-delay__btn--primary",3,"click"],[1,"cancel-delay__loading"],[1,"cancel-delay__error"]],template:function(i,a){i&1&&e.\u0275\u0275template(0,C,15,2,"div",0)(1,x,3,0,"div",1)(2,h,3,1,"div",2),i&2&&(e.\u0275\u0275property("ngIf",!a.loading&&a.info),e.\u0275\u0275advance(),e.\u0275\u0275property("ngIf",a.loading),e.\u0275\u0275advance(),e.\u0275\u0275property("ngIf",a.error))},dependencies:[y,m.NgIf],styles:[`@charset "UTF-8";.cancel-delay[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;min-height:100vh;background:#f5f6fa;padding:20px}.cancel-delay__card[_ngcontent-%COMP%]{background:#fff;border-radius:8px;box-shadow:0 2px 10px #00000014;padding:40px;max-width:520px;width:100%;text-align:center}.cancel-delay__title[_ngcontent-%COMP%]{font-size:22px;font-weight:600;color:#333;margin-bottom:16px}.cancel-delay__message[_ngcontent-%COMP%]{font-size:14px;color:#555;line-height:1.6;margin-bottom:12px}.cancel-delay__note[_ngcontent-%COMP%]{font-size:13px;color:#888;margin-bottom:24px}.cancel-delay__actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;align-items:center}.cancel-delay__btn[_ngcontent-%COMP%]{padding:10px 24px;border:none;border-radius:4px;font-size:14px;cursor:pointer;
1min-width:200px}.cancel-delay__btn--primary[_ngcontent-%COMP%]{background:#4a90d9;color:#fff}.cancel-delay__btn--primary[_ngcontent-%COMP%]:hover{background:#3a7fc8}.cancel-delay__btn--secondary[_ngcontent-%COMP%]{background:transparent;color:#4a90d9;border:1px solid #4a90d9}.cancel-delay__btn--secondary[_ngcontent-%COMP%]:hover{background:#f0f6ff}.cancel-delay__loading[_ngcontent-%COMP%], .cancel-delay__error[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;min-height:100vh;font-size:16px;color:#666}.cancel-delay__error[_ngcontent-%COMP%]{color:#d32f2f} 2/*# sourceMappingURL=cancel-delay.component-FTO2NR4T.css.map */`]})}return n})();export{A as CancelDelayComponent}; 3//# sourceMappingURL=chunk-JM6BQDVX.js.map
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.