@stratusjs/angular 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/environment', '@stratusjs/angularjs/services/model', '@stratusjs/angularjs/services/registry', '@stratusjs/core/events/eventManager', 'html2pdf', 'font-awesome', 'froala-plugins', 'froala-embedly', 'froala-font-awesome', 'froala-image-tui', 'froala-editor', '@stratusjs/core/misc', '@agentepsilon/decko', '@stratusjs/angularjs/services/collection', 'zone.js/dist/zone'], (function (exports) {
1
+ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/environment', '@stratusjs/angularjs/services/model', '@stratusjs/angularjs/services/registry', '@stratusjs/core/events/eventManager', 'html2pdf', 'font-awesome', 'froala-plugins', 'froala-embedly', 'froala-font-awesome', 'froala-image-tui', 'froala-editor', '@stratusjs/core/misc', '@stratusjs/angularjs/services/collection', '@agentepsilon/decko', 'zone.js/dist/zone'], (function (exports) {
2
2
  'use strict';
3
- var Stratus, _, uniqueId$3, snakeCase, head, isEmpty, isUndefined, isString, extend, cookie, Model, Registry, EventManager$1, FroalaEditor, isJSON, debounce$1;
3
+ var Stratus, _, uniqueId$3, snakeCase, head, isEmpty, isUndefined, isString, extend, isNil, includes, set, isObject$1, assignIn, cookie, Model, Registry, EventManager$1, FroalaEditor, isJSON, Collection, debounce$1;
4
4
  return {
5
5
  setters: [function (module) {
6
6
  Stratus = module.Stratus;
7
7
  }, function (module) {
8
- _ = module.default;
8
+ _ = module["default"];
9
9
  uniqueId$3 = module.uniqueId;
10
10
  snakeCase = module.snakeCase;
11
11
  head = module.head;
@@ -13,6 +13,11 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
13
13
  isUndefined = module.isUndefined;
14
14
  isString = module.isString;
15
15
  extend = module.extend;
16
+ isNil = module.isNil;
17
+ includes = module.includes;
18
+ set = module.set;
19
+ isObject$1 = module.isObject;
20
+ assignIn = module.assignIn;
16
21
  }, function (module) {
17
22
  cookie = module.cookie;
18
23
  }, function (module) {
@@ -21,13 +26,15 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
21
26
  Registry = module.Registry;
22
27
  }, function (module) {
23
28
  EventManager$1 = module.EventManager;
24
- }, null, null, null, null, null, null, function (module) {
25
- FroalaEditor = module.default;
29
+ }, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function (module) {
30
+ FroalaEditor = module["default"];
26
31
  }, function (module) {
27
32
  isJSON = module.isJSON;
33
+ }, function (module) {
34
+ Collection = module.Collection;
28
35
  }, function (module) {
29
36
  debounce$1 = module.debounce;
30
- }, null, null],
37
+ }, function () {}],
31
38
  execute: (function () {
32
39
 
33
40
  /******************************************************************************
@@ -72,7 +79,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
72
79
  return __assign.apply(this, arguments);
73
80
  };
74
81
 
75
- function __awaiter$2(thisArg, _arguments, P, generator) {
82
+ function __awaiter$8(thisArg, _arguments, P, generator) {
76
83
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
77
84
  return new (P || (P = Promise))(function (resolve, reject) {
78
85
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -1545,7 +1552,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
1545
1552
  function process$1(asyncIterable, subscriber) {
1546
1553
  var asyncIterable_1, asyncIterable_1_1;
1547
1554
  var e_2, _a;
1548
- return __awaiter$2(this, void 0, void 0, function () {
1555
+ return __awaiter$8(this, void 0, void 0, function () {
1549
1556
  var value, e_2_1;
1550
1557
  return __generator(this, function (_b) {
1551
1558
  switch (_b.label) {
@@ -10738,14 +10745,14 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
10738
10745
  *
10739
10746
  * @publicApi
10740
10747
  */
10741
- let Version$1 = class Version {
10748
+ class Version$1 {
10742
10749
  constructor(full) {
10743
10750
  this.full = full;
10744
10751
  this.major = full.split('.')[0];
10745
10752
  this.minor = full.split('.')[1];
10746
10753
  this.patch = full.split('.').slice(2).join('.');
10747
10754
  }
10748
- };
10755
+ }
10749
10756
  /**
10750
10757
  * @publicApi
10751
10758
  */
@@ -55642,23 +55649,23 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
55642
55649
  },] }
55643
55650
  ];
55644
55651
 
55645
- var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55652
+ var __decorate$m = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55646
55653
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55647
55654
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55648
55655
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
55649
55656
  return c > 3 && r && Object.defineProperty(target, key, r), r;
55650
55657
  };
