@pacem/pacem-scaffolding 1.0.0-bessel → 1.0.0-binet

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 (55) hide show
  1. package/dist/browser/pacem-scaffolding.js +420 -38
  2. package/dist/browser/pacem-scaffolding.js.map +1 -1
  3. package/dist/browser/pacem-scaffolding.min.js +2 -2
  4. package/dist/bundle/pacem-scaffolding.min.mjs +91 -91
  5. package/dist/bundle/pacem-scaffolding.mjs +329 -200
  6. package/dist/bundle/pacem-scaffolding.mjs.map +3 -3
  7. package/dist/docs/pacem-scaffolding.json +34788 -0
  8. package/dist/esm/calendar-picker.js +6 -1
  9. package/dist/esm/char-counter.js +3 -1
  10. package/dist/esm/checkbox-list.js +2 -1
  11. package/dist/esm/checkbox.js +3 -1
  12. package/dist/esm/childform.js +1 -1
  13. package/dist/esm/contenteditable.js +4 -1
  14. package/dist/esm/datetime-picker.js +8 -1
  15. package/dist/esm/form.js +65 -1
  16. package/dist/esm/formfield.js +9 -1
  17. package/dist/esm/geolocate.js +2 -1
  18. package/dist/esm/hierarchy.js +6 -1
  19. package/dist/esm/index-components-scaffolding.js +1 -1
  20. package/dist/esm/index-components.js +1 -1
  21. package/dist/esm/index-iife.js +1 -1
  22. package/dist/esm/index-root.js +1 -1
  23. package/dist/esm/index-scaffolding.js +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/dist/esm/input-chars.js +4 -1
  26. package/dist/esm/input-color.js +3 -2
  27. package/dist/esm/input-email.js +13 -7
  28. package/dist/esm/input-file.js +20 -3
  29. package/dist/esm/input-hidden.js +7 -4
  30. package/dist/esm/input-image.js +13 -1
  31. package/dist/esm/input-number.js +5 -2
  32. package/dist/esm/input-password.js +6 -2
  33. package/dist/esm/input-search.js +7 -4
  34. package/dist/esm/input-tel.js +13 -7
  35. package/dist/esm/input-text.js +6 -3
  36. package/dist/esm/input-url.js +13 -7
  37. package/dist/esm/input.js +26 -1
  38. package/dist/esm/l10n.js +2 -1
  39. package/dist/esm/latlng.js +4 -1
  40. package/dist/esm/namevalue-list.js +3 -1
  41. package/dist/esm/property-picker.js +2 -1
  42. package/dist/esm/radio-list.js +2 -1
  43. package/dist/esm/radio.js +2 -1
  44. package/dist/esm/select.js +6 -2
  45. package/dist/esm/slider.js +2 -1
  46. package/dist/esm/snapshot.js +5 -1
  47. package/dist/esm/suggest.js +2 -1
  48. package/dist/esm/tags.js +3 -1
  49. package/dist/esm/textarea-markdown.js +15 -9
  50. package/dist/esm/textarea.js +13 -5
  51. package/dist/esm/types-components.js +53 -2
  52. package/dist/esm/types.js +3 -1
  53. package/dist/esm/validators.js +25 -1
  54. package/package.json +2 -1
  55. package/typings/index.d.ts +626 -14
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @pacem/pacem-scaffolding v1.0.0-bessel (https://js.pacem.it)
2
+ * @pacem/pacem-scaffolding v1.0.0-binet (https://js.pacem.it)
3
3
  * Pacem (https://pacem.it)
4
4
  * Licensed under Apache-2.0
5
5
  */
@@ -52,6 +52,12 @@ var ApiParameterType;
52
52
  ApiParameterType2["Object"] = "object";
53
53
  })(ApiParameterType || (ApiParameterType = {}));
54
54
  var ApiParserBase = class {
55
+ /**
56
+ * Fetches the API description document from `url` and parses it into an {@link ApiManifest}.
57
+ * @param url Url the API description (OpenAPI/Swagger document) is fetched from.
58
+ * @param headers Optional request headers (e.g. for authentication) sent along with the fetch.
59
+ * @returns The parsed manifest, or `null` if the response could not be retrieved/parsed as JSON.
60
+ */
55
61
  async load(url, headers) {
56
62
  let resp = await fetch(url, {
57
63
  mode: "cors",
@@ -85,6 +91,12 @@ var SwaggerParser = class extends ApiParserBase {
85
91
  return definitionHashTag;
86
92
  return arr[1];
87
93
  }
94
+ /**
95
+ * Parses a Swagger (OpenAPI 2.0) document into an {@link ApiManifest}.
96
+ * @param content The Swagger document, either as a parsed object or as a JSON string.
97
+ * @param url Base url of the API, used to derive `baseUrl` when the document doesn't specify `host`/`schemes`.
98
+ * @returns The parsed manifest, with endpoints and resolved schema definitions.
99
+ */
88
100
  parse(content, url) {
89
101
  let j = content;
90
102
  if (typeof j === "string") {
@@ -201,6 +213,12 @@ var SwaggerParser = class extends ApiParserBase {
201
213
  // packages/scaffolding/dist/esm/openapi/openapi3.js
202
214
  import { Utils } from "@pacem/pacem-core";
203
215
  var OpenApi3Parser = class extends ApiParserBase {
216
+ /**
217
+ * Parses an OpenAPI 3.x document into an {@link ApiManifest}.
218
+ * @param content The OpenAPI 3.x document, either as a parsed object or as a JSON string.
219
+ * @param url Base url of the API, used as the manifest's `baseUrl`.
220
+ * @returns The parsed manifest, with endpoints and resolved schema definitions.
221
+ */
204
222
  parse(content, url) {
205
223
  let j = content;
206
224
  if (typeof j === "string") {
@@ -315,6 +333,12 @@ var OpenApiParser = class extends ApiParserBase {
315
333
  this._openApi3 = _openApi3;
316
334
  this._swagger = _swagger;
317
335
  }
336
+ /**
337
+ * Parses `content` as either an OpenAPI 3.x or a Swagger (OpenAPI 2.0) document, dispatching on the presence of an `openapi` property.
338
+ * @param content The API description, either as a parsed object or as a JSON string.
339
+ * @param url Base url of the API, forwarded to the delegate parser to resolve/derive the manifest's `baseUrl`.
340
+ * @returns The parsed manifest.
341
+ */
318
342
  parse(content, url) {
319
343
  let j = content;
320
344
  if (typeof j === "string") {
@@ -546,9 +570,11 @@ var FormEventEmitter = class {
546
570
  }
547
571
  };
548
572
  }
573
+ /** Starts listening for {@link EMITTABLE_EVENT_TYPES} on the target element. */
549
574
  start() {
550
575
  EMITTABLE_EVENT_TYPES.forEach((t) => this._element.addEventListener(t, this._itemEmitHandler, false));
551
576
  }
577
+ /** Stops listening for {@link EMITTABLE_EVENT_TYPES} on the target element. */
552
578
  stop() {
553
579
  EMITTABLE_EVENT_TYPES.forEach((t) => this._element.removeEventListener(t, this._itemEmitHandler, false));
554
580
  }
@@ -713,6 +739,7 @@ disabled="{{ (#${uid}.suddenValidation && (!(#${uid}.valid && #${uid}.dirty))) |
713
739
  return this._buttons;
714
740
  }
715
741
  #fetching;
742
+ /** @readonly Gets whether a submission is currently in flight; also reflected as the `pacem-fetching` CSS class. */
716
743
  get fetching() {
717
744
  return this.#fetching;
718
745
  }
@@ -875,6 +902,11 @@ disabled="{{ (#${uid}.suddenValidation && (!(#${uid}.valid && #${uid}.dirty))) |
875
902
  }
876
903
  return Promise.resolve(false);
877
904
  }
905
+ /**
906
+ * Validates a single named field, or - when `name` is omitted - every field of this form and its
907
+ * sub-forms, running each field's registered validators and updating their `valid`/`invalid` state.
908
+ * @param name Optional name of a single field to validate; validates the whole form (recursively) when omitted.
909
+ */
878
910
  // @Concurrent()
879
911
  validate(name) {
880
912
  if (!Utils3.isNullOrEmpty(name)) {
@@ -971,6 +1003,11 @@ disabled="{{ (#${uid}.suddenValidation && (!(#${uid}.valid && #${uid}.dirty))) |
971
1003
  }
972
1004
  this.valid = valid;
973
1005
  }
1006
+ /**
1007
+ * Registers a nested {@link PacemFormElement} (e.g. rendered by a `PacemChildFormElement`, see
1008
+ * `childform.ts`) so its fields' validity/dirtyness roll up into this form's own {@link valid}/{@link dirty}.
1009
+ * @param form Sub-form to enroll
1010
+ */
974
1011
  registerSubForm(form) {
975
1012
  let arr = this._subForms;
976
1013
  if (arr.indexOf(form) == -1) {
@@ -980,6 +1017,10 @@ disabled="{{ (#${uid}.suddenValidation && (!(#${uid}.valid && #${uid}.dirty))) |
980
1017
  this._checkDirtyness();
981
1018
  }
982
1019
  }
1020
+ /**
1021
+ * Removes a previously-registered nested form; its fields no longer influence this form's {@link valid}/{@link dirty}.
1022
+ * @param form Sub-form to remove
1023
+ */
983
1024
  unregisterSubForm(form) {
984
1025
  let arr = this._subForms, ndx = arr.indexOf(form);
985
1026
  if (ndx >= 0) {
@@ -989,6 +1030,11 @@ disabled="{{ (#${uid}.suddenValidation && (!(#${uid}.valid && #${uid}.dirty))) |
989
1030
  this._checkDirtyness();
990
1031
  }
991
1032
  }
1033
+ /**
1034
+ * Registers a field's {@link PacemModel} under `name`, so it is included in submission ({@link FormSubmitEventArgs#fields}), validation, dirty/valid roll-up and reset. Typically called by the field itself (see `PacemModelElement._registerFieldConditionally` in `types-components.ts`) rather than directly.
1035
+ * @param name Field name to register under
1036
+ * @param model Field implementing {@link PacemModel}
1037
+ */
992
1038
  registerField(name, model) {
993
1039
  var container = this._fields;
994
1040
  if (container[name] != model) {
@@ -1002,6 +1048,11 @@ disabled="{{ (#${uid}.suddenValidation && (!(#${uid}.valid && #${uid}.dirty))) |
1002
1048
  this._checkDirtyness();
1003
1049
  }
1004
1050
  }
1051
+ /**
1052
+ * Removes a previously-registered field.
1053
+ * @param name Field name to remove
1054
+ * @param check Whether to re-check the form's overall validity/dirtyness afterwards (default `true`)
1055
+ */
1005
1056
  unregisterField(name, check = true) {
1006
1057
  var container = this._fields, current = container[name];
1007
1058
  if (current instanceof HTMLElement) {
@@ -1013,6 +1064,11 @@ disabled="{{ (#${uid}.suddenValidation && (!(#${uid}.valid && #${uid}.dirty))) |
1013
1064
  this._checkDirtyness();
1014
1065
  }
1015
1066
  }
1067
+ /**
1068
+ * Registers a {@link Validator} (typically a {@link PacemBaseValidatorElement}) against the named field, so it participates in that field's validation. Typically called by the validator itself rather than directly.
1069
+ * @param name Name of the field being validated
1070
+ * @param validator Validator to enroll
1071
+ */
1016
1072
  registerValidator(name, validator) {
1017
1073
  var container = this._validators[name] = this._validators[name] || [], index = container.indexOf(validator);
1018
1074
  if (index == -1) {
@@ -1024,6 +1080,11 @@ disabled="{{ (#${uid}.suddenValidation && (!(#${uid}.valid && #${uid}.dirty))) |
1024
1080
  this._checkFieldValidity(name);
1025
1081
  }
1026
1082
  }
1083
+ /**
1084
+ * Removes a previously-registered validator from the named field.
1085
+ * @param name Name of the field the validator was registered against
1086
+ * @param validator Validator to remove
1087
+ */
1027
1088
  unregisterValidator(name, validator) {
1028
1089
  this._unregisterValidator(name, validator, true);
1029
1090
  }
@@ -1169,20 +1230,24 @@ var PacemModelElement = class extends PacemFormRelevantElement {
1169
1230
  form.unregisterField(name);
1170
1231
  super.disconnectedCallback();
1171
1232
  }
1233
+ /** @readonly The `value` this element had the last time it was activated or explicitly marked pristine (via {@link setPristine}); what {@link reset} restores. */
1172
1234
  get originalValue() {
1173
1235
  return CustomElementUtils2.getAttachedPropertyValue(this, ORIGINAL_VALUE_FIELD);
1174
1236
  }
1175
1237
  _setAsOriginalValue(v) {
1176
1238
  CustomElementUtils2.setAttachedPropertyValue(this, ORIGINAL_VALUE_FIELD, v);
1177
1239
  }
1240
+ /** Restores {@link value} to {@link originalValue} and clears {@link dirty}. */
1178
1241
  reset() {
1179
1242
  this.value = this.originalValue;
1180
1243
  this.dirty = false;
1181
1244
  }
1245
+ /** Marks the current `value` as the new baseline for {@link reset}/{@link originalValue} and clears {@link dirty}. */
1182
1246
  setPristine() {
1183
1247
  this._setAsOriginalValue(this.value);
1184
1248
  this.dirty = false;
1185
1249
  }
1250
+ /** Marks this field as `dirty`. */
1186
1251
  setDirty() {
1187
1252
  this.dirty = true;
1188
1253
  }
@@ -1280,6 +1345,7 @@ var PacemBaseElement = class extends PacemModelElement {
1280
1345
  compareValuePropertyValues(old, val) {
1281
1346
  return DefaultComparer(old, val);
1282
1347
  }
1348
+ /** @overridable Whether pressing Enter within this field should be prevented from submitting an ancestor form. Defaults to `false`. */
1283
1349
  get preventKeyboardSubmit() {
1284
1350
  return false;
1285
1351
  }
@@ -1402,10 +1468,11 @@ __decorate3([
1402
1468
  ], PacemBaseElement.prototype, "placeholder", void 0);
1403
1469
  var PacemItemElement = class extends Components2.PacemElement {
1404
1470
  #container;
1405
- /** @overridable */
1471
+ /** @overridable Locates the ancestor items-container this item registers against. Defaults to the nearest {@link PacemItemsContainerBaseElement}. */
1406
1472
  findContainer() {
1407
1473
  return CustomElementUtils2.findAncestor(this, (n) => n instanceof PacemItemsContainerBaseElement);
1408
1474
  }
1475
+ /** @readonly Gets the items-container this item is currently registered with, if any. */
1409
1476
  get container() {
1410
1477
  return this.#container;
1411
1478
  }
@@ -1518,9 +1585,11 @@ var PacemDataSourceElement = class extends PacemItemsContainerBaseElement {
1518
1585
  }
1519
1586
  return flag;
1520
1587
  }
1588
+ /** @overridable Maps a raw `datasource` array into its {@link DataSource} representation via {@link mapEntityToItem}. */
1521
1589
  buildAdaptedDatasource(ds = this.datasource) {
1522
1590
  return ds && ds.map((i) => this.mapEntityToItem(i));
1523
1591
  }
1592
+ /** Recomputes {@link adaptedDatasource} and, if the current `value` no longer matches any item, calls {@link handleDatasourceMismatch}. Debounced. */
1524
1593
  databind(datasource = this.buildAdaptedDatasource(this.datasource)) {
1525
1594
  if (Utils4.isNull(datasource) && Utils4.isNull(this.adaptedDatasource))
1526
1595
  return;
@@ -1529,6 +1598,7 @@ var PacemDataSourceElement = class extends PacemItemsContainerBaseElement {
1529
1598
  if (Utils4.isNullOrEmpty(ds.filter((i) => this.isDataSourceItemSelected(i))))
1530
1599
  this.handleDatasourceMismatch(ds);
1531
1600
  }
1601
+ /** @overridable Called by {@link databind} when the current `value` matches none of the adapted `datasource` items. Defaults to clearing `value`. */
1532
1602
  handleDatasourceMismatch(datasource) {
1533
1603
  this.value = void 0;
1534
1604
  }
@@ -1583,6 +1653,7 @@ var PacemDataSourceElement = class extends PacemItemsContainerBaseElement {
1583
1653
  return false;
1584
1654
  }
1585
1655
  }
1656
+ /** @overridable Extracts the selectable `value` out of a raw datasource entity (via {@link valueProperty}, or `entity.value` for a {@link PacemDataItemElement}). */
1586
1657
  mapEntityToValue(entity) {
1587
1658
  if (entity == null) {
1588
1659
  throw "entity cannot be null";
@@ -1596,6 +1667,7 @@ var PacemDataSourceElement = class extends PacemItemsContainerBaseElement {
1596
1667
  }
1597
1668
  return value;
1598
1669
  }
1670
+ /** @overridable Extracts the display text out of a raw datasource entity (via {@link textProperty}, or `entity.label`/`entity.value` for a {@link PacemDataItemElement}). */
1599
1671
  mapEntityToViewValue(entity) {
1600
1672
  if (entity == null)
1601
1673
  throw "entity cannot be null";
@@ -1608,6 +1680,7 @@ var PacemDataSourceElement = class extends PacemItemsContainerBaseElement {
1608
1680
  }
1609
1681
  return viewValue;
1610
1682
  }
1683
+ /** @overridable Adapts a raw datasource entity into its normalized {@link DataSourceItem} shape, using {@link mapEntityToValue}, {@link mapEntityToViewValue} and {@link disabledProperty}. */
1611
1684
  mapEntityToItem(entity) {
1612
1685
  if (entity == null) {
1613
1686
  throw "entity cannot be null";
@@ -1864,6 +1937,7 @@ var PacemContenteditableElement = class PacemContenteditableElement2 extends Pac
1864
1937
  };
1865
1938
  }
1866
1939
  #history;
1940
+ /** @readonly Gets the undo/redo history service tracking this editor's HTML content. */
1867
1941
  get history() {
1868
1942
  return this.#history;
1869
1943
  }
@@ -2518,6 +2592,12 @@ function isRoot(element) {
2518
2592
  return element instanceof HTMLDivElement && element.contentEditable === "true" && element.hasAttribute("pacem") && element.hasAttribute("role") && element.attributes["role"].value === "presenter";
2519
2593
  }
2520
2594
  var ContenteditableDOMObserver = class {
2595
+ /**
2596
+ * Initializes the observer, immediately scanning the given container and then watching it for further mutations.
2597
+ * @param contentElement The contenteditable container to observe.
2598
+ * @param mutationCallback Invoked for each matching node found, added or removed.
2599
+ * @param selector CSS selector used to filter relevant nodes.
2600
+ */
2521
2601
  constructor(contentElement, mutationCallback, selector = "*[contenteditable=false]") {
2522
2602
  this.#callback = mutationCallback;
2523
2603
  this.#selector = selector;
@@ -2556,6 +2636,7 @@ var ContenteditableDOMObserver = class {
2556
2636
  }
2557
2637
  contentElement.querySelectorAll(this.#selector).forEach((el) => this.#callback(el, true));
2558
2638
  }
2639
+ /** Stops observing and notifies the callback, as a removal, for every currently matching node. */
2559
2640
  dispose() {
2560
2641
  this._disposeContainer(this.#contentElement);
2561
2642
  }
@@ -2565,6 +2646,7 @@ var ContenteditableDOMObserver = class {
2565
2646
  #mutationObserver;
2566
2647
  };
2567
2648
  var ContenteditableUtils = class _ContenteditableUtils {
2649
+ /** Builds the default toolbar dashboard (undo/redo, formatting, alignment, link and image commands) as a detached fragment. */
2568
2650
  static getDefaultDashboard() {
2569
2651
  const frag = new DocumentFragment();
2570
2652
  const toolbar0 = document.createElement("div");
@@ -2627,9 +2709,17 @@ var ContenteditableUtils = class _ContenteditableUtils {
2627
2709
  }
2628
2710
  return node;
2629
2711
  }
2712
+ /**
2713
+ * Seeks for the nearest surrounding block-level element of a given Selection's range.
2714
+ * @param range
2715
+ */
2630
2716
  static findSurroundingBlockElement(range) {
2631
2717
  return this.findSurroundingNode(range, _ContenteditableUtils.isBlockElement);
2632
2718
  }
2719
+ /**
2720
+ * Retrieves the sibling block-level elements (e.g. paragraphs) touched by a given Selection's range.
2721
+ * @param range
2722
+ */
2633
2723
  static findSurroundingSiblingBlockElements(range) {
2634
2724
  let output = [];
2635
2725
  if (isRoot(range.startContainer)) {
@@ -2665,6 +2755,10 @@ var ContenteditableUtils = class _ContenteditableUtils {
2665
2755
  }
2666
2756
  return started ? output : root instanceof Element && !isRoot(root) ? [root] : [];
2667
2757
  }
2758
+ /**
2759
+ * Retrieves the top-level (direct children of the contenteditable root) elements spanned by a given Selection's range.
2760
+ * @param range
2761
+ */
2668
2762
  static findContainingRootElements(range) {
2669
2763
  const range1 = range.cloneRange(), range2 = range.cloneRange();
2670
2764
  range1.collapse(true);
@@ -2676,9 +2770,18 @@ var ContenteditableUtils = class _ContenteditableUtils {
2676
2770
  }
2677
2771
  return retval;
2678
2772
  }
2773
+ /**
2774
+ * Checks whether the given node is an `Element` with a block-level (non-`inline*`) computed display.
2775
+ * @param node
2776
+ */
2679
2777
  static isBlockElement(node) {
2680
2778
  return node instanceof Element && !getComputedStyle(node).display.startsWith("inline");
2681
2779
  }
2780
+ /**
2781
+ * Selects a node (or its contents, when `inside` is `true`) and applies the resulting range to the current document Selection.
2782
+ * @param node
2783
+ * @param inside
2784
+ */
2682
2785
  static select(node, inside = false) {
2683
2786
  const range = document.createRange();
2684
2787
  if (!inside) {
@@ -2693,6 +2796,11 @@ var ContenteditableUtils = class _ContenteditableUtils {
2693
2796
  selection.addRange(range);
2694
2797
  return range;
2695
2798
  }
2799
+ /**
2800
+ * Copies all attributes from one element onto another.
2801
+ * @param to
2802
+ * @param from
2803
+ */
2696
2804
  static copyAttributes(to, from) {
2697
2805
  const attrs = from.attributes;
2698
2806
  for (let j = 0; j < attrs.length; j++) {
@@ -4217,6 +4325,7 @@ var PacemBaseValidatorElement = class extends PacemFormRelevantElement {
4217
4325
  }
4218
4326
  }
4219
4327
  #easer;
4328
+ /** Asks the owning {@link PacemFormElement} to re-validate the watched field on the next animation frame; call after a configuration property (e.g. `min`/`max`/`pattern`) changes so the field re-evaluates against the new rule. */
4220
4329
  triggerFormFieldValidation() {
4221
4330
  const form = this.form, watch = this.watch;
4222
4331
  if (!Utils20.isNull(form) && !Utils20.isNullOrEmpty(watch)) {
@@ -4226,6 +4335,7 @@ var PacemBaseValidatorElement = class extends PacemFormRelevantElement {
4226
4335
  });
4227
4336
  }
4228
4337
  }
4338
+ /** Validates `val` against this validator's rule; always resolves `true` (skips {@link evaluate}) when the validator is `disabled`. */
4229
4339
  validate(val) {
4230
4340
  if (this.disabled) {
4231
4341
  return Utils20.fromResult(true);
@@ -4590,12 +4700,15 @@ var PacemFormFieldElement = class PacemFormFieldElement2 extends PacemFormReleva
4590
4700
  };
4591
4701
  this._key = "_" + Utils21.uniqueCode();
4592
4702
  }
4703
+ /** @readonly Gets this field's unique key, used to derive DOM ids for the label/input/fetcher. */
4593
4704
  get key() {
4594
4705
  return this._key;
4595
4706
  }
4707
+ /** @readonly Gets the inner `pacem-fetch` element used to retrieve remotely-sourced datasources for this field. */
4596
4708
  get fetcher() {
4597
4709
  return this._fetcher;
4598
4710
  }
4711
+ /** @readonly Gets the concrete input element built for this field (e.g. `pacem-input-text`, `pacem-select`, ...). */
4599
4712
  get field() {
4600
4713
  return this._field;
4601
4714
  }
@@ -6245,6 +6358,7 @@ var PacemBaseInputElement = class extends PacemBaseElement {
6245
6358
  this.inputField.value = Utils24.isNullOrEmpty(val) ? "" : val;
6246
6359
  }
6247
6360
  }
6361
+ /** @readonly Gets the first (usually only) native input element among {@link PacemBaseElement#inputFields}. */
6248
6362
  get inputField() {
6249
6363
  return this.inputFields[0];
6250
6364
  }
@@ -6634,7 +6748,7 @@ var PacemColorInputElement = class PacemColorInputElement2 extends PacemBaseElem
6634
6748
  return value;
6635
6749
  }
6636
6750
  get inputFields() {
6637
- return [this._tint, this._alpha];
6751
+ return [this._tint, this._alpha].filter((e) => !Utils26.isNull(e));
6638
6752
  }
6639
6753
  };
6640
6754
  __decorate25([
@@ -6662,7 +6776,7 @@ PacemColorInputElement = __decorate25([
6662
6776
  ], PacemColorInputElement);
6663
6777
 
6664
6778
  // packages/scaffolding/dist/esm/input-email.js
6665
- import { P as P24, PCSS as PCSS18, CustomElement as CustomElement23, Defaults as Defaults19, ViewChild as ViewChild15 } from "@pacem/pacem-core";
6779
+ import { P as P24, PCSS as PCSS18, CustomElement as CustomElement23, Utils as Utils27, Defaults as Defaults19, ViewChild as ViewChild15 } from "@pacem/pacem-core";
6666
6780
  var __decorate26 = function(decorators, target, key, desc) {
6667
6781
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6668
6782
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -6671,19 +6785,22 @@ var __decorate26 = function(decorators, target, key, desc) {
6671
6785
  };
6672
6786
  var PacemEmailInputElement = class PacemEmailInputElement2 extends PacemTextualInputElement {
6673
6787
  toggleReadonlyView(readonly) {
6674
- this.input.hidden = readonly;
6675
- this.anchor.hidden = !readonly;
6788
+ const input = this._input, anchor = this._anchor;
6789
+ if (!Utils27.isNull(input))
6790
+ input.hidden = readonly;
6791
+ if (!Utils27.isNull(anchor))
6792
+ anchor.hidden = !readonly;
6676
6793
  }
6677
6794
  get inputFields() {
6678
- return [this.input];
6795
+ return Utils27.isNull(this._input) ? [] : [this._input];
6679
6796
  }
6680
6797
  };
6681
6798
  __decorate26([
6682
6799
  ViewChild15("input[type=email]")
6683
- ], PacemEmailInputElement.prototype, "input", void 0);
6800
+ ], PacemEmailInputElement.prototype, "_input", void 0);
6684
6801
  __decorate26([
6685
6802
  ViewChild15(P24 + "-a")
6686
- ], PacemEmailInputElement.prototype, "anchor", void 0);
6803
+ ], PacemEmailInputElement.prototype, "_anchor", void 0);
6687
6804
  PacemEmailInputElement = __decorate26([
6688
6805
  CustomElement23({
6689
6806
  tagName: P24 + "-input-email",
@@ -6693,7 +6810,7 @@ PacemEmailInputElement = __decorate26([
6693
6810
  ], PacemEmailInputElement);
6694
6811
 
6695
6812
  // packages/scaffolding/dist/esm/input-file.js
6696
- import { P as P25, PCSS as PCSS19, CustomElement as CustomElement24, Watch as Watch22, Defaults as Defaults20, ViewChild as ViewChild16, CustomTypedEvent as CustomTypedEvent4, CustomEventUtils as CustomEventUtils4, PropertyConverters as PropertyConverters21, Animations, Utils as Utils27, stopPropagationHandler as stopPropagationHandler3, avoidHandler as avoidHandler4 } from "@pacem/pacem-core";
6813
+ import { P as P25, PCSS as PCSS19, CustomElement as CustomElement24, Watch as Watch22, Defaults as Defaults20, ViewChild as ViewChild16, CustomTypedEvent as CustomTypedEvent4, CustomEventUtils as CustomEventUtils4, PropertyConverters as PropertyConverters21, Animations, Utils as Utils28, stopPropagationHandler as stopPropagationHandler3, avoidHandler as avoidHandler4 } from "@pacem/pacem-core";
6697
6814
  var __decorate27 = function(decorators, target, key, desc) {
6698
6815
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6699
6816
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -6776,7 +6893,7 @@ var PacemUploadElement = class PacemUploadElement2 extends PacemBaseElement {
6776
6893
  if (uploading) {
6777
6894
  return "sync";
6778
6895
  }
6779
- const hasValue = !Utils27.isNullOrEmpty(file);
6896
+ const hasValue = !Utils28.isNullOrEmpty(file);
6780
6897
  switch (mode) {
6781
6898
  case "directory":
6782
6899
  case "directory-picker":
@@ -6785,7 +6902,7 @@ var PacemUploadElement = class PacemUploadElement2 extends PacemBaseElement {
6785
6902
  case "multiple-picker":
6786
6903
  return hasValue ? "files" : "upload_file";
6787
6904
  }
6788
- if (Utils27.isNullOrEmpty(file)) {
6905
+ if (Utils28.isNullOrEmpty(file)) {
6789
6906
  return "upload_file";
6790
6907
  }
6791
6908
  var filename = file;
@@ -6811,31 +6928,32 @@ var PacemUploadElement = class PacemUploadElement2 extends PacemBaseElement {
6811
6928
  }
6812
6929
  return "filter_none";
6813
6930
  }
6931
+ /** @readonly Gets the raw blob currently being (or last) uploaded. */
6814
6932
  get blob() {
6815
6933
  return this._fields.blob;
6816
6934
  }
6817
6935
  get inputFields() {
6818
- return [this._fileupload];
6936
+ return Utils28.isNull(this._fileupload) ? [] : [this._fileupload];
6819
6937
  }
6820
6938
  getViewValue(val) {
6821
6939
  const value = this._localValue || val;
6822
- if (Utils27.isNullOrEmpty(value)) {
6940
+ if (Utils28.isNullOrEmpty(value)) {
6823
6941
  return "";
6824
6942
  }
6825
6943
  if (typeof value === "string") {
6826
6944
  return value;
6827
6945
  }
6828
6946
  let caption = "name" in value ? value.name : "";
6829
- if (Utils27.isArray(value)) {
6947
+ if (Utils28.isArray(value)) {
6830
6948
  caption = value.map((i) => i.name).join(", ");
6831
6949
  }
6832
6950
  const stats = this._stats;
6833
- if (Utils27.isNullOrEmpty(stats)) {
6951
+ if (Utils28.isNullOrEmpty(stats)) {
6834
6952
  return caption;
6835
6953
  }
6836
6954
  const { size, files } = stats;
6837
6955
  return `${caption}
6838
- (${files} file${files === 1 ? "" : "s"}, ${Utils27.core.size(size)})`;
6956
+ (${files} file${files === 1 ? "" : "s"}, ${Utils28.core.size(size)})`;
6839
6957
  }
6840
6958
  toggleReadonlyView(readonly) {
6841
6959
  this._setupInputElement(readonly);
@@ -6890,17 +7008,17 @@ var PacemUploadElement = class PacemUploadElement2 extends PacemBaseElement {
6890
7008
  ), dispatch = (name) => {
6891
7009
  this.dispatchEvent(new CustomEvent("download", { detail: name, bubbles: true, cancelable: false }));
6892
7010
  };
6893
- if (!Utils27.isNullOrEmpty(value)) {
7011
+ if (!Utils28.isNullOrEmpty(value)) {
6894
7012
  if (typeof value === "string") {
6895
7013
  dispatch(value);
6896
7014
  } else {
6897
- if ("content" in value && !Utils27.isNullOrEmpty(value.content)) {
6898
- Utils27.download(Utils27.dataURLToBlob("data:application/download;base64," + value.content), value.name, value.type);
7015
+ if ("content" in value && !Utils28.isNullOrEmpty(value.content)) {
7016
+ Utils28.download(Utils28.dataURLToBlob("data:application/download;base64," + value.content), value.name, value.type);
6899
7017
  } else if ("name" in value) {
6900
7018
  if ("kind" in value) {
6901
7019
  if (value.kind === "file") {
6902
7020
  value.getFile().then((file) => {
6903
- Utils27.download(file, file.name, file.type);
7021
+ Utils28.download(file, file.name, file.type);
6904
7022
  });
6905
7023
  } else {
6906
7024
  dispatch(value.name);
@@ -6990,7 +7108,7 @@ var PacemUploadElement = class PacemUploadElement2 extends PacemBaseElement {
6990
7108
  }
6991
7109
  }
6992
7110
  async _blobToBase64(blob) {
6993
- const result = await Utils27.blobToDataURL(blob);
7111
+ const result = await Utils28.blobToDataURL(blob);
6994
7112
  return result.substring(result.indexOf("base64,") + 7);
6995
7113
  }
6996
7114
  async _doUpload(blob, skip) {
@@ -7056,7 +7174,7 @@ var PacemUploadElement = class PacemUploadElement2 extends PacemBaseElement {
7056
7174
  name: filename,
7057
7175
  size: blob.size,
7058
7176
  type: file.type,
7059
- lastModified: Utils27.parseDate(file.lastModified).toISOString(),
7177
+ lastModified: Utils28.parseDate(file.lastModified).toISOString(),
7060
7178
  content: await this._blobToBase64(blob)
7061
7179
  };
7062
7180
  }
@@ -7106,11 +7224,11 @@ var PacemUploadElement = class PacemUploadElement2 extends PacemBaseElement {
7106
7224
  }
7107
7225
  async _mimicCompute() {
7108
7226
  this.uploading = true;
7109
- if (!Utils27.isNullOrEmpty(this.value)) {
7227
+ if (!Utils28.isNullOrEmpty(this.value)) {
7110
7228
  this.percentage = 0;
7111
- await Utils27.waitForAnimationEnd(this._tuner);
7229
+ await Utils28.waitForAnimationEnd(this._tuner);
7112
7230
  } else {
7113
- await Utils27.idle(250);
7231
+ await Utils28.idle(250);
7114
7232
  }
7115
7233
  await this._tweener.run(0, 100, 500, 0, Animations.Easings.sineInOut, (t, v) => {
7116
7234
  this.percentage = v;
@@ -7163,14 +7281,14 @@ var PacemUploadElement = class PacemUploadElement2 extends PacemBaseElement {
7163
7281
  } else {
7164
7282
  const file = input.files[0], filename = file.name;
7165
7283
  let blob = file;
7166
- if (!this._validateSingleFile(file) && !Utils27.isNullOrEmpty(this.url)) {
7284
+ if (!this._validateSingleFile(file) && !Utils28.isNullOrEmpty(this.url)) {
7167
7285
  resolve(this.value = await this._buildLocalValue(file));
7168
7286
  } else {
7169
7287
  if (/\.(jpe?g|png)$/i.test(filename) && this.maxImageWidth > 0 && this.maxImageHeight > 0) {
7170
- blob = await Utils27.Images.resize(blob, this.maxImageWidth, this.maxImageHeight, { quality: 0.8 });
7288
+ blob = await Utils28.Images.resize(blob, this.maxImageWidth, this.maxImageHeight, { quality: 0.8 });
7171
7289
  }
7172
7290
  await this._buildLocalValue(file, filename, blob);
7173
- if (Utils27.isNullOrEmpty(this.url)) {
7291
+ if (Utils28.isNullOrEmpty(this.url)) {
7174
7292
  await this._mimicCompute();
7175
7293
  resolve(this.value = this._localValue);
7176
7294
  } else {
@@ -7188,7 +7306,7 @@ var PacemUploadElement = class PacemUploadElement2 extends PacemBaseElement {
7188
7306
  return fetch(this.url, {
7189
7307
  method: "POST",
7190
7308
  credentials: this.fetchCredentials,
7191
- headers: Utils27.extend({ "Accept": "application/json", "Content-Type": "application/json" }, this.fetchHeaders || {}),
7309
+ headers: Utils28.extend({ "Accept": "application/json", "Content-Type": "application/json" }, this.fetchHeaders || {}),
7192
7310
  body: JSON.stringify(request)
7193
7311
  });
7194
7312
  }
@@ -7343,7 +7461,7 @@ PacemUploadElement = __decorate27([
7343
7461
  ], PacemUploadElement);
7344
7462
 
7345
7463
  // packages/scaffolding/dist/esm/input-hidden.js
7346
- import { P as P26, CustomElement as CustomElement25, Defaults as Defaults21, ViewChild as ViewChild17 } from "@pacem/pacem-core";
7464
+ import { P as P26, CustomElement as CustomElement25, Defaults as Defaults21, ViewChild as ViewChild17, Utils as Utils29 } from "@pacem/pacem-core";
7347
7465
  var __decorate28 = function(decorators, target, key, desc) {
7348
7466
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7349
7467
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -7357,29 +7475,29 @@ var PacemHiddenInputElement = class PacemHiddenInputElement2 extends PacemTextua
7357
7475
  toggleReadonlyView(readonly) {
7358
7476
  }
7359
7477
  get inputFields() {
7360
- return [this.input];
7478
+ return Utils29.isNull(this._input) ? [] : [this._input];
7361
7479
  }
7362
7480
  };
7363
7481
  __decorate28([
7364
7482
  ViewChild17("input[type=hidden]")
7365
- ], PacemHiddenInputElement.prototype, "input", void 0);
7483
+ ], PacemHiddenInputElement.prototype, "_input", void 0);
7366
7484
  PacemHiddenInputElement = __decorate28([
7367
7485
  CustomElement25({ tagName: P26 + "-input-hidden", template: '<input type="hidden" />', shadow: Defaults21.USE_SHADOW_ROOT })
7368
7486
  ], PacemHiddenInputElement);
7369
7487
 
7370
7488
  // packages/scaffolding/dist/esm/input-image.js
7371
- import { P as P28, PCSS as PCSS21, CustomElement as CustomElement27, Watch as Watch24, Defaults as Defaults23, ViewChild as ViewChild19, CustomTypedEvent as CustomTypedEvent5, Components as Components8, CustomEventUtils as CustomEventUtils6, PropertyConverters as PropertyConverters23, PropertyChangeEventName as PropertyChangeEventName7, Utils as Utils29, Debounce as Debounce5, avoidHandler as avoidHandler6 } from "@pacem/pacem-core";
7489
+ import { P as P28, PCSS as PCSS21, CustomElement as CustomElement27, Watch as Watch24, Defaults as Defaults23, ViewChild as ViewChild19, CustomTypedEvent as CustomTypedEvent5, Components as Components8, CustomEventUtils as CustomEventUtils6, PropertyConverters as PropertyConverters23, PropertyChangeEventName as PropertyChangeEventName7, Utils as Utils31, Debounce as Debounce5, avoidHandler as avoidHandler6 } from "@pacem/pacem-core";
7372
7490
  import { Components as ComponentsUI4 } from "@pacem/pacem-ui";
7373
7491
 
7374
7492
  // packages/scaffolding/dist/esm/snapshot.js
7375
- import { P as P27, PCSS as PCSS20, CustomElement as CustomElement26, Watch as Watch23, Defaults as Defaults22, ViewChild as ViewChild18, CustomEventUtils as CustomEventUtils5, PropertyConverters as PropertyConverters22, Utils as Utils28, CustomUIEvent, avoidHandler as avoidHandler5, Logging as Logging4 } from "@pacem/pacem-core";
7493
+ import { P as P27, PCSS as PCSS20, CustomElement as CustomElement26, Watch as Watch23, Defaults as Defaults22, ViewChild as ViewChild18, CustomEventUtils as CustomEventUtils5, PropertyConverters as PropertyConverters22, Utils as Utils30, CustomUIEvent, avoidHandler as avoidHandler5, Logging as Logging4 } from "@pacem/pacem-core";
7376
7494
  var __decorate29 = function(decorators, target, key, desc) {
7377
7495
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7378
7496
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7379
7497
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
7380
7498
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7381
7499
  };
7382
- var getUserMediaFunctions = Utils28.getUserMediaFunctions();
7500
+ var getUserMediaFunctions = Utils30.getUserMediaFunctions();
7383
7501
  var SnapshotStep;
7384
7502
  (function(SnapshotStep2) {
7385
7503
  SnapshotStep2["Start"] = "start";
@@ -7404,8 +7522,8 @@ var PacemSnapshotElement = class PacemSnapshotElement2 extends PacemBaseElement
7404
7522
  this._grabberChangeHandler = (e) => {
7405
7523
  const input = this._grabber;
7406
7524
  if (input.files.length > 0) {
7407
- Utils28.blobToDataURL(input.files[0]).then((url) => {
7408
- Utils28.loadImage(url).then((img) => {
7525
+ Utils30.blobToDataURL(input.files[0]).then((url) => {
7526
+ Utils30.loadImage(url).then((img) => {
7409
7527
  this._shutter(img);
7410
7528
  });
7411
7529
  });
@@ -7512,7 +7630,7 @@ var PacemSnapshotElement = class PacemSnapshotElement2 extends PacemBaseElement
7512
7630
  }
7513
7631
  _syncSize() {
7514
7632
  const canvas = this._stage, video = this._player;
7515
- if (!Utils28.isNull(canvas) && !Utils28.isNull(video)) {
7633
+ if (!Utils30.isNull(canvas) && !Utils30.isNull(video)) {
7516
7634
  canvas.style.width = video.style.width = this.width && this.width + "px" || "", canvas.style.height = video.style.height = this.height && this.height + "px" || "";
7517
7635
  this._renderValue(this._buffer || this.value);
7518
7636
  }
@@ -7520,7 +7638,7 @@ var PacemSnapshotElement = class PacemSnapshotElement2 extends PacemBaseElement
7520
7638
  _shutter(el) {
7521
7639
  const me = this, video = this._player, canvas = this._stage;
7522
7640
  me._confirmer.disabled = true;
7523
- if (Utils28.isNull(el)) {
7641
+ if (Utils30.isNull(el)) {
7524
7642
  el = me._player;
7525
7643
  }
7526
7644
  var srcWidth, srcHeight;
@@ -7536,7 +7654,7 @@ var PacemSnapshotElement = class PacemSnapshotElement2 extends PacemBaseElement
7536
7654
  cnv.width = this.width || canvas.clientWidth;
7537
7655
  cnv.height = this.height || canvas.clientHeight;
7538
7656
  var ctx = cnv.getContext("2d");
7539
- Utils28.cropImageOntoCanvas(el, ctx, srcWidth, srcHeight);
7657
+ Utils30.cropImageOntoCanvas(el, ctx, srcWidth, srcHeight);
7540
7658
  let root = me._root;
7541
7659
  root.insertBefore(cnv, video);
7542
7660
  cnv.className = "snapshot-brightout";
@@ -7555,15 +7673,15 @@ var PacemSnapshotElement = class PacemSnapshotElement2 extends PacemBaseElement
7555
7673
  }
7556
7674
  _renderValue(val = this.value) {
7557
7675
  let cnv = this._stage;
7558
- if (!Utils28.isNull(cnv)) {
7676
+ if (!Utils30.isNull(cnv)) {
7559
7677
  cnv.width = cnv.clientWidth;
7560
7678
  cnv.height = cnv.clientHeight;
7561
7679
  let ctx = cnv.getContext("2d");
7562
- if (Utils28.isNullOrEmpty(val)) {
7680
+ if (Utils30.isNullOrEmpty(val)) {
7563
7681
  ctx.clearRect(0, 0, cnv.width, cnv.height);
7564
7682
  } else {
7565
- Utils28.loadImage(val).then((img) => {
7566
- Utils28.cropImageOntoCanvas(img, ctx, img.width, img.height);
7683
+ Utils30.loadImage(val).then((img) => {
7684
+ Utils30.cropImageOntoCanvas(img, ctx, img.width, img.height);
7567
7685
  });
7568
7686
  }
7569
7687
  }
@@ -7582,7 +7700,7 @@ var PacemSnapshotElement = class PacemSnapshotElement2 extends PacemBaseElement
7582
7700
  if (this.quality > 0) {
7583
7701
  quality = Math.min(1, Math.max(0, this.quality));
7584
7702
  }
7585
- return Utils28.cropImage(buffer, cnv.width, cnv.height, quality);
7703
+ return Utils30.cropImage(buffer, cnv.width, cnv.height, quality);
7586
7704
  }
7587
7705
  _ensureWebcamRunning() {
7588
7706
  if (this._canUseWebcam && !this._webcamInitialized) {
@@ -7751,7 +7869,7 @@ var PacemEditImageElement = class PacemEditImageElement2 extends Components8.Pac
7751
7869
  if (w > 0 && h > 0) {
7752
7870
  var blob = uploader.blob;
7753
7871
  const uid = evt.detail.uid;
7754
- Utils29.resizeImage(blob, w, h).then((blob2) => {
7872
+ Utils31.resizeImage(blob, w, h).then((blob2) => {
7755
7873
  if (blob2 != blob) {
7756
7874
  thumbUploader.upload(blob2, "thumbnail.jpg", uid);
7757
7875
  return;
@@ -7771,7 +7889,7 @@ var PacemEditImageElement = class PacemEditImageElement2 extends Components8.Pac
7771
7889
  _snapshotPropertyChangedCallback(evt) {
7772
7890
  switch (evt.detail.propertyName) {
7773
7891
  case "value":
7774
- const blob = Utils29.dataURLToBlob(evt.detail.currentValue);
7892
+ const blob = Utils31.dataURLToBlob(evt.detail.currentValue);
7775
7893
  this._uploader.upload(blob, "snapshot.jpg");
7776
7894
  break;
7777
7895
  }
@@ -7784,9 +7902,9 @@ var PacemEditImageElement = class PacemEditImageElement2 extends Components8.Pac
7784
7902
  switch (name) {
7785
7903
  case "imageSet":
7786
7904
  let set = val || { skip: 0, set: [] };
7787
- if (Utils29.isNullOrEmpty(this._images) || set.skip === 0)
7905
+ if (Utils31.isNullOrEmpty(this._images) || set.skip === 0)
7788
7906
  this._images = set.set;
7789
- else if (!Utils29.isNull(this._images))
7907
+ else if (!Utils31.isNull(this._images))
7790
7908
  Array.prototype.splice.apply(this._images, [set.skip, this._images.length - set.skip].concat(set.set));
7791
7909
  this._fetching = false;
7792
7910
  break;
@@ -7894,7 +8012,7 @@ var PacemImageInputElement = class PacemImageInputElement2 extends PacemBaseElem
7894
8012
  this.dispatchEvent(new ImageFetchRequestEvent(evt.detail));
7895
8013
  };
7896
8014
  this._innerValueChangedHandler = (evt) => {
7897
- if (evt.detail.propertyName === "value" && !Utils29.isNull(this._dialog))
8015
+ if (evt.detail.propertyName === "value" && !Utils31.isNull(this._dialog))
7898
8016
  this._dialog.state = evt.detail.currentValue;
7899
8017
  };
7900
8018
  }
@@ -7918,7 +8036,7 @@ var PacemImageInputElement = class PacemImageInputElement2 extends PacemBaseElem
7918
8036
  value = this.value = this._input.value;
7919
8037
  else if (evt.target === this._clearBtn)
7920
8038
  value = this.value = void 0;
7921
- return Utils29.fromResult(value);
8039
+ return Utils31.fromResult(value);
7922
8040
  }
7923
8041
  toggleReadonlyView(readonly) {
7924
8042
  this._input.hidden = this._editBtn.hide = this._clearBtn.hide = readonly;
@@ -7933,7 +8051,7 @@ var PacemImageInputElement = class PacemImageInputElement2 extends PacemBaseElem
7933
8051
  }
7934
8052
  _removeDialog() {
7935
8053
  this._removeEditImage();
7936
- if (!Utils29.isNull(this._dialog)) {
8054
+ if (!Utils31.isNull(this._dialog)) {
7937
8055
  this._dialog.removeEventListener(ComponentsUI4.UI.DialogResultEventName, this.changeHandler, false);
7938
8056
  this._dialog.remove();
7939
8057
  }
@@ -7952,7 +8070,7 @@ var PacemImageInputElement = class PacemImageInputElement2 extends PacemBaseElem
7952
8070
  return this._editImage = editImage;
7953
8071
  }
7954
8072
  _removeEditImage() {
7955
- if (!Utils29.isNull(this._editImage)) {
8073
+ if (!Utils31.isNull(this._editImage)) {
7956
8074
  this._editImage.removeEventListener(PropertyChangeEventName7, this._innerValueChangedHandler, false);
7957
8075
  this._editImage.removeEventListener(ImageFetchRequestEventName, this._broadcastFetchRequestEventName, false);
7958
8076
  }
@@ -7969,37 +8087,37 @@ var PacemImageInputElement = class PacemImageInputElement2 extends PacemBaseElem
7969
8087
  super.propertyChangedCallback(name, old, val, first);
7970
8088
  switch (name) {
7971
8089
  case "uploadUrl":
7972
- if (!Utils29.isNull(this._editImage))
8090
+ if (!Utils31.isNull(this._editImage))
7973
8091
  this._editImage.uploadUrl = val;
7974
8092
  break;
7975
8093
  case "allowSnapshot":
7976
- if (!Utils29.isNull(this._editImage))
8094
+ if (!Utils31.isNull(this._editImage))
7977
8095
  this._editImage.allowSnapshot = val;
7978
8096
  break;
7979
8097
  case "imageSet":
7980
- if (!Utils29.isNull(this._editImage))
8098
+ if (!Utils31.isNull(this._editImage))
7981
8099
  this._editImage.imageSet = val;
7982
8100
  break;
7983
8101
  case "maxThumbnailHeight":
7984
- if (!Utils29.isNull(this._editImage))
8102
+ if (!Utils31.isNull(this._editImage))
7985
8103
  this._editImage.maxThumbnailHeight = val;
7986
8104
  break;
7987
8105
  case "maxThumbnailWidth":
7988
- if (!Utils29.isNull(this._editImage))
8106
+ if (!Utils31.isNull(this._editImage))
7989
8107
  this._editImage.maxThumbnailWidth = val;
7990
8108
  break;
7991
8109
  case "maxHeight":
7992
- if (!Utils29.isNull(this._editImage))
8110
+ if (!Utils31.isNull(this._editImage))
7993
8111
  this._editImage.maxHeight = val;
7994
8112
  break;
7995
8113
  case "maxWidth":
7996
- if (!Utils29.isNull(this._editImage))
8114
+ if (!Utils31.isNull(this._editImage))
7997
8115
  this._editImage.maxWidth = val;
7998
8116
  break;
7999
8117
  }
8000
8118
  }
8001
8119
  acceptValue(val) {
8002
- if (!Utils29.isNull(this._editImage))
8120
+ if (!Utils31.isNull(this._editImage))
8003
8121
  this._editImage.value = val;
8004
8122
  }
8005
8123
  _update(val) {
@@ -8080,7 +8198,7 @@ PacemImageInputElement = __decorate30([
8080
8198
  ], PacemImageInputElement);
8081
8199
 
8082
8200
  // packages/scaffolding/dist/esm/input-number.js
8083
- import { P as P29, PCSS as PCSS22, CustomElement as CustomElement28, Watch as Watch25, Defaults as Defaults24, ViewChild as ViewChild20, PropertyConverters as PropertyConverters24, Utils as Utils30 } from "@pacem/pacem-core";
8201
+ import { P as P29, PCSS as PCSS22, CustomElement as CustomElement28, Watch as Watch25, Defaults as Defaults24, ViewChild as ViewChild20, PropertyConverters as PropertyConverters24, Utils as Utils32 } from "@pacem/pacem-core";
8084
8202
  var __decorate31 = function(decorators, target, key, desc) {
8085
8203
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8086
8204
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8093,15 +8211,15 @@ var PacemNumberInputElement = class PacemNumberInputElement2 extends PacemOrdina
8093
8211
  this._input.hidden = readonly;
8094
8212
  }
8095
8213
  get inputFields() {
8096
- return [this._input];
8214
+ return Utils32.isNull(this._input) ? [] : [this._input];
8097
8215
  }
8098
8216
  getViewValue(val) {
8099
8217
  return this.value != null ? this._format(this.value) : void 0;
8100
8218
  }
8101
8219
  _format(v = this.value) {
8102
8220
  const intl = this.format;
8103
- if (!Utils30.isNullOrEmpty(intl)) {
8104
- return new Intl.NumberFormat(Utils30.lang(this), intl).format(v);
8221
+ if (!Utils32.isNullOrEmpty(intl)) {
8222
+ return new Intl.NumberFormat(Utils32.lang(this), intl).format(v);
8105
8223
  }
8106
8224
  return v.toString();
8107
8225
  }
@@ -8115,7 +8233,7 @@ var PacemNumberInputElement = class PacemNumberInputElement2 extends PacemOrdina
8115
8233
  this._input.addEventListener("wheel", this.emitHandler, options);
8116
8234
  }
8117
8235
  disconnectedCallback() {
8118
- if (!Utils30.isNull(this._input)) {
8236
+ if (!Utils32.isNull(this._input)) {
8119
8237
  var options = { capture: false, passive: false };
8120
8238
  this._input.removeEventListener("wheel", this.emitHandler, options);
8121
8239
  }
@@ -8136,7 +8254,7 @@ PacemNumberInputElement = __decorate31([
8136
8254
  ], PacemNumberInputElement);
8137
8255
 
8138
8256
  // packages/scaffolding/dist/esm/input-password.js
8139
- import { P as P30, PCSS as PCSS23, CustomElement as CustomElement29, avoidHandler as avoidHandler7, Defaults as Defaults25, ViewChild as ViewChild21, Utils as Utils31 } from "@pacem/pacem-core";
8257
+ import { P as P30, PCSS as PCSS23, CustomElement as CustomElement29, avoidHandler as avoidHandler7, Defaults as Defaults25, ViewChild as ViewChild21, Utils as Utils33 } from "@pacem/pacem-core";
8140
8258
  var __decorate32 = function(decorators, target, key, desc) {
8141
8259
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8142
8260
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8154,11 +8272,11 @@ var PacemPasswordInputElement = class PacemPasswordInputElement2 extends PacemTe
8154
8272
  };
8155
8273
  }
8156
8274
  get inputFields() {
8157
- return [this._input];
8275
+ return Utils33.isNull(this._input) ? [] : [this._input];
8158
8276
  }
8159
8277
  viewActivatedCallback() {
8160
8278
  super.viewActivatedCallback();
8161
- const baseId = this.id ?? "_" + Utils31.uniqueCode();
8279
+ const baseId = this.id ?? "_" + Utils33.uniqueCode();
8162
8280
  const inputId = this._input.id = baseId + "_ctrl";
8163
8281
  this._toggler.setAttribute("aria-controls", inputId);
8164
8282
  this._toggler.setAttribute("role", "button");
@@ -8166,10 +8284,11 @@ var PacemPasswordInputElement = class PacemPasswordInputElement2 extends PacemTe
8166
8284
  this._toggler.addEventListener("mousedown", this._togglerMousedownHandler, false);
8167
8285
  }
8168
8286
  disconnectedCallback() {
8169
- if (!Utils31.isNull(this._toggler)) {
8287
+ if (!Utils33.isNull(this._toggler)) {
8170
8288
  this._toggler.removeEventListener("mousedown", this._togglerMousedownHandler, false);
8171
8289
  }
8172
8290
  }
8291
+ /** Toggles the native input between `password` (masked) and `text` (revealed) type. */
8173
8292
  toggleVisibility() {
8174
8293
  const current = this._input.type;
8175
8294
  this._input.type = current === "password" ? "text" : "password";
@@ -8185,7 +8304,7 @@ var PacemPasswordInputElement = class PacemPasswordInputElement2 extends PacemTe
8185
8304
  this._span.hidden = !readonly;
8186
8305
  }
8187
8306
  getViewValue(val) {
8188
- return Utils31.leftPad("", Math.floor(8 + 3 * Math.random()), "\u2022");
8307
+ return Utils33.leftPad("", Math.floor(8 + 3 * Math.random()), "\u2022");
8189
8308
  }
8190
8309
  };
8191
8310
  __decorate32([
@@ -8207,7 +8326,7 @@ ${CHAR_COUNTER_CHILD}<span class="${PCSS23}-readonly"><${P30}-text text="{{ :hos
8207
8326
  ], PacemPasswordInputElement);
8208
8327
 
8209
8328
  // packages/scaffolding/dist/esm/input-search.js
8210
- import { P as P31, PCSS as PCSS24, CustomElement as CustomElement30, Defaults as Defaults26, ViewChild as ViewChild22 } from "@pacem/pacem-core";
8329
+ import { P as P31, PCSS as PCSS24, CustomElement as CustomElement30, Utils as Utils34, Defaults as Defaults26, ViewChild as ViewChild22 } from "@pacem/pacem-core";
8211
8330
  var __decorate33 = function(decorators, target, key, desc) {
8212
8331
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8213
8332
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8219,20 +8338,20 @@ var PacemSearchInputElement = class PacemSearchInputElement2 extends PacemTextua
8219
8338
  super();
8220
8339
  }
8221
8340
  get inputFields() {
8222
- return [this.input];
8341
+ return Utils34.isNull(this._input) ? [] : [this._input];
8223
8342
  }
8224
8343
  toggleReadonlyView(readonly) {
8225
8344
  }
8226
8345
  };
8227
8346
  __decorate33([
8228
8347
  ViewChild22("input[type=search]")
8229
- ], PacemSearchInputElement.prototype, "input", void 0);
8348
+ ], PacemSearchInputElement.prototype, "_input", void 0);
8230
8349
  PacemSearchInputElement = __decorate33([
8231
8350
  CustomElement30({ tagName: P31 + "-input-search", template: '<input type="search" class="' + PCSS24 + '-input" />', shadow: Defaults26.USE_SHADOW_ROOT })
8232
8351
  ], PacemSearchInputElement);
8233
8352
 
8234
8353
  // packages/scaffolding/dist/esm/input-tel.js
8235
- import { P as P32, PCSS as PCSS25, CustomElement as CustomElement31, Defaults as Defaults27, ViewChild as ViewChild23 } from "@pacem/pacem-core";
8354
+ import { P as P32, PCSS as PCSS25, CustomElement as CustomElement31, Utils as Utils35, Defaults as Defaults27, ViewChild as ViewChild23 } from "@pacem/pacem-core";
8236
8355
  var __decorate34 = function(decorators, target, key, desc) {
8237
8356
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8238
8357
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8244,25 +8363,28 @@ var PacemTelInputElement = class PacemTelInputElement2 extends PacemTextualInput
8244
8363
  super();
8245
8364
  }
8246
8365
  toggleReadonlyView(readonly) {
8247
- this.input.hidden = readonly;
8248
- this.anchor.hidden = !readonly;
8366
+ const input = this._input, anchor = this._anchor;
8367
+ if (!Utils35.isNull(input))
8368
+ input.hidden = readonly;
8369
+ if (!Utils35.isNull(anchor))
8370
+ anchor.hidden = !readonly;
8249
8371
  }
8250
8372
  get inputFields() {
8251
- return [this.input];
8373
+ return Utils35.isNull(this._input) ? [] : [this._input];
8252
8374
  }
8253
8375
  };
8254
8376
  __decorate34([
8255
8377
  ViewChild23("input[type=tel]")
8256
- ], PacemTelInputElement.prototype, "input", void 0);
8378
+ ], PacemTelInputElement.prototype, "_input", void 0);
8257
8379
  __decorate34([
8258
8380
  ViewChild23(P32 + "-a")
8259
- ], PacemTelInputElement.prototype, "anchor", void 0);
8381
+ ], PacemTelInputElement.prototype, "_anchor", void 0);
8260
8382
  PacemTelInputElement = __decorate34([
8261
8383
  CustomElement31({ tagName: P32 + "-input-tel", template: `<input type="tel" class="${PCSS25}-input" /><${P32}-a class="${PCSS25}-readonly" disabled="{{ $pacem.isNullOrEmpty(:host.value) }}" href="{{ 'tel:'+ :host.value }}"><${P32}-text text="{{ :host.viewValue }}"></${P32}-text></${P32}-a>`, shadow: Defaults27.USE_SHADOW_ROOT })
8262
8384
  ], PacemTelInputElement);
8263
8385
 
8264
8386
  // packages/scaffolding/dist/esm/input-text.js
8265
- import { P as P33, PCSS as PCSS26, CustomElement as CustomElement32, Defaults as Defaults28, ViewChild as ViewChild24 } from "@pacem/pacem-core";
8387
+ import { P as P33, PCSS as PCSS26, CustomElement as CustomElement32, Utils as Utils36, Defaults as Defaults28, ViewChild as ViewChild24 } from "@pacem/pacem-core";
8266
8388
  var __decorate35 = function(decorators, target, key, desc) {
8267
8389
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8268
8390
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8278,7 +8400,7 @@ var PacemTextInputElement = class PacemTextInputElement2 extends PacemTextualInp
8278
8400
  this._input.hidden = readonly;
8279
8401
  }
8280
8402
  get inputFields() {
8281
- return [this._input];
8403
+ return Utils36.isNull(this._input) ? [] : [this._input];
8282
8404
  }
8283
8405
  };
8284
8406
  __decorate35([
@@ -8296,7 +8418,7 @@ PacemTextInputElement = __decorate35([
8296
8418
  ], PacemTextInputElement);
8297
8419
 
8298
8420
  // packages/scaffolding/dist/esm/input-url.js
8299
- import { P as P34, PCSS as PCSS27, CustomElement as CustomElement33, Defaults as Defaults29, ViewChild as ViewChild25 } from "@pacem/pacem-core";
8421
+ import { P as P34, PCSS as PCSS27, CustomElement as CustomElement33, Utils as Utils37, Defaults as Defaults29, ViewChild as ViewChild25 } from "@pacem/pacem-core";
8300
8422
  var __decorate36 = function(decorators, target, key, desc) {
8301
8423
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8302
8424
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8308,25 +8430,28 @@ var PacemUrlInputElement = class PacemUrlInputElement2 extends PacemTextualInput
8308
8430
  super();
8309
8431
  }
8310
8432
  toggleReadonlyView(readonly) {
8311
- this.input.hidden = readonly;
8312
- this.anchor.hidden = !readonly;
8433
+ const input = this._input, anchor = this._anchor;
8434
+ if (!Utils37.isNull(input))
8435
+ input.hidden = readonly;
8436
+ if (!Utils37.isNull(anchor))
8437
+ anchor.hidden = !readonly;
8313
8438
  }
8314
8439
  get inputFields() {
8315
- return [this.input];
8440
+ return Utils37.isNull(this._input) ? [] : [this._input];
8316
8441
  }
8317
8442
  };
8318
8443
  __decorate36([
8319
8444
  ViewChild25("input[type=url]")
8320
- ], PacemUrlInputElement.prototype, "input", void 0);
8445
+ ], PacemUrlInputElement.prototype, "_input", void 0);
8321
8446
  __decorate36([
8322
8447
  ViewChild25(P34 + "-a")
8323
- ], PacemUrlInputElement.prototype, "anchor", void 0);
8448
+ ], PacemUrlInputElement.prototype, "_anchor", void 0);
8324
8449
  PacemUrlInputElement = __decorate36([
8325
8450
  CustomElement33({ tagName: P34 + "-input-url", template: `<input type="url" class="${PCSS27}-input" />${CHAR_COUNTER_CHILD}<${P34}-a class="${PCSS27}-readonly" disabled="{{ $pacem.isNullOrEmpty(:host.value) }}" href="{{ :host.value }}" target="_blank"><${P34}-text text="{{ :host.viewValue }}"></${P34}-text></${P34}-a>`, shadow: Defaults29.USE_SHADOW_ROOT })
8326
8451
  ], PacemUrlInputElement);
8327
8452
 
8328
8453
  // packages/scaffolding/dist/esm/latlng.js
8329
- import { P as P35, PCSS as PCSS28, ViewChild as ViewChild26, CustomElement as CustomElement34, Watch as Watch26, Utils as Utils32, PropertyConverters as PropertyConverters25, Defaults as Defaults30 } from "@pacem/pacem-core";
8454
+ import { P as P35, PCSS as PCSS28, ViewChild as ViewChild26, CustomElement as CustomElement34, Watch as Watch26, Utils as Utils38, PropertyConverters as PropertyConverters25, Defaults as Defaults30 } from "@pacem/pacem-core";
8330
8455
  import { Components as ComponentsMaps2 } from "@pacem/pacem-maps";
8331
8456
  var __decorate37 = function(decorators, target, key, desc) {
8332
8457
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -8382,14 +8507,14 @@ var PacemLatLngElement = class PacemLatLngElement2 extends PacemBaseElement {
8382
8507
  }
8383
8508
  const lat = this._lat;
8384
8509
  const lng = this._lng;
8385
- if (Utils32.isNull(lat) || Utils32.isNull(lng))
8386
- return Utils32.fromResult(this.value);
8387
- return Utils32.fromResult(this.value = { lat, lng });
8510
+ if (Utils38.isNull(lat) || Utils38.isNull(lng))
8511
+ return Utils38.fromResult(this.value);
8512
+ return Utils38.fromResult(this.value = { lat, lng });
8388
8513
  }
8389
8514
  propertyChangedCallback(name, old, val, first) {
8390
8515
  super.propertyChangedCallback(name, old, val, first);
8391
8516
  if (name === "options" && !first) {
8392
- const opts = Utils32.clone(val || { provider: "osm" });
8517
+ const opts = Utils38.clone(val || { provider: "osm" });
8393
8518
  this._synchronizeOptions(opts);
8394
8519
  }
8395
8520
  }
@@ -8411,10 +8536,10 @@ var PacemLatLngElement = class PacemLatLngElement2 extends PacemBaseElement {
8411
8536
  map.adapter = this._googleAdapter;
8412
8537
  break;
8413
8538
  default:
8414
- if (!Utils32.isNullOrEmpty(opts.attribution)) {
8539
+ if (!Utils38.isNullOrEmpty(opts.attribution)) {
8415
8540
  this._leafletAdapter.attribution = opts.attribution;
8416
8541
  }
8417
- if (!Utils32.isNullOrEmpty(opts.tiles)) {
8542
+ if (!Utils38.isNullOrEmpty(opts.tiles)) {
8418
8543
  this._leafletAdapter.tiles = opts.tiles;
8419
8544
  }
8420
8545
  map.adapter = this._leafletAdapter;
@@ -8500,7 +8625,7 @@ PacemLatLngElement = __decorate37([
8500
8625
  ], PacemLatLngElement);
8501
8626
 
8502
8627
  // packages/scaffolding/dist/esm/namevalue-list.js
8503
- import { P as P36, PCSS as PCSS29, CustomElement as CustomElement35, Watch as Watch27, Utils as Utils33, PropertyConverters as PropertyConverters26, Defaults as Defaults31 } from "@pacem/pacem-core";
8628
+ import { P as P36, PCSS as PCSS29, CustomElement as CustomElement35, Watch as Watch27, Utils as Utils39, PropertyConverters as PropertyConverters26, Defaults as Defaults31 } from "@pacem/pacem-core";
8504
8629
  var __decorate38 = function(decorators, target, key, desc) {
8505
8630
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8506
8631
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8509,7 +8634,7 @@ var __decorate38 = function(decorators, target, key, desc) {
8509
8634
  };
8510
8635
  var ITEM_TXT_CORE = `change-policy="${ChangePolicy.Blur}" readonly="{{ :host.readonly }}"`;
8511
8636
  function isEmpty(nvp) {
8512
- return Utils33.isNullOrEmpty(nvp && nvp.name);
8637
+ return Utils39.isNullOrEmpty(nvp && nvp.name);
8513
8638
  }
8514
8639
  function pullEmpty() {
8515
8640
  return { name: "", value: "" };
@@ -8539,7 +8664,7 @@ var PacemNameValueListElement = class PacemNameValueListElement2 extends PacemBa
8539
8664
  return "";
8540
8665
  }
8541
8666
  compareValuePropertyValues(old, val) {
8542
- return Utils33.Json.stringify(old) === Utils33.Json.stringify(val);
8667
+ return Utils39.Json.stringify(old) === Utils39.Json.stringify(val);
8543
8668
  }
8544
8669
  convertValueAttributeToProperty(attr) {
8545
8670
  return PropertyConverters26.Json.convert(attr);
@@ -8575,16 +8700,16 @@ var PacemNameValueListElement = class PacemNameValueListElement2 extends PacemBa
8575
8700
  }
8576
8701
  _valueToBag(val = this.value) {
8577
8702
  const bag = [];
8578
- if (!Utils33.isNullOrEmpty(val) && typeof val === "object") {
8579
- if (this.dictionary && !Utils33.isArray(val)) {
8703
+ if (!Utils39.isNullOrEmpty(val) && typeof val === "object") {
8704
+ if (this.dictionary && !Utils39.isArray(val)) {
8580
8705
  for (let prop in val) {
8581
8706
  bag.push({ name: prop, value: val[prop] });
8582
8707
  }
8583
- } else if (!this.dictionary && Utils33.isArray(val)) {
8584
- Array.prototype.splice.apply(bag, [0, 0].concat(val.map((i) => Utils33.clone(i))));
8708
+ } else if (!this.dictionary && Utils39.isArray(val)) {
8709
+ Array.prototype.splice.apply(bag, [0, 0].concat(val.map((i) => Utils39.clone(i))));
8585
8710
  }
8586
8711
  }
8587
- return !Utils33.isNullOrEmpty(bag) ? bag : [pullEmpty()];
8712
+ return !Utils39.isNullOrEmpty(bag) ? bag : [pullEmpty()];
8588
8713
  }
8589
8714
  _deleteAt(evt) {
8590
8715
  this._bag.splice(evt.detail, 1);
@@ -8592,7 +8717,7 @@ var PacemNameValueListElement = class PacemNameValueListElement2 extends PacemBa
8592
8717
  }
8593
8718
  _addItem(evt) {
8594
8719
  const bag = this._bag, lastItem = this._bag[this._bag.length - 1];
8595
- if (Utils33.isEmpty(bag) || !isEmpty(lastItem)) {
8720
+ if (Utils39.isEmpty(bag) || !isEmpty(lastItem)) {
8596
8721
  bag.push(pullEmpty());
8597
8722
  }
8598
8723
  }
@@ -8630,7 +8755,7 @@ PacemNameValueListElement = __decorate38([
8630
8755
  ], PacemNameValueListElement);
8631
8756
 
8632
8757
  // packages/scaffolding/dist/esm/property-picker.js
8633
- import { P as P37, ViewChild as ViewChild27, CustomElement as CustomElement36, Watch as Watch28, Utils as Utils34, PropertyConverters as PropertyConverters27, Defaults as Defaults32, CustomElementUtils as CustomElementUtils7 } from "@pacem/pacem-core";
8758
+ import { P as P37, ViewChild as ViewChild27, CustomElement as CustomElement36, Watch as Watch28, Utils as Utils40, PropertyConverters as PropertyConverters27, Defaults as Defaults32, CustomElementUtils as CustomElementUtils7 } from "@pacem/pacem-core";
8634
8759
  var __decorate39 = function(decorators, target, key, desc) {
8635
8760
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8636
8761
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8645,7 +8770,7 @@ var PacemPropertyPickerElement = class PacemPropertyPickerElement2 extends Pacem
8645
8770
  this._select.readonly = readonly;
8646
8771
  }
8647
8772
  onChange(evt) {
8648
- return Utils34.fromResult(this.value = this._select.value);
8773
+ return Utils40.fromResult(this.value = this._select.value);
8649
8774
  }
8650
8775
  acceptValue(val) {
8651
8776
  this._select.value = val;
@@ -8673,7 +8798,7 @@ var PacemPropertyPickerElement = class PacemPropertyPickerElement2 extends Pacem
8673
8798
  _databind() {
8674
8799
  const props = [], fnRec = (container, prop, name) => {
8675
8800
  const val = container[prop];
8676
- if (typeof val === "object" && val != null && !Utils34.isArray(val)) {
8801
+ if (typeof val === "object" && val != null && !Utils40.isArray(val)) {
8677
8802
  for (let key of Object.keys(val)) {
8678
8803
  const fullName = name + "." + key;
8679
8804
  props.push(fullName);
@@ -8682,7 +8807,7 @@ var PacemPropertyPickerElement = class PacemPropertyPickerElement2 extends Pacem
8682
8807
  }
8683
8808
  };
8684
8809
  let src = this.target;
8685
- if (!Utils34.isNull(src)) {
8810
+ if (!Utils40.isNull(src)) {
8686
8811
  let observed = CustomElementUtils7.getWatchedProperties(src);
8687
8812
  for (let obs of observed) {
8688
8813
  let name = obs.name;
@@ -8708,7 +8833,7 @@ PacemPropertyPickerElement = __decorate39([
8708
8833
  ], PacemPropertyPickerElement);
8709
8834
 
8710
8835
  // packages/scaffolding/dist/esm/radio.js
8711
- import { P as P38, PCSS as PCSS30, ViewChild as ViewChild28, CustomElement as CustomElement37, Watch as Watch29, Utils as Utils35, PropertyConverters as PropertyConverters28, Defaults as Defaults33 } from "@pacem/pacem-core";
8836
+ import { P as P38, PCSS as PCSS30, ViewChild as ViewChild28, CustomElement as CustomElement37, Watch as Watch29, Utils as Utils41, PropertyConverters as PropertyConverters28, Defaults as Defaults33 } from "@pacem/pacem-core";
8712
8837
  var __decorate40 = function(decorators, target, key, desc) {
8713
8838
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8714
8839
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8721,7 +8846,7 @@ var PacemRadioElement = class PacemRadioElement2 extends PacemBaseElement {
8721
8846
  }
8722
8847
  constructor() {
8723
8848
  super();
8724
- this._key = "_" + Utils35.uniqueCode();
8849
+ this._key = "_" + Utils41.uniqueCode();
8725
8850
  }
8726
8851
  toggleReadonlyView(readonly) {
8727
8852
  this.span.hidden = !readonly;
@@ -8734,7 +8859,7 @@ var PacemRadioElement = class PacemRadioElement2 extends PacemBaseElement {
8734
8859
  onChange(evt) {
8735
8860
  this.selected = this._radio.checked;
8736
8861
  const value = this.selected ? this._radio.value : void 0;
8737
- return Utils35.fromResult(value);
8862
+ return Utils41.fromResult(value);
8738
8863
  }
8739
8864
  viewActivatedCallback() {
8740
8865
  super.viewActivatedCallback();
@@ -8747,15 +8872,15 @@ var PacemRadioElement = class PacemRadioElement2 extends PacemBaseElement {
8747
8872
  this._radio.name = val;
8748
8873
  break;
8749
8874
  case "selected":
8750
- (this._radio.checked = val) ? Utils35.addClass(this, PCSS30 + "-selected") : Utils35.removeClass(this, PCSS30 + "-selected");
8875
+ (this._radio.checked = val) ? Utils41.addClass(this, PCSS30 + "-selected") : Utils41.removeClass(this, PCSS30 + "-selected");
8751
8876
  break;
8752
8877
  }
8753
8878
  }
8754
8879
  acceptValue(val) {
8755
- this._radio.value = Utils35.isNullOrEmpty(val) ? "" : val;
8880
+ this._radio.value = Utils41.isNullOrEmpty(val) ? "" : val;
8756
8881
  }
8757
8882
  getViewValue(val) {
8758
- if (!Utils35.isNull(val))
8883
+ if (!Utils41.isNull(val))
8759
8884
  return this.caption;
8760
8885
  return "";
8761
8886
  }
@@ -8784,7 +8909,7 @@ PacemRadioElement = __decorate40([
8784
8909
  ], PacemRadioElement);
8785
8910
 
8786
8911
  // packages/scaffolding/dist/esm/radio-list.js
8787
- import { CustomElement as CustomElement38, Defaults as Defaults34, P as P39, PCSS as PCSS31, PropertyChangeEventName as PropertyChangeEventName8, Utils as Utils36, ViewChild as ViewChild29 } from "@pacem/pacem-core";
8912
+ import { CustomElement as CustomElement38, Defaults as Defaults34, P as P39, PCSS as PCSS31, PropertyChangeEventName as PropertyChangeEventName8, Utils as Utils42, ViewChild as ViewChild29 } from "@pacem/pacem-core";
8788
8913
  var __decorate41 = function(decorators, target, key, desc) {
8789
8914
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8790
8915
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8796,7 +8921,7 @@ var PacemRadioListElement = class PacemRadioListElement2 extends PacemDataSource
8796
8921
  }
8797
8922
  constructor() {
8798
8923
  super();
8799
- this["key"] = "_" + Utils36.uniqueCode();
8924
+ this["key"] = "_" + Utils42.uniqueCode();
8800
8925
  }
8801
8926
  get inputFields() {
8802
8927
  return [];
@@ -8824,7 +8949,7 @@ var PacemRadioListElement = class PacemRadioListElement2 extends PacemDataSource
8824
8949
  onChange(evt) {
8825
8950
  this.value = this._selectedValue;
8826
8951
  this.databind();
8827
- return Utils36.fromResult(this._selectedValue);
8952
+ return Utils42.fromResult(this._selectedValue);
8828
8953
  }
8829
8954
  };
8830
8955
  __decorate41([
@@ -8853,7 +8978,7 @@ on-${PropertyChangeEventName8}=":host._selectionChanged($event, ^index, ^item)">
8853
8978
  ], PacemRadioListElement);
8854
8979
 
8855
8980
  // packages/scaffolding/dist/esm/select.js
8856
- import { Components as Components9, PropertyConverters as PropertyConverters29, Utils as Utils37, P as P40, PCSS as PCSS32, CustomElement as CustomElement39, Watch as Watch30, Defaults as Defaults35, ViewChild as ViewChild30 } from "@pacem/pacem-core";
8981
+ import { Components as Components9, PropertyConverters as PropertyConverters29, Utils as Utils43, P as P40, PCSS as PCSS32, CustomElement as CustomElement39, Watch as Watch30, Defaults as Defaults35, ViewChild as ViewChild30 } from "@pacem/pacem-core";
8857
8982
  var __decorate42 = function(decorators, target, key, desc) {
8858
8983
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8859
8984
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8872,7 +8997,7 @@ var PacemSelectElement = class PacemSelectElement2 extends PacemDataSourceElemen
8872
8997
  // no actual need to be idem-potent...
8873
8998
  // (take care in future)
8874
8999
  get inputFields() {
8875
- return [this._select];
9000
+ return Utils43.isNull(this._select) ? [] : [this._select];
8876
9001
  }
8877
9002
  _manageDom(evt) {
8878
9003
  const args = evt.detail, item = args.item;
@@ -8881,7 +9006,7 @@ var PacemSelectElement = class PacemSelectElement2 extends PacemDataSourceElemen
8881
9006
  option.textContent = item.viewValue;
8882
9007
  option.disabled = item.disabled;
8883
9008
  option.selected = this.isDataSourceItemSelected(item);
8884
- (Utils37.isNullOrEmpty(option.value) ? Utils37.addClass : Utils37.removeClass).apply(this, [option, PCSS32 + "-watermark"]);
9009
+ (Utils43.isNullOrEmpty(option.value) ? Utils43.addClass : Utils43.removeClass).apply(this, [option, PCSS32 + "-watermark"]);
8885
9010
  }
8886
9011
  onChange(evt) {
8887
9012
  let select = this._select, selectedIndex = select.selectedIndex, datasource = this.adaptedDatasource, item = selectedIndex >= 0 && datasource[selectedIndex], value;
@@ -8889,7 +9014,7 @@ var PacemSelectElement = class PacemSelectElement2 extends PacemDataSourceElemen
8889
9014
  value = item.value;
8890
9015
  } else
8891
9016
  value = void 0;
8892
- return Utils37.fromResult(this.value = value);
9017
+ return Utils43.fromResult(this.value = value);
8893
9018
  }
8894
9019
  propertyChangedCallback(name, old, val, first) {
8895
9020
  super.propertyChangedCallback(name, old, val, first);
@@ -8912,7 +9037,7 @@ var PacemSelectElement = class PacemSelectElement2 extends PacemDataSourceElemen
8912
9037
  if (this.emptyOption) {
8913
9038
  super.handleDatasourceMismatch(ds);
8914
9039
  } else {
8915
- if (Utils37.isNullOrEmpty(ds)) {
9040
+ if (Utils43.isNullOrEmpty(ds)) {
8916
9041
  this.value = void 0;
8917
9042
  } else {
8918
9043
  this.value = ds[0].value;
@@ -8926,7 +9051,7 @@ var PacemSelectElement = class PacemSelectElement2 extends PacemDataSourceElemen
8926
9051
  else {
8927
9052
  this._select.value = void 0;
8928
9053
  let opts = this._select.options;
8929
- if (opts.length > 0 && Utils37.isNullOrEmpty(opts[0].value)) {
9054
+ if (opts.length > 0 && Utils43.isNullOrEmpty(opts[0].value)) {
8930
9055
  this._select.selectedIndex = 0;
8931
9056
  }
8932
9057
  }
@@ -8937,7 +9062,7 @@ var PacemSelectElement = class PacemSelectElement2 extends PacemDataSourceElemen
8937
9062
  this._select.addEventListener("wheel", this.emitHandler, options);
8938
9063
  }
8939
9064
  disconnectedCallback() {
8940
- if (!Utils37.isNull(this._select)) {
9065
+ if (!Utils43.isNull(this._select)) {
8941
9066
  var options = { capture: false, passive: false };
8942
9067
  this._select.removeEventListener("wheel", this.emitHandler, options);
8943
9068
  }
@@ -8972,7 +9097,7 @@ PacemSelectElement = __decorate42([
8972
9097
 
8973
9098
  // packages/scaffolding/dist/esm/slider.js
8974
9099
  import { Components as ComponentsUI5 } from "@pacem/pacem-ui";
8975
- import { P as P41, PCSS as PCSS33, ViewChild as ViewChild31, CustomElement as CustomElement40, Watch as Watch31, Utils as Utils38, PropertyConverters as PropertyConverters30, Defaults as Defaults36, avoidHandler as avoidHandler8, Components as Components10, UI as UI3 } from "@pacem/pacem-core";
9100
+ import { P as P41, PCSS as PCSS33, ViewChild as ViewChild31, CustomElement as CustomElement40, Watch as Watch31, Utils as Utils44, PropertyConverters as PropertyConverters30, Defaults as Defaults36, avoidHandler as avoidHandler8, Components as Components10, UI as UI3 } from "@pacem/pacem-core";
8976
9101
  var __decorate43 = function(decorators, target, key, desc) {
8977
9102
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8978
9103
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8996,7 +9121,7 @@ var PacemSliderElement = class PacemSliderElement2 extends PacemBaseElement {
8996
9121
  };
8997
9122
  this._downHandler = (evt) => {
8998
9123
  const x = evt instanceof MouseEvent ? evt.clientX : evt.touches && evt.touches.length && evt.touches[0].clientX, trackSize = this._trackSize;
8999
- if (!Utils38.isNullOrEmpty(trackSize)) {
9124
+ if (!Utils44.isNullOrEmpty(trackSize)) {
9000
9125
  this._computeAndAssignValue(x, true);
9001
9126
  }
9002
9127
  };
@@ -9012,11 +9137,11 @@ var PacemSliderElement = class PacemSliderElement2 extends PacemBaseElement {
9012
9137
  let ceaseFn = (evt2) => {
9013
9138
  cease = true;
9014
9139
  window.removeEventListener("keyup", ceaseFn, false);
9015
- Utils38.removeClass(this, "slider-keydown");
9140
+ Utils44.removeClass(this, "slider-keydown");
9016
9141
  };
9017
9142
  window.addEventListener("keyup", ceaseFn, false);
9018
- Utils38.addClass(this, "slider-keydown");
9019
- Utils38.accelerateCallback((token) => {
9143
+ Utils44.addClass(this, "slider-keydown");
9144
+ Utils44.accelerateCallback((token) => {
9020
9145
  if (!(token.cancel = cease)) {
9021
9146
  this._setValue(this.value + step);
9022
9147
  }
@@ -9035,26 +9160,26 @@ var PacemSliderElement = class PacemSliderElement2 extends PacemBaseElement {
9035
9160
  }
9036
9161
  _draw(val = this.value) {
9037
9162
  const trackSize = this._trackSize;
9038
- if (Utils38.isNull(trackSize)) {
9163
+ if (Utils44.isNull(trackSize)) {
9039
9164
  return;
9040
9165
  }
9041
- const v = Utils38.isNullOrEmpty(val) ? this.min : parseFloat(val);
9166
+ const v = Utils44.isNullOrEmpty(val) ? this.min : parseFloat(val);
9042
9167
  const percentage = Math.min(1, Math.max(0, (v - this.min) / (this.max - this.min)));
9043
9168
  this._progress.style.transform = `scale(${percentage}, 1)`;
9044
9169
  this._thumb.style.transform = `translateX(${Math.round(percentage * trackSize.width)}px)`;
9045
9170
  }
9046
9171
  _format(v) {
9047
9172
  const intl = this.format;
9048
- if (!Utils38.isNullOrEmpty(intl)) {
9049
- return new Intl.NumberFormat(Utils38.lang(this), intl).format(v);
9173
+ if (!Utils44.isNullOrEmpty(intl)) {
9174
+ return new Intl.NumberFormat(Utils44.lang(this), intl).format(v);
9050
9175
  }
9051
9176
  let sv = "-";
9052
- if (!Utils38.isNull(v)) {
9177
+ if (!Utils44.isNull(v)) {
9053
9178
  sv = v.toLocaleString();
9054
9179
  }
9055
9180
  let evt = new CustomEvent("formatvalue", { detail: { value: v } });
9056
9181
  this.dispatchEvent(evt);
9057
- return Utils38.isNull(evt.detail.output) ? sv : evt.detail.output;
9182
+ return Utils44.isNull(evt.detail.output) ? sv : evt.detail.output;
9058
9183
  }
9059
9184
  acceptValue(val) {
9060
9185
  this._draw(val);
@@ -9069,11 +9194,11 @@ var PacemSliderElement = class PacemSliderElement2 extends PacemBaseElement {
9069
9194
  this._thumb.hidden = readonly;
9070
9195
  const css = "cursor-pointer";
9071
9196
  if (readonly) {
9072
- Utils38.removeClass(this._max, css);
9073
- Utils38.removeClass(this._min, css);
9197
+ Utils44.removeClass(this._max, css);
9198
+ Utils44.removeClass(this._min, css);
9074
9199
  } else {
9075
- Utils38.addClass(this._max, css);
9076
- Utils38.addClass(this._min, css);
9200
+ Utils44.addClass(this._max, css);
9201
+ Utils44.addClass(this._min, css);
9077
9202
  }
9078
9203
  }
9079
9204
  _setTrackSize(evt) {
@@ -9098,7 +9223,7 @@ var PacemSliderElement = class PacemSliderElement2 extends PacemBaseElement {
9098
9223
  }
9099
9224
  }
9100
9225
  _setValue(v) {
9101
- if (isNaN(v) || Utils38.isNull(v)) {
9226
+ if (isNaN(v) || Utils44.isNull(v)) {
9102
9227
  v = void 0;
9103
9228
  } else {
9104
9229
  if (!isNaN(this.min) && v < this.min) {
@@ -9124,7 +9249,7 @@ var PacemSliderElement = class PacemSliderElement2 extends PacemBaseElement {
9124
9249
  this._min.text = this._format(this.min);
9125
9250
  this._max.text = this._format(this.max);
9126
9251
  const balloon = this._shellProxy.dom[0];
9127
- if (!Utils38.isNull(balloon)) {
9252
+ if (!Utils44.isNull(balloon)) {
9128
9253
  balloon.target = this._thumb;
9129
9254
  balloon.options = {
9130
9255
  trigger: ComponentsUI5.UI.BalloonTrigger.Focus,
@@ -9141,18 +9266,18 @@ var PacemSliderElement = class PacemSliderElement2 extends PacemBaseElement {
9141
9266
  }
9142
9267
  _syncThumbLabel(thumbLabel = this.thumbLabel) {
9143
9268
  const balloon = this._shellProxy.dom[0];
9144
- (thumbLabel ? Utils38.addClass : Utils38.removeClass).apply(this, [this, "slider-thumblabel"]);
9269
+ (thumbLabel ? Utils44.addClass : Utils44.removeClass).apply(this, [this, "slider-thumblabel"]);
9145
9270
  balloon.disabled = !thumbLabel;
9146
9271
  }
9147
9272
  disconnectedCallback() {
9148
9273
  this.removeEventListener("mousedown", this._downHandler, false);
9149
9274
  this.removeEventListener("touchstart", this._downHandler, { capture: false });
9150
- if (!Utils38.isNull(this._dragger)) {
9275
+ if (!Utils44.isNull(this._dragger)) {
9151
9276
  this._dragger.removeEventListener(UI3.DragDropEventType.End, this._endHandler, false);
9152
9277
  this._dragger.removeEventListener(UI3.DragDropEventType.Drag, this._dragHandler, false);
9153
9278
  this._dragger.removeEventListener(UI3.DragDropEventType.Init, this._startHandler, false);
9154
9279
  }
9155
- if (!Utils38.isNull(this._thumb)) {
9280
+ if (!Utils44.isNull(this._thumb)) {
9156
9281
  this._thumb.removeEventListener("keydown", this._keydownHandler, false);
9157
9282
  }
9158
9283
  super.disconnectedCallback();
@@ -9168,7 +9293,7 @@ var PacemSliderElement = class PacemSliderElement2 extends PacemBaseElement {
9168
9293
  break;
9169
9294
  case "min":
9170
9295
  case "max":
9171
- if (!Utils38.isNull(this._max) && !Utils38.isNull(this._min)) {
9296
+ if (!Utils44.isNull(this._max) && !Utils44.isNull(this._min)) {
9172
9297
  this._min.text = this._format(this.min);
9173
9298
  this._max.text = this._format(this.max);
9174
9299
  }
@@ -9248,7 +9373,7 @@ PacemSliderElement = __decorate43([
9248
9373
  ], PacemSliderElement);
9249
9374
 
9250
9375
  // packages/scaffolding/dist/esm/suggest.js
9251
- import { CustomTypedEvent as CustomTypedEvent6, CustomElement as CustomElement41, Watch as Watch32, ViewChild as ViewChild32, Defaults as Defaults37, PCSS as PCSS34, P as P42, Components as Components11, PropertyConverters as PropertyConverters31, Utils as Utils39, avoidHandler as avoidHandler9, Logging as Logging5, CustomElementUtils as CustomElementUtils8 } from "@pacem/pacem-core";
9376
+ import { CustomTypedEvent as CustomTypedEvent6, CustomElement as CustomElement41, Watch as Watch32, ViewChild as ViewChild32, Defaults as Defaults37, PCSS as PCSS34, P as P42, Components as Components11, PropertyConverters as PropertyConverters31, Utils as Utils45, avoidHandler as avoidHandler9, Logging as Logging5, CustomElementUtils as CustomElementUtils8 } from "@pacem/pacem-core";
9252
9377
  import { Components as ComponentsUI6 } from "@pacem/pacem-ui";
9253
9378
  var __decorate44 = function(decorators, target, key, desc) {
9254
9379
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -9280,10 +9405,10 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9280
9405
  this.changeHandler(new SuggestionSelectEvent(null));
9281
9406
  };
9282
9407
  this._balloonPopupHandler = (evt) => {
9283
- Utils39.addClass(this._btnArrow, "rotate-180");
9408
+ Utils45.addClass(this._btnArrow, "rotate-180");
9284
9409
  };
9285
9410
  this._balloonPopoutHandler = (evt) => {
9286
- Utils39.removeClass(this._btnArrow, "rotate-180");
9411
+ Utils45.removeClass(this._btnArrow, "rotate-180");
9287
9412
  };
9288
9413
  this._inputHandler = (evt) => {
9289
9414
  switch (evt.keyCode) {
@@ -9324,9 +9449,9 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9324
9449
  this.#keyupManaged = false;
9325
9450
  this._keydownHandler = (evt) => {
9326
9451
  var managed = false;
9327
- if (Utils39.isNull(this.#selectedItem)) {
9452
+ if (Utils45.isNull(this.#selectedItem)) {
9328
9453
  const el = this._findFirstAvailableListItem();
9329
- if (!Utils39.isNull(el)) {
9454
+ if (!Utils45.isNull(el)) {
9330
9455
  switch (evt.keyCode) {
9331
9456
  case 40:
9332
9457
  avoidHandler9(evt);
@@ -9345,7 +9470,7 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9345
9470
  }
9346
9471
  } else {
9347
9472
  var li = this.#selectedItem, cursor = li, target;
9348
- const skipPredicate = (e) => !Utils39.isNull(e) && e.localName === "li" && e.dataset["pacemDisabled"] === "true", matchPredicate = (e) => !Utils39.isNull(e) && e.localName === "li" && e.dataset["pacemDisabled"] !== "true";
9473
+ const skipPredicate = (e) => !Utils45.isNull(e) && e.localName === "li" && e.dataset["pacemDisabled"] === "true", matchPredicate = (e) => !Utils45.isNull(e) && e.localName === "li" && e.dataset["pacemDisabled"] !== "true";
9349
9474
  switch (evt.keyCode) {
9350
9475
  case 38:
9351
9476
  avoidHandler9(evt);
@@ -9396,14 +9521,14 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9396
9521
  acceptValue(val) {
9397
9522
  if (
9398
9523
  /*!this._isTyping && */
9399
- this.allowNew || !Utils39.isNullOrEmpty(this.datasource)
9524
+ this.allowNew || !Utils45.isNullOrEmpty(this.datasource)
9400
9525
  ) {
9401
9526
  this._input.value = this.getViewValue(val) || (this._isTyping ? this._input.value : "");
9402
9527
  }
9403
9528
  }
9404
9529
  getViewValue(val) {
9405
9530
  var superValue = super.getViewValue(val);
9406
- if (Utils39.isNullOrEmpty(superValue) && this.allowNew && !Utils39.isNullOrEmpty(val)) {
9531
+ if (Utils45.isNullOrEmpty(superValue) && this.allowNew && !Utils45.isNullOrEmpty(val)) {
9407
9532
  superValue = this.mapEntityToViewValue(val);
9408
9533
  }
9409
9534
  return superValue;
@@ -9445,13 +9570,13 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9445
9570
  }
9446
9571
  propertyChangedCallback(name, old, val, first) {
9447
9572
  super.propertyChangedCallback(name, old, val, first);
9448
- if (Utils39.isNull(this._balloon)) {
9573
+ if (Utils45.isNull(this._balloon)) {
9449
9574
  return;
9450
9575
  }
9451
9576
  const typing = this._isTyping;
9452
9577
  switch (name) {
9453
9578
  case "adaptedDatasource":
9454
- if (!Utils39.isNullOrEmpty(val)) {
9579
+ if (!Utils45.isNullOrEmpty(val)) {
9455
9580
  if (!typing) {
9456
9581
  this._input.value = this.getViewValue(this.value);
9457
9582
  } else {
@@ -9493,12 +9618,12 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9493
9618
  }
9494
9619
  }
9495
9620
  disconnectedCallback() {
9496
- if (!Utils39.isNull(this._balloon)) {
9621
+ if (!Utils45.isNull(this._balloon)) {
9497
9622
  this._balloon.removeEventListener("popup", this._balloonPopupHandler, false);
9498
9623
  this._balloon.removeEventListener("popout", this._balloonPopoutHandler, false);
9499
9624
  this._balloon.remove();
9500
9625
  }
9501
- if (!Utils39.isNull(this._input)) {
9626
+ if (!Utils45.isNull(this._input)) {
9502
9627
  this._input.removeEventListener("mousedown", this._focusHandler, false);
9503
9628
  this._input.removeEventListener("focus", this._focusHandler, false);
9504
9629
  this._input.removeEventListener("blur", this._blurHandler, false);
@@ -9506,31 +9631,31 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9506
9631
  this._input.removeEventListener("keyup", this._keyupHandler, false);
9507
9632
  this._input.removeEventListener("input", this._inputHandler, false);
9508
9633
  }
9509
- if (!Utils39.isNull(this._btnClear)) {
9634
+ if (!Utils45.isNull(this._btnClear)) {
9510
9635
  this._btnClear.removeEventListener("mousedown", this._clearBtnHandler, false);
9511
9636
  }
9512
- if (!Utils39.isNull(this._btnArrow)) {
9637
+ if (!Utils45.isNull(this._btnArrow)) {
9513
9638
  this._btnArrow.addEventListener("mousedown", this._toggleBtnHandler, false);
9514
9639
  }
9515
9640
  super.disconnectedCallback();
9516
9641
  }
9517
9642
  #datasource;
9518
9643
  _databind() {
9519
- if (!Utils39.isNull(this._repeater)) {
9644
+ if (!Utils45.isNull(this._repeater)) {
9520
9645
  const ds = this.#datasource = this._filter(this.adaptedDatasource, this._input.value);
9521
9646
  this._repeater.datasource = ds;
9522
9647
  }
9523
9648
  }
9524
9649
  _syncButtons() {
9525
- if (!Utils39.isNull(this._btnArrow)) {
9526
- this._btnArrow.hide = this.allowTyping !== false || !Utils39.isNullOrEmpty(this._input.value || this.value);
9650
+ if (!Utils45.isNull(this._btnArrow)) {
9651
+ this._btnArrow.hide = this.allowTyping !== false || !Utils45.isNullOrEmpty(this._input.value || this.value);
9527
9652
  }
9528
- if (!Utils39.isNull(this._btnClear)) {
9529
- this._btnClear.hide = this.readonly || Utils39.isNullOrEmpty(this._input.value || this.value);
9653
+ if (!Utils45.isNull(this._btnClear)) {
9654
+ this._btnClear.hide = this.readonly || Utils45.isNullOrEmpty(this._input.value || this.value);
9530
9655
  }
9531
9656
  }
9532
9657
  get _isTyping() {
9533
- return Utils39.is(this._input, ":focus");
9658
+ return Utils45.is(this._input, ":focus");
9534
9659
  }
9535
9660
  _undo() {
9536
9661
  this._focus(null);
@@ -9538,8 +9663,8 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9538
9663
  }
9539
9664
  _findFirstAvailableListItem() {
9540
9665
  var el;
9541
- if (this._balloon.visible === true && !Utils39.isNull(el = this._repeater.querySelector("ol > li"))) {
9542
- while (!Utils39.isNull(el) && el.dataset["pacemDisabled"] === "true" && el.localName === "li") {
9666
+ if (this._balloon.visible === true && !Utils45.isNull(el = this._repeater.querySelector("ol > li"))) {
9667
+ while (!Utils45.isNull(el) && el.dataset["pacemDisabled"] === "true" && el.localName === "li") {
9543
9668
  el = el.nextElementSibling;
9544
9669
  }
9545
9670
  }
@@ -9566,7 +9691,7 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9566
9691
  if (this.preventFocus) {
9567
9692
  return;
9568
9693
  }
9569
- if (Utils39.isNull(el)) {
9694
+ if (Utils45.isNull(el)) {
9570
9695
  this.#selectedItem = null;
9571
9696
  return;
9572
9697
  }
@@ -9591,7 +9716,7 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9591
9716
  }
9592
9717
  _filter(ds, hint, value = this.value) {
9593
9718
  let datasource = ds || [];
9594
- if (!Utils39.isNullOrEmpty(hint && hint.trim())) {
9719
+ if (!Utils45.isNullOrEmpty(hint && hint.trim())) {
9595
9720
  const lowerHints = hint.toLowerCase().split(" ");
9596
9721
  let filtered = datasource.filter((i) => {
9597
9722
  for (let lowerHint of lowerHints) {
@@ -9599,18 +9724,18 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9599
9724
  return true;
9600
9725
  }
9601
9726
  const filters = this.filterFields;
9602
- if (!Utils39.isNullOrEmpty(filters)) {
9727
+ if (!Utils45.isNullOrEmpty(filters)) {
9603
9728
  const iData = i.data;
9604
- if (typeof iData === "object" && !Utils39.isNullOrEmpty(iData)) {
9729
+ if (typeof iData === "object" && !Utils45.isNullOrEmpty(iData)) {
9605
9730
  for (let filter of filters) {
9606
9731
  const filterStruct = filter.split(".");
9607
9732
  let j = 0;
9608
9733
  let value2 = iData;
9609
- while (!Utils39.isNull(value2) && j < filterStruct.length) {
9734
+ while (!Utils45.isNull(value2) && j < filterStruct.length) {
9610
9735
  value2 = value2[filterStruct[j]];
9611
9736
  j++;
9612
9737
  }
9613
- if (Utils39.isNullOrEmpty(value2)) {
9738
+ if (Utils45.isNullOrEmpty(value2)) {
9614
9739
  continue;
9615
9740
  }
9616
9741
  if (value2.toString().toLowerCase().indexOf(lowerHint) >= 0) {
@@ -9622,7 +9747,7 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9622
9747
  }
9623
9748
  return false;
9624
9749
  });
9625
- const concatenate = this.allowNew && Utils39.isNullOrEmpty(this.valueProperty) && Utils39.isNullOrEmpty(this.textProperty) && (Utils39.isNullOrEmpty(filtered) || Utils39.isNull(filtered.find((i) => i.viewValue === hint)));
9750
+ const concatenate = this.allowNew && Utils45.isNullOrEmpty(this.valueProperty) && Utils45.isNullOrEmpty(this.textProperty) && (Utils45.isNullOrEmpty(filtered) || Utils45.isNull(filtered.find((i) => i.viewValue === hint)));
9626
9751
  datasource = concatenate ? [{ value: hint, viewValue: hint, data: hint }].concat(filtered) : filtered;
9627
9752
  }
9628
9753
  let retval = datasource;
@@ -9632,7 +9757,7 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9632
9757
  if (this._isTyping) {
9633
9758
  this.popup();
9634
9759
  }
9635
- this._balloon.style.opacity = Utils39.isNullOrEmpty(retval) ? "0" : "";
9760
+ this._balloon.style.opacity = Utils45.isNullOrEmpty(retval) ? "0" : "";
9636
9761
  this.log(Logging5.LogLevel.Log, `${retval.length} dropdown suggestion(s), given hint '${hint}' and ${(ds || []).length} datasource items`);
9637
9762
  return retval;
9638
9763
  }
@@ -9664,7 +9789,7 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9664
9789
  Balloon and repeater
9665
9790
  */
9666
9791
  popup(delay = BALLOON_POPUP_DELAY) {
9667
- if (!Utils39.isNullOrEmpty(this.adaptedDatasource) && Utils39.isVisible(this)) {
9792
+ if (!Utils45.isNullOrEmpty(this.adaptedDatasource) && Utils45.isVisible(this)) {
9668
9793
  this._balloon?.popup(delay);
9669
9794
  }
9670
9795
  }
@@ -9673,15 +9798,15 @@ var PacemSuggestElement = class PacemSuggestElement2 extends PacemDataSourceElem
9673
9798
  this._balloon?.popout(delay);
9674
9799
  }
9675
9800
  _checkBalloon(balloon = this._balloon) {
9676
- if (!Utils39.isNull(balloon)) {
9677
- const hasValue = !Utils39.isNullOrEmpty(this.value) && !Utils39.isNullOrEmpty(this._input.value);
9801
+ if (!Utils45.isNull(balloon)) {
9802
+ const hasValue = !Utils45.isNullOrEmpty(this.value) && !Utils45.isNullOrEmpty(this._input.value);
9678
9803
  balloon.disabled = hasValue || this.readonly || this.disabled || /* normalize to an actual boolean */
9679
9804
  false;
9680
9805
  }
9681
9806
  }
9682
9807
  _createBalloon() {
9683
9808
  const balloon = document.createElement(P42 + "-balloon");
9684
- Utils39.addClass(balloon, "suggest dropdown");
9809
+ Utils45.addClass(balloon, "suggest dropdown");
9685
9810
  balloon.options = {
9686
9811
  trackPosition: true,
9687
9812
  trigger: ComponentsUI6.UI.BalloonTrigger.Focus,
@@ -9766,7 +9891,7 @@ class="button-flat icon-rotate ${PCSS34}-anim anim-pop anim-sudden anim-quick po
9766
9891
  ], PacemSuggestElement);
9767
9892
 
9768
9893
  // packages/scaffolding/dist/esm/tags.js
9769
- import { CustomElement as CustomElement42, Defaults as Defaults38, P as P43, PCSS as PCSS35, Components as Components12, CustomTypedEvent as CustomTypedEvent7, PropertyConverters as PropertyConverters32, Watch as Watch33, Utils as Utils40, ViewChild as ViewChild33 } from "@pacem/pacem-core";
9894
+ import { CustomElement as CustomElement42, Defaults as Defaults38, P as P43, PCSS as PCSS35, Components as Components12, CustomTypedEvent as CustomTypedEvent7, PropertyConverters as PropertyConverters32, Watch as Watch33, Utils as Utils46, ViewChild as ViewChild33 } from "@pacem/pacem-core";
9770
9895
  var __decorate45 = function(decorators, target, key, desc) {
9771
9896
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9772
9897
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -9789,18 +9914,18 @@ var PacemTagElement = class PacemTagElement2 extends Components12.PacemElement {
9789
9914
  switch (name) {
9790
9915
  case "readonly":
9791
9916
  let readonly = !!val;
9792
- (readonly ? Utils40.addClass : Utils40.removeClass)(this, "tag-readonly");
9917
+ (readonly ? Utils46.addClass : Utils46.removeClass)(this, "tag-readonly");
9793
9918
  this._btn.disabled = this._btn.hide = readonly;
9794
9919
  break;
9795
9920
  case "tag":
9796
- Utils40.removeClass(this, "tag-out");
9921
+ Utils46.removeClass(this, "tag-out");
9797
9922
  break;
9798
9923
  }
9799
9924
  }
9800
9925
  _remove() {
9801
9926
  const tag = this;
9802
- Utils40.addClass(tag, "tag-out");
9803
- Utils40.addAnimationEndCallback(tag, () => {
9927
+ Utils46.addClass(tag, "tag-out");
9928
+ Utils46.addAnimationEndCallback(tag, () => {
9804
9929
  this.dispatchEvent(new Event("remove"));
9805
9930
  });
9806
9931
  }
@@ -9847,7 +9972,7 @@ var PacemTagsElement = class PacemTagsElement2 extends PacemDataSourceElement {
9847
9972
  this._suggest[name] = val;
9848
9973
  break;
9849
9974
  case "valueProperty":
9850
- if (!Utils40.isNullOrEmpty(val)) {
9975
+ if (!Utils46.isNullOrEmpty(val)) {
9851
9976
  throw `Cannot set 'valueProperty' on ${this.constructor.name}s.`;
9852
9977
  }
9853
9978
  break;
@@ -9861,15 +9986,15 @@ var PacemTagsElement = class PacemTagsElement2 extends PacemDataSourceElement {
9861
9986
  switch (evt.type) {
9862
9987
  case "tagremove":
9863
9988
  this._justAddedIndex = -1;
9864
- const trev = evt, ndxrev = trev.detail.index, valrev = Utils40.clone(this.value);
9989
+ const trev = evt, ndxrev = trev.detail.index, valrev = Utils46.clone(this.value);
9865
9990
  const trunk2 = valrev.splice(ndxrev + 1), trunk1 = valrev.splice(0, ndxrev);
9866
9991
  resolve(this.value = trunk1.concat(trunk2));
9867
9992
  break;
9868
9993
  case "tagadd":
9869
- const value = evt.detail.value, valadd = Utils40.clone(this.value);
9994
+ const value = evt.detail.value, valadd = Utils46.clone(this.value);
9870
9995
  if (
9871
9996
  // no empty items
9872
- !Utils40.isNullOrEmpty(value) && (this.allowDuplicates || Utils40.isNullOrEmpty(valadd && valadd.find((i) => this.mapEntityToViewValue(i) == this.mapEntityToViewValue(value))))
9997
+ !Utils46.isNullOrEmpty(value) && (this.allowDuplicates || Utils46.isNullOrEmpty(valadd && valadd.find((i) => this.mapEntityToViewValue(i) == this.mapEntityToViewValue(value))))
9873
9998
  ) {
9874
9999
  let newvalue = (valadd || []).concat([value]);
9875
10000
  resolve(this.value = newvalue);
@@ -9931,7 +10056,7 @@ PacemTagsElement = __decorate45([
9931
10056
  ], PacemTagsElement);
9932
10057
 
9933
10058
  // packages/scaffolding/dist/esm/textarea.js
9934
- import { P as P44, PCSS as PCSS36, CustomElement as CustomElement43, Watch as Watch34, Defaults as Defaults39, ViewChild as ViewChild34, PropertyConverters as PropertyConverters33 } from "@pacem/pacem-core";
10059
+ import { P as P44, PCSS as PCSS36, CustomElement as CustomElement43, Watch as Watch34, Defaults as Defaults39, ViewChild as ViewChild34, PropertyConverters as PropertyConverters33, Utils as Utils47 } from "@pacem/pacem-core";
9935
10060
  var __decorate46 = function(decorators, target, key, desc) {
9936
10061
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9937
10062
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -9949,11 +10074,14 @@ var PacemTextAreaElement = class PacemTextAreaElement2 extends PacemTextualInput
9949
10074
  return true;
9950
10075
  }
9951
10076
  toggleReadonlyView(readonly) {
9952
- this._span.hidden = !readonly;
9953
- this._input.hidden = readonly;
10077
+ const input = this._input, span = this._span;
10078
+ if (!Utils47.isNull(input))
10079
+ input.hidden = readonly;
10080
+ if (!Utils47.isNull(span))
10081
+ span.hidden = !readonly;
9954
10082
  }
9955
10083
  get inputFields() {
9956
- return [this._input];
10084
+ return Utils47.isNull(this._input) ? [] : [this._input];
9957
10085
  }
9958
10086
  propertyChangedCallback(name, old, val, first) {
9959
10087
  super.propertyChangedCallback(name, old, val, first);
@@ -9979,7 +10107,7 @@ PacemTextAreaElement = __decorate46([
9979
10107
  ], PacemTextAreaElement);
9980
10108
 
9981
10109
  // packages/scaffolding/dist/esm/textarea-markdown.js
9982
- import { P as P45, PCSS as PCSS37, CustomElement as CustomElement44, Watch as Watch35, Defaults as Defaults40, ViewChild as ViewChild35, PropertyConverters as PropertyConverters34, preventDefaultHandler } from "@pacem/pacem-core";
10110
+ import { P as P45, PCSS as PCSS37, CustomElement as CustomElement44, Watch as Watch35, Defaults as Defaults40, ViewChild as ViewChild35, PropertyConverters as PropertyConverters34, preventDefaultHandler, Utils as Utils48 } from "@pacem/pacem-core";
9983
10111
  import { Components as Components13 } from "@pacem/pacem-ui";
9984
10112
  var __decorate47 = function(decorators, target, key, desc) {
9985
10113
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -9995,7 +10123,7 @@ var PacemMarkdownTextAreaElement = class PacemMarkdownTextAreaElement2 extends P
9995
10123
  this.cols = 50;
9996
10124
  this._keydownHandler = (evt) => {
9997
10125
  if (evt.keyCode === 9) {
9998
- const input = this.input, value = input.value;
10126
+ const input = this._input, value = input.value;
9999
10127
  var ndx = input.selectionStart;
10000
10128
  input.value = value.substr(0, ndx) + " " + value.substr(ndx);
10001
10129
  preventDefaultHandler(evt);
@@ -10003,14 +10131,15 @@ var PacemMarkdownTextAreaElement = class PacemMarkdownTextAreaElement2 extends P
10003
10131
  };
10004
10132
  }
10005
10133
  toggleReadonlyView(readonly) {
10006
- this.input.hidden = readonly;
10134
+ if (!Utils48.isNull(this._input))
10135
+ this._input.hidden = readonly;
10007
10136
  }
10008
10137
  /** @override */
10009
10138
  get preventKeyboardSubmit() {
10010
10139
  return true;
10011
10140
  }
10012
10141
  get inputFields() {
10013
- return [this.input];
10142
+ return Utils48.isNull(this._input) ? [] : [this._input];
10014
10143
  }
10015
10144
  getViewValue(val) {
10016
10145
  return this._md.toHtml(val);
@@ -10025,10 +10154,10 @@ var PacemMarkdownTextAreaElement = class PacemMarkdownTextAreaElement2 extends P
10025
10154
  }
10026
10155
  viewActivatedCallback() {
10027
10156
  super.viewActivatedCallback();
10028
- this.input.addEventListener("keydown", this._keydownHandler, false);
10157
+ this._input.addEventListener("keydown", this._keydownHandler, false);
10029
10158
  }
10030
10159
  disconnectedCallback() {
10031
- this.input && this.input.removeEventListener("keydown", this._keydownHandler, false);
10160
+ this._input && this._input.removeEventListener("keydown", this._keydownHandler, false);
10032
10161
  super.disconnectedCallback();
10033
10162
  }
10034
10163
  };
@@ -10040,7 +10169,7 @@ __decorate47([
10040
10169
  ], PacemMarkdownTextAreaElement.prototype, "cols", void 0);
10041
10170
  __decorate47([
10042
10171
  ViewChild35("textarea")
10043
- ], PacemMarkdownTextAreaElement.prototype, "input", void 0);
10172
+ ], PacemMarkdownTextAreaElement.prototype, "_input", void 0);
10044
10173
  __decorate47([
10045
10174
  ViewChild35(`div.${PCSS37}-readonly`)
10046
10175
  ], PacemMarkdownTextAreaElement.prototype, "_markdown", void 0);