@openremote/or-asset-viewer 1.6.0 → 1.6.3

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.
@@ -384,19 +384,14 @@
384
384
  "description": "",
385
385
  "name": "OrAssetViewer",
386
386
  "members": [
387
- {
388
- "kind": "field",
389
- "name": "styles",
390
- "static": true,
391
- "readonly": true
392
- },
393
387
  {
394
388
  "kind": "field",
395
389
  "name": "asset",
396
390
  "type": {
397
391
  "text": "Asset | undefined"
398
392
  },
399
- "privacy": "public"
393
+ "privacy": "public",
394
+ "attribute": "asset"
400
395
  },
401
396
  {
402
397
  "kind": "field",
@@ -404,7 +399,8 @@
404
399
  "type": {
405
400
  "text": "string | undefined"
406
401
  },
407
- "privacy": "public"
402
+ "privacy": "public",
403
+ "attribute": "assetId"
408
404
  },
409
405
  {
410
406
  "kind": "field",
@@ -412,7 +408,8 @@
412
408
  "type": {
413
409
  "text": "ViewerConfig | undefined"
414
410
  },
415
- "privacy": "public"
411
+ "privacy": "public",
412
+ "attribute": "config"
416
413
  },
417
414
  {
418
415
  "kind": "field",
@@ -420,7 +417,8 @@
420
417
  "type": {
421
418
  "text": "boolean | undefined"
422
419
  },
423
- "privacy": "public"
420
+ "privacy": "public",
421
+ "attribute": "editMode"
424
422
  },
425
423
  {
426
424
  "kind": "field",
@@ -428,7 +426,8 @@
428
426
  "type": {
429
427
  "text": "boolean | undefined"
430
428
  },
431
- "privacy": "public"
429
+ "privacy": "public",
430
+ "attribute": "readonly"
432
431
  },
433
432
  {
434
433
  "kind": "field",
@@ -514,35 +513,6 @@
514
513
  "name": "langChangedCallback",
515
514
  "description": "When language is changed, we clear the cached templates,\nso can be rendered differently according to the selected language."
516
515
  },
517
- {
518
- "kind": "method",
519
- "name": "shouldUpdate",
520
- "return": {
521
- "type": {
522
- "text": "boolean"
523
- }
524
- },
525
- "parameters": [
526
- {
527
- "name": "changedProperties",
528
- "type": {
529
- "text": "PropertyValues"
530
- }
531
- }
532
- ]
533
- },
534
- {
535
- "kind": "method",
536
- "name": "updated",
537
- "parameters": [
538
- {
539
- "name": "_changedProperties",
540
- "type": {
541
- "text": "PropertyValues"
542
- }
543
- }
544
- ]
545
- },
546
516
  {
547
517
  "kind": "method",
548
518
  "name": "loadAssetInfo",
@@ -565,16 +535,6 @@
565
535
  "name": "_doValidation",
566
536
  "privacy": "protected"
567
537
  },
568
- {
569
- "kind": "method",
570
- "name": "render",
571
- "privacy": "protected",
572
- "return": {
573
- "type": {
574
- "text": "TemplateResult | void"
575
- }
576
- }
577
- },
578
538
  {
579
539
  "kind": "method",
580
540
  "name": "_toggleHeaderShadow",
@@ -678,6 +638,43 @@
678
638
  }
679
639
  }
680
640
  ],
641
+ "attributes": [
642
+ {
643
+ "name": "asset",
644
+ "type": {
645
+ "text": "Asset | undefined"
646
+ },
647
+ "fieldName": "asset"
648
+ },
649
+ {
650
+ "name": "assetId",
651
+ "type": {
652
+ "text": "string | undefined"
653
+ },
654
+ "fieldName": "assetId"
655
+ },
656
+ {
657
+ "name": "config",
658
+ "type": {
659
+ "text": "ViewerConfig | undefined"
660
+ },
661
+ "fieldName": "config"
662
+ },
663
+ {
664
+ "name": "editMode",
665
+ "type": {
666
+ "text": "boolean | undefined"
667
+ },
668
+ "fieldName": "editMode"
669
+ },
670
+ {
671
+ "name": "readonly",
672
+ "type": {
673
+ "text": "boolean | undefined"
674
+ },
675
+ "fieldName": "readonly"
676
+ }
677
+ ],
681
678
  "mixins": [
682
679
  {
683
680
  "name": "subscribe(manager)",
@@ -692,6 +689,7 @@
692
689
  "name": "LitElement",
693
690
  "package": "lit"
694
691
  },
692
+ "tagName": "or-asset-viewer",
695
693
  "customElement": true
696
694
  }
697
695
  ],
@@ -831,6 +829,14 @@
831
829
  "name": "OrAssetViewer",
832
830
  "module": "src/index.ts"
833
831
  }
832
+ },
833
+ {
834
+ "kind": "custom-element-definition",
835
+ "name": "or-asset-viewer",
836
+ "declaration": {
837
+ "name": "OrAssetViewer",
838
+ "module": "src/index.ts"
839
+ }
834
840
  }
835
841
  ]
836
842
  },
@@ -889,7 +895,8 @@
889
895
  "text": "boolean"
890
896
  },
891
897
  "privacy": "protected",
892
- "default": "false"
898
+ "default": "false",
899
+ "attribute": "isCustom"
893
900
  },
894
901
  {
895
902
  "kind": "field",
@@ -898,7 +905,8 @@
898
905
  "text": "boolean"
899
906
  },
900
907
  "privacy": "public",
901
- "default": "false"
908
+ "default": "false",
909
+ "attribute": "isArray"
902
910
  },
903
911
  {
904
912
  "kind": "field",
@@ -907,7 +915,8 @@
907
915
  "text": "number"
908
916
  },
909
917
  "privacy": "public",
910
- "default": "1"
918
+ "default": "1",
919
+ "attribute": "arrayDimensions"
911
920
  },
912
921
  {
913
922
  "kind": "field",
@@ -951,31 +960,6 @@
951
960
  "privacy": "protected",
952
961
  "default": "/\\[\\]/g"
953
962
  },
954
- {
955
- "kind": "field",
956
- "name": "styles",
957
- "privacy": "public",
958
- "static": true,
959
- "readonly": true
960
- },
961
- {
962
- "kind": "method",
963
- "name": "shouldUpdate",
964
- "privacy": "protected",
965
- "parameters": [
966
- {
967
- "name": "_changedProperties",
968
- "type": {
969
- "text": "PropertyValues"
970
- }
971
- }
972
- ]
973
- },
974
- {
975
- "kind": "method",
976
- "name": "render",
977
- "privacy": "protected"
978
- },
979
963
  {
980
964
  "kind": "method",
981
965
  "name": "onTypeChanged",
@@ -1047,10 +1031,37 @@
1047
1031
  }
1048
1032
  }
1049
1033
  ],
1034
+ "attributes": [
1035
+ {
1036
+ "name": "isCustom",
1037
+ "type": {
1038
+ "text": "boolean"
1039
+ },
1040
+ "default": "false",
1041
+ "fieldName": "isCustom"
1042
+ },
1043
+ {
1044
+ "name": "isArray",
1045
+ "type": {
1046
+ "text": "boolean"
1047
+ },
1048
+ "default": "false",
1049
+ "fieldName": "isArray"
1050
+ },
1051
+ {
1052
+ "name": "arrayDimensions",
1053
+ "type": {
1054
+ "text": "number"
1055
+ },
1056
+ "default": "1",
1057
+ "fieldName": "arrayDimensions"
1058
+ }
1059
+ ],
1050
1060
  "superclass": {
1051
1061
  "name": "LitElement",
1052
1062
  "package": "lit"
1053
1063
  },
1064
+ "tagName": "or-add-attribute-panel",
1054
1065
  "customElement": true
1055
1066
  }
1056
1067
  ],
@@ -1070,6 +1081,14 @@
1070
1081
  "name": "OrAddAttributePanel",
1071
1082
  "module": "src/or-add-attribute-panel.ts"
1072
1083
  }
1084
+ },
1085
+ {
1086
+ "kind": "custom-element-definition",
1087
+ "name": "or-add-attribute-panel",
1088
+ "declaration": {
1089
+ "name": "OrAddAttributePanel",
1090
+ "module": "src/or-add-attribute-panel.ts"
1091
+ }
1073
1092
  }
1074
1093
  ]
1075
1094
  },
@@ -1139,13 +1158,6 @@
1139
1158
  "privacy": "protected",
1140
1159
  "default": "false"
1141
1160
  },
1142
- {
1143
- "kind": "field",
1144
- "name": "styles",
1145
- "privacy": "public",
1146
- "static": true,
1147
- "readonly": true
1148
- },
1149
1161
  {
1150
1162
  "kind": "method",
1151
1163
  "name": "attributeUpdated",
@@ -1159,28 +1171,6 @@
1159
1171
  }
1160
1172
  ]
1161
1173
  },
1162
- {
1163
- "kind": "method",
1164
- "name": "shouldUpdate",
1165
- "return": {
1166
- "type": {
1167
- "text": "boolean"
1168
- }
1169
- },
1170
- "parameters": [
1171
- {
1172
- "name": "changedProperties",
1173
- "type": {
1174
- "text": "PropertyValues"
1175
- }
1176
- }
1177
- ]
1178
- },
1179
- {
1180
- "kind": "method",
1181
- "name": "render",
1182
- "privacy": "protected"
1183
- },
1184
1174
  {
1185
1175
  "kind": "method",
1186
1176
  "name": "_getAttributeTemplate",
@@ -1323,6 +1313,7 @@
1323
1313
  "name": "LitElement",
1324
1314
  "package": "lit"
1325
1315
  },
1316
+ "tagName": "or-edit-asset-panel",
1326
1317
  "customElement": true
1327
1318
  }
1328
1319
  ],
@@ -1342,6 +1333,14 @@
1342
1333
  "name": "OrEditAssetPanel",
1343
1334
  "module": "src/or-edit-asset-panel.ts"
1344
1335
  }
1336
+ },
1337
+ {
1338
+ "kind": "custom-element-definition",
1339
+ "name": "or-edit-asset-panel",
1340
+ "declaration": {
1341
+ "name": "OrEditAssetPanel",
1342
+ "module": "src/or-edit-asset-panel.ts"
1343
+ }
1345
1344
  }
1346
1345
  ]
1347
1346
  },
package/dist/umd/index.js CHANGED
@@ -260,7 +260,7 @@
260
260
  .mdc-list-item__graphic > or-icon {
261
261
  pointer-events: none;
262
262
  }