55651
- var __metadata$e = (undefined && undefined.__metadata) || function (k, v) {
55658
+ var __metadata$k = (undefined && undefined.__metadata) || function (k, v) {
55652
55659
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
55653
55660
  };
55654
- var __param$6 = (undefined && undefined.__param) || function (paramIndex, decorator) {
55661
+ var __param$7 = (undefined && undefined.__param) || function (paramIndex, decorator) {
55655
55662
  return function (target, key) { decorator(target, key, paramIndex); }
55656
55663
  };
55657
55664
  const systemDir$c = '@stratusjs/angular';
55658
55665
  const moduleName$d = 'citation-dialog';
55659
55666
  const parentModuleName$6 = 'editor';
55660
- const min$c = !cookie('env') ? '.min' : '';
55661
- const localDir$d = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$c}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
55667
+ const min$g = !cookie('env') ? '.min' : '';
55668
+ const localDir$h = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$c}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
55662
55669
  let CitationDialogComponent = exports('CitationDialogComponent', class CitationDialogComponent extends ResponsiveComponent {
55663
55670
  constructor(dialogRef, data, fb, snackBar, iconRegistry, sanitizer, ref) {
55664
55671
  super();
@@ -55680,7 +55687,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
55680
55687
  ngOnInit() {
55681
55688
  this.uid = uniqueId$3(`sa_${snakeCase(moduleName$d)}_component_`);
55682
55689
  Stratus.Instances[this.uid] = this;
55683
- Stratus.Internals.CssLoader(`${localDir$d}${parentModuleName$6}/${moduleName$d}.component${min$c}.css`);
55690
+ Stratus.Internals.CssLoader(`${localDir$h}${parentModuleName$6}/${moduleName$d}.component${min$g}.css`);
55684
55691
  this.model = this.data.model;
55685
55692
  this.property = this.data.property;
55686
55693
  this.editor = this.data.editor;
@@ -55795,26 +55802,26 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
55795
55802
  return uid;
55796
55803
  }
55797
55804
  });
55798
- exports('CitationDialogComponent', CitationDialogComponent = __decorate$g([
55805
+ exports('CitationDialogComponent', CitationDialogComponent = __decorate$m([
55799
55806
  Component({
55800
55807
  selector: `sa-${moduleName$d}`,
55801
- templateUrl: `${localDir$d}/${parentModuleName$6}/${moduleName$d}.component${min$c}.html`,
55808
+ templateUrl: `${localDir$h}/${parentModuleName$6}/${moduleName$d}.component${min$g}.html`,
55802
55809
  }),
55803
- __param$6(1, Inject(MAT_DIALOG_DATA)),
55804
- __metadata$e("design:paramtypes", [MatDialogRef, Object, FormBuilder,
55810
+ __param$7(1, Inject(MAT_DIALOG_DATA)),
55811
+ __metadata$k("design:paramtypes", [MatDialogRef, Object, FormBuilder,
55805
55812
  MatSnackBar,
55806
55813
  MatIconRegistry,
55807
55814
  DomSanitizer,
55808
55815
  ChangeDetectorRef])
55809
55816
  ], CitationDialogComponent));
55810
55817
 
55811
- var __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55818
+ var __decorate$l = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55812
55819
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55813
55820
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55814
55821
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
55815
55822
  return c > 3 && r && Object.defineProperty(target, key, r), r;
55816
55823
  };
55817
- var __metadata$d = (undefined && undefined.__metadata) || function (k, v) {
55824
+ var __metadata$j = (undefined && undefined.__metadata) || function (k, v) {
55818
55825
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
55819
55826
  };
55820
55827
  let BackendService = exports('BackendService', class BackendService {
@@ -55863,30 +55870,30 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
55863
55870
  });
55864
55871
  }
55865
55872
  });
55866
- exports('BackendService', BackendService = __decorate$f([
55873
+ exports('BackendService', BackendService = __decorate$l([
55867
55874
  Injectable({
55868
55875
  providedIn: 'root'
55869
55876
  }),
55870
- __metadata$d("design:paramtypes", [HttpClient])
55877
+ __metadata$j("design:paramtypes", [HttpClient])
55871
55878
  ], BackendService));
55872
55879
 
55873
- var __decorate$e = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55880
+ var __decorate$k = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
55874
55881
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
55875
55882
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
55876
55883
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
55877
55884
  return c > 3 && r && Object.defineProperty(target, key, r), r;
55878
55885
  };
55879
- var __metadata$c = (undefined && undefined.__metadata) || function (k, v) {
55886
+ var __metadata$i = (undefined && undefined.__metadata) || function (k, v) {
55880
55887
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
55881
55888
  };
55882
- var __param$5 = (undefined && undefined.__param) || function (paramIndex, decorator) {
55889
+ var __param$6 = (undefined && undefined.__param) || function (paramIndex, decorator) {
55883
55890
  return function (target, key) { decorator(target, key, paramIndex); }
55884
55891
  };
55885
55892
  const systemDir$b = '@stratusjs/angular';
55886
55893
  const moduleName$c = 'link-dialog';
55887
55894
  const parentModuleName$5 = 'editor';
55888
- const min$b = !cookie('env') ? '.min' : '';
55889
- const localDir$c = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$b}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
55895
+ const min$f = !cookie('env') ? '.min' : '';
55896
+ const localDir$g = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$b}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
55890
55897
  let LinkDialogComponent = exports('LinkDialogComponent', class LinkDialogComponent extends ResponsiveComponent {
55891
55898
  constructor(dialogRef, data, fb, backend, snackBar, iconRegistry, sanitizer, ref) {
55892
55899
  super();
@@ -55921,7 +55928,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
55921
55928
  ngOnInit() {
55922
55929
  this.uid = _.uniqueId(`sa_${_.snakeCase(moduleName$c)}_component_`);
55923
55930
  Stratus.Instances[this.uid] = this;
55924
- Stratus.Internals.CssLoader(`${localDir$c}${parentModuleName$5}/${moduleName$c}.component${min$b}.css`)
55931
+ Stratus.Internals.CssLoader(`${localDir$g}${parentModuleName$5}/${moduleName$c}.component${min$f}.css`)
55925
55932
  .then(() => {
55926
55933
  this.isStyled = true;
55927
55934
  this.refresh();
@@ -56203,13 +56210,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
56203
56210
  window.open(content.contentType.editUrl + '?id=' + content.id, '_blank');
56204
56211
  }
56205
56212
  });
56206
- exports('LinkDialogComponent', LinkDialogComponent = __decorate$e([
56213
+ exports('LinkDialogComponent', LinkDialogComponent = __decorate$k([
56207
56214
  Component({
56208
56215
  selector: `sa-${moduleName$c}`,
56209
- templateUrl: `${localDir$c}/${parentModuleName$5}/${moduleName$c}.component${min$b}.html`,
56216
+ templateUrl: `${localDir$g}/${parentModuleName$5}/${moduleName$c}.component${min$f}.html`,
56210
56217
  }),
56211
- __param$5(1, Inject(MAT_DIALOG_DATA)),
56212
- __metadata$c("design:paramtypes", [MatDialogRef, Object, FormBuilder,
56218
+ __param$6(1, Inject(MAT_DIALOG_DATA)),
56219
+ __metadata$i("design:paramtypes", [MatDialogRef, Object, FormBuilder,
56213
56220
  BackendService,
56214
56221
  MatSnackBar,
56215
56222
  MatIconRegistry,
@@ -56217,23 +56224,23 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
56217
56224
  ChangeDetectorRef])
56218
56225
  ], LinkDialogComponent));
56219
56226
 
56220
- var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
56227
+ var __decorate$j = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
56221
56228
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
56222
56229
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
56223
56230
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
56224
56231
  return c > 3 && r && Object.defineProperty(target, key, r), r;
56225
56232
  };
56226
- var __metadata$b = (undefined && undefined.__metadata) || function (k, v) {
56233
+ var __metadata$h = (undefined && undefined.__metadata) || function (k, v) {
56227
56234
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
56228
56235
  };
56229
- var __param$4 = (undefined && undefined.__param) || function (paramIndex, decorator) {
56236
+ var __param$5 = (undefined && undefined.__param) || function (paramIndex, decorator) {
56230
56237
  return function (target, key) { decorator(target, key, paramIndex); }
56231
56238
  };
56232
56239
  const systemDir$a = '@stratusjs/angular';
56233
56240
  const moduleName$b = 'media-dialog';
56234
56241
  const parentModuleName$4 = 'editor';
56235
- const min$a = !cookie('env') ? '.min' : '';
56236
- const localDir$b = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$a}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
56242
+ const min$e = !cookie('env') ? '.min' : '';
56243
+ const localDir$f = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$a}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
56237
56244
  let MediaDialogComponent = exports('MediaDialogComponent', class MediaDialogComponent extends ResponsiveComponent {
56238
56245
  constructor(dialogRef, data, fb, backend, snackBar, ref) {
56239
56246
  super();
@@ -56257,7 +56264,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
56257
56264
  ngOnInit() {
56258
56265
  this.uid = _.uniqueId(`sa_${_.snakeCase(moduleName$b)}_component_`);
56259
56266
  Stratus.Instances[this.uid] = this;
56260
- Stratus.Internals.CssLoader(`${localDir$b}/${parentModuleName$4}/${moduleName$b}.component${min$a}.css`);
56267
+ Stratus.Internals.CssLoader(`${localDir$f}/${parentModuleName$4}/${moduleName$b}.component${min$e}.css`);
56261
56268
  this.model = this.data.model;
56262
56269
  this.property = this.data.property;
56263
56270
  this.editor = this.data.editor;
@@ -56493,13 +56500,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
56493
56500
  return null;
56494
56501
  }
56495
56502
  });
56496
- exports('MediaDialogComponent', MediaDialogComponent = __decorate$d([
56503
+ exports('MediaDialogComponent', MediaDialogComponent = __decorate$j([
56497
56504
  Component({
56498
56505
  selector: `sa-${moduleName$b}`,
56499
- templateUrl: `${localDir$b}/${parentModuleName$4}/${moduleName$b}.component${min$a}.html`,
56506
+ templateUrl: `${localDir$f}/${parentModuleName$4}/${moduleName$b}.component${min$e}.html`,
56500
56507
  }),
56501
- __param$4(1, Inject(MAT_DIALOG_DATA)),
56502
- __metadata$b("design:paramtypes", [MatDialogRef, Object, FormBuilder,
56508
+ __param$5(1, Inject(MAT_DIALOG_DATA)),
56509
+ __metadata$h("design:paramtypes", [MatDialogRef, Object, FormBuilder,
56503
56510
  BackendService,
56504
56511
  MatSnackBar,
56505
56512
  ChangeDetectorRef])
@@ -56920,23 +56927,23 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
56920
56927
  },] }
56921
56928
  ];
56922
56929
 
56923
- var __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
56930
+ var __decorate$i = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
56924
56931
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
56925
56932
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
56926
56933
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
56927
56934
  return c > 3 && r && Object.defineProperty(target, key, r), r;
56928
56935
  };
56929
- var __metadata$a = (undefined && undefined.__metadata) || function (k, v) {
56936
+ var __metadata$g = (undefined && undefined.__metadata) || function (k, v) {
56930
56937
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
56931
56938
  };
56932
- var __param$3 = (undefined && undefined.__param) || function (paramIndex, decorator) {
56939
+ var __param$4 = (undefined && undefined.__param) || function (paramIndex, decorator) {
56933
56940
  return function (target, key) { decorator(target, key, paramIndex); }
56934
56941
  };
56935
56942
  const systemDir$9 = '@stratusjs/angular';
56936
56943
  const moduleName$a = 'code-view-dialog';
56937
56944
  const parentModuleName$3 = 'editor';
56938
- const min$9 = !cookie('env') ? '.min' : '';
56939
- const localDir$a = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$9}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
56945
+ const min$d = !cookie('env') ? '.min' : '';
56946
+ const localDir$e = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$9}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
56940
56947
  let CodeViewDialogComponent = exports('CodeViewDialogComponent', class CodeViewDialogComponent extends ResponsiveComponent {
56941
56948
  constructor(dialogRef, data, ref, fb, ngZone) {
56942
56949
  super();
@@ -56959,7 +56966,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
56959
56966
  ngOnInit() {
56960
56967
  this.uid = _.uniqueId(`sa_${_.snakeCase(moduleName$a)}_component_`);
56961
56968
  Stratus.Instances[this.uid] = this;
56962
- Stratus.Internals.CssLoader(`${localDir$a}/${parentModuleName$3}/${moduleName$a}.component${min$9}.css`);
56969
+ Stratus.Internals.CssLoader(`${localDir$e}/${parentModuleName$3}/${moduleName$a}.component${min$d}.css`);
56963
56970
  this.model = this.data.model;
56964
56971
  this.property = this.data.property;
56965
56972
  const dataControl = this.form.get('dataString');
@@ -56984,17 +56991,17 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
56984
56991
  .subscribe(() => this.autosize.resizeToFitContent(true));
56985
56992
  }
56986
56993
  });
56987
- __decorate$c([
56994
+ __decorate$i([
56988
56995
  ViewChild('autosize'),
56989
- __metadata$a("design:type", CdkTextareaAutosize)
56996
+ __metadata$g("design:type", CdkTextareaAutosize)
56990
56997
  ], CodeViewDialogComponent.prototype, "autosize", void 0);
56991
- exports('CodeViewDialogComponent', CodeViewDialogComponent = __decorate$c([
56998
+ exports('CodeViewDialogComponent', CodeViewDialogComponent = __decorate$i([
56992
56999
  Component({
56993
57000
  selector: `sa-${moduleName$a}`,
56994
- templateUrl: `${localDir$a}/${parentModuleName$3}/${moduleName$a}.component${min$9}.html`,
57001
+ templateUrl: `${localDir$e}/${parentModuleName$3}/${moduleName$a}.component${min$d}.html`,
56995
57002
  }),
56996
- __param$3(1, Inject(MAT_DIALOG_DATA)),
56997
- __metadata$a("design:paramtypes", [MatDialogRef, Object, ChangeDetectorRef,
57003
+ __param$4(1, Inject(MAT_DIALOG_DATA)),
57004
+ __metadata$g("design:paramtypes", [MatDialogRef, Object, ChangeDetectorRef,
56998
57005
  FormBuilder,
56999
57006
  NgZone])
57000
57007
  ], CodeViewDialogComponent));
@@ -57123,8 +57130,8 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
57123
57130
  const systemDir$8 = '@stratusjs/angular';
57124
57131
  const moduleName$9 = 'citationManager';
57125
57132
  const parentModuleName$2 = 'froala/plugins';
57126
- const min$8 = !cookie('env') ? '.min' : '';
57127
- const localDir$9 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$8}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
57133
+ const min$c = !cookie('env') ? '.min' : '';
57134
+ const localDir$d = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$8}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
57128
57135
  extend(FroalaEditor.POPUP_TEMPLATES, {
57129
57136
  'citationManager.toolbar': '[_BUTTONS_]'
57130
57137
  });
@@ -57135,7 +57142,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
57135
57142
  let inputButton;
57136
57143
  const debug = false;
57137
57144
  function _init() {
57138
- Stratus.Internals.CssLoader(`${localDir$9}${parentModuleName$2}/${moduleName$9}${min$8}.css`);
57145
+ Stratus.Internals.CssLoader(`${localDir$d}${parentModuleName$2}/${moduleName$9}${min$c}.css`);
57139
57146
  inputButton = new InputButtonPlugin({
57140
57147
  name: 'Citation Manager',
57141
57148
  eventName: 'citation-input',
@@ -57436,20 +57443,20 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
57436
57443
  undo: true
57437
57444
  });
57438
57445
 
57439
- var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
57446
+ var __decorate$h = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
57440
57447
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
57441
57448
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
57442
57449
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
57443
57450
  return c > 3 && r && Object.defineProperty(target, key, r), r;
57444
57451
  };
57445
- var __metadata$9 = (undefined && undefined.__metadata) || function (k, v) {
57452
+ var __metadata$f = (undefined && undefined.__metadata) || function (k, v) {
57446
57453
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
57447
57454
  };
57448
57455
  const systemPackage = '@stratusjs/angular';
57449
57456
  const froalaPackage = 'froala-editor';
57450
57457
  const moduleName$8 = 'editor';
57451
- const min$7 = !cookie('env') ? '.min' : '';
57452
- const localDir$8 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemPackage}/*`].replace(/[^\/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
57458
+ const min$b = !cookie('env') ? '.min' : '';
57459
+ const localDir$c = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemPackage}/*`].replace(/[^\/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
57453
57460
  const froalaDir = `${Stratus.BaseUrl}${boot.configuration.paths[froalaPackage].replace(/js\/[^\/]*$/, '')}`;
57454
57461
  const has$2 = (object, path) => _.has(object, path) && !_.isEmpty(_.get(object, path));
57455
57462
  let EditorComponent = exports('EditorComponent', class EditorComponent extends RootComponent {
@@ -57917,11 +57924,11 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
57917
57924
  this.uid = _.uniqueId(`sa_${_.snakeCase(moduleName$8)}_component_`);
57918
57925
  Stratus.Instances[this.uid] = this;
57919
57926
  Stratus.Internals.LoadCss([
57920
- `${localDir$8}${moduleName$8}/${moduleName$8}.component${min$7}.css`,
57921
- `${froalaDir}css/froala_editor.pkgd${min$7}.css`,
57922
- `${froalaDir}css/third_party/embedly${min$7}.css`,
57923
- `${froalaDir}css/third_party/font_awesome${min$7}.css`,
57924
- `${froalaDir}css/third_party/image_tui${min$7}.css`,
57927
+ `${localDir$c}${moduleName$8}/${moduleName$8}.component${min$b}.css`,
57928
+ `${froalaDir}css/froala_editor.pkgd${min$b}.css`,
57929
+ `${froalaDir}css/third_party/embedly${min$b}.css`,
57930
+ `${froalaDir}css/third_party/font_awesome${min$b}.css`,
57931
+ `${froalaDir}css/third_party/image_tui${min$b}.css`,
57925
57932
  ]).then(() => {
57926
57933
  this.styled = true;
57927
57934
  this.refresh();
@@ -57979,6 +57986,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
57979
57986
  const dataControl = this.form.get('dataString');
57980
57987
  if (this.debounceSave) {
57981
57988
  dataControl.valueChanges.pipe(debounce(() => timer(this.debounceTime)), catchError(this.handleError)).subscribe((evt) => this.modelSave(evt));
57989
+ dataControl.valueChanges.pipe(debounce(() => timer(250)), catchError(this.handleError)).subscribe((evt) => {
57990
+ if (this.model.changedExternal) {
57991
+ return;
57992
+ }
57993
+ this.model.changedExternal = true;
57994
+ this.model.trigger('change');
57995
+ });
57982
57996
  }
57983
57997
  else {
57984
57998
  dataControl.valueChanges.forEach((value) => this.modelSave(value));
@@ -58000,7 +58014,8 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
58000
58014
  innerHTML = this.froalaEditorDirective.getEditor().el.innerHTML;
58001
58015
  }
58002
58016
  this.model.set(this.property, this.normalizeOut(innerHTML || value));
58003
- if (this.forceSave) {
58017
+ this.model.changedExternal = false;
58018
+ if (this.forceSave && !_.isEmpty(this.model.getIdentifier())) {
58004
58019
  this.model.save();
58005
58020
  }
58006
58021
  }
@@ -58257,55 +58272,55 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
58257
58272
  });
58258
58273
  }
58259
58274
  });
58260
- __decorate$b([
58275
+ __decorate$h([
58261
58276
  Input(),
58262
- __metadata$9("design:type", String)
58277
+ __metadata$f("design:type", String)
58263
58278
  ], EditorComponent.prototype, "target", void 0);
58264
- __decorate$b([
58279
+ __decorate$h([
58265
58280
  Input(),
58266
- __metadata$9("design:type", String)
58281
+ __metadata$f("design:type", String)
58267
58282
  ], EditorComponent.prototype, "targetSuffix", void 0);
58268
- __decorate$b([
58283
+ __decorate$h([
58269
58284
  Input(),
58270
- __metadata$9("design:type", Number)
58285
+ __metadata$f("design:type", Number)
58271
58286
  ], EditorComponent.prototype, "id", void 0);
58272
- __decorate$b([
58287
+ __decorate$h([
58273
58288
  Input(),
58274
- __metadata$9("design:type", Boolean)
58289
+ __metadata$f("design:type", Boolean)
58275
58290
  ], EditorComponent.prototype, "manifest", void 0);
58276
- __decorate$b([
58291
+ __decorate$h([
58277
58292
  Input(),
58278
- __metadata$9("design:type", Boolean)
58293
+ __metadata$f("design:type", Boolean)
58279
58294
  ], EditorComponent.prototype, "decouple", void 0);
58280
- __decorate$b([
58295
+ __decorate$h([
58281
58296
  Input(),
58282
- __metadata$9("design:type", Boolean)
58297
+ __metadata$f("design:type", Boolean)
58283
58298
  ], EditorComponent.prototype, "direct", void 0);
58284
- __decorate$b([
58299
+ __decorate$h([
58285
58300
  Input(),
58286
- __metadata$9("design:type", Object)
58301
+ __metadata$f("design:type", Object)
58287
58302
  ], EditorComponent.prototype, "api", void 0);
58288
- __decorate$b([
58303
+ __decorate$h([
58289
58304
  Input(),
58290
- __metadata$9("design:type", String)
58305
+ __metadata$f("design:type", String)
58291
58306
  ], EditorComponent.prototype, "urlRoot", void 0);
58292
- __decorate$b([
58307
+ __decorate$h([
58293
58308
  Input(),
58294
- __metadata$9("design:type", String)
58309
+ __metadata$f("design:type", String)
58295
58310
  ], EditorComponent.prototype, "property", void 0);
58296
- exports('EditorComponent', EditorComponent = __decorate$b([
58311
+ exports('EditorComponent', EditorComponent = __decorate$h([
58297
58312
  Component({
58298
58313
  selector: `sa-${moduleName$8}`,
58299
- templateUrl: `${localDir$8}/${moduleName$8}/${moduleName$8}.component${min$7}.html`,
58314
+ templateUrl: `${localDir$c}/${moduleName$8}/${moduleName$8}.component${min$b}.html`,
58300
58315
  }),
58301
- __metadata$9("design:paramtypes", [DomSanitizer,
58316
+ __metadata$f("design:paramtypes", [DomSanitizer,
58302
58317
  ChangeDetectorRef,
58303
58318
  ElementRef,
58304
58319
  FormBuilder,
58305
58320
  MatDialog])
58306
58321
  ], EditorComponent));
58307
58322
 
58308
- var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
58323
+ var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
58309
58324
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
58310
58325
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
58311
58326
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -58313,7 +58328,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
58313
58328
  };
58314
58329
  let AngularModules = exports('AngularModules', class AngularModules {
58315
58330
  });
58316
- exports('AngularModules', AngularModules = __decorate$a([
58331
+ exports('AngularModules', AngularModules = __decorate$g([
58317
58332
  NgModule({
58318
58333
  exports: [
58319
58334
  EditorComponent,
@@ -86881,7 +86896,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
86881
86896
  },] }
86882
86897
  ];
86883
86898
 
86884
- var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
86899
+ var __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
86885
86900
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
86886
86901
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
86887
86902
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -86889,7 +86904,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
86889
86904
  };
86890
86905
  let MaterialModules = exports('MaterialModules', class MaterialModules {
86891
86906
  });
86892
- exports('MaterialModules', MaterialModules = __decorate$9([
86907
+ exports('MaterialModules', MaterialModules = __decorate$f([
86893
86908
  NgModule({
86894
86909
  exports: [
86895
86910
  A11yModule,
@@ -95565,19 +95580,19 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
95565
95580
  return FlexLayoutModule;
95566
95581
  }());
95567
95582
 
95568
- var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
95583
+ var __decorate$e = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
95569
95584
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
95570
95585
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
95571
95586
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
95572
95587
  return c > 3 && r && Object.defineProperty(target, key, r), r;
95573
95588
  };
95574
- var __metadata$8 = (undefined && undefined.__metadata) || function (k, v) {
95589
+ var __metadata$e = (undefined && undefined.__metadata) || function (k, v) {
95575
95590
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
95576
95591
  };
95577
95592
  const systemDir$7 = '@stratusjs/angular';
95578
95593
  const moduleName$7 = 'base';
95579
- const min$6 = !cookie('env') ? '.min' : '';
95580
- const localDir$7 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$7}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
95594
+ const min$a = !cookie('env') ? '.min' : '';
95595
+ const localDir$b = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$7}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
95581
95596
  let BaseComponent = exports('BaseComponent', class BaseComponent extends RootComponent {
95582
95597
  constructor(sanitizer, ref, elementRef) {
95583
95598
  super();
@@ -95607,76 +95622,76 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
95607
95622
  });
95608
95623
  }
95609
95624
  });
95610
- __decorate$8([
95625
+ __decorate$e([
95611
95626
  Input(),
95612
- __metadata$8("design:type", String)
95627
+ __metadata$e("design:type", String)
95613
95628
  ], BaseComponent.prototype, "target", void 0);
95614
- __decorate$8([
95629
+ __decorate$e([
95615
95630
  Input(),
95616
- __metadata$8("design:type", String)
95631
+ __metadata$e("design:type", String)
95617
95632
  ], BaseComponent.prototype, "targetSuffix", void 0);
95618
- __decorate$8([
95633
+ __decorate$e([
95619
95634
  Input(),
95620
- __metadata$8("design:type", Number)
95635
+ __metadata$e("design:type", Number)
95621
95636
  ], BaseComponent.prototype, "id", void 0);
95622
- __decorate$8([
95637
+ __decorate$e([
95623
95638
  Input(),
95624
- __metadata$8("design:type", Boolean)
95639
+ __metadata$e("design:type", Boolean)
95625
95640
  ], BaseComponent.prototype, "manifest", void 0);
95626
- __decorate$8([
95641
+ __decorate$e([
95627
95642
  Input(),
95628
- __metadata$8("design:type", Boolean)
95643
+ __metadata$e("design:type", Boolean)
95629
95644
  ], BaseComponent.prototype, "decouple", void 0);
95630
- __decorate$8([
95645
+ __decorate$e([
95631
95646
  Input(),
95632
- __metadata$8("design:type", Boolean)
95647
+ __metadata$e("design:type", Boolean)
95633
95648
  ], BaseComponent.prototype, "direct", void 0);
95634
- __decorate$8([
95649
+ __decorate$e([
95635
95650
  Input(),
95636
- __metadata$8("design:type", Object)
95651
+ __metadata$e("design:type", Object)
95637
95652
  ], BaseComponent.prototype, "api", void 0);
95638
- __decorate$8([
95653
+ __decorate$e([
95639
95654
  Input(),
95640
- __metadata$8("design:type", String)
95655
+ __metadata$e("design:type", String)
95641
95656
  ], BaseComponent.prototype, "urlRoot", void 0);
95642
- __decorate$8([
95657
+ __decorate$e([
95643
95658
  Input(),
95644
- __metadata$8("design:type", String)
95659
+ __metadata$e("design:type", String)
95645
95660
  ], BaseComponent.prototype, "type", void 0);
95646
- __decorate$8([
95661
+ __decorate$e([
95647
95662
  Input(),
95648
- __metadata$8("design:type", String)
95663
+ __metadata$e("design:type", String)
95649
95664
  ], BaseComponent.prototype, "property", void 0);
95650
- __decorate$8([
95665
+ __decorate$e([
95651
95666
  Input(),
95652
- __metadata$8("design:type", String)
95667
+ __metadata$e("design:type", String)
95653
95668
  ], BaseComponent.prototype, "endpoint", void 0);
95654
- exports('BaseComponent', BaseComponent = __decorate$8([
95669
+ exports('BaseComponent', BaseComponent = __decorate$e([
95655
95670
  Component({
95656
95671
  selector: 'sa-base',
95657
- templateUrl: `${localDir$7}/${moduleName$7}/${moduleName$7}.component${min$6}.html`,
95672
+ templateUrl: `${localDir$b}/${moduleName$7}/${moduleName$7}.component${min$a}.html`,
95658
95673
  }),
95659
- __metadata$8("design:paramtypes", [DomSanitizer,
95674
+ __metadata$e("design:paramtypes", [DomSanitizer,
95660
95675
  ChangeDetectorRef,
95661
95676
  ElementRef])
95662
95677
  ], BaseComponent));
95663
95678
 
95664
- var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
95679
+ var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
95665
95680
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
95666
95681
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
95667
95682
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
95668
95683
  return c > 3 && r && Object.defineProperty(target, key, r), r;
95669
95684
  };
95670
- var __metadata$7 = (undefined && undefined.__metadata) || function (k, v) {
95685
+ var __metadata$d = (undefined && undefined.__metadata) || function (k, v) {
95671
95686
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
95672
95687
  };
95673
- var __param$2 = (undefined && undefined.__param) || function (paramIndex, decorator) {
95688
+ var __param$3 = (undefined && undefined.__param) || function (paramIndex, decorator) {
95674
95689
  return function (target, key) { decorator(target, key, paramIndex); }
95675
95690
  };
95676
95691
  const systemDir$6 = '@stratusjs/angular';
95677
95692
  const moduleName$6 = 'confirm-dialog';
95678
- const min$5 = !cookie('env') ? '.min' : '';
95679
- const localDir$6 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$6}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
95693
+ const min$9 = !cookie('env') ? '.min' : '';
95694
+ const localDir$a = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$6}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
95680
95695
  let ConfirmDialogComponent = exports('ConfirmDialogComponent', class ConfirmDialogComponent {
95681
95696
  constructor(dialogRef, data) {
95682
95697
  this.dialogRef = dialogRef;
@@ -95689,25 +95704,25 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
95689
95704
  this.dialogRef.close(false);
95690
95705
  }
95691
95706
  });
95692
- exports('ConfirmDialogComponent', ConfirmDialogComponent = __decorate$7([
95707
+ exports('ConfirmDialogComponent', ConfirmDialogComponent = __decorate$d([
95693
95708
  Component({
95694
95709
  selector: `sa-${moduleName$6}`,
95695
- templateUrl: `${localDir$6}/${moduleName$6}/${moduleName$6}.component${min$5}.html`,
95710
+ templateUrl: `${localDir$a}/${moduleName$6}/${moduleName$6}.component${min$9}.html`,
95696
95711
  }),
95697
- __param$2(1, Inject(MAT_DIALOG_DATA)),
95698
- __metadata$7("design:paramtypes", [MatDialogRef, Object])
95712
+ __param$3(1, Inject(MAT_DIALOG_DATA)),
95713
+ __metadata$d("design:paramtypes", [MatDialogRef, Object])
95699
95714
  ], ConfirmDialogComponent));
95700
95715
 
95701
- var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
95716
+ var __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
95702
95717
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
95703
95718
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
95704
95719
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
95705
95720
  return c > 3 && r && Object.defineProperty(target, key, r), r;
95706
95721
  };
95707
- var __metadata$6 = (undefined && undefined.__metadata) || function (k, v) {
95722
+ var __metadata$c = (undefined && undefined.__metadata) || function (k, v) {
95708
95723
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
95709
95724
  };
95710
- var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
95725
+ var __awaiter$7 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
95711
95726
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
95712
95727
  return new (P || (P = Promise))(function (resolve, reject) {
95713
95728
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -95716,9 +95731,9 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
95716
95731
  step((generator = generator.apply(thisArg, _arguments || [])).next());
95717
95732
  });
95718
95733
  };
95719
- const packageName = 'map';
95720
- const systemDir$5 = `@stratusjs/${packageName}`;
95721
- const localDir$5 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$5}/*`].replace(/[^/]*$/, '').replace(/angular\/dist\/$/, 'map/src/')}`;
95734
+ const packageName$5 = 'map';
95735
+ const systemDir$5 = `@stratusjs/${packageName$5}`;
95736
+ const localDir$9 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$5}/*`].replace(/[^/]*$/, '').replace(/angular\/dist\/$/, 'map/src/')}`;
95722
95737
  const moduleName$5 = 'map';
95723
95738
  const devGoogleMapsKey = 'AIzaSyBAyMH-A99yD5fHQPz7uzqk8glNJYGEqus';
95724
95739
  class Watcher {
@@ -95815,7 +95830,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
95815
95830
  this.highestMarkerZIndex = 0;
95816
95831
  this.uid = _.uniqueId(`sa_${_.snakeCase(moduleName$5)}_component_`);
95817
95832
  Stratus.Instances[this.uid] = this;
95818
- Stratus.Internals.CssLoader(`${localDir$5}/${moduleName$5}.component.css`)
95833
+ Stratus.Internals.CssLoader(`${localDir$9}/${moduleName$5}.component.css`)
95819
95834
  .then(() => {
95820
95835
  this.styled = true;
95821
95836
  })
@@ -95838,12 +95853,12 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
95838
95853
  this.watcher.checkWatchers();
95839
95854
  }
95840
95855
  ngOnInit() {
95841
- return __awaiter$1(this, void 0, void 0, function* () {
95856
+ return __awaiter$7(this, void 0, void 0, function* () {
95842
95857
  this.initializing = true;
95843
95858
  });
95844
95859
  }
95845
95860
  ngAfterViewInit() {
95846
- return __awaiter$1(this, void 0, void 0, function* () {
95861
+ return __awaiter$7(this, void 0, void 0, function* () {
95847
95862
  try {
95848
95863
  yield this.initGoogleMapsApi();
95849
95864
  this.map = new google.maps.Map(this.gMap.nativeElement, this.options);
@@ -96023,7 +96038,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
96023
96038
  this.map.fitBounds(latLngBounds);
96024
96039
  }
96025
96040
  initGoogleMapsApi() {
96026
- return __awaiter$1(this, void 0, void 0, function* () {
96041
+ return __awaiter$7(this, void 0, void 0, function* () {
96027
96042
  if (Object.prototype.hasOwnProperty.call(window, 'google') &&
96028
96043
  Object.prototype.hasOwnProperty.call(window.google, 'maps')) {
96029
96044
  return;
@@ -96044,7 +96059,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
96044
96059
  });
96045
96060
  }
96046
96061
  getCurrentPosition(highAccuracy) {
96047
- return __awaiter$1(this, void 0, void 0, function* () {
96062
+ return __awaiter$7(this, void 0, void 0, function* () {
96048
96063
  return new Promise((resolve, reject) => {
96049
96064
  const options = {};
96050
96065
  if (highAccuracy) {
@@ -96176,112 +96191,112 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
96176
96191
  this.info.open(this.map, marker);
96177
96192
  }
96178
96193
  };
96179
- __decorate$6([
96194
+ __decorate$c([
96180
96195
  ViewChild('mapContainer', { static: false }),
96181
- __metadata$6("design:type", ElementRef)
96196
+ __metadata$c("design:type", ElementRef)
96182
96197
  ], MapComponent.prototype, "gMap", void 0);
96183
- __decorate$6([
96198
+ __decorate$c([
96184
96199
  Input(),
96185
- __metadata$6("design:type", String)
96200
+ __metadata$c("design:type", String)
96186
96201
  ], MapComponent.prototype, "height", void 0);
96187
- __decorate$6([
96202
+ __decorate$c([
96188
96203
  Input(),
96189
- __metadata$6("design:type", String)
96204
+ __metadata$c("design:type", String)
96190
96205
  ], MapComponent.prototype, "width", void 0);
96191
- __decorate$6([
96206
+ __decorate$c([
96192
96207
  Input(),
96193
- __metadata$6("design:type", Object)
96208
+ __metadata$c("design:type", Object)
96194
96209
  ], MapComponent.prototype, "referenceParent", void 0);
96195
- __decorate$6([
96210
+ __decorate$c([
96196
96211
  Input(),
96197
- __metadata$6("design:type", Object)
96212
+ __metadata$c("design:type", Object)
96198
96213
  ], MapComponent.prototype, "fullHeight", void 0);
96199
- __decorate$6([
96214
+ __decorate$c([
96200
96215
  Input(),
96201
- __metadata$6("design:type", String)
96216
+ __metadata$c("design:type", String)
96202
96217
  ], MapComponent.prototype, "fullHeightMinusElements", void 0);
96203
- __decorate$6([
96218
+ __decorate$c([
96204
96219
  Input(),
96205
- __metadata$6("design:type", Object)
96220
+ __metadata$c("design:type", Object)
96206
96221
  ], MapComponent.prototype, "googleMapsKey", void 0);
96207
- __decorate$6([
96222
+ __decorate$c([
96208
96223
  Input(),
96209
- __metadata$6("design:type", Object)
96224
+ __metadata$c("design:type", Object)
96210
96225
  ], MapComponent.prototype, "markers", void 0);
96211
- __decorate$6([
96226
+ __decorate$c([
96212
96227
  Input(),
96213
- __metadata$6("design:type", Object)
96228
+ __metadata$c("design:type", Object)
96214
96229
  ], MapComponent.prototype, "callback", void 0);
96215
- __decorate$6([
96230
+ __decorate$c([
96216
96231
  Input(),
96217
- __metadata$6("design:type", Object)
96232
+ __metadata$c("design:type", Object)
96218
96233
  ], MapComponent.prototype, "zoom", void 0);
96219
- __decorate$6([
96234
+ __decorate$c([
96220
96235
  Input(),
96221
- __metadata$6("design:type", Object)
96236
+ __metadata$c("design:type", Object)
96222
96237
  ], MapComponent.prototype, "mapType", void 0);
96223
- __decorate$6([
96238
+ __decorate$c([
96224
96239
  Input(),
96225
- __metadata$6("design:type", Object)
96240
+ __metadata$c("design:type", Object)
96226
96241
  ], MapComponent.prototype, "zoomControl", void 0);
96227
- __decorate$6([
96242
+ __decorate$c([
96228
96243
  Input(),
96229
- __metadata$6("design:type", Object)
96244
+ __metadata$c("design:type", Object)
96230
96245
  ], MapComponent.prototype, "scrollwheel", void 0);
96231
- __decorate$6([
96246
+ __decorate$c([
96232
96247
  Input(),
96233
- __metadata$6("design:type", Object)
96248
+ __metadata$c("design:type", Object)
96234
96249
  ], MapComponent.prototype, "disableDoubleClickZoom", void 0);
96235
- __decorate$6([
96250
+ __decorate$c([
96236
96251
  Input(),
96237
- __metadata$6("design:type", Object)
96252
+ __metadata$c("design:type", Object)
96238
96253
  ], MapComponent.prototype, "center", void 0);
96239
- __decorate$6([
96254
+ __decorate$c([
96240
96255
  Input(),
96241
- __metadata$6("design:type", Object)
96256
+ __metadata$c("design:type", Object)
96242
96257
  ], MapComponent.prototype, "defaultIcon", void 0);
96243
- __decorate$6([
96258
+ __decorate$c([
96244
96259
  Input(),
96245
- __metadata$6("design:type", Object)
96260
+ __metadata$c("design:type", Object)
96246
96261
  ], MapComponent.prototype, "defaultIconHover", void 0);
96247
- __decorate$6([
96262
+ __decorate$c([
96248
96263
  Input(),
96249
- __metadata$6("design:type", Number)
96264
+ __metadata$c("design:type", Number)
96250
96265
  ], MapComponent.prototype, "defaultIconLabelOriginX", void 0);
96251
- __decorate$6([
96266
+ __decorate$c([
96252
96267
  Input(),
96253
- __metadata$6("design:type", Number)
96268
+ __metadata$c("design:type", Number)
96254
96269
  ], MapComponent.prototype, "defaultIconLabelOriginY", void 0);
96255
- __decorate$6([
96270
+ __decorate$c([
96256
96271
  HostListener('window:resize', ['$event']),
96257
- __metadata$6("design:type", Function),
96258
- __metadata$6("design:paramtypes", []),
96259
- __metadata$6("design:returntype", void 0)
96272
+ __metadata$c("design:type", Function),
96273
+ __metadata$c("design:paramtypes", []),
96274
+ __metadata$c("design:returntype", void 0)
96260
96275
  ], MapComponent.prototype, "onResize", null);
96261
- MapComponent = __decorate$6([
96276
+ MapComponent = __decorate$c([
96262
96277
  Component({
96263
96278
  selector: `sa-${moduleName$5}`,
96264
- templateUrl: `${localDir$5}/${moduleName$5}.component.html`
96279
+ templateUrl: `${localDir$9}/${moduleName$5}.component.html`
96265
96280
  }),
96266
- __metadata$6("design:paramtypes", [KeyValueDiffers,
96281
+ __metadata$c("design:paramtypes", [KeyValueDiffers,
96267
96282
  Window,
96268
96283
  DomSanitizer,
96269
96284
  ElementRef])
96270
96285
  ], MapComponent);
96271
96286
 
96272
- var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
96287
+ var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
96273
96288
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
96274
96289
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
96275
96290
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
96276
96291
  return c > 3 && r && Object.defineProperty(target, key, r), r;
96277
96292
  };
96278
- var __metadata$5 = (undefined && undefined.__metadata) || function (k, v) {
96293
+ var __metadata$b = (undefined && undefined.__metadata) || function (k, v) {
96279
96294
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
96280
96295
  };
96281
96296
  const systemDir$4 = '@stratusjs/angular';
96282
96297
  const moduleName$4 = 'media-selector';
96283
- const min$4 = !cookie('env') ? '.min' : '';
96284
- const localDir$4 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$4}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
96298
+ const min$8 = !cookie('env') ? '.min' : '';
96299
+ const localDir$8 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$4}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
96285
96300
  const has$1 = (object, path) => _.has(object, path) && !_.isEmpty(_.get(object, path));
96286
96301
  let MediaSelectorComponent = exports('MediaSelectorComponent', class MediaSelectorComponent extends RootComponent {
96287
96302
  constructor(iconRegistry, sanitizer, ref, elementRef, viewportRuler) {
@@ -96352,7 +96367,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
96352
96367
  media_selector_audio: `${Stratus.BaseUrl}sitetheorymedia/images/mediaTypeIcons/media-icon-audio.svg`,
96353
96368
  media_selector_document: `${Stratus.BaseUrl}sitetheorymedia/images/mediaTypeIcons/media-icon-document.svg`
96354
96369
  }, (value, key) => iconRegistry.addSvgIcon(key, sanitizer.bypassSecurityTrustResourceUrl(value)).getNamedSvgIcon(key));
96355
- Stratus.Internals.CssLoader(`${localDir$4}${moduleName$4}/${moduleName$4}.component${min$4}.css`)
96370
+ Stratus.Internals.CssLoader(`${localDir$8}${moduleName$4}/${moduleName$4}.component${min$8}.css`)
96356
96371
  .then(() => {
96357
96372
  this.styled = true;
96358
96373
  this.refresh();
@@ -96595,64 +96610,64 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
96595
96610
  };
96596
96611
  }
96597
96612
  });
96598
- __decorate$5([
96613
+ __decorate$b([
96599
96614
  Input(),
96600
- __metadata$5("design:type", String)
96615
+ __metadata$b("design:type", String)
96601
96616
  ], MediaSelectorComponent.prototype, "target", void 0);
96602
- __decorate$5([
96617
+ __decorate$b([
96603
96618
  Input(),
96604
- __metadata$5("design:type", String)
96619
+ __metadata$b("design:type", String)
96605
96620
  ], MediaSelectorComponent.prototype, "targetSuffix", void 0);
96606
- __decorate$5([
96621
+ __decorate$b([
96607
96622
  Input(),
96608
- __metadata$5("design:type", Number)
96623
+ __metadata$b("design:type", Number)
96609
96624
  ], MediaSelectorComponent.prototype, "id", void 0);
96610
- __decorate$5([
96625
+ __decorate$b([
96611
96626
  Input(),
96612
- __metadata$5("design:type", Boolean)
96627
+ __metadata$b("design:type", Boolean)
96613
96628
  ], MediaSelectorComponent.prototype, "manifest", void 0);
96614
- __decorate$5([
96629
+ __decorate$b([
96615
96630
  Input(),
96616
- __metadata$5("design:type", Boolean)
96631
+ __metadata$b("design:type", Boolean)
96617
96632
  ], MediaSelectorComponent.prototype, "decouple", void 0);
96618
- __decorate$5([
96633
+ __decorate$b([
96619
96634
  Input(),
96620
- __metadata$5("design:type", Boolean)
96635
+ __metadata$b("design:type", Boolean)
96621
96636
  ], MediaSelectorComponent.prototype, "direct", void 0);
96622
- __decorate$5([
96637
+ __decorate$b([
96623
96638
  Input(),
96624
- __metadata$5("design:type", Object)
96639
+ __metadata$b("design:type", Object)
96625
96640
  ], MediaSelectorComponent.prototype, "api", void 0);
96626
- __decorate$5([
96641
+ __decorate$b([
96627
96642
  Input(),
96628
- __metadata$5("design:type", String)
96643
+ __metadata$b("design:type", String)
96629
96644
  ], MediaSelectorComponent.prototype, "urlRoot", void 0);
96630
- __decorate$5([
96645
+ __decorate$b([
96631
96646
  Input(),
96632
- __metadata$5("design:type", String)
96647
+ __metadata$b("design:type", String)
96633
96648
  ], MediaSelectorComponent.prototype, "type", void 0);
96634
- __decorate$5([
96649
+ __decorate$b([
96635
96650
  Input(),
96636
- __metadata$5("design:type", String)
96651
+ __metadata$b("design:type", String)
96637
96652
  ], MediaSelectorComponent.prototype, "property", void 0);
96638
- __decorate$5([
96653
+ __decorate$b([
96639
96654
  Input(),
96640
- __metadata$5("design:type", String)
96655
+ __metadata$b("design:type", String)
96641
96656
  ], MediaSelectorComponent.prototype, "endpoint", void 0);
96642
- __decorate$5([
96657
+ __decorate$b([
96643
96658
  ViewChild(CdkDropListGroup),
96644
- __metadata$5("design:type", CdkDropListGroup)
96659
+ __metadata$b("design:type", CdkDropListGroup)
96645
96660
  ], MediaSelectorComponent.prototype, "listGroup", void 0);
96646
- __decorate$5([
96661
+ __decorate$b([
96647
96662
  ViewChild(CdkDropList),
96648
- __metadata$5("design:type", CdkDropList)
96663
+ __metadata$b("design:type", CdkDropList)
96649
96664
  ], MediaSelectorComponent.prototype, "placeholder", void 0);
96650
- exports('MediaSelectorComponent', MediaSelectorComponent = __decorate$5([
96665
+ exports('MediaSelectorComponent', MediaSelectorComponent = __decorate$b([
96651
96666
  Component({
96652
96667
  selector: `sa-${moduleName$4}`,
96653
- templateUrl: `${localDir$4}/${moduleName$4}/${moduleName$4}.component${min$4}.html`,
96668
+ templateUrl: `${localDir$8}/${moduleName$4}/${moduleName$4}.component${min$8}.html`,
96654
96669
  }),
96655
- __metadata$5("design:paramtypes", [MatIconRegistry,
96670
+ __metadata$b("design:paramtypes", [MatIconRegistry,
96656
96671
  DomSanitizer,
96657
96672
  ChangeDetectorRef,
96658
96673
  ElementRef,
@@ -96669,19 +96684,19 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
96669
96684
  return y >= top && y <= bottom && x >= left && x <= right;
96670
96685
  }
96671
96686
 
96672
- var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
96687
+ var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
96673
96688
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
96674
96689
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
96675
96690
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
96676
96691
  return c > 3 && r && Object.defineProperty(target, key, r), r;
96677
96692
  };
96678
- var __metadata$4 = (undefined && undefined.__metadata) || function (k, v) {
96693
+ var __metadata$a = (undefined && undefined.__metadata) || function (k, v) {
96679
96694
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
96680
96695
  };
96681
96696
  const systemDir$3 = '@stratusjs/angular';
96682
96697
  const moduleName$3 = 'selector';
96683
- const min$3 = !cookie('env') ? '.min' : '';
96684
- const localDir$3 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$3}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
96698
+ const min$7 = !cookie('env') ? '.min' : '';
96699
+ const localDir$7 = `${Stratus.BaseUrl}${boot.configuration.paths[`${systemDir$3}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
96685
96700
  const has = (object, path) => _.has(object, path) && !_.isEmpty(_.get(object, path));
96686
96701
  let SelectorComponent = exports('SelectorComponent', class SelectorComponent extends RootComponent {
96687
96702
  constructor(iconRegistry, sanitizer, ref, elementRef) {
@@ -96708,7 +96723,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
96708
96723
  selector_delete: `${Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/delete.svg`,
96709
96724
  selector_edit: `${Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/edit.svg`
96710
96725
  }, (value, key) => iconRegistry.addSvgIcon(key, sanitizer.bypassSecurityTrustResourceUrl(value)).getNamedSvgIcon(key));
96711
- Stratus.Internals.CssLoader(`${localDir$3}${moduleName$3}/${moduleName$3}.component${min$3}.css`)
96726
+ Stratus.Internals.CssLoader(`${localDir$7}${moduleName$3}/${moduleName$3}.component${min$7}.css`)
96712
96727
  .then(() => {
96713
96728
  this.styled = true;
96714
96729
  this.refresh();
@@ -96847,61 +96862,1076 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
96847
96862
  return uid;
96848
96863
  }
96849
96864
  });
96850
- __decorate$4([
96865
+ __decorate$a([
96851
96866
  Input(),
96852
- __metadata$4("design:type", String)
96867
+ __metadata$a("design:type", String)
96853
96868
  ], SelectorComponent.prototype, "target", void 0);
96854
- __decorate$4([
96869
+ __decorate$a([
96855
96870
  Input(),
96856
- __metadata$4("design:type", String)
96871
+ __metadata$a("design:type", String)
96857
96872
  ], SelectorComponent.prototype, "targetSuffix", void 0);
96858
- __decorate$4([
96873
+ __decorate$a([
96859
96874
  Input(),
96860
- __metadata$4("design:type", Number)
96875
+ __metadata$a("design:type", Number)
96861
96876
  ], SelectorComponent.prototype, "id", void 0);
96862
- __decorate$4([
96877
+ __decorate$a([
96863
96878
  Input(),
96864
- __metadata$4("design:type", Boolean)
96879
+ __metadata$a("design:type", Boolean)
96865
96880
  ], SelectorComponent.prototype, "manifest", void 0);
96866
- __decorate$4([
96881
+ __decorate$a([
96867
96882
  Input(),
96868
- __metadata$4("design:type", Boolean)
96883
+ __metadata$a("design:type", Boolean)
96869
96884
  ], SelectorComponent.prototype, "decouple", void 0);
96870
- __decorate$4([
96885
+ __decorate$a([
96871
96886
  Input(),
96872
- __metadata$4("design:type", Boolean)
96887
+ __metadata$a("design:type", Boolean)
96873
96888
  ], SelectorComponent.prototype, "direct", void 0);
96874
- __decorate$4([
96889
+ __decorate$a([
96875
96890
  Input(),
96876
- __metadata$4("design:type", Object)
96891
+ __metadata$a("design:type", Object)
96877
96892
  ], SelectorComponent.prototype, "api", void 0);
96878
- __decorate$4([
96893
+ __decorate$a([
96879
96894
  Input(),
96880
- __metadata$4("design:type", String)
96895
+ __metadata$a("design:type", String)
96881
96896
  ], SelectorComponent.prototype, "urlRoot", void 0);
96882
- __decorate$4([
96897
+ __decorate$a([
96883
96898
  Input(),
96884
- __metadata$4("design:type", String)
96899
+ __metadata$a("design:type", String)
96885
96900
  ], SelectorComponent.prototype, "type", void 0);
96886
- __decorate$4([
96901
+ __decorate$a([
96887
96902
  Input(),
96888
- __metadata$4("design:type", String)
96903
+ __metadata$a("design:type", String)
96889
96904
  ], SelectorComponent.prototype, "property", void 0);
96890
- __decorate$4([
96905
+ __decorate$a([
96891
96906
  Input(),
96892
- __metadata$4("design:type", String)
96907
+ __metadata$a("design:type", String)
96893
96908
  ], SelectorComponent.prototype, "endpoint", void 0);
96894
- exports('SelectorComponent', SelectorComponent = __decorate$4([
96909
+ exports('SelectorComponent', SelectorComponent = __decorate$a([
96895
96910
  Component({
96896
96911
  selector: `sa-${moduleName$3}`,
96897
- templateUrl: `${localDir$3}/${moduleName$3}/${moduleName$3}.component${min$3}.html`,
96912
+ templateUrl: `${localDir$7}/${moduleName$3}/${moduleName$3}.component${min$7}.html`,
96898
96913
  }),
96899
- __metadata$4("design:paramtypes", [MatIconRegistry,
96914
+ __metadata$a("design:paramtypes", [MatIconRegistry,
96900
96915
  DomSanitizer,
96901
96916
  ChangeDetectorRef,
96902
96917
  ElementRef])
96903
96918
  ], SelectorComponent));
96904
96919
 
96920
+ var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
96921
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
96922
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
96923
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
96924
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
96925
+ };
96926
+ var __metadata$9 = (undefined && undefined.__metadata) || function (k, v) {
96927
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
96928
+ };
96929
+ var __awaiter$6 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
96930
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
96931
+ return new (P || (P = Promise))(function (resolve, reject) {
96932
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
96933
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
96934
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
96935
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
96936
+ });
96937
+ };
96938
+ let StripeService = class StripeService {
96939
+ constructor() {
96940
+ this.publishKey = '';
96941
+ this.Stripe = {};
96942
+ this.collections = [];
96943
+ this.initializing = false;
96944
+ this.initialized = false;
96945
+ Stratus.Services.Stripe = this;
96946
+ }
96947
+ initialize() {
96948
+ return __awaiter$6(this, void 0, void 0, function* () {
96949
+ if (!this.initialized && !this.initializing) {
96950
+ this.initializing = true;
96951
+ try {
96952
+ yield Stratus.Internals.JsLoader('https://js.stripe.com/v3/');
96953
+ if (!Object.prototype.hasOwnProperty.call(window, 'Stripe')) {
96954
+ console.error('Stripe Api was not initialized, cannot continue');
96955
+ this.initializing = false;
96956
+ return;
96957
+ }
96958
+ }
96959
+ catch (e) {
96960
+ console.error('Stripe Api could not be fetched, cannot continue');
96961
+ this.initializing = false;
96962
+ return;
96963
+ }
96964
+ this.Stripe.stripe = window.Stripe(this.publishKey);
96965
+ this.Stripe.stripeElements = this.Stripe.stripe.elements();
96966
+ this.initialized = true;
96967
+ this.initializing = false;
96968
+ }
96969
+ else if (this.initializing) {
96970
+ return yield this.waitForInitialization();
96971
+ }
96972
+ });
96973
+ }
96974
+ waitForInitialization() {
96975
+ return __awaiter$6(this, void 0, void 0, function* () {
96976
+ yield new Promise(() => {
96977
+ setTimeout(() => __awaiter$6(this, void 0, void 0, function* () {
96978
+ if (this.initializing) {
96979
+ return yield this.waitForInitialization();
96980
+ }
96981
+ else if (!this.initialized) {
96982
+ throw new Error('Unable to initialize');
96983
+ }
96984
+ else {
96985
+ return;
96986
+ }
96987
+ }), 1000);
96988
+ });
96989
+ return;
96990
+ });
96991
+ }
96992
+ elements(key) {
96993
+ return __awaiter$6(this, void 0, void 0, function* () {
96994
+ this.publishKey = key;
96995
+ yield this.initialize();
96996
+ return this.Stripe.stripeElements;
96997
+ });
96998
+ }
96999
+ confirmCardSetup(id, clientSecret, data, options) {
97000
+ return __awaiter$6(this, void 0, void 0, function* () {
97001
+ if (isEmpty(this.currentElement) ||
97002
+ this.currentElement.id !== id) {
97003
+ const error = {
97004
+ type: 'invalid_request_error',
97005
+ charge: null,
97006
+ message: 'The Element for ' + id + 'no longer exists. Cannot attach confirmCardSetup'
97007
+ };
97008
+ return { error };
97009
+ }
97010
+ const stripeData = {
97011
+ payment_method: {
97012
+ card: this.currentElement.element
97013
+ }
97014
+ };
97015
+ if (data
97016
+ && !isEmpty(data.payment_method)
97017
+ && !isString(data.payment_method)
97018
+ && !isEmpty(data.payment_method.billing_details)
97019
+ && !isString(stripeData.payment_method)) {
97020
+ stripeData.payment_method.billing_details = data.payment_method.billing_details;
97021
+ }
97022
+ return this.Stripe.stripe.confirmCardSetup(clientSecret, stripeData, options);
97023
+ });
97024
+ }
97025
+ registerCollection(collection) {
97026
+ this.collections.push(collection);
97027
+ }
97028
+ fetchCollections() {
97029
+ this.collections.forEach((collection) => {
97030
+ collection.fetch();
97031
+ });
97032
+ }
97033
+ createElement(id, publishKey, paymentMethodType, options, mountElement) {
97034
+ return __awaiter$6(this, void 0, void 0, function* () {
97035
+ if (!isEmpty(this.currentElement)) {
97036
+ console.warn('StripeElement for', this.currentElement.id, 'already exists. Destroying existing (consider cleaning up first)');
97037
+ this.destroyElement();
97038
+ }
97039
+ const element = (yield this.elements(publishKey)).create(paymentMethodType, options);
97040
+ this.currentElement = {
97041
+ id: uniqueId$3(id + '_'),
97042
+ paymentMethodType,
97043
+ element
97044
+ };
97045
+ if (mountElement) {
97046
+ this.mountElement(this.currentElement.id, mountElement);
97047
+ }
97048
+ return this.currentElement.id;
97049
+ });
97050
+ }
97051
+ mountElement(id, mountElement) {
97052
+ if (isEmpty(this.currentElement) ||
97053
+ this.currentElement.id !== id) {
97054
+ return;
97055
+ }
97056
+ this.currentElement.element.mount(mountElement);
97057
+ }
97058
+ unmountElement(id) {
97059
+ if (isEmpty(this.currentElement) ||
97060
+ this.currentElement.id !== id) {
97061
+ return;
97062
+ }
97063
+ this.currentElement.element.unmount();
97064
+ }
97065
+ elementAddEventListener(id, event, handler) {
97066
+ if (isEmpty(this.currentElement) ||
97067
+ this.currentElement.id !== id) {
97068
+ console.error('The StripeElement for', id, 'no longer exists. Cannot attach listener');
97069
+ return;
97070
+ }
97071
+ return this.currentElement.element.addEventListener(event, handler);
97072
+ }
97073
+ destroyElement(id) {
97074
+ if (!isEmpty(this.currentElement) &&
97075
+ (isNil(id) ||
97076
+ (isString(id) && this.currentElement.id === id))) {
97077
+ if (this.currentElement.element) {
97078
+ this.currentElement.element.unmount();
97079
+ this.currentElement.element.destroy();
97080
+ }
97081
+ this.currentElement = undefined;
97082
+ }
97083
+ }
97084
+ };
97085
+ StripeService = __decorate$9([
97086
+ Injectable({
97087
+ providedIn: 'root'
97088
+ }),
97089
+ __metadata$9("design:paramtypes", [])
97090
+ ], StripeService);
97091
+
97092
+ var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
97093
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
97094
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
97095
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
97096
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
97097
+ };
97098
+ var __metadata$8 = (undefined && undefined.__metadata) || function (k, v) {
97099
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
97100
+ };
97101
+ var __param$2 = (undefined && undefined.__param) || function (paramIndex, decorator) {
97102
+ return function (target, key) { decorator(target, key, paramIndex); }
97103
+ };
97104
+ var __awaiter$5 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
97105
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
97106
+ return new (P || (P = Promise))(function (resolve, reject) {
97107
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
97108
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
97109
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
97110
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
97111
+ });
97112
+ };
97113
+ const min$6 = !cookie('env') ? '.min' : '';
97114
+ const packageName$4 = 'stripe';
97115
+ const componentName$4 = 'payment-method';
97116
+ const localDir$6 = `${Stratus.BaseUrl}${Stratus.DeploymentPath}@stratusjs/${packageName$4}/src/`;
97117
+ let StripePaymentMethodComponent = class StripePaymentMethodComponent extends RootComponent {
97118
+ constructor(elementRef, sanitizer, Stripe, dialogRef, dialogData) {
97119
+ super();
97120
+ this.elementRef = elementRef;
97121
+ this.sanitizer = sanitizer;
97122
+ this.Stripe = Stripe;
97123
+ this.dialogRef = dialogRef;
97124
+ this.dialogData = dialogData;
97125
+ this.title = `${packageName$4}_${componentName$4}_component`;
97126
+ this.styled = false;
97127
+ this.initialized = false;
97128
+ this.cardComplete = false;
97129
+ this.cardSaved = false;
97130
+ this.formPending = false;
97131
+ this.publishKey = '';
97132
+ this.formMessage = '';
97133
+ this.paymentMethodApiPath = 'PaymentMethod';
97134
+ this.billingInfo = {
97135
+ address: {}
97136
+ };
97137
+ this.uid = uniqueId$3(`sa_${snakeCase(this.title)}_`);
97138
+ Stratus.Instances[this.uid] = this;
97139
+ this.elementId = this.elementId || this.uid;
97140
+ Stratus.Internals.CssLoader(`${localDir$6}${componentName$4}.component${min$6}.css`)
97141
+ .then(() => {
97142
+ this.styled = true;
97143
+ })
97144
+ .catch(() => {
97145
+ console.error('CSS Failed to load for Component:', this);
97146
+ this.styled = false;
97147
+ });
97148
+ this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "_", "styled", "initialized", "cardComplete", "cardSaved", "formPending", "clientSecret", "publishKey", "formMessage", "detailedBillingInfo", "defaultBillingInfo", "paymentMethodApiPath", "billingInfo", "cardId", "elementRef", "sanitizer", "Stripe", "dialogRef", "dialogData", "ngOnInit", "isEditable", "isBillingDetailsFilled", "isSubmittable", "saveCard", "dialogClose", "ngOnDestroy", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh"]);
97149
+ if (!isEmpty(this.dialogData)) {
97150
+ const keysPossible = ["clientSecret", "publishKey", "formMessage", "detailedBillingInfo", "defaultBillingInfo"];
97151
+ Object.keys(this.dialogData).forEach((attr) => {
97152
+ if (!isEmpty(attr) && includes(keysPossible, attr)) {
97153
+ set(this, attr, this.dialogData[attr]);
97154
+ }
97155
+ });
97156
+ }
97157
+ if (isObject$1(this.defaultBillingInfo)) {
97158
+ assignIn(this.billingInfo, this.defaultBillingInfo);
97159
+ }
97160
+ }
97161
+ ngOnInit() {
97162
+ return __awaiter$5(this, void 0, void 0, function* () {
97163
+ const options = {
97164
+ hidePostalCode: this.detailedBillingInfo ? true : false
97165
+ };
97166
+ this.cardId = yield this.Stripe.createElement(this.uid, this.publishKey, 'card', options, `#${this.elementId}-mount`);
97167
+ this.Stripe.elementAddEventListener(this.cardId, 'change', (event) => {
97168
+ const displayError = document.getElementById(`${this.elementId}-errors`);
97169
+ if (Object.prototype.hasOwnProperty.call(event, 'complete') &&
97170
+ this.cardComplete !== event.complete) {
97171
+ this.cardComplete = event.complete;
97172
+ }
97173
+ if (event.error) {
97174
+ displayError.textContent = event.error.message;
97175
+ }
97176
+ else {
97177
+ displayError.textContent = '';
97178
+ }
97179
+ });
97180
+ this.initialized = true;
97181
+ });
97182
+ }
97183
+ isEditable() {
97184
+ return !this.formPending && this.initialized;
97185
+ }
97186
+ isBillingDetailsFilled() {
97187
+ if (!isEmpty(this.billingInfo.name) &&
97188
+ !isEmpty(this.billingInfo.email) &&
97189
+ !isEmpty(this.billingInfo.address.line1) &&
97190
+ !isEmpty(this.billingInfo.address.city) &&
97191
+ !isEmpty(this.billingInfo.address.state) &&
97192
+ !isEmpty(this.billingInfo.address.postal_code)) ;
97193
+ return this.isEditable();
97194
+ }
97195
+ isSubmittable() {
97196
+ return this.cardComplete && this.isEditable() && this.isBillingDetailsFilled();
97197
+ }
97198
+ saveCard() {
97199
+ return __awaiter$5(this, void 0, void 0, function* () {
97200
+ if (!this.isSubmittable()) {
97201
+ return;
97202
+ }
97203
+ this.formPending = true;
97204
+ const { setupIntent, error } = yield this.Stripe.confirmCardSetup(this.cardId, this.clientSecret, {
97205
+ payment_method: {
97206
+ billing_details: this.billingInfo
97207
+ }
97208
+ });
97209
+ if (error) {
97210
+ console.error('error:', error, setupIntent);
97211
+ this.formPending = false;
97212
+ const displayError = document.getElementById(`${this.elementId}-errors`);
97213
+ let errorMessage = 'An Unknown Error has occurred';
97214
+ if (Object.prototype.hasOwnProperty.call(error, 'message')) {
97215
+ errorMessage = error.message;
97216
+ }
97217
+ displayError.textContent = errorMessage;
97218
+ return;
97219
+ }
97220
+ if (setupIntent.status === 'succeeded'
97221
+ && isString(setupIntent.payment_method)) {
97222
+ const model = new Model({
97223
+ target: this.paymentMethodApiPath
97224
+ });
97225
+ model.data = {
97226
+ payment_method: setupIntent.payment_method
97227
+ };
97228
+ yield model.save();
97229
+ this.cardSaved = true;
97230
+ this.formPending = false;
97231
+ this.Stripe.fetchCollections();
97232
+ }
97233
+ else {
97234
+ this.formPending = false;
97235
+ console.error('something went wrong. no error, no success', setupIntent);
97236
+ const displayError = document.getElementById(`${this.elementId}-errors`);
97237
+ displayError.textContent = 'An unknown Error has occurred';
97238
+ }
97239
+ });
97240
+ }
97241
+ dialogClose() {
97242
+ if (this.dialogRef) {
97243
+ this.dialogRef.close();
97244
+ }
97245
+ }
97246
+ ngOnDestroy() {
97247
+ if (this.cardId) {
97248
+ this.Stripe.destroyElement(this.cardId);
97249
+ }
97250
+ super.ngOnDestroy();
97251
+ }
97252
+ };
97253
+ __decorate$8([
97254
+ Input(),
97255
+ __metadata$8("design:type", String)
97256
+ ], StripePaymentMethodComponent.prototype, "elementId", void 0);
97257
+ __decorate$8([
97258
+ Input(),
97259
+ __metadata$8("design:type", String)
97260
+ ], StripePaymentMethodComponent.prototype, "clientSecret", void 0);
97261
+ __decorate$8([
97262
+ Input(),
97263
+ __metadata$8("design:type", Object)
97264
+ ], StripePaymentMethodComponent.prototype, "publishKey", void 0);
97265
+ __decorate$8([
97266
+ Input(),
97267
+ __metadata$8("design:type", Object)
97268
+ ], StripePaymentMethodComponent.prototype, "formMessage", void 0);
97269
+ __decorate$8([
97270
+ Input(),
97271
+ __metadata$8("design:type", Boolean)
97272
+ ], StripePaymentMethodComponent.prototype, "detailedBillingInfo", void 0);
97273
+ __decorate$8([
97274
+ Input(),
97275
+ __metadata$8("design:type", Object)
97276
+ ], StripePaymentMethodComponent.prototype, "defaultBillingInfo", void 0);
97277
+ StripePaymentMethodComponent = __decorate$8([
97278
+ Component({
97279
+ selector: `sa-${packageName$4}-${componentName$4}`,
97280
+ templateUrl: `${localDir$6}${componentName$4}.component${min$6}.html`,
97281
+ }),
97282
+ __param$2(3, Optional()),
97283
+ __param$2(4, Optional()),
97284
+ __param$2(4, Inject(MAT_DIALOG_DATA)),
97285
+ __metadata$8("design:paramtypes", [ElementRef,
97286
+ DomSanitizer,
97287
+ StripeService,
97288
+ MatDialogRef, Object])
97289
+ ], StripePaymentMethodComponent);
97290
+
97291
+ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
97292
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
97293
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
97294
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
97295
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
97296
+ };
97297
+ var __metadata$7 = (undefined && undefined.__metadata) || function (k, v) {
97298
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
97299
+ };
97300
+ var __awaiter$4 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
97301
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
97302
+ return new (P || (P = Promise))(function (resolve, reject) {
97303
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
97304
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
97305
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
97306
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
97307
+ });
97308
+ };
97309
+ const min$5 = !cookie('env') ? '.min' : '';
97310
+ const packageName$3 = 'stripe';
97311
+ const componentName$3 = 'payment-method-item';
97312
+ const localDir$5 = `${Stratus.BaseUrl}${Stratus.DeploymentPath}@stratusjs/${packageName$3}/src/`;
97313
+ let StripePaymentMethodItemComponent = class StripePaymentMethodItemComponent extends RootComponent {
97314
+ constructor(dialog, elementRef, sanitizer) {
97315
+ super();
97316
+ this.dialog = dialog;
97317
+ this.elementRef = elementRef;
97318
+ this.sanitizer = sanitizer;
97319
+ this.title = `${packageName$3}_${componentName$3}_component`;
97320
+ this.editable = false;
97321
+ this.styled = false;
97322
+ this.initialized = false;
97323
+ this.uid = uniqueId$3(`sa_${snakeCase(this.title)}_`);
97324
+ Stratus.Instances[this.uid] = this;
97325
+ this.elementId = this.elementId || this.uid;
97326
+ Stratus.Internals.CssLoader(`${localDir$5}${componentName$3}.component${min$5}.css`)
97327
+ .then(() => {
97328
+ this.styled = true;
97329
+ })
97330
+ .catch(() => {
97331
+ console.error('CSS Failed to load for Component:', this);
97332
+ this.styled = false;
97333
+ });
97334
+ this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "model", "editable", "styled", "initialized", "dialog", "elementRef", "sanitizer", "ngOnInit", "getCardLogoUrl", "isExpired", "isExpiring", "deletePM", "deletePMConfirmation", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
97335
+ }
97336
+ ngOnInit() {
97337
+ return __awaiter$4(this, void 0, void 0, function* () {
97338
+ this.initialized = true;
97339
+ });
97340
+ }
97341
+ getCardLogoUrl(brand) {
97342
+ return `${localDir$5}/images/card/${brand}.png`;
97343
+ }
97344
+ isExpired() {
97345
+ if (this.model.pending) {
97346
+ return false;
97347
+ }
97348
+ const d = new Date();
97349
+ const month = d.getMonth() + 1;
97350
+ const year = d.getFullYear();
97351
+ if (this.model.data.exp_year < year) {
97352
+ return true;
97353
+ }
97354
+ if (this.model.data.exp_year > year) {
97355
+ return false;
97356
+ }
97357
+ return this.model.data.exp_month < month;
97358
+ }
97359
+ isExpiring() {
97360
+ if (this.model.pending) {
97361
+ return false;
97362
+ }
97363
+ const d = new Date();
97364
+ const month = d.getMonth() + 1;
97365
+ const year = d.getFullYear();
97366
+ if (this.model.data.exp_year < year) {
97367
+ return true;
97368
+ }
97369
+ if (this.model.data.exp_year > year) {
97370
+ return false;
97371
+ }
97372
+ return this.model.data.exp_month <= month;
97373
+ }
97374
+ deletePM(event) {
97375
+ if (event) {
97376
+ event.stopPropagation();
97377
+ }
97378
+ this.deletePMConfirmation();
97379
+ return false;
97380
+ }
97381
+ deletePMConfirmation() {
97382
+ const dialog = this.dialog
97383
+ .open(ConfirmDialogComponent, {
97384
+ maxWidth: '400px',
97385
+ data: {
97386
+ title: 'Delete Payment Method',
97387
+ message: 'Are you sure you wish to remove this payment method from your personal account?'
97388
+ }
97389
+ });
97390
+ dialog
97391
+ .afterClosed()
97392
+ .subscribe((dialogResult) => __awaiter$4(this, void 0, void 0, function* () {
97393
+ if (!dialogResult) {
97394
+ return;
97395
+ }
97396
+ let collection;
97397
+ if (this.model.collection) {
97398
+ collection = this.model.collection;
97399
+ }
97400
+ yield this.model.destroy();
97401
+ if (collection) {
97402
+ collection.fetch();
97403
+ }
97404
+ }));
97405
+ return dialog;
97406
+ }
97407
+ };
97408
+ __decorate$7([
97409
+ Input(),
97410
+ __metadata$7("design:type", String)
97411
+ ], StripePaymentMethodItemComponent.prototype, "elementId", void 0);
97412
+ __decorate$7([
97413
+ Input(),
97414
+ __metadata$7("design:type", Model)
97415
+ ], StripePaymentMethodItemComponent.prototype, "model", void 0);
97416
+ __decorate$7([
97417
+ Input(),
97418
+ __metadata$7("design:type", Object)
97419
+ ], StripePaymentMethodItemComponent.prototype, "editable", void 0);
97420
+ StripePaymentMethodItemComponent = __decorate$7([
97421
+ Component({
97422
+ selector: `sa-${packageName$3}-${componentName$3}`,
97423
+ templateUrl: `${localDir$5}${componentName$3}.component${min$5}.html`,
97424
+ }),
97425
+ __metadata$7("design:paramtypes", [MatDialog,
97426
+ ElementRef,
97427
+ DomSanitizer])
97428
+ ], StripePaymentMethodItemComponent);
97429
+
97430
+ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
97431
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
97432
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
97433
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
97434
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
97435
+ };
97436
+ var __metadata$6 = (undefined && undefined.__metadata) || function (k, v) {
97437
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
97438
+ };
97439
+ var __awaiter$3 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
97440
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
97441
+ return new (P || (P = Promise))(function (resolve, reject) {
97442
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
97443
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
97444
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
97445
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
97446
+ });
97447
+ };
97448
+ const min$4 = !cookie('env') ? '.min' : '';
97449
+ const packageName$2 = 'stripe';
97450
+ const componentName$2 = 'payment-method-list';
97451
+ const localDir$4 = `${Stratus.BaseUrl}${Stratus.DeploymentPath}@stratusjs/${packageName$2}/src/`;
97452
+ let StripePaymentMethodListComponent = class StripePaymentMethodListComponent extends RootComponent {
97453
+ constructor(elementRef, sanitizer, Stripe) {
97454
+ super();
97455
+ this.elementRef = elementRef;
97456
+ this.sanitizer = sanitizer;
97457
+ this.Stripe = Stripe;
97458
+ this.title = `${packageName$2}_${componentName$2}_component`;
97459
+ this.styled = false;
97460
+ this.initialized = false;
97461
+ this.paymentMethodApiPath = 'PaymentMethod';
97462
+ this.uid = uniqueId$3(`sa_${snakeCase(this.title)}_`);
97463
+ Stratus.Instances[this.uid] = this;
97464
+ this.elementId = this.elementId || this.uid;
97465
+ Stratus.Internals.CssLoader(`${localDir$4}${componentName$2}.component${min$4}.css`)
97466
+ .then(() => {
97467
+ this.styled = true;
97468
+ })
97469
+ .catch(() => {
97470
+ console.error('CSS Failed to load for Component:', this);
97471
+ this.styled = false;
97472
+ });
97473
+ this.collection = new Collection({
97474
+ autoSave: false,
97475
+ target: this.paymentMethodApiPath,
97476
+ watch: true
97477
+ });
97478
+ this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "styled", "initialized", "collection", "detailedBillingInfo", "paymentMethodApiPath", "elementRef", "sanitizer", "Stripe", "ngOnInit", "ngAfterViewInit", "fetchPaymentMethods", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
97479
+ }
97480
+ ngOnInit() {
97481
+ return __awaiter$3(this, void 0, void 0, function* () {
97482
+ yield this.fetchPaymentMethods();
97483
+ this.Stripe.registerCollection(this.collection);
97484
+ this.initialized = true;
97485
+ });
97486
+ }
97487
+ ngAfterViewInit() {
97488
+ }
97489
+ fetchPaymentMethods() {
97490
+ return __awaiter$3(this, void 0, void 0, function* () {
97491
+ yield this.collection.fetch();
97492
+ });
97493
+ }
97494
+ };
97495
+ __decorate$6([
97496
+ Input(),
97497
+ __metadata$6("design:type", String)
97498
+ ], StripePaymentMethodListComponent.prototype, "elementId", void 0);
97499
+ __decorate$6([
97500
+ Input(),
97501
+ __metadata$6("design:type", Boolean)
97502
+ ], StripePaymentMethodListComponent.prototype, "detailedBillingInfo", void 0);
97503
+ StripePaymentMethodListComponent = __decorate$6([
97504
+ Component({
97505
+ selector: `sa-${packageName$2}-${componentName$2}`,
97506
+ templateUrl: `${localDir$4}${componentName$2}.component${min$4}.html`,
97507
+ }),
97508
+ __metadata$6("design:paramtypes", [ElementRef,
97509
+ DomSanitizer,
97510
+ StripeService])
97511
+ ], StripePaymentMethodListComponent);
97512
+
97513
+ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
97514
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
97515
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
97516
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
97517
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
97518
+ };
97519
+ var __metadata$5 = (undefined && undefined.__metadata) || function (k, v) {
97520
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
97521
+ };
97522
+ var __awaiter$2 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
97523
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
97524
+ return new (P || (P = Promise))(function (resolve, reject) {
97525
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
97526
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
97527
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
97528
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
97529
+ });
97530
+ };
97531
+ const min$3 = !cookie('env') ? '.min' : '';
97532
+ const packageName$1 = 'stripe';
97533
+ const componentName$1 = 'payment-method-selector';
97534
+ const localDir$3 = `${Stratus.BaseUrl}${Stratus.DeploymentPath}@stratusjs/${packageName$1}/src/`;
97535
+ let StripePaymentMethodSelectorComponent = class StripePaymentMethodSelectorComponent extends RootComponent {
97536
+ constructor(elementRef, fb, ref, sanitizer, Stripe) {
97537
+ super();
97538
+ this.elementRef = elementRef;
97539
+ this.fb = fb;
97540
+ this.ref = ref;
97541
+ this.sanitizer = sanitizer;
97542
+ this.Stripe = Stripe;
97543
+ this.title = `${packageName$1}_${componentName$1}_component`;
97544
+ this.styled = false;
97545
+ this.initialized = false;
97546
+ this.disabled = false;
97547
+ this.defaultBillingInfo = { address: {} };
97548
+ this.fieldName = 'paymentSelection';
97549
+ this.fieldNameId = 'paymentSelectionId';
97550
+ this.registry = new Registry();
97551
+ this.form = this.fb.group({
97552
+ [this.fieldName]: new FormControl(),
97553
+ [this.fieldNameId]: new FormControl({ disabled: true })
97554
+ });
97555
+ this.paymentMethodApiPath = 'PaymentMethod';
97556
+ this.uid = uniqueId$3(`sa_${snakeCase(this.title)}_`);
97557
+ Stratus.Instances[this.uid] = this;
97558
+ this.elementId = this.elementId || this.uid;
97559
+ Stratus.Internals.CssLoader(`${localDir$3}${componentName$1}.component${min$3}.css`)
97560
+ .then(() => {
97561
+ this.styled = true;
97562
+ this.refresh();
97563
+ })
97564
+ .catch(() => {
97565
+ console.error('CSS Failed to load for Component:', this);
97566
+ this.styled = false;
97567
+ this.refresh();
97568
+ });
97569
+ this.paymentCollection = new Collection({
97570
+ autoSave: false,
97571
+ target: this.paymentMethodApiPath,
97572
+ watch: true
97573
+ });
97574
+ this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "styled", "initialized", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "registryModel", "disabled", "property", "detailedBillingInfo", "defaultBillingName", "defaultBillingEmail", "defaultBillingPhone", "defaultBillingZip", "defaultBillingState", "defaultBillingCity", "defaultBillingAddress1", "defaultBillingAddress2", "defaultBillingInfo", "fieldName", "fieldNameId", "registry", "fetched", "model", "dataSub", "subscriber", "form", "paymentCollection", "paymentMethodApiPath", "elementRef", "fb", "ref", "sanitizer", "Stripe", "ngOnInit", "fetchPaymentMethods", "valueChanged", "normalizeOut", "normalizeIn", "fetchData", "objectComparisonFunction", "dataDefer", "dataRef", "handleObservableError", "isPMExpired", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
97575
+ if (this.defaultBillingName) {
97576
+ this.defaultBillingInfo.name = this.defaultBillingName;
97577
+ }
97578
+ if (this.defaultBillingEmail) {
97579
+ this.defaultBillingInfo.email = this.defaultBillingEmail;
97580
+ }
97581
+ if (this.defaultBillingPhone) {
97582
+ this.defaultBillingInfo.phone = this.defaultBillingPhone;
97583
+ }
97584
+ if (this.defaultBillingZip) {
97585
+ this.defaultBillingInfo.address.postal_code = this.defaultBillingZip;
97586
+ }
97587
+ if (this.defaultBillingState) {
97588
+ this.defaultBillingInfo.address.state = this.defaultBillingState;
97589
+ }
97590
+ if (this.defaultBillingCity) {
97591
+ this.defaultBillingInfo.address.city = this.defaultBillingCity;
97592
+ }
97593
+ if (this.defaultBillingAddress1) {
97594
+ this.defaultBillingInfo.address.line1 = this.defaultBillingAddress1;
97595
+ }
97596
+ if (this.defaultBillingAddress2) {
97597
+ this.defaultBillingInfo.address.line2 = this.defaultBillingAddress2;
97598
+ }
97599
+ if (this.registryModel !== false && this.registryModel !== 'false') {
97600
+ this.fetchData()
97601
+ .then(data => {
97602
+ if (!data || !(data instanceof EventManager$1)) {
97603
+ console.warn('Unable to bind data from Registry!');
97604
+ return;
97605
+ }
97606
+ const onDataChange = () => {
97607
+ if (!data.completed) {
97608
+ return;
97609
+ }
97610
+ this.dataDefer(this.subscriber);
97611
+ };
97612
+ data.on('change', onDataChange);
97613
+ onDataChange();
97614
+ });
97615
+ this.dataSub = new Observable(subscriber => this.dataDefer(subscriber));
97616
+ this.dataSub.pipe(debounce(() => timer(500)), catchError(this.handleObservableError)).subscribe(evt => {
97617
+ const dataControl = this.form.get(this.fieldName);
97618
+ if (dataControl.value === evt) {
97619
+ if (this.initialized) {
97620
+ this.refresh();
97621
+ }
97622
+ return;
97623
+ }
97624
+ dataControl.patchValue(evt);
97625
+ this.refresh();
97626
+ });
97627
+ }
97628
+ }
97629
+ ngOnInit() {
97630
+ return __awaiter$2(this, void 0, void 0, function* () {
97631
+ const dataControl = this.form.get(this.fieldName);
97632
+ if (this.disabled && this.disabled !== 'false') {
97633
+ dataControl.disable();
97634
+ }
97635
+ dataControl.valueChanges.forEach((value) => {
97636
+ if (!value || !value.completed) {
97637
+ return;
97638
+ }
97639
+ this.valueChanged(value);
97640
+ });
97641
+ yield this.fetchPaymentMethods();
97642
+ this.Stripe.registerCollection(this.paymentCollection);
97643
+ this.initialized = true;
97644
+ });
97645
+ }
97646
+ fetchPaymentMethods() {
97647
+ return __awaiter$2(this, void 0, void 0, function* () {
97648
+ yield this.paymentCollection.fetch();
97649
+ this.refresh();
97650
+ });
97651
+ }
97652
+ valueChanged(value) {
97653
+ if (value) {
97654
+ this.form.get(this.fieldNameId).setValue(value.get('id'));
97655
+ }
97656
+ if (!this.model ||
97657
+ !this.model.completed) {
97658
+ return;
97659
+ }
97660
+ this.model.set(this.property, this.normalizeOut(value));
97661
+ }
97662
+ normalizeOut(model) {
97663
+ return model.data;
97664
+ }
97665
+ normalizeIn(data) {
97666
+ if (!data) {
97667
+ return null;
97668
+ }
97669
+ return new Model({}, data);
97670
+ }
97671
+ fetchData() {
97672
+ if (this.fetched) {
97673
+ return this.fetched;
97674
+ }
97675
+ return this.fetched = this.registry.fetch(Stratus.Select(this.elementRef.nativeElement), this);
97676
+ }
97677
+ objectComparisonFunction(option, value) {
97678
+ if (!option || !value) {
97679
+ return false;
97680
+ }
97681
+ return option.data.id === value.data.id;
97682
+ }
97683
+ dataDefer(subscriber) {
97684
+ this.subscriber = this.subscriber || subscriber;
97685
+ if (!this.subscriber) {
97686
+ return;
97687
+ }
97688
+ const dataNumber = this.dataRef();
97689
+ this.subscriber.next(dataNumber);
97690
+ }
97691
+ dataRef() {
97692
+ if (!this.model) {
97693
+ return null;
97694
+ }
97695
+ return this.normalizeIn(this.model.get(this.property));
97696
+ }
97697
+ handleObservableError(err) {
97698
+ console.error(err);
97699
+ return err;
97700
+ }
97701
+ isPMExpired(paymentMethod) {
97702
+ if (paymentMethod.pending) {
97703
+ return false;
97704
+ }
97705
+ const d = new Date();
97706
+ const month = d.getMonth() + 1;
97707
+ const year = d.getFullYear();
97708
+ if (paymentMethod.data.exp_year < year) {
97709
+ return true;
97710
+ }
97711
+ if (paymentMethod.data.exp_year > year) {
97712
+ return false;
97713
+ }
97714
+ return paymentMethod.data.exp_month < month;
97715
+ }
97716
+ };
97717
+ __decorate$5([
97718
+ Input(),
97719
+ __metadata$5("design:type", String)
97720
+ ], StripePaymentMethodSelectorComponent.prototype, "elementId", void 0);
97721
+ __decorate$5([
97722
+ Input(),
97723
+ __metadata$5("design:type", String)
97724
+ ], StripePaymentMethodSelectorComponent.prototype, "target", void 0);
97725
+ __decorate$5([
97726
+ Input(),
97727
+ __metadata$5("design:type", String)
97728
+ ], StripePaymentMethodSelectorComponent.prototype, "targetSuffix", void 0);
97729
+ __decorate$5([
97730
+ Input(),
97731
+ __metadata$5("design:type", Number)
97732
+ ], StripePaymentMethodSelectorComponent.prototype, "id", void 0);
97733
+ __decorate$5([
97734
+ Input(),
97735
+ __metadata$5("design:type", Boolean)
97736
+ ], StripePaymentMethodSelectorComponent.prototype, "manifest", void 0);
97737
+ __decorate$5([
97738
+ Input(),
97739
+ __metadata$5("design:type", Boolean)
97740
+ ], StripePaymentMethodSelectorComponent.prototype, "decouple", void 0);
97741
+ __decorate$5([
97742
+ Input(),
97743
+ __metadata$5("design:type", Boolean)
97744
+ ], StripePaymentMethodSelectorComponent.prototype, "direct", void 0);
97745
+ __decorate$5([
97746
+ Input(),
97747
+ __metadata$5("design:type", Object)
97748
+ ], StripePaymentMethodSelectorComponent.prototype, "api", void 0);
97749
+ __decorate$5([
97750
+ Input(),
97751
+ __metadata$5("design:type", String)
97752
+ ], StripePaymentMethodSelectorComponent.prototype, "urlRoot", void 0);
97753
+ __decorate$5([
97754
+ Input(),
97755
+ __metadata$5("design:type", Object)
97756
+ ], StripePaymentMethodSelectorComponent.prototype, "registryModel", void 0);
97757
+ __decorate$5([
97758
+ Input(),
97759
+ __metadata$5("design:type", Object)
97760
+ ], StripePaymentMethodSelectorComponent.prototype, "disabled", void 0);
97761
+ __decorate$5([
97762
+ Input(),
97763
+ __metadata$5("design:type", String)
97764
+ ], StripePaymentMethodSelectorComponent.prototype, "property", void 0);
97765
+ __decorate$5([
97766
+ Input(),
97767
+ __metadata$5("design:type", Boolean)
97768
+ ], StripePaymentMethodSelectorComponent.prototype, "detailedBillingInfo", void 0);
97769
+ __decorate$5([
97770
+ Input(),
97771
+ __metadata$5("design:type", String)
97772
+ ], StripePaymentMethodSelectorComponent.prototype, "defaultBillingName", void 0);
97773
+ __decorate$5([
97774
+ Input(),
97775
+ __metadata$5("design:type", String)
97776
+ ], StripePaymentMethodSelectorComponent.prototype, "defaultBillingEmail", void 0);
97777
+ __decorate$5([
97778
+ Input(),
97779
+ __metadata$5("design:type", String)
97780
+ ], StripePaymentMethodSelectorComponent.prototype, "defaultBillingPhone", void 0);
97781
+ __decorate$5([
97782
+ Input(),
97783
+ __metadata$5("design:type", String)
97784
+ ], StripePaymentMethodSelectorComponent.prototype, "defaultBillingZip", void 0);
97785
+ __decorate$5([
97786
+ Input(),
97787
+ __metadata$5("design:type", String)
97788
+ ], StripePaymentMethodSelectorComponent.prototype, "defaultBillingState", void 0);
97789
+ __decorate$5([
97790
+ Input(),
97791
+ __metadata$5("design:type", String)
97792
+ ], StripePaymentMethodSelectorComponent.prototype, "defaultBillingCity", void 0);
97793
+ __decorate$5([
97794
+ Input(),
97795
+ __metadata$5("design:type", String)
97796
+ ], StripePaymentMethodSelectorComponent.prototype, "defaultBillingAddress1", void 0);
97797
+ __decorate$5([
97798
+ Input(),
97799
+ __metadata$5("design:type", String)
97800
+ ], StripePaymentMethodSelectorComponent.prototype, "defaultBillingAddress2", void 0);
97801
+ StripePaymentMethodSelectorComponent = __decorate$5([
97802
+ Component({
97803
+ selector: `sa-${packageName$1}-${componentName$1}`,
97804
+ templateUrl: `${localDir$3}${componentName$1}.component${min$3}.html`,
97805
+ changeDetection: ChangeDetectionStrategy$1.OnPush
97806
+ }),
97807
+ __metadata$5("design:paramtypes", [ElementRef,
97808
+ FormBuilder,
97809
+ ChangeDetectorRef,
97810
+ DomSanitizer,
97811
+ StripeService])
97812
+ ], StripePaymentMethodSelectorComponent);
97813
+
97814
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
97815
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
97816
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
97817
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
97818
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
97819
+ };
97820
+ var __metadata$4 = (undefined && undefined.__metadata) || function (k, v) {
97821
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
97822
+ };
97823
+ var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
97824
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
97825
+ return new (P || (P = Promise))(function (resolve, reject) {
97826
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
97827
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
97828
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
97829
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
97830
+ });
97831
+ };
97832
+ const packageName = 'stripe';
97833
+ const componentName = 'setup-intent';
97834
+ let StripeSetupIntentComponent = class StripeSetupIntentComponent extends RootComponent {
97835
+ constructor(elementRef, sanitizer, dialog) {
97836
+ super();
97837
+ this.elementRef = elementRef;
97838
+ this.sanitizer = sanitizer;
97839
+ this.dialog = dialog;
97840
+ this.title = `${packageName}_${componentName}_component`;
97841
+ this.styled = false;
97842
+ this.initialized = false;
97843
+ this.newPaymentMethodPrompt = false;
97844
+ this.newPaymentMethodPending = false;
97845
+ this.paymentMethodApiPath = 'PaymentMethod';
97846
+ this.uid = uniqueId$3(`sa_${snakeCase(this.title)}_`);
97847
+ Stratus.Instances[this.uid] = this;
97848
+ this.elementId = this.elementId || this.uid;
97849
+ this.hydrate(this.elementRef, this.sanitizer, ["title", "uid", "elementId", "styled", "initialized", "newPaymentMethodPrompt", "newPaymentMethodPending", "detailedBillingInfo", "defaultBillingInfo", "paymentMethodApiPath", "elementRef", "sanitizer", "dialog", "ngOnInit", "addPaymentMethod", "inputPaymentMethod", "hydrate", "ref", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
97850
+ }
97851
+ ngOnInit() {
97852
+ this.initialized = true;
97853
+ }
97854
+ addPaymentMethod(ev) {
97855
+ return __awaiter$1(this, void 0, void 0, function* () {
97856
+ if (!this.newPaymentMethodPending && !this.newPaymentMethodPrompt) {
97857
+ let clientSecret = '';
97858
+ let publishKey = '';
97859
+ let formMessage = '';
97860
+ this.newPaymentMethodPending = true;
97861
+ const model = new Model({
97862
+ target: this.paymentMethodApiPath
97863
+ });
97864
+ model.data.setupIntent = true;
97865
+ yield model.save();
97866
+ if (Object.prototype.hasOwnProperty.call(model, 'meta') &&
97867
+ Object.prototype.hasOwnProperty.call(model.meta, 'data')) {
97868
+ if (Object.prototype.hasOwnProperty.call(model.meta.data, 'clientSecret') &&
97869
+ Object.prototype.hasOwnProperty.call(model.meta.data, 'publishKey') &&
97870
+ !isEmpty(model.meta.data.clientSecret) &&
97871
+ !isEmpty(model.meta.data.publishKey)) {
97872
+ clientSecret = model.meta.data.clientSecret;
97873
+ publishKey = model.meta.data.publishKey;
97874
+ }
97875
+ if (Object.prototype.hasOwnProperty.call(model.meta.data, 'formMessage') &&
97876
+ !isEmpty(model.meta.data.formMessage)) {
97877
+ formMessage = model.meta.data.formMessage;
97878
+ }
97879
+ }
97880
+ if (!isEmpty(clientSecret) &&
97881
+ !isEmpty(publishKey)) {
97882
+ this.newPaymentMethodPrompt = true;
97883
+ this.inputPaymentMethod(clientSecret, publishKey, formMessage, ev);
97884
+ }
97885
+ this.newPaymentMethodPending = false;
97886
+ }
97887
+ });
97888
+ }
97889
+ inputPaymentMethod(clientSecret, publishKey, formMessage, ev) {
97890
+ if (ev) {
97891
+ ev.preventDefault();
97892
+ }
97893
+ formMessage = formMessage || '';
97894
+ this.newPaymentMethodPrompt = true;
97895
+ const dialogRef = this.dialog.open(StripePaymentMethodComponent, {
97896
+ width: '1000px',
97897
+ data: {
97898
+ clientSecret,
97899
+ publishKey,
97900
+ formMessage,
97901
+ detailedBillingInfo: this.detailedBillingInfo,
97902
+ defaultBillingInfo: this.defaultBillingInfo
97903
+ }
97904
+ });
97905
+ dialogRef.afterClosed().subscribe((result) => {
97906
+ this.newPaymentMethodPrompt = false;
97907
+ if (!result || isEmpty(result)) {
97908
+ return;
97909
+ }
97910
+ });
97911
+ }
97912
+ };
97913
+ __decorate$4([
97914
+ Input(),
97915
+ __metadata$4("design:type", String)
97916
+ ], StripeSetupIntentComponent.prototype, "elementId", void 0);
97917
+ __decorate$4([
97918
+ Input(),
97919
+ __metadata$4("design:type", Boolean)
97920
+ ], StripeSetupIntentComponent.prototype, "detailedBillingInfo", void 0);
97921
+ __decorate$4([
97922
+ Input(),
97923
+ __metadata$4("design:type", Object)
97924
+ ], StripeSetupIntentComponent.prototype, "defaultBillingInfo", void 0);
97925
+ StripeSetupIntentComponent = __decorate$4([
97926
+ Component({
97927
+ selector: `sa-${packageName}-${componentName}`,
97928
+ template: '<button mat-raised-button (click)="addPaymentMethod($event)" [disabled]="newPaymentMethodPending || newPaymentMethodPrompt">Add Payment Method</button>',
97929
+ }),
97930
+ __metadata$4("design:paramtypes", [ElementRef,
97931
+ DomSanitizer,
97932
+ MatDialog])
97933
+ ], StripeSetupIntentComponent);
97934
+
96905
97935
  var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
96906
97936
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
96907
97937
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -101393,6 +102423,8 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
101393
102423
  'sa-map': MapComponent,
101394
102424
  'sa-media-selector': MediaSelectorComponent,
101395
102425
  'sa-selector': SelectorComponent,
102426
+ 'sa-stripe-payment-method-list': StripePaymentMethodListComponent,
102427
+ 'sa-stripe-payment-method-selector': StripePaymentMethodSelectorComponent,
101396
102428
  'sa-tree': TreeComponent
101397
102429
  };
101398
102430
  Stratus.Instances[_.uniqueId('sa_app_module_')] = this;
@@ -101452,6 +102484,11 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
101452
102484
  MediaDialogComponent,
101453
102485
  MediaSelectorComponent,
101454
102486
  SelectorComponent,
102487
+ StripePaymentMethodComponent,
102488
+ StripePaymentMethodItemComponent,
102489
+ StripePaymentMethodListComponent,
102490
+ StripePaymentMethodSelectorComponent,
102491
+ StripeSetupIntentComponent,
101455
102492
  TreeComponent,
101456
102493
  TreeDialogComponent,
101457
102494
  TreeNodeComponent,
@@ -101467,6 +102504,11 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
101467
102504
  MediaDialogComponent,
101468
102505
  MediaSelectorComponent,
101469
102506
  SelectorComponent,
102507
+ StripePaymentMethodComponent,
102508
+ StripePaymentMethodItemComponent,
102509
+ StripePaymentMethodListComponent,
102510
+ StripePaymentMethodSelectorComponent,
102511
+ StripeSetupIntentComponent,
101470
102512
  TreeComponent,
101471
102513
  TreeDialogComponent,
101472
102514
  TreeNodeComponent,
@@ -108077,7 +109119,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
108077
109119
  return visitor.visitBoundEvent(this);
108078
109120
  }
108079
109121
  }
108080
- let Element$1 = class Element {
109122
+ class Element$1 {
108081
109123
  constructor(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
108082
109124
  this.name = name;
108083
109125
  this.attributes = attributes;
@@ -108093,7 +109135,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
108093
109135
  visit(visitor) {
108094
109136
  return visitor.visitElement(this);
108095
109137
  }
108096
- };
109138
+ }
108097
109139
  class Template {
108098
109140
  constructor(tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) {
108099
109141
  this.tagName = tagName;
@@ -113707,7 +114749,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
113707
114749
  return visitor.visitAttribute(this, context);
113708
114750
  }
113709
114751
  }
113710
- let Element$1$1 = class Element$1 extends NodeWithI18n {
114752
+ class Element$1$1 extends NodeWithI18n {
113711
114753
  constructor(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n) {
113712
114754
  super(sourceSpan, i18n);
113713
114755
  this.name = name;
@@ -113719,7 +114761,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
113719
114761
  visit(visitor, context) {
113720
114762
  return visitor.visitElement(this, context);
113721
114763
  }
113722
- };
114764
+ }
113723
114765
  class Comment$1 {
113724
114766
  constructor(value, sourceSpan) {
113725
114767
  this.value = value;