����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 3.141.107.132 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/public_html/public/client/ |
Upload File : |
{"version":3,"sources":["webpack:///src/common/uploads/formatted-file-size.pipe.ts","webpack:///src/common/shared/billing/full-plan-name/full-plan-name.component.ts","webpack:///src/common/shared/billing/guards/billing-enabled-guard.service.ts","webpack:///src/common/billing/upgrade-page/billing-plans-resolver.service.ts","webpack:///src/common/billing/upgrade-page/accepted-payments-header/accepted-payments-header.component.html","webpack:///src/common/billing/upgrade-page/accepted-payments-header/accepted-payments-header.component.ts","webpack:///src/common/billing/upgrade-page/plan-features-list/plan-features-list.component.html","webpack:///src/common/billing/upgrade-page/plan-features-list/plan-features-list.component.ts","webpack:///src/common/billing/upgrade-page/upgrade-page-aside/upgrade-page-aside.component.html","webpack:///src/common/billing/upgrade-page/upgrade-page-aside/upgrade-page-aside.component.ts","webpack:///src/common/billing/upgrade-page/order-summary/order-summary.component.html","webpack:///src/common/billing/upgrade-page/order-summary/order-summary.component.ts","webpack:///src/common/billing/credit-card-form/credit-card-form.component.html","webpack:///src/common/billing/credit-card-form/credit-card-form.component.ts","webpack:///src/common/billing/subscriptions/create-subscription-panel/create-subscription-panel.component.html","webpack:///src/common/billing/subscriptions/create-subscription-panel/create-subscription-panel.component.ts","webpack:///src/common/billing/subscriptions/user-subscription-page/user-subscription-page.component.html","webpack:///src/common/billing/subscriptions/user-subscription-page/user-subscription-page.component.ts","webpack:///src/common/billing/guards/user-subscribed-guard.service.ts","webpack:///src/common/billing/upgrade-page/currencies-list-resolver.service.ts","webpack:///src/common/billing/invoices/invoice.service.ts","webpack:///src/common/billing/invoices/invoice-index/invoice-index.component.html","webpack:///src/common/billing/invoices/invoice-index/invoice-index.component.ts","webpack:///src/common/billing/pricing-page/pricing-page.component.ts","webpack:///src/common/billing/guards/redirect-to-upgrade-page.service.ts","webpack:///src/common/billing/billing-routing.module.ts","webpack:///src/common/billing/pricing-page/pricing-page.component.html","webpack:///src/common/billing/plans/select-plan-panel/select-plan-panel.component.html","webpack:///src/common/billing/plans/select-plan-panel/select-plan-panel.component.ts","webpack:///src/common/billing/plans/select-plan-period-panel/select-plan-period-panel.component.html","webpack:///src/common/billing/plans/select-plan-period-panel/select-plan-period-panel.component.ts","webpack:///src/common/billing/upgrade-page/contact-widget/contact-widget.component.ts","webpack:///src/common/billing/guards/user-not-subscribed-guard.service.ts","webpack:///src/common/billing/billing.module.ts","webpack:///src/common/core/ui/format-pipes/favicon.pipe.ts","webpack:///src/common/billing/upgrade-page/contact-widget/contact-widget.component.html","webpack:///src/common/core/utils/get-favicon-from-url.ts","webpack:///node_modules/@angular/material/__ivy_ngcc__/fesm2015/radio.js","webpack:///src/common/shared/billing/plans.service.ts","webpack:///src/common/shared/billing/full-plan-name/full-plan-name.module.ts"],"names":["FormattedFileSizePipe","precision","bytes","isNaN","parseFloat","String","isFinite","FullPlanNameComponent","i18n","this","plan","name","parent","t","BillingEnabledGuard","settings","router","route","state","handle","get","navigate","BillingPlansResolver","plans","all","order","perPage","pipe","map","response","pagination","data","catchError","navigateByUrl","mergeMap","of","AcceptedPaymentsHeaderComponent","el","acceptedCards","getJson","card","getAssetUrl","toLowerCase","PlanFeaturesListComponent","showCheckIcons","dense","UpgradePageAsideComponent","OrderSummaryComponent","CreditCardFormComponent","subscriptions","currentUser","zone","lazyLoader","toast","theme","created","submitButtonText","showSubmitButton","showOrderSummary","loading$","BehaviorSubject","error$","stripeElements","resetForm","initStripe","destroyStripe","error","next","stripe","createToken","token","message","addCardToUser","stripeToken","addCard","id","finalize","subscribe","assignCurrent","user","emit","errResponse","loadAsset","type","then","Stripe","elements","isDarkMode","selectedTheme$","value","is_dark","forEach","field","create","classes","base","style","color","mount","on","onChange","bind","push","unmount","destroy","change","run","submitForm","CreateSubscriptionPanelComponent","paypal","selectedIndex$","loading","submitText","disablePaypalTab","completed","getSubscription","gateway","planId","status","startLoading","createOnStripe","getNewSubscriptionPayload","completeSubscription","confirmCardPayment","key","Object","keys","errors","open","Default","stopLoading","payment_intent_secret","result","action","onAction","finalizeOnStripe","reference","finalResponse","payload","plan_id","from","renews_at","UserSubscriptionPageComponent","UserSubscribedGuard","CurrenciesListResolver","InvoiceService","modal","activeSubscription$","onGracePeriod","isSubscribed","ends_at","split","title","body","ok","cancel","afterClosed","confirmed","cancelSubscription","resume","setSubscription","subscription","e","delete","params","request","share","updateUserAndSubscription","valueLists","currencies","toPromise","http","InvoiceIndexComponent","PricingPageComponent","RedirectToUpgradePage","BillingRoutingModule","invoices","invoices$","index","userId","invoice","getBaseUrl","uuid","routes","path","component","canActivate","listener","active","isLoggedIn","resolve","canActivateChild","children","forChild","SelectPlanPanelComponent","hasRecommendedPlan","selected","filter","recommended","length","selectInitialPlan","setTimeout","parent_id","hidden","mode","free","model$","userSubscribedToPlan","ContactWidgetComponent","UserNotSubscribedGuard","SelectPlanPeriodPanelComponent","BillingModule","FaviconPipe","showSidebar","baseAmount","getAmountPerDay","amount","Math","ceil","days","interval","interval_count","url","includes","window","location","protocol","host","URL","origin","_c0","_c1","enterDuration","_c2","MAT_RADIO_DEFAULT_OPTIONS","providedIn","factory","nextUniqueId","MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR","provide","useExisting","MatRadioGroup","multi","MatRadioChange","source","MAT_RADIO_GROUP","_MatRadioGroupBase","_changeDetector","_value","_name","_selected","_isInitialized","_labelPosition","_disabled","_required","_controlValueAccessorChangeFn","onTouched","checked","_radios","radio","_markForCheck","markForCheck","fn","isDisabled","disabled","_updateRadioButtonNames","v","_markRadiosForCheck","newValue","_updateSelectedRadioFromValue","_checkSelectedRadioButton","c","ɵfac","ɵdir","inputs","labelPosition","required","outputs","ɵMatRadioGroup_BaseFactory","selectors","contentQueries","rf","ctx","dirIndex","_t","MatRadioButton","hostAttrs","exportAs","features","_MatRadioButtonMixinBase","_elementRef","_MatRadioButtonBase","radioGroup","elementRef","_focusMonitor","_radioDispatcher","_animationMode","_providerOverride","super","_uniqueId","_checked","_removeUniqueSelectionListener","listen","options","focusVia","_inputElement","monitor","focusOrigin","_touch","stopMonitoring","disableRipple","event","stopPropagation","groupValueChanged","_emitChangeEvent","newCheckedState","notify","_setDisabled","_color","viewQuery","first","ariaLabel","ariaLabelledby","ariaDescribedby","changeDetector","focusMonitor","radioDispatcher","animationMode","providerOverride","ɵcmp","hostVars","hostBindings","nativeElement","focus","tabIndex","ngContentSelectors","decls","vars","consts","template","$event","_onInputChange","_onInputClick","_r0","inputId","_isRippleDisabled","directives","styles","encapsulation","changeDetection","MatRadioModule","ɵmod","ɵinj","imports","Plans","BASE_URI","post","put","ids","FullPlanNameModule"],"mappings":"28CACA,8DAMO,iBAAMA,EAAN,gFAC0BC,IAAnBC,EAAmBD,uDAAH,EAAGA,yCACzB,OAAIE,MAAMC,WAAWC,OAAOH,OAAcI,SAASJ,GAAe,IAC3D,YAAYA,EAAOD,OAH3B,K,6CAAMD,I,iDAAAA,EAAqB,U,EAA3B,I,oCCJP,0EAOO,iBAAMO,EAAN,WAGH,WAAoBC,aAAA,KAAAA,OAHjB,oDAMC,GAAOC,KAAKC,KAAZ,CACA,IAAIC,EAAOF,KAAKC,KAAKE,OAASH,KAAKC,KAAKE,OAAOD,KAAOF,KAAKC,KAAKC,KAIhE,OAHAA,EAAO,YAAQF,KAAKD,KAAKK,EAAEF,IAC3BA,GAAQ,IAAMF,KAAKD,KAAKK,EAAE,QACtBJ,KAAKC,KAAKE,SAAQD,GAAQ,KAAOF,KAAKC,KAAKC,MACxCA,OAXR,K,6CAAMJ,GAAqB,Y,uBAArBA,EAAqB,+FAHnB,Q,KAAA,2B,sCAGR,I,4GCHA,iBAAMO,EAAN,WACH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,KAAKkK,KAAKvJ,IAAI8U,EAAMC,SAAU/L,KALtC,0BAQQzF,GACP,OAAOlE,KAAKkK,KAAKvJ,IAAVX,UAAiByV,EAAMC,SAAvB1V,YAAmCkE,MAT3C,6BAYWyF,GACV,OAAO3J,KAAKkK,KAAKyL,KAAKF,EAAMC,SAAU/L,KAbvC,6BAgBWzF,EAAYyF,GACtB,OAAO3J,KAAKkK,KAAK0L,IAAV5V,UAAiByV,EAAMC,SAAvB1V,YAAmCkE,GAAMyF,KAjBjD,6BAoBWkM,GACV,OAAO7V,KAAKkK,KAALlK,iBAAoByV,EAAMC,SAA1B1V,YAAsC6V,MArB9C,6BAyBC,OAAO7V,KAAKkK,KAAKyL,KAAQF,EAAMC,SAAT,aAzBvB,K,OACI,EAAAA,SAAW,e,sCADTD,GAAK,Y,yBAALA,EAAK,QAALA,EAAK,qBAFF,S,EAET,I,oFCCA,iBAAMK,EAAN,wB,8BAAMA,I,oDAAAA,M,EAAN,O","file":"x","sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\nimport { prettyBytes } from '../core/utils/pretty-bytes';\r\n\r\n@Pipe({\r\n name: 'formattedFileSize',\r\n pure: true,\r\n})\r\nexport class FormattedFileSizePipe implements PipeTransform {\r\n transform(bytes: number = 0, precision?: number|string): string {\r\n if (isNaN(parseFloat(String(bytes))) || ! isFinite(bytes)) return '-';\r\n return prettyBytes(bytes, precision);\r\n }\r\n}\r\n","import {ChangeDetectionStrategy, Component, Input} from '@angular/core';\r\nimport {Plan} from '@common/core/types/models/Plan';\r\nimport {Translations} from '@common/core/translations/translations.service';\r\nimport {ucFirst} from '@common/core/utils/uc-first';\r\n\r\n@Component({\r\n selector: 'full-plan-name',\r\n template: '{{getFullPlanName()}}',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FullPlanNameComponent {\r\n @Input() plan: Plan;\r\n\r\n constructor(private i18n: Translations) {}\r\n\r\n public getFullPlanName(): string {\r\n if ( ! this.plan) return;\r\n let name = this.plan.parent ? this.plan.parent.name : this.plan.name;\r\n name = ucFirst(this.i18n.t(name));\r\n name += ' ' + this.i18n.t('Plan');\r\n if (this.plan.parent) name += ': ' + this.plan.name;\r\n return name;\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot, CanActivateChild} from '@angular/router';\r\nimport {Settings} from '@common/core/config/settings.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class BillingEnabledGuard implements CanActivate, CanActivateChild {\r\n constructor(private settings: Settings, private router: Router) {}\r\n\r\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n return this.handle();\r\n }\r\n\r\n canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n return this.handle();\r\n }\r\n\r\n private handle() {\r\n if (this.settings.get('billing.integrated') && this.settings.get('billing.enable')) {\r\n return true;\r\n }\r\n\r\n this.router.navigate(['/']);\r\n return false;\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {Resolve, RouterStateSnapshot, ActivatedRouteSnapshot, Router} from '@angular/router';\r\nimport {catchError, map, mergeMap} from 'rxjs/operators';\r\nimport {EMPTY, Observable, of} from 'rxjs';\r\nimport {Plan} from '@common/core/types/models/Plan';\r\nimport {Plans} from '@common/shared/billing/plans.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class BillingPlansResolver implements Resolve<Plan[]> {\r\n constructor(\r\n private plans: Plans,\r\n private router: Router\r\n ) {}\r\n\r\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Plan[]> {\r\n return this.plans.all({order: 'position|asc', perPage: 30})\r\n .pipe(map(response => response.pagination.data))\r\n .pipe(\r\n catchError(() => {\r\n this.router.navigateByUrl('/');\r\n return EMPTY;\r\n }),\r\n mergeMap((plans: Plan[]) => {\r\n return of(plans);\r\n })\r\n );\r\n }\r\n}\r\n\r\n","<div class=\"text\" trans>Accepted Payment Methods</div>\r\n<div class=\"card-icons\">\r\n <img [src]=\"getCardIcon('paypal')\" *ngIf=\"settings.get('billing.paypal.enable')\">\r\n <img [src]=\"getCardIcon(card)\" *ngFor=\"let card of acceptedCards\">\r\n</div>\r\n","import {ChangeDetectionStrategy, Component, ElementRef, OnInit} from '@angular/core';\r\nimport {Settings} from '@common/core/config/settings.service';\r\n\r\n@Component({\r\n selector: 'accepted-payments-header',\r\n templateUrl: './accepted-payments-header.component.html',\r\n styleUrls: ['./accepted-payments-header.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class AcceptedPaymentsHeaderComponent implements OnInit {\r\n public acceptedCards: string[] = [];\r\n\r\n constructor(public settings: Settings, public el: ElementRef) {}\r\n\r\n ngOnInit() {\r\n this.acceptedCards = this.settings.getJson('billing.accepted_cards', []);\r\n }\r\n\r\n public getCardIcon(card: string) {\r\n return this.settings.getAssetUrl() + 'images/billing/' + card.toLowerCase() + '.png';\r\n }\r\n}\r\n","<ul class=\"unstyled-list\" *ngIf=\"getPlan()\" [class.dense]=\"dense\">\r\n <ng-container *ngIf=\"getPlan().show_permissions\">\r\n <li *ngFor=\"let permission of getPlan().permissions\">\r\n <mat-icon class=\"check-icon\" svgIcon=\"check\" *ngIf=\"showCheckIcons\"></mat-icon>\r\n <span>{{permission.display_name || permission.name}}</span>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"getPlan().features.length\">\r\n <li *ngFor=\"let feature of getPlan().features\">\r\n <mat-icon class=\"check-icon\" svgIcon=\"check\" *ngIf=\"showCheckIcons\"></mat-icon>\r\n <span>{{feature}}</span>\r\n </li>\r\n </ng-container>\r\n</ul>\r\n","import {ChangeDetectionStrategy, Component, Input} from '@angular/core';\r\nimport {Plan} from '@common/core/types/models/Plan';\r\n\r\n@Component({\r\n selector: 'plan-features-list',\r\n templateUrl: './plan-features-list.component.html',\r\n styleUrls: ['./plan-features-list.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class PlanFeaturesListComponent {\r\n @Input() plan: Plan;\r\n @Input() showCheckIcons = false;\r\n @Input() dense = false;\r\n\r\n public getPlan() {\r\n return this.plan.parent || this.plan;\r\n }\r\n}\r\n","<accepted-payments-header></accepted-payments-header>\r\n\r\n<ng-container *ngIf=\"plan\">\r\n <div class=\"selected-plan\">\r\n <div class=\"header\"><full-plan-name [plan]=\"plan\"></full-plan-name></div>\r\n <plan-features-list class=\"plan-features-list\" [plan]=\"plan\" [showCheckIcons]=\"true\" [dense]=\"true\"></plan-features-list>\r\n </div>\r\n\r\n <div class=\"divider\"></div>\r\n\r\n <div class=\"secure-shopping\">\r\n <div class=\"icon-container\">\r\n <mat-icon svgIcon=\"shield-custom\"></mat-icon>\r\n </div>\r\n <div class=\"text\">\r\n <div class=\"primary\" trans>SSL Secure Payment</div>\r\n <div class=\"secondary\" trans>Your information is protected by 256-bit SSL encryption</div>\r\n </div>\r\n </div>\r\n</ng-container>","import {ChangeDetectionStrategy, Component, Input} from '@angular/core';\r\nimport {Plan} from '@common/core/types/models/Plan';\r\n\r\n@Component({\r\n selector: 'upgrade-page-aside',\r\n templateUrl: './upgrade-page-aside.component.html',\r\n styleUrls: ['./upgrade-page-aside.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class UpgradePageAsideComponent {\r\n @Input() plan: Plan;\r\n}\r\n","<ng-container *ngIf=\"state.selectedPlan$ | async as selectedPlan\">\r\n <div class=\"line\">\r\n <div class=\"summary-left\">\r\n <full-plan-name [plan]=\"selectedPlan\"></full-plan-name>\r\n </div>\r\n <div class=\"summary-right\">{{selectedPlan.amount | currency:selectedPlan.currency}}</div>\r\n </div>\r\n\r\n <div class=\"line emphasis\">\r\n <div class=\"summary-left\" trans>Total</div>\r\n <div class=\"summary-right\">{{selectedPlan.amount | currency:selectedPlan.currency}}</div>\r\n </div>\r\n</ng-container>","import {ChangeDetectionStrategy, Component} from '@angular/core';\r\nimport {SubscriptionStepperState} from '@common/billing/subscriptions/subscription-stepper-state.service';\r\n\r\n@Component({\r\n selector: 'order-summary',\r\n templateUrl: './order-summary.component.html',\r\n styleUrls: ['./order-summary.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class OrderSummaryComponent {\r\n constructor(public state: SubscriptionStepperState) {}\r\n}\r\n","<form (ngSubmit)=\"submitForm()\" class=\"card-form many-inputs\" ngNativeValidate>\r\n <div class=\"input-container\">\r\n <label for=\"cardNumber\" trans>Credit or Debit Card</label>\r\n <div id=\"cardNumber\" class=\"fake-input\"></div>\r\n </div>\r\n\r\n <div class=\"input-container\">\r\n <label for=\"cardExpiry\" trans>Card Expiration</label>\r\n <div id=\"cardExpiry\" class=\"fake-input\"></div>\r\n </div>\r\n\r\n <div class=\"input-container\">\r\n <label for=\"cardCvc\" trans>CVC</label>\r\n <div id=\"cardCvc\" class=\"fake-input\"></div>\r\n </div>\r\n\r\n <div class=\"error margin-bottom\" role=\"alert\" *ngIf=\"error$ | async as error\">{{error}}</div>\r\n\r\n <order-summary *ngIf=\"showOrderSummary\"></order-summary>\r\n\r\n <button type=\"submit\" *ngIf=\"showSubmitButton\" mat-raised-button color=\"accent\" [disabled]=\"loading$ | async\">{{submitButtonText | trans}}</button>\r\n</form>\r\n","import {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n NgZone,\r\n OnDestroy,\r\n Output\r\n} from '@angular/core';\r\nimport {finalize} from 'rxjs/operators';\r\nimport {User} from '../../core/types/models/User';\r\nimport {Settings} from '../../core/config/settings.service';\r\nimport {LazyLoaderService} from '../../core/utils/lazy-loader.service';\r\nimport {CurrentUser} from '../../auth/current-user';\r\nimport {Subscriptions} from '../../shared/billing/subscriptions.service';\r\nimport {Toast} from '../../core/ui/toast.service';\r\nimport {ThemeService} from '@common/core/theme.service';\r\nimport {BehaviorSubject} from 'rxjs';\r\nimport {SubscriptionStepperState} from '@common/billing/subscriptions/subscription-stepper-state.service';\r\nimport {BackendErrorResponse} from '@common/core/types/backend-error-response';\r\n\r\n@Component({\r\n selector: 'credit-card-form',\r\n templateUrl: './credit-card-form.component.html',\r\n styleUrls: ['./credit-card-form.component.scss'],\r\n // changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class CreditCardFormComponent implements OnDestroy, AfterViewInit {\r\n\r\n /**\r\n * Event fired when form is submitted and card is added successfully on active gateway.\r\n */\r\n @Output() created: EventEmitter<User> = new EventEmitter();\r\n\r\n /**\r\n * Display text for form submit button.\r\n */\r\n @Input() submitButtonText = 'Submit';\r\n\r\n /**\r\n * Whether form submit button should be shown.\r\n */\r\n @Input() showSubmitButton = true;\r\n\r\n /**\r\n * Whether order summary should be shown in the template.\r\n */\r\n @Input() showOrderSummary = false;\r\n\r\n public loading$ = new BehaviorSubject<boolean>(false);\r\n public error$ = new BehaviorSubject<string>(null);\r\n private stripeElements: stripe.elements.Element[] = [];\r\n\r\n constructor(\r\n private subscriptions: Subscriptions,\r\n private currentUser: CurrentUser,\r\n private settings: Settings,\r\n private zone: NgZone,\r\n private lazyLoader: LazyLoaderService,\r\n private toast: Toast,\r\n private theme: ThemeService,\r\n private state: SubscriptionStepperState,\r\n ) {\r\n this.resetForm();\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.initStripe();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.destroyStripe();\r\n }\r\n\r\n /**\r\n * Submit stripe elements credit card form.\r\n */\r\n public async submitForm() {\r\n this.loading$.next(true);\r\n\r\n const {token, error} = await this.state.stripe.createToken(this.stripeElements[0]);\r\n\r\n if (error) {\r\n this.error$.next(error.message);\r\n this.loading$.next(false);\r\n } else {\r\n this.addCardToUser(token);\r\n }\r\n }\r\n\r\n public addCardToUser(stripeToken: stripe.Token) {\r\n this.loading$.next(true);\r\n this.subscriptions.addCard(stripeToken.id)\r\n .pipe(finalize(() => this.loading$.next(false)))\r\n .subscribe(response => {\r\n this.resetForm();\r\n this.currentUser.assignCurrent(response.user);\r\n this.created.emit(response.user);\r\n }, (errResponse: BackendErrorResponse) => {\r\n this.error$.next(errResponse.message);\r\n });\r\n }\r\n\r\n /**\r\n * Initiate stripe elements credit card form.\r\n */\r\n private initStripe() {\r\n this.lazyLoader.loadAsset('https://js.stripe.com/v3', {type: 'js'}).then(() => {\r\n const fields = ['cardNumber', 'cardExpiry', 'cardCvc'] as stripe.elements.elementsType[];\r\n this.state.stripe = Stripe(this.settings.get('billing.stripe_public_key'));\r\n const elements = this.state.stripe.elements();\r\n\r\n const isDarkMode = this.theme.selectedTheme$.value.is_dark;\r\n fields.forEach(field => {\r\n const el = elements.create(field, {classes: {base: 'base'}, style: {base: {color: isDarkMode ? '#fff' : 'inherit'}}});\r\n el.mount('#' + field);\r\n el.on('change', this.onChange.bind(this));\r\n this.stripeElements.push(el);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Destroy all stripe elements instances.\r\n */\r\n private destroyStripe() {\r\n this.stripeElements.forEach(el => {\r\n el.unmount();\r\n el.destroy();\r\n });\r\n }\r\n\r\n /**\r\n * Fired on stripe element \"change\" event.\r\n */\r\n private onChange(change: stripe.elements.ElementChangeResponse) {\r\n this.zone.run(() => {\r\n this.error$.next(change.error ? change.error.message : null);\r\n });\r\n }\r\n\r\n /**\r\n * Reset credit card form.\r\n */\r\n private resetForm() {\r\n this.error$.next(null);\r\n }\r\n}\r\n","<mat-tab-group [dynamicHeight]=\"true\" color=\"accent\" [selectedIndex]=\"selectedIndex$ | async\">\r\n <mat-tab [label]=\"'Bank Card' | trans\" *ngIf=\"settings.get('billing.stripe.enable')\">\r\n <credit-card-form (created)=\"subscribeOnStripe()\" [submitButtonText]=\"submitText\" [showOrderSummary]=\"true\"></credit-card-form>\r\n </mat-tab>\r\n <mat-tab label=\"Paypal\" [disabled]=\"disablePaypalTab\" *ngIf=\"settings.get('billing.paypal.enable')\">\r\n <div class=\"paypal-tab\">\r\n <p class=\"info\" trans>After clicking the button below, you will be redirected to paypal.com to approve the subscription.</p>\r\n <order-summary></order-summary>\r\n <button mat-raised-button color=\"accent\" (click)=\"subscribeOnPaypal()\" [disabled]=\"loading$ | async\">{{submitText | trans}}</button>\r\n </div>\r\n </mat-tab>\r\n</mat-tab-group>\r\n","import {ChangeDetectionStrategy, Component, EventEmitter, Input, Output} from '@angular/core';\r\nimport {Subscription} from '@common/shared/billing/models/subscription';\r\nimport {Plan} from '@common/core/types/models/Plan';\r\nimport {CreateSubOnStripeResponse, Subscriptions} from '@common/shared/billing/subscriptions.service';\r\nimport {CurrentUser} from '@common/auth/current-user';\r\nimport {PaypalSubscriptions} from '@common/billing/subscriptions/paypal-subscriptions';\r\nimport {Toast} from '@common/core/ui/toast.service';\r\nimport {Settings} from '@common/core/config/settings.service';\r\nimport {User} from '@common/core/types/models/User';\r\nimport {CreditCard} from '@common/billing/upgrade-page/upgrade-page.component';\r\nimport {BehaviorSubject} from 'rxjs';\r\nimport {SubscriptionStepperState} from '@common/billing/subscriptions/subscription-stepper-state.service';\r\nimport {BackendErrorResponse} from '@common/core/types/backend-error-response';\r\nimport {HttpErrors} from '@common/core/http/errors/http-errors.enum';\r\n\r\nexport interface SubscriptionCompletedEvent {\r\n status: 'created'|'updated';\r\n}\r\n\r\ninterface NewSubscriptionPayload {\r\n card?: CreditCard;\r\n start_date?: string;\r\n plan_id: number;\r\n}\r\n\r\n@Component({\r\n selector: 'create-subscription-panel',\r\n templateUrl: './create-subscription-panel.component.html',\r\n styleUrls: ['./create-subscription-panel.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class CreateSubscriptionPanelComponent {\r\n public loading$ = new BehaviorSubject<boolean>(false);\r\n public selectedIndex$ = new BehaviorSubject<number>(0);\r\n\r\n /**\r\n * Fired when subscription creation starts or ends.\r\n */\r\n @Output() loading = new EventEmitter<boolean>();\r\n\r\n /**\r\n * Text for submit purchase button.\r\n */\r\n @Input() submitText = 'Submit Purchase';\r\n\r\n /**\r\n * Whether paypal tab should be disabled.\r\n */\r\n @Input() disablePaypalTab = false;\r\n\r\n /**\r\n * We're changing user subscription from this one.\r\n * Used for prorating the new subscription start date.\r\n */\r\n @Input() from: Subscription;\r\n\r\n /**\r\n * Plan user should be subscribed to.\r\n */\r\n @Input() plan: Plan;\r\n\r\n /**\r\n * Fired when subscription is created or updated.\r\n */\r\n @Output() completed: EventEmitter<SubscriptionCompletedEvent> = new EventEmitter();\r\n\r\n constructor(\r\n private subscriptions: Subscriptions,\r\n private currentUser: CurrentUser,\r\n private paypal: PaypalSubscriptions,\r\n private toast: Toast,\r\n public settings: Settings,\r\n private state: SubscriptionStepperState,\r\n ) {}\r\n\r\n /**\r\n * Subscribe user to current plan on stripe gateway.\r\n */\r\n public subscribeOnStripe() {\r\n // if user is already subscribed to this plan, fire \"updated\" event and bail\r\n if (this.currentUser.getSubscription({gateway: 'stripe', planId: this.plan.id})) {\r\n return this.completed.emit({status: 'updated'});\r\n }\r\n\r\n this.startLoading();\r\n\r\n this.subscriptions.createOnStripe(this.getNewSubscriptionPayload())\r\n .subscribe(response => {\r\n if (response.status === 'complete') {\r\n this.completeSubscription(response.user);\r\n } else {\r\n this.confirmCardPayment(response);\r\n }\r\n }, (errResponse: BackendErrorResponse) => {\r\n const key = Object.keys(errResponse.errors)[0];\r\n this.toast.open(errResponse.errors[key] || HttpErrors.Default);\r\n this.stopLoading();\r\n });\r\n }\r\n\r\n /**\r\n * Confirm card payment via 3D secure.\r\n */\r\n private confirmCardPayment(response: CreateSubOnStripeResponse) {\r\n this.state.stripe.confirmCardPayment(response.payment_intent_secret)\r\n .then(result => {\r\n if (result.error) {\r\n this.stopLoading();\r\n this.toast.open('Card payment was not confirmed.', {action: 'Retry'})\r\n .onAction()\r\n .subscribe(() => {\r\n this.confirmCardPayment(response);\r\n });\r\n } else {\r\n this.subscriptions.finalizeOnStripe(response.reference, response.user.id)\r\n .subscribe(finalResponse => {\r\n this.completeSubscription(finalResponse.user);\r\n });\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Subscribe user to current plan on paypal gateway.\r\n */\r\n public subscribeOnPaypal() {\r\n // if user is already subscribed to this plan, fire \"updated\" event and bail\r\n if (this.currentUser.getSubscription({gateway: 'paypal', planId: this.plan.id})) {\r\n return this.completed.emit({status: 'updated'});\r\n }\r\n\r\n this.startLoading();\r\n\r\n this.paypal.subscribe(this.getNewSubscriptionPayload()).then(user => {\r\n this.completeSubscription(user);\r\n this.selectedIndex$.next(0);\r\n }).catch(message => {\r\n this.stopLoading();\r\n this.toast.open(message || 'There was an issue. Please try again later.');\r\n });\r\n }\r\n\r\n /**\r\n * Get payload for backend for creating a new subscription.\r\n */\r\n private getNewSubscriptionPayload(): NewSubscriptionPayload {\r\n const payload = {plan_id: this.plan.id};\r\n\r\n if (this.from) {\r\n payload['start_date'] = this.from.renews_at;\r\n }\r\n\r\n return payload;\r\n }\r\n\r\n private completeSubscription(user: User) {\r\n this.stopLoading();\r\n this.currentUser.assignCurrent(user);\r\n this.completed.emit({status: 'created'});\r\n }\r\n\r\n private startLoading() {\r\n this.loading$.next(true);\r\n this.loading.emit(true);\r\n }\r\n\r\n private stopLoading() {\r\n this.loading$.next(false);\r\n this.loading.emit(false);\r\n }\r\n}\r\n","<material-navbar [menuPosition]=\"settings.get('vebto.navbar.defaultPosition')\"></material-navbar>\r\n\r\n<div class=\"content container mat-elevation-z1\" *ngIf=\"activeSubscription$ | async as activeSubscription\">\r\n <div class=\"main\">\r\n <div class=\"main-section\">\r\n <div class=\"main-section-title\"><full-plan-name [plan]=\"activeSubscription.plan\"></full-plan-name></div>\r\n <div class=\"main-section-content\">\r\n <ng-container *ngIf=\"canCancel()\">\r\n <p>\r\n {{ 'Your plan will automatically renew on' | trans }}\r\n <strong>{{getFormattedRenewDate() | formattedDate}}</strong>\r\n {{ \"and you'll be charged\" | trans }}\r\n <strong>{{activeSubscription.plan.amount | currency:activeSubscription.plan.currency}}</strong>.\r\n </p>\r\n\r\n <a mat-raised-button color=\"accent\" routerLink=\"/billing/upgrade\" trans>Change Plan</a>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"canResume()\">\r\n <p>{{ 'You are on a grace period until' | trans }} <strong>{{getFormattedEndDate() | formattedDate}}</strong>. {{ 'Your subscription will not automatically resume and you will not be charged' | trans }}.</p>\r\n <p trans>You still have access to your plan's features until this date and you can resume your subscription anytime, by clicking button below.</p>\r\n <button mat-raised-button color=\"accent\" (click)=\"resumeSubscription()\" trans>Resume</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"main-section\" *ngIf=\"canCancel() && canChangePaymentMethod()\">\r\n <div class=\"main-section-title\" trans>Payment Method</div>\r\n <div class=\"main-title-description\" trans>Change your preferred payment method below. You can use a credit card or PayPal.</div>\r\n\r\n <p>{{ 'Current payment Method' | trans }}: <strong>{{activeSubscription.gateway === 'paypal' ? 'PayPal' : ('Credit Card' | trans)}}</strong></p>\r\n\r\n <div class=\"card-preview\" *ngIf=\"activeSubscription.gateway === 'stripe'\">\r\n <div class=\"icon\"><mat-icon svgIcon=\"credit-card\"></mat-icon></div>\r\n <div class=\"info\">{{currentUser.get('card_brand')}} **** {{currentUser.get('card_last_four')}}</div>\r\n </div>\r\n\r\n <create-subscription-panel\r\n (completed)=\"onPaymentMethodChange($event)\"\r\n (loading)=\"loading$.next($event)\"\r\n [plan]=\"getPlan()\"\r\n [from]=\"activeSubscription\"\r\n [disablePaypalTab]=\"activeSubscription.gateway === 'paypal'\"\r\n submitText=\"Change Payment Method\"\r\n ></create-subscription-panel>\r\n </div>\r\n\r\n <div class=\"main-section\" *ngIf=\"canCancel()\">\r\n <div class=\"main-section-title\" trans>Cancel Subscription</div>\r\n\r\n <div class=\"main-section-content\">\r\n <p trans>After cancelling subscription, you will have access to your active plan until your billing period end.</p>\r\n </div>\r\n\r\n <div class=\"main-section-actions\">\r\n <button mat-raised-button color=\"warn\" (click)=\"maybeCancelSubscription()\" trans>Cancel</button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <upgrade-page-aside [plan]=\"getPlan()\"></upgrade-page-aside>\r\n\r\n <loading-indicator class=\"overlay\" [isVisible]=\"loading$ | async\"></loading-indicator>\r\n</div>\r\n\r\n","import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\r\nimport { finalize, share } from 'rxjs/operators';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { Subscription } from '@common/shared/billing/models/subscription';\r\nimport { Settings } from '@common/core/config/settings.service';\r\nimport { Modal } from '@common/core/ui/dialogs/modal.service';\r\nimport { Subscriptions } from '@common/shared/billing/subscriptions.service';\r\nimport { CurrentUser } from '@common/auth/current-user';\r\nimport { Toast } from '@common/core/ui/toast.service';\r\nimport { Plan } from '@common/core/types/models/Plan';\r\nimport { ConfirmModalComponent } from '@common/core/ui/confirm-modal/confirm-modal.component';\r\nimport { SubscriptionCompletedEvent } from '@common/billing/subscriptions/create-subscription-panel/create-subscription-panel.component';\r\nimport { User } from '@common/core/types/models/User';\r\n\r\n@Component({\r\n selector: 'user-subscription-page',\r\n templateUrl: './user-subscription-page.component.html',\r\n styleUrls: ['./user-subscription-page.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class UserSubscriptionPageComponent implements OnInit {\r\n public loading$ = new BehaviorSubject<boolean>(false);\r\n public activeSubscription$ = new BehaviorSubject<Subscription>(null);\r\n\r\n constructor(\r\n public settings: Settings,\r\n private modal: Modal,\r\n private subscriptions: Subscriptions,\r\n public currentUser: CurrentUser,\r\n private toast: Toast,\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.activeSubscription$.next(this.currentUser.getSubscription());\r\n }\r\n\r\n public canResume() {\r\n return this.currentUser.onGracePeriod();\r\n }\r\n\r\n public canCancel() {\r\n return this.currentUser.isSubscribed() && !this.currentUser.onGracePeriod();\r\n }\r\n\r\n public canChangePaymentMethod() {\r\n return this.settings.get('billing.stripe.enable') || this.settings.get('billing.paypal.enable');\r\n }\r\n\r\n public getFormattedEndDate(): string {\r\n if ( ! this.activeSubscription$.value.ends_at) return null;\r\n return this.activeSubscription$.value.ends_at.split(' ')[0];\r\n }\r\n\r\n public getFormattedRenewDate() {\r\n if ( ! this.activeSubscription$.value.renews_at) return null;\r\n return this.activeSubscription$.value.renews_at.split(' ')[0];\r\n }\r\n\r\n public getPlan(): Plan {\r\n return this.activeSubscription$.value.plan;\r\n }\r\n\r\n /**\r\n * Ask user to confirm deletion of selected templates\r\n * and delete selected templates if user confirms.\r\n */\r\n public maybeCancelSubscription() {\r\n this.modal.open(ConfirmModalComponent, {\r\n title: 'Cancel Subscription',\r\n body: 'Are you sure you want to cancel your subscription?',\r\n ok: 'Yes, Cancel',\r\n cancel: 'Go Back'\r\n }).afterClosed().subscribe(confirmed => {\r\n if ( ! confirmed) return;\r\n this.cancelSubscription().subscribe(() => {\r\n this.toast.open('Subscription cancelled.');\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Resume cancelled subscription.\r\n */\r\n public resumeSubscription() {\r\n this.loading$.next(true);\r\n this.subscriptions.resume(this.activeSubscription$.value.id)\r\n .pipe(finalize(() => this.loading$.next(false)))\r\n .subscribe(response => {\r\n this.currentUser.setSubscription(response.subscription);\r\n this.activeSubscription$.next(this.currentUser.getSubscription());\r\n this.toast.open('Subscription resumed.');\r\n });\r\n }\r\n\r\n /**\r\n * Called after user payment method for active subscription has been changed successfully.\r\n */\r\n public onPaymentMethodChange(e: SubscriptionCompletedEvent) {\r\n // if we've only changed customer card information on same\r\n // payment gateway, show success message and bail\r\n if (e.status === 'updated') {\r\n this.toast.open('Payment method updated.');\r\n return;\r\n }\r\n\r\n this.loading$.next(true);\r\n\r\n // otherwise cancel user's subscription on the other gateway\r\n this.cancelSubscription({delete: true}).subscribe(() => {\r\n this.toast.open('Payment method updated.');\r\n });\r\n }\r\n\r\n /**\r\n * Cancel currently active user subscription.\r\n */\r\n private cancelSubscription(params: {delete?: boolean} = {}): Observable<{user: User}> {\r\n this.loading$.next(true);\r\n\r\n const request = this.subscriptions.cancel(this.activeSubscription$.value.id, {delete: params.delete})\r\n .pipe(finalize(() => this.loading$.next(false)))\r\n .pipe(share());\r\n\r\n request.subscribe(response => {\r\n // set new active subscription, if user had more then one\r\n this.updateUserAndSubscription(response.user);\r\n });\r\n\r\n return request;\r\n }\r\n\r\n /**\r\n * Update current user and active subscription.\r\n */\r\n private updateUserAndSubscription(user: User) {\r\n this.currentUser.assignCurrent(user);\r\n this.activeSubscription$.next(this.currentUser.getSubscription());\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot, CanActivateChild} from '@angular/router';\r\nimport {CurrentUser} from '../../auth/current-user';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UserSubscribedGuard implements CanActivate, CanActivateChild {\r\n\r\n constructor(private currentUser: CurrentUser, private router: Router) {}\r\n\r\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n return this.handle();\r\n }\r\n\r\n canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n return this.handle();\r\n }\r\n\r\n private handle() {\r\n if (this.currentUser.isSubscribed()) { return true; }\r\n\r\n this.router.navigate(['/billing/upgrade']);\r\n\r\n return false;\r\n }\r\n}","import {Injectable} from '@angular/core';\r\nimport {Resolve, RouterStateSnapshot, ActivatedRouteSnapshot} from '@angular/router';\r\nimport {map} from 'rxjs/operators';\r\nimport {ValueLists} from '../../core/services/value-lists.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CurrenciesListResolver implements Resolve<any> {\r\n constructor(private valueLists: ValueLists) {}\r\n\r\n resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<any> {\r\n return this.valueLists.get(['currencies']).pipe(map(response => response.currencies)).toPromise();\r\n }\r\n}\r\n\r\n","import {Injectable} from '@angular/core';\nimport {AppHttpClient} from '@common/core/http/app-http-client.service';\nimport {BackendResponse} from '@common/core/types/backend-response';\nimport {Invoice} from '@common/billing/invoices/invoice';\n\nconst BASE_URI = 'billing/invoice';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class InvoiceService {\n constructor(private http: AppHttpClient) {\n }\n\n public index(params: {userId?: number} = {}): BackendResponse<{invoices: Invoice[]}> {\n return this.http.get(`${BASE_URI}`, params);\n }\n}\n","<material-navbar [menuPosition]=\"settings.get('vebto.navbar.defaultPosition')\"></material-navbar>\n\n<div class=\"container\">\n <h1 trans>Your Payment History</h1>\n\n <table class=\"material-table\">\n <thead>\n <tr>\n <th trans>Date</th>\n <th trans>Amount</th>\n <th trans>Status</th>\n <th trans>Invoice</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let invoice of invoices$ | async\">\n <td>{{invoice.created_at | formattedDate}}</td>\n <td>{{invoice.subscription.plan.currency_symbol + invoice.subscription.plan.amount}}</td>\n <td>{{invoice.paid ? 'Paid' : 'Pending'}}</td>\n <td>\n <a [href]=\"getInvoiceUrl(invoice)\" target=\"_blank\" trans>View</a>\n </td>\n </tr>\n </tbody>\n </table>\n <no-results-message svgImage=\"receipt.svg\" *ngIf=\"!(invoices$ | async).length && !(loading$ | async)\">\n <span primary-text trans>You do not have any invoices yet.</span>\n </no-results-message>\n</div>\n","import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';\nimport {InvoiceService} from '@common/billing/invoices/invoice.service';\nimport {Invoice} from '@common/billing/invoices/invoice';\nimport {BehaviorSubject} from 'rxjs';\nimport {Settings} from '@common/core/config/settings.service';\nimport {finalize} from 'rxjs/operators';\nimport {CurrentUser} from '@common/auth/current-user';\n\n@Component({\n selector: 'invoice-index',\n templateUrl: './invoice-index.component.html',\n styleUrls: ['./invoice-index.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class InvoiceIndexComponent implements OnInit {\n public invoices$ = new BehaviorSubject<Invoice[]>([]);\n public loading$ = new BehaviorSubject<boolean>(false);\n\n constructor(\n private invoices: InvoiceService,\n public settings: Settings,\n private currentUser: CurrentUser,\n ) {}\n\n ngOnInit() {\n this.loading$.next(true);\n this.invoices.index({userId: this.currentUser.get('id')})\n .pipe(finalize(() => this.loading$.next(false)))\n .subscribe(response => {\n this.invoices$.next(response.invoices);\n });\n }\n\n public getInvoiceUrl(invoice: Invoice) {\n return this.settings.getBaseUrl(true) + 'secure/billing/invoice/' + invoice.uuid;\n }\n}\n","import { Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'pricing-page',\n templateUrl: './pricing-page.component.html',\n styleUrls: ['./pricing-page.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PricingPageComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import {Injectable} from '@angular/core';\r\nimport {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot} from '@angular/router';\r\nimport {CurrentUser} from '../../auth/current-user';\r\nimport {AppearanceListenerService} from '../../shared/appearance/appearance-listener.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class RedirectToUpgradePage implements CanActivate {\r\n constructor(\r\n private currentUser: CurrentUser,\r\n private router: Router,\r\n private listener: AppearanceListenerService,\r\n ) {}\r\n\r\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n if (this.listener.active) {\r\n return true;\r\n }\r\n if (this.currentUser.isSubscribed()) {\r\n this.router.navigate(['billing/subscription']);\r\n return false;\r\n } else if (this.currentUser.isLoggedIn()) {\r\n this.router.navigate(['billing/upgrade']);\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\n","import {Route, RouterModule} from '@angular/router';\r\nimport {UpgradePageComponent} from './upgrade-page/upgrade-page.component';\r\nimport {NgModule} from '@angular/core';\r\nimport {BillingPlansResolver} from './upgrade-page/billing-plans-resolver.service';\r\nimport {UserSubscriptionPageComponent} from './subscriptions/user-subscription-page/user-subscription-page.component';\r\nimport {CurrenciesListResolver} from './upgrade-page/currencies-list-resolver.service';\r\nimport {UserSubscribedGuard} from './guards/user-subscribed-guard.service';\r\nimport {AuthGuard} from '../guards/auth-guard.service';\r\nimport {BillingEnabledGuard} from '../shared/billing/guards/billing-enabled-guard.service';\r\nimport {InvoiceIndexComponent} from '@common/billing/invoices/invoice-index/invoice-index.component';\r\nimport {CheckPermissionsGuard} from '@common/guards/check-permissions-guard.service';\r\nimport {PricingPageComponent} from '@common/billing/pricing-page/pricing-page.component';\r\nimport {RedirectToUpgradePage} from '@common/billing/guards/redirect-to-upgrade-page.service';\r\n\r\nexport const routes: Route[] = [\r\n {\r\n path: 'pricing',\r\n component: PricingPageComponent,\r\n canActivate: [BillingEnabledGuard, RedirectToUpgradePage],\r\n resolve: {\r\n plans: BillingPlansResolver,\r\n currencies: CurrenciesListResolver\r\n }\r\n },\r\n {\r\n path: '',\r\n canActivate: [BillingEnabledGuard, AuthGuard, CheckPermissionsGuard],\r\n canActivateChild: [CheckPermissionsGuard],\r\n children: [\r\n {\r\n path: 'upgrade',\r\n component: UpgradePageComponent,\r\n resolve: {\r\n plans: BillingPlansResolver,\r\n currencies: CurrenciesListResolver\r\n }\r\n },\r\n {\r\n path: 'subscription',\r\n component: UserSubscriptionPageComponent,\r\n resolve: { plans: BillingPlansResolver },\r\n canActivate: [UserSubscribedGuard],\r\n data: { name: 'subscription' }\r\n },\r\n {\r\n path: 'invoices',\r\n component: InvoiceIndexComponent,\r\n canActivate: [UserSubscribedGuard],\r\n },\r\n ]\r\n }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class BillingRoutingModule {}\r\n","<upgrade-page mode=\"pricing\"></upgrade-page>","<div class=\"plans\" [class.has-recommended]=\"hasRecommendedPlan\">\r\n <div class=\"plan\" *ngFor=\"let plan of getAllPlans(); last as last; first as first\" [class.recommended]=\"plan.recommended\" [class.last]=\"last\" [class.first]=\"first\">\r\n <div class=\"name\">{{plan.name}}</div>\r\n <div class=\"price-box\" *ngIf=\"!plan.free\">\r\n <span class=\"number\">{{plan.amount | currency:plan.currency}}</span>\r\n <span class=\"interval\"> / {{plan.interval | trans}}</span>\r\n </div>\r\n <div class=\"price-box\" *ngIf=\"plan.free\" trans>Free</div>\r\n <plan-features-list [plan]=\"plan\"></plan-features-list>\r\n <button class=\"select-plan-button\" (click)=\"selectPlan(plan)\" mat-raised-button color=\"accent\" *ngIf=\"plan.recommended\" [disabled]=\"userSubscribedToPlan(plan)\">\r\n {{ selectPlanButtonText(plan) | trans }}\r\n </button>\r\n <button class=\"select-plan-button\" (click)=\"selectPlan(plan)\" mat-stroked-button color=\"accent\" *ngIf=\"!plan.recommended\" [disabled]=\"userSubscribedToPlan(plan)\">\r\n {{ selectPlanButtonText(plan) | trans }}\r\n </button>\r\n </div>\r\n</div>\r\n","import {ChangeDetectionStrategy, Component, EventEmitter, OnInit, Output} from '@angular/core';\r\nimport {SubscriptionStepperState} from '../../subscriptions/subscription-stepper-state.service';\r\nimport {Plan} from '@common/core/types/models/Plan';\r\nimport { CurrentUser } from '@common/auth/current-user';\r\n\r\n@Component({\r\n selector: 'select-plan-panel',\r\n templateUrl: './select-plan-panel.component.html',\r\n styleUrls: ['./select-plan-panel.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SelectPlanPanelComponent implements OnInit {\r\n public hasRecommendedPlan = false;\r\n @Output() selected = new EventEmitter();\r\n\r\n constructor(\r\n public state: SubscriptionStepperState,\r\n public currentUser: CurrentUser,\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.hasRecommendedPlan = this.state.plans.filter(plan => plan.recommended).length > 0;\r\n }\r\n\r\n public selectPlan(plan: Plan) {\r\n this.state.selectInitialPlan(plan);\r\n // fire event on next render to avoid race conditions\r\n setTimeout(() => this.selected.emit(plan));\r\n }\r\n\r\n public getAllPlans() {\r\n return this.state.plans.filter(plan => !plan.parent_id && !plan.hidden);\r\n }\r\n\r\n public userSubscribedToPlan(plan: Plan): boolean {\r\n if (this.state.mode !== 'pricing' && plan.free && !this.currentUser.model$?.value?.subscriptions?.length) {\r\n return true;\r\n }\r\n return !!this.currentUser.getSubscription({planId: plan.id});\r\n }\r\n\r\n public selectPlanButtonText(plan: Plan) {\r\n if (this.userSubscribedToPlan(plan)) {\r\n return 'Your Current Plan';\r\n } else if (plan.free && this.state.mode === 'pricing') {\r\n return 'Get Started';\r\n } else {\r\n return 'Choose Plan';\r\n }\r\n }\r\n}\r\n","<div class=\"subscription-period-step step-container\" *ngIf=\"state.initialPlan$ | async as initialPlan\">\r\n <div class=\"left-col\">\r\n <div class=\"title\" trans>Select the duration of your plan. Longer plans offer better discounts!</div>\r\n <mat-radio-group class=\"periods\" [(ngModel)]=\"state.radioGroupModel\" (change)=\"state.selectPlanById(state.radioGroupModel)\">\r\n <div class=\"radio-button-wrapper no-label\">\r\n <mat-radio-button [value]=\"initialPlan.id\" class=\"period\" color=\"accent\">\r\n <div class=\"radio-button-content\">\r\n <div class=\"name\">1 {{initialPlan.interval | trans}} {{ 'subscription' | trans }}:</div>\r\n <div class=\"price\">{{initialPlan.amount | currency:initialPlan.currency}}/{{initialPlan.interval | trans}}</div>\r\n </div>\r\n </mat-radio-button>\r\n </div>\r\n <div class=\"radio-button-wrapper\" *ngFor=\"let plan of state.getChildPlans(initialPlan)\">\r\n <ng-container *ngIf=\"state.selectedPlan$ | async as selectedPlan\">\r\n <div class=\"savings-label\">{{'Save' | trans}} {{getPlanSavings(selectedPlan.parent || selectedPlan, plan)}}%</div>\r\n </ng-container>\r\n <mat-radio-button [value]=\"plan.id\" class=\"period\" color=\"accent\">\r\n <div class=\"radio-button-content\">\r\n <div class=\"name\">{{plan.name | trans}}:</div>\r\n <div class=\"price\">{{getAmountForSingleInterval(plan) | currency:plan.currency}}/{{(plan.interval || initialPlan.interval) | trans}}</div>\r\n </div>\r\n </mat-radio-button>\r\n </div>\r\n </mat-radio-group>\r\n\r\n <div class=\"actions\">\r\n <button mat-button matStepperPrevious trans>Back</button>\r\n <button mat-raised-button color=\"accent\" (click)=\"selected.emit()\">\r\n {{ (state.mode === 'changePlan' ? 'Change Plan' : 'Select') | trans }}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <upgrade-page-aside *ngIf=\"showSidebar\" [plan]=\"state.selectedPlan$ | async\" class=\"right-col\"></upgrade-page-aside>\r\n</div>\r\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport { SubscriptionStepperState } from '../../subscriptions/subscription-stepper-state.service';\r\nimport { Plan } from '@common/core/types/models/Plan';\r\n\r\n@Component({\r\n selector: 'select-plan-period-panel',\r\n templateUrl: './select-plan-period-panel.component.html',\r\n styleUrls: ['./select-plan-period-panel.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SelectPlanPeriodPanelComponent {\r\n @Input() showSidebar = false;\r\n @Output() selected = new EventEmitter();\r\n\r\n constructor(\r\n public state: SubscriptionStepperState,\r\n ) {}\r\n\r\n public getPlanSavings(base: Plan, parent: Plan): number {\r\n const baseAmount = this.getAmountPerDay(base);\r\n const amount = this.getAmountPerDay(parent);\r\n const savings = (baseAmount - amount) / baseAmount * 100;\r\n return Math.ceil(savings);\r\n }\r\n\r\n private getAmountPerDay(plan: Plan) {\r\n let days = 1;\r\n if (plan.interval === 'week') {\r\n days = 7;\r\n } else if (plan.interval === 'month') {\r\n days = 30;\r\n } else if (plan.interval === 'year') {\r\n days = 365;\r\n }\r\n days = days * plan.interval_count;\r\n return plan.amount / days;\r\n }\r\n\r\n public getAmountForSingleInterval(plan: Plan) {\r\n return plan.amount / plan.interval_count;\r\n }\r\n}\r\n","import {ChangeDetectionStrategy, Component} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'contact-widget',\r\n templateUrl: './contact-widget.component.html',\r\n styleUrls: ['./contact-widget.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ContactWidgetComponent {}\r\n","import {Injectable} from '@angular/core';\r\nimport {CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot, CanActivateChild} from '@angular/router';\r\nimport {CurrentUser} from '../../auth/current-user';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UserNotSubscribedGuard implements CanActivate, CanActivateChild {\r\n\r\n constructor(private currentUser: CurrentUser, private router: Router) {}\r\n\r\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n return this.handle();\r\n }\r\n\r\n canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n return this.handle();\r\n }\r\n\r\n private handle() {\r\n if ( ! this.currentUser.isSubscribed()) { return true; }\r\n\r\n this.router.navigate(['/billing/subscription']);\r\n\r\n return false;\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatRadioModule } from '@angular/material/radio';\r\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\r\nimport { MatStepperModule } from '@angular/material/stepper';\r\nimport { MatTabsModule } from '@angular/material/tabs';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { UpgradePageComponent } from './upgrade-page/upgrade-page.component';\r\nimport { BillingPlansResolver } from './upgrade-page/billing-plans-resolver.service';\r\nimport { BillingRoutingModule } from './billing-routing.module';\r\nimport { PlanFeaturesListComponent } from './upgrade-page/plan-features-list/plan-features-list.component';\r\nimport { OrderSummaryComponent } from './upgrade-page/order-summary/order-summary.component';\r\nimport { AcceptedPaymentsHeaderComponent } from './upgrade-page/accepted-payments-header/accepted-payments-header.component';\r\nimport { UserSubscriptionPageComponent } from './subscriptions/user-subscription-page/user-subscription-page.component';\r\nimport { UpgradePageAsideComponent } from './upgrade-page/upgrade-page-aside/upgrade-page-aside.component';\r\nimport { CurrenciesListResolver } from './upgrade-page/currencies-list-resolver.service';\r\nimport { CreditCardFormComponent } from './credit-card-form/credit-card-form.component';\r\nimport { PaypalSubscriptions } from './subscriptions/paypal-subscriptions';\r\nimport { SelectPlanPanelComponent } from './plans/select-plan-panel/select-plan-panel.component';\r\nimport { SelectPlanPeriodPanelComponent } from './plans/select-plan-period-panel/select-plan-period-panel.component';\r\nimport { SubscriptionStepperState } from './subscriptions/subscription-stepper-state.service';\r\nimport { UserNotSubscribedGuard } from './guards/user-not-subscribed-guard.service';\r\nimport { UserSubscribedGuard } from './guards/user-subscribed-guard.service';\r\nimport { CreateSubscriptionPanelComponent } from './subscriptions/create-subscription-panel/create-subscription-panel.component';\r\nimport { ContactWidgetComponent } from './upgrade-page/contact-widget/contact-widget.component';\r\nimport { FullPlanNameModule } from '../shared/billing/full-plan-name/full-plan-name.module';\r\nimport { InvoiceIndexComponent } from '@common/billing/invoices/invoice-index/invoice-index.component';\r\nimport { PricingPageComponent } from './pricing-page/pricing-page.component';\r\nimport { MaterialNavbarModule } from '@common/core/ui/material-navbar/material-navbar.module';\r\nimport { TranslationsModule } from '@common/core/translations/translations.module';\r\nimport { FormatPipesModule } from '@common/core/ui/format-pipes/format-pipes.module';\r\nimport { NoResultsMessageModule } from '@common/core/ui/no-results-message/no-results-message.module';\r\nimport { LoadingIndicatorModule } from '@common/core/ui/loading-indicator/loading-indicator.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MaterialNavbarModule,\r\n BillingRoutingModule,\r\n FullPlanNameModule,\r\n TranslationsModule,\r\n FormatPipesModule,\r\n NoResultsMessageModule,\r\n LoadingIndicatorModule,\r\n\r\n // material\r\n MatButtonModule,\r\n MatIconModule,\r\n MatSnackBarModule,\r\n MatCheckboxModule,\r\n MatTooltipModule,\r\n MatDialogModule,\r\n MatStepperModule,\r\n MatProgressBarModule,\r\n MatTabsModule,\r\n MatRadioModule,\r\n ],\r\n declarations: [\r\n UpgradePageComponent,\r\n PlanFeaturesListComponent,\r\n OrderSummaryComponent,\r\n AcceptedPaymentsHeaderComponent,\r\n UserSubscriptionPageComponent,\r\n UpgradePageAsideComponent,\r\n CreditCardFormComponent,\r\n CreateSubscriptionPanelComponent,\r\n SelectPlanPanelComponent,\r\n SelectPlanPeriodPanelComponent,\r\n ContactWidgetComponent,\r\n InvoiceIndexComponent,\r\n PricingPageComponent,\r\n ],\r\n providers: [\r\n BillingPlansResolver,\r\n CurrenciesListResolver,\r\n PaypalSubscriptions,\r\n SubscriptionStepperState,\r\n SubscriptionStepperState,\r\n UserNotSubscribedGuard,\r\n UserSubscribedGuard,\r\n ],\r\n exports: [\r\n BillingRoutingModule,\r\n ]\r\n})\r\nexport class BillingModule {\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {getFaviconFromUrl} from '@common/core/utils/get-favicon-from-url';\n\n@Pipe({\n name: 'favicon'\n})\nexport class FaviconPipe implements PipeTransform {\n transform(url: string): string {\n if (!url) {\n return null;\n }\n if (url.includes('youtube')) {\n return 'https://www.youtube.com/s/desktop/ca54e1bd/img/favicon.ico';\n } else {\n return getFaviconFromUrl(url);\n }\n }\n}\n","<mat-icon svgIcon=\"question-answer\" class=\"icon\"></mat-icon>\r\n\r\n<div class=\"title\" trans>Do you have any questions about PRO accounts?</div>\r\n<div class=\"subtitle\" trans>Our support team will be happy to assist you.</div>\r\n<a mat-raised-button color=\"accent\" target=\"_blank\" routerLink=\"/contact\" trans>Contact Us</a>","import {isAbsoluteUrl} from '@common/core/utils/is-absolute-url';\r\n\r\nexport function getFaviconFromUrl(url: string) {\r\n if ( ! url) {\r\n return null;\r\n }\r\n // relative url to current site\r\n if ( ! isAbsoluteUrl(url)) {\r\n url = window.location.protocol + '//' + window.location.host;\r\n }\r\n const domain = new URL(url).origin;\r\n return 'https://www.google.com/s2/favicons?domain=' + domain;\r\n}\r\n","import { InjectionToken, forwardRef, EventEmitter, Directive, ChangeDetectorRef, Output, Input, ContentChildren, ElementRef, ViewChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, NgModule } from '@angular/core';\nimport { mixinDisableRipple, mixinTabIndex, MatRippleModule, MatCommonModule } from '@angular/material/core';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/cdk/a11y';\nimport * as ɵngcc2 from '@angular/cdk/collections';\nimport * as ɵngcc3 from '@angular/material/core';\n\nconst _c0 = [\"input\"];\nconst _c1 = function () { return { enterDuration: 150 }; };\nconst _c2 = [\"*\"];\nconst MAT_RADIO_DEFAULT_OPTIONS = new InjectionToken('mat-radio-default-options', {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY\n});\nfunction MAT_RADIO_DEFAULT_OPTIONS_FACTORY() {\n return {\n color: 'accent'\n };\n}\n// Increasing integer for generating unique ids for radio components.\nlet nextUniqueId = 0;\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nconst MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true\n};\n/** Change event object emitted by MatRadio and MatRadioGroup. */\nclass MatRadioChange {\n constructor(\n /** The MatRadioButton that emits the change event. */\n source, \n /** The value of the MatRadioButton. */\n value) {\n this.source = source;\n this.value = value;\n }\n}\n/**\n * Injection token that can be used to inject instances of `MatRadioGroup`. It serves as\n * alternative token to the actual `MatRadioGroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nconst MAT_RADIO_GROUP = new InjectionToken('MatRadioGroup');\n/**\n * Base class with all of the `MatRadioGroup` functionality.\n * @docs-private\n */\nclass _MatRadioGroupBase {\n constructor(_changeDetector) {\n this._changeDetector = _changeDetector;\n /** Selected value for the radio group. */\n this._value = null;\n /** The HTML name attribute applied to radio buttons in this group. */\n this._name = `mat-radio-group-${nextUniqueId++}`;\n /** The currently selected radio button. Should match value. */\n this._selected = null;\n /** Whether the `value` has been set to its initial value. */\n this._isInitialized = false;\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n this._labelPosition = 'after';\n /** Whether the radio group is disabled. */\n this._disabled = false;\n /** Whether the radio group is required. */\n this._required = false;\n /** The method to be called in order to update ngModel */\n this._controlValueAccessorChangeFn = () => { };\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n this.onTouched = () => { };\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as `<input type-\"radio\">`).\n */\n this.change = new EventEmitter();\n }\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n get name() { return this._name; }\n set name(value) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n get labelPosition() {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n get value() { return this._value; }\n set value(newValue) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n get selected() { return this._selected; }\n set selected(selected) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n /** Whether the radio group is disabled */\n get disabled() { return this._disabled; }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n /** Whether the radio group is required */\n get required() { return this._required; }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n }\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n _updateRadioButtonNames() {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n /** Updates the `selected` radio button from the internal _value state. */\n _updateSelectedRadioFromValue() {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent() {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected, this._value));\n }\n }\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn) {\n this._controlValueAccessorChangeFn = fn;\n }\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn) {\n this.onTouched = fn;\n }\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n}\n_MatRadioGroupBase.ɵfac = function _MatRadioGroupBase_Factory(t) { return new (t || _MatRadioGroupBase)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef)); };\n_MatRadioGroupBase.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: _MatRadioGroupBase, inputs: { name: \"name\", labelPosition: \"labelPosition\", value: \"value\", selected: \"selected\", disabled: \"disabled\", required: \"required\", color: \"color\" }, outputs: { change: \"change\" } });\n_MatRadioGroupBase.ctorParameters = () => [\n { type: ChangeDetectorRef }\n];\n_MatRadioGroupBase.propDecorators = {\n change: [{ type: Output }],\n color: [{ type: Input }],\n name: [{ type: Input }],\n labelPosition: [{ type: Input }],\n value: [{ type: Input }],\n selected: [{ type: Input }],\n disabled: [{ type: Input }],\n required: [{ type: Input }]\n};\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(_MatRadioGroupBase, [{\n type: Directive\n }], function () { return [{ type: ɵngcc0.ChangeDetectorRef }]; }, { change: [{\n type: Output\n }], name: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], value: [{\n type: Input\n }], selected: [{\n type: Input\n }], disabled: [{\n type: Input\n }], required: [{\n type: Input\n }], color: [{\n type: Input\n }] }); })();\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\nclass MatRadioGroup extends _MatRadioGroupBase {\n}\nMatRadioGroup.ɵfac = function MatRadioGroup_Factory(t) { return ɵMatRadioGroup_BaseFactory(t || MatRadioGroup); };\nMatRadioGroup.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: MatRadioGroup, selectors: [[\"mat-radio-group\"]], contentQueries: function MatRadioGroup_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n ɵngcc0.ɵɵcontentQuery(dirIndex, MatRadioButton, true);\n } if (rf & 2) {\n var _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._radios = _t);\n } }, hostAttrs: [\"role\", \"radiogroup\", 1, \"mat-radio-group\"], exportAs: [\"matRadioGroup\"], features: [ɵngcc0.ɵɵProvidersFeature([\n MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,\n { provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup },\n ]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nMatRadioGroup.propDecorators = {\n _radios: [{ type: ContentChildren, args: [forwardRef(() => MatRadioButton), { descendants: true },] }]\n};\nconst ɵMatRadioGroup_BaseFactory = /*@__PURE__*/ ɵngcc0.ɵɵgetInheritedFactory(MatRadioGroup);\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(MatRadioGroup, [{\n type: Directive,\n args: [{\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [\n MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,\n { provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup },\n ],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-radio-group'\n }\n }]\n }], null, { _radios: [{\n type: ContentChildren,\n args: [forwardRef(() => MatRadioButton), { descendants: true }]\n }] }); })();\n// Boilerplate for applying mixins to MatRadioButton.\n/** @docs-private */\nclass MatRadioButtonBase {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}\n// As per Material design specifications the selection control radio should use the accent color\n// palette by default. https://material.io/guidelines/components/selection-controls.html\nconst _MatRadioButtonMixinBase = mixinDisableRipple(mixinTabIndex(MatRadioButtonBase));\n/**\n * Base class with all of the `MatRadioButton` functionality.\n * @docs-private\n */\nclass _MatRadioButtonBase extends _MatRadioButtonMixinBase {\n constructor(radioGroup, elementRef, _changeDetector, _focusMonitor, _radioDispatcher, _animationMode, _providerOverride) {\n super(elementRef);\n this._changeDetector = _changeDetector;\n this._focusMonitor = _focusMonitor;\n this._radioDispatcher = _radioDispatcher;\n this._animationMode = _animationMode;\n this._providerOverride = _providerOverride;\n this._uniqueId = `mat-radio-${++nextUniqueId}`;\n /** The unique ID for the radio button. */\n this.id = this._uniqueId;\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as `<input type-\"radio\">`).\n */\n this.change = new EventEmitter();\n /** Whether this radio is checked. */\n this._checked = false;\n /** Value assigned to this radio. */\n this._value = null;\n /** Unregister function for _radioDispatcher */\n this._removeUniqueSelectionListener = () => { };\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n this._removeUniqueSelectionListener =\n _radioDispatcher.listen((id, name) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n /** Whether this radio button is checked. */\n get checked() { return this._checked; }\n set checked(value) {\n const newCheckedState = coerceBooleanProperty(value);\n if (this._checked !== newCheckedState) {\n this._checked = newCheckedState;\n if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n }\n else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n if (newCheckedState) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n /** The value of this radio button. */\n get value() { return this._value; }\n set value(value) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n get labelPosition() {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n /** Whether the radio button is disabled. */\n get disabled() {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value) {\n this._setDisabled(coerceBooleanProperty(value));\n }\n /** Whether the radio button is required. */\n get required() {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n /** Theme color of the radio button. */\n get color() {\n return this._color ||\n (this.radioGroup && this.radioGroup.color) ||\n this._providerOverride && this._providerOverride.color || 'accent';\n }\n set color(newValue) { this._color = newValue; }\n /** ID of the native input element inside `<mat-radio-button>` */\n get inputId() { return `${this.id || this._uniqueId}-input`; }\n /** Focuses the radio button. */\n focus(options) {\n this._focusMonitor.focusVia(this._inputElement, 'keyboard', options);\n }\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n }\n ngAfterViewInit() {\n this._focusMonitor\n .monitor(this._elementRef, true)\n .subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n /** Dispatch change event with current value. */\n _emitChangeEvent() {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n _onInputClick(event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `radio-button` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n /**\n * Triggered when the radio button received a click or the input recognized any change.\n * Clicking on a label element, will trigger a change event on the associated input.\n */\n _onInputChange(event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n /** Sets the disabled state and marks for check if a change occurred. */\n _setDisabled(value) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._changeDetector.markForCheck();\n }\n }\n}\n_MatRadioButtonBase.ɵfac = function _MatRadioButtonBase_Factory(t) { return new (t || _MatRadioButtonBase)(ɵngcc0.ɵɵdirectiveInject(_MatRadioGroupBase), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc1.FocusMonitor), ɵngcc0.ɵɵdirectiveInject(ɵngcc2.UniqueSelectionDispatcher), ɵngcc0.ɵɵdirectiveInject(String), ɵngcc0.ɵɵdirectiveInject(undefined)); };\n_MatRadioButtonBase.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: _MatRadioButtonBase, viewQuery: function _MatRadioButtonBase_Query(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵviewQuery(_c0, true);\n } if (rf & 2) {\n var _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx._inputElement = _t.first);\n } }, inputs: { id: \"id\", checked: \"checked\", value: \"value\", labelPosition: \"labelPosition\", disabled: \"disabled\", required: \"required\", color: \"color\", name: \"name\", ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"] }, outputs: { change: \"change\" }, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\n_MatRadioButtonBase.ctorParameters = () => [\n { type: _MatRadioGroupBase },\n { type: ElementRef },\n { type: ChangeDetectorRef },\n { type: FocusMonitor },\n { type: UniqueSelectionDispatcher },\n { type: String },\n { type: undefined }\n];\n_MatRadioButtonBase.propDecorators = {\n id: [{ type: Input }],\n name: [{ type: Input }],\n ariaLabel: [{ type: Input, args: ['aria-label',] }],\n ariaLabelledby: [{ type: Input, args: ['aria-labelledby',] }],\n ariaDescribedby: [{ type: Input, args: ['aria-describedby',] }],\n checked: [{ type: Input }],\n value: [{ type: Input }],\n labelPosition: [{ type: Input }],\n disabled: [{ type: Input }],\n required: [{ type: Input }],\n color: [{ type: Input }],\n change: [{ type: Output }],\n _inputElement: [{ type: ViewChild, args: ['input',] }]\n};\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(_MatRadioButtonBase, [{\n type: Directive\n }], function () { return [{ type: _MatRadioGroupBase }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.ChangeDetectorRef }, { type: ɵngcc1.FocusMonitor }, { type: ɵngcc2.UniqueSelectionDispatcher }, { type: String }, { type: undefined }]; }, { id: [{\n type: Input\n }], change: [{\n type: Output\n }], checked: [{\n type: Input\n }], value: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], disabled: [{\n type: Input\n }], required: [{\n type: Input\n }], color: [{\n type: Input\n }], name: [{\n type: Input\n }], ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaDescribedby: [{\n type: Input,\n args: ['aria-describedby']\n }], _inputElement: [{\n type: ViewChild,\n args: ['input']\n }] }); })();\n/**\n * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.\n */\nclass MatRadioButton extends _MatRadioButtonBase {\n constructor(radioGroup, elementRef, changeDetector, focusMonitor, radioDispatcher, animationMode, providerOverride) {\n super(radioGroup, elementRef, changeDetector, focusMonitor, radioDispatcher, animationMode, providerOverride);\n }\n}\nMatRadioButton.ɵfac = function MatRadioButton_Factory(t) { return new (t || MatRadioButton)(ɵngcc0.ɵɵdirectiveInject(MAT_RADIO_GROUP, 8), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc1.FocusMonitor), ɵngcc0.ɵɵdirectiveInject(ɵngcc2.UniqueSelectionDispatcher), ɵngcc0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8), ɵngcc0.ɵɵdirectiveInject(MAT_RADIO_DEFAULT_OPTIONS, 8)); };\nMatRadioButton.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: MatRadioButton, selectors: [[\"mat-radio-button\"]], hostAttrs: [1, \"mat-radio-button\"], hostVars: 17, hostBindings: function MatRadioButton_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"focus\", function MatRadioButton_focus_HostBindingHandler() { return ctx._inputElement.nativeElement.focus(); });\n } if (rf & 2) {\n ɵngcc0.ɵɵattribute(\"tabindex\", 0 - 1)(\"id\", ctx.id)(\"aria-label\", null)(\"aria-labelledby\", null)(\"aria-describedby\", null);\n ɵngcc0.ɵɵclassProp(\"mat-radio-checked\", ctx.checked)(\"mat-radio-disabled\", ctx.disabled)(\"_mat-animation-noopable\", ctx._animationMode === \"NoopAnimations\")(\"mat-primary\", ctx.color === \"primary\")(\"mat-accent\", ctx.color === \"accent\")(\"mat-warn\", ctx.color === \"warn\");\n } }, inputs: { disableRipple: \"disableRipple\", tabIndex: \"tabIndex\" }, exportAs: [\"matRadioButton\"], features: [ɵngcc0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c2, decls: 13, vars: 19, consts: [[1, \"mat-radio-label\"], [\"label\", \"\"], [1, \"mat-radio-container\"], [1, \"mat-radio-outer-circle\"], [1, \"mat-radio-inner-circle\"], [\"type\", \"radio\", 1, \"mat-radio-input\", \"cdk-visually-hidden\", 3, \"id\", \"checked\", \"disabled\", \"tabIndex\", \"required\", \"change\", \"click\"], [\"input\", \"\"], [\"mat-ripple\", \"\", 1, \"mat-radio-ripple\", \"mat-focus-indicator\", 3, \"matRippleTrigger\", \"matRippleDisabled\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\"], [1, \"mat-ripple-element\", \"mat-radio-persistent-ripple\"], [1, \"mat-radio-label-content\"], [2, \"display\", \"none\"]], template: function MatRadioButton_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵprojectionDef();\n ɵngcc0.ɵɵelementStart(0, \"label\", 0, 1);\n ɵngcc0.ɵɵelementStart(2, \"div\", 2);\n ɵngcc0.ɵɵelement(3, \"div\", 3);\n ɵngcc0.ɵɵelement(4, \"div\", 4);\n ɵngcc0.ɵɵelementStart(5, \"input\", 5, 6);\n ɵngcc0.ɵɵlistener(\"change\", function MatRadioButton_Template_input_change_5_listener($event) { return ctx._onInputChange($event); })(\"click\", function MatRadioButton_Template_input_click_5_listener($event) { return ctx._onInputClick($event); });\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementStart(7, \"div\", 7);\n ɵngcc0.ɵɵelement(8, \"div\", 8);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementStart(9, \"div\", 9);\n ɵngcc0.ɵɵelementStart(10, \"span\", 10);\n ɵngcc0.ɵɵtext(11, \"\\u00A0\");\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵprojection(12);\n ɵngcc0.ɵɵelementEnd();\n ɵngcc0.ɵɵelementEnd();\n } if (rf & 2) {\n const _r0 = ɵngcc0.ɵɵreference(1);\n ɵngcc0.ɵɵattribute(\"for\", ctx.inputId);\n ɵngcc0.ɵɵadvance(5);\n ɵngcc0.ɵɵproperty(\"id\", ctx.inputId)(\"checked\", ctx.checked)(\"disabled\", ctx.disabled)(\"tabIndex\", ctx.tabIndex)(\"required\", ctx.required);\n ɵngcc0.ɵɵattribute(\"name\", ctx.name)(\"value\", ctx.value)(\"aria-label\", ctx.ariaLabel)(\"aria-labelledby\", ctx.ariaLabelledby)(\"aria-describedby\", ctx.ariaDescribedby);\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵproperty(\"matRippleTrigger\", _r0)(\"matRippleDisabled\", ctx._isRippleDisabled())(\"matRippleCentered\", true)(\"matRippleRadius\", 20)(\"matRippleAnimation\", ɵngcc0.ɵɵpureFunction0(18, _c1));\n ɵngcc0.ɵɵadvance(2);\n ɵngcc0.ɵɵclassProp(\"mat-radio-label-before\", ctx.labelPosition == \"before\");\n } }, directives: [ɵngcc3.MatRipple], styles: [\".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\\n\"], encapsulation: 2, changeDetection: 0 });\nMatRadioButton.ctorParameters = () => [\n { type: MatRadioGroup, decorators: [{ type: Optional }, { type: Inject, args: [MAT_RADIO_GROUP,] }] },\n { type: ElementRef },\n { type: ChangeDetectorRef },\n { type: FocusMonitor },\n { type: UniqueSelectionDispatcher },\n { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_RADIO_DEFAULT_OPTIONS,] }] }\n];\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(MatRadioButton, [{\n type: Component,\n args: [{\n selector: 'mat-radio-button',\n template: \"<!-- TODO(jelbourn): render the radio on either side of the content -->\\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\\n<label [attr.for]=\\\"inputId\\\" class=\\\"mat-radio-label\\\" #label>\\n <!-- The actual 'radio' part of the control. -->\\n <div class=\\\"mat-radio-container\\\">\\n <div class=\\\"mat-radio-outer-circle\\\"></div>\\n <div class=\\\"mat-radio-inner-circle\\\"></div>\\n <input #input class=\\\"mat-radio-input cdk-visually-hidden\\\" type=\\\"radio\\\"\\n [id]=\\\"inputId\\\"\\n [checked]=\\\"checked\\\"\\n [disabled]=\\\"disabled\\\"\\n [tabIndex]=\\\"tabIndex\\\"\\n [attr.name]=\\\"name\\\"\\n [attr.value]=\\\"value\\\"\\n [required]=\\\"required\\\"\\n [attr.aria-label]=\\\"ariaLabel\\\"\\n [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n [attr.aria-describedby]=\\\"ariaDescribedby\\\"\\n (change)=\\\"_onInputChange($event)\\\"\\n (click)=\\\"_onInputClick($event)\\\">\\n\\n <!-- The ripple comes after the input so that we can target it with a CSS\\n sibling selector when the input is focused. -->\\n <div mat-ripple class=\\\"mat-radio-ripple mat-focus-indicator\\\"\\n [matRippleTrigger]=\\\"label\\\"\\n [matRippleDisabled]=\\\"_isRippleDisabled()\\\"\\n [matRippleCentered]=\\\"true\\\"\\n [matRippleRadius]=\\\"20\\\"\\n [matRippleAnimation]=\\\"{enterDuration: 150}\\\">\\n\\n <div class=\\\"mat-ripple-element mat-radio-persistent-ripple\\\"></div>\\n </div>\\n </div>\\n\\n <!-- The label content for radio control. -->\\n <div class=\\\"mat-radio-label-content\\\" [class.mat-radio-label-before]=\\\"labelPosition == 'before'\\\">\\n <!-- Add an invisible span so JAWS can read the label -->\\n <span style=\\\"display:none\\\"> </span>\\n <ng-content></ng-content>\\n </div>\\n</label>\\n\",\n inputs: ['disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRadioButton',\n host: {\n 'class': 'mat-radio-button',\n '[class.mat-radio-checked]': 'checked',\n '[class.mat-radio-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n '[class.mat-primary]': 'color === \"primary\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n // Needs to be -1 so the `focus` event still fires.\n '[attr.tabindex]': '-1',\n '[attr.id]': 'id',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n styles: [\".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\\n\"]\n }]\n }], function () { return [{ type: MatRadioGroup, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_RADIO_GROUP]\n }] }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.ChangeDetectorRef }, { type: ɵngcc1.FocusMonitor }, { type: ɵngcc2.UniqueSelectionDispatcher }, { type: String, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ANIMATION_MODULE_TYPE]\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_RADIO_DEFAULT_OPTIONS]\n }] }]; }, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass MatRadioModule {\n}\nMatRadioModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: MatRadioModule });\nMatRadioModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function MatRadioModule_Factory(t) { return new (t || MatRadioModule)(); }, imports: [[MatRippleModule, MatCommonModule], MatCommonModule] });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(MatRadioModule, { declarations: function () { return [MatRadioGroup, MatRadioButton]; }, imports: function () { return [MatRippleModule, MatCommonModule]; }, exports: function () { return [MatRadioGroup, MatRadioButton, MatCommonModule]; } }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(MatRadioModule, [{\n type: NgModule,\n args: [{\n imports: [MatRippleModule, MatCommonModule],\n exports: [MatRadioGroup, MatRadioButton, MatCommonModule],\n declarations: [MatRadioGroup, MatRadioButton]\n }]\n }], null, null); })();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_RADIO_DEFAULT_OPTIONS, MAT_RADIO_DEFAULT_OPTIONS_FACTORY, MAT_RADIO_GROUP, MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, MatRadioButton, MatRadioChange, MatRadioGroup, MatRadioModule, _MatRadioButtonBase, _MatRadioGroupBase };\n\n//# sourceMappingURL=radio.js.map","import { Injectable } from '@angular/core';\r\nimport { AppHttpClient } from '../../core/http/app-http-client.service';\r\nimport { PaginatedBackendResponse } from '../../core/types/pagination/paginated-backend-response';\r\nimport { BackendResponse } from '@common/core/types/backend-response';\r\nimport { Plan } from '@common/core/types/models/Plan';\r\nimport { PaginationParams } from '@common/core/types/pagination/pagination-params';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class Plans {\r\n static BASE_URI = 'billing-plan';\r\n constructor(private http: AppHttpClient) {}\r\n\r\n public all(params?: PaginationParams): PaginatedBackendResponse<Plan> {\r\n return this.http.get(Plans.BASE_URI, params);\r\n }\r\n\r\n public get(id: number): BackendResponse<{plan: Plan}> {\r\n return this.http.get(`${Plans.BASE_URI}/${id}`);\r\n }\r\n\r\n public create(params: object): BackendResponse<{plan: Plan}> {\r\n return this.http.post(Plans.BASE_URI, params);\r\n }\r\n\r\n public update(id: number, params: object): BackendResponse<{plan: Plan}> {\r\n return this.http.put(`${Plans.BASE_URI}/${id}`, params);\r\n }\r\n\r\n public delete(ids: number[]): BackendResponse<void> {\r\n return this.http.delete(`${Plans.BASE_URI}/${ids}`);\r\n }\r\n\r\n public sync(): BackendResponse<void> {\r\n return this.http.post(`${Plans.BASE_URI}/sync`);\r\n }\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport {FullPlanNameComponent} from './full-plan-name.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n FullPlanNameComponent,\r\n ],\r\n exports: [\r\n FullPlanNameComponent,\r\n ]\r\n})\r\nexport class FullPlanNameModule {}\r\n"]}