263
- `;let ya=class extends Le{constructor(){super(...arguments),this.readonly=!1,this.required=!1,this.checked=!1,this.indeterminate=!1,this.multiple=!1,this.searchLabel="search",this.compact=!1,this.comfortable=!1,this.raised=!1,this.action=!1,this.unElevated=!1,this.outlined=!1,this.rounded=!1,this.disableSliderNumberInput=!1,this.fullWidth=!1,this.helperPersistent=!1,this.autoValidate=!1,this.charCounter=!1,this.disabled=!1,this.continuous=!1,this.resizeVertical=!1,this._selectedIndex=-1,this.isUiValid=!0}static get styles(){return[me`${ce(Qi)}`,me`${ce(Ji)}`,me`${ce(Zi)}`,me`${ce(ea)}`,me`${ce(ta)}`,me`${ce(na)}`,me`${ce(ia)}`,me`${ce(aa)}`,me`${ce(ra)}`,me`${ce(oa)}`,me`${ce(sa)}`,me`${ce(da)}`,me`${ce(la)}`,me`${ce(ma)}`,me`${ce(ca)}`,me`${ce(ua)}`,ba]}get nativeValue(){if(this._mdcComponent)return this._mdcComponent.value}disconnectedCallback(){var e,t;super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0,null===(e=this._menuObserver)||void 0===e||e.disconnect()),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0,null===(t=this._menuObserver)||void 0===t||t.disconnect())}shouldUpdate(e){return e.has("indeterminate")&&this._mdcComponent&&this.type===ha.CHECKBOX&&(this._mdcComponent.indeterminate=this.indeterminate),e.has("disabled")&&(this._mdcComponent&&(this._mdcComponent.disabled=this.disabled),this.type===ha.RANGE&&this._mdcComponent2&&(this._mdcComponent2.disabled=this.disabled)),e.has("readonly")&&(this._mdcComponent&&(this._mdcComponent.readonly=this.readonly),this.type===ha.RANGE&&this._mdcComponent2&&(this._mdcComponent2.readonly=this.readonly)),!this.type&&this.value&&(this.value instanceof Date?this.type=ha.DATETIME:"boolean"==typeof this.value?this.type=ha.CHECKBOX:"number"==typeof this.value?this.type=ha.NUMBER:"string"==typeof this.value?this.type=ha.TEXT:this.type=ha.JSON),!0}focus(){this.type===ha.RANGE&&this._mdcComponent2?this._mdcComponent2.focus():this._mdcComponent&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}render(){var e;if(this.type){const t=!this.fullWidth&&this.label;let n=!this.fullWidth&&this.outlined,i=!!this.helperText;const a=!(this.isUiValid||!this.errorMessage&&!this.validationMessage),r={"mdc-text-field-helper-text--persistent":!a&&this.helperPersistent,"mdc-text-field-helper-text--validation-msg":a},o=null!==this.value&&void 0!==this.value||!1===this.value;let s=t?z`<span class="mdc-floating-label ${o?"mdc-floating-label--float-above":""}" id="label">${this.label}</span>`:void 0;switch(this.type){case ha.RADIO:const t=this.resolveOptions(this.options);return this._selectedIndex=-1,z`
263
+ `;let ya=class extends Le{constructor(){super(...arguments),this.readonly=!1,this.required=!1,this.checked=!1,this.indeterminate=!1,this.multiple=!1,this.searchLabel="search",this.compact=!1,this.comfortable=!1,this.raised=!1,this.action=!1,this.unElevated=!1,this.outlined=!1,this.rounded=!1,this.disableSliderNumberInput=!1,this.fullWidth=!1,this.helperPersistent=!1,this.autoValidate=!1,this.charCounter=!1,this.disabled=!1,this.continuous=!1,this.resizeVertical=!1,this.censored=!1,this.advertised=!1,this._selectedIndex=-1,this.isUiValid=!0}static get styles(){return[me`${ce(Qi)}`,me`${ce(Ji)}`,me`${ce(Zi)}`,me`${ce(ea)}`,me`${ce(ta)}`,me`${ce(na)}`,me`${ce(ia)}`,me`${ce(aa)}`,me`${ce(ra)}`,me`${ce(oa)}`,me`${ce(sa)}`,me`${ce(da)}`,me`${ce(la)}`,me`${ce(ma)}`,me`${ce(ca)}`,me`${ce(ua)}`,ba]}get nativeValue(){if(this._mdcComponent)return this._mdcComponent.value}disconnectedCallback(){var e,t;super.disconnectedCallback(),this._mdcComponent&&(this._mdcComponent.destroy(),this._mdcComponent=void 0,null===(e=this._menuObserver)||void 0===e||e.disconnect()),this._mdcComponent2&&(this._mdcComponent2.destroy(),this._mdcComponent2=void 0,null===(t=this._menuObserver)||void 0===t||t.disconnect())}shouldUpdate(e){return e.has("indeterminate")&&this._mdcComponent&&this.type===ha.CHECKBOX&&(this._mdcComponent.indeterminate=this.indeterminate),e.has("disabled")&&(this._mdcComponent&&(this._mdcComponent.disabled=this.disabled),this.type===ha.RANGE&&this._mdcComponent2&&(this._mdcComponent2.disabled=this.disabled)),e.has("readonly")&&(this._mdcComponent&&(this._mdcComponent.readonly=this.readonly),this.type===ha.RANGE&&this._mdcComponent2&&(this._mdcComponent2.readonly=this.readonly)),!this.type&&this.value&&(this.value instanceof Date?this.type=ha.DATETIME:"boolean"==typeof this.value?this.type=ha.CHECKBOX:"number"==typeof this.value?this.type=ha.NUMBER:"string"==typeof this.value?this.type=ha.TEXT:this.type=ha.JSON),!0}focus(){this.type===ha.RANGE&&this._mdcComponent2?this._mdcComponent2.focus():this._mdcComponent&&"function"==typeof this._mdcComponent.focus&&this._mdcComponent.focus()}render(){var e;if(this.type){const t=!this.fullWidth&&this.label;let n=!this.fullWidth&&this.outlined,i=!!this.helperText;const a=!(this.isUiValid||!this.errorMessage&&!this.validationMessage),r={"mdc-text-field-helper-text--persistent":!a&&this.helperPersistent,"mdc-text-field-helper-text--validation-msg":a},o=null!==this.value&&void 0!==this.value||!1===this.value;let s=t?z`<span class="mdc-floating-label ${o?"mdc-floating-label--float-above":""}" id="label">${this.label}</span>`:void 0;switch(this.type){case ha.RADIO:const t=this.resolveOptions(this.options);return this._selectedIndex=-1,z`
264
264
  <div class="mdc-radio-container">
