pacem 0.50.2-bithynia → 0.50.2-buhen

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 (56) 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-media.d.ts +1 -1
  39. package/dist/js/pacem-media.js +1 -1
  40. package/dist/js/pacem-media.min.js +1 -1
  41. package/dist/js/pacem-networking.js +1 -1
  42. package/dist/js/pacem-networking.min.js +1 -1
  43. package/dist/js/pacem-numerical.d.ts +1 -1
  44. package/dist/js/pacem-numerical.js +1 -1
  45. package/dist/js/pacem-numerical.min.js +1 -1
  46. package/dist/js/pacem-plus.d.ts +3 -3
  47. package/dist/js/pacem-plus.js +6 -6
  48. package/dist/js/pacem-plus.min.js +2 -2
  49. package/dist/js/pacem-scaffolding.d.ts +1 -1
  50. package/dist/js/pacem-scaffolding.js +1 -1
  51. package/dist/js/pacem-scaffolding.min.js +1 -1
  52. package/dist/js/pacem-ui.d.ts +1 -1
  53. package/dist/js/pacem-ui.js +1 -1
  54. package/dist/js/pacem-ui.min.js +1 -1
  55. package/dist/js/swagger-types.d.ts +1 -1
  56. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -25,10 +25,10 @@ declare namespace Pacem.Components.Plus {
25
25
  abstract class PacemContextMenuItemElement extends PacemItemElement {
26
26
  connectedCallback(): void;
27
27
  propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
28
- abstract createMenuItemElement(arg?: any): Element;
28
+ abstract createMenuItemElement(): Element;
29
29
  }
30
30
  class PacemContextMenuItemCommandElement extends PacemContextMenuItemElement {
31
- createMenuItemElement(arg?: any): Element;
31
+ createMenuItemElement(): Element;
32
32
  commandName: string;
33
33
  caption: string;
34
34
  tooltip: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -110,10 +110,9 @@ var Pacem;
110
110
  }
111
111
  Plus.PacemContextMenuItemElement = PacemContextMenuItemElement;
112
112
  let PacemContextMenuItemCommandElement = class PacemContextMenuItemCommandElement extends PacemContextMenuItemElement {
113
- createMenuItemElement(arg) {
114
- var _a;
113
+ createMenuItemElement() {
115
114
  const retval = new Components.UI.PacemButtonElement();
116
- retval.commandArgument = (_a = this.commandArgument) !== null && _a !== void 0 ? _a : arg;
115
+ retval.commandArgument = this.commandArgument;
117
116
  retval.commandName = this.commandName;
118
117
  retval.textContent = this.caption;
119
118
  retval.iconGlyph = this.iconGlyph;
@@ -165,8 +164,9 @@ var Pacem;
165
164
  constructor() {
166
165
  super(...arguments);
167
166
  this._dispatchCommand = (e) => {
167
+ var _a;
168
168
  Pacem.avoidHandler(e);
169
- this._onCommand(new Pacem.CommandEvent({ commandName: e.detail.commandName, commandArgument: e.detail.commandArgument || this.commandArgument }));
169
+ this._onCommand(new Pacem.CommandEvent({ commandName: e.detail.commandName, commandArgument: (_a = e.detail.commandArgument) !== null && _a !== void 0 ? _a : this.commandArgument }));
170
170
  };
171
171
  _PacemContextMenuElement_btn.set(this, void 0);
172
172
  _PacemContextMenuElement_icon.set(this, void 0);
@@ -320,7 +320,7 @@ var Pacem;
320
320
  if (item.hide) {
321
321
  continue;
322
322
  }
323
- const menuitem = item.createMenuItemElement(this.commandArgument);
323
+ const menuitem = item.createMenuItemElement();
324
324
  menuitem.addEventListener('mouseup', this._mouseupHandler, false);
325
325
  if (cursor < count) {
326
326
  const repl = balloon.children.item(cursor);
@@ -1,6 +1,6 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
6
- var Pacem,__decorate=this&&this.__decorate||function(e,t,a,s){var o,i=arguments.length,n=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,a,s);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(n=(i<3?o(n):i>3?o(t,a,n):o(t,a))||n);return i>3&&n&&Object.defineProperty(t,a,n),n},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,a,s){if("a"===a&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?s:"a"===a?s.call(e):s?s.value:t.get(e)},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,a,s,o){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?o.call(e,a):o?o.value=a:t.set(e,a),a},__awaiter=this&&this.__awaiter||function(e,t,a,s){return new(a||(a=Promise))((function(o,i){function n(e){try{l(s.next(e))}catch(e){i(e)}}function r(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(n,r)}l((s=s.apply(e,t||[])).next())}))};!function(e){!function(t){!function(a){let s=class PacemCarouselElement extends t.UI.PacemAdaptedIterativeElement{constructor(){super(...arguments),this.interval=4e3}};__decorate([e.ViewChild(e.P+"-adapter")],s.prototype,"adapter",void 0),__decorate([e.ViewChild(e.P+"-slideshow")],s.prototype,"slideshow",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Number})],s.prototype,"interval",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],s.prototype,"pausable",void 0),s=__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>`})],s),a.PacemCarouselElement=s}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){var s,o,i;class PacemContextMenuItemElement extends t.PacemItemElement{connectedCallback(){super.connectedCallback(),e.Utils.addClass(this,e.PCSS+"-context-menuitem")}propertyChangedCallback(e,t,a,s){super.propertyChangedCallback(e,t,a,s);const o=this.container;o instanceof l&&o.refresh()}}a.PacemContextMenuItemElement=PacemContextMenuItemElement;let n=class PacemContextMenuItemCommandElement extends PacemContextMenuItemElement{createMenuItemElement(e){var a;const s=new t.UI.PacemButtonElement;return s.commandArgument=null!==(a=this.commandArgument)&&void 0!==a?a:e,s.commandName=this.commandName,s.textContent=this.caption,s.iconGlyph=this.iconGlyph,s.confirmationDialog=this.confirmationDialog,s.confirmationMessage=this.confirmationMessage,s.tooltip=this.tooltip,s.disabled=this.disabled,s}};__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],n.prototype,"commandName",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],n.prototype,"caption",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],n.prototype,"tooltip",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],n.prototype,"iconGlyph",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],n.prototype,"confirmationMessage",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.Element})],n.prototype,"confirmationDialog",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.Json})],n.prototype,"commandArgument",void 0),n=__decorate([e.CustomElement({tagName:e.P+"-context-menuitem-command"})],n),a.PacemContextMenuItemCommandElement=n;let r=class PacemContextMenuItemSeparatorElement extends PacemContextMenuItemElement{createMenuItemElement(){const e=document.createElement("hr");return e.style.pointerEvents="none",e}};r=__decorate([e.CustomElement({tagName:e.P+"-context-menuitem-separator"})],r),a.PacemContextMenuItemSeparatorElement=r;let l=class PacemContextMenuElement extends t.PacemItemsContainerElement{constructor(){super(...arguments),this._dispatchCommand=t=>{e.avoidHandler(t),this._onCommand(new e.CommandEvent({commandName:t.detail.commandName,commandArgument:t.detail.commandArgument||this.commandArgument}))},s.set(this,void 0),o.set(this,void 0),i.set(this,void 0),this._slotchangeHandler=e=>{this._resetLayout()},this._attributeChangeHandler=e=>this._refreshMenuItems,this._mouseupHandler=t=>{const a=this._ensureBalloon();e.Utils.isNull(a)||a.popout()}}validate(e){return e instanceof PacemContextMenuItemElement}_ensureButton(){if(!e.Utils.isNull(__classPrivateFieldGet(this,s,"f")))return __classPrivateFieldGet(this,s,"f");const a=this._slot;if(e.Utils.isNull(a))return null;const i=this._lookForAButton();if(!e.Utils.isNull(i))return __classPrivateFieldSet(this,s,i,"f");const n=new t.UI.PacemButtonElement;n.setAttribute("slot","button"),n.className=`${e.PCSS}-margin margin-0 button-flat`;const r=__classPrivateFieldSet(this,o,new t.UI.PacemIconElement,"f");return r.icon=this.icon,n.appendChild(r),this.appendChild(n),__classPrivateFieldSet(this,s,n,"f")}_lookForAButton(){const t=this._slot;if(e.Utils.isNull(t))return null;const a=t.assignedElements({flatten:!0});return e.Utils.isNullOrEmpty(a)?null:a[0]}_ensureBalloon(){let a=__classPrivateFieldGet(this,i,"f");if(!e.Utils.isNull(a))return a;const s=e.CustomElementUtils.findAncestorShell(this);return e.Utils.isNull(s)?null:(a=new t.UI.PacemBalloonElement,a.options={trigger:t.UI.BalloonTrigger.Click,position:t.UI.BalloonPosition.HorizontalAuto,align:t.UI.BalloonAlignment.Auto,autoAdjust:!0},a.addEventListener(e.CommandEventName,this._dispatchCommand,!1),a.className=`${e.PCSS}-contextmenu`,s.appendChild(a),__classPrivateFieldSet(this,i,a,"f"))}register(t){const a=super.register(t);return a&&(t.addEventListener(e.AttributeChangeEventName,this._attributeChangeHandler,!1),this._refreshMenuItems()),a}unregister(t){const a=super.unregister(t);return a&&(t.removeEventListener(e.AttributeChangeEventName,this._attributeChangeHandler,!1),this._refreshMenuItems()),a}_onCommand(t){this.dispatchEvent(new CustomEvent(e.CommandEventName,{detail:t.detail,cancelable:!0,bubbles:!0})),this.dispatchEvent(new CustomEvent(t.detail.commandName.toLowerCase(),{detail:t.detail.commandArgument,cancelable:!0,bubbles:!0}))}_resetLayout(){const t=this._ensureButton(),a=this._ensureBalloon();e.Utils.isNull(t)||e.Utils.isNull(a)||(a.target=t)}viewActivatedCallback(){super.viewActivatedCallback(),this._resetLayout(),this._slot.addEventListener("slotchange",this._slotchangeHandler,!1)}propertyChangedCallback(t,a,s,i){super.propertyChangedCallback(t,a,s,i),i||"icon"!==t||e.Utils.isNull(__classPrivateFieldGet(this,o,"f"))||(__classPrivateFieldGet(this,o,"f").icon=s)}disconnectedCallback(){this._disposeButton(),this._disposeSlot(),this._disposeBalloon(),super.disconnectedCallback()}refresh(){this._refreshMenuItems()}_disposeButton(){__classPrivateFieldSet(this,s,__classPrivateFieldSet(this,o,null,"f"),"f")}_disposeSlot(){const t=this._slot;e.Utils.isNull(t)||t.removeEventListener("slotchange",this._slotchangeHandler,!1)}_disposeBalloon(){const t=__classPrivateFieldGet(this,i,"f");e.Utils.isNull(t)||(t.removeEventListener(e.CommandEventName,this._dispatchCommand,!1),this._disposeBalloonChildren(0),t.remove(),__classPrivateFieldSet(this,i,null,"f"))}_disposeBalloonChildren(e){const t=__classPrivateFieldGet(this,i,"f");for(let a=t.children.length-1;a>=e;a--){const e=t.children.item(a);e.removeEventListener("mouseup",this._mouseupHandler,!1),e.remove()}}_refreshMenuItems(){const t=this._ensureBalloon();if(e.Utils.isNull(t))return;const a=t.children.length;let s=0;for(let e of this.items){if(e.hide)continue;const o=e.createMenuItemElement(this.commandArgument);if(o.addEventListener("mouseup",this._mouseupHandler,!1),s<a){const e=t.children.item(s);e.removeEventListener("mouseup",this._mouseupHandler,!1),e.replaceWith(o)}else t.appendChild(o);s++}this._disposeBalloonChildren(s)}};s=new WeakMap,o=new WeakMap,i=new WeakMap,__decorate([e.ViewChild("slot[name=button]")],l.prototype,"_slot",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],l.prototype,"commandArgument",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],l.prototype,"icon",void 0),__decorate([e.Debounce(!0)],l.prototype,"_refreshMenuItems",null),l=__decorate([e.CustomElement({tagName:e.P+"-context-menu",shadow:!0,template:'<slot name="button"></slot><slot></slot>'})],l),a.PacemContextMenuElement=l}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let s;!function(e){e.Text="text",e.Html="html",e.Image="image",e.Markdown="markdown"}(s=a.EditMode||(a.EditMode={}));let o=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||s.Text;return t.hide=a!==s.Text&&a!==s.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||s.Text;return t.hide=a!==s.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 o=this.type||s.Text;return a.hide=o!==s.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 s.Html:a.innerHTML=t;break;case s.Markdown:if(a.localName===e.P+"-markdown")a.value=t;else a.innerHTML=this._markdown.toHtml(t);break;case s.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 s.Html:return t.innerHTML;case s.Image:switch(t.localName){case e.P+"-img":case"img":return t.src;default:let a=getComputedStyle(t).backgroundImage,s=/url\(["']?([^'"]+)["']?\)/.exec(a);return s&&s.length&&s[1]}case s.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,o,i){switch(super.propertyChangedCallback(t,a,o,i),t){case"imageUploadUrl":e.Utils.isNull(this._editImage)||(this._editImage.uploadUrl=o);break;case"allowSnapshot":e.Utils.isNull(this._editImage)||(this._editImage.allowSnapshot=o);break;case"imageSet":e.Utils.isNull(this._editImage)||(this._editImage.imageSet=o);break;case"disabled":this._setup();break;case"type":const t=o;e.Utils.isNull(this._textarea)||(this._textarea.hide=t!==s.Text&&t!==s.Markdown),e.Utils.isNull(this._contenteditable)||(this._contenteditable.hide=t!==s.Html),e.Utils.isNull(this._editImage)||(this._editImage.hide=t!==s.Image);break;case"maxImageHeight":e.Utils.isNull(this._editImage)||(this._editImage.maxHeight=o);break;case"maxImageWidth":e.Utils.isNull(this._editImage)||(this._editImage.maxWidth=o)}}edit(a){e.avoidHandler(a);var s=this._target;if(!e.Utils.isNull(s)){this._removeButton(),this._content=s;var o=this._state=this._retrieve();e.Utils.isNull(this._editImage)||(this._editImage.disabled=!1),this._dialog.open(o).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})],o.prototype,"key",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],o.prototype,"type",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Element})],o.prototype,"target",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"imageUploadUrl",void 0),__decorate([e.Watch({emit:!1})],o.prototype,"imageSet",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],o.prototype,"maxImageWidth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],o.prototype,"maxImageHeight",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],o.prototype,"allowSnapshot",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-edit"})],o),a.PacemEditElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let s=class PacemGalleryElement extends t.UI.PacemAdaptedIterativeElement{get adapter(){return this._adapter}_heroAnimate(t,a){return __awaiter(this,void 0,void 0,(function*(){if(!e.Utils.isNull(t)){let s=document.createElement(e.P+"-img"),o=this._heroPlaceholderProxy.dom[0];const i=300;s.src=a||t.src,s.adapt="contain";let n=e.Utils.offset(o),r=e.Utils.offset(t),l=s.style;const d=getComputedStyle(o);l.border=d.border,l.width=o.clientWidth+"px",l.height=o.clientHeight+"px",l.position="absolute",l.zIndex=d.zIndex,l.top=n.top+"px",l.left=n.left+"px";const c=t.clientWidth/o.clientWidth,h=t.clientHeight/o.clientHeight,m=r.left-n.left+"px",u=r.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}, ${u}) scale(${c}, ${h})`,document.body.appendChild(s),requestAnimationFrame((()=>{s.style.transform=""})),yield e.Utils.waitForAnimationEnd(s,i),s.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")],s.prototype,"_adapter",void 0),__decorate([e.ViewChild(e.P+"-lightbox")],s.prototype,"_lightbox",void 0),__decorate([e.ViewChild(e.P+"-slideshow")],s.prototype,"_slideshow",void 0),__decorate([e.ViewChild(e.P+"-shell-proxy")],s.prototype,"_heroPlaceholderProxy",void 0),__decorate([e.Watch()],s.prototype,"_poppingUp",void 0),s=__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 }}" hide="{{ !::_lightbox.show }}">\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="{{ !::_lightbox.show || !(: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>`})],s),a.PacemGalleryElement=s}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){var s,o;let i=o=class PacemModalFormElement extends t.UI.PacemDialogBase{get form(){return this._form}constructor(){super(),this.suddenValidation=!0,this.method=e.Net.HttpMethod.Post,this._keyupHandler=t=>{if(!(13!==t.keyCode||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey)){let a=t.currentTarget.querySelector(`.${e.PCSS}-dialog-buttons ${e.P}-button[type=submit]`);e.Utils.isNull(a)||!e.Utils.isVisible(a)||a.disabled||a.click()}},s.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.addEventListener("keyup",this._keyupHandler,!1),this._emitter.start()}disconnectedCallback(){this._emitter.stop(),this.removeEventListener("keyup",this._keyupHandler,!1),super.disconnectedCallback()}_submit(a){this.readonly?this.commit(t.UI.DialogButton.Ok,a):(e.avoidHandler(a),this._form.validate().then((s=>{s&&(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 ${o} cannot be null.`;__classPrivateFieldSet(this,s,a,"f");var n=super.open(t);return i&&this._form.setPristine(),n}commit(t,a){super.commit(t,a),__classPrivateFieldGet(this,s,"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}}};s=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=o=__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} }}" type="submit"\n class="button primary button-size size-small" disabled="{{ (:host.suddenValidation && !:host.readonly && !(::_form.valid && ::_form.dirty)) || ::_fetcher.fetching }}">\n <${e.P}-panel class="submit-spinner ${e.PCSS}-anim anim-pop" hide="{{ !::_form.fetching }}"><i class="${e.PCSS}-icon ${e.PCSS}-anim anim-rotate rotate-uniform display-block">refresh</i></${e.P}-panel>\n <${e.P}-text text="{{ :host.okCaption || 'OK' }}"></${e.P}-text>\n </${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 <div class="${e.PCSS}-dialog-heading">\n <${e.P}-content></${e.P}-content>\n </div>\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 s;let o=class PacemRouterHashStateElement extends t.PacemEventTarget{constructor(){super(...arguments),this.default={},this.state={},this.normalizedState={},s.set(this,void 0),this._routerNavigatingHandler=e=>{__classPrivateFieldSet(this,s,!0,"f")},this._routerNavigateHandler=e=>{__classPrivateFieldSet(this,s,!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||__classPrivateFieldGet(this,s,"f")||(this._updateNormalizedState(),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 s=e.Utils.extend({},t||{}),o=e.Utils.extend({},a||{});for(let e in s){if(!this._areSubstantiallyEquivalent(s[e],o[e]))return!1;delete s[e],delete o[e]}for(let e in o)if(!this._areSubstantiallyEquivalent(s[e],o[e]))return!1;return!0}_updateNormalizedState(e=this.state){if(this.disabled||__classPrivateFieldGet(this,s,"f"))return;const t=this._normalizeState(e);this._areStatesEquivalent(t,this.normalizedState)||(this.normalizedState=t)}_updateStateFromURI(){if(this.disabled||__classPrivateFieldGet(this,s,"f"))return;var t=e.Utils.extend({},this.default||{});const a=this.router;if(!e.Utils.isNull(a)){const s=this._denormalizeState(e.Utils.URIs.parseQuery(a.state&&a.state.$hash||"{}"));e.Utils.extend(t,s)}this._areStatesEquivalent(this.state,t)||(this.state=t)}_updateURIFromState(t=this.normalizedState){if(this.disabled||__classPrivateFieldGet(this,s,"f"))return;const a=this.router;if(!e.Utils.isNull(a)){const s=this._currentBasePath(),i=e.Utils.URIs.parseQuery(a.state.$hash||"{}"),n=t||{};if(!this._areStatesEquivalent(i,n)){const t=this._cleanupStateForURI(n);var o=s;e.Utils.isNullOrEmpty(t)||(o=e.Utils.URIs.appendQuery(s,t,!1,!0)),a.path=o}}}_areSubstantiallyEquivalent(t,a){return null!=t||(t=""),null!=a||(a=""),t.toString()==a.toString()||e.Utils.areSemanticallyEqual(t,a)||JSON.stringify(t)===JSON.stringify(a)}_cleanupStateForURI(t=this.state){const a=e.Utils.clone(t||{}),s=this.default;for(let t in a)(e.Utils.isNullOrEmpty(a[t])&&(e.Utils.isNull(s)||!(t in s))||!e.Utils.isNull(s)&&t in s&&this._areSubstantiallyEquivalent(s[t],a[t]))&&delete a[t];return a}_normalizeState(t=this.state,a=this.default){var s={};const o=a;for(let a in t||{}){const i=t[a];if(e.Utils.isNullOrEmpty(i))e.Utils.isNull(o)||!(a in o)||e.Utils.isNullOrEmpty(o[a])||(s[a]="");else switch(typeof i){case"number":case"bigint":case"boolean":Object.defineProperty(s,a,{enumerable:!0,value:i.toString()});break;case"symbol":case"string":Object.defineProperty(s,a,{enumerable:!0,value:i});break;default:if(e.Utils.Dates.isDate(i))Object.defineProperty(s,a,{enumerable:!0,value:i.toISOString()});else{if(!(i instanceof RegExp))throw new Error("Type not supported to be normalized into a URI hash.");Object.defineProperty(s,a,{enumerable:!0,value:i.source})}}}return s}_denormalizeState(t=this.normalizedState,a=this.default){const s={},o=a||{};for(let a in t){if(!(a in o)){s[a]=t[a];continue}const i=o[a],n=t[a];switch(typeof i){case"boolean":Object.defineProperty(s,a,{enumerable:!0,value:e.PropertyConverters.Boolean.convert(n)});break;case"number":case"bigint":Object.defineProperty(s,a,{enumerable:!0,value:e.PropertyConverters.Number.convert(n)});break;case"symbol":case"string":Object.defineProperty(s,a,{enumerable:!0,value:e.PropertyConverters.String.convert(n)});break;default:i instanceof Date?Object.defineProperty(s,a,{enumerable:!0,value:e.PropertyConverters.Date.convert(n)}):i instanceof RegExp?Object.defineProperty(s,a,{enumerable:!0,value:new RegExp(n,i.flags)}):Object.defineProperty(s,a,{enumerable:!0,value:n})}}return s}set(t,a){var s={};"string"==typeof t?Object.defineProperty(s,t,{enumerable:!0,value:a}):s=t,this.state=e.Utils.extend({},this.state||{},s)}};s=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Element})],o.prototype,"router",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],o.prototype,"default",void 0),__decorate([e.Watch()],o.prototype,"state",void 0),__decorate([e.Watch()],o.prototype,"normalizedState",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-router-hash-state"})],o),a.PacemRouterHashStateElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let s=class PacemSearchElement extends t.PacemElement{constructor(){super(...arguments),this.hintParameter="q"}propertyChangedCallback(e,t,a,s){if(super.propertyChangedCallback(e,t,a,s),"hint"===e){let e={};e[this.hintParameter]=a,this._fetcher.parameters=e}}};__decorate([e.ViewChild(e.P+"-fetch")],s.prototype,"_fetcher",void 0),__decorate([e.Watch()],s.prototype,"datasource",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],s.prototype,"hint",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],s.prototype,"url",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],s.prototype,"method",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],s.prototype,"hintParameter",void 0),s=__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>`})],s),a.PacemSearchElement=s}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){class PacemBaseCellElement extends t.PacemSafeContentElement{viewActivatedCallback(){super.viewActivatedCallback(),this.updateColumnPosition(),this.updateLayout(this.metadata)}updateColumnPosition(e=this.metadata,t=this.gridState){this.style.gridColumn=(t.orderedColumns.indexOf(e.prop)+1).toString()}updateVisibility(e=this.state){this.hide=!!e.hidden}propertyChangedCallback(e,t,a,s){if(super.propertyChangedCallback(e,t,a,s),!s)switch(e){case"metadata":this.updateLayout(a);break;case"gridState":this.updateColumnPosition();break;case"state":this.updateVisibility()}}}__decorate([e.Watch({converter:e.PropertyConverters.Json})],PacemBaseCellElement.prototype,"metadata",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],PacemBaseCellElement.prototype,"state",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],PacemBaseCellElement.prototype,"gridState",void 0),a.PacemBaseCellElement=PacemBaseCellElement}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){t.DataRowSelectChangeEventName="datarowselectchange";class DataRowSelectChangeEvent extends CustomEvent{constructor(e){super(t.DataRowSelectChangeEventName,{detail:e,bubbles:!1,cancelable:!0})}}t.DataRowSelectChangeEvent=DataRowSelectChangeEvent;const a={},s=[];let o=class PacemDataCellElement extends t.PacemBaseCellElement{updateLayout(e=this.metadata){this._setup(e)}connectedCallback(){super.connectedCallback(),e.Utils.addClass(this,e.PCSS+"-datacell")}propertyChangedCallback(e,t,a,s){if(super.propertyChangedCallback(e,t,a,s),!s)switch(e){case"_contentTooltip":this._updateTooltipJustInCase();break;case"gridState":case"rowindex":this._updateSelection()}}_updateTooltipJustInCase(){var t,a;(null===(a=null===(t=this.metadata.dataCell)||void 0===t?void 0:t.autoTooltip)||void 0===a||a)&&!e.Utils.isNullOrEmpty(this._contentTooltip)?this.setAttribute("tooltip",this._contentTooltip):this.removeAttribute("tooltip")}_inflateContent(t=this.dataitem,a=this.rowindex,s=this.metadata){var o,i,n,r;this._contentTooltip="";let l=null===(o=s.dataCell)||void 0===o?void 0:o.format;const d=null!==(n=null===(i=s.dataCell)||void 0===i?void 0:i.null)&&void 0!==n?n:"";if("function"==typeof l){const o=l(this,s,t,a);return e.Utils.isNullOrEmpty(o)?d:o}const c=null===(r=e.CustomElementUtils.resolvePath(s.prop,t))||void 0===r?void 0:r.target,h=null==c?void 0:c.value;if(e.Utils.isNullOrEmpty(h))return d;const m=e.Utils.lang(this);switch(s.dataType){case"boolean":return`<${e.P}-icon icon="material ${h?"check_circle_outline":"radio_button_unchecked"} text-big-steady"></${e.P}-icon>`;case"time":case"date":case"datetime":return this._contentTooltip=e.Utils.core.date(h,l,m);case"byte":case"int16":case"int32":case"int64":case"short":case"integer":case"int":case"long":case"double":case"decimal":case"float":case"single":case"number":return this._contentTooltip=e.Utils.core.number(h,l||"",m);case"currency":return null!=l||(l="EUR"),this._contentTooltip="string"==typeof l?e.Utils.core.currency(h,l,m):e.Utils.core.number(h,l,m);case"percent":case"percentage":return null!=l||(l={style:"percent",maximumFractionDigits:2}),this._contentTooltip="string"==typeof l?e.Utils.core.currency(h,l,m):e.Utils.core.number(h,l,m);default:return this._contentTooltip=h}}_inflateCssClass(t=this.dataitem,a=this.rowindex,o=this.metadata){var i,n,r,l;if(e.Utils.isNull(t)||e.Utils.isNullOrEmpty(o))return s;const d=o.dataCell&&o.dataCell.cssClass||s,c=[];switch("function"==typeof d?Array.prototype.push.apply(c,d(this,o,t,a)||[]):Array.prototype.push.apply(c,d),null===(n=null===(i=o.dataCell)||void 0===i?void 0:i.verticalAlign)||void 0===n?void 0:n.toLowerCase()){case"top":c.push("datacell-top");break;case"bottom":c.push("datacell-bottom");break;case"middle":c.push("datacell-middle")}switch(null===(l=null===(r=o.dataCell)||void 0===r?void 0:r.horizontalAlign)||void 0===l?void 0:l.toLowerCase()){case"left":c.push("datacell-left");break;case"right":c.push("datacell-right");break;case"center":c.push("datacell-center")}return c}_inflateCss(t=this.dataitem,s=this.rowindex,o=this.metadata){if(e.Utils.isNull(t)||e.Utils.isNullOrEmpty(o))return a;const i=o.dataCell&&o.dataCell.css||a;return"function"==typeof i?i(this,o,t,s):i}_setup(t=this.metadata){var a,s,o;this.setAttribute("css-class","{{ this._inflateCssClass(^item, ^index, this.metadata) }}"),this.setAttribute("css","{{ Pacem.Utils.extend({ 'grid-row': ^index+2 }, this._inflateCss(^item, ^index, this.metadata)) }}");const i=!!(null===(a=t.dataCell)||void 0===a?void 0:a.textEllipsis)?["text-truncate"]:[];switch(null===(o=null===(s=null==t?void 0:t.dataCell)||void 0===s?void 0:s.selectMode)||void 0===o?void 0:o.toLowerCase()){case"cell":case"row":i.push(e.PCSS+"-inert"),i.push(e.PCSS+"-unselect")}this._content.cssClass=i,this._updateSelection()}_updateSelection(){var t,a;(null!==(a=null===(t=this.gridState)||void 0===t?void 0:t.selectedRows)&&void 0!==a?a:[]).indexOf(this.rowindex)>=0?e.Utils.addClass(this,"datarow-selected datacell-filled datacell-primary"):e.Utils.removeClass(this,"datarow-selected datacell-filled datacell-primary")}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Eval})],o.prototype,"dataitem",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],o.prototype,"rowindex",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String,debounce:200})],o.prototype,"_contentTooltip",void 0),__decorate([e.ViewChild(e.P+"-span")],o.prototype,"_content",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-datacell",shadow:!1,template:`<${e.P}-span content="{{ :host._inflateContent(^item, ^index, :host.metadata) }}"></${e.P}-span>`})],o),t.PacemDataCellElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){const s="datacolumnchange",o="datacolumnstatechange",i={selectCaption:"Details",editCaption:"Edit",editIcon:"edit",deleteCaption:"Delete",deleteIcon:"delete"};class DataCellUIEvent extends e.CustomUIEvent{constructor(e,t,a){super(e,t,{bubbles:!1,cancelable:!0},a)}}a.DataCellUIEvent=DataCellUIEvent;let n=class PacemDataColumnElement extends t.PacemItemElement{propertyChangedCallback(e,t,a,i){if(super.propertyChangedCallback(e,t,a,i),!i)switch(e){case"field":case"headcellCss":case"headcellCssClass":case"datacellCss":case"datacellCssClass":case"resizable":case"togglable":case"sortable":case"label":this.dispatchEvent(new Event(s));break;case"order":case"hide":this.dispatchEvent(new Event(o))}}};function r(t){return`<${e.P}-headcell metadata="{{ :host._getColumnMetadata('${t.prop}') }}" state="{{ :host._columnState.${t.prop} }}" grid-state="{{ :host._gridState }}" \non-${a.DataColumnSortEventName}=":host._broadcastSortCommand($event)"\non-${a.DataColumnRescaleEventName}=":host._broadcastRescaleCommand($event)"></${e.P}-headcell>`}function l(t,a){return`<${e.P}-datacell metadata="{{ :host._getColumnMetadata('${t.prop}') }}" state="{{ :host._columnState.${t.prop} }}" grid-state="{{ :host._gridState }}"\ndataitem="{{ ^item }}" rowindex="{{ ^index }}" ${a}></${e.P}-datacell>`}__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],n.prototype,"field",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],n.prototype,"label",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],n.prototype,"resizable",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],n.prototype,"togglable",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],n.prototype,"sortable",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],n.prototype,"order",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],n.prototype,"format",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],n.prototype,"headcellCss",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],n.prototype,"headcellCssClass",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],n.prototype,"datacellCss",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],n.prototype,"datacellCssClass",void 0),n=__decorate([e.CustomElement({tagName:e.P+"-datacolumn"})],n),a.PacemDataColumnElement=n;let d=class PacemDataGridElement extends t.PacemItemsContainerElement{constructor(t=e.Utils.uniqueCode()){super(),this._key=t,this.state={},this._columnState={},this._gridState={sort:{},orderedColumns:[],selectedRows:[]},this._itemDataColumnRebuildHandler=e=>{this._adaptColumnMetadata(this.items||[])},this._itemDataColumnChangeHandler=e=>{this._adaptColumnMetadata(this.items||[])},this._memoizer={}}validate(e){return e instanceof n}viewActivatedCallback(){super.viewActivatedCallback(),this.addEventListener(e.CommandEventName,this._onCommand,!1),this._adaptColumnMetadata();const t=this._adaptedColumnMetadata||[];this._buildUpGrid(t)}disconnectedCallback(){this.removeEventListener(e.CommandEventName,this._onCommand,!1),super.disconnectedCallback()}propertyChangedCallback(e,t,a,s){if(super.propertyChangedCallback(e,t,a,s),!s)switch(e){case"items":case"metadata":this._adaptColumnMetadata();break;case"_adaptedColumnMetadata":this._buildUpGrid(a);break;case"datasource":this._setRowSelection();break;case"state":this._mergeState(a)}}register(e){return!!super.register(e)&&(e.addEventListener(s,this._itemDataColumnRebuildHandler,!1),e.addEventListener(o,this._itemDataColumnChangeHandler,!1),!0)}unregister(e){return!!super.unregister(e)&&(e.removeEventListener(s,this._itemDataColumnRebuildHandler,!1),e.removeEventListener(o,this._itemDataColumnChangeHandler,!1),!0)}setRowSelection(...e){const t=Array.from(e);this._setRowSelection(t)}_setRowSelection(t){const s=(t||[]).map((e=>({item:this.datasource[e],index:e}))),o=new a.DataRowSelectChangeEvent({selectedRows:s});if(this.dispatchEvent(o),!o.defaultPrevented){let t=o.detail.selectedRows;e.Utils.isArray(t)||(t=[]),this._doSetRowSelection(t.map((e=>{var t;return null!==(t=null==e?void 0:e.index)&&void 0!==t?t:-1})).filter((e=>e>=0)))}}_doSetRowSelection(e){const t={selectedRows:e};this._mergeState(t)}_mergeState(t=this.state){var a;null!=t||(t={});const s={selectedRows:(t.selectedRows||[]).map((e=>"number"==typeof e?e:e.index))},o=this._gridState=e.Utils.extend({},this._gridState,t,s);this.state=e.Utils.extend(null!==(a=this.state)&&void 0!==a?a:{},o)}_adaptColumnMetadata(e=this.items,t=this.metadata){const a=Array.prototype.concat.apply((e||[]).map((e=>({prop:e.field,headCell:{name:e.label,cssClass:e.headcellCssClass||[],css:e.headcellCss||{}},dataCell:{format:e.format,cssClass:e.datacellCssClass||[],css:e.datacellCss||{}},hide:e.hide,isRescalable:e.resizable,isSortable:e.sortable,isTogglable:e.togglable,order:e.order,width:1}))),t||[]);this._memoizer={},this._adaptedColumnMetadata=a}_getColumnMetadata(e){return this._memoizer[e]=this._memoizer[e]||this._adaptedColumnMetadata.find((t=>t.prop===e))}_buildUpGrid(a){const s=this._tableContainer;if(e.Utils.isNull(s))return;if(e.Utils.isNullOrEmpty(a))return void(s.innerHTML="");const o=this.options=e.Utils.extend({},i,this.options||{}),n=o.allowDelete||o.allowEdit||o.allowSelect,d=o.allowMultiSelect&&n;let c=d?"auto ":"",h=d?`<div class="${e.PCSS}-headcell"></div>`:"",m=d?`<${e.P}-panel class="${e.PCSS}-datacell" style="grid-column: 1;" css="{{ {'grid-row': ^index+2} }}"></${e.P}-panel>`:"",u=d?`<div class="${e.PCSS}-footcell"></div>`:"";const p=d?a.length+2:n?a.length+1:a.length;this._gridState.orderedColumns=a.sort(((e,t)=>{var a,s;return(null!==(a=e.order)&&void 0!==a?a:0)-(null!==(s=t.order)&&void 0!==s?s:0)})).map((e=>e.prop));let _="";for(let e of t.PacemElement.emittedEventTypes)_+=` on-${e}=":host._broadcastUiEvent(^item, ^index, $event)"`;for(let e of a)this._columnState[e.prop]={hidden:e.hide},c+=this._getColumnSize(e).replaceAll(" ","")+" ",h+=r(e),m+=l(e,_);m+=`<${e.P}-panel class="${e.PCSS}-datarow" css-class="{{ {'datarow-alt': ^index % 2 === 1, 'datarow-selected': :host._gridState.selectedRows.indexOf(^index) >= 0 } }}" style="grid-column: 1 /span ${p};" css="{{ {'grid-row': ^index+2} }}"></${e.P}-panel>`;const v=`<${e.P}-repeater datasource="{{ :host.datasource }}">\n<${e.P}-panel class="${e.PCSS}-datatable" css="{{ {'grid-template-columns': :host._getColumnSizes(:host._columnState, '${c.trimEnd()}', :host._gridState) } }}">\n ${h}\n <template>\n ${m}\n </template>\n ${u}\n</${e.P}-panel>`;s.innerHTML=v}_getColumnSizes(t=this._columnState,a,s=this._gridState){if(e.Utils.isNullOrEmpty(t))return a;const o=a.split(" ");for(let e in t){const a=t[e],i=s.orderedColumns.indexOf(e);a.hidden?o[i]="auto":a.pixelWidth>0&&(o[i]=a.pixelWidth+"px")}return o.join(" ")}_getColumnSize(e){if(e.hide)return"auto";const t=e.minPixelWidth,a=e.maxPixelWidth;if(a>0&&t>0)return`minmax(${t}px, ${a}px)`;{const s="number"==typeof e.width?e.width+"fr":"auto";return t>0?`minmax(${t}px, ${s})`:a>0?`minmax(${s}, ${a}px)`:s}}_onCommand(e){this.dispatchEvent(new t.ItemCommandEvent(e)),this.dispatchEvent(new t.CustomItemCommandEvent(e))}_broadcastUiEvent(e,t,a){var s,o,i;const n=a.type.toLowerCase(),r="datacell"+n,l={dataitem:e,rowindex:t,datacell:a.srcElement},d=a instanceof MouseEvent||a instanceof TouchEvent||a instanceof KeyboardEvent?new DataCellUIEvent(r,l,a):new DataCellUIEvent(r,l);if(this.dispatchEvent(d),"click"===n&&!d.defaultPrevented){switch(null===(i=null===(o=null===(s=d.detail.datacell.metadata)||void 0===s?void 0:s.dataCell)||void 0===o?void 0:o.selectMode)||void 0===i?void 0:i.toLowerCase()){case"cell":break;case"row":this._broadcastSelectCommand(d.detail.rowindex)}}}_broadcastSortCommand(t){const s=t.detail,o=new a.DataColumnSortEvent(s);if(this.dispatchEvent(o),!o.defaultPrevented){const t={column:""};"string"==typeof o.detail.column&&(t.column=o.detail.column),"string"==typeof o.detail.dir&&(t.dir="desc"===o.detail.dir?"desc":"asc"),this._gridState=e.Utils.extend({},this._gridState,{sort:t})}}_broadcastRescaleCommand(t){const s=t.detail,o=new a.DataColumnRescaleEvent(s);if(this.dispatchEvent(o),!o.defaultPrevented){let a=s.width;"number"==typeof o.detail.width&&o.detail.width>0&&(a=o.detail.width);const i={};i[t.srcElement.metadata.prop]={pixelWidth:a},this._columnState=e.Utils.extend({},this._columnState,i)}}_broadcastSelectCommand(t){let a=(this._gridState.selectedRows||[]).slice(0);const s=a.indexOf(t);let o=!0;if(s>=0)a.splice(s,1);else{const s=this.options;if(s.allowMultiSelect)a.push(t);else if(s.allowSelect)a=[t];else{o=!1;const a=`Cannot select the row at index ${t} since datagrid options do not allow any row selection.`;e.Utils.isNull(this.logger)?console.warn(a):this.log(e.Logging.LogLevel.Warn,a)}}o&&this._setRowSelection(a)}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],d.prototype,"metadata",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],d.prototype,"options",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],d.prototype,"state",void 0),__decorate([e.Watch({emit:!0,converter:e.PropertyConverters.Json})],d.prototype,"datasource",void 0),__decorate([e.ViewChild("."+e.PCSS+"-datagrid")],d.prototype,"_tableContainer",void 0),__decorate([e.Watch()],d.prototype,"_adaptedColumnMetadata",void 0),__decorate([e.Watch()],d.prototype,"_columnState",void 0),__decorate([e.Watch()],d.prototype,"_gridState",void 0),__decorate([e.Debounce()],d.prototype,"_adaptColumnMetadata",null),d=__decorate([e.CustomElement({tagName:e.P+"-datagrid",shadow:!1,template:`<div class="${e.PCSS}-datagrid"></div><${e.P}-content></${e.P}-content>`})],d),a.PacemDataGridElement=d}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){a.DataColumnSortEventName="datacolumnsort";class DataColumnSortEvent extends CustomEvent{constructor(e){super(a.DataColumnSortEventName,{detail:e,bubbles:!1,cancelable:!0})}}a.DataColumnSortEvent=DataColumnSortEvent,a.DataColumnRescaleEventName="datacolumnrescale";class DataColumnRescaleEvent extends CustomEvent{constructor(e){super(a.DataColumnRescaleEventName,{detail:e,bubbles:!1,cancelable:!0})}}a.DataColumnRescaleEvent=DataColumnRescaleEvent;let s=class PacemHeadCellElement extends a.PacemBaseCellElement{constructor(t=new e.MarkdownService){super(),this._md=t,this._sortButtonClickHandler=e=>{var t;const a=this.metadata,s=this.gridState,o=a.prop,i=(null===(t=s.sort)||void 0===t?void 0:t.column)===o?"desc"===s.sort.dir?"asc":"desc":a.defaultSort||"asc";this.dispatchEvent(new DataColumnSortEvent({column:o,dir:i}))},this._rescaleHandler=e=>{var t;e.preventDefault();const a=e.detail,s=Math.max(null!==(t=this.metadata.minPixelWidth)&&void 0!==t?t:24,a.currentPosition.x-this._columnBBox.x);this.dispatchEvent(new DataColumnRescaleEvent({width:s}))},this._rescaleStartHandler=t=>{this._columnBBox=e.Utils.offsetRect(this)},this._rescaleEndHandler=e=>{}}connectedCallback(){super.connectedCallback(),e.Utils.addClass(this,e.PCSS+"-headcell")}propertyChangedCallback(e,t,a,s){super.propertyChangedCallback(e,t,a,s),s||"gridState"!==e||this._updateSortButtonIconGlyph()}viewActivatedCallback(){super.viewActivatedCallback(),this._ensureBalloon()}disconnectedCallback(){this._disposeBalloon(),this._disposeRescaler(),super.disconnectedCallback()}updateLayout(e=this.metadata){this._setup(e)}_setupSortButton(){const t=new e.Components.UI.PacemButtonElement;return t.className=`button-flat headcell-sort ${e.PCSS}-inert`,this.addEventListener("click",this._sortButtonClickHandler,!1),e.Utils.addClass(this,e.PCSS+"-clickable"),t}_disposeSortButton(t=this._sortButton){e.Utils.isNull(t)||(e.Utils.removeClass(this,e.PCSS+"-clickable"),this.removeEventListener("click",this._sortButtonClickHandler,!1),t.remove(),this._sortButton=null)}_updateSortButtonIconGlyph(t=this._sortButton,a=this.gridState,s=this.metadata){var o;e.Utils.isNull(t)||e.Utils.isNullOrEmpty(s)||(t.iconGlyph=(null===(o=null==a?void 0:a.sort)||void 0===o?void 0:o.column)===s.prop?"desc"===a.sort.dir?"arrow_drop_down":"arrow_drop_up":"")}_ensureRescaler(){if(e.Utils.isNull(this._rescaler)){const t=this._rescaler=this._rescaler||new e.Components.PacemRescaleElement;t.handles=[e.UI.RescaleHandle.Right],t.addEventListener(e.UI.RescaleEventType.Rescale,this._rescaleHandler,!1),t.addEventListener(e.UI.RescaleEventType.Start,this._rescaleStartHandler,!1),t.addEventListener(e.UI.RescaleEventType.End,this._rescaleEndHandler,!1),e.CustomElementUtils.findAncestorShell(this).appendChild(t)}}_setupRescaleContainer(){this._ensureRescaler();const t=new e.Components.PacemPanelElement;return t.className="headcell-rescale",t.behaviors=[this._rescaler],t}_disposeRescaleContainer(t=this._rescaleContainer){e.Utils.isNull(t)||(t.remove(),this._rescaleContainer=null)}_disposeRescaler(t=this._rescaler){e.Utils.isNull(t)||(t.removeEventListener(e.UI.RescaleEventType.Rescale,this._rescaleHandler,!1),t.removeEventListener(e.UI.RescaleEventType.Start,this._rescaleStartHandler,!1),t.removeEventListener(e.UI.RescaleEventType.End,this._rescaleEndHandler,!1),t.remove(),this._rescaler=null)}_setup(t=this.metadata){var a,s,o,i,n,r,l;this.setAttribute("css-class","{{ this.metadata && this.metadata.headCell && this.metadata.headCell.cssClass || [] }}"),this.setAttribute("css","{{ this.metadata && this.metadata.headCell && this.metadata.headCell.css }}");const d=!!(null===(a=t.headCell)||void 0===a?void 0:a.textEllipsis)?["text-truncate"]:[];switch(null===(o=null===(s=t.headCell)||void 0===s?void 0:s.verticalAlign)||void 0===o?void 0:o.toLowerCase()){case"top":e.Utils.addClass(this,"headcell-top");break;case"bottom":e.Utils.addClass(this,"headcell-bottom");break;case"middle":e.Utils.addClass(this,"headcell-middle")}switch(null===(n=null===(i=t.headCell)||void 0===i?void 0:i.horizontalAlign)||void 0===n?void 0:n.toLowerCase()){case"left":d.push("text-left");break;case"right":d.push("text-right");break;case"center":d.push("text-center")}this.removeAttribute("content");const c=e.Utils.isNullOrEmpty(d)?"":` class="${d.join(" ")}"`,h=null!==(l=null===(r=t.headCell)||void 0===r?void 0:r.name)&&void 0!==l?l:t.prop;if(this.innerHTML=`<div${c}>${h}</div>`,t.isSortable){this._disposeSortButton();const e=this._sortButton=this._setupSortButton();this._updateSortButtonIconGlyph(e),this.appendChild(e)}if(t.isRescalable){this._disposeRescaleContainer();const e=this._rescaleContainer=this._setupRescaleContainer();this.appendChild(e)}t.isTogglable}_normalizeTooltip(){var e;const t=(null===(e=this.metadata.headCell)||void 0===e?void 0:e.tooltip)||!1;return"object"==typeof t?t:{type:t}}_ensureBalloon(){var a,s,o;const i=!1===(o=this._normalizeTooltip()).type||e.Utils.isNullOrEmpty(s=null===(a=this.metadata.headCell)||void 0===a?void 0:a.description);if(e.Utils.isNull(this._balloon)&&!i){let a=new e.Components.UI.PacemBalloonElement;a.options={behavior:t.UI.BalloonBehavior.Tooltip,trigger:o.trigger||t.UI.BalloonTrigger.Hover,position:o.position||t.UI.BalloonPosition.Top,hoverDelay:200,hoverTimeout:50,align:o.align||t.UI.BalloonAlignment.Auto},e.Utils.addClass(a,e.PCSS+"-headcell-tooltip"),e.CustomElementUtils.findAncestorShell(this).appendChild(this._balloon=a)}const n=this._balloon;if(!(e.Utils.isNull(n)||(n.target=this,n.disabled=i))){const e=s||"";switch(o.type){case"md":case"markdown":n.innerHTML=this._md.toHtml(e);break;case"html":n.innerHTML=e;break;default:n.innerText=e}}}_disposeBalloon(){e.Utils.isNull(this._balloon)||(this._balloon.remove(),this._balloon=null)}};s=__decorate([e.CustomElement({tagName:e.P+"-headcell"})],s),a.PacemHeadCellElement=s}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={}));
6
+ var Pacem,__decorate=this&&this.__decorate||function(e,t,a,s){var o,i=arguments.length,n=i<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,a,s);else for(var r=e.length-1;r>=0;r--)(o=e[r])&&(n=(i<3?o(n):i>3?o(t,a,n):o(t,a))||n);return i>3&&n&&Object.defineProperty(t,a,n),n},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,a,s){if("a"===a&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?s:"a"===a?s.call(e):s?s.value:t.get(e)},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,a,s,o){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?o.call(e,a):o?o.value=a:t.set(e,a),a},__awaiter=this&&this.__awaiter||function(e,t,a,s){return new(a||(a=Promise))((function(o,i){function n(e){try{l(s.next(e))}catch(e){i(e)}}function r(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(n,r)}l((s=s.apply(e,t||[])).next())}))};!function(e){!function(t){!function(a){let s=class PacemCarouselElement extends t.UI.PacemAdaptedIterativeElement{constructor(){super(...arguments),this.interval=4e3}};__decorate([e.ViewChild(e.P+"-adapter")],s.prototype,"adapter",void 0),__decorate([e.ViewChild(e.P+"-slideshow")],s.prototype,"slideshow",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Number})],s.prototype,"interval",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Boolean})],s.prototype,"pausable",void 0),s=__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>`})],s),a.PacemCarouselElement=s}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){var s,o,i;class PacemContextMenuItemElement extends t.PacemItemElement{connectedCallback(){super.connectedCallback(),e.Utils.addClass(this,e.PCSS+"-context-menuitem")}propertyChangedCallback(e,t,a,s){super.propertyChangedCallback(e,t,a,s);const o=this.container;o instanceof l&&o.refresh()}}a.PacemContextMenuItemElement=PacemContextMenuItemElement;let n=class PacemContextMenuItemCommandElement extends PacemContextMenuItemElement{createMenuItemElement(){const e=new t.UI.PacemButtonElement;return e.commandArgument=this.commandArgument,e.commandName=this.commandName,e.textContent=this.caption,e.iconGlyph=this.iconGlyph,e.confirmationDialog=this.confirmationDialog,e.confirmationMessage=this.confirmationMessage,e.tooltip=this.tooltip,e.disabled=this.disabled,e}};__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],n.prototype,"commandName",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],n.prototype,"caption",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],n.prototype,"tooltip",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],n.prototype,"iconGlyph",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.String})],n.prototype,"confirmationMessage",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.Element})],n.prototype,"confirmationDialog",void 0),__decorate([e.Watch({emit:!1,reflectBack:!0,converter:e.PropertyConverters.Json})],n.prototype,"commandArgument",void 0),n=__decorate([e.CustomElement({tagName:e.P+"-context-menuitem-command"})],n),a.PacemContextMenuItemCommandElement=n;let r=class PacemContextMenuItemSeparatorElement extends PacemContextMenuItemElement{createMenuItemElement(){const e=document.createElement("hr");return e.style.pointerEvents="none",e}};r=__decorate([e.CustomElement({tagName:e.P+"-context-menuitem-separator"})],r),a.PacemContextMenuItemSeparatorElement=r;let l=class PacemContextMenuElement extends t.PacemItemsContainerElement{constructor(){super(...arguments),this._dispatchCommand=t=>{var a;e.avoidHandler(t),this._onCommand(new e.CommandEvent({commandName:t.detail.commandName,commandArgument:null!==(a=t.detail.commandArgument)&&void 0!==a?a:this.commandArgument}))},s.set(this,void 0),o.set(this,void 0),i.set(this,void 0),this._slotchangeHandler=e=>{this._resetLayout()},this._attributeChangeHandler=e=>this._refreshMenuItems,this._mouseupHandler=t=>{const a=this._ensureBalloon();e.Utils.isNull(a)||a.popout()}}validate(e){return e instanceof PacemContextMenuItemElement}_ensureButton(){if(!e.Utils.isNull(__classPrivateFieldGet(this,s,"f")))return __classPrivateFieldGet(this,s,"f");const a=this._slot;if(e.Utils.isNull(a))return null;const i=this._lookForAButton();if(!e.Utils.isNull(i))return __classPrivateFieldSet(this,s,i,"f");const n=new t.UI.PacemButtonElement;n.setAttribute("slot","button"),n.className=`${e.PCSS}-margin margin-0 button-flat`;const r=__classPrivateFieldSet(this,o,new t.UI.PacemIconElement,"f");return r.icon=this.icon,n.appendChild(r),this.appendChild(n),__classPrivateFieldSet(this,s,n,"f")}_lookForAButton(){const t=this._slot;if(e.Utils.isNull(t))return null;const a=t.assignedElements({flatten:!0});return e.Utils.isNullOrEmpty(a)?null:a[0]}_ensureBalloon(){let a=__classPrivateFieldGet(this,i,"f");if(!e.Utils.isNull(a))return a;const s=e.CustomElementUtils.findAncestorShell(this);return e.Utils.isNull(s)?null:(a=new t.UI.PacemBalloonElement,a.options={trigger:t.UI.BalloonTrigger.Click,position:t.UI.BalloonPosition.HorizontalAuto,align:t.UI.BalloonAlignment.Auto,autoAdjust:!0},a.addEventListener(e.CommandEventName,this._dispatchCommand,!1),a.className=`${e.PCSS}-contextmenu`,s.appendChild(a),__classPrivateFieldSet(this,i,a,"f"))}register(t){const a=super.register(t);return a&&(t.addEventListener(e.AttributeChangeEventName,this._attributeChangeHandler,!1),this._refreshMenuItems()),a}unregister(t){const a=super.unregister(t);return a&&(t.removeEventListener(e.AttributeChangeEventName,this._attributeChangeHandler,!1),this._refreshMenuItems()),a}_onCommand(t){this.dispatchEvent(new CustomEvent(e.CommandEventName,{detail:t.detail,cancelable:!0,bubbles:!0})),this.dispatchEvent(new CustomEvent(t.detail.commandName.toLowerCase(),{detail:t.detail.commandArgument,cancelable:!0,bubbles:!0}))}_resetLayout(){const t=this._ensureButton(),a=this._ensureBalloon();e.Utils.isNull(t)||e.Utils.isNull(a)||(a.target=t)}viewActivatedCallback(){super.viewActivatedCallback(),this._resetLayout(),this._slot.addEventListener("slotchange",this._slotchangeHandler,!1)}propertyChangedCallback(t,a,s,i){super.propertyChangedCallback(t,a,s,i),i||"icon"!==t||e.Utils.isNull(__classPrivateFieldGet(this,o,"f"))||(__classPrivateFieldGet(this,o,"f").icon=s)}disconnectedCallback(){this._disposeButton(),this._disposeSlot(),this._disposeBalloon(),super.disconnectedCallback()}refresh(){this._refreshMenuItems()}_disposeButton(){__classPrivateFieldSet(this,s,__classPrivateFieldSet(this,o,null,"f"),"f")}_disposeSlot(){const t=this._slot;e.Utils.isNull(t)||t.removeEventListener("slotchange",this._slotchangeHandler,!1)}_disposeBalloon(){const t=__classPrivateFieldGet(this,i,"f");e.Utils.isNull(t)||(t.removeEventListener(e.CommandEventName,this._dispatchCommand,!1),this._disposeBalloonChildren(0),t.remove(),__classPrivateFieldSet(this,i,null,"f"))}_disposeBalloonChildren(e){const t=__classPrivateFieldGet(this,i,"f");for(let a=t.children.length-1;a>=e;a--){const e=t.children.item(a);e.removeEventListener("mouseup",this._mouseupHandler,!1),e.remove()}}_refreshMenuItems(){const t=this._ensureBalloon();if(e.Utils.isNull(t))return;const a=t.children.length;let s=0;for(let e of this.items){if(e.hide)continue;const o=e.createMenuItemElement();if(o.addEventListener("mouseup",this._mouseupHandler,!1),s<a){const e=t.children.item(s);e.removeEventListener("mouseup",this._mouseupHandler,!1),e.replaceWith(o)}else t.appendChild(o);s++}this._disposeBalloonChildren(s)}};s=new WeakMap,o=new WeakMap,i=new WeakMap,__decorate([e.ViewChild("slot[name=button]")],l.prototype,"_slot",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],l.prototype,"commandArgument",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],l.prototype,"icon",void 0),__decorate([e.Debounce(!0)],l.prototype,"_refreshMenuItems",null),l=__decorate([e.CustomElement({tagName:e.P+"-context-menu",shadow:!0,template:'<slot name="button"></slot><slot></slot>'})],l),a.PacemContextMenuElement=l}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let s;!function(e){e.Text="text",e.Html="html",e.Image="image",e.Markdown="markdown"}(s=a.EditMode||(a.EditMode={}));let o=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||s.Text;return t.hide=a!==s.Text&&a!==s.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||s.Text;return t.hide=a!==s.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 o=this.type||s.Text;return a.hide=o!==s.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 s.Html:a.innerHTML=t;break;case s.Markdown:if(a.localName===e.P+"-markdown")a.value=t;else a.innerHTML=this._markdown.toHtml(t);break;case s.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 s.Html:return t.innerHTML;case s.Image:switch(t.localName){case e.P+"-img":case"img":return t.src;default:let a=getComputedStyle(t).backgroundImage,s=/url\(["']?([^'"]+)["']?\)/.exec(a);return s&&s.length&&s[1]}case s.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,o,i){switch(super.propertyChangedCallback(t,a,o,i),t){case"imageUploadUrl":e.Utils.isNull(this._editImage)||(this._editImage.uploadUrl=o);break;case"allowSnapshot":e.Utils.isNull(this._editImage)||(this._editImage.allowSnapshot=o);break;case"imageSet":e.Utils.isNull(this._editImage)||(this._editImage.imageSet=o);break;case"disabled":this._setup();break;case"type":const t=o;e.Utils.isNull(this._textarea)||(this._textarea.hide=t!==s.Text&&t!==s.Markdown),e.Utils.isNull(this._contenteditable)||(this._contenteditable.hide=t!==s.Html),e.Utils.isNull(this._editImage)||(this._editImage.hide=t!==s.Image);break;case"maxImageHeight":e.Utils.isNull(this._editImage)||(this._editImage.maxHeight=o);break;case"maxImageWidth":e.Utils.isNull(this._editImage)||(this._editImage.maxWidth=o)}}edit(a){e.avoidHandler(a);var s=this._target;if(!e.Utils.isNull(s)){this._removeButton(),this._content=s;var o=this._state=this._retrieve();e.Utils.isNull(this._editImage)||(this._editImage.disabled=!1),this._dialog.open(o).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})],o.prototype,"key",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],o.prototype,"type",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Element})],o.prototype,"target",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],o.prototype,"imageUploadUrl",void 0),__decorate([e.Watch({emit:!1})],o.prototype,"imageSet",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],o.prototype,"maxImageWidth",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],o.prototype,"maxImageHeight",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],o.prototype,"allowSnapshot",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-edit"})],o),a.PacemEditElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let s=class PacemGalleryElement extends t.UI.PacemAdaptedIterativeElement{get adapter(){return this._adapter}_heroAnimate(t,a){return __awaiter(this,void 0,void 0,(function*(){if(!e.Utils.isNull(t)){let s=document.createElement(e.P+"-img"),o=this._heroPlaceholderProxy.dom[0];const i=300;s.src=a||t.src,s.adapt="contain";let n=e.Utils.offset(o),r=e.Utils.offset(t),l=s.style;const d=getComputedStyle(o);l.border=d.border,l.width=o.clientWidth+"px",l.height=o.clientHeight+"px",l.position="absolute",l.zIndex=d.zIndex,l.top=n.top+"px",l.left=n.left+"px";const c=t.clientWidth/o.clientWidth,h=t.clientHeight/o.clientHeight,m=r.left-n.left+"px",u=r.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}, ${u}) scale(${c}, ${h})`,document.body.appendChild(s),requestAnimationFrame((()=>{s.style.transform=""})),yield e.Utils.waitForAnimationEnd(s,i),s.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")],s.prototype,"_adapter",void 0),__decorate([e.ViewChild(e.P+"-lightbox")],s.prototype,"_lightbox",void 0),__decorate([e.ViewChild(e.P+"-slideshow")],s.prototype,"_slideshow",void 0),__decorate([e.ViewChild(e.P+"-shell-proxy")],s.prototype,"_heroPlaceholderProxy",void 0),__decorate([e.Watch()],s.prototype,"_poppingUp",void 0),s=__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 }}" hide="{{ !::_lightbox.show }}">\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="{{ !::_lightbox.show || !(: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>`})],s),a.PacemGalleryElement=s}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){var s,o;let i=o=class PacemModalFormElement extends t.UI.PacemDialogBase{get form(){return this._form}constructor(){super(),this.suddenValidation=!0,this.method=e.Net.HttpMethod.Post,this._keyupHandler=t=>{if(!(13!==t.keyCode||t.shiftKey||t.ctrlKey||t.altKey||t.metaKey)){let a=t.currentTarget.querySelector(`.${e.PCSS}-dialog-buttons ${e.P}-button[type=submit]`);e.Utils.isNull(a)||!e.Utils.isVisible(a)||a.disabled||a.click()}},s.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.addEventListener("keyup",this._keyupHandler,!1),this._emitter.start()}disconnectedCallback(){this._emitter.stop(),this.removeEventListener("keyup",this._keyupHandler,!1),super.disconnectedCallback()}_submit(a){this.readonly?this.commit(t.UI.DialogButton.Ok,a):(e.avoidHandler(a),this._form.validate().then((s=>{s&&(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 ${o} cannot be null.`;__classPrivateFieldSet(this,s,a,"f");var n=super.open(t);return i&&this._form.setPristine(),n}commit(t,a){super.commit(t,a),__classPrivateFieldGet(this,s,"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}}};s=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=o=__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} }}" type="submit"\n class="button primary button-size size-small" disabled="{{ (:host.suddenValidation && !:host.readonly && !(::_form.valid && ::_form.dirty)) || ::_fetcher.fetching }}">\n <${e.P}-panel class="submit-spinner ${e.PCSS}-anim anim-pop" hide="{{ !::_form.fetching }}"><i class="${e.PCSS}-icon ${e.PCSS}-anim anim-rotate rotate-uniform display-block">refresh</i></${e.P}-panel>\n <${e.P}-text text="{{ :host.okCaption || 'OK' }}"></${e.P}-text>\n </${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 <div class="${e.PCSS}-dialog-heading">\n <${e.P}-content></${e.P}-content>\n </div>\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 s;let o=class PacemRouterHashStateElement extends t.PacemEventTarget{constructor(){super(...arguments),this.default={},this.state={},this.normalizedState={},s.set(this,void 0),this._routerNavigatingHandler=e=>{__classPrivateFieldSet(this,s,!0,"f")},this._routerNavigateHandler=e=>{__classPrivateFieldSet(this,s,!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||__classPrivateFieldGet(this,s,"f")||(this._updateNormalizedState(),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 s=e.Utils.extend({},t||{}),o=e.Utils.extend({},a||{});for(let e in s){if(!this._areSubstantiallyEquivalent(s[e],o[e]))return!1;delete s[e],delete o[e]}for(let e in o)if(!this._areSubstantiallyEquivalent(s[e],o[e]))return!1;return!0}_updateNormalizedState(e=this.state){if(this.disabled||__classPrivateFieldGet(this,s,"f"))return;const t=this._normalizeState(e);this._areStatesEquivalent(t,this.normalizedState)||(this.normalizedState=t)}_updateStateFromURI(){if(this.disabled||__classPrivateFieldGet(this,s,"f"))return;var t=e.Utils.extend({},this.default||{});const a=this.router;if(!e.Utils.isNull(a)){const s=this._denormalizeState(e.Utils.URIs.parseQuery(a.state&&a.state.$hash||"{}"));e.Utils.extend(t,s)}this._areStatesEquivalent(this.state,t)||(this.state=t)}_updateURIFromState(t=this.normalizedState){if(this.disabled||__classPrivateFieldGet(this,s,"f"))return;const a=this.router;if(!e.Utils.isNull(a)){const s=this._currentBasePath(),i=e.Utils.URIs.parseQuery(a.state.$hash||"{}"),n=t||{};if(!this._areStatesEquivalent(i,n)){const t=this._cleanupStateForURI(n);var o=s;e.Utils.isNullOrEmpty(t)||(o=e.Utils.URIs.appendQuery(s,t,!1,!0)),a.path=o}}}_areSubstantiallyEquivalent(t,a){return null!=t||(t=""),null!=a||(a=""),t.toString()==a.toString()||e.Utils.areSemanticallyEqual(t,a)||JSON.stringify(t)===JSON.stringify(a)}_cleanupStateForURI(t=this.state){const a=e.Utils.clone(t||{}),s=this.default;for(let t in a)(e.Utils.isNullOrEmpty(a[t])&&(e.Utils.isNull(s)||!(t in s))||!e.Utils.isNull(s)&&t in s&&this._areSubstantiallyEquivalent(s[t],a[t]))&&delete a[t];return a}_normalizeState(t=this.state,a=this.default){var s={};const o=a;for(let a in t||{}){const i=t[a];if(e.Utils.isNullOrEmpty(i))e.Utils.isNull(o)||!(a in o)||e.Utils.isNullOrEmpty(o[a])||(s[a]="");else switch(typeof i){case"number":case"bigint":case"boolean":Object.defineProperty(s,a,{enumerable:!0,value:i.toString()});break;case"symbol":case"string":Object.defineProperty(s,a,{enumerable:!0,value:i});break;default:if(e.Utils.Dates.isDate(i))Object.defineProperty(s,a,{enumerable:!0,value:i.toISOString()});else{if(!(i instanceof RegExp))throw new Error("Type not supported to be normalized into a URI hash.");Object.defineProperty(s,a,{enumerable:!0,value:i.source})}}}return s}_denormalizeState(t=this.normalizedState,a=this.default){const s={},o=a||{};for(let a in t){if(!(a in o)){s[a]=t[a];continue}const i=o[a],n=t[a];switch(typeof i){case"boolean":Object.defineProperty(s,a,{enumerable:!0,value:e.PropertyConverters.Boolean.convert(n)});break;case"number":case"bigint":Object.defineProperty(s,a,{enumerable:!0,value:e.PropertyConverters.Number.convert(n)});break;case"symbol":case"string":Object.defineProperty(s,a,{enumerable:!0,value:e.PropertyConverters.String.convert(n)});break;default:i instanceof Date?Object.defineProperty(s,a,{enumerable:!0,value:e.PropertyConverters.Date.convert(n)}):i instanceof RegExp?Object.defineProperty(s,a,{enumerable:!0,value:new RegExp(n,i.flags)}):Object.defineProperty(s,a,{enumerable:!0,value:n})}}return s}set(t,a){var s={};"string"==typeof t?Object.defineProperty(s,t,{enumerable:!0,value:a}):s=t,this.state=e.Utils.extend({},this.state||{},s)}};s=new WeakMap,__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Element})],o.prototype,"router",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],o.prototype,"default",void 0),__decorate([e.Watch()],o.prototype,"state",void 0),__decorate([e.Watch()],o.prototype,"normalizedState",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-router-hash-state"})],o),a.PacemRouterHashStateElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){let s=class PacemSearchElement extends t.PacemElement{constructor(){super(...arguments),this.hintParameter="q"}propertyChangedCallback(e,t,a,s){if(super.propertyChangedCallback(e,t,a,s),"hint"===e){let e={};e[this.hintParameter]=a,this._fetcher.parameters=e}}};__decorate([e.ViewChild(e.P+"-fetch")],s.prototype,"_fetcher",void 0),__decorate([e.Watch()],s.prototype,"datasource",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],s.prototype,"hint",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],s.prototype,"url",void 0),__decorate([e.Watch({converter:e.PropertyConverters.String})],s.prototype,"method",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],s.prototype,"hintParameter",void 0),s=__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>`})],s),a.PacemSearchElement=s}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){class PacemBaseCellElement extends t.PacemSafeContentElement{viewActivatedCallback(){super.viewActivatedCallback(),this.updateColumnPosition(),this.updateLayout(this.metadata)}updateColumnPosition(e=this.metadata,t=this.gridState){this.style.gridColumn=(t.orderedColumns.indexOf(e.prop)+1).toString()}updateVisibility(e=this.state){this.hide=!!e.hidden}propertyChangedCallback(e,t,a,s){if(super.propertyChangedCallback(e,t,a,s),!s)switch(e){case"metadata":this.updateLayout(a);break;case"gridState":this.updateColumnPosition();break;case"state":this.updateVisibility()}}}__decorate([e.Watch({converter:e.PropertyConverters.Json})],PacemBaseCellElement.prototype,"metadata",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],PacemBaseCellElement.prototype,"state",void 0),__decorate([e.Watch({converter:e.PropertyConverters.Json})],PacemBaseCellElement.prototype,"gridState",void 0),a.PacemBaseCellElement=PacemBaseCellElement}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(t){t.DataRowSelectChangeEventName="datarowselectchange";class DataRowSelectChangeEvent extends CustomEvent{constructor(e){super(t.DataRowSelectChangeEventName,{detail:e,bubbles:!1,cancelable:!0})}}t.DataRowSelectChangeEvent=DataRowSelectChangeEvent;const a={},s=[];let o=class PacemDataCellElement extends t.PacemBaseCellElement{updateLayout(e=this.metadata){this._setup(e)}connectedCallback(){super.connectedCallback(),e.Utils.addClass(this,e.PCSS+"-datacell")}propertyChangedCallback(e,t,a,s){if(super.propertyChangedCallback(e,t,a,s),!s)switch(e){case"_contentTooltip":this._updateTooltipJustInCase();break;case"gridState":case"rowindex":this._updateSelection()}}_updateTooltipJustInCase(){var t,a;(null===(a=null===(t=this.metadata.dataCell)||void 0===t?void 0:t.autoTooltip)||void 0===a||a)&&!e.Utils.isNullOrEmpty(this._contentTooltip)?this.setAttribute("tooltip",this._contentTooltip):this.removeAttribute("tooltip")}_inflateContent(t=this.dataitem,a=this.rowindex,s=this.metadata){var o,i,n,r;this._contentTooltip="";let l=null===(o=s.dataCell)||void 0===o?void 0:o.format;const d=null!==(n=null===(i=s.dataCell)||void 0===i?void 0:i.null)&&void 0!==n?n:"";if("function"==typeof l){const o=l(this,s,t,a);return e.Utils.isNullOrEmpty(o)?d:o}const c=null===(r=e.CustomElementUtils.resolvePath(s.prop,t))||void 0===r?void 0:r.target,h=null==c?void 0:c.value;if(e.Utils.isNullOrEmpty(h))return d;const m=e.Utils.lang(this);switch(s.dataType){case"boolean":return`<${e.P}-icon icon="material ${h?"check_circle_outline":"radio_button_unchecked"} text-big-steady"></${e.P}-icon>`;case"time":case"date":case"datetime":return this._contentTooltip=e.Utils.core.date(h,l,m);case"byte":case"int16":case"int32":case"int64":case"short":case"integer":case"int":case"long":case"double":case"decimal":case"float":case"single":case"number":return this._contentTooltip=e.Utils.core.number(h,l||"",m);case"currency":return null!=l||(l="EUR"),this._contentTooltip="string"==typeof l?e.Utils.core.currency(h,l,m):e.Utils.core.number(h,l,m);case"percent":case"percentage":return null!=l||(l={style:"percent",maximumFractionDigits:2}),this._contentTooltip="string"==typeof l?e.Utils.core.currency(h,l,m):e.Utils.core.number(h,l,m);default:return this._contentTooltip=h}}_inflateCssClass(t=this.dataitem,a=this.rowindex,o=this.metadata){var i,n,r,l;if(e.Utils.isNull(t)||e.Utils.isNullOrEmpty(o))return s;const d=o.dataCell&&o.dataCell.cssClass||s,c=[];switch("function"==typeof d?Array.prototype.push.apply(c,d(this,o,t,a)||[]):Array.prototype.push.apply(c,d),null===(n=null===(i=o.dataCell)||void 0===i?void 0:i.verticalAlign)||void 0===n?void 0:n.toLowerCase()){case"top":c.push("datacell-top");break;case"bottom":c.push("datacell-bottom");break;case"middle":c.push("datacell-middle")}switch(null===(l=null===(r=o.dataCell)||void 0===r?void 0:r.horizontalAlign)||void 0===l?void 0:l.toLowerCase()){case"left":c.push("datacell-left");break;case"right":c.push("datacell-right");break;case"center":c.push("datacell-center")}return c}_inflateCss(t=this.dataitem,s=this.rowindex,o=this.metadata){if(e.Utils.isNull(t)||e.Utils.isNullOrEmpty(o))return a;const i=o.dataCell&&o.dataCell.css||a;return"function"==typeof i?i(this,o,t,s):i}_setup(t=this.metadata){var a,s,o;this.setAttribute("css-class","{{ this._inflateCssClass(^item, ^index, this.metadata) }}"),this.setAttribute("css","{{ Pacem.Utils.extend({ 'grid-row': ^index+2 }, this._inflateCss(^item, ^index, this.metadata)) }}");const i=!!(null===(a=t.dataCell)||void 0===a?void 0:a.textEllipsis)?["text-truncate"]:[];switch(null===(o=null===(s=null==t?void 0:t.dataCell)||void 0===s?void 0:s.selectMode)||void 0===o?void 0:o.toLowerCase()){case"cell":case"row":i.push(e.PCSS+"-inert"),i.push(e.PCSS+"-unselect")}this._content.cssClass=i,this._updateSelection()}_updateSelection(){var t,a;(null!==(a=null===(t=this.gridState)||void 0===t?void 0:t.selectedRows)&&void 0!==a?a:[]).indexOf(this.rowindex)>=0?e.Utils.addClass(this,"datarow-selected datacell-filled datacell-primary"):e.Utils.removeClass(this,"datarow-selected datacell-filled datacell-primary")}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Eval})],o.prototype,"dataitem",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],o.prototype,"rowindex",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String,debounce:200})],o.prototype,"_contentTooltip",void 0),__decorate([e.ViewChild(e.P+"-span")],o.prototype,"_content",void 0),o=__decorate([e.CustomElement({tagName:e.P+"-datacell",shadow:!1,template:`<${e.P}-span content="{{ :host._inflateContent(^item, ^index, :host.metadata) }}"></${e.P}-span>`})],o),t.PacemDataCellElement=o}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){const s="datacolumnchange",o="datacolumnstatechange",i={selectCaption:"Details",editCaption:"Edit",editIcon:"edit",deleteCaption:"Delete",deleteIcon:"delete"};class DataCellUIEvent extends e.CustomUIEvent{constructor(e,t,a){super(e,t,{bubbles:!1,cancelable:!0},a)}}a.DataCellUIEvent=DataCellUIEvent;let n=class PacemDataColumnElement extends t.PacemItemElement{propertyChangedCallback(e,t,a,i){if(super.propertyChangedCallback(e,t,a,i),!i)switch(e){case"field":case"headcellCss":case"headcellCssClass":case"datacellCss":case"datacellCssClass":case"resizable":case"togglable":case"sortable":case"label":this.dispatchEvent(new Event(s));break;case"order":case"hide":this.dispatchEvent(new Event(o))}}};function r(t){return`<${e.P}-headcell metadata="{{ :host._getColumnMetadata('${t.prop}') }}" state="{{ :host._columnState.${t.prop} }}" grid-state="{{ :host._gridState }}" \non-${a.DataColumnSortEventName}=":host._broadcastSortCommand($event)"\non-${a.DataColumnRescaleEventName}=":host._broadcastRescaleCommand($event)"></${e.P}-headcell>`}function l(t,a){return`<${e.P}-datacell metadata="{{ :host._getColumnMetadata('${t.prop}') }}" state="{{ :host._columnState.${t.prop} }}" grid-state="{{ :host._gridState }}"\ndataitem="{{ ^item }}" rowindex="{{ ^index }}" ${a}></${e.P}-datacell>`}__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],n.prototype,"field",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.String})],n.prototype,"label",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],n.prototype,"resizable",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],n.prototype,"togglable",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Boolean})],n.prototype,"sortable",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],n.prototype,"order",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],n.prototype,"format",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],n.prototype,"headcellCss",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],n.prototype,"headcellCssClass",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],n.prototype,"datacellCss",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Number})],n.prototype,"datacellCssClass",void 0),n=__decorate([e.CustomElement({tagName:e.P+"-datacolumn"})],n),a.PacemDataColumnElement=n;let d=class PacemDataGridElement extends t.PacemItemsContainerElement{constructor(t=e.Utils.uniqueCode()){super(),this._key=t,this.state={},this._columnState={},this._gridState={sort:{},orderedColumns:[],selectedRows:[]},this._itemDataColumnRebuildHandler=e=>{this._adaptColumnMetadata(this.items||[])},this._itemDataColumnChangeHandler=e=>{this._adaptColumnMetadata(this.items||[])},this._memoizer={}}validate(e){return e instanceof n}viewActivatedCallback(){super.viewActivatedCallback(),this.addEventListener(e.CommandEventName,this._onCommand,!1),this._adaptColumnMetadata();const t=this._adaptedColumnMetadata||[];this._buildUpGrid(t)}disconnectedCallback(){this.removeEventListener(e.CommandEventName,this._onCommand,!1),super.disconnectedCallback()}propertyChangedCallback(e,t,a,s){if(super.propertyChangedCallback(e,t,a,s),!s)switch(e){case"items":case"metadata":this._adaptColumnMetadata();break;case"_adaptedColumnMetadata":this._buildUpGrid(a);break;case"datasource":this._setRowSelection();break;case"state":this._mergeState(a)}}register(e){return!!super.register(e)&&(e.addEventListener(s,this._itemDataColumnRebuildHandler,!1),e.addEventListener(o,this._itemDataColumnChangeHandler,!1),!0)}unregister(e){return!!super.unregister(e)&&(e.removeEventListener(s,this._itemDataColumnRebuildHandler,!1),e.removeEventListener(o,this._itemDataColumnChangeHandler,!1),!0)}setRowSelection(...e){const t=Array.from(e);this._setRowSelection(t)}_setRowSelection(t){const s=(t||[]).map((e=>({item:this.datasource[e],index:e}))),o=new a.DataRowSelectChangeEvent({selectedRows:s});if(this.dispatchEvent(o),!o.defaultPrevented){let t=o.detail.selectedRows;e.Utils.isArray(t)||(t=[]),this._doSetRowSelection(t.map((e=>{var t;return null!==(t=null==e?void 0:e.index)&&void 0!==t?t:-1})).filter((e=>e>=0)))}}_doSetRowSelection(e){const t={selectedRows:e};this._mergeState(t)}_mergeState(t=this.state){var a;null!=t||(t={});const s={selectedRows:(t.selectedRows||[]).map((e=>"number"==typeof e?e:e.index))},o=this._gridState=e.Utils.extend({},this._gridState,t,s);this.state=e.Utils.extend(null!==(a=this.state)&&void 0!==a?a:{},o)}_adaptColumnMetadata(e=this.items,t=this.metadata){const a=Array.prototype.concat.apply((e||[]).map((e=>({prop:e.field,headCell:{name:e.label,cssClass:e.headcellCssClass||[],css:e.headcellCss||{}},dataCell:{format:e.format,cssClass:e.datacellCssClass||[],css:e.datacellCss||{}},hide:e.hide,isRescalable:e.resizable,isSortable:e.sortable,isTogglable:e.togglable,order:e.order,width:1}))),t||[]);this._memoizer={},this._adaptedColumnMetadata=a}_getColumnMetadata(e){return this._memoizer[e]=this._memoizer[e]||this._adaptedColumnMetadata.find((t=>t.prop===e))}_buildUpGrid(a){const s=this._tableContainer;if(e.Utils.isNull(s))return;if(e.Utils.isNullOrEmpty(a))return void(s.innerHTML="");const o=this.options=e.Utils.extend({},i,this.options||{}),n=o.allowDelete||o.allowEdit||o.allowSelect,d=o.allowMultiSelect&&n;let c=d?"auto ":"",h=d?`<div class="${e.PCSS}-headcell"></div>`:"",m=d?`<${e.P}-panel class="${e.PCSS}-datacell" style="grid-column: 1;" css="{{ {'grid-row': ^index+2} }}"></${e.P}-panel>`:"",u=d?`<div class="${e.PCSS}-footcell"></div>`:"";const p=d?a.length+2:n?a.length+1:a.length;this._gridState.orderedColumns=a.sort(((e,t)=>{var a,s;return(null!==(a=e.order)&&void 0!==a?a:0)-(null!==(s=t.order)&&void 0!==s?s:0)})).map((e=>e.prop));let _="";for(let e of t.PacemElement.emittedEventTypes)_+=` on-${e}=":host._broadcastUiEvent(^item, ^index, $event)"`;for(let e of a)this._columnState[e.prop]={hidden:e.hide},c+=this._getColumnSize(e).replaceAll(" ","")+" ",h+=r(e),m+=l(e,_);m+=`<${e.P}-panel class="${e.PCSS}-datarow" css-class="{{ {'datarow-alt': ^index % 2 === 1, 'datarow-selected': :host._gridState.selectedRows.indexOf(^index) >= 0 } }}" style="grid-column: 1 /span ${p};" css="{{ {'grid-row': ^index+2} }}"></${e.P}-panel>`;const v=`<${e.P}-repeater datasource="{{ :host.datasource }}">\n<${e.P}-panel class="${e.PCSS}-datatable" css="{{ {'grid-template-columns': :host._getColumnSizes(:host._columnState, '${c.trimEnd()}', :host._gridState) } }}">\n ${h}\n <template>\n ${m}\n </template>\n ${u}\n</${e.P}-panel>`;s.innerHTML=v}_getColumnSizes(t=this._columnState,a,s=this._gridState){if(e.Utils.isNullOrEmpty(t))return a;const o=a.split(" ");for(let e in t){const a=t[e],i=s.orderedColumns.indexOf(e);a.hidden?o[i]="auto":a.pixelWidth>0&&(o[i]=a.pixelWidth+"px")}return o.join(" ")}_getColumnSize(e){if(e.hide)return"auto";const t=e.minPixelWidth,a=e.maxPixelWidth;if(a>0&&t>0)return`minmax(${t}px, ${a}px)`;{const s="number"==typeof e.width?e.width+"fr":"auto";return t>0?`minmax(${t}px, ${s})`:a>0?`minmax(${s}, ${a}px)`:s}}_onCommand(e){this.dispatchEvent(new t.ItemCommandEvent(e)),this.dispatchEvent(new t.CustomItemCommandEvent(e))}_broadcastUiEvent(e,t,a){var s,o,i;const n=a.type.toLowerCase(),r="datacell"+n,l={dataitem:e,rowindex:t,datacell:a.srcElement},d=a instanceof MouseEvent||a instanceof TouchEvent||a instanceof KeyboardEvent?new DataCellUIEvent(r,l,a):new DataCellUIEvent(r,l);if(this.dispatchEvent(d),"click"===n&&!d.defaultPrevented){switch(null===(i=null===(o=null===(s=d.detail.datacell.metadata)||void 0===s?void 0:s.dataCell)||void 0===o?void 0:o.selectMode)||void 0===i?void 0:i.toLowerCase()){case"cell":break;case"row":this._broadcastSelectCommand(d.detail.rowindex)}}}_broadcastSortCommand(t){const s=t.detail,o=new a.DataColumnSortEvent(s);if(this.dispatchEvent(o),!o.defaultPrevented){const t={column:""};"string"==typeof o.detail.column&&(t.column=o.detail.column),"string"==typeof o.detail.dir&&(t.dir="desc"===o.detail.dir?"desc":"asc"),this._gridState=e.Utils.extend({},this._gridState,{sort:t})}}_broadcastRescaleCommand(t){const s=t.detail,o=new a.DataColumnRescaleEvent(s);if(this.dispatchEvent(o),!o.defaultPrevented){let a=s.width;"number"==typeof o.detail.width&&o.detail.width>0&&(a=o.detail.width);const i={};i[t.srcElement.metadata.prop]={pixelWidth:a},this._columnState=e.Utils.extend({},this._columnState,i)}}_broadcastSelectCommand(t){let a=(this._gridState.selectedRows||[]).slice(0);const s=a.indexOf(t);let o=!0;if(s>=0)a.splice(s,1);else{const s=this.options;if(s.allowMultiSelect)a.push(t);else if(s.allowSelect)a=[t];else{o=!1;const a=`Cannot select the row at index ${t} since datagrid options do not allow any row selection.`;e.Utils.isNull(this.logger)?console.warn(a):this.log(e.Logging.LogLevel.Warn,a)}}o&&this._setRowSelection(a)}};__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],d.prototype,"metadata",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],d.prototype,"options",void 0),__decorate([e.Watch({emit:!1,converter:e.PropertyConverters.Json})],d.prototype,"state",void 0),__decorate([e.Watch({emit:!0,converter:e.PropertyConverters.Json})],d.prototype,"datasource",void 0),__decorate([e.ViewChild("."+e.PCSS+"-datagrid")],d.prototype,"_tableContainer",void 0),__decorate([e.Watch()],d.prototype,"_adaptedColumnMetadata",void 0),__decorate([e.Watch()],d.prototype,"_columnState",void 0),__decorate([e.Watch()],d.prototype,"_gridState",void 0),__decorate([e.Debounce()],d.prototype,"_adaptColumnMetadata",null),d=__decorate([e.CustomElement({tagName:e.P+"-datagrid",shadow:!1,template:`<div class="${e.PCSS}-datagrid"></div><${e.P}-content></${e.P}-content>`})],d),a.PacemDataGridElement=d}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={})),function(e){!function(t){!function(a){a.DataColumnSortEventName="datacolumnsort";class DataColumnSortEvent extends CustomEvent{constructor(e){super(a.DataColumnSortEventName,{detail:e,bubbles:!1,cancelable:!0})}}a.DataColumnSortEvent=DataColumnSortEvent,a.DataColumnRescaleEventName="datacolumnrescale";class DataColumnRescaleEvent extends CustomEvent{constructor(e){super(a.DataColumnRescaleEventName,{detail:e,bubbles:!1,cancelable:!0})}}a.DataColumnRescaleEvent=DataColumnRescaleEvent;let s=class PacemHeadCellElement extends a.PacemBaseCellElement{constructor(t=new e.MarkdownService){super(),this._md=t,this._sortButtonClickHandler=e=>{var t;const a=this.metadata,s=this.gridState,o=a.prop,i=(null===(t=s.sort)||void 0===t?void 0:t.column)===o?"desc"===s.sort.dir?"asc":"desc":a.defaultSort||"asc";this.dispatchEvent(new DataColumnSortEvent({column:o,dir:i}))},this._rescaleHandler=e=>{var t;e.preventDefault();const a=e.detail,s=Math.max(null!==(t=this.metadata.minPixelWidth)&&void 0!==t?t:24,a.currentPosition.x-this._columnBBox.x);this.dispatchEvent(new DataColumnRescaleEvent({width:s}))},this._rescaleStartHandler=t=>{this._columnBBox=e.Utils.offsetRect(this)},this._rescaleEndHandler=e=>{}}connectedCallback(){super.connectedCallback(),e.Utils.addClass(this,e.PCSS+"-headcell")}propertyChangedCallback(e,t,a,s){super.propertyChangedCallback(e,t,a,s),s||"gridState"!==e||this._updateSortButtonIconGlyph()}viewActivatedCallback(){super.viewActivatedCallback(),this._ensureBalloon()}disconnectedCallback(){this._disposeBalloon(),this._disposeRescaler(),super.disconnectedCallback()}updateLayout(e=this.metadata){this._setup(e)}_setupSortButton(){const t=new e.Components.UI.PacemButtonElement;return t.className=`button-flat headcell-sort ${e.PCSS}-inert`,this.addEventListener("click",this._sortButtonClickHandler,!1),e.Utils.addClass(this,e.PCSS+"-clickable"),t}_disposeSortButton(t=this._sortButton){e.Utils.isNull(t)||(e.Utils.removeClass(this,e.PCSS+"-clickable"),this.removeEventListener("click",this._sortButtonClickHandler,!1),t.remove(),this._sortButton=null)}_updateSortButtonIconGlyph(t=this._sortButton,a=this.gridState,s=this.metadata){var o;e.Utils.isNull(t)||e.Utils.isNullOrEmpty(s)||(t.iconGlyph=(null===(o=null==a?void 0:a.sort)||void 0===o?void 0:o.column)===s.prop?"desc"===a.sort.dir?"arrow_drop_down":"arrow_drop_up":"")}_ensureRescaler(){if(e.Utils.isNull(this._rescaler)){const t=this._rescaler=this._rescaler||new e.Components.PacemRescaleElement;t.handles=[e.UI.RescaleHandle.Right],t.addEventListener(e.UI.RescaleEventType.Rescale,this._rescaleHandler,!1),t.addEventListener(e.UI.RescaleEventType.Start,this._rescaleStartHandler,!1),t.addEventListener(e.UI.RescaleEventType.End,this._rescaleEndHandler,!1),e.CustomElementUtils.findAncestorShell(this).appendChild(t)}}_setupRescaleContainer(){this._ensureRescaler();const t=new e.Components.PacemPanelElement;return t.className="headcell-rescale",t.behaviors=[this._rescaler],t}_disposeRescaleContainer(t=this._rescaleContainer){e.Utils.isNull(t)||(t.remove(),this._rescaleContainer=null)}_disposeRescaler(t=this._rescaler){e.Utils.isNull(t)||(t.removeEventListener(e.UI.RescaleEventType.Rescale,this._rescaleHandler,!1),t.removeEventListener(e.UI.RescaleEventType.Start,this._rescaleStartHandler,!1),t.removeEventListener(e.UI.RescaleEventType.End,this._rescaleEndHandler,!1),t.remove(),this._rescaler=null)}_setup(t=this.metadata){var a,s,o,i,n,r,l;this.setAttribute("css-class","{{ this.metadata && this.metadata.headCell && this.metadata.headCell.cssClass || [] }}"),this.setAttribute("css","{{ this.metadata && this.metadata.headCell && this.metadata.headCell.css }}");const d=!!(null===(a=t.headCell)||void 0===a?void 0:a.textEllipsis)?["text-truncate"]:[];switch(null===(o=null===(s=t.headCell)||void 0===s?void 0:s.verticalAlign)||void 0===o?void 0:o.toLowerCase()){case"top":e.Utils.addClass(this,"headcell-top");break;case"bottom":e.Utils.addClass(this,"headcell-bottom");break;case"middle":e.Utils.addClass(this,"headcell-middle")}switch(null===(n=null===(i=t.headCell)||void 0===i?void 0:i.horizontalAlign)||void 0===n?void 0:n.toLowerCase()){case"left":d.push("text-left");break;case"right":d.push("text-right");break;case"center":d.push("text-center")}this.removeAttribute("content");const c=e.Utils.isNullOrEmpty(d)?"":` class="${d.join(" ")}"`,h=null!==(l=null===(r=t.headCell)||void 0===r?void 0:r.name)&&void 0!==l?l:t.prop;if(this.innerHTML=`<div${c}>${h}</div>`,t.isSortable){this._disposeSortButton();const e=this._sortButton=this._setupSortButton();this._updateSortButtonIconGlyph(e),this.appendChild(e)}if(t.isRescalable){this._disposeRescaleContainer();const e=this._rescaleContainer=this._setupRescaleContainer();this.appendChild(e)}t.isTogglable}_normalizeTooltip(){var e;const t=(null===(e=this.metadata.headCell)||void 0===e?void 0:e.tooltip)||!1;return"object"==typeof t?t:{type:t}}_ensureBalloon(){var a,s,o;const i=!1===(o=this._normalizeTooltip()).type||e.Utils.isNullOrEmpty(s=null===(a=this.metadata.headCell)||void 0===a?void 0:a.description);if(e.Utils.isNull(this._balloon)&&!i){let a=new e.Components.UI.PacemBalloonElement;a.options={behavior:t.UI.BalloonBehavior.Tooltip,trigger:o.trigger||t.UI.BalloonTrigger.Hover,position:o.position||t.UI.BalloonPosition.Top,hoverDelay:200,hoverTimeout:50,align:o.align||t.UI.BalloonAlignment.Auto},e.Utils.addClass(a,e.PCSS+"-headcell-tooltip"),e.CustomElementUtils.findAncestorShell(this).appendChild(this._balloon=a)}const n=this._balloon;if(!(e.Utils.isNull(n)||(n.target=this,n.disabled=i))){const e=s||"";switch(o.type){case"md":case"markdown":n.innerHTML=this._md.toHtml(e);break;case"html":n.innerHTML=e;break;default:n.innerText=e}}}_disposeBalloon(){e.Utils.isNull(this._balloon)||(this._balloon.remove(),this._balloon=null)}};s=__decorate([e.CustomElement({tagName:e.P+"-headcell"})],s),a.PacemHeadCellElement=s}(t.Plus||(t.Plus={}))}(e.Components||(e.Components={}))}(Pacem||(Pacem={}));
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * pacem v0.50.2-bithynia (https://js.pacem.it)
2
+ * pacem v0.50.2-buhen (https://js.pacem.it)
3
3
  * Copyright 2024 Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.50.2-bithynia",
2
+ "version": "0.50.2-buhen",
3
3
  "name": "pacem",
4
4
  "homepage": "https://js.pacem.it",
5
5
  "repository": {