pacem 0.20.0-jericho → 0.20.0-kish

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.
Files changed (53) hide show
  1. package/dist/css/pacem-dark-content.min.css +1 -1
  2. package/dist/css/pacem-dark-shell.min.css +1 -1
  3. package/dist/css/pacem-dark.min.css +1 -1
  4. package/dist/css/pacem-light-content.min.css +1 -1
  5. package/dist/css/pacem-light-shell.min.css +1 -1
  6. package/dist/css/pacem-light.min.css +1 -1
  7. package/dist/css/pacem-phousys-content.min.css +1 -1
  8. package/dist/css/pacem-phousys-shell.min.css +1 -1
  9. package/dist/css/pacem-phousys.min.css +1 -1
  10. package/dist/js/azure-maps.d.ts +1 -1
  11. package/dist/js/pacem-2d.d.ts +1 -1
  12. package/dist/js/pacem-2d.js +1 -1
  13. package/dist/js/pacem-2d.min.js +1 -1
  14. package/dist/js/pacem-3d.d.ts +1 -1
  15. package/dist/js/pacem-3d.js +1 -1
  16. package/dist/js/pacem-3d.min.js +1 -1
  17. package/dist/js/pacem-charts.d.ts +1 -1
  18. package/dist/js/pacem-charts.js +1 -1
  19. package/dist/js/pacem-charts.min.js +1 -1
  20. package/dist/js/pacem-cms.d.ts +1 -1
  21. package/dist/js/pacem-cms.js +1 -1
  22. package/dist/js/pacem-cms.min.js +1 -1
  23. package/dist/js/pacem-core.d.ts +1 -1
  24. package/dist/js/pacem-core.js +1 -1
  25. package/dist/js/pacem-core.min.js +1 -1
  26. package/dist/js/pacem-foundation.d.ts +1 -1
  27. package/dist/js/pacem-foundation.js +1 -1
  28. package/dist/js/pacem-foundation.min.js +1 -1
  29. package/dist/js/pacem-fx.d.ts +1 -1
  30. package/dist/js/pacem-fx.js +1 -1
  31. package/dist/js/pacem-fx.min.js +1 -1
  32. package/dist/js/pacem-logging.d.ts +1 -1
  33. package/dist/js/pacem-logging.js +1 -1
  34. package/dist/js/pacem-logging.min.js +1 -1
  35. package/dist/js/pacem-maps.d.ts +1 -1
  36. package/dist/js/pacem-maps.js +1 -1
  37. package/dist/js/pacem-maps.min.js +1 -1
  38. package/dist/js/pacem-networking.js +1 -1
  39. package/dist/js/pacem-networking.min.js +1 -1
  40. package/dist/js/pacem-numerical.d.ts +1 -1
  41. package/dist/js/pacem-numerical.js +1 -1
  42. package/dist/js/pacem-numerical.min.js +1 -1
  43. package/dist/js/pacem-plus.d.ts +9 -1
  44. package/dist/js/pacem-plus.js +64 -4
  45. package/dist/js/pacem-plus.min.js +2 -2
  46. package/dist/js/pacem-scaffolding.d.ts +1 -1
  47. package/dist/js/pacem-scaffolding.js +1 -1
  48. package/dist/js/pacem-scaffolding.min.js +1 -1
  49. package/dist/js/pacem-ui.d.ts +1 -1
  50. package/dist/js/pacem-ui.js +1 -1
  51. package/dist/js/pacem-ui.min.js +1 -1
  52. package/dist/js/swagger-types.d.ts +1 -1
  53. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -164,9 +164,15 @@ declare namespace Pacem.Components.Plus {
164
164
  class RisolutoHashStateElement extends PacemEventTarget {
165
165
  #private;
166
166
  router: Pacem.Components.PacemRouterElement;
167
+ default: {
168
+ [key: string]: any;
169
+ };
167
170
  state: {
168
171
  [key: string]: any;
169
172
  };
173
+ normalizedState: {
174
+ [key: string]: string;
175
+ };
170
176
  viewActivatedCallback(): void;
171
177
  propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
172
178
  disconnectedCallback(): void;
@@ -179,6 +185,8 @@ declare namespace Pacem.Components.Plus {
179
185
  private _areStatesEquivalent;
180
186
  private _updateStateFromURI;
181
187
  private _updateURIFromState;
188
+ private _cleanupStateForURI;
189
+ private _normalizeState;
182
190
  set(key: string, value: any): void;
183
191
  }
184
192
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -838,7 +838,9 @@ var Pacem;
838
838
  let RisolutoHashStateElement = class RisolutoHashStateElement extends Components.PacemEventTarget {
839
839
  constructor() {
840
840
  super(...arguments);
841
+ this.default = {};
841
842
  this.state = {};
843
+ this.normalizedState = {};
842
844
  _RisolutoHashStateElement_locked.set(this, void 0);
843
845
  this._routerNavigatingHandler = (_) => {
844
846
  __classPrivateFieldSet(this, _RisolutoHashStateElement_locked, true, "f");
@@ -857,6 +859,7 @@ var Pacem;
857
859
  super.propertyChangedCallback(name, old, val, first);
858
860
  switch (name) {
859
861
  case 'state':
862
+ this.normalizedState = this._normalizeState(val);
860
863
  if (!first) {
861
864
  this._updateURIFromState();
862
865
  }
@@ -866,6 +869,9 @@ var Pacem;
866
869
  this._updateStateFromURI();
867
870
  }
868
871
  break;
872
+ case 'default':
873
+ this._updateStateFromURI();
874
+ break;
869
875
  case 'router':
870
876
  if (!first) {
871
877
  this._disposeRouterHandlers(old);
@@ -916,7 +922,7 @@ var Pacem;
916
922
  if (this.disabled || __classPrivateFieldGet(this, _RisolutoHashStateElement_locked, "f")) {
917
923
  return;
918
924
  }
919
- var state = {};
925
+ var state = Pacem.Utils.extend({}, this.default || {});
920
926
  const router = this.router;
921
927
  if (!Pacem.Utils.isNull(router)) {
922
928
  Pacem.Utils.extend(state, Pacem.Utils.URIs.parseQuery(router.state && router.state.$hash || '{}'));
@@ -925,7 +931,7 @@ var Pacem;
925
931
  this.state = state;
926
932
  }
927
933
  }
928
- _updateURIFromState(state = this.state) {
934
+ _updateURIFromState(state = this.normalizedState) {
929
935
  if (this.disabled || __classPrivateFieldGet(this, _RisolutoHashStateElement_locked, "f")) {
930
936
  return;
931
937
  }
@@ -935,12 +941,60 @@ var Pacem;
935
941
  const currentState = Pacem.Utils.URIs.parseQuery(router.state.$hash || '{}'), targetState = state || {};
936
942
  if (!this._areStatesEquivalent(currentState, targetState)) {
937
943
  // checked state equivalence to avoid superfluous navigation
938
- const url = Pacem.Utils.URIs.appendQuery(actual, state, false, true);
944
+ const clean = this._cleanupStateForURI(targetState);
945
+ var url = actual;
946
+ if (!Pacem.Utils.isNullOrEmpty(clean)) {
947
+ url = Pacem.Utils.URIs.appendQuery(actual, clean, false, true);
948
+ }
939
949
  // navigate
940
950
  router.path = url;
941
951
  }
942
952
  }
943
953
  }
954
+ _cleanupStateForURI(state = this.state) {
955
+ const copy = Pacem.Utils.clone(state || {}), base = this.default;
956
+ for (let key in copy) {
957
+ if (Pacem.Utils.isNullOrEmpty(copy[key])
958
+ || (!Pacem.Utils.isNull(base) && (key in base) && base[key] /* keep non-strict equivalence */ == copy[key])) {
959
+ delete copy[key];
960
+ }
961
+ else {
962
+ }
963
+ }
964
+ return copy;
965
+ }
966
+ _normalizeState(state = this.state) {
967
+ var output = {};
968
+ for (let key in state || {}) {
969
+ const value = state[key];
970
+ if (Pacem.Utils.isNullOrEmpty(value)) {
971
+ continue;
972
+ }
973
+ switch (typeof value) {
974
+ case 'number':
975
+ case 'bigint':
976
+ case 'boolean':
977
+ output[key] = value.toString();
978
+ break;
979
+ case 'symbol':
980
+ case 'string':
981
+ Object.defineProperty(output, key, { enumerable: true, value });
982
+ break;
983
+ default:
984
+ if (Pacem.Utils.Dates.isDate(value)) {
985
+ Object.defineProperty(output, key, { enumerable: true, value: value.toISOString() });
986
+ }
987
+ else if (value instanceof RegExp) {
988
+ Object.defineProperty(output, key, { enumerable: true, value: value.source });
989
+ }
990
+ else {
991
+ throw new Error('Type not supported to be normalized into a URI hash.');
992
+ }
993
+ break;
994
+ }
995
+ }
996
+ return output;
997
+ }
944
998
  set(key, value) {
945
999
  const obj = Object.defineProperty({}, key, { enumerable: true, value });
946
1000
  this.state = Pacem.Utils.extend({}, this.state || {}, obj);
@@ -950,9 +1004,15 @@ var Pacem;
950
1004
  __decorate([
951
1005
  Pacem.Watch({ emit: false, converter: Pacem.PropertyConverters.Element })
952
1006
  ], RisolutoHashStateElement.prototype, "router", void 0);
1007
+ __decorate([
1008
+ Pacem.Watch({ emit: false, converter: Pacem.PropertyConverters.Json })
1009
+ ], RisolutoHashStateElement.prototype, "default", void 0);
953
1010
  __decorate([
954
1011
  Pacem.Watch()
955
1012
  ], RisolutoHashStateElement.prototype, "state", void 0);
1013
+ __decorate([
1014
+ Pacem.Watch()
1015
+ ], RisolutoHashStateElement.prototype, "normalizedState", void 0);
956
1016
  RisolutoHashStateElement = __decorate([
957
1017
  Pacem.CustomElement({ tagName: Pacem.P + '-router-hash-state' })
958
1018
  ], RisolutoHashStateElement);
@@ -1,6 +1,6 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
6
- var Pacem,__decorate=this&&this.__decorate||function(e,t,a,o){var r,i=arguments.length,n=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,a,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(i<3?r(n):i>3?r(t,a,n):r(t,a))||n);return i>3&&n&&Object.defineProperty(t,a,n),n},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,a,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(e,a):r?r.value=a:t.set(e,a),a},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,a,o){if("a"===a&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?o:"a"===a?o.call(e):o?o.value:t.get(e)};!function(e){!function(t){!function(a){let o=class PacemCarouselElement extends t.UI.PacemAdaptedIterativeElement{constructor(){super(...arguments),this.interval=4e3}};__decorate([e.ViewChild(e.P+"-adapter")],o.prototype,"adapter",void 0),__decorate([e.ViewChild(e.P+"-slideshow")],o.prototype,"slideshow",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Number})],o.prototype,"interval",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],o.prototype,"pausable",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-carousel",shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-repeater datasource="{{ :host.datasource }}">\n <${e.P}-slideshow class="${e.PCSS}-carousel" adapter="{{ ::adapter }}" index="{{ :host.index, twoway }}" on-load="this.focus()">\n\n <template>\n\n <${e.P}-slide class="${e.PCSS}-carousel-item" css-class="{{ { '${e.PCSS}-carousel-previous': :host.isPrevious(^index, ::slideshow.index), '${e.PCSS}-carousel-next': :host.isNext(^index, ::slideshow.index), '${e.PCSS}-carousel-focus': ^index === ::slideshow.index } }}">\n <${e.P}-a href="{{ ^item.url }}">\n <${e.P}-img disabled="{{ !:host.isCloseTo(^index, ::slideshow.index) }}" class="${e.PCSS}-carousel-splash" adapt="cover" src="{{ ^item.image }}"></${e.P}-img>\n <div class="${e.PCSS}-carousel-content">\n <div class="${e.PCSS}-carousel-caption">\n <h3><${e.P}-text text="{{ ^item.title }}"></${e.P}-text></h3>\n <${e.P}-panel class="paragraph" content="{{ ^item.content }}"></${e.P}-panel>\n </div>\n </div>\n </${e.P}-a>\n </${e.P}-slide>\n\n </template>\n </${e.P}-slideshow>\n \n </${e.P}-repeater><${e.P}-adapter pausable="{{ :host.pausable }}" class="${e.PCSS}-carousel-adapter" interval="{{ :host.interval }}"></${e.P}-adapter>`})],o),a.PacemCarouselElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){class PacemContextMenuItemElement extends t.PacemItemElement{connectedCallback(){super.connectedCallback(),e.Utils.addClass(this,e.PCSS+"-context-menuitem")}propertyChangedCallback(e,t,a,o){super.propertyChangedCallback(e,t,a,o);const r=this.container;r instanceof i&&r.refresh()}}__decorate([e.Watch({converter:e.PropertyConverters.String})],PacemContextMenuItemElement.prototype,"iconGlyph",void 0),a.PacemContextMenuItemElement=PacemContextMenuItemElement;let o=class PacemContextMenuItemCommandElement extends PacemContextMenuItemElement{};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"commandName",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"caption",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"tooltip",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"iconGlyph",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"confirmationMessage",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Element})],o.prototype,"confirmationDialog",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-context-menuitem-command"})],o),a.PacemContextMenuItemCommandElement=o;let r=class PacemContextMenuItemSeparatorElement extends PacemContextMenuItemElement{};r=__decorate([e.CustomElement({tagName:e.P+"-context-menuitem-separator"})],r),a.PacemContextMenuItemSeparatorElement=r;let i=class PacemContextMenuElement extends t.PacemItemsContainerElement{constructor(){super(...arguments),this._dispatchCommand=t=>{e.avoidHandler(t),this.dispatchEvent(new e.CommandEvent({commandName:t.detail.commandName,commandArgument:t.detail.commandArgument||this.commandArgument}))}}validate(e){return e instanceof PacemContextMenuItemElement}get _balloon(){return this._btns.dom[0]}get _repeater(){return this._balloon.querySelector(e.P+"-repeater")}register(e){const t=super.register(e);return t&&this._refreshRepeater(),t}unregister(e){const t=super.unregister(e);return t&&this._refreshRepeater(),t}viewActivatedCallback(){super.viewActivatedCallback(),this._balloon.addEventListener(e.CommandEventName,this._dispatchCommand,!1)}disconnectedCallback(){e.Utils.isNull(this._balloon)||this._balloon.removeEventListener(e.CommandEventName,this._dispatchCommand,!1),super.disconnectedCallback()}refresh(){this._refreshRepeater()}_refreshRepeater(){const t=this._repeater;e.Utils.isNullOrEmpty(t)||(t.datasource=this.items.map((t=>{let a={localName:t.localName};for(let o=0;o<t.attributes.length;o++){let r=t.attributes.item(o).name,i=e.CustomElementUtils.kebabToCamel(r);a[i]=t[i]}return a})))}};__decorate([e.ViewChild(e.P+"-button")],i.prototype,"_btn",void 0),__decorate([e.ViewChild(e.P+"-shell-proxy")],i.prototype,"_btns",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],i.prototype,"commandArgument",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],i.prototype,"icon",void 0),__decorate([e.Debounce(!0)],i.prototype,"_refreshRepeater",null),i=__decorate([e.CustomElement({tagName:e.P+"-context-menu",shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-button class="button-flat ${e.PCSS}-margin margin-0"><${e.P}-icon icon="{{ :host.icon || 'more_horiz' }}"></${e.P}-icon></${e.P}-button>\n<${e.P}-content></${e.P}-content>\n<${e.P}-shell-proxy>\n <${e.P}-balloon target="{{ :host._btn }}" class="${e.PCSS}-contextmenu" options="{{ { trigger: 'click', position: 'x', align: 'auto' } }}">\n <${e.P}-repeater>\n <template>\n <${e.P}-if match="{{ ^item.localName === '${e.P}-context-menuitem-command' }}">\n <${e.P}-button icon-glyph="{{ ^item.iconGlyph }}" hide="{{ ^item.hide }}" disabled="{{ ^item.disabled }}"\n on-mouseup="::_balloon.popout()" tooltip="{{ ^item.tooltip }}"\n confirmation-message="{{ ^item.confirmationMessage }}" confirmation-dialog="{{ ^item.confirmationDialog }}"\n command-name="{{ ^item.commandName }}"><${e.P}-text text="{{ ^item.caption }}"></${e.P}-text></${e.P}-button>\n </${e.P}-if>\n <${e.P}-if match="{{ ^item.localName === '${e.P}-context-menuitem-separator' && !^item.hide }}">\n <hr />\n </${e.P}-if>\n </template>\n </${e.P}-repeater>\n </${e.P}-balloon>\n</${e.P}-shell-proxy>`})],i),a.PacemContextMenuElement=i}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let o;!function(e){e.Text="text",e.Html="html",e.Image="image",e.Markdown="markdown"}(o=a.EditMode||(a.EditMode={}));let r=class PacemEditElement extends t.PacemElement{constructor(a=new e.MarkdownService){super(),this._markdown=a,this._dialogPropertyChangedHandler=e=>{this._dialogPropertyChangedCallback(e)},this._broadcastFetchRequestEventName=e=>{this.dispatchEvent(new t.Scaffolding.ImageFetchRequestEvent(e.detail))},this._innerValueChangedHandler=t=>{"value"!==t.detail.propertyName||e.Utils.isNull(this._dialog)||(this._dialog.state=t.detail.currentValue)},this._editHandler=e=>{this.edit(e)}}_addButton(){if(e.Utils.isNull(this._button)){var t=document.createElement(e.P+"-button");return t.className=e.PCSS+"-edit-button",t.addEventListener("click",this._editHandler,!1),this._target.appendChild(t),this._button=t}}_removeButton(){var t=this._button;e.Utils.isNull(t)||(t.removeEventListener("click",this._editHandler,!1),t.remove(),this._button=null)}_addDialog(){var a=document.createElement(e.P+"-dialog");return a.buttons=t.UI.DialogButtons.OkCancel,a.addEventListener(e.PropertyChangeEventName,this._dialogPropertyChangedHandler,!1),a.appendChild(this._addTextarea()),a.appendChild(this._addContenteditable()),a.appendChild(this._addEditImage()),document.body.appendChild(a),this._dialog=a}_removeDialog(){this._removeTextarea(),this._removeContenteditable(),this._removeEditImage(),e.Utils.isNull(this._dialog)||(this._dialog.removeEventListener(e.PropertyChangeEventName,this._dialogPropertyChangedHandler,!1),this._dialog.remove())}_addTextarea(){var t=document.createElement(e.P+"-textarea");t.className=e.PCSS+"-edit-text",t.addEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1);const a=this.type||o.Text;return t.hide=a!==o.Text&&a!==o.Markdown,this._textarea=t}_removeTextarea(){e.Utils.isNull(this._textarea)||this._textarea.removeEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1)}_addContenteditable(){var t=document.createElement(e.P+"-contenteditable");t.className=e.PCSS+"-edit-content",t.addEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1);const a=this.type||o.Text;return t.hide=a!==o.Html,this._contenteditable=t}_removeContenteditable(){e.Utils.isNull(this._contenteditable)||this._contenteditable.removeEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1)}_addEditImage(){var a=document.createElement(e.P+"-edit-image");a.disabled=!0,a.addEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1),a.addEventListener(t.Scaffolding.ImageFetchRequestEventName,this._broadcastFetchRequestEventName,!1);const r=this.type||o.Text;return a.hide=r!==o.Image,a.uploadUrl=this.imageUploadUrl,a.allowSnapshot=this.allowSnapshot,a.maxWidth=this.maxImageWidth,a.maxHeight=this.maxImageHeight,this._editImage=a}_removeEditImage(){e.Utils.isNull(this._editImage)||(this._editImage.removeEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1),this._editImage.removeEventListener(t.Scaffolding.ImageFetchRequestEventName,this._broadcastFetchRequestEventName,!1))}_update(t){var a=this._content;switch(this.type){case o.Html:a.innerHTML=t;break;case o.Markdown:switch(a.localName){case e.P+"-markdown":a.value=t;break;default:a.innerHTML=this._markdown.toHtml(t)}break;case o.Image:switch(a.localName){case"img":case e.P+"-img":a.src=t;break;default:a.style.backgroundImage=`url(${t})`}break;default:this._content.textContent=t}}_retrieve(){var t=this._content;switch(this.type){case o.Html:return t.innerHTML;case o.Image:switch(t.localName){case e.P+"-img":case"img":return t.src;default:let a=getComputedStyle(t).backgroundImage,o=/url\(["']?([^'"]+)["']?\)/.exec(a);return o&&o.length&&o[1]}case o.Markdown:return t.value||t.textContent;default:return t.textContent}}_setup(){this.disabled?(e.Utils.removeClass(this._target,e.PCSS+"-editing"),this._removeButton()):(e.Utils.addClass(this._target,e.PCSS+"-editing"),this._addButton())}_dialogPropertyChangedCallback(t){if("state"===t.detail.propertyName){const a=t.detail.currentValue;e.Utils.isNull(this._textarea)||(this._textarea.value=a),e.Utils.isNull(this._contenteditable)||(this._contenteditable.value=a),e.Utils.isNull(this._editImage)||(this._editImage.value=a),this._update(t.detail.currentValue)}}get _target(){var t=this.target;return e.Utils.isNull(t)&&(t=this.firstElementChild),t}connectedCallback(){super.connectedCallback(),this._addDialog()}viewActivatedCallback(){super.viewActivatedCallback(),this._addButton(),this._setup()}disconnectedCallback(){this._removeButton(),this._removeDialog(),super.disconnectedCallback()}propertyChangedCallback(t,a,r,i){switch(super.propertyChangedCallback(t,a,r,i),t){case"imageUploadUrl":e.Utils.isNull(this._editImage)||(this._editImage.uploadUrl=r);break;case"allowSnapshot":e.Utils.isNull(this._editImage)||(this._editImage.allowSnapshot=r);break;case"imageSet":e.Utils.isNull(this._editImage)||(this._editImage.imageSet=r);break;case"disabled":this._setup();break;case"type":const t=r;e.Utils.isNull(this._textarea)||(this._textarea.hide=t!==o.Text&&t!==o.Markdown),e.Utils.isNull(this._contenteditable)||(this._contenteditable.hide=t!==o.Html),e.Utils.isNull(this._editImage)||(this._editImage.hide=t!==o.Image);break;case"maxImageHeight":e.Utils.isNull(this._editImage)||(this._editImage.maxHeight=r);break;case"maxImageWidth":e.Utils.isNull(this._editImage)||(this._editImage.maxWidth=r)}}edit(a){e.avoidHandler(a);var o=this._target;if(!e.Utils.isNull(o)){this._removeButton(),this._content=o;var r=this._state=this._retrieve();e.Utils.isNull(this._editImage)||(this._editImage.disabled=!1),this._dialog.open(r).then((a=>{switch(a.button){case t.UI.DialogButton.Cancel:this._update(this._state);break;case t.UI.DialogButton.Ok:this._update(a.state),this.dispatchEvent(new CustomEvent("commit",{detail:{value:a.state}}))}this._content=null,e.Utils.isNull(this._editImage)||(this._editImage.disabled=!0),this._addButton()}))}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"key",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],r.prototype,"type",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Element})],r.prototype,"target",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"imageUploadUrl",void 0),__decorate([e.Watch({emit:!1})],r.prototype,"imageSet",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"maxImageWidth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"maxImageHeight",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],r.prototype,"allowSnapshot",void 0),r=__decorate([e.CustomElement({tagName:e.P+"-edit"})],r),a.PacemEditElement=r}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let o=class PacemGalleryElement extends t.UI.PacemAdaptedIterativeElement{get adapter(){return this._adapter}async _heroAnimate(t,a){if(!e.Utils.isNull(t)){let o=document.createElement(e.P+"-img"),r=this._heroPlaceholderProxy.dom[0];const i=300;o.src=a||t.src,o.adapt="contain";let n=e.Utils.offset(r),s=e.Utils.offset(t),l=o.style;const d=getComputedStyle(r);l.border=d.border,l.width=r.clientWidth+"px",l.height=r.clientHeight+"px",l.position="absolute",l.zIndex=d.zIndex,l.top=n.top+"px",l.left=n.left+"px";const c=t.clientWidth/r.clientWidth,h=t.clientHeight/r.clientHeight,m=s.left-n.left+"px",p=s.top-n.top+"px";l.transformOrigin="0 0",l.transition=`transform cubic-bezier(0.445, 0.05, 0.55, 0.95) ${i}ms, opacity ${i}ms`,l.transform=`translate(${m}, ${p}) scale(${c}, ${h})`,document.body.appendChild(o),requestAnimationFrame((()=>{o.style.transform=""})),await e.Utils.waitForAnimationEnd(o,i),o.remove()}}open(e,t,a){this._poppingUp=!0,this._lightbox.show=!0,this._slideshow.index=e,this._heroAnimate(t,a).then((e=>{this._poppingUp=!1,this._slideshow.focus()}))}};__decorate([e.ViewChild(e.P+"-adapter")],o.prototype,"_adapter",void 0),__decorate([e.ViewChild(e.P+"-lightbox")],o.prototype,"_lightbox",void 0),__decorate([e.ViewChild(e.P+"-slideshow")],o.prototype,"_slideshow",void 0),__decorate([e.ViewChild(e.P+"-shell-proxy")],o.prototype,"_heroPlaceholderProxy",void 0),__decorate([e.Watch()],o.prototype,"_poppingUp",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-gallery",shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-lightbox class="${e.PCSS}-gallery">\n <${e.P}-repeater datasource="{{ :host.datasource }}">\n <${e.P}-slideshow adapter="{{ ::_adapter }}" index="{{ :host.index, twoway }}">\n <template>\n <${e.P}-slide class="${e.PCSS}-gallery-item"\ncss-class="{{ { '${e.PCSS}-gallery-previous': :host.isPrevious(^index, ::_slideshow.index), '${e.PCSS}-gallery-next': :host.isNext(^index, ::_slideshow.index), '${e.PCSS}-gallery-focus': ^index === ::_slideshow.index } }}"\n>\n <${e.P}-img src="{{ ^item.image }}" disabled="{{ !(:host.isCloseTo(^index, ::_slideshow.index) || ^index === ::_slideshow.index) }}" \ncss="{{ {'visibility': (:host._poppingUp ? 'hidden' : ''), 'transition': (:host._poppingUp ? 'none' : '')} }}" class="${e.PCSS}-gallery-splash" adapt="contain"></${e.P}-img>\n <${e.P}-panel hide="{{ $pacem.isNullOrEmpty(^item.caption) }}" class="${e.PCSS}-gallery-caption">\n <${e.P}-span class="paragraph" text="{{ ^item.caption }}"></${e.P}-span>\n </${e.P}-panel>\n \n </${e.P}-slide>\n </template>\n </${e.P}-slideshow>\n </${e.P}-repeater>\n<${e.P}-adapter class="${e.PCSS}-gallery-adapter"></${e.P}-adapter>\n</${e.P}-lightbox>\n<${e.P}-shell-proxy><div class="${e.PCSS}-gallery-hero-target"></div></${e.P}-shell-proxy>`})],o),a.PacemGalleryElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){var o,r;let i=r=class PacemModalFormElement extends t.UI.PacemDialogBase{constructor(){super(),this.method=e.Net.HttpMethod.Post,o.set(this,!1),this._emitter=new e.Components.Scaffolding.FormEventEmitter(this)}viewActivatedCallback(){super.viewActivatedCallback();var t=this.querySelector(`.${e.PCSS}-lightbox`);t.appendChild(this._buttons=this.querySelector(`.${e.PCSS}-dialog-buttons`)),t.appendChild(this.querySelector(`.${e.PCSS}-dialog-heading`)),t.appendChild(this.querySelector(e.P+"-loader")),this.dispatchEvent(new e.PropertyChangeEvent({propertyName:"modalButtons",currentValue:this.modalButtons})),this._emitter.start()}disconnectedCallback(){this._emitter.stop(),super.disconnectedCallback()}_submit(a){this.readonly?this.commit(t.UI.DialogButton.Ok,a):(e.avoidHandler(a),e.Utils.isNullOrEmpty(this.action)?this.commit(t.UI.DialogButton.Ok,a):this._form.submit(this._fetcher).then((e=>{this.commit(t.UI.DialogButton.Ok,a)}),(e=>{})))}_onSubmit(e){this.emit(e)}open(t,a,i=!0){if(e.Utils.isNull(t))throw`The state of a ${r} cannot be null.`;__classPrivateFieldSet(this,o,a,"f");var n=super.open(t);return i&&this._form.setPristine(),n}commit(t,a){super.commit(t,a),__classPrivateFieldGet(this,o,"f")||e.Utils.waitForAnimationEnd(this,500).then((e=>{this.state={}}))}_cancel(e){this.commit(t.UI.DialogButton.Cancel,e),this._form.reset()}_broadcast(e){this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail}))}get modalButtons(){const e=this._buttons;return{ok:e&&e.firstElementChild&&e.firstElementChild.firstElementChild,cancel:e&&e.firstElementChild&&e.firstElementChild.lastElementChild}}};o=new WeakMap,__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],i.prototype,"suddenValidation",void 0),__decorate([e.Watch({reflectBack:!0,converter:e.PropertyConverters.String})],i.prototype,"okCaption",void 0),__decorate([e.Watch({reflectBack:!0,converter:e.PropertyConverters.String})],i.prototype,"cancelCaption",void 0),__decorate([e.Watch({reflectBack:!0,converter:e.PropertyConverters.String})],i.prototype,"method",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],i.prototype,"metadata",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],i.prototype,"action",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],i.prototype,"loaderType",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],i.prototype,"success",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],i.prototype,"fail",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],i.prototype,"readonly",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],i.prototype,"fetchHeaders",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],i.prototype,"fetchCredentials",void 0),__decorate([e.ViewChild(e.P+"-lightbox")],i.prototype,"lightbox",void 0),__decorate([e.ViewChild(e.P+"-form[entity]")],i.prototype,"_form",void 0),__decorate([e.ViewChild(e.P+"-fetch")],i.prototype,"_fetcher",void 0),i=r=__decorate([e.CustomElement({tagName:e.P+"-modal-form",shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-lightbox modal="true" logger="{{ :host.logger }}"><${e.P}-form wrapper>\n <${e.P}-form logger="{{ :host.logger }}" on-submit=":host._onSubmit($event)" readonly="{{ :host.readonly }}" entity="{{ :host.state, twoway }}" on-success=":host._broadcast($event)" \n on-fail=":host._broadcast($event)" success="{{ :host.success, twoway }}" fail="{{ :host.fail, twoway }}" autogenerate="{{ !$pacem.isNull($this.entity) }}" metadata="{{ :host.metadata }}"\n fetch-headers="{{ :host.fetchHeaders }}" fetch-credentials="{{ :host.fetchCredentials }}" sudden-validation="{{ :host.suddenValidation }}"></${e.P}-form></${e.P}-form>\n <${e.P}-fetch logger="{{ :host.logger }}" method="{{ :host.method }}" headers="{{ :host.fetchHeaders }}" credentials="{{ :host.fetchCredentials }}" autofetch="false" url="{{ :host.action }}"></${e.P}-fetch> \n <div class="${e.PCSS}-dialog-buttons ${e.PCSS}-buttonset buttons">\n <div class="buttonset-left">\n <${e.P}-button on-click=":host._submit($event)" css-class="{{ {'buttonset-last': :host.readonly} }}"\n class="button primary button-size size-small" disabled="{{ !:host.readonly && (!(::_form.valid && ::_form.dirty) || ::_fetcher.fetching) }}"><${e.P}-text text="{{ :host.okCaption || 'OK' }}"></${e.P}-text></${e.P}-button>\n <${e.P}-button on-click=":host._cancel($event)" hide="{{ :host.readonly }}" class="button button-size size-small" disabled="{{ ::_fetcher.fetching }}"><${e.P}-text text="{{ :host.cancelCaption || 'Cancel' }}"></${e.P}-text></${e.P}-button>\n </div></div>\n <${e.P}-panel class="${e.PCSS}-dialog-heading">\n <${e.P}-content></${e.P}-content>\n </${e.P}-panel>\n <${e.P}-loader type="{{ :host.loaderType }}" class="${e.PCSS}-hover loader-primary loader-small" active="{{ ::_fetcher.fetching }}"></${e.P}-loader>\n</${e.P}-lightbox>`})],i),a.PacemModalFormElement=i}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){var o;let r=class RisolutoHashStateElement extends t.PacemEventTarget{constructor(){super(...arguments),this.state={},o.set(this,void 0),this._routerNavigatingHandler=e=>{__classPrivateFieldSet(this,o,!0,"f")},this._routerNavigateHandler=e=>{__classPrivateFieldSet(this,o,!1,"f"),this._updateStateFromURI()}}viewActivatedCallback(){super.viewActivatedCallback(),this._updateStateFromURI(),this._setupRouterHandlers(this.router)}propertyChangedCallback(e,t,a,o){switch(super.propertyChangedCallback(e,t,a,o),e){case"state":o||this._updateURIFromState();break;case"disabled":a&&this._updateStateFromURI();break;case"router":o||(this._disposeRouterHandlers(t),this._setupRouterHandlers(a))}}disconnectedCallback(){this._disposeRouterHandlers(),super.disconnectedCallback()}_setupRouterHandlers(t=this.router){e.Utils.isNull(t)||(window.addEventListener("navigating",this._routerNavigatingHandler,!1),window.addEventListener("navigate",this._routerNavigateHandler,!1))}_disposeRouterHandlers(t=this.router){e.Utils.isNull(t)||(window.removeEventListener("navigating",this._routerNavigatingHandler,!1),window.removeEventListener("navigate",this._routerNavigateHandler,!1))}_currentBasePath(){const t=this.router;if(!e.Utils.isNull(t)){const e=t.state.$querystring;return this._normalizePath(document.location.pathname,e)}return null}_normalizePath(t,a){return e.Utils.isNullOrEmpty(t)?t:(t.endsWith("/")&&(t=t.substring(0,t.length-1)),null!=a||(a=""),t+(a.length>0?"?"+a:""))}_areStatesEquivalent(t,a){const o=t||{},r=a||{};return e.Utils.jsonSortStringify(o)===e.Utils.jsonSortStringify(r)}_updateStateFromURI(){if(this.disabled||__classPrivateFieldGet(this,o,"f"))return;var t={};const a=this.router;e.Utils.isNull(a)||e.Utils.extend(t,e.Utils.URIs.parseQuery(a.state&&a.state.$hash||"{}")),this._areStatesEquivalent(this.state,t)||(this.state=t)}_updateURIFromState(t=this.state){if(this.disabled||__classPrivateFieldGet(this,o,"f"))return;const a=this.router;if(!e.Utils.isNull(a)){const o=this._currentBasePath(),r=e.Utils.URIs.parseQuery(a.state.$hash||"{}"),i=t||{};if(!this._areStatesEquivalent(r,i)){const r=e.Utils.URIs.appendQuery(o,t,!1,!0);a.path=r}}}set(t,a){const o=Object.defineProperty({},t,{enumerable:!0,value:a});this.state=e.Utils.extend({},this.state||{},o)}};o=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Element})],r.prototype,"router",void 0),__decorate([e.Watch()],r.prototype,"state",void 0),r=__decorate([e.CustomElement({tagName:e.P+"-router-hash-state"})],r),a.RisolutoHashStateElement=r}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let o=class PacemSearchElement extends t.PacemElement{constructor(){super(...arguments),this.hintParameter="q"}propertyChangedCallback(e,t,a,o){if(super.propertyChangedCallback(e,t,a,o),"hint"===e){let e={};e[this.hintParameter]=a,this._fetcher.parameters=e}}};__decorate([e.ViewChild(e.P+"-fetch")],o.prototype,"_fetcher",void 0),__decorate([e.Watch()],o.prototype,"datasource",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],o.prototype,"hint",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],o.prototype,"url",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],o.prototype,"method",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"hintParameter",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-search",shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-fetch debounce="800" url="{{ :host.url }}" method="{{ :host.method }}">\n</${e.P}-fetch><${e.P}-input-search value="{{ :host.hint, twoway }}"></${e.P}-input-search>\n<${e.P}-repeater datasource="{{ ::_fetch.result }}">\n <${e.P}-content></${e.P}-content>\n</${e.P}-repeater>`})],o),a.PacemSearchElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={}));
6
+ var Pacem,__decorate=this&&this.__decorate||function(e,t,a,o){var r,i=arguments.length,n=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,a,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(i<3?r(n):i>3?r(t,a,n):r(t,a))||n);return i>3&&n&&Object.defineProperty(t,a,n),n},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,a,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(e,a):r?r.value=a:t.set(e,a),a},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,a,o){if("a"===a&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?o:"a"===a?o.call(e):o?o.value:t.get(e)};!function(e){!function(t){!function(a){let o=class PacemCarouselElement extends t.UI.PacemAdaptedIterativeElement{constructor(){super(...arguments),this.interval=4e3}};__decorate([e.ViewChild(e.P+"-adapter")],o.prototype,"adapter",void 0),__decorate([e.ViewChild(e.P+"-slideshow")],o.prototype,"slideshow",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Number})],o.prototype,"interval",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],o.prototype,"pausable",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-carousel",shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-repeater datasource="{{ :host.datasource }}">\n <${e.P}-slideshow class="${e.PCSS}-carousel" adapter="{{ ::adapter }}" index="{{ :host.index, twoway }}" on-load="this.focus()">\n\n <template>\n\n <${e.P}-slide class="${e.PCSS}-carousel-item" css-class="{{ { '${e.PCSS}-carousel-previous': :host.isPrevious(^index, ::slideshow.index), '${e.PCSS}-carousel-next': :host.isNext(^index, ::slideshow.index), '${e.PCSS}-carousel-focus': ^index === ::slideshow.index } }}">\n <${e.P}-a href="{{ ^item.url }}">\n <${e.P}-img disabled="{{ !:host.isCloseTo(^index, ::slideshow.index) }}" class="${e.PCSS}-carousel-splash" adapt="cover" src="{{ ^item.image }}"></${e.P}-img>\n <div class="${e.PCSS}-carousel-content">\n <div class="${e.PCSS}-carousel-caption">\n <h3><${e.P}-text text="{{ ^item.title }}"></${e.P}-text></h3>\n <${e.P}-panel class="paragraph" content="{{ ^item.content }}"></${e.P}-panel>\n </div>\n </div>\n </${e.P}-a>\n </${e.P}-slide>\n\n </template>\n </${e.P}-slideshow>\n \n </${e.P}-repeater><${e.P}-adapter pausable="{{ :host.pausable }}" class="${e.PCSS}-carousel-adapter" interval="{{ :host.interval }}"></${e.P}-adapter>`})],o),a.PacemCarouselElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){class PacemContextMenuItemElement extends t.PacemItemElement{connectedCallback(){super.connectedCallback(),e.Utils.addClass(this,e.PCSS+"-context-menuitem")}propertyChangedCallback(e,t,a,o){super.propertyChangedCallback(e,t,a,o);const r=this.container;r instanceof i&&r.refresh()}}__decorate([e.Watch({converter:e.PropertyConverters.String})],PacemContextMenuItemElement.prototype,"iconGlyph",void 0),a.PacemContextMenuItemElement=PacemContextMenuItemElement;let o=class PacemContextMenuItemCommandElement extends PacemContextMenuItemElement{};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"commandName",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"caption",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"tooltip",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"iconGlyph",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"confirmationMessage",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Element})],o.prototype,"confirmationDialog",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-context-menuitem-command"})],o),a.PacemContextMenuItemCommandElement=o;let r=class PacemContextMenuItemSeparatorElement extends PacemContextMenuItemElement{};r=__decorate([e.CustomElement({tagName:e.P+"-context-menuitem-separator"})],r),a.PacemContextMenuItemSeparatorElement=r;let i=class PacemContextMenuElement extends t.PacemItemsContainerElement{constructor(){super(...arguments),this._dispatchCommand=t=>{e.avoidHandler(t),this.dispatchEvent(new e.CommandEvent({commandName:t.detail.commandName,commandArgument:t.detail.commandArgument||this.commandArgument}))}}validate(e){return e instanceof PacemContextMenuItemElement}get _balloon(){return this._btns.dom[0]}get _repeater(){return this._balloon.querySelector(e.P+"-repeater")}register(e){const t=super.register(e);return t&&this._refreshRepeater(),t}unregister(e){const t=super.unregister(e);return t&&this._refreshRepeater(),t}viewActivatedCallback(){super.viewActivatedCallback(),this._balloon.addEventListener(e.CommandEventName,this._dispatchCommand,!1)}disconnectedCallback(){e.Utils.isNull(this._balloon)||this._balloon.removeEventListener(e.CommandEventName,this._dispatchCommand,!1),super.disconnectedCallback()}refresh(){this._refreshRepeater()}_refreshRepeater(){const t=this._repeater;e.Utils.isNullOrEmpty(t)||(t.datasource=this.items.map((t=>{let a={localName:t.localName};for(let o=0;o<t.attributes.length;o++){let r=t.attributes.item(o).name,i=e.CustomElementUtils.kebabToCamel(r);a[i]=t[i]}return a})))}};__decorate([e.ViewChild(e.P+"-button")],i.prototype,"_btn",void 0),__decorate([e.ViewChild(e.P+"-shell-proxy")],i.prototype,"_btns",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],i.prototype,"commandArgument",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],i.prototype,"icon",void 0),__decorate([e.Debounce(!0)],i.prototype,"_refreshRepeater",null),i=__decorate([e.CustomElement({tagName:e.P+"-context-menu",shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-button class="button-flat ${e.PCSS}-margin margin-0"><${e.P}-icon icon="{{ :host.icon || 'more_horiz' }}"></${e.P}-icon></${e.P}-button>\n<${e.P}-content></${e.P}-content>\n<${e.P}-shell-proxy>\n <${e.P}-balloon target="{{ :host._btn }}" class="${e.PCSS}-contextmenu" options="{{ { trigger: 'click', position: 'x', align: 'auto' } }}">\n <${e.P}-repeater>\n <template>\n <${e.P}-if match="{{ ^item.localName === '${e.P}-context-menuitem-command' }}">\n <${e.P}-button icon-glyph="{{ ^item.iconGlyph }}" hide="{{ ^item.hide }}" disabled="{{ ^item.disabled }}"\n on-mouseup="::_balloon.popout()" tooltip="{{ ^item.tooltip }}"\n confirmation-message="{{ ^item.confirmationMessage }}" confirmation-dialog="{{ ^item.confirmationDialog }}"\n command-name="{{ ^item.commandName }}"><${e.P}-text text="{{ ^item.caption }}"></${e.P}-text></${e.P}-button>\n </${e.P}-if>\n <${e.P}-if match="{{ ^item.localName === '${e.P}-context-menuitem-separator' && !^item.hide }}">\n <hr />\n </${e.P}-if>\n </template>\n </${e.P}-repeater>\n </${e.P}-balloon>\n</${e.P}-shell-proxy>`})],i),a.PacemContextMenuElement=i}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let o;!function(e){e.Text="text",e.Html="html",e.Image="image",e.Markdown="markdown"}(o=a.EditMode||(a.EditMode={}));let r=class PacemEditElement extends t.PacemElement{constructor(a=new e.MarkdownService){super(),this._markdown=a,this._dialogPropertyChangedHandler=e=>{this._dialogPropertyChangedCallback(e)},this._broadcastFetchRequestEventName=e=>{this.dispatchEvent(new t.Scaffolding.ImageFetchRequestEvent(e.detail))},this._innerValueChangedHandler=t=>{"value"!==t.detail.propertyName||e.Utils.isNull(this._dialog)||(this._dialog.state=t.detail.currentValue)},this._editHandler=e=>{this.edit(e)}}_addButton(){if(e.Utils.isNull(this._button)){var t=document.createElement(e.P+"-button");return t.className=e.PCSS+"-edit-button",t.addEventListener("click",this._editHandler,!1),this._target.appendChild(t),this._button=t}}_removeButton(){var t=this._button;e.Utils.isNull(t)||(t.removeEventListener("click",this._editHandler,!1),t.remove(),this._button=null)}_addDialog(){var a=document.createElement(e.P+"-dialog");return a.buttons=t.UI.DialogButtons.OkCancel,a.addEventListener(e.PropertyChangeEventName,this._dialogPropertyChangedHandler,!1),a.appendChild(this._addTextarea()),a.appendChild(this._addContenteditable()),a.appendChild(this._addEditImage()),document.body.appendChild(a),this._dialog=a}_removeDialog(){this._removeTextarea(),this._removeContenteditable(),this._removeEditImage(),e.Utils.isNull(this._dialog)||(this._dialog.removeEventListener(e.PropertyChangeEventName,this._dialogPropertyChangedHandler,!1),this._dialog.remove())}_addTextarea(){var t=document.createElement(e.P+"-textarea");t.className=e.PCSS+"-edit-text",t.addEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1);const a=this.type||o.Text;return t.hide=a!==o.Text&&a!==o.Markdown,this._textarea=t}_removeTextarea(){e.Utils.isNull(this._textarea)||this._textarea.removeEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1)}_addContenteditable(){var t=document.createElement(e.P+"-contenteditable");t.className=e.PCSS+"-edit-content",t.addEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1);const a=this.type||o.Text;return t.hide=a!==o.Html,this._contenteditable=t}_removeContenteditable(){e.Utils.isNull(this._contenteditable)||this._contenteditable.removeEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1)}_addEditImage(){var a=document.createElement(e.P+"-edit-image");a.disabled=!0,a.addEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1),a.addEventListener(t.Scaffolding.ImageFetchRequestEventName,this._broadcastFetchRequestEventName,!1);const r=this.type||o.Text;return a.hide=r!==o.Image,a.uploadUrl=this.imageUploadUrl,a.allowSnapshot=this.allowSnapshot,a.maxWidth=this.maxImageWidth,a.maxHeight=this.maxImageHeight,this._editImage=a}_removeEditImage(){e.Utils.isNull(this._editImage)||(this._editImage.removeEventListener(e.PropertyChangeEventName,this._innerValueChangedHandler,!1),this._editImage.removeEventListener(t.Scaffolding.ImageFetchRequestEventName,this._broadcastFetchRequestEventName,!1))}_update(t){var a=this._content;switch(this.type){case o.Html:a.innerHTML=t;break;case o.Markdown:switch(a.localName){case e.P+"-markdown":a.value=t;break;default:a.innerHTML=this._markdown.toHtml(t)}break;case o.Image:switch(a.localName){case"img":case e.P+"-img":a.src=t;break;default:a.style.backgroundImage=`url(${t})`}break;default:this._content.textContent=t}}_retrieve(){var t=this._content;switch(this.type){case o.Html:return t.innerHTML;case o.Image:switch(t.localName){case e.P+"-img":case"img":return t.src;default:let a=getComputedStyle(t).backgroundImage,o=/url\(["']?([^'"]+)["']?\)/.exec(a);return o&&o.length&&o[1]}case o.Markdown:return t.value||t.textContent;default:return t.textContent}}_setup(){this.disabled?(e.Utils.removeClass(this._target,e.PCSS+"-editing"),this._removeButton()):(e.Utils.addClass(this._target,e.PCSS+"-editing"),this._addButton())}_dialogPropertyChangedCallback(t){if("state"===t.detail.propertyName){const a=t.detail.currentValue;e.Utils.isNull(this._textarea)||(this._textarea.value=a),e.Utils.isNull(this._contenteditable)||(this._contenteditable.value=a),e.Utils.isNull(this._editImage)||(this._editImage.value=a),this._update(t.detail.currentValue)}}get _target(){var t=this.target;return e.Utils.isNull(t)&&(t=this.firstElementChild),t}connectedCallback(){super.connectedCallback(),this._addDialog()}viewActivatedCallback(){super.viewActivatedCallback(),this._addButton(),this._setup()}disconnectedCallback(){this._removeButton(),this._removeDialog(),super.disconnectedCallback()}propertyChangedCallback(t,a,r,i){switch(super.propertyChangedCallback(t,a,r,i),t){case"imageUploadUrl":e.Utils.isNull(this._editImage)||(this._editImage.uploadUrl=r);break;case"allowSnapshot":e.Utils.isNull(this._editImage)||(this._editImage.allowSnapshot=r);break;case"imageSet":e.Utils.isNull(this._editImage)||(this._editImage.imageSet=r);break;case"disabled":this._setup();break;case"type":const t=r;e.Utils.isNull(this._textarea)||(this._textarea.hide=t!==o.Text&&t!==o.Markdown),e.Utils.isNull(this._contenteditable)||(this._contenteditable.hide=t!==o.Html),e.Utils.isNull(this._editImage)||(this._editImage.hide=t!==o.Image);break;case"maxImageHeight":e.Utils.isNull(this._editImage)||(this._editImage.maxHeight=r);break;case"maxImageWidth":e.Utils.isNull(this._editImage)||(this._editImage.maxWidth=r)}}edit(a){e.avoidHandler(a);var o=this._target;if(!e.Utils.isNull(o)){this._removeButton(),this._content=o;var r=this._state=this._retrieve();e.Utils.isNull(this._editImage)||(this._editImage.disabled=!1),this._dialog.open(r).then((a=>{switch(a.button){case t.UI.DialogButton.Cancel:this._update(this._state);break;case t.UI.DialogButton.Ok:this._update(a.state),this.dispatchEvent(new CustomEvent("commit",{detail:{value:a.state}}))}this._content=null,e.Utils.isNull(this._editImage)||(this._editImage.disabled=!0),this._addButton()}))}}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"key",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],r.prototype,"type",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Element})],r.prototype,"target",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],r.prototype,"imageUploadUrl",void 0),__decorate([e.Watch({emit:!1})],r.prototype,"imageSet",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"maxImageWidth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],r.prototype,"maxImageHeight",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],r.prototype,"allowSnapshot",void 0),r=__decorate([e.CustomElement({tagName:e.P+"-edit"})],r),a.PacemEditElement=r}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let o=class PacemGalleryElement extends t.UI.PacemAdaptedIterativeElement{get adapter(){return this._adapter}async _heroAnimate(t,a){if(!e.Utils.isNull(t)){let o=document.createElement(e.P+"-img"),r=this._heroPlaceholderProxy.dom[0];const i=300;o.src=a||t.src,o.adapt="contain";let n=e.Utils.offset(r),s=e.Utils.offset(t),l=o.style;const d=getComputedStyle(r);l.border=d.border,l.width=r.clientWidth+"px",l.height=r.clientHeight+"px",l.position="absolute",l.zIndex=d.zIndex,l.top=n.top+"px",l.left=n.left+"px";const c=t.clientWidth/r.clientWidth,h=t.clientHeight/r.clientHeight,m=s.left-n.left+"px",p=s.top-n.top+"px";l.transformOrigin="0 0",l.transition=`transform cubic-bezier(0.445, 0.05, 0.55, 0.95) ${i}ms, opacity ${i}ms`,l.transform=`translate(${m}, ${p}) scale(${c}, ${h})`,document.body.appendChild(o),requestAnimationFrame((()=>{o.style.transform=""})),await e.Utils.waitForAnimationEnd(o,i),o.remove()}}open(e,t,a){this._poppingUp=!0,this._lightbox.show=!0,this._slideshow.index=e,this._heroAnimate(t,a).then((e=>{this._poppingUp=!1,this._slideshow.focus()}))}};__decorate([e.ViewChild(e.P+"-adapter")],o.prototype,"_adapter",void 0),__decorate([e.ViewChild(e.P+"-lightbox")],o.prototype,"_lightbox",void 0),__decorate([e.ViewChild(e.P+"-slideshow")],o.prototype,"_slideshow",void 0),__decorate([e.ViewChild(e.P+"-shell-proxy")],o.prototype,"_heroPlaceholderProxy",void 0),__decorate([e.Watch()],o.prototype,"_poppingUp",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-gallery",shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-lightbox class="${e.PCSS}-gallery">\n <${e.P}-repeater datasource="{{ :host.datasource }}">\n <${e.P}-slideshow adapter="{{ ::_adapter }}" index="{{ :host.index, twoway }}">\n <template>\n <${e.P}-slide class="${e.PCSS}-gallery-item"\ncss-class="{{ { '${e.PCSS}-gallery-previous': :host.isPrevious(^index, ::_slideshow.index), '${e.PCSS}-gallery-next': :host.isNext(^index, ::_slideshow.index), '${e.PCSS}-gallery-focus': ^index === ::_slideshow.index } }}"\n>\n <${e.P}-img src="{{ ^item.image }}" disabled="{{ !(:host.isCloseTo(^index, ::_slideshow.index) || ^index === ::_slideshow.index) }}" \ncss="{{ {'visibility': (:host._poppingUp ? 'hidden' : ''), 'transition': (:host._poppingUp ? 'none' : '')} }}" class="${e.PCSS}-gallery-splash" adapt="contain"></${e.P}-img>\n <${e.P}-panel hide="{{ $pacem.isNullOrEmpty(^item.caption) }}" class="${e.PCSS}-gallery-caption">\n <${e.P}-span class="paragraph" text="{{ ^item.caption }}"></${e.P}-span>\n </${e.P}-panel>\n \n </${e.P}-slide>\n </template>\n </${e.P}-slideshow>\n </${e.P}-repeater>\n<${e.P}-adapter class="${e.PCSS}-gallery-adapter"></${e.P}-adapter>\n</${e.P}-lightbox>\n<${e.P}-shell-proxy><div class="${e.PCSS}-gallery-hero-target"></div></${e.P}-shell-proxy>`})],o),a.PacemGalleryElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){var o,r;let i=r=class PacemModalFormElement extends t.UI.PacemDialogBase{constructor(){super(),this.method=e.Net.HttpMethod.Post,o.set(this,!1),this._emitter=new e.Components.Scaffolding.FormEventEmitter(this)}viewActivatedCallback(){super.viewActivatedCallback();var t=this.querySelector(`.${e.PCSS}-lightbox`);t.appendChild(this._buttons=this.querySelector(`.${e.PCSS}-dialog-buttons`)),t.appendChild(this.querySelector(`.${e.PCSS}-dialog-heading`)),t.appendChild(this.querySelector(e.P+"-loader")),this.dispatchEvent(new e.PropertyChangeEvent({propertyName:"modalButtons",currentValue:this.modalButtons})),this._emitter.start()}disconnectedCallback(){this._emitter.stop(),super.disconnectedCallback()}_submit(a){this.readonly?this.commit(t.UI.DialogButton.Ok,a):(e.avoidHandler(a),e.Utils.isNullOrEmpty(this.action)?this.commit(t.UI.DialogButton.Ok,a):this._form.submit(this._fetcher).then((e=>{this.commit(t.UI.DialogButton.Ok,a)}),(e=>{})))}_onSubmit(e){this.emit(e)}open(t,a,i=!0){if(e.Utils.isNull(t))throw`The state of a ${r} cannot be null.`;__classPrivateFieldSet(this,o,a,"f");var n=super.open(t);return i&&this._form.setPristine(),n}commit(t,a){super.commit(t,a),__classPrivateFieldGet(this,o,"f")||e.Utils.waitForAnimationEnd(this,500).then((e=>{this.state={}}))}_cancel(e){this.commit(t.UI.DialogButton.Cancel,e),this._form.reset()}_broadcast(e){this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail}))}get modalButtons(){const e=this._buttons;return{ok:e&&e.firstElementChild&&e.firstElementChild.firstElementChild,cancel:e&&e.firstElementChild&&e.firstElementChild.lastElementChild}}};o=new WeakMap,__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],i.prototype,"suddenValidation",void 0),__decorate([e.Watch({reflectBack:!0,converter:e.PropertyConverters.String})],i.prototype,"okCaption",void 0),__decorate([e.Watch({reflectBack:!0,converter:e.PropertyConverters.String})],i.prototype,"cancelCaption",void 0),__decorate([e.Watch({reflectBack:!0,converter:e.PropertyConverters.String})],i.prototype,"method",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],i.prototype,"metadata",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],i.prototype,"action",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],i.prototype,"loaderType",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],i.prototype,"success",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],i.prototype,"fail",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],i.prototype,"readonly",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],i.prototype,"fetchHeaders",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],i.prototype,"fetchCredentials",void 0),__decorate([e.ViewChild(e.P+"-lightbox")],i.prototype,"lightbox",void 0),__decorate([e.ViewChild(e.P+"-form[entity]")],i.prototype,"_form",void 0),__decorate([e.ViewChild(e.P+"-fetch")],i.prototype,"_fetcher",void 0),i=r=__decorate([e.CustomElement({tagName:e.P+"-modal-form",shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-lightbox modal="true" logger="{{ :host.logger }}"><${e.P}-form wrapper>\n <${e.P}-form logger="{{ :host.logger }}" on-submit=":host._onSubmit($event)" readonly="{{ :host.readonly }}" entity="{{ :host.state, twoway }}" on-success=":host._broadcast($event)" \n on-fail=":host._broadcast($event)" success="{{ :host.success, twoway }}" fail="{{ :host.fail, twoway }}" autogenerate="{{ !$pacem.isNull($this.entity) }}" metadata="{{ :host.metadata }}"\n fetch-headers="{{ :host.fetchHeaders }}" fetch-credentials="{{ :host.fetchCredentials }}" sudden-validation="{{ :host.suddenValidation }}"></${e.P}-form></${e.P}-form>\n <${e.P}-fetch logger="{{ :host.logger }}" method="{{ :host.method }}" headers="{{ :host.fetchHeaders }}" credentials="{{ :host.fetchCredentials }}" autofetch="false" url="{{ :host.action }}"></${e.P}-fetch> \n <div class="${e.PCSS}-dialog-buttons ${e.PCSS}-buttonset buttons">\n <div class="buttonset-left">\n <${e.P}-button on-click=":host._submit($event)" css-class="{{ {'buttonset-last': :host.readonly} }}"\n class="button primary button-size size-small" disabled="{{ !:host.readonly && (!(::_form.valid && ::_form.dirty) || ::_fetcher.fetching) }}"><${e.P}-text text="{{ :host.okCaption || 'OK' }}"></${e.P}-text></${e.P}-button>\n <${e.P}-button on-click=":host._cancel($event)" hide="{{ :host.readonly }}" class="button button-size size-small" disabled="{{ ::_fetcher.fetching }}"><${e.P}-text text="{{ :host.cancelCaption || 'Cancel' }}"></${e.P}-text></${e.P}-button>\n </div></div>\n <${e.P}-panel class="${e.PCSS}-dialog-heading">\n <${e.P}-content></${e.P}-content>\n </${e.P}-panel>\n <${e.P}-loader type="{{ :host.loaderType }}" class="${e.PCSS}-hover loader-primary loader-small" active="{{ ::_fetcher.fetching }}"></${e.P}-loader>\n</${e.P}-lightbox>`})],i),a.PacemModalFormElement=i}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){var o;let r=class RisolutoHashStateElement extends t.PacemEventTarget{constructor(){super(...arguments),this.default={},this.state={},this.normalizedState={},o.set(this,void 0),this._routerNavigatingHandler=e=>{__classPrivateFieldSet(this,o,!0,"f")},this._routerNavigateHandler=e=>{__classPrivateFieldSet(this,o,!1,"f"),this._updateStateFromURI()}}viewActivatedCallback(){super.viewActivatedCallback(),this._updateStateFromURI(),this._setupRouterHandlers(this.router)}propertyChangedCallback(e,t,a,o){switch(super.propertyChangedCallback(e,t,a,o),e){case"state":this.normalizedState=this._normalizeState(a),o||this._updateURIFromState();break;case"disabled":a&&this._updateStateFromURI();break;case"default":this._updateStateFromURI();break;case"router":o||(this._disposeRouterHandlers(t),this._setupRouterHandlers(a))}}disconnectedCallback(){this._disposeRouterHandlers(),super.disconnectedCallback()}_setupRouterHandlers(t=this.router){e.Utils.isNull(t)||(window.addEventListener("navigating",this._routerNavigatingHandler,!1),window.addEventListener("navigate",this._routerNavigateHandler,!1))}_disposeRouterHandlers(t=this.router){e.Utils.isNull(t)||(window.removeEventListener("navigating",this._routerNavigatingHandler,!1),window.removeEventListener("navigate",this._routerNavigateHandler,!1))}_currentBasePath(){const t=this.router;if(!e.Utils.isNull(t)){const e=t.state.$querystring;return this._normalizePath(document.location.pathname,e)}return null}_normalizePath(t,a){return e.Utils.isNullOrEmpty(t)?t:(t.endsWith("/")&&(t=t.substring(0,t.length-1)),null!=a||(a=""),t+(a.length>0?"?"+a:""))}_areStatesEquivalent(t,a){const o=t||{},r=a||{};return e.Utils.jsonSortStringify(o)===e.Utils.jsonSortStringify(r)}_updateStateFromURI(){if(this.disabled||__classPrivateFieldGet(this,o,"f"))return;var t=e.Utils.extend({},this.default||{});const a=this.router;e.Utils.isNull(a)||e.Utils.extend(t,e.Utils.URIs.parseQuery(a.state&&a.state.$hash||"{}")),this._areStatesEquivalent(this.state,t)||(this.state=t)}_updateURIFromState(t=this.normalizedState){if(this.disabled||__classPrivateFieldGet(this,o,"f"))return;const a=this.router;if(!e.Utils.isNull(a)){const o=this._currentBasePath(),i=e.Utils.URIs.parseQuery(a.state.$hash||"{}"),n=t||{};if(!this._areStatesEquivalent(i,n)){const t=this._cleanupStateForURI(n);var r=o;e.Utils.isNullOrEmpty(t)||(r=e.Utils.URIs.appendQuery(o,t,!1,!0)),a.path=r}}}_cleanupStateForURI(t=this.state){const a=e.Utils.clone(t||{}),o=this.default;for(let t in a)(e.Utils.isNullOrEmpty(a[t])||!e.Utils.isNull(o)&&t in o&&o[t]==a[t])&&delete a[t];return a}_normalizeState(t=this.state){var a={};for(let o in t||{}){const r=t[o];if(!e.Utils.isNullOrEmpty(r))switch(typeof r){case"number":case"bigint":case"boolean":a[o]=r.toString();break;case"symbol":case"string":Object.defineProperty(a,o,{enumerable:!0,value:r});break;default:if(e.Utils.Dates.isDate(r))Object.defineProperty(a,o,{enumerable:!0,value:r.toISOString()});else{if(!(r instanceof RegExp))throw new Error("Type not supported to be normalized into a URI hash.");Object.defineProperty(a,o,{enumerable:!0,value:r.source})}}}return a}set(t,a){const o=Object.defineProperty({},t,{enumerable:!0,value:a});this.state=e.Utils.extend({},this.state||{},o)}};o=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Element})],r.prototype,"router",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],r.prototype,"default",void 0),__decorate([e.Watch()],r.prototype,"state",void 0),__decorate([e.Watch()],r.prototype,"normalizedState",void 0),r=__decorate([e.CustomElement({tagName:e.P+"-router-hash-state"})],r),a.RisolutoHashStateElement=r}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let o=class PacemSearchElement extends t.PacemElement{constructor(){super(...arguments),this.hintParameter="q"}propertyChangedCallback(e,t,a,o){if(super.propertyChangedCallback(e,t,a,o),"hint"===e){let e={};e[this.hintParameter]=a,this._fetcher.parameters=e}}};__decorate([e.ViewChild(e.P+"-fetch")],o.prototype,"_fetcher",void 0),__decorate([e.Watch()],o.prototype,"datasource",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],o.prototype,"hint",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],o.prototype,"url",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],o.prototype,"method",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"hintParameter",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-search",shadow:e.Defaults.USE_SHADOW_ROOT,template:`<${e.P}-fetch debounce="800" url="{{ :host.url }}" method="{{ :host.method }}">\n</${e.P}-fetch><${e.P}-input-search value="{{ :host.hint, twoway }}"></${e.P}-input-search>\n<${e.P}-repeater datasource="{{ ::_fetch.result }}">\n <${e.P}-content></${e.P}-content>\n</${e.P}-repeater>`})],o),a.PacemSearchElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={}));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.20.0-jericho (https://js.pacem.it)
2
+ * pacem v0.20.0-kish (https://js.pacem.it)
3
3
  * Copyright 2021 Pacem (https://pacem.it)
4
4
  * Licensed under MIT
5
5
  */
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.20.0-jericho",
2
+ "version": "0.20.0-kish",
3
3
  "name": "pacem",
4
4
  "homepage": "https://js.pacem.it",
5
5
  "repository": {