265
265
  ${t?t.map((([e,t],n)=>(this.value===e&&(this._selectedIndex=n),z`
266
266
  <div id="field" class="mdc-form-field">
@@ -429,7 +429,7 @@
429
429
  />
430
430
  <label style="margin-left: 10px; cursor: pointer" for="elem">${this.label}</label>
431
431
  </div>
432
- `;case ha.NUMBER:case ha.RANGE:case ha.DATE:case ha.DATETIME:case ha.TIME:case ha.MONTH:case ha.WEEK:case ha.EMAIL:case ha.PASSWORD:case ha.TELEPHONE:case ha.URL:case ha.TEXT:case ha.TEXTAREA:case ha.JSON:case ha.JSON_OBJECT:{let t,d=[void 0===this.value||null===this.value?void 0:this.value,this.min,this.max];if(d.some((e=>"string"!=typeof e)))if(this.type===ha.JSON||this.type===ha.JSON_OBJECT)if(void 0!==d[0]){if("string"!=typeof d[0]||null===d[0])try{d[0]=JSON.stringify(d[0],null,2)}catch(e){console.warn("Failed to parse JSON expression for input control"),d[0]=""}}else d[0]="";else{const t=this.format?Object.assign({},this.format):{};switch(this.type){case ha.TIME:t.asDate=!0,t.hour12=!1,t.timeStyle=this.step&&this.step<60?"medium":"short";break;case ha.DATE:t.asDate=!0,t.momentJsFormat="YYYY-MM-DD";break;case ha.WEEK:t.asDate=!0,t.momentJsFormat="YYYY-[W]WW";break;case ha.MONTH:t.asDate=!0,t.momentJsFormat="YYYY-MM";break;case ha.DATETIME:t.asDate=!0,t.momentJsFormat="YYYY-MM-DDTHH:mm";break;case ha.NUMBER:null!==(e=t.maximumFractionDigits)&&void 0!==e||(t.maximumFractionDigits=20)}t.useGrouping=!1,d=d.map((e=>void 0!==e?Ii.Util.getValueAsString(e,(()=>t),"en-GB"):void 0))}let l=this.label,c=this.type,m="component";if(this.type===ha.RANGE&&(l=void 0,n=!1,i=!1,c=ha.NUMBER,m="number"),this.type!==ha.RANGE||!this.disableSliderNumberInput){const e={"mdc-text-field":!0,"mdc-text-field--invalid":!this.valid,"mdc-text-field--filled":!n,"mdc-text-field--outlined":n,"mdc-text-field--textarea":c===ha.TEXTAREA||c===ha.JSON||c===ha.JSON_OBJECT,"mdc-text-field--disabled":this.disabled,"mdc-text-field--fullwidth":this.fullWidth&&!n,"dense-comfortable":this.comfortable&&!(c===ha.TEXTAREA||c===ha.JSON||c===ha.JSON_OBJECT),"dense-compact":!this.comfortable&&this.compact,"mdc-text-field--label-floating":o,"mdc-text-field--no-label":!this.label,"mdc-text-field--with-leading-icon":!!this.icon,"mdc-text-field--with-trailing-icon":!!this.iconTrailing,"or-mwc-input--rounded":this.rounded};t=c===ha.TEXTAREA||c===ha.JSON||c===ha.JSON_OBJECT?z`
432
+ `;case ha.NUMBER:case ha.RANGE:case ha.DATE:case ha.DATETIME:case ha.TIME:case ha.MONTH:case ha.WEEK:case ha.EMAIL:case ha.PASSWORD:case ha.TELEPHONE:case ha.URL:case ha.TEXT:case ha.TEXTAREA:case ha.JSON:case ha.JSON_OBJECT:{let t,d=[void 0===this.value||null===this.value?void 0:this.value,this.min,this.max];if(d.some((e=>"string"!=typeof e)))if(this.type===ha.JSON||this.type===ha.JSON_OBJECT)if(void 0!==d[0]){if("string"!=typeof d[0]||null===d[0])try{d[0]=JSON.stringify(d[0],null,2)}catch(e){console.warn("Failed to parse JSON expression for input control"),d[0]=""}}else d[0]="";else{const t=this.format?Object.assign({},this.format):{};switch(this.type){case ha.TIME:t.asDate=!0,t.hour12=!1,t.timeStyle=this.step&&this.step<60?"medium":"short";break;case ha.DATE:t.asDate=!0,t.momentJsFormat="YYYY-MM-DD";break;case ha.WEEK:t.asDate=!0,t.momentJsFormat="YYYY-[W]WW";break;case ha.MONTH:t.asDate=!0,t.momentJsFormat="YYYY-MM";break;case ha.DATETIME:t.asDate=!0,t.momentJsFormat="YYYY-MM-DDTHH:mm";break;case ha.NUMBER:null!==(e=t.maximumFractionDigits)&&void 0!==e||(t.maximumFractionDigits=20)}t.useGrouping=!1,d=d.map((e=>void 0!==e?Ii.Util.getValueAsString(e,(()=>t),"en-GB"):void 0))}let l=this.label,c=this.type,m="component";if(this.type===ha.RANGE&&(l=void 0,n=!1,i=!1,c=ha.NUMBER,m="number"),this.type!==ha.RANGE||!this.disableSliderNumberInput){this.censored&&(c=ha.PASSWORD),this.type===ha.PASSWORD&&this.advertised&&(c=ha.TEXT);const e={"mdc-text-field":!0,"mdc-text-field--invalid":!this.valid,"mdc-text-field--filled":!n,"mdc-text-field--outlined":n,"mdc-text-field--textarea":c===ha.TEXTAREA||c===ha.JSON||c===ha.JSON_OBJECT,"mdc-text-field--disabled":this.disabled,"mdc-text-field--fullwidth":this.fullWidth&&!n,"dense-comfortable":this.comfortable&&!(c===ha.TEXTAREA||c===ha.JSON||c===ha.JSON_OBJECT),"dense-compact":!this.comfortable&&this.compact,"mdc-text-field--label-floating":o,"mdc-text-field--no-label":!this.label,"mdc-text-field--with-leading-icon":!!this.icon,"mdc-text-field--with-trailing-icon":!!this.iconTrailing,"or-mwc-input--rounded":this.rounded};t=c===ha.TEXTAREA||c===ha.JSON||c===ha.JSON_OBJECT?z`
433
433
  <textarea id="elem" class="mdc-text-field__input ${this.resizeVertical?"resize-vertical":""}" ?required="${this.required}"
434
434
  ?readonly="${this.readonly}" ?disabled="${this.disabled}" minlength="${qe(this.minLength)}"
435
435
  maxlength="${qe(this.maxLength)}" rows="${this.rows?this.rows:5}"
@@ -451,6 +451,7 @@
451
451
  ${t}
452
452
  ${n?this.renderOutlined(s):s}
453
453
  ${n?"":z`<span class="mdc-line-ripple"></span>`}
454
+ ${this.type!==ha.PASSWORD||this.censored?"":z`<or-icon class="mdc-text-field__icon mdc-text-field__icon--trailing" aria-hidden="true" icon=${this.advertised?"eye":"eye-off"} style="pointer-events: auto;" @click=${()=>this.advertised=!this.advertised}></or-icon>`}
454
455
  ${this.iconTrailing?z`<or-icon class="mdc-text-field__icon mdc-text-field__icon--trailing" aria-hidden="true" icon="${this.iconTrailing}"></or-icon>`:""}
455
456
  </label>
456
457
  ${i||a?z`
@@ -493,7 +494,7 @@
493
494
  `:""}
494
495
  <span class="mdc-notched-outline__trailing"></span>
495
496
  </span>
496
- `}setCustomValidity(e){this.errorMessage=e;const t=this.shadowRoot.getElementById("elem");t&&t.setCustomValidity&&t.setCustomValidity(null!=e?e:""),this.reportValidity()}checkValidity(){const e=this.shadowRoot.getElementById("elem");let t=!0;return e&&e.validity&&(t=e.validity.valid),!t||this.type!==ha.JSON&&this.type!==ha.JSON_OBJECT||void 0!==this.value&&null!==this.value&&""===this._mdcComponent.value&&(t=!1),t}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,this._mdcComponent&&(this._mdcComponent.valid=e),e}onValueChange(e,t,n){var i,a;let r,o=this.value;if("undefined"===t&&(o=null,t=void 0),"null"===t&&(o=void 0,t=null),"string"==typeof t)switch(this.type){case ha.CHECKBOX:case ha.SWITCH:t="on"===t;break;case ha.JSON:case ha.JSON_OBJECT:case ha.NUMBER:case ha.RANGE:if(""===t)t=null;else try{t=JSON.parse(t),this.type!==ha.JSON_OBJECT||"object"==typeof t&&!Array.isArray(t)||(t=this.value,r=Pi.i18next.t("validation.invalidJSON"))}catch(e){t=this.value,r=this.type===ha.JSON||this.type==ha.JSON_OBJECT?Pi.i18next.t("validation.invalidJSON"):Pi.i18next.t("validation.invalidNumber")}break;case ha.DATETIME:if(""===t)t=null;else try{t=Date.parse(t)}catch(e){t=this.value,r=Pi.i18next.t("validation.invalidDate")}}if(this.value=t,this.setCustomValidity(r),this.reportValidity(),this.type!==ha.CHECKBOX_LIST&&t!==o&&(this.type===ha.RANGE&&(this._mdcComponent.setValue(t),this._mdcComponent2&&(this._mdcComponent2.value=t)),this.dispatchEvent(new pa(this.value,o,n))),null!=this.searchProvider&&this.type===ha.SELECT){const e=null===(a=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById("select-searchable"))||void 0===a?void 0:a.children[1];e&&(this.searchableValue=void 0,e.value="")}this.type!==ha.CHECKBOX_LIST||Ii.Util.objectsEqual(t,o,!0)||this.dispatchEvent(new pa(t,o,n))}get valid(){const e=this.shadowRoot.getElementById("elem");return!e||!e.checkValidity||e.checkValidity()}get currentValue(){const e=this.shadowRoot.getElementById("elem");if(e&&e.value)return e.value}resolveOptions(e){let t;return e&&e.length>0&&(t=e.map((e=>{if(Array.isArray(e))return e;{const t=""+e;return[e,Pi.i18next.t(t,{defaultValue:Ii.Util.camelCaseToSentenceCase(t)})]}}))),t}getSelectedTextValue(e){const t=this.value,n=Array.isArray(t)?t:null!=t?[t]:void 0;if(!n)return"";const i=e||this.resolveOptions(this.options);return i&&n?n.map((e=>i.find((([t,n],i)=>e===t)))).map((e=>e?e[1]:"")).join(", "):""}};qi([De({type:Boolean})],ya.prototype,"focused",void 0),qi([De()],ya.prototype,"value",void 0),qi([De({type:String})],ya.prototype,"type",void 0),qi([De({type:String})],ya.prototype,"name",void 0),qi([De({type:Boolean})],ya.prototype,"readonly",void 0),qi([De({type:Boolean})],ya.prototype,"required",void 0),qi([De()],ya.prototype,"max",void 0),qi([De()],ya.prototype,"min",void 0),qi([De({type:Number})],ya.prototype,"step",void 0),qi([De({type:Boolean})],ya.prototype,"checked",void 0),qi([De({type:Boolean})],ya.prototype,"indeterminate",void 0),qi([De({type:Number})],ya.prototype,"maxLength",void 0),qi([De({type:Number})],ya.prototype,"minLength",void 0),qi([De({type:Number})],ya.prototype,"rows",void 0),qi([De({type:Number})],ya.prototype,"cols",void 0),qi([De({type:Boolean})],ya.prototype,"multiple",void 0),qi([De({type:String,attribute:!0,reflect:!1})],ya.prototype,"pattern",void 0),qi([De({type:String})],ya.prototype,"placeHolder",void 0),qi([De({type:Array})],ya.prototype,"options",void 0),qi([De({type:Boolean})],ya.prototype,"autoSelect",void 0),qi([De({type:Object})],ya.prototype,"searchProvider",void 0),qi([De({type:String})],ya.prototype,"searchLabel",void 0),qi([De({type:String})],ya.prototype,"icon",void 0),qi([De({type:String})],ya.prototype,"iconColor",void 0),qi([De({type:String})],ya.prototype,"iconOn",void 0),qi([De({type:String})],ya.prototype,"iconTrailing",void 0),qi([De({type:Boolean})],ya.prototype,"compact",void 0),qi([De({type:Boolean})],ya.prototype,"comfortable",void 0),qi([De({type:Boolean})],ya.prototype,"raised",void 0),qi([De({type:Boolean})],ya.prototype,"action",void 0),qi([De({type:Boolean})],ya.prototype,"unElevated",void 0),qi([De({type:Boolean})],ya.prototype,"outlined",void 0),qi([De({type:Boolean})],ya.prototype,"rounded",void 0),qi([De({type:Object})],ya.prototype,"format",void 0),qi([De({type:Boolean})],ya.prototype,"disableSliderNumberInput",void 0),qi([De({type:Boolean})],ya.prototype,"fullWidth",void 0),qi([De({type:String})],ya.prototype,"helperText",void 0),qi([De({type:Boolean})],ya.prototype,"helperPersistent",void 0),qi([De({type:String,attribute:!0})],ya.prototype,"validationMessage",void 0),qi([De({type:Boolean})],ya.prototype,"autoValidate",void 0),qi([De({type:Boolean})],ya.prototype,"charCounter",void 0),qi([De({type:String})],ya.prototype,"label",void 0),qi([De({type:Boolean})],ya.prototype,"disabled",void 0),qi([De({type:Boolean})],ya.prototype,"continuous",void 0),qi([De({type:Boolean})],ya.prototype,"resizeVertical",void 0),qi([Ae()],ya.prototype,"isUiValid",void 0),qi([Ae()],ya.prototype,"searchableValue",void 0),qi([Ae()],ya.prototype,"errorMessage",void 0),ya=qi([Ee("or-mwc-input")],ya);var va,xa=l(1424),ka=(l(3344),l(1166),{CLOSED_CLASS:"mdc-linear-progress--closed",CLOSED_ANIMATION_OFF_CLASS:"mdc-linear-progress--closed-animation-off",INDETERMINATE_CLASS:"mdc-linear-progress--indeterminate",REVERSED_CLASS:"mdc-linear-progress--reversed",ANIMATION_READY_CLASS:"mdc-linear-progress--animation-ready"}),wa={ARIA_VALUEMAX:"aria-valuemax",ARIA_VALUEMIN:"aria-valuemin",ARIA_VALUENOW:"aria-valuenow",BUFFER_BAR_SELECTOR:".mdc-linear-progress__buffer-bar",FLEX_BASIS:"flex-basis",PRIMARY_BAR_SELECTOR:".mdc-linear-progress__primary-bar"},Ma=function(e){function t(n){var i=e.call(this,at(at({},t.defaultAdapter),n))||this;return i.observer=null,i}return it(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ka},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return wa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},attachResizeObserver:function(){return null},forceLayout:function(){},getWidth:function(){return 0},hasClass:function(){return!1},setBufferBarStyle:function(){return null},setPrimaryBarStyle:function(){return null},setStyle:function(){},removeAttribute:function(){},removeClass:function(){},setAttribute:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.isDeterminate=!this.adapter.hasClass(ka.INDETERMINATE_CLASS),this.adapter.addClass(ka.ANIMATION_READY_CLASS),this.isReversed=this.adapter.hasClass(ka.REVERSED_CLASS),this.progress=0,this.buffer=1,this.observer=this.adapter.attachResizeObserver((function(t){var n,i;if(!e.isDeterminate)try{for(var a=rt(t),r=a.next();!r.done;r=a.next()){var o=r.value;o.contentRect&&e.calculateAndSetDimensions(o.contentRect.width)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}})),!this.isDeterminate&&this.observer&&this.calculateAndSetDimensions(this.adapter.getWidth())},t.prototype.setDeterminate=function(e){if(this.isDeterminate=e,this.isDeterminate)return this.adapter.removeClass(ka.INDETERMINATE_CLASS),this.adapter.setAttribute(wa.ARIA_VALUENOW,this.progress.toString()),this.adapter.setAttribute(wa.ARIA_VALUEMAX,"1"),this.adapter.setAttribute(wa.ARIA_VALUEMIN,"0"),this.setPrimaryBarProgress(this.progress),void this.setBufferBarProgress(this.buffer);this.isReversed&&(this.adapter.removeClass(ka.REVERSED_CLASS),this.adapter.forceLayout(),this.adapter.addClass(ka.REVERSED_CLASS)),this.observer&&this.calculateAndSetDimensions(this.adapter.getWidth()),this.adapter.addClass(ka.INDETERMINATE_CLASS),this.adapter.removeAttribute(wa.ARIA_VALUENOW),this.adapter.removeAttribute(wa.ARIA_VALUEMAX),this.adapter.removeAttribute(wa.ARIA_VALUEMIN),this.setPrimaryBarProgress(1),this.setBufferBarProgress(1)},t.prototype.getDeterminate=function(){return this.isDeterminate},t.prototype.setProgress=function(e){this.progress=e,this.isDeterminate&&(this.setPrimaryBarProgress(e),this.adapter.setAttribute(wa.ARIA_VALUENOW,e.toString()))},t.prototype.getProgress=function(){return this.progress},t.prototype.setBuffer=function(e){this.buffer=e,this.isDeterminate&&this.setBufferBarProgress(e)},t.prototype.setReverse=function(e){this.isReversed=e,this.isDeterminate||this.restartAnimation(),this.isReversed?this.adapter.addClass(ka.REVERSED_CLASS):this.adapter.removeClass(ka.REVERSED_CLASS)},t.prototype.open=function(){this.adapter.removeClass(ka.CLOSED_CLASS),this.adapter.removeClass(ka.CLOSED_ANIMATION_OFF_CLASS)},t.prototype.close=function(){this.adapter.addClass(ka.CLOSED_CLASS)},t.prototype.handleTransitionEnd=function(){this.adapter.hasClass(ka.CLOSED_CLASS)&&this.adapter.addClass(ka.CLOSED_ANIMATION_OFF_CLASS)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.observer&&this.observer.disconnect()},t.prototype.setPrimaryBarProgress=function(e){var t="scaleX("+e+")",n="undefined"!=typeof window?rn(window,"transform"):"transform";this.adapter.setPrimaryBarStyle(n,t)},t.prototype.setBufferBarProgress=function(e){var t=100*e+"%";this.adapter.setBufferBarStyle(wa.FLEX_BASIS,t)},t.prototype.restartAnimation=function(){this.adapter.removeClass(ka.ANIMATION_READY_CLASS),this.adapter.forceLayout(),this.adapter.addClass(ka.ANIMATION_READY_CLASS)},t.prototype.calculateAndSetDimensions=function(e){var t=.8367142*e,n=2.00611057*e,i=.37651913*e,a=.84386165*e,r=1.60277782*e;this.adapter.setStyle("--mdc-linear-progress-primary-half",t+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-half-neg",-t+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-full",n+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-full-neg",-n+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-quarter",i+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-quarter-neg",-i+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-half",a+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-half-neg",-a+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-full",r+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-full-neg",-r+"px"),this.restartAnimation()},t}(dt),La=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return it(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"determinate",{set:function(e){this.foundation.setDeterminate(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"progress",{set:function(e){this.foundation.setProgress(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{set:function(e){this.foundation.setBuffer(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reverse",{set:function(e){this.foundation.setReverse(e)},enumerable:!0,configurable:!0}),t.prototype.open=function(){this.foundation.open()},t.prototype.close=function(){this.foundation.close()},t.prototype.initialSyncWithDOM=function(){var e=this;this.root.addEventListener("transitionend",(function(){e.foundation.handleTransitionEnd()}))},t.prototype.getDefaultFoundation=function(){var e=this;return new Ma({addClass:function(t){e.root.classList.add(t)},forceLayout:function(){e.root.getBoundingClientRect()},setBufferBarStyle:function(t,n){var i=e.root.querySelector(Ma.strings.BUFFER_BAR_SELECTOR);i&&i.style.setProperty(t,n)},setPrimaryBarStyle:function(t,n){var i=e.root.querySelector(Ma.strings.PRIMARY_BAR_SELECTOR);i&&i.style.setProperty(t,n)},hasClass:function(t){return e.root.classList.contains(t)},removeAttribute:function(t){e.root.removeAttribute(t)},removeClass:function(t){e.root.classList.remove(t)},setAttribute:function(t,n){e.root.setAttribute(t,n)},setStyle:function(t,n){e.root.style.setProperty(t,n)},attachResizeObserver:function(t){if(window.ResizeObserver){var n=new ResizeObserver(t);return n.observe(e.root),n}return null},getWidth:function(){return e.root.offsetWidth}})},t}(lt),Ta="mdc-data-table__content",Ea="mdc-data-table__header-cell--sorted",Ya="mdc-data-table__header-cell--sorted-descending",Sa="mdc-data-table__header-row",Da="mdc-data-table--in-progress",Aa="mdc-data-table__row--selected",Ca="data-row-id",Ia={CONTENT:"."+Ta,HEADER_CELL:".mdc-data-table__header-cell",HEADER_CELL_WITH_SORT:".mdc-data-table__header-cell--with-sort",HEADER_ROW:"."+Sa,HEADER_ROW_CHECKBOX:".mdc-data-table__header-row-checkbox",PROGRESS_INDICATOR:".mdc-data-table__progress-indicator",ROW:".mdc-data-table__row",ROW_CHECKBOX:".mdc-data-table__row-checkbox",ROW_SELECTED:"."+Aa,SORT_ICON_BUTTON:".mdc-data-table__sort-icon-button",SORT_STATUS_LABEL:".mdc-data-table__sort-status-label"},Oa="aria-selected",Ra="aria-sort";!function(e){e.ASCENDING="ascending",e.DESCENDING="descending",e.NONE="none",e.OTHER="other"}(va||(va={}));var Ha=function(e){function t(n){return e.call(this,at(at({},t.defaultAdapter),n))||this}return it(t,e),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},addClassAtRowIndex:function(){},getAttributeByHeaderCellIndex:function(){return""},getHeaderCellCount:function(){return 0},getHeaderCellElements:function(){return[]},getRowCount:function(){return 0},getRowElements:function(){return[]},getRowIdAtIndex:function(){return""},getRowIndexByChildElement:function(){return 0},getSelectedRowCount:function(){return 0},getTableContainerHeight:function(){return 0},getTableHeaderHeight:function(){return 0},isCheckboxAtRowIndexChecked:function(){return!1},isHeaderRowCheckboxChecked:function(){return!1},isRowsSelectable:function(){return!1},notifyRowSelectionChanged:function(){},notifySelectedAll:function(){},notifySortAction:function(){},notifyUnselectedAll:function(){},registerHeaderRowCheckbox:function(){},registerRowCheckboxes:function(){},removeClass:function(){},removeClassAtRowIndex:function(){},removeClassNameByHeaderCellIndex:function(){},setAttributeAtRowIndex:function(){},setAttributeByHeaderCellIndex:function(){},setClassNameByHeaderCellIndex:function(){},setHeaderRowCheckboxChecked:function(){},setHeaderRowCheckboxIndeterminate:function(){},setProgressIndicatorStyles:function(){},setRowCheckboxCheckedAtIndex:function(){},setSortStatusLabelByHeaderCellIndex:function(){}}},enumerable:!0,configurable:!0}),t.prototype.layout=function(){this.adapter.isRowsSelectable()&&(this.adapter.registerHeaderRowCheckbox(),this.adapter.registerRowCheckboxes(),this.setHeaderRowCheckboxState())},t.prototype.layoutAsync=function(){return function(e,t,n,i){return new(n||(n=Promise))((function(a,r){function o(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}d((i=i.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){return function(e,t){var n,i,a,r,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=2&r[0]?i.return:r[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;switch(i=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,i=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){o.label=r[1];break}if(6===r[0]&&o.label<a[1]){o.label=a[1],a=r;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(r);break}a[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],i=0}finally{n=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}(this,(function(e){switch(e.label){case 0:return this.adapter.isRowsSelectable()?[4,this.adapter.registerHeaderRowCheckbox()]:[3,3];case 1:return e.sent(),[4,this.adapter.registerRowCheckboxes()];case 2:e.sent(),this.setHeaderRowCheckboxState(),e.label=3;case 3:return[2]}}))}))},t.prototype.getRows=function(){return this.adapter.getRowElements()},t.prototype.getHeaderCells=function(){return this.adapter.getHeaderCellElements()},t.prototype.setSelectedRowIds=function(e){for(var t=0;t<this.adapter.getRowCount();t++){var n=this.adapter.getRowIdAtIndex(t),i=!1;n&&e.indexOf(n)>=0&&(i=!0),this.adapter.setRowCheckboxCheckedAtIndex(t,i),this.selectRowAtIndex(t,i)}this.setHeaderRowCheckboxState()},t.prototype.getRowIds=function(){for(var e=[],t=0;t<this.adapter.getRowCount();t++)e.push(this.adapter.getRowIdAtIndex(t));return e},t.prototype.getSelectedRowIds=function(){for(var e=[],t=0;t<this.adapter.getRowCount();t++)this.adapter.isCheckboxAtRowIndexChecked(t)&&e.push(this.adapter.getRowIdAtIndex(t));return e},t.prototype.handleHeaderRowCheckboxChange=function(){for(var e=this.adapter.isHeaderRowCheckboxChecked(),t=0;t<this.adapter.getRowCount();t++)this.adapter.setRowCheckboxCheckedAtIndex(t,e),this.selectRowAtIndex(t,e);e?this.adapter.notifySelectedAll():this.adapter.notifyUnselectedAll()},t.prototype.handleRowCheckboxChange=function(e){var t=this.adapter.getRowIndexByChildElement(e.target);if(-1!==t){var n=this.adapter.isCheckboxAtRowIndexChecked(t);this.selectRowAtIndex(t,n),this.setHeaderRowCheckboxState();var i=this.adapter.getRowIdAtIndex(t);this.adapter.notifyRowSelectionChanged({rowId:i,rowIndex:t,selected:n})}},t.prototype.handleSortAction=function(e){for(var t=e.columnId,n=e.columnIndex,i=e.headerCell,a=0;a<this.adapter.getHeaderCellCount();a++)a!==n&&(this.adapter.removeClassNameByHeaderCellIndex(a,Ea),this.adapter.removeClassNameByHeaderCellIndex(a,Ya),this.adapter.setAttributeByHeaderCellIndex(a,Ra,va.NONE),this.adapter.setSortStatusLabelByHeaderCellIndex(a,va.NONE));this.adapter.setClassNameByHeaderCellIndex(n,Ea);var r=this.adapter.getAttributeByHeaderCellIndex(n,Ra),o=va.NONE;r===va.ASCENDING?(this.adapter.setClassNameByHeaderCellIndex(n,Ya),this.adapter.setAttributeByHeaderCellIndex(n,Ra,va.DESCENDING),o=va.DESCENDING):r===va.DESCENDING?(this.adapter.removeClassNameByHeaderCellIndex(n,Ya),this.adapter.setAttributeByHeaderCellIndex(n,Ra,va.ASCENDING),o=va.ASCENDING):(this.adapter.setAttributeByHeaderCellIndex(n,Ra,va.ASCENDING),o=va.ASCENDING),this.adapter.setSortStatusLabelByHeaderCellIndex(n,o),this.adapter.notifySortAction({columnId:t,columnIndex:n,headerCell:i,sortValue:o})},t.prototype.showProgress=function(){var e=this.adapter.getTableHeaderHeight(),t=this.adapter.getTableContainerHeight()-e,n=e;this.adapter.setProgressIndicatorStyles({height:t+"px",top:n+"px"}),this.adapter.addClass(Da)},t.prototype.hideProgress=function(){this.adapter.removeClass(Da)},t.prototype.setHeaderRowCheckboxState=function(){0===this.adapter.getSelectedRowCount()?(this.adapter.setHeaderRowCheckboxChecked(!1),this.adapter.setHeaderRowCheckboxIndeterminate(!1)):this.adapter.getSelectedRowCount()===this.adapter.getRowCount()?(this.adapter.setHeaderRowCheckboxChecked(!0),this.adapter.setHeaderRowCheckboxIndeterminate(!1)):(this.adapter.setHeaderRowCheckboxIndeterminate(!0),this.adapter.setHeaderRowCheckboxChecked(!1))},t.prototype.selectRowAtIndex=function(e,t){t?(this.adapter.addClassAtRowIndex(e,Aa),this.adapter.setAttributeAtRowIndex(e,Oa,"true")):(this.adapter.removeClassAtRowIndex(e,Aa),this.adapter.setAttributeAtRowIndex(e,Oa,"false"))},t}(dt),Na=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return it(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e){void 0===e&&(e=function(e){return new un(e)}),this.checkboxFactory=e},t.prototype.initialSyncWithDOM=function(){var e=this;this.headerRow=this.root.querySelector("."+Sa),this.handleHeaderRowCheckboxChange=function(){e.foundation.handleHeaderRowCheckboxChange()},this.headerRow.addEventListener("change",this.handleHeaderRowCheckboxChange),this.headerRowClickListener=function(t){e.handleHeaderRowClick(t)},this.headerRow.addEventListener("click",this.headerRowClickListener),this.content=this.root.querySelector("."+Ta),this.handleRowCheckboxChange=function(t){e.foundation.handleRowCheckboxChange(t)},this.content.addEventListener("change",this.handleRowCheckboxChange),this.layout()},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getHeaderCells=function(){return[].slice.call(this.root.querySelectorAll(Ia.HEADER_CELL))},t.prototype.getRows=function(){return this.foundation.getRows()},t.prototype.getSelectedRowIds=function(){return this.foundation.getSelectedRowIds()},t.prototype.setSelectedRowIds=function(e){this.foundation.setSelectedRowIds(e)},t.prototype.showProgress=function(){this.getLinearProgress().open(),this.foundation.showProgress()},t.prototype.hideProgress=function(){this.foundation.hideProgress(),this.getLinearProgress().close()},t.prototype.destroy=function(){var e,t;if(this.handleHeaderRowCheckboxChange&&this.headerRow.removeEventListener("change",this.handleHeaderRowCheckboxChange),this.headerRowClickListener&&this.headerRow.removeEventListener("click",this.headerRowClickListener),this.handleRowCheckboxChange&&this.content.removeEventListener("change",this.handleRowCheckboxChange),this.headerRowCheckbox&&this.headerRowCheckbox.destroy(),this.rowCheckboxList)try{for(var n=rt(this.rowCheckboxList),i=n.next();!i.done;i=n.next())i.value.destroy()}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},t.prototype.getDefaultFoundation=function(){var e=this;return new Ha({addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},getHeaderCellElements:function(){return e.getHeaderCells()},getHeaderCellCount:function(){return e.getHeaderCells().length},getAttributeByHeaderCellIndex:function(t,n){return e.getHeaderCells()[t].getAttribute(n)},setAttributeByHeaderCellIndex:function(t,n,i){e.getHeaderCells()[t].setAttribute(n,i)},setClassNameByHeaderCellIndex:function(t,n){e.getHeaderCells()[t].classList.add(n)},removeClassNameByHeaderCellIndex:function(t,n){e.getHeaderCells()[t].classList.remove(n)},notifySortAction:function(t){e.emit("MDCDataTable:sorted",t,!0)},getTableContainerHeight:function(){var t=e.root.querySelector(".mdc-data-table__table-container");if(!t)throw new Error("MDCDataTable: Table container element not found.");return t.getBoundingClientRect().height},getTableHeaderHeight:function(){var t=e.root.querySelector(Ia.HEADER_ROW);if(!t)throw new Error("MDCDataTable: Table header element not found.");return t.getBoundingClientRect().height},setProgressIndicatorStyles:function(t){var n=e.root.querySelector(Ia.PROGRESS_INDICATOR);if(!n)throw new Error("MDCDataTable: Progress indicator element not found.");n.style.setProperty("height",t.height),n.style.setProperty("top",t.top)},addClassAtRowIndex:function(t,n){e.getRows()[t].classList.add(n)},getRowCount:function(){return e.getRows().length},getRowElements:function(){return[].slice.call(e.root.querySelectorAll(Ia.ROW))},getRowIdAtIndex:function(t){return e.getRows()[t].getAttribute(Ca)},getRowIndexByChildElement:function(t){return e.getRows().indexOf(mt(t,Ia.ROW))},getSelectedRowCount:function(){return e.root.querySelectorAll(Ia.ROW_SELECTED).length},isCheckboxAtRowIndexChecked:function(t){return e.rowCheckboxList[t].checked},isHeaderRowCheckboxChecked:function(){return e.headerRowCheckbox.checked},isRowsSelectable:function(){return!!e.root.querySelector(Ia.ROW_CHECKBOX)||!!e.root.querySelector(Ia.HEADER_ROW_CHECKBOX)},notifyRowSelectionChanged:function(t){e.emit("MDCDataTable:rowSelectionChanged",{row:e.getRowByIndex(t.rowIndex),rowId:e.getRowIdByIndex(t.rowIndex),rowIndex:t.rowIndex,selected:t.selected},!0)},notifySelectedAll:function(){e.emit("MDCDataTable:selectedAll",{},!0)},notifyUnselectedAll:function(){e.emit("MDCDataTable:unselectedAll",{},!0)},registerHeaderRowCheckbox:function(){e.headerRowCheckbox&&e.headerRowCheckbox.destroy();var t=e.root.querySelector(Ia.HEADER_ROW_CHECKBOX);e.headerRowCheckbox=e.checkboxFactory(t)},registerRowCheckboxes:function(){e.rowCheckboxList&&e.rowCheckboxList.forEach((function(e){e.destroy()})),e.rowCheckboxList=[],e.getRows().forEach((function(t){var n=e.checkboxFactory(t.querySelector(Ia.ROW_CHECKBOX));e.rowCheckboxList.push(n)}))},removeClassAtRowIndex:function(t,n){e.getRows()[t].classList.remove(n)},setAttributeAtRowIndex:function(t,n,i){e.getRows()[t].setAttribute(n,i)},setHeaderRowCheckboxChecked:function(t){e.headerRowCheckbox.checked=t},setHeaderRowCheckboxIndeterminate:function(t){e.headerRowCheckbox.indeterminate=t},setRowCheckboxCheckedAtIndex:function(t,n){e.rowCheckboxList[t].checked=n},setSortStatusLabelByHeaderCellIndex:function(t,n){var i=e.getHeaderCells()[t].querySelector(Ia.SORT_STATUS_LABEL);i&&(i.textContent=e.getSortStatusMessageBySortValue(n))}})},t.prototype.getRowByIndex=function(e){return this.getRows()[e]},t.prototype.getRowIdByIndex=function(e){return this.getRowByIndex(e).getAttribute(Ca)},t.prototype.handleHeaderRowClick=function(e){var t=mt(e.target,Ia.HEADER_CELL_WITH_SORT);if(t){var n=t.getAttribute("data-column-id"),i=this.getHeaderCells().indexOf(t);-1!==i&&this.foundation.handleSortAction({columnId:n,columnIndex:i,headerCell:t})}},t.prototype.getSortStatusMessageBySortValue=function(e){switch(e){case va.ASCENDING:return"Sorted in ascending order";case va.DESCENDING:return"Sorted in descending order";default:return""}},t.prototype.getLinearProgressElement=function(){var e=this.root.querySelector(".mdc-data-table__linear-progress");if(!e)throw new Error("MDCDataTable: linear progress element is not found.");return e},t.prototype.getLinearProgress=function(){if(!this.linearProgress){var e=this.getLinearProgressElement();this.linearProgress=new La(e)}return this.linearProgress},t}(lt),Pa=l(6104),ja=l.n(Pa),za=function(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},Fa=function(e,t,n,i){return new(n||(n=Promise))((function(a,r){function o(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}d((i=i.apply(e,t||[])).next())}))};const $a=l(1896),Ua=me`
497
+ `}setCustomValidity(e){this.errorMessage=e;const t=this.shadowRoot.getElementById("elem");t&&t.setCustomValidity&&t.setCustomValidity(null!=e?e:""),this.reportValidity()}checkValidity(){const e=this.shadowRoot.getElementById("elem");let t=!0;return e&&e.validity&&(t=e.validity.valid),!t||this.type!==ha.JSON&&this.type!==ha.JSON_OBJECT||void 0!==this.value&&null!==this.value&&""===this._mdcComponent.value&&(t=!1),t}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,this._mdcComponent&&(this._mdcComponent.valid=e),e}onValueChange(e,t,n){var i,a;let r,o=this.value;if("undefined"===t&&(o=null,t=void 0),"null"===t&&(o=void 0,t=null),"string"==typeof t)switch(this.type){case ha.CHECKBOX:case ha.SWITCH:t="on"===t;break;case ha.JSON:case ha.JSON_OBJECT:case ha.NUMBER:case ha.RANGE:if(""===t)t=null;else try{t=JSON.parse(t),this.type!==ha.JSON_OBJECT||"object"==typeof t&&!Array.isArray(t)||(t=this.value,r=Pi.i18next.t("validation.invalidJSON"))}catch(e){t=this.value,r=this.type===ha.JSON||this.type==ha.JSON_OBJECT?Pi.i18next.t("validation.invalidJSON"):Pi.i18next.t("validation.invalidNumber")}break;case ha.DATETIME:if(""===t)t=null;else try{t=Date.parse(t)}catch(e){t=this.value,r=Pi.i18next.t("validation.invalidDate")}}if(this.value=t,this.setCustomValidity(r),this.reportValidity(),this.type!==ha.CHECKBOX_LIST&&t!==o&&(this.type===ha.RANGE&&(this._mdcComponent.setValue(t),this._mdcComponent2&&(this._mdcComponent2.value=t)),this.dispatchEvent(new pa(this.value,o,n))),null!=this.searchProvider&&this.type===ha.SELECT){const e=null===(a=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById("select-searchable"))||void 0===a?void 0:a.children[1];e&&(this.searchableValue=void 0,e.value="")}this.type!==ha.CHECKBOX_LIST||Ii.Util.objectsEqual(t,o,!0)||this.dispatchEvent(new pa(t,o,n))}get valid(){const e=this.shadowRoot.getElementById("elem");return!e||!e.checkValidity||e.checkValidity()}get currentValue(){const e=this.shadowRoot.getElementById("elem");if(e&&e.value)return e.value}resolveOptions(e){let t;return e&&e.length>0&&(t=e.map((e=>{if(Array.isArray(e))return e;{const t=""+e;return[e,Pi.i18next.t(t,{defaultValue:Ii.Util.camelCaseToSentenceCase(t)})]}}))),t}getSelectedTextValue(e){const t=this.value,n=Array.isArray(t)?t:null!=t?[t]:void 0;if(!n)return"";const i=e||this.resolveOptions(this.options);return i&&n?n.map((e=>i.find((([t,n],i)=>e===t)))).map((e=>e?e[1]:"")).join(", "):""}};qi([De({type:Boolean})],ya.prototype,"focused",void 0),qi([De()],ya.prototype,"value",void 0),qi([De({type:String})],ya.prototype,"type",void 0),qi([De({type:String})],ya.prototype,"name",void 0),qi([De({type:Boolean})],ya.prototype,"readonly",void 0),qi([De({type:Boolean})],ya.prototype,"required",void 0),qi([De()],ya.prototype,"max",void 0),qi([De()],ya.prototype,"min",void 0),qi([De({type:Number})],ya.prototype,"step",void 0),qi([De({type:Boolean})],ya.prototype,"checked",void 0),qi([De({type:Boolean})],ya.prototype,"indeterminate",void 0),qi([De({type:Number})],ya.prototype,"maxLength",void 0),qi([De({type:Number})],ya.prototype,"minLength",void 0),qi([De({type:Number})],ya.prototype,"rows",void 0),qi([De({type:Number})],ya.prototype,"cols",void 0),qi([De({type:Boolean})],ya.prototype,"multiple",void 0),qi([De({type:String,attribute:!0,reflect:!1})],ya.prototype,"pattern",void 0),qi([De({type:String})],ya.prototype,"placeHolder",void 0),qi([De({type:Array})],ya.prototype,"options",void 0),qi([De({type:Boolean})],ya.prototype,"autoSelect",void 0),qi([De({type:Object})],ya.prototype,"searchProvider",void 0),qi([De({type:String})],ya.prototype,"searchLabel",void 0),qi([De({type:String})],ya.prototype,"icon",void 0),qi([De({type:String})],ya.prototype,"iconColor",void 0),qi([De({type:String})],ya.prototype,"iconOn",void 0),qi([De({type:String})],ya.prototype,"iconTrailing",void 0),qi([De({type:Boolean})],ya.prototype,"compact",void 0),qi([De({type:Boolean})],ya.prototype,"comfortable",void 0),qi([De({type:Boolean})],ya.prototype,"raised",void 0),qi([De({type:Boolean})],ya.prototype,"action",void 0),qi([De({type:Boolean})],ya.prototype,"unElevated",void 0),qi([De({type:Boolean})],ya.prototype,"outlined",void 0),qi([De({type:Boolean})],ya.prototype,"rounded",void 0),qi([De({type:Object})],ya.prototype,"format",void 0),qi([De({type:Boolean})],ya.prototype,"disableSliderNumberInput",void 0),qi([De({type:Boolean})],ya.prototype,"fullWidth",void 0),qi([De({type:String})],ya.prototype,"helperText",void 0),qi([De({type:Boolean})],ya.prototype,"helperPersistent",void 0),qi([De({type:String,attribute:!0})],ya.prototype,"validationMessage",void 0),qi([De({type:Boolean})],ya.prototype,"autoValidate",void 0),qi([De({type:Boolean})],ya.prototype,"charCounter",void 0),qi([De({type:String})],ya.prototype,"label",void 0),qi([De({type:Boolean})],ya.prototype,"disabled",void 0),qi([De({type:Boolean})],ya.prototype,"continuous",void 0),qi([De({type:Boolean})],ya.prototype,"resizeVertical",void 0),qi([De({type:Boolean})],ya.prototype,"censored",void 0),qi([De({type:Boolean,reflect:!0})],ya.prototype,"advertised",void 0),qi([Ae()],ya.prototype,"isUiValid",void 0),qi([Ae()],ya.prototype,"searchableValue",void 0),qi([Ae()],ya.prototype,"errorMessage",void 0),ya=qi([Ee("or-mwc-input")],ya);var va,xa=l(1424),ka=(l(3344),l(1166),{CLOSED_CLASS:"mdc-linear-progress--closed",CLOSED_ANIMATION_OFF_CLASS:"mdc-linear-progress--closed-animation-off",INDETERMINATE_CLASS:"mdc-linear-progress--indeterminate",REVERSED_CLASS:"mdc-linear-progress--reversed",ANIMATION_READY_CLASS:"mdc-linear-progress--animation-ready"}),wa={ARIA_VALUEMAX:"aria-valuemax",ARIA_VALUEMIN:"aria-valuemin",ARIA_VALUENOW:"aria-valuenow",BUFFER_BAR_SELECTOR:".mdc-linear-progress__buffer-bar",FLEX_BASIS:"flex-basis",PRIMARY_BAR_SELECTOR:".mdc-linear-progress__primary-bar"},Ma=function(e){function t(n){var i=e.call(this,at(at({},t.defaultAdapter),n))||this;return i.observer=null,i}return it(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return ka},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return wa},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},attachResizeObserver:function(){return null},forceLayout:function(){},getWidth:function(){return 0},hasClass:function(){return!1},setBufferBarStyle:function(){return null},setPrimaryBarStyle:function(){return null},setStyle:function(){},removeAttribute:function(){},removeClass:function(){},setAttribute:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){var e=this;this.isDeterminate=!this.adapter.hasClass(ka.INDETERMINATE_CLASS),this.adapter.addClass(ka.ANIMATION_READY_CLASS),this.isReversed=this.adapter.hasClass(ka.REVERSED_CLASS),this.progress=0,this.buffer=1,this.observer=this.adapter.attachResizeObserver((function(t){var n,i;if(!e.isDeterminate)try{for(var a=rt(t),r=a.next();!r.done;r=a.next()){var o=r.value;o.contentRect&&e.calculateAndSetDimensions(o.contentRect.width)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}})),!this.isDeterminate&&this.observer&&this.calculateAndSetDimensions(this.adapter.getWidth())},t.prototype.setDeterminate=function(e){if(this.isDeterminate=e,this.isDeterminate)return this.adapter.removeClass(ka.INDETERMINATE_CLASS),this.adapter.setAttribute(wa.ARIA_VALUENOW,this.progress.toString()),this.adapter.setAttribute(wa.ARIA_VALUEMAX,"1"),this.adapter.setAttribute(wa.ARIA_VALUEMIN,"0"),this.setPrimaryBarProgress(this.progress),void this.setBufferBarProgress(this.buffer);this.isReversed&&(this.adapter.removeClass(ka.REVERSED_CLASS),this.adapter.forceLayout(),this.adapter.addClass(ka.REVERSED_CLASS)),this.observer&&this.calculateAndSetDimensions(this.adapter.getWidth()),this.adapter.addClass(ka.INDETERMINATE_CLASS),this.adapter.removeAttribute(wa.ARIA_VALUENOW),this.adapter.removeAttribute(wa.ARIA_VALUEMAX),this.adapter.removeAttribute(wa.ARIA_VALUEMIN),this.setPrimaryBarProgress(1),this.setBufferBarProgress(1)},t.prototype.getDeterminate=function(){return this.isDeterminate},t.prototype.setProgress=function(e){this.progress=e,this.isDeterminate&&(this.setPrimaryBarProgress(e),this.adapter.setAttribute(wa.ARIA_VALUENOW,e.toString()))},t.prototype.getProgress=function(){return this.progress},t.prototype.setBuffer=function(e){this.buffer=e,this.isDeterminate&&this.setBufferBarProgress(e)},t.prototype.setReverse=function(e){this.isReversed=e,this.isDeterminate||this.restartAnimation(),this.isReversed?this.adapter.addClass(ka.REVERSED_CLASS):this.adapter.removeClass(ka.REVERSED_CLASS)},t.prototype.open=function(){this.adapter.removeClass(ka.CLOSED_CLASS),this.adapter.removeClass(ka.CLOSED_ANIMATION_OFF_CLASS)},t.prototype.close=function(){this.adapter.addClass(ka.CLOSED_CLASS)},t.prototype.handleTransitionEnd=function(){this.adapter.hasClass(ka.CLOSED_CLASS)&&this.adapter.addClass(ka.CLOSED_ANIMATION_OFF_CLASS)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.observer&&this.observer.disconnect()},t.prototype.setPrimaryBarProgress=function(e){var t="scaleX("+e+")",n="undefined"!=typeof window?rn(window,"transform"):"transform";this.adapter.setPrimaryBarStyle(n,t)},t.prototype.setBufferBarProgress=function(e){var t=100*e+"%";this.adapter.setBufferBarStyle(wa.FLEX_BASIS,t)},t.prototype.restartAnimation=function(){this.adapter.removeClass(ka.ANIMATION_READY_CLASS),this.adapter.forceLayout(),this.adapter.addClass(ka.ANIMATION_READY_CLASS)},t.prototype.calculateAndSetDimensions=function(e){var t=.8367142*e,n=2.00611057*e,i=.37651913*e,a=.84386165*e,r=1.60277782*e;this.adapter.setStyle("--mdc-linear-progress-primary-half",t+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-half-neg",-t+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-full",n+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-full-neg",-n+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-quarter",i+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-quarter-neg",-i+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-half",a+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-half-neg",-a+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-full",r+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-full-neg",-r+"px"),this.restartAnimation()},t}(dt),La=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return it(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"determinate",{set:function(e){this.foundation.setDeterminate(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"progress",{set:function(e){this.foundation.setProgress(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{set:function(e){this.foundation.setBuffer(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reverse",{set:function(e){this.foundation.setReverse(e)},enumerable:!0,configurable:!0}),t.prototype.open=function(){this.foundation.open()},t.prototype.close=function(){this.foundation.close()},t.prototype.initialSyncWithDOM=function(){var e=this;this.root.addEventListener("transitionend",(function(){e.foundation.handleTransitionEnd()}))},t.prototype.getDefaultFoundation=function(){var e=this;return new Ma({addClass:function(t){e.root.classList.add(t)},forceLayout:function(){e.root.getBoundingClientRect()},setBufferBarStyle:function(t,n){var i=e.root.querySelector(Ma.strings.BUFFER_BAR_SELECTOR);i&&i.style.setProperty(t,n)},setPrimaryBarStyle:function(t,n){var i=e.root.querySelector(Ma.strings.PRIMARY_BAR_SELECTOR);i&&i.style.setProperty(t,n)},hasClass:function(t){return e.root.classList.contains(t)},removeAttribute:function(t){e.root.removeAttribute(t)},removeClass:function(t){e.root.classList.remove(t)},setAttribute:function(t,n){e.root.setAttribute(t,n)},setStyle:function(t,n){e.root.style.setProperty(t,n)},attachResizeObserver:function(t){if(window.ResizeObserver){var n=new ResizeObserver(t);return n.observe(e.root),n}return null},getWidth:function(){return e.root.offsetWidth}})},t}(lt),Ta="mdc-data-table__content",Ea="mdc-data-table__header-cell--sorted",Ya="mdc-data-table__header-cell--sorted-descending",Sa="mdc-data-table__header-row",Da="mdc-data-table--in-progress",Aa="mdc-data-table__row--selected",Ca="data-row-id",Ia={CONTENT:"."+Ta,HEADER_CELL:".mdc-data-table__header-cell",HEADER_CELL_WITH_SORT:".mdc-data-table__header-cell--with-sort",HEADER_ROW:"."+Sa,HEADER_ROW_CHECKBOX:".mdc-data-table__header-row-checkbox",PROGRESS_INDICATOR:".mdc-data-table__progress-indicator",ROW:".mdc-data-table__row",ROW_CHECKBOX:".mdc-data-table__row-checkbox",ROW_SELECTED:"."+Aa,SORT_ICON_BUTTON:".mdc-data-table__sort-icon-button",SORT_STATUS_LABEL:".mdc-data-table__sort-status-label"},Oa="aria-selected",Ra="aria-sort";!function(e){e.ASCENDING="ascending",e.DESCENDING="descending",e.NONE="none",e.OTHER="other"}(va||(va={}));var Ha=function(e){function t(n){return e.call(this,at(at({},t.defaultAdapter),n))||this}return it(t,e),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},addClassAtRowIndex:function(){},getAttributeByHeaderCellIndex:function(){return""},getHeaderCellCount:function(){return 0},getHeaderCellElements:function(){return[]},getRowCount:function(){return 0},getRowElements:function(){return[]},getRowIdAtIndex:function(){return""},getRowIndexByChildElement:function(){return 0},getSelectedRowCount:function(){return 0},getTableContainerHeight:function(){return 0},getTableHeaderHeight:function(){return 0},isCheckboxAtRowIndexChecked:function(){return!1},isHeaderRowCheckboxChecked:function(){return!1},isRowsSelectable:function(){return!1},notifyRowSelectionChanged:function(){},notifySelectedAll:function(){},notifySortAction:function(){},notifyUnselectedAll:function(){},registerHeaderRowCheckbox:function(){},registerRowCheckboxes:function(){},removeClass:function(){},removeClassAtRowIndex:function(){},removeClassNameByHeaderCellIndex:function(){},setAttributeAtRowIndex:function(){},setAttributeByHeaderCellIndex:function(){},setClassNameByHeaderCellIndex:function(){},setHeaderRowCheckboxChecked:function(){},setHeaderRowCheckboxIndeterminate:function(){},setProgressIndicatorStyles:function(){},setRowCheckboxCheckedAtIndex:function(){},setSortStatusLabelByHeaderCellIndex:function(){}}},enumerable:!0,configurable:!0}),t.prototype.layout=function(){this.adapter.isRowsSelectable()&&(this.adapter.registerHeaderRowCheckbox(),this.adapter.registerRowCheckboxes(),this.setHeaderRowCheckboxState())},t.prototype.layoutAsync=function(){return function(e,t,n,i){return new(n||(n=Promise))((function(a,r){function o(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}d((i=i.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){return function(e,t){var n,i,a,r,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(a=2&r[0]?i.return:r[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;switch(i=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,i=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){o.label=r[1];break}if(6===r[0]&&o.label<a[1]){o.label=a[1],a=r;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(r);break}a[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],i=0}finally{n=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}(this,(function(e){switch(e.label){case 0:return this.adapter.isRowsSelectable()?[4,this.adapter.registerHeaderRowCheckbox()]:[3,3];case 1:return e.sent(),[4,this.adapter.registerRowCheckboxes()];case 2:e.sent(),this.setHeaderRowCheckboxState(),e.label=3;case 3:return[2]}}))}))},t.prototype.getRows=function(){return this.adapter.getRowElements()},t.prototype.getHeaderCells=function(){return this.adapter.getHeaderCellElements()},t.prototype.setSelectedRowIds=function(e){for(var t=0;t<this.adapter.getRowCount();t++){var n=this.adapter.getRowIdAtIndex(t),i=!1;n&&e.indexOf(n)>=0&&(i=!0),this.adapter.setRowCheckboxCheckedAtIndex(t,i),this.selectRowAtIndex(t,i)}this.setHeaderRowCheckboxState()},t.prototype.getRowIds=function(){for(var e=[],t=0;t<this.adapter.getRowCount();t++)e.push(this.adapter.getRowIdAtIndex(t));return e},t.prototype.getSelectedRowIds=function(){for(var e=[],t=0;t<this.adapter.getRowCount();t++)this.adapter.isCheckboxAtRowIndexChecked(t)&&e.push(this.adapter.getRowIdAtIndex(t));return e},t.prototype.handleHeaderRowCheckboxChange=function(){for(var e=this.adapter.isHeaderRowCheckboxChecked(),t=0;t<this.adapter.getRowCount();t++)this.adapter.setRowCheckboxCheckedAtIndex(t,e),this.selectRowAtIndex(t,e);e?this.adapter.notifySelectedAll():this.adapter.notifyUnselectedAll()},t.prototype.handleRowCheckboxChange=function(e){var t=this.adapter.getRowIndexByChildElement(e.target);if(-1!==t){var n=this.adapter.isCheckboxAtRowIndexChecked(t);this.selectRowAtIndex(t,n),this.setHeaderRowCheckboxState();var i=this.adapter.getRowIdAtIndex(t);this.adapter.notifyRowSelectionChanged({rowId:i,rowIndex:t,selected:n})}},t.prototype.handleSortAction=function(e){for(var t=e.columnId,n=e.columnIndex,i=e.headerCell,a=0;a<this.adapter.getHeaderCellCount();a++)a!==n&&(this.adapter.removeClassNameByHeaderCellIndex(a,Ea),this.adapter.removeClassNameByHeaderCellIndex(a,Ya),this.adapter.setAttributeByHeaderCellIndex(a,Ra,va.NONE),this.adapter.setSortStatusLabelByHeaderCellIndex(a,va.NONE));this.adapter.setClassNameByHeaderCellIndex(n,Ea);var r=this.adapter.getAttributeByHeaderCellIndex(n,Ra),o=va.NONE;r===va.ASCENDING?(this.adapter.setClassNameByHeaderCellIndex(n,Ya),this.adapter.setAttributeByHeaderCellIndex(n,Ra,va.DESCENDING),o=va.DESCENDING):r===va.DESCENDING?(this.adapter.removeClassNameByHeaderCellIndex(n,Ya),this.adapter.setAttributeByHeaderCellIndex(n,Ra,va.ASCENDING),o=va.ASCENDING):(this.adapter.setAttributeByHeaderCellIndex(n,Ra,va.ASCENDING),o=va.ASCENDING),this.adapter.setSortStatusLabelByHeaderCellIndex(n,o),this.adapter.notifySortAction({columnId:t,columnIndex:n,headerCell:i,sortValue:o})},t.prototype.showProgress=function(){var e=this.adapter.getTableHeaderHeight(),t=this.adapter.getTableContainerHeight()-e,n=e;this.adapter.setProgressIndicatorStyles({height:t+"px",top:n+"px"}),this.adapter.addClass(Da)},t.prototype.hideProgress=function(){this.adapter.removeClass(Da)},t.prototype.setHeaderRowCheckboxState=function(){0===this.adapter.getSelectedRowCount()?(this.adapter.setHeaderRowCheckboxChecked(!1),this.adapter.setHeaderRowCheckboxIndeterminate(!1)):this.adapter.getSelectedRowCount()===this.adapter.getRowCount()?(this.adapter.setHeaderRowCheckboxChecked(!0),this.adapter.setHeaderRowCheckboxIndeterminate(!1)):(this.adapter.setHeaderRowCheckboxIndeterminate(!0),this.adapter.setHeaderRowCheckboxChecked(!1))},t.prototype.selectRowAtIndex=function(e,t){t?(this.adapter.addClassAtRowIndex(e,Aa),this.adapter.setAttributeAtRowIndex(e,Oa,"true")):(this.adapter.removeClassAtRowIndex(e,Aa),this.adapter.setAttributeAtRowIndex(e,Oa,"false"))},t}(dt),Na=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return it(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e){void 0===e&&(e=function(e){return new un(e)}),this.checkboxFactory=e},t.prototype.initialSyncWithDOM=function(){var e=this;this.headerRow=this.root.querySelector("."+Sa),this.handleHeaderRowCheckboxChange=function(){e.foundation.handleHeaderRowCheckboxChange()},this.headerRow.addEventListener("change",this.handleHeaderRowCheckboxChange),this.headerRowClickListener=function(t){e.handleHeaderRowClick(t)},this.headerRow.addEventListener("click",this.headerRowClickListener),this.content=this.root.querySelector("."+Ta),this.handleRowCheckboxChange=function(t){e.foundation.handleRowCheckboxChange(t)},this.content.addEventListener("change",this.handleRowCheckboxChange),this.layout()},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getHeaderCells=function(){return[].slice.call(this.root.querySelectorAll(Ia.HEADER_CELL))},t.prototype.getRows=function(){return this.foundation.getRows()},t.prototype.getSelectedRowIds=function(){return this.foundation.getSelectedRowIds()},t.prototype.setSelectedRowIds=function(e){this.foundation.setSelectedRowIds(e)},t.prototype.showProgress=function(){this.getLinearProgress().open(),this.foundation.showProgress()},t.prototype.hideProgress=function(){this.foundation.hideProgress(),this.getLinearProgress().close()},t.prototype.destroy=function(){var e,t;if(this.handleHeaderRowCheckboxChange&&this.headerRow.removeEventListener("change",this.handleHeaderRowCheckboxChange),this.headerRowClickListener&&this.headerRow.removeEventListener("click",this.headerRowClickListener),this.handleRowCheckboxChange&&this.content.removeEventListener("change",this.handleRowCheckboxChange),this.headerRowCheckbox&&this.headerRowCheckbox.destroy(),this.rowCheckboxList)try{for(var n=rt(this.rowCheckboxList),i=n.next();!i.done;i=n.next())i.value.destroy()}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},t.prototype.getDefaultFoundation=function(){var e=this;return new Ha({addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},getHeaderCellElements:function(){return e.getHeaderCells()},getHeaderCellCount:function(){return e.getHeaderCells().length},getAttributeByHeaderCellIndex:function(t,n){return e.getHeaderCells()[t].getAttribute(n)},setAttributeByHeaderCellIndex:function(t,n,i){e.getHeaderCells()[t].setAttribute(n,i)},setClassNameByHeaderCellIndex:function(t,n){e.getHeaderCells()[t].classList.add(n)},removeClassNameByHeaderCellIndex:function(t,n){e.getHeaderCells()[t].classList.remove(n)},notifySortAction:function(t){e.emit("MDCDataTable:sorted",t,!0)},getTableContainerHeight:function(){var t=e.root.querySelector(".mdc-data-table__table-container");if(!t)throw new Error("MDCDataTable: Table container element not found.");return t.getBoundingClientRect().height},getTableHeaderHeight:function(){var t=e.root.querySelector(Ia.HEADER_ROW);if(!t)throw new Error("MDCDataTable: Table header element not found.");return t.getBoundingClientRect().height},setProgressIndicatorStyles:function(t){var n=e.root.querySelector(Ia.PROGRESS_INDICATOR);if(!n)throw new Error("MDCDataTable: Progress indicator element not found.");n.style.setProperty("height",t.height),n.style.setProperty("top",t.top)},addClassAtRowIndex:function(t,n){e.getRows()[t].classList.add(n)},getRowCount:function(){return e.getRows().length},getRowElements:function(){return[].slice.call(e.root.querySelectorAll(Ia.ROW))},getRowIdAtIndex:function(t){return e.getRows()[t].getAttribute(Ca)},getRowIndexByChildElement:function(t){return e.getRows().indexOf(mt(t,Ia.ROW))},getSelectedRowCount:function(){return e.root.querySelectorAll(Ia.ROW_SELECTED).length},isCheckboxAtRowIndexChecked:function(t){return e.rowCheckboxList[t].checked},isHeaderRowCheckboxChecked:function(){return e.headerRowCheckbox.checked},isRowsSelectable:function(){return!!e.root.querySelector(Ia.ROW_CHECKBOX)||!!e.root.querySelector(Ia.HEADER_ROW_CHECKBOX)},notifyRowSelectionChanged:function(t){e.emit("MDCDataTable:rowSelectionChanged",{row:e.getRowByIndex(t.rowIndex),rowId:e.getRowIdByIndex(t.rowIndex),rowIndex:t.rowIndex,selected:t.selected},!0)},notifySelectedAll:function(){e.emit("MDCDataTable:selectedAll",{},!0)},notifyUnselectedAll:function(){e.emit("MDCDataTable:unselectedAll",{},!0)},registerHeaderRowCheckbox:function(){e.headerRowCheckbox&&e.headerRowCheckbox.destroy();var t=e.root.querySelector(Ia.HEADER_ROW_CHECKBOX);e.headerRowCheckbox=e.checkboxFactory(t)},registerRowCheckboxes:function(){e.rowCheckboxList&&e.rowCheckboxList.forEach((function(e){e.destroy()})),e.rowCheckboxList=[],e.getRows().forEach((function(t){var n=e.checkboxFactory(t.querySelector(Ia.ROW_CHECKBOX));e.rowCheckboxList.push(n)}))},removeClassAtRowIndex:function(t,n){e.getRows()[t].classList.remove(n)},setAttributeAtRowIndex:function(t,n,i){e.getRows()[t].setAttribute(n,i)},setHeaderRowCheckboxChecked:function(t){e.headerRowCheckbox.checked=t},setHeaderRowCheckboxIndeterminate:function(t){e.headerRowCheckbox.indeterminate=t},setRowCheckboxCheckedAtIndex:function(t,n){e.rowCheckboxList[t].checked=n},setSortStatusLabelByHeaderCellIndex:function(t,n){var i=e.getHeaderCells()[t].querySelector(Ia.SORT_STATUS_LABEL);i&&(i.textContent=e.getSortStatusMessageBySortValue(n))}})},t.prototype.getRowByIndex=function(e){return this.getRows()[e]},t.prototype.getRowIdByIndex=function(e){return this.getRowByIndex(e).getAttribute(Ca)},t.prototype.handleHeaderRowClick=function(e){var t=mt(e.target,Ia.HEADER_CELL_WITH_SORT);if(t){var n=t.getAttribute("data-column-id"),i=this.getHeaderCells().indexOf(t);-1!==i&&this.foundation.handleSortAction({columnId:n,columnIndex:i,headerCell:t})}},t.prototype.getSortStatusMessageBySortValue=function(e){switch(e){case va.ASCENDING:return"Sorted in ascending order";case va.DESCENDING:return"Sorted in descending order";default:return""}},t.prototype.getLinearProgressElement=function(){var e=this.root.querySelector(".mdc-data-table__linear-progress");if(!e)throw new Error("MDCDataTable: linear progress element is not found.");return e},t.prototype.getLinearProgress=function(){if(!this.linearProgress){var e=this.getLinearProgressElement();this.linearProgress=new La(e)}return this.linearProgress},t}(lt),Pa=l(6104),ja=l.n(Pa),za=function(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},Fa=function(e,t,n,i){return new(n||(n=Promise))((function(a,r){function o(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}d((i=i.apply(e,t||[])).next())}))};const $a=l(1896),Ua=me`
497
498
 
498
499
  :host {
499
500
  width: 100%;
@@ -1611,7 +1612,7 @@
1611
1612
  <div id="field-${e}" style="${t&&t.styles?Ni(t.styles):""}" class=${Ge({field:!0,mobileHidden:!!t&&!!t.hideOnMobile})}>
1612
1613
  ${n}
1613
1614
  </div>
1614
- `:z``}function Ms(e){return cs(this,void 0,void 0,(function*(){const t=!!e.id&&void 0!==e.version;let n,i;try{if(t){if(!e.id)throw new Error("Request to update existing asset but asset ID is not set");const t=yield Oi().rest.api.AssetResource.update(e.id,e);n=200===t.status,i=t.data}else{const t=yield Oi().rest.api.AssetResource.create(e);n=200===t.status,n&&(i=t.data)}}catch(e){n=!1,os(void 0,t?"saveAssetFailed":"createAssetFailed","dismiss"),console.error("Failed to save asset",e)}return{asset:i,success:n,isNew:!t}}))}ys.NAME="or-asset-viewer-load-alarm-event";const Ls=l(1896),Ts=["name","createdOn","type","parentId","accessPublicRead"],Es={viewerStyles:{},panels:[{type:"group",title:"underlyingAssets"},{type:"info",hideOnMobile:!0,properties:{include:[]},attributes:{include:["notes","manufacturer","model"]}},{title:"attributes",type:"info",properties:{include:[]},attributes:{exclude:["location","notes","manufacturer","model"]}},{type:"setup",hideOnMobile:!1},{title:"location",type:"info",column:1,properties:{include:[]},attributes:{include:["location"],itemConfig:{location:{label:"",readonly:!0}}}},{type:"history",column:1},{type:"linkedUsers",column:1},{type:"alarm.linkedAlarms",column:1,hideOnMobile:!0}]};let Ys=class extends((0,Ii.subscribe)(Oi())((0,Pi.translate)(To)(Le))){static get styles(){return[ce(Ls),ds,_r,gr]}constructor(){super(),this._validationResults=[],this._saveInProgress=!1,this.langChangedCallback=()=>{this._assetInfo&&(this._assetInfo.attributeTemplateMap={},this.requestUpdate("_assetInfo"))},this.addEventListener(Io.NAME,(e=>this._onAssetModified(e.detail)))}isModified(){return!!this.editMode&&this._assetInfo&&this._assetInfo.modified}shouldUpdate(e){return this._isReadonly()&&(this.editMode=!1),e.has("assetId")&&(this._assetInfo=void 0,this.asset=void 0,this.assetId?super.assetIds=[this.assetId]:super.assetIds=void 0),e.has("asset")&&(this._assetInfo=void 0,this.asset&&this.loadAssetInfo(this.asset).then((e=>this._assetInfo=e)).catch((e=>{}))),super.shouldUpdate(e)}updated(e){e.has("asset")&&this._doValidation()}loadAssetInfo(e){return cs(this,void 0,void 0,(function*(){if(!e)throw new Error("Asset has changed");e.attributes||(e.attributes={});const t=!!e.id,n=!t,i=this._getPanelConfig(e);if(!t)return{asset:e,modified:n,viewerConfig:i,attributeTemplateMap:{}};const a=yield function(e){return cs(this,void 0,void 0,(function*(){try{return yield Oi().rest.api.AssetResource.getUserAssetLinks({realm:Oi().displayRealm,assetId:e.id}).then((e=>{const t=e.data.map((e=>function(e){return cs(this,void 0,void 0,(function*(){const t=e.id.userId,n=e.userFullName,i=yield Oi().rest.api.UserResource.getUserClientRoles(Oi().displayRealm,t,Oi().clientId).then((e=>e.data)).catch((e=>(console.info("User not allowed to get roles",e),[])));return{userId:t,usernameAndId:n,roles:i,restrictedUser:yield Oi().rest.api.UserResource.getUserRealmRoles(Oi().displayRealm,t).then((e=>!!e.data&&!!e.data.find((e=>e===Ii.RESTRICTED_USER_REALM_ROLE))))}}))}(e)));return Promise.all(t)}))}catch(e){return console.log("Failed to get child assets: "+e),[]}}))}(e),r=yield function(e){return cs(this,void 0,void 0,(function*(){try{return yield Oi().rest.api.AlarmResource.getAlarms({realm:Oi().displayRealm,assetId:e.id}).then((e=>{const t=e.data;return Promise.all(t)}))}catch(e){return console.log("Failed to get child assets: "+e),[]}}))}(e);if(!this.assetId||this.assetId!==e.id)throw new Error("Asset has changed");let o;if("GroupAsset"===e.type&&(o=yield function(e,t){return cs(this,void 0,void 0,(function*(){let n;try{n=yield Oi().rest.api.AssetResource.queryAssets({parents:[{id:e}]})}catch(e){return console.log("Failed to get child assets: "+e),[]}return 200===n.status&&n.data?n.data.filter((e=>e.type===t)):[]}))}(e.id,e.attributes.childAssetType.value)),!this.assetId||this.assetId!==e.id)throw new Error("Asset has changed");return{asset:e,modified:n,viewerConfig:i,childAssets:o,userAssetLinks:a,alarmAssetLinks:r,attributeTemplateMap:{}}}))}_doValidation(){this.editMode&&this.editor&&(this._validationResults=this.editor.validate())}render(){if(!this.asset&&!this.assetId)return z`
1615
+ `:z``}function Ms(e){return cs(this,void 0,void 0,(function*(){const t=!!e.id&&void 0!==e.version;let n,i;try{if(t){if(!e.id)throw new Error("Request to update existing asset but asset ID is not set");const t=yield Oi().rest.api.AssetResource.update(e.id,e);n=200===t.status,i=t.data}else{const t=yield Oi().rest.api.AssetResource.create(e);n=200===t.status,n&&(i=t.data)}}catch(e){n=!1,os(void 0,t?"saveAssetFailed":"createAssetFailed","dismiss"),console.error("Failed to save asset",e)}return{asset:i,success:n,isNew:!t}}))}ys.NAME="or-asset-viewer-load-alarm-event";const Ls=l(1896),Ts=["name","createdOn","type","parentId","accessPublicRead"],Es={viewerStyles:{},panels:[{type:"group",title:"underlyingAssets"},{type:"info",hideOnMobile:!0,properties:{include:[]},attributes:{include:["notes","manufacturer","model"]}},{title:"attributes",type:"info",properties:{include:[]},attributes:{exclude:["location","notes","manufacturer","model"]}},{type:"setup",hideOnMobile:!1},{title:"location",type:"info",column:1,properties:{include:[]},attributes:{include:["location"],itemConfig:{location:{label:"",readonly:!0}}}},{type:"history",column:1},{type:"linkedUsers",column:1},{type:"alarm.linkedAlarms",column:1,hideOnMobile:!0}]};let Ys=class extends((0,Ii.subscribe)(Oi())((0,Pi.translate)(To)(Le))){static get styles(){return[ce(Ls),ds,_r,gr]}constructor(){super(),this._validationResults=[],this._saveInProgress=!1,this.langChangedCallback=()=>{this._assetInfo&&(this._assetInfo.attributeTemplateMap={},this.requestUpdate("_assetInfo"))},this.addEventListener(Io.NAME,(e=>this._onAssetModified(e.detail)))}isModified(){return!!this.editMode&&this._assetInfo&&this._assetInfo.modified}shouldUpdate(e){return this._isReadonly()&&(this.editMode=!1),e.has("assetId")&&(this._assetInfo=void 0,this.asset=void 0,this.assetId?super.assetIds=[this.assetId]:super.assetIds=void 0),e.has("asset")&&(this._assetInfo=void 0,this.asset&&this.loadAssetInfo(this.asset).then((e=>this._assetInfo=e)).catch((e=>{}))),super.shouldUpdate(e)}updated(e){e.has("asset")&&this._doValidation()}loadAssetInfo(e){return cs(this,void 0,void 0,(function*(){if(!e)throw new Error("Asset has changed");e.attributes||(e.attributes={});const t=!!e.id,n=!t,i=this._getPanelConfig(e);if(!t)return{asset:e,modified:n,viewerConfig:i,attributeTemplateMap:{}};const a=yield function(e){return cs(this,void 0,void 0,(function*(){try{return yield Oi().rest.api.AssetResource.getUserAssetLinks({realm:Oi().displayRealm,assetId:e.id}).then((e=>{const t=e.data.map((e=>function(e){return cs(this,void 0,void 0,(function*(){const t=e.id.userId;return{userId:t,usernameAndId:e.userFullName,restrictedUser:yield Oi().rest.api.UserResource.getUserRealmRoles(Oi().displayRealm,t).then((e=>!!e.data&&!!e.data.find((e=>e===Ii.RESTRICTED_USER_REALM_ROLE))))}}))}(e)));return Promise.all(t)}))}catch(e){return console.log("Failed to get child assets: "+e),[]}}))}(e),r=yield function(e){return cs(this,void 0,void 0,(function*(){try{return yield Oi().rest.api.AlarmResource.getAlarms({realm:Oi().displayRealm,assetId:e.id}).then((e=>{const t=e.data;return Promise.all(t)}))}catch(e){return console.log("Failed to get child assets: "+e),[]}}))}(e);if(!this.assetId||this.assetId!==e.id)throw new Error("Asset has changed");let o;if("GroupAsset"===e.type&&(o=yield function(e,t){return cs(this,void 0,void 0,(function*(){let n;try{n=yield Oi().rest.api.AssetResource.queryAssets({parents:[{id:e}]})}catch(e){return console.log("Failed to get child assets: "+e),[]}return 200===n.status&&n.data?n.data.filter((e=>e.type===t)):[]}))}(e.id,e.attributes.childAssetType.value)),!this.assetId||this.assetId!==e.id)throw new Error("Asset has changed");return{asset:e,modified:n,viewerConfig:i,childAssets:o,userAssetLinks:a,alarmAssetLinks:r,attributeTemplateMap:{}}}))}_doValidation(){this.editMode&&this.editor&&(this._validationResults=this.editor.validate())}render(){if(!this.asset&&!this.assetId)return z`
1615
1616
  <div class="msg"><or-translate value="noAssetSelected"></or-translate></div>
1616
1617
  `;if(!this._assetInfo)return z`
1617
1618
  <div class="msg"><or-translate value="loading"></or-translate></div>
@@ -1707,7 +1708,7 @@
1707
1708
  </style>
1708
1709
  <or-mwc-input .type="${ha.BUTTON}" class="asset-group-add-remove-button" icon="pencil" @click="${()=>h()}"></or-mwc-input>
1709
1710
  <or-mwc-table .columns="${f[0]}" .rows="${f[1]}" .id="${e}-attribute-table" .config="${{stickyFirstColumn:!0}}"></or-mwc-table>
1710
- `}if("linkedUsers"===a.type){const e=Oi().hasRole("read:admin"),i=t.userAssetLinks;if(!e)return;if(!i||0===i.length)return;const a=[To.t("username"),To.t("roles"),To.t("restrictedUser")],r=i.sort(Ii.Util.sortByString((e=>e.usernameAndId))).map((e=>[e.usernameAndId,e.roles.join(", "),e.restrictedUser?To.t("yes"):To.t("no")]));return z`<or-mwc-table id="linked-users-table" .rows="${r}" .config="${{stickyFirstColumn:!1}}" .columns="${a}"
1711
+ `}if("linkedUsers"===a.type){const e=Oi().hasRole("read:admin"),i=t.userAssetLinks;if(!e)return;if(!i||0===i.length)return;const a=[To.t("username"),To.t("restrictedUser")],r=i.sort(Ii.Util.sortByString((e=>e.usernameAndId))).map((e=>[e.usernameAndId,e.restrictedUser?To.t("yes"):To.t("no")]));return z`<or-mwc-table id="linked-users-table" .rows="${r}" .config="${{stickyFirstColumn:!1}}" .columns="${a}"
1711
1712
  @or-mwc-table-row-click="${e=>{n.dispatchEvent(new bs(i[e.detail.index].userId))}}">
1712
1713
  </or-mwc-table>`}if("alarm.linkedAlarms"===a.type){const e=Oi().hasRole("read:alarms"),i=t.alarmAssetLinks;if(!e)return;if(!i||0===i.length)return;const a=[To.t("alarm.title"),To.t("alarm.severity"),To.t("status")],r=i.sort().map((e=>[e.title,e.severity,e.status]));return z`<or-mwc-table .rows="${r}" .config="${{stickyFirstColumn:!1}}" .columns="${a}"
1713
1714
  @or-mwc-table-row-click="${e=>{n.dispatchEvent(new ys(i[e.detail.index].id))}}">