����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 18.220.98.157 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/upgrade-page/currencies-list-resolver.service.ts","webpack:///src/common/billing/guards/user-subscribed-guard.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/pricing-page/pricing-page.component.html","webpack:///src/common/billing/billing-routing.module.ts","webpack:///src/common/billing/guards/redirect-to-upgrade-page.service.ts","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/guards/user-not-subscribed-guard.service.ts","webpack:///src/common/billing/upgrade-page/contact-widget/contact-widget.component.ts","webpack:///src/common/billing/upgrade-page/contact-widget/contact-widget.component.html","webpack:///src/common/core/ui/format-pipes/favicon.pipe.ts","webpack:///src/common/core/utils/get-favicon-from-url.ts","webpack:///src/common/billing/billing.module.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","bytes","precision","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","next","token","error","stripe","createToken","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","catch","payload","plan_id","from","renews_at","UserSubscriptionPageComponent","modal","activeSubscription$","onGracePeriod","isSubscribed","ends_at","split","title","body","ok","cancel","afterClosed","confirmed","cancelSubscription","resume","setSubscription","subscription","e","delete","params","request","share","updateUserAndSubscription","CurrenciesListResolver","valueLists","currencies","toPromise","UserSubscribedGuard","InvoiceService","http","InvoiceIndexComponent","invoices","invoices$","index","userId","invoice","getBaseUrl","uuid","PricingPageComponent","routes","path","component","canActivate","RedirectToUpgradePage","listener","active","isLoggedIn","resolve","canActivateChild","children","BillingRoutingModule","forChild","SelectPlanPanelComponent","hasRecommendedPlan","selected","filter","recommended","length","selectInitialPlan","setTimeout","parent_id","hidden","mode","free","model$","userSubscribedToPlan","SelectPlanPeriodPanelComponent","showSidebar","baseAmount","getAmountPerDay","amount","Math","ceil","days","interval","interval_count","UserNotSubscribedGuard","ContactWidgetComponent","FaviconPipe","url","includes","window","location","protocol","host","URL","origin","BillingModule","_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","_updateRadioButtonNames","v","_markRadiosForCheck","newValue","_updateSelectedRadioFromValue","_checkSelectedRadioButton","checked","c","_radios","radio","_markForCheck","markForCheck","fn","isDisabled","disabled","ɵfac","ɵdir","inputs","labelPosition","required","outputs","ɵMatRadioGroup_BaseFactory","selectors","contentQueries","rf","ctx","dirIndex","_t","MatRadioButton","hostAttrs","exportAs","features","MatRadioButtonBase","_elementRef","_MatRadioButtonMixinBase","_MatRadioButtonBase","radioGroup","elementRef","_focusMonitor","_radioDispatcher","_animationMode","_providerOverride","super","_uniqueId","_checked","_removeUniqueSelectionListener","listen","newCheckedState","notify","_setDisabled","_color","options","focusVia","_inputElement","monitor","focusOrigin","_touch","stopMonitoring","disableRipple","event","stopPropagation","groupValueChanged","_emitChangeEvent","undefined","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":"6FACA,8DAMO,Y,MAAMA,EACT,UAAUC,EAAgB,EAAGC,GACzB,OAAIC,MAAMC,WAAWC,OAAOJ,OAAcK,SAASL,GAAe,IAC3D,YAAYA,EAAOC,I,6CAHrBF,I,iDAAAA,EAAqB,U,GAA3B,I,oCCJP,0EAOO,Y,MAAMO,EAGT,YAAoBC,GAAA,KAAAA,OAEb,kBACH,IAAOC,KAAKC,KAAM,OAClB,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,G,6CAXFJ,GAAqB,Y,uBAArBA,EAAqB,+FAHnB,Q,KAAA,2B,uCAGR,I,4GCHA,Y,MAAMO,EACT,YAAoBC,EAA4BC,G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,KAAKmK,KAAK4L,IAAI,GAAGH,EAAMC,YAAY3R,IAAMuF,GAG7C,OAAOuM,GACV,OAAOhW,KAAKmK,KAAKX,OAAO,GAAGoM,EAAMC,YAAYG,KAG1C,OACH,OAAOhW,KAAKmK,KAAK2L,KAAQF,EAAMC,SAAT,U,OAxBnB,EAAAA,SAAW,e,sCADTD,GAAK,Y,yBAALA,EAAK,QAALA,EAAK,qBAFF,S,GAET,I,oFCCA,Y,MAAMK,G,8BAAAA,I,oDAAAA,M,GAAN","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 {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';\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';\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","<upgrade-page mode=\"pricing\"></upgrade-page>","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","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","<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 {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 {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","<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 {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","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 { 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 { 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"]}