@node-projects/web-component-designer 0.1.285 → 0.1.286
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.
- package/dist/elements/services/propertiesService/IProperty.d.ts +1 -0
- package/dist/elements/services/propertiesService/propertyEditors/BooleanPropertyEditor.js +2 -0
- package/dist/elements/services/propertiesService/propertyEditors/BooleanPropertyEditor.js.map +1 -1
- package/dist/elements/services/propertiesService/propertyEditors/ColorPropertyEditor.js +2 -0
- package/dist/elements/services/propertiesService/propertyEditors/ColorPropertyEditor.js.map +1 -1
- package/dist/elements/services/propertiesService/propertyEditors/DatePropertyEditor.js +2 -0
- package/dist/elements/services/propertiesService/propertyEditors/DatePropertyEditor.js.map +1 -1
- package/dist/elements/services/propertiesService/propertyEditors/FontPropertyEditor.js +2 -0
- package/dist/elements/services/propertiesService/propertyEditors/FontPropertyEditor.js.map +1 -1
- package/dist/elements/services/propertiesService/propertyEditors/JsonPropertyEditor.js +2 -0
- package/dist/elements/services/propertiesService/propertyEditors/JsonPropertyEditor.js.map +1 -1
- package/dist/elements/services/propertiesService/propertyEditors/NumberPropertyEditor.js +2 -0
- package/dist/elements/services/propertiesService/propertyEditors/NumberPropertyEditor.js.map +1 -1
- package/dist/elements/services/propertiesService/propertyEditors/SelectPropertyEditor.js +2 -0
- package/dist/elements/services/propertiesService/propertyEditors/SelectPropertyEditor.js.map +1 -1
- package/dist/elements/services/propertiesService/propertyEditors/TextPropertyEditor.js +2 -0
- package/dist/elements/services/propertiesService/propertyEditors/TextPropertyEditor.js.map +1 -1
- package/dist/elements/services/propertiesService/services/AbstractPolymerLikePropertiesService.js +9 -7
- package/dist/elements/services/propertiesService/services/AbstractPolymerLikePropertiesService.js.map +1 -1
- package/dist/elements/widgets/designerView/DomConverter.d.ts +1 -1
- package/dist/elements/widgets/propertyGrid/PropertyGridPropertyList.js +10 -8
- package/dist/elements/widgets/propertyGrid/PropertyGridPropertyList.js.map +1 -1
- package/dist/index-min.js +5 -5
- package/package.json +1 -1
|
@@ -4,6 +4,8 @@ export class BooleanPropertyEditor extends BasePropertyEditor {
|
|
|
4
4
|
super(property);
|
|
5
5
|
let element = document.createElement('input');
|
|
6
6
|
element.type = "checkbox";
|
|
7
|
+
if (property.readonly)
|
|
8
|
+
element.readOnly = true;
|
|
7
9
|
element.onchange = (e) => this._valueChanged(element.checked);
|
|
8
10
|
this.element = element;
|
|
9
11
|
}
|
package/dist/elements/services/propertiesService/propertyEditors/BooleanPropertyEditor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/BooleanPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,OAAO,qBAAsB,SAAQ,kBAAoC;IAE7E,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,GAAG,UAAU,CAAC;QAC1B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;IAC/B,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"BooleanPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/BooleanPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,OAAO,qBAAsB,SAAQ,kBAAoC;IAE7E,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,GAAG,UAAU,CAAC;QAC1B,IAAI,QAAQ,CAAC,QAAQ;YACnB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC1B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -5,6 +5,8 @@ export class ColorPropertyEditor extends BasePropertyEditor {
|
|
|
5
5
|
super(property);
|
|
6
6
|
let element = document.createElement('input');
|
|
7
7
|
element.type = 'color';
|
|
8
|
+
if (property.readonly)
|
|
9
|
+
element.readOnly = true;
|
|
8
10
|
element.onchange = (e) => {
|
|
9
11
|
let w3Col = w3color.toColorObject(element.value);
|
|
10
12
|
this._valueChanged(w3Col.toNameOrHexString());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/ColorPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,MAAM,OAAO,mBAAoB,SAAQ,kBAAoC;IAC3E,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,GAAG,OAAO,CAAA;QACtB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,EAAE;YACvB,IAAI,KAAK,GAAG,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACjD,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAA;QAC/C,CAAC,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,KAAK;YACR,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC;aAC5B,CAAC;YACJ,IAAI,KAAK,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QAC3C,CAAC;IACH,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"ColorPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/ColorPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,MAAM,OAAO,mBAAoB,SAAQ,kBAAoC;IAC3E,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,GAAG,OAAO,CAAA;QACtB,IAAI,QAAQ,CAAC,QAAQ;YACnB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC1B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,EAAE;YACvB,IAAI,KAAK,GAAG,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACjD,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAA;QAC/C,CAAC,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,KAAK;YACR,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC;aAC5B,CAAC;YACJ,IAAI,KAAK,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QAC3C,CAAC;IACH,CAAC;CACF"}
|
|
@@ -4,6 +4,8 @@ export class DatePropertyEditor extends BasePropertyEditor {
|
|
|
4
4
|
super(property);
|
|
5
5
|
let element = document.createElement('input');
|
|
6
6
|
element.type = "datetime-local";
|
|
7
|
+
if (property.readonly)
|
|
8
|
+
element.readOnly = true;
|
|
7
9
|
element.onchange = (e) => this._valueChanged(element.value);
|
|
8
10
|
this.element = element;
|
|
9
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/DatePropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,OAAO,kBAAmB,SAAQ,kBAAoC;IAE1E,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"DatePropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/DatePropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,OAAO,kBAAmB,SAAQ,kBAAoC;IAE1E,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAChC,IAAI,QAAQ,CAAC,QAAQ;YACnB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC1B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,KAAK;YACR,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;;YAE1B,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -4,6 +4,8 @@ export class FontPropertyEditor extends BasePropertyEditor {
|
|
|
4
4
|
constructor(property) {
|
|
5
5
|
super(property);
|
|
6
6
|
let element = document.createElement("select");
|
|
7
|
+
if (property.readonly)
|
|
8
|
+
element.disabled = true;
|
|
7
9
|
this.element = element;
|
|
8
10
|
FontPropertyEditor.addFontsToSelect(element);
|
|
9
11
|
this.element.onchange = (e) => this._valueChanged(this.element.value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/FontPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,OAAO,kBAAmB,SAAQ,kBAAqC;IAE3E,MAAM,CAAC,QAAQ,CAAW;IAC1B,YAAY,Q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,CAAC,eAAe,EAAE,CAAC;YAClC,YAAY;YACZ,MAAM,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;gBAChC,YAAY;gBACZ,kBAAkB,CAAC,QAAQ,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBACjE,kBAAkB,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,kBAAkB,CAAC,QAAQ,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;YACzJ,kBAAkB,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,MAAyB;QACpD,KAAK,IAAI,CAAC,IAAI,kBAAkB,CAAC,QAAQ,EAAE,CAAC;YAC1C,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAC9C,MAAM,CAAC,KAAK,GAAQ,CAAC,CAAC;YACtB,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;YAChB,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC7B,CAAC;IAEH,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -12,6 +12,8 @@ export class JsonPropertyEditor extends BasePropertyEditor {
|
|
|
12
12
|
super(property);
|
|
13
13
|
let el = JsonPropertyEditor.template.content.cloneNode(true);
|
|
14
14
|
this._input = el.getElementById('input');
|
|
15
|
+
if (property.readonly)
|
|
16
|
+
this._input.readOnly = true;
|
|
15
17
|
this._input.onchange = (e) => this._valueChanged(this._input.value);
|
|
16
18
|
this.element = el;
|
|
17
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/JsonPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAE/D,MAAM,OAAO,kBAAmB,SAAQ,kBAAkC;IAExE,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAA;;;;;GAKrB,CAAC;IAEF,MAAM,CAAmB;IAEzB,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,EAAE,GAAmB,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC7E,IAAI,CAAC,MAAM,GAA6C,EAAG,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;QACnF,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACpB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IAC5B,CAAC"}
|
|
1
|
+
{"version":3,"file":"JsonPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/JsonPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAE/D,MAAM,OAAO,kBAAmB,SAAQ,kBAAkC;IAExE,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAA;;;;;GAKrB,CAAC;IAEF,MAAM,CAAmB;IAEzB,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,EAAE,GAAmB,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC7E,IAAI,CAAC,MAAM,GAA6C,EAAG,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;QACnF,IAAI,QAAQ,CAAC,QAAQ;YACnB,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACpB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IAC5B,CAAC"}
|
|
@@ -4,6 +4,8 @@ export class NumberPropertyEditor extends BasePropertyEditor {
|
|
|
4
4
|
super(property);
|
|
5
5
|
let element = document.createElement('input');
|
|
6
6
|
element.type = "number";
|
|
7
|
+
if (property.readonly)
|
|
8
|
+
element.readOnly = true;
|
|
7
9
|
element.min = property.min;
|
|
8
10
|
element.max = property.max;
|
|
9
11
|
element.step = property.step;
|
package/dist/elements/services/propertiesService/propertyEditors/NumberPropertyEditor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/NumberPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,OAAO,oBAAqB,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QAC1B,OAAO,CAAC,GAAG,GAAgB,QAAQ,CAAC,GAAG,CAAC;QACxC,OAAO,CAAC,GAAG,GAAgB,QAAQ,CAAC,GAAG,CAAC;QACxC,OAAO,CAAC,IAAI,GAAgB,QAAQ,CAAC,IAAI,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACjG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1D,CAAC;CACF"}
|
|
@@ -22,6 +22,8 @@ export class SelectPropertyEditor extends BasePropertyEditor {
|
|
|
22
22
|
elementSel.appendChild(option);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
if (property.readonly)
|
|
26
|
+
elementSel.disabled = true;
|
|
25
27
|
elementSel.onchange = (e) => this._valueChanged(elementSel.value);
|
|
26
28
|
let elementInput = document.createElement("input");
|
|
27
29
|
elementInput.style.display = 'none';
|
package/dist/elements/services/propertiesService/propertyEditors/SelectPropertyEditor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/SelectPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,OAAO,oBAAqB,SAAQ,kBAAkC;IAE1E,aAAa,CAAoB;IACjC,YAAY,CAAmB;IAE/B,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC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C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACxC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC3C,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;QACzC,IAAI,CAAC,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC;QACjC,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;YAC/C,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;YAChC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YAC1C,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC5C,CAAC;IACH,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"SelectPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/SelectPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,OAAO,oBAAqB,SAAQ,kBAAkC;IAE1E,aAAa,CAAoB;IACjC,YAAY,CAAmB;IAE/B,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE5C,IAAI,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAClD,IAAI,QAAQ,CAAC,IAAI,IAAI,MAAM,EAA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,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC3C,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;QACzC,IAAI,CAAC,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC;QACjC,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;YAC/C,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;YAChC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YAC1C,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QAC5C,CAAC;IACH,CAAC;CACF"}
|
|
@@ -4,6 +4,8 @@ export class TextPropertyEditor extends BasePropertyEditor {
|
|
|
4
4
|
super(property);
|
|
5
5
|
let element = document.createElement('input');
|
|
6
6
|
element.type = "text";
|
|
7
|
+
if (property.readonly)
|
|
8
|
+
element.readOnly = true;
|
|
7
9
|
element.onchange = (e) => this._valueChanged(element.value);
|
|
8
10
|
element.onfocus = (e) => {
|
|
9
11
|
element.selectionStart = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/TextPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,OAAO,kBAAmB,SAAQ,kBAAoC;IAE1E,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;QACtB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5D,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE;YACtB,OAAO,CAAC,cAAc,GAAG,CAAC,CAAC;YAC3B,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;QAC/C,CAAC,CAAA;QACD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,KAAK,IAAI,IAAI;YACf,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC;;YAExB,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAC/B,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"TextPropertyEditor.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/propertyEditors/TextPropertyEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,MAAM,OAAO,kBAAmB,SAAQ,kBAAoC;IAE1E,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;QACtB,IAAI,QAAQ,CAAC,QAAQ;YACnB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC1B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5D,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE;YACtB,OAAO,CAAC,cAAc,GAAG,CAAC,CAAC;YAC3B,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;QAC/C,CAAC,CAAA;QACD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,SAAoB,EAAE,KAAU;QAC3C,IAAI,KAAK,IAAI,IAAI;YACf,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC;;YAExB,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAC/B,CAAC;CACF"}
|
package/dist/elements/services/propertiesService/services/AbstractPolymerLikePropertiesService.js
CHANGED
|
@@ -18,37 +18,39 @@ export class AbstractPolymerLikePropertiesService extends AbstractPropertiesServ
|
|
|
18
18
|
let type = polymerProperty;
|
|
19
19
|
let description = null;
|
|
20
20
|
let example = null;
|
|
21
|
+
let readonly = false;
|
|
21
22
|
if (polymerProperty.type) {
|
|
22
23
|
type = polymerProperty.type;
|
|
23
24
|
description = polymerProperty.description;
|
|
24
25
|
example = polymerProperty.example;
|
|
26
|
+
readonly = polymerProperty.readonly;
|
|
25
27
|
}
|
|
26
28
|
if (type === String) {
|
|
27
|
-
let property = { name: name, type: "string", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example };
|
|
29
|
+
let property = { name: name, type: "string", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example, readonly };
|
|
28
30
|
properties.push(property);
|
|
29
31
|
}
|
|
30
32
|
else if (type === Object) {
|
|
31
|
-
let property = { name: name, type: "object", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example };
|
|
33
|
+
let property = { name: name, type: "object", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example, readonly };
|
|
32
34
|
properties.push(property);
|
|
33
35
|
}
|
|
34
36
|
else if (type === Number) {
|
|
35
|
-
let property = { name: name, type: "number", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example };
|
|
37
|
+
let property = { name: name, type: "number", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example, readonly };
|
|
36
38
|
properties.push(property);
|
|
37
39
|
}
|
|
38
40
|
else if (type === Date) {
|
|
39
|
-
let property = { name: name, type: "date", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example };
|
|
41
|
+
let property = { name: name, type: "date", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example, readonly };
|
|
40
42
|
properties.push(property);
|
|
41
43
|
}
|
|
42
44
|
else if (type === Boolean) {
|
|
43
|
-
let property = { name: name, type: "boolean", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example };
|
|
45
|
+
let property = { name: name, type: "boolean", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example, readonly };
|
|
44
46
|
properties.push(property);
|
|
45
47
|
}
|
|
46
48
|
else if (PropertiesHelper.isTypescriptEnum(type)) {
|
|
47
|
-
let property = { name: name, type: "enum", enumValues: PropertiesHelper.getTypescriptEnumEntries(type), service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example };
|
|
49
|
+
let property = { name: name, type: "enum", enumValues: PropertiesHelper.getTypescriptEnumEntries(type), service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example, readonly };
|
|
48
50
|
properties.push(property);
|
|
49
51
|
}
|
|
50
52
|
else {
|
|
51
|
-
let property = { name: name, type: "string", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example };
|
|
53
|
+
let property = { name: name, type: "string", service: this, propertyType: PropertyType.propertyAndAttribute, description: description, example: example, readonly };
|
|
52
54
|
properties.push(property);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractPolymerLikePropertiesService.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/services/AbstractPolymerLikePropertiesService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,OAAgB,oCAAqC,SAAQ,yBAAyB;IAE1E,cAAc,CAAC,UAAuB;QACpD,OAAO,WAAW,CAAC,iBAAiB,CAAC;IACvC,CAAC;IAEe,KAAK,CAAC,aAAa,CAAC,UAAuB;QACzD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC;YACpC,OAAO,IAAI,CAAC;QACd,OAAO,IAAI,CAAC,eAAe,CAAO,UAAU,CAAC,OAAO,CAAC,WAAY,CAAC,UAAU,CAAC,CAAC;IAChF,CAAC;IAES,eAAe,CAAC,IAAS;QACjC,IAAI,UAAU,GAAgB,EAAE,CAAC;QACjC,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;YACxB,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;YACnC,IAAI,IAAI,GAAG,eAAe,CAAC;YAC3B,IAAI,WAAW,GAAG,IAAI,CAAC;YACvB,IAAI,OAAO,GAAG,IAAI,CAAC;YACnB,IAAI,eAAe,CAAC,IAAI,EAAE,CAAC;gBACzB,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;gBAC5B,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC;gBAC1C,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AbstractPolymerLikePropertiesService.js","sourceRoot":"","sources":["../../../../../src/elements/services/propertiesService/services/AbstractPolymerLikePropertiesService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAA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IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,CAAC;iBAAM,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnD,IAAI,QAAQ,GAAc,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;gBAC1O,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,CAAC;iBAAM,CAAC;gBACN,IAAI,QAAQ,GAAc,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;gBAC/K,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAEQ,aAAa,CAAC,WAA0B,EAAE,QAAmB;QACpE,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxE,CAAC;CACF"}
|
|
@@ -2,6 +2,6 @@ import { IDesignItem } from "../../item/IDesignItem.js";
|
|
|
2
2
|
export declare class DomConverter {
|
|
3
3
|
static normalizeAttributeValue(value: string | number, useSingleQuotes?: boolean): string;
|
|
4
4
|
static normalizeContentValue(value: string): string;
|
|
5
|
-
static IsSelfClosingElement(tag: string): tag is "link" | "img" | "
|
|
5
|
+
static IsSelfClosingElement(tag: string): tag is "input" | "link" | "img" | "br" | "area" | "base" | "col" | "embed" | "hr" | "keygen" | "meta" | "param" | "source" | "track" | "wbr";
|
|
6
6
|
static ConvertToString(designItems: IDesignItem[], beautifyOutput?: boolean, updatePositions?: boolean): string;
|
|
7
7
|
}
|
|
@@ -203,14 +203,16 @@ export class PropertyGridPropertyList extends BaseCustomWebComponentLazyAppend {
|
|
|
203
203
|
if (p.propertyType != PropertyType.complex)
|
|
204
204
|
rectContainer.appendChild(rect);
|
|
205
205
|
this._div.appendChild(rectContainer);
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
206
|
+
if (p.readonly === true) {
|
|
207
|
+
rect.oncontextmenu = (event) => {
|
|
208
|
+
event.preventDefault();
|
|
209
|
+
this.openContextMenu(event, p);
|
|
210
|
+
};
|
|
211
|
+
rect.onclick = (event) => {
|
|
212
|
+
event.preventDefault();
|
|
213
|
+
this.openContextMenu(event, p);
|
|
214
|
+
};
|
|
215
|
+
}
|
|
214
216
|
if (p.type == 'addNew') {
|
|
215
217
|
let input = editor.element;
|
|
216
218
|
input.disabled = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyGridPropertyList.js","sourceRoot":"","sources":["../../../../src/elements/widgets/propertyGrid/PropertyGridPropertyList.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gCAAgC,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAG3G,OAAO,EAAsB,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAC;AAEhF,OAAO,EAAE,+BAA+B,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAGxG,MAAM,OAAO,wBAAyB,SAAQ,gCAAgC;I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;gBACvC,CAAC,GAAG,iBAAiB,CAAC,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;gBACrD,YAAY,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC;YAC3C,CAAC;YACD,MAAM,EAAE,+BAA+B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,YAAY,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC;QACrC,CAAC;IACH,CAAC;CACF;AAED,cAAc,CAAC,MAAM,CAAC,2CAA2C,EAAE,wBAAwB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"PropertyGridPropertyList.js","sourceRoot":"","sources":["../../../../src/elements/widgets/propertyGrid/PropertyGridPropertyList.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gCAAgC,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAG3G,OAAO,EAAsB,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAC;AAEhF,OAAO,EAAE,+BAA+B,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAGxG,MAAM,OAAO,wBAAyB,SAAQ,gCAAgC;IAEpE,IAAI,CAAiB;IACrB,YAAY,GAA2E,IAAI,GAAG,EAAE,CAAC;IACjG,iBAAiB,CAAmB;IACpC,kBAAkB,CAAqB;IACvC,YAAY,CAAgB;IAC5B,cAAc,CAAM;IACpB,WAAW,GAAW,CAAC,CAAC;IAEzB,kBAAkB,CAA4D;IAC9E,kBAAkB,CAAyD;IAC3E,2BAA2B,CAA0E;IAE5G,IAAW,iBAAiB;QAC1B,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED,MAAM,KAAc,KAAK;QACv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EAAE,CAAC;QACrC,CAAC;IACH,CAAC;CACF;AAED,cAAc,CAAC,MAAM,CAAC,2CAA2C,EAAE,wBAAwB,CAAC,CAAC"}
|
package/dist/index-min.js
CHANGED
|
@@ -56,7 +56,7 @@ var gd=Object.defineProperty;var u=(s,e)=>()=>(s&&(e=s(s=0)),e);var yd=(s,e)=>{f
|
|
|
56
56
|
<div id="container" style="width: 100%; height: 100%; position: absolute;">
|
|
57
57
|
<textarea id="text"></textarea>
|
|
58
58
|
</div>
|
|
59
|
-
`;executeCommand(e){}canExecuteCommand(e){return!1}async ready(){this._text=this._getDomElement("text")}focusEditor(){requestAnimationFrame(()=>{this.focus(),this._text.focus()})}activated(){}update(e){this._text.value=e}getText(){return this._text.value}setSelection(e){this._text.setSelectionRange(e.start,e.start+e.length)}};customElements.define("node-projects-code-view-simple",di)});var Od,Qi,So=u(()=>{"use strict";Zi();_o();eh();bo();Od=!!(navigator.maxTouchPoints&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")),Qi=class extends Mt{config={codeViewWidget:di,demoViewWidget:ci};designerExtensions=new Map;removeDesignerExtensionOfType(e,t){let i=this.designerExtensions.get(e);for(let r=0;r<i.length;r++)i[r].constructor===t&&i.splice(r,1)}instanceServiceContainerCreatedCallbacks=[];designViewConfigButtons=[];designViewToolbarButtons=[];designerPointerExtensions=[];designerContextMenuExtensions;overlayLayerViewAdditionalStyles=[];globalContext=new qi(this);options={zoomDesignerBackground:!0,roundPixelsToDecimalPlaces:0,resizerPixelSize:Od?8:3};designerTools=new Map;get bindingService(){return this.getLastService("bindingService")}get bindableObjectsServices(){return this.getServices("bindableObjectsService")}get bindableObjectDragDropService(){return this.getLastService("bindableObjectDragDropService")}get propertyGridDragDropService(){return this.getLastService("propertyGridDragDropService")}get dragDropService(){return this.getLastService("dragDropService")}get elementInteractionServices(){return this.getServices("elementInteractionService")}get propertiesServices(){return this.getServices("propertyService")}get attachedPropertyServices(){return this.getServices("attachedPropertyService")}get propertyGroupService(){return this.getLastService("propertyGroupsService")}get containerServices(){return this.getServices("containerService")}get snaplinesProviderService(){return this.getLastService("snaplinesProviderService")}get elementsServices(){return this.getServices("elementsService")}get eventsService(){return this.getServices("eventsService")}get instanceServices(){return this.getServices("instanceService")}get editorTypesServices(){return this.getServices("editorTypesService")}get htmlWriterService(){return this.getLastService("htmlWriterService")}get htmlParserService(){return this.getLastService("htmlParserService")}get intializationService(){return this.getLastService("intializationService")}get elementAtPointService(){return this.getLastService("elementAtPointService")}get externalDragDropService(){return this.getLastService("externalDragDropService")}get copyPasteService(){return this.getLastService("copyPasteService")}get modelCommandService(){return this.getLastService("modelCommandService")}get demoProviderService(){return this.getLastService("demoProviderService")}get designItemService(){return this.getLastService("designItemService")}get configUiServices(){return this.getServices("configUiService")}get refactorServices(){return this.getServices("refactorService")}get deletionService(){return this.getLastService("deletionService")}}});var R,ue=u(()=>{"use strict";R=class{static isTypescriptEnum(e){if(e&&typeof e=="object"&&e.constructor==Object){for(let t in e){let i=typeof e[t];if(i!=="string"&&i!=="number")return!1}return!0}return!1}static getTypescriptEnumEntries(e){let t=[];for(let i in e)isNaN(i)&&t.push([i,e[i]]);return t}static camelToDashCase(e){return e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`)}static dashToCamelCase(e){return e.replace(/-([a-z])/g,t=>t[1].toUpperCase())}}});var V,Ke=u(()=>{"use strict";(function(s){s.none="none",s.all="all",s.some="some",s.bound="bound",s.fromStylesheet="fromStylesheet"})(V||(V={}))});var M,Ae=u(()=>{"use strict";(function(s){s.explicitProperty="explicitProperty",s.property="property",s.attribute="attribute",s.class="class",s.css="css",s.cssvar="cssvar",s.event="event",s.content="content",s.visible="visible"})(M||(M={}))});var y,ee=u(()=>{"use strict";(function(s){s.property="property",s.attribute="attribute",s.propertyAndAttribute="propertyAndAttribute",s.cssValue="cssvalue",s.complex="complex",s.add="add"})(y||(y={}))});var E,X=u(()=>{"use strict";(function(s){s[s.Element=1]="Element",s[s.Attribute=2]="Attribute",s[s.TextNode=3]="TextNode",s[s.Comment=8]="Comment",s[s.Document=9]="Document",s[s.DocumentFragment=11]="DocumentFragment"})(E||(E={}))});function _u(s){return s.getRootNode()?.host?.localName=="node-projects-designer-canvas"}function Ji(s,e){return e.createRange().createContextualFragment(s,{includeShadowRoots:!0}).firstChild}function nt(s,e){return s instanceof e||s instanceof(s.ownerDocument.defaultView??window)[e.name]}function pi(s,...e){for(let t of e)if(s instanceof t||s instanceof(s.ownerDocument.defaultView??window)[t.name])return!0;return!1}function vt(s){return s==null||pi(s,SVGElement,HTMLHtmlElement,HTMLHeadElement,HTMLBodyElement)?!1:(s.ownerDocument.defaultView??window).getComputedStyle(s).display.startsWith("inline")}function xt(s){return s==null||pi(s,SVGElement,HTMLHtmlElement,HTMLHeadElement,HTMLBodyElement)?!1:(s.ownerDocument.defaultView??window).getComputedStyle(s).display.startsWith("inline")}function ih(s){if(pi(s,SVGElement,HTMLHtmlElement,HTMLHeadElement,HTMLBodyElement)||nt(s,MathMLElement))return ve.block;let e=(s.ownerDocument.defaultView??window).getComputedStyle(s).display;return e=="none"?ve.none:e.startsWith("inline")?ve.inline:ve.block}function er(s){return s.textContent.trim()==""&&s.textContent.indexOf("\xA0")<0}function bu(){let s=document.activeElement,e=null;for(;s!=e;)e=s,s.shadowRoot!=null&&s.shadowRoot.activeElement&&(s=s.shadowRoot.activeElement);return s}function th(s){return s.assignedSlot?s.assignedSlot:s.parentElement==null&&nt(s.parentNode,ShadowRoot)?s.parentNode.host:s.parentElement}function Su(s){let e=th(s);for(;e;){let t=(s.ownerDocument.defaultView??window).getComputedStyle(s);if(t.position==="absolute"||t.position==="relative"||t.position==="fixed")return e;e=th(e)}return document.body}function wu(s){if(nt(s,HTMLElement))return{x:s.offsetLeft,y:s.offsetTop};{let e=s.getBoundingClientRect(),t=s.parentElement.getBoundingClientRect();return{x:e.x-t.x,y:e.y-t.y}}}function Cu(s,e,t={}){let i=0,r=0,n;t?n=t[Nd]??=new Map:n=new Map;let o=[],a=s;for(;a;){let l=n.get(a);if(l){i+=l.offsetLeft,r+=l.offsetTop,o.forEach(f=>{f.offsetLeft+=l.offsetLeft,f.offsetTop+=l.offsetTop});break}let c=a.offsetParent?a.offsetParent:a.getRootNode().host;pi(a,SVGSVGElement,HTMLBodyElement,HTMLHtmlElement)?c=a.parentElement?a.parentElement:a.getRootNode().host:nt(a,SVGGraphicsElement)?c=a.ownerSVGElement:nt(a,MathMLElement)&&(c=a.parentElement??c);let h=0,d=0;if(nt(a,HTMLElement)){let f=a.parentElement;for(;f!==null&&f!==c;)h+=f.scrollLeft,d+=f.scrollTop,f=f.parentElement}c&&(h+=c.scrollLeft,d+=c.scrollTop);let p=0,g=0;if(pi(a,SVGSVGElement,MathMLElement)){let f=a.style.transform;a.style.transform="";let b=a.getBoundingClientRect(),x=a.parentElement?a.parentElement.getBoundingClientRect():a.getRootNode().host.getBoundingClientRect();a.style.transform=f,p=(b.left-x.left)/e,g=(b.top-x.top)/e}else if(nt(a,SVGGraphicsElement)){let f=a.getBBox();p=f.x,g=f.y}else if(s==a&&(s===s.ownerDocument.body||nt(s,HTMLHtmlElement))){let f=(s.ownerDocument.defaultView??window).getComputedStyle(s);p=s.offsetLeft-h+parseInt(f.marginLeft),g=s.offsetTop-d+parseInt(f.marginTop)}else p=a.offsetLeft-h,g=a.offsetTop-d;o.forEach(f=>{f.offsetLeft+=p,f.offsetTop+=g});let m={offsetLeft:p,offsetTop:g};o.push(m),n.set(a,m),i+=p,r+=g,a=c}return{offsetLeft:i,offsetTop:r}}function rh(s){let e=parseInt(getComputedStyle(s).paddingLeft.replace("px",""))+parseInt(getComputedStyle(s).marginLeft.replace("px",""))+parseInt(getComputedStyle(s).borderLeft.replace("px",""))+parseInt(getComputedStyle(s).paddingRight.replace("px",""))+parseInt(getComputedStyle(s).marginRight.replace("px",""))+parseInt(getComputedStyle(s).borderRight.replace("px","")),t=parseInt(getComputedStyle(s).paddingTop.replace("px",""))+parseInt(getComputedStyle(s).marginTop.replace("px",""))+parseInt(getComputedStyle(s).borderTop.replace("px",""))+parseInt(getComputedStyle(s).paddingBottom.replace("px",""))+parseInt(getComputedStyle(s).marginBottom.replace("px",""))+parseInt(getComputedStyle(s).borderBottom.replace("px",""));return{x:e,y:t}}function tr(s,e){let t={x:Number.MAX_VALUE,y:Number.MAX_VALUE},i={x:Number.MIN_VALUE,y:Number.MIN_VALUE},r;for(let n of s)n.nodeType==E.TextNode||n.nodeType==E.Comment||(r={x:e.getNormalizedElementCoordinates(n.element).x,y:e.getNormalizedElementCoordinates(n.element).y,width:e.getNormalizedElementCoordinates(n.element).width,height:e.getNormalizedElementCoordinates(n.element).height},r.x<t.x&&(t.x=r.x),r.y<t.y&&(t.y=r.y),r.x+r.width>i.x&&(i.x=r.x+r.width),r.y+r.height>i.y&&(i.y=r.y+r.height));return{x:t.x,y:t.y,width:i.x-t.x,height:i.y-t.y}}var ve,Nd,Ye=u(()=>{"use strict";X();(function(s){s[s.none=0]="none",s[s.inline=1]="inline",s[s.block=2]="block"})(ve||(ve={}));Nd=Symbol("windowOffsetsCacheKey")});var K,fe=u(()=>{"use strict";Ke();ue();Ae();ee();X();Ye();K=class s{constructor(e){this._recreateElementsOnPropertyChange=e}_recreateElementsOnPropertyChange=!1;static _stylesCache=new Map;_cssCacheClearTimer;static _bindingsCache=new Map;static _bindingsCacheClearTimer;_notifyChangedProperty(e,t,i){}async getProperty(e,t){let i=await this.getProperties(e);return"properties"in i[0]?i.flatMap(r=>r.properties).find(r=>r.name==t):i.find(r=>r.name==t)}async setValue(e,t,i){let r=e[0].openGroup("property changed: "+t.name+" to "+i);for(let n of e)if(this.isHandledElement(n)&&this.getProperty(n,t.name)){if(t.propertyType==y.cssValue)await n.updateStyleInSheetOrLocalAsync(t.name,i),n.element.setAttribute("style",n.element.getAttribute("style"));else{let o=t.attributeName;if(o||(o=R.camelToDashCase(t.name)),t.type==="object"){let a=JSON.stringify(i);(t.propertyType==y.attribute||t.propertyType==y.propertyAndAttribute)&&n.setAttribute(o,a),(t.propertyType==y.property||t.propertyType==y.propertyAndAttribute)&&(n.element[t.name]=i)}else t.type=="boolean"&&(i===!1||i==null)?((t.propertyType==y.attribute||t.propertyType==y.propertyAndAttribute)&&n.removeAttribute(o),(t.propertyType==y.property||t.propertyType==y.propertyAndAttribute)&&(n.element[t.name]=!1)):t.type=="boolean"&&i===!0?((t.propertyType==y.attribute||t.propertyType==y.propertyAndAttribute)&&n.setAttribute(o,""),(t.propertyType==y.property||t.propertyType==y.propertyAndAttribute)&&(n.element[t.name]=!0)):((t.propertyType==y.attribute||t.propertyType==y.propertyAndAttribute)&&n.setAttribute(o,i.toString()),(t.propertyType==y.property||t.propertyType==y.propertyAndAttribute)&&(n.element[t.name]=i))}this._notifyChangedProperty(n,t,i)}r.commit(),this._recreateElementsOnPropertyChange&&s.recreateElements(this,e)}getPropertyTarget(e,t){return t.propertyType==y.attribute?M.attribute:t.propertyType==y.cssValue?M.css:M.property}clearValue(e,t,i){let r=e[0].openGroup("property cleared: "+t.name);for(let n of e){if(i!="binding"){if(t.propertyType==y.cssValue)n.removeStyle(t.name);else if((t.propertyType==y.property||t.propertyType==y.propertyAndAttribute)&&(n.element[t.name]=null),t.propertyType==y.attribute||t.propertyType==y.propertyAndAttribute){let o=t.attributeName;o||(o=R.camelToDashCase(t.name)),n.removeAttribute(o)}}i!="value"&&n.serviceContainer.forSomeServicesTillResult("bindingService",o=>o.clearBinding(n,t.name,this.getPropertyTarget(n,t))),this._notifyChangedProperty(n,t,void 0)}r.commit(),this._recreateElementsOnPropertyChange&&s.recreateElements(this,e)}isSet(e,t){let i=!0,r=!1;if(e!=null&&e.length!==0){let n=t.attributeName;n||(n=R.camelToDashCase(t.name));for(let a of e){let l=!1;if(t.propertyType==y.cssValue?l=a.hasStyle(t.name):l=a.hasAttribute(n),i=i&&l,r=r||l,!i&&r)break}let o=s.getOrBuildCachedBindings(e[0]);if(t.propertyType==y.cssValue){if(o&&o.find(a=>(a.target==M.css||a.target==M.cssvar)&&a.targetName==t.name))return V.bound}else if(t.propertyType==y.attribute){if(o&&o.find(a=>a.target==M.attribute&&a.targetName==t.name))return V.bound}else if(t.propertyType==y.property){if(o&&o.find(a=>(a.target==M.property||a.target==M.explicitProperty)&&a.targetName==t.name))return V.bound}else if(o&&o.find(a=>(a.target==M.property||a.target==M.explicitProperty||a.target==M.attribute)&&a.targetName==t.name))return V.bound;if(!i&&t.propertyType==y.cssValue){let a=s._stylesCache.get(e[0]);if(a||(a=new Set(e[0].getAllStyles().filter(c=>c.selector!=null).flatMap(c=>c.declarations).map(c=>c.name)),s._stylesCache.set(e[0],a),clearTimeout(this._cssCacheClearTimer),this._cssCacheClearTimer=setTimeout(()=>s._stylesCache.clear(),30)),a.has(t.name))return V.fromStylesheet}}else return V.none;return i?V.all:r?V.some:V.none}static getOrBuildCachedBindings(e){let t=s._bindingsCache.get(e);if(!t){let i=e.serviceContainer.getServices("bindingService");if(t=[],i)for(let r of i){let n=r.getBindings(e);n&&n.length>0&&t.push(...n)}s._bindingsCache.set(e,t),clearTimeout(this._bindingsCacheClearTimer),this._bindingsCacheClearTimer=setTimeout(()=>s._bindingsCache.clear(),30)}return t}getValue(e,t){if(e!=null&&e.length!==0)if(t.propertyType==y.cssValue){let i=e[0].getStyle(t.name);for(let r of e)if(r.getStyle(t.name)!=i){i=null;break}return i}else{let i=t.attributeName;if(i||(i=R.camelToDashCase(t.name)),t.type=="boolean"){if(e[0].hasAttribute(i)){let n=e[0].getAttribute(i);return n==""?!0:n}return!1}return e[0].getAttribute(i)}return null}getBinding(e,t){let i=s.getOrBuildCachedBindings(e[0]);return i!=null?t.propertyType==y.cssValue?i.find(r=>(r.target==M.css||r.target==M.cssvar)&&r.targetName==t.name):t.propertyType==y.attribute?i.find(r=>r.target==M.attribute&&r.targetName==t.name):t.propertyType==y.property?i.find(r=>(r.target==M.property||r.target==M.explicitProperty)&&r.targetName==t.name):i.find(r=>(r.target==M.property||r.target==M.explicitProperty||r.target==M.attribute)&&r.targetName==t.name):null}getUnsetValue(e,t){return t.propertyType==y.cssValue?e!=null&&e.length!==0&&e[0].nodeType==E.Element?window.getComputedStyle(e[0].element)[t.name]:null:t.defaultValue}static recreateElements(e,t){for(let i of t){if(!e.isHandledElement(i))continue;let r="<"+i.name+" ";for(let o of i.element.attributes)r+=o.name+'="'+o.value.replaceAll('"',""")+'" ';r+="></"+i.name+">";let n=Ji(r,t[0].document);for(let o of[...i.element.childNodes])n.appendChild(o);n.style.pointerEvents="auto",i.node.insertAdjacentElement("beforebegin",n),i.node.parentNode&&i.node.parentNode.removeChild(i.node),i.replaceNode(n)}}getContextMenu(e,t){let i=[{title:"clear",action:r=>{t.service.clearValue(e,t,"value"),e[0].instanceServiceContainer.designerCanvas.extensionManager.refreshAllExtensions(e)}},{title:"edit as text",action:(r,n,o,a)=>{a.close(),setTimeout(async()=>{let l=t.service.getValue(e,t),c=prompt(`edit value of '${t.name}' as string:`,l);c&&c!=l&&await t.service.setValue(e,t,c),e[0].instanceServiceContainer.designerCanvas.extensionManager.refreshAllExtensions(e)},10)}}];return e[0].serviceContainer.config.openBindingsEditor&&(i.push({title:"-"},{title:"edit binding",action:()=>{let r=t.service.getPropertyTarget(e[0],t),n=t.service.getBinding(e,t);e[0].serviceContainer.config.openBindingsEditor(t,e,n,r)}}),t.service.isSet(e,t)==V.bound&&i.push({title:"clear binding",action:()=>{t.service.clearValue(e,t,"binding"),e[0].instanceServiceContainer.designerCanvas.extensionManager.refreshAllExtensions(e)}})),i}}});var G,te=u(()=>{"use strict";(function(s){s[s.none=0]="none",s[s.full=1]="full",s[s.fullOnValueChange=2]="fullOnValueChange",s[s.fullOnClassChange=3]="fullOnClassChange"})(G||(G={}))});var Le,Ot=u(()=>{"use strict";ue();fe();ee();te();Le=class extends K{getRefreshMode(e){return G.fullOnClassChange}async getProperties(e){return this.isHandledElement(e)?this.parseProperties(e.element.constructor.properties):null}parseProperties(e){let t=[];for(let i in e){let r=e[i],n=r,o=null,a=null;if(r.type&&(n=r.type,o=r.description,a=r.example),n===String){let l={name:i,type:"string",service:this,propertyType:y.propertyAndAttribute,description:o,example:a};t.push(l)}else if(n===Object){let l={name:i,type:"object",service:this,propertyType:y.propertyAndAttribute,description:o,example:a};t.push(l)}else if(n===Number){let l={name:i,type:"number",service:this,propertyType:y.propertyAndAttribute,description:o,example:a};t.push(l)}else if(n===Date){let l={name:i,type:"date",service:this,propertyType:y.propertyAndAttribute,description:o,example:a};t.push(l)}else if(n===Boolean){let l={name:i,type:"boolean",service:this,propertyType:y.propertyAndAttribute,description:o,example:a};t.push(l)}else if(R.isTypescriptEnum(n)){let l={name:i,type:"enum",enumValues:R.getTypescriptEnumEntries(n),service:this,propertyType:y.propertyAndAttribute,description:o,example:a};t.push(l)}else{let l={name:i,type:"string",service:this,propertyType:y.propertyAndAttribute,description:o,example:a};t.push(l)}}return t}getUnsetValue(e,t){return e[0].element[t.propertyName??t.name]}}});var ir,wo=u(()=>{"use strict";Ot();ir=class extends Le{name="polymer";isHandledElement(e){return e.element.constructor.polymerElementVersion!=null}_notifyChangedProperty(e,t,i){e.element.set(t.name,i)}}});var rr,Co=u(()=>{"use strict";Ot();rr=class extends Le{name="lit";isHandledElement(e){let t=e.element.constructor.__proto__;for(;t!=null;){if(t.name=="LitElement")return!0;if(t.name==null||t.name=="HTMLElement"||t.name=="Element"||t.name=="Node"||t.name=="HTMLElement")return!1;t=t.__proto__}return!1}_notifyChangedProperty(e,t,i){}}});var nr,Eo=u(()=>{"use strict";ee();te();fe();nr=class extends K{inputProperties=[{name:"type",type:"list",values:["text","number","button","checkbox","color","date","datetime-local","email","file","hidden","image","month","password","radio","range","reset","search","submit","tel","time","url","week"],service:this,defaultValue:"text",propertyType:y.propertyAndAttribute},{name:"value",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"placeholder",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"checked",type:"boolean",service:this,propertyType:y.propertyAndAttribute},{name:"min",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"max",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"readonly",type:"boolean",service:this,propertyType:y.propertyAndAttribute},{name:"valueAsDate",type:"string",service:this,propertyType:y.property},{name:"valueAsNumber",type:"string",service:this,propertyType:y.property}];textareaProperties=[{name:"value",type:"string",service:this,propertyType:y.property},{name:"placeholder",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"maxlength",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"cols",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"rows",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"readonly",type:"boolean",service:this,propertyType:y.propertyAndAttribute},{name:"resize",type:"list",values:["both","none","horizontal","vertical"],service:this,propertyType:y.cssValue}];selectProperties=[{name:"value",type:"string",service:this,propertyType:y.property},{name:"size",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"multiple",type:"boolean",service:this,propertyType:y.propertyAndAttribute}];buttonProperties=[{name:"type",type:"list",values:["button","submit","reset"],service:this,defaultValue:"button",propertyType:y.propertyAndAttribute},{name:"value",type:"string",service:this,propertyType:y.propertyAndAttribute}];anchorProperties=[{name:"href",type:"string",service:this,propertyType:y.propertyAndAttribute}];divProperties=[{name:"title",type:"string",service:this,propertyType:y.propertyAndAttribute}];imgProperties=[{name:"src",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"alt",type:"string",service:this,propertyType:y.propertyAndAttribute}];iframeProperties=[{name:"src",type:"string",service:this,propertyType:y.propertyAndAttribute}];formElementProperties=[{name:"autofocus",type:"boolean",service:this,propertyType:y.propertyAndAttribute},{name:"disabled",type:"boolean",service:this,propertyType:y.propertyAndAttribute},{name:"required",type:"boolean",service:this,propertyType:y.propertyAndAttribute}];meterProperties=[{name:"value",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"min",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"max",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"low",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"high",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"optimum",type:"number",service:this,propertyType:y.propertyAndAttribute}];name="native";getRefreshMode(e){return G.full}isHandledElement(e){switch(e.element.localName){case"input":case"textarea":case"select":case"button":case"a":case"div":case"span":case"br":case"img":case"iframe":case"meter":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"p":return!0}return!1}async getProperty(e,t){return(await this.getProperties(e)).find(i=>i.name==t)}async getProperties(e){if(!this.isHandledElement(e))return null;switch(e.element.localName){case"input":return[...this.inputProperties,...this.formElementProperties];case"textarea":return[...this.textareaProperties,...this.formElementProperties];case"select":return[...this.selectProperties,...this.formElementProperties];case"button":return[...this.buttonProperties,...this.formElementProperties];case"a":return this.anchorProperties;case"div":return this.divProperties;case"img":return this.imgProperties;case"iframe":return this.iframeProperties;case"meter":return this.meterProperties;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"p":return[]}return null}}});var Pe,Nt=u(()=>{"use strict";ee();fe();te();Pe=class extends K{getRefreshMode(e){return G.none}commonProperties=[{name:"class",type:"string",service:this,attributeName:"class",propertyName:"className",propertyType:y.attribute},{name:"title",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"part",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"tabindex",type:"number",service:this,propertyType:y.propertyAndAttribute}];name="common";isHandledElement(e){return!e.isRootItem}async getProperty(e,t){return this.commonProperties.find(i=>i.name==t)}async getProperties(e){return this.commonProperties}}});var sr,Ao=u(()=>{"use strict";Nt();ee();sr=class extends Pe{rectProperties=[{name:"x",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"y",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"width",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"height",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"rx",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"ry",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"pathLength",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"fill",type:"list",values:["transparent","black","white","blue","green","red","yellow","orange","brown","grey"],defaultValue:"transparent",service:this,propertyType:y.propertyAndAttribute},{name:"fill-opacity",type:"list",values:["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"],defaultValue:"1",service:this,propertyType:y.propertyAndAttribute}];lineProperties=[{name:"x1",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"y1",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"x2",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"y2",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"pathLength",type:"number",service:this,propertyType:y.propertyAndAttribute}];ellipseProperties=[{name:"cx",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"cy",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"rx",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"ry",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"pathLength",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"fill",type:"list",values:["transparent","black","white","blue","green","red","yellow","orange","brown","grey"],defaultValue:"transparent",service:this,propertyType:y.propertyAndAttribute},{name:"fill-opacity",type:"list",values:["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"],defaultValue:"1",service:this,propertyType:y.propertyAndAttribute}];pathProperties=[{name:"d",type:"string",defaultValue:"",service:this,propertyType:y.propertyAndAttribute},{name:"pathLength",type:"number",service:this,propertyType:y.propertyAndAttribute}];svgProperties=[{name:"width",type:"number",defaultValue:"auto",service:this,propertyType:y.cssValue},{name:"height",type:"number",defaultValue:"auto",service:this,propertyType:y.cssValue},{name:"viewBox",type:"number",service:this,propertyType:y.cssValue}];defaultProperties=[{name:"stroke",type:"list",values:["black","white","blue","green","red","yellow","orange","brown","grey"],defaultValue:"currentcolor",service:this,propertyType:y.propertyAndAttribute},{name:"stroke-width",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"stroke-opacity",type:"list",values:["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"],defaultValue:"1",service:this,propertyType:y.propertyAndAttribute},{name:"visibility",type:"list",values:["visible","hidden"],defaultValue:"visible",service:this,propertyType:y.propertyAndAttribute}];name="svg";isHandledElement(e){switch(e.element.localName){case"rect":case"line":case"ellipse":case"path":case"svg":return!0}return!1}async getProperty(e,t){return(await this.getProperties(e)).find(i=>i.name==t)}async getProperties(e){if(!this.isHandledElement(e))return null;switch(e.element.localName){case"rect":return[...this.rectProperties,...this.defaultProperties];case"line":return[...this.lineProperties,...this.defaultProperties];case"ellipse":return[...this.ellipseProperties,...this.defaultProperties];case"path":return[...this.pathProperties,...this.defaultProperties];case"svg":return this.svgProperties}return null}}});var Lt,Po=u(()=>{"use strict";Lt=class{constructor(e,t,i,r){this.title="Change Css Style "+t+" of <"+e.name+">",this.designItem=e,this.name=t,this.newValue=i,this.oldValue=r}title;get affectedItems(){return[this.designItem]}undo(){this.oldValue===""||this.oldValue==null?(this.designItem._withoutUndoRemoveStyle(this.name),this.name.startsWith("--")?this.designItem.element.style.removeProperty(this.name):this.designItem.element.style[this.name]=""):(this.designItem._withoutUndoSetStyle(this.name,this.oldValue),this.name.startsWith("--")?this.designItem.element.style.setProperty(this.name,this.oldValue):this.designItem.element.style[this.name]=this.oldValue)}do(){this.newValue===""||this.newValue==null?(this.designItem._withoutUndoRemoveStyle(this.name),this.name.startsWith("--")?this.designItem.element.style.removeProperty(this.name):this.designItem.element.style[this.name]=""):(this.designItem._withoutUndoSetStyle(this.name,this.newValue),this.name.startsWith("--")?this.designItem.element.style.setProperty(this.name,this.newValue):this.designItem.element.style[this.name]=this.newValue)}designItem;name;newValue;oldValue;mergeWith(e){return!1}}});var mi,ko=u(()=>{"use strict";mi=class s{constructor(e,t,i,r){this.title="Change Attribute "+t+" of <"+e.name+">",this.designItem=e,this.name=t,this.newValue=i,this.oldValue=r}title;get affectedItems(){return[this.designItem]}undo(){if(this.oldValue==null){this.designItem._withoutUndoRemoveAttribute(this.name);try{this.designItem.element.removeAttribute(this.name)}catch(e){e?.code!==5&&console.warn(e)}}else if(this.designItem._withoutUndoSetAttribute(this.name,this.oldValue),this.name!="draggable")try{typeof this.oldValue=="string"&&this.designItem.element.setAttribute(this.name,this.oldValue)}catch(e){e?.code!==5&&console.warn(e)}}do(){if(this.newValue==null){this.designItem._withoutUndoRemoveAttribute(this.name);try{this.designItem.element.removeAttribute(this.name)}catch(e){e?.code!==5&&console.warn(e)}}else if(this.designItem._withoutUndoSetAttribute(this.name,this.newValue),this.name!="draggable")try{typeof this.newValue=="string"&&this.designItem.element.setAttribute(this.name,this.newValue)}catch(e){e?.code!==5&&console.warn(e)}}designItem;name;newValue;oldValue;mergeWith(e){return e instanceof s&&this.designItem===e.designItem&&this.name===e.name?(this.newValue=e.newValue,!0):!1}}});var S,ke=u(()=>{"use strict";(function(s){s[s.Directly=0]="Directly",s[s.Permanent=1]="Permanent",s[s.Selection=2]="Selection",s[s.PrimarySelection=3]="PrimarySelection",s[s.PrimarySelectionContainer=4]="PrimarySelectionContainer",s[s.MouseOver=5]="MouseOver",s[s.OnlyOneItemSelected=6]="OnlyOneItemSelected",s[s.MultipleItemsSelected=7]="MultipleItemsSelected",s[s.ContainerDragOverAndCanBeEntered=8]="ContainerDragOverAndCanBeEntered",s[s.ContainerExternalDragOverAndCanBeEntered=9]="ContainerExternalDragOverAndCanBeEntered",s[s.ContainerDrag=10]="ContainerDrag",s[s.Doubleclick=11]="Doubleclick",s[s.Placement=12]="Placement",s[s.PrimarySelectionAndCanBeEntered=13]="PrimarySelectionAndCanBeEntered",s[s.PrimarySelectionContainerAndCanBeEntered=14]="PrimarySelectionContainerAndCanBeEntered",s[s.PrimarySelectionRefreshed=15]="PrimarySelectionRefreshed"})(S||(S={}))});var Re,or,ar,Io=u(()=>{"use strict";(function(s){s[s.Name=0]="Name",s[s.Value=1]="Value",s[s.InQuote=2]="InQuote"})(Re||(Re={}));or=class{constructor(e,t){this.name=e.trim(),this.value=t.trim()}name;value},ar=class{entries=[];parse(e,t="'"){this.entries=[];let i="",r="",n=Re.Name;for(let o=0;o<e.length;o++){let a=e[o];n===Re.Name?a===":"?n=Re.Value:a===";"?i="":i+=a:n===Re.Value?a===";"?(this.entries.push(new or(i,r)),i="",r="",n=Re.Name):(a===t&&(n=Re.InQuote),r+=a):n===Re.InQuote&&(a==="\\"?(r+=a,o++,a=e[o],r+=a):a===t?(r+=a,n=Re.Value):r+=a)}i.trim()!==""&&this.entries.push(new or(i,r))}}});var st,Do=u(()=>{"use strict";st=class{constructor(e,t,i){this.title="Move or Insert Item",this.designItem=e,this.newParent=t,this.newIndex=i}title;get affectedItems(){return this.oldParent?[this.designItem,this.newParent,this.oldParent]:[this.designItem,this.newParent]}undo(){this.oldParent?(this.oldParent._insertChildInternal(this.designItem,this.oldIndex),this.affectedItems[0].instanceServiceContainer.contentService.onContentChanged.emit({changeType:"moved",designItems:[this.designItem]})):(this.designItem.parent._removeChildInternal(this.designItem),this.affectedItems[0].instanceServiceContainer.contentService.onContentChanged.emit({changeType:"removed",designItems:[this.designItem]}))}do(){this.oldParent=this.designItem.parent,this.oldParent&&(this.oldIndex=this.designItem.parent.indexOf(this.designItem)),this.newParent._insertChildInternal(this.designItem,this.newIndex),this.affectedItems[0].instanceServiceContainer.contentService.onContentChanged.emit({changeType:this.oldParent?"moved":"added",designItems:[this.designItem]})}designItem;newParent;newIndex;oldParent;oldIndex;newItem;mergeWith(e){return!1}}});var lr,To=u(()=>{"use strict";lr=class{_textHolder="";indent=4;level=0;get position(){return this._textHolder.length}isLastCharNewline(){return this._textHolder[this._textHolder.length-1]===`
|
|
59
|
+
`;executeCommand(e){}canExecuteCommand(e){return!1}async ready(){this._text=this._getDomElement("text")}focusEditor(){requestAnimationFrame(()=>{this.focus(),this._text.focus()})}activated(){}update(e){this._text.value=e}getText(){return this._text.value}setSelection(e){this._text.setSelectionRange(e.start,e.start+e.length)}};customElements.define("node-projects-code-view-simple",di)});var Od,Qi,So=u(()=>{"use strict";Zi();_o();eh();bo();Od=!!(navigator.maxTouchPoints&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")),Qi=class extends Mt{config={codeViewWidget:di,demoViewWidget:ci};designerExtensions=new Map;removeDesignerExtensionOfType(e,t){let i=this.designerExtensions.get(e);for(let r=0;r<i.length;r++)i[r].constructor===t&&i.splice(r,1)}instanceServiceContainerCreatedCallbacks=[];designViewConfigButtons=[];designViewToolbarButtons=[];designerPointerExtensions=[];designerContextMenuExtensions;overlayLayerViewAdditionalStyles=[];globalContext=new qi(this);options={zoomDesignerBackground:!0,roundPixelsToDecimalPlaces:0,resizerPixelSize:Od?8:3};designerTools=new Map;get bindingService(){return this.getLastService("bindingService")}get bindableObjectsServices(){return this.getServices("bindableObjectsService")}get bindableObjectDragDropService(){return this.getLastService("bindableObjectDragDropService")}get propertyGridDragDropService(){return this.getLastService("propertyGridDragDropService")}get dragDropService(){return this.getLastService("dragDropService")}get elementInteractionServices(){return this.getServices("elementInteractionService")}get propertiesServices(){return this.getServices("propertyService")}get attachedPropertyServices(){return this.getServices("attachedPropertyService")}get propertyGroupService(){return this.getLastService("propertyGroupsService")}get containerServices(){return this.getServices("containerService")}get snaplinesProviderService(){return this.getLastService("snaplinesProviderService")}get elementsServices(){return this.getServices("elementsService")}get eventsService(){return this.getServices("eventsService")}get instanceServices(){return this.getServices("instanceService")}get editorTypesServices(){return this.getServices("editorTypesService")}get htmlWriterService(){return this.getLastService("htmlWriterService")}get htmlParserService(){return this.getLastService("htmlParserService")}get intializationService(){return this.getLastService("intializationService")}get elementAtPointService(){return this.getLastService("elementAtPointService")}get externalDragDropService(){return this.getLastService("externalDragDropService")}get copyPasteService(){return this.getLastService("copyPasteService")}get modelCommandService(){return this.getLastService("modelCommandService")}get demoProviderService(){return this.getLastService("demoProviderService")}get designItemService(){return this.getLastService("designItemService")}get configUiServices(){return this.getServices("configUiService")}get refactorServices(){return this.getServices("refactorService")}get deletionService(){return this.getLastService("deletionService")}}});var R,ue=u(()=>{"use strict";R=class{static isTypescriptEnum(e){if(e&&typeof e=="object"&&e.constructor==Object){for(let t in e){let i=typeof e[t];if(i!=="string"&&i!=="number")return!1}return!0}return!1}static getTypescriptEnumEntries(e){let t=[];for(let i in e)isNaN(i)&&t.push([i,e[i]]);return t}static camelToDashCase(e){return e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`)}static dashToCamelCase(e){return e.replace(/-([a-z])/g,t=>t[1].toUpperCase())}}});var V,Ke=u(()=>{"use strict";(function(s){s.none="none",s.all="all",s.some="some",s.bound="bound",s.fromStylesheet="fromStylesheet"})(V||(V={}))});var M,Ae=u(()=>{"use strict";(function(s){s.explicitProperty="explicitProperty",s.property="property",s.attribute="attribute",s.class="class",s.css="css",s.cssvar="cssvar",s.event="event",s.content="content",s.visible="visible"})(M||(M={}))});var y,ee=u(()=>{"use strict";(function(s){s.property="property",s.attribute="attribute",s.propertyAndAttribute="propertyAndAttribute",s.cssValue="cssvalue",s.complex="complex",s.add="add"})(y||(y={}))});var E,X=u(()=>{"use strict";(function(s){s[s.Element=1]="Element",s[s.Attribute=2]="Attribute",s[s.TextNode=3]="TextNode",s[s.Comment=8]="Comment",s[s.Document=9]="Document",s[s.DocumentFragment=11]="DocumentFragment"})(E||(E={}))});function _u(s){return s.getRootNode()?.host?.localName=="node-projects-designer-canvas"}function Ji(s,e){return e.createRange().createContextualFragment(s,{includeShadowRoots:!0}).firstChild}function nt(s,e){return s instanceof e||s instanceof(s.ownerDocument.defaultView??window)[e.name]}function pi(s,...e){for(let t of e)if(s instanceof t||s instanceof(s.ownerDocument.defaultView??window)[t.name])return!0;return!1}function vt(s){return s==null||pi(s,SVGElement,HTMLHtmlElement,HTMLHeadElement,HTMLBodyElement)?!1:(s.ownerDocument.defaultView??window).getComputedStyle(s).display.startsWith("inline")}function xt(s){return s==null||pi(s,SVGElement,HTMLHtmlElement,HTMLHeadElement,HTMLBodyElement)?!1:(s.ownerDocument.defaultView??window).getComputedStyle(s).display.startsWith("inline")}function ih(s){if(pi(s,SVGElement,HTMLHtmlElement,HTMLHeadElement,HTMLBodyElement)||nt(s,MathMLElement))return ve.block;let e=(s.ownerDocument.defaultView??window).getComputedStyle(s).display;return e=="none"?ve.none:e.startsWith("inline")?ve.inline:ve.block}function er(s){return s.textContent.trim()==""&&s.textContent.indexOf("\xA0")<0}function bu(){let s=document.activeElement,e=null;for(;s!=e;)e=s,s.shadowRoot!=null&&s.shadowRoot.activeElement&&(s=s.shadowRoot.activeElement);return s}function th(s){return s.assignedSlot?s.assignedSlot:s.parentElement==null&&nt(s.parentNode,ShadowRoot)?s.parentNode.host:s.parentElement}function Su(s){let e=th(s);for(;e;){let t=(s.ownerDocument.defaultView??window).getComputedStyle(s);if(t.position==="absolute"||t.position==="relative"||t.position==="fixed")return e;e=th(e)}return document.body}function wu(s){if(nt(s,HTMLElement))return{x:s.offsetLeft,y:s.offsetTop};{let e=s.getBoundingClientRect(),t=s.parentElement.getBoundingClientRect();return{x:e.x-t.x,y:e.y-t.y}}}function Cu(s,e,t={}){let i=0,r=0,n;t?n=t[Nd]??=new Map:n=new Map;let o=[],a=s;for(;a;){let l=n.get(a);if(l){i+=l.offsetLeft,r+=l.offsetTop,o.forEach(f=>{f.offsetLeft+=l.offsetLeft,f.offsetTop+=l.offsetTop});break}let c=a.offsetParent?a.offsetParent:a.getRootNode().host;pi(a,SVGSVGElement,HTMLBodyElement,HTMLHtmlElement)?c=a.parentElement?a.parentElement:a.getRootNode().host:nt(a,SVGGraphicsElement)?c=a.ownerSVGElement:nt(a,MathMLElement)&&(c=a.parentElement??c);let h=0,d=0;if(nt(a,HTMLElement)){let f=a.parentElement;for(;f!==null&&f!==c;)h+=f.scrollLeft,d+=f.scrollTop,f=f.parentElement}c&&(h+=c.scrollLeft,d+=c.scrollTop);let p=0,g=0;if(pi(a,SVGSVGElement,MathMLElement)){let f=a.style.transform;a.style.transform="";let b=a.getBoundingClientRect(),x=a.parentElement?a.parentElement.getBoundingClientRect():a.getRootNode().host.getBoundingClientRect();a.style.transform=f,p=(b.left-x.left)/e,g=(b.top-x.top)/e}else if(nt(a,SVGGraphicsElement)){let f=a.getBBox();p=f.x,g=f.y}else if(s==a&&(s===s.ownerDocument.body||nt(s,HTMLHtmlElement))){let f=(s.ownerDocument.defaultView??window).getComputedStyle(s);p=s.offsetLeft-h+parseInt(f.marginLeft),g=s.offsetTop-d+parseInt(f.marginTop)}else p=a.offsetLeft-h,g=a.offsetTop-d;o.forEach(f=>{f.offsetLeft+=p,f.offsetTop+=g});let m={offsetLeft:p,offsetTop:g};o.push(m),n.set(a,m),i+=p,r+=g,a=c}return{offsetLeft:i,offsetTop:r}}function rh(s){let e=parseInt(getComputedStyle(s).paddingLeft.replace("px",""))+parseInt(getComputedStyle(s).marginLeft.replace("px",""))+parseInt(getComputedStyle(s).borderLeft.replace("px",""))+parseInt(getComputedStyle(s).paddingRight.replace("px",""))+parseInt(getComputedStyle(s).marginRight.replace("px",""))+parseInt(getComputedStyle(s).borderRight.replace("px","")),t=parseInt(getComputedStyle(s).paddingTop.replace("px",""))+parseInt(getComputedStyle(s).marginTop.replace("px",""))+parseInt(getComputedStyle(s).borderTop.replace("px",""))+parseInt(getComputedStyle(s).paddingBottom.replace("px",""))+parseInt(getComputedStyle(s).marginBottom.replace("px",""))+parseInt(getComputedStyle(s).borderBottom.replace("px",""));return{x:e,y:t}}function tr(s,e){let t={x:Number.MAX_VALUE,y:Number.MAX_VALUE},i={x:Number.MIN_VALUE,y:Number.MIN_VALUE},r;for(let n of s)n.nodeType==E.TextNode||n.nodeType==E.Comment||(r={x:e.getNormalizedElementCoordinates(n.element).x,y:e.getNormalizedElementCoordinates(n.element).y,width:e.getNormalizedElementCoordinates(n.element).width,height:e.getNormalizedElementCoordinates(n.element).height},r.x<t.x&&(t.x=r.x),r.y<t.y&&(t.y=r.y),r.x+r.width>i.x&&(i.x=r.x+r.width),r.y+r.height>i.y&&(i.y=r.y+r.height));return{x:t.x,y:t.y,width:i.x-t.x,height:i.y-t.y}}var ve,Nd,Ye=u(()=>{"use strict";X();(function(s){s[s.none=0]="none",s[s.inline=1]="inline",s[s.block=2]="block"})(ve||(ve={}));Nd=Symbol("windowOffsetsCacheKey")});var K,fe=u(()=>{"use strict";Ke();ue();Ae();ee();X();Ye();K=class s{constructor(e){this._recreateElementsOnPropertyChange=e}_recreateElementsOnPropertyChange=!1;static _stylesCache=new Map;_cssCacheClearTimer;static _bindingsCache=new Map;static _bindingsCacheClearTimer;_notifyChangedProperty(e,t,i){}async getProperty(e,t){let i=await this.getProperties(e);return"properties"in i[0]?i.flatMap(r=>r.properties).find(r=>r.name==t):i.find(r=>r.name==t)}async setValue(e,t,i){let r=e[0].openGroup("property changed: "+t.name+" to "+i);for(let n of e)if(this.isHandledElement(n)&&this.getProperty(n,t.name)){if(t.propertyType==y.cssValue)await n.updateStyleInSheetOrLocalAsync(t.name,i),n.element.setAttribute("style",n.element.getAttribute("style"));else{let o=t.attributeName;if(o||(o=R.camelToDashCase(t.name)),t.type==="object"){let a=JSON.stringify(i);(t.propertyType==y.attribute||t.propertyType==y.propertyAndAttribute)&&n.setAttribute(o,a),(t.propertyType==y.property||t.propertyType==y.propertyAndAttribute)&&(n.element[t.name]=i)}else t.type=="boolean"&&(i===!1||i==null)?((t.propertyType==y.attribute||t.propertyType==y.propertyAndAttribute)&&n.removeAttribute(o),(t.propertyType==y.property||t.propertyType==y.propertyAndAttribute)&&(n.element[t.name]=!1)):t.type=="boolean"&&i===!0?((t.propertyType==y.attribute||t.propertyType==y.propertyAndAttribute)&&n.setAttribute(o,""),(t.propertyType==y.property||t.propertyType==y.propertyAndAttribute)&&(n.element[t.name]=!0)):((t.propertyType==y.attribute||t.propertyType==y.propertyAndAttribute)&&n.setAttribute(o,i.toString()),(t.propertyType==y.property||t.propertyType==y.propertyAndAttribute)&&(n.element[t.name]=i))}this._notifyChangedProperty(n,t,i)}r.commit(),this._recreateElementsOnPropertyChange&&s.recreateElements(this,e)}getPropertyTarget(e,t){return t.propertyType==y.attribute?M.attribute:t.propertyType==y.cssValue?M.css:M.property}clearValue(e,t,i){let r=e[0].openGroup("property cleared: "+t.name);for(let n of e){if(i!="binding"){if(t.propertyType==y.cssValue)n.removeStyle(t.name);else if((t.propertyType==y.property||t.propertyType==y.propertyAndAttribute)&&(n.element[t.name]=null),t.propertyType==y.attribute||t.propertyType==y.propertyAndAttribute){let o=t.attributeName;o||(o=R.camelToDashCase(t.name)),n.removeAttribute(o)}}i!="value"&&n.serviceContainer.forSomeServicesTillResult("bindingService",o=>o.clearBinding(n,t.name,this.getPropertyTarget(n,t))),this._notifyChangedProperty(n,t,void 0)}r.commit(),this._recreateElementsOnPropertyChange&&s.recreateElements(this,e)}isSet(e,t){let i=!0,r=!1;if(e!=null&&e.length!==0){let n=t.attributeName;n||(n=R.camelToDashCase(t.name));for(let a of e){let l=!1;if(t.propertyType==y.cssValue?l=a.hasStyle(t.name):l=a.hasAttribute(n),i=i&&l,r=r||l,!i&&r)break}let o=s.getOrBuildCachedBindings(e[0]);if(t.propertyType==y.cssValue){if(o&&o.find(a=>(a.target==M.css||a.target==M.cssvar)&&a.targetName==t.name))return V.bound}else if(t.propertyType==y.attribute){if(o&&o.find(a=>a.target==M.attribute&&a.targetName==t.name))return V.bound}else if(t.propertyType==y.property){if(o&&o.find(a=>(a.target==M.property||a.target==M.explicitProperty)&&a.targetName==t.name))return V.bound}else if(o&&o.find(a=>(a.target==M.property||a.target==M.explicitProperty||a.target==M.attribute)&&a.targetName==t.name))return V.bound;if(!i&&t.propertyType==y.cssValue){let a=s._stylesCache.get(e[0]);if(a||(a=new Set(e[0].getAllStyles().filter(c=>c.selector!=null).flatMap(c=>c.declarations).map(c=>c.name)),s._stylesCache.set(e[0],a),clearTimeout(this._cssCacheClearTimer),this._cssCacheClearTimer=setTimeout(()=>s._stylesCache.clear(),30)),a.has(t.name))return V.fromStylesheet}}else return V.none;return i?V.all:r?V.some:V.none}static getOrBuildCachedBindings(e){let t=s._bindingsCache.get(e);if(!t){let i=e.serviceContainer.getServices("bindingService");if(t=[],i)for(let r of i){let n=r.getBindings(e);n&&n.length>0&&t.push(...n)}s._bindingsCache.set(e,t),clearTimeout(this._bindingsCacheClearTimer),this._bindingsCacheClearTimer=setTimeout(()=>s._bindingsCache.clear(),30)}return t}getValue(e,t){if(e!=null&&e.length!==0)if(t.propertyType==y.cssValue){let i=e[0].getStyle(t.name);for(let r of e)if(r.getStyle(t.name)!=i){i=null;break}return i}else{let i=t.attributeName;if(i||(i=R.camelToDashCase(t.name)),t.type=="boolean"){if(e[0].hasAttribute(i)){let n=e[0].getAttribute(i);return n==""?!0:n}return!1}return e[0].getAttribute(i)}return null}getBinding(e,t){let i=s.getOrBuildCachedBindings(e[0]);return i!=null?t.propertyType==y.cssValue?i.find(r=>(r.target==M.css||r.target==M.cssvar)&&r.targetName==t.name):t.propertyType==y.attribute?i.find(r=>r.target==M.attribute&&r.targetName==t.name):t.propertyType==y.property?i.find(r=>(r.target==M.property||r.target==M.explicitProperty)&&r.targetName==t.name):i.find(r=>(r.target==M.property||r.target==M.explicitProperty||r.target==M.attribute)&&r.targetName==t.name):null}getUnsetValue(e,t){return t.propertyType==y.cssValue?e!=null&&e.length!==0&&e[0].nodeType==E.Element?window.getComputedStyle(e[0].element)[t.name]:null:t.defaultValue}static recreateElements(e,t){for(let i of t){if(!e.isHandledElement(i))continue;let r="<"+i.name+" ";for(let o of i.element.attributes)r+=o.name+'="'+o.value.replaceAll('"',""")+'" ';r+="></"+i.name+">";let n=Ji(r,t[0].document);for(let o of[...i.element.childNodes])n.appendChild(o);n.style.pointerEvents="auto",i.node.insertAdjacentElement("beforebegin",n),i.node.parentNode&&i.node.parentNode.removeChild(i.node),i.replaceNode(n)}}getContextMenu(e,t){let i=[{title:"clear",action:r=>{t.service.clearValue(e,t,"value"),e[0].instanceServiceContainer.designerCanvas.extensionManager.refreshAllExtensions(e)}},{title:"edit as text",action:(r,n,o,a)=>{a.close(),setTimeout(async()=>{let l=t.service.getValue(e,t),c=prompt(`edit value of '${t.name}' as string:`,l);c&&c!=l&&await t.service.setValue(e,t,c),e[0].instanceServiceContainer.designerCanvas.extensionManager.refreshAllExtensions(e)},10)}}];return e[0].serviceContainer.config.openBindingsEditor&&(i.push({title:"-"},{title:"edit binding",action:()=>{let r=t.service.getPropertyTarget(e[0],t),n=t.service.getBinding(e,t);e[0].serviceContainer.config.openBindingsEditor(t,e,n,r)}}),t.service.isSet(e,t)==V.bound&&i.push({title:"clear binding",action:()=>{t.service.clearValue(e,t,"binding"),e[0].instanceServiceContainer.designerCanvas.extensionManager.refreshAllExtensions(e)}})),i}}});var G,te=u(()=>{"use strict";(function(s){s[s.none=0]="none",s[s.full=1]="full",s[s.fullOnValueChange=2]="fullOnValueChange",s[s.fullOnClassChange=3]="fullOnClassChange"})(G||(G={}))});var Le,Ot=u(()=>{"use strict";ue();fe();ee();te();Le=class extends K{getRefreshMode(e){return G.fullOnClassChange}async getProperties(e){return this.isHandledElement(e)?this.parseProperties(e.element.constructor.properties):null}parseProperties(e){let t=[];for(let i in e){let r=e[i],n=r,o=null,a=null,l=!1;if(r.type&&(n=r.type,o=r.description,a=r.example,l=r.readonly),n===String){let c={name:i,type:"string",service:this,propertyType:y.propertyAndAttribute,description:o,example:a,readonly:l};t.push(c)}else if(n===Object){let c={name:i,type:"object",service:this,propertyType:y.propertyAndAttribute,description:o,example:a,readonly:l};t.push(c)}else if(n===Number){let c={name:i,type:"number",service:this,propertyType:y.propertyAndAttribute,description:o,example:a,readonly:l};t.push(c)}else if(n===Date){let c={name:i,type:"date",service:this,propertyType:y.propertyAndAttribute,description:o,example:a,readonly:l};t.push(c)}else if(n===Boolean){let c={name:i,type:"boolean",service:this,propertyType:y.propertyAndAttribute,description:o,example:a,readonly:l};t.push(c)}else if(R.isTypescriptEnum(n)){let c={name:i,type:"enum",enumValues:R.getTypescriptEnumEntries(n),service:this,propertyType:y.propertyAndAttribute,description:o,example:a,readonly:l};t.push(c)}else{let c={name:i,type:"string",service:this,propertyType:y.propertyAndAttribute,description:o,example:a,readonly:l};t.push(c)}}return t}getUnsetValue(e,t){return e[0].element[t.propertyName??t.name]}}});var ir,wo=u(()=>{"use strict";Ot();ir=class extends Le{name="polymer";isHandledElement(e){return e.element.constructor.polymerElementVersion!=null}_notifyChangedProperty(e,t,i){e.element.set(t.name,i)}}});var rr,Co=u(()=>{"use strict";Ot();rr=class extends Le{name="lit";isHandledElement(e){let t=e.element.constructor.__proto__;for(;t!=null;){if(t.name=="LitElement")return!0;if(t.name==null||t.name=="HTMLElement"||t.name=="Element"||t.name=="Node"||t.name=="HTMLElement")return!1;t=t.__proto__}return!1}_notifyChangedProperty(e,t,i){}}});var nr,Eo=u(()=>{"use strict";ee();te();fe();nr=class extends K{inputProperties=[{name:"type",type:"list",values:["text","number","button","checkbox","color","date","datetime-local","email","file","hidden","image","month","password","radio","range","reset","search","submit","tel","time","url","week"],service:this,defaultValue:"text",propertyType:y.propertyAndAttribute},{name:"value",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"placeholder",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"checked",type:"boolean",service:this,propertyType:y.propertyAndAttribute},{name:"min",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"max",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"readonly",type:"boolean",service:this,propertyType:y.propertyAndAttribute},{name:"valueAsDate",type:"string",service:this,propertyType:y.property},{name:"valueAsNumber",type:"string",service:this,propertyType:y.property}];textareaProperties=[{name:"value",type:"string",service:this,propertyType:y.property},{name:"placeholder",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"maxlength",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"cols",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"rows",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"readonly",type:"boolean",service:this,propertyType:y.propertyAndAttribute},{name:"resize",type:"list",values:["both","none","horizontal","vertical"],service:this,propertyType:y.cssValue}];selectProperties=[{name:"value",type:"string",service:this,propertyType:y.property},{name:"size",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"multiple",type:"boolean",service:this,propertyType:y.propertyAndAttribute}];buttonProperties=[{name:"type",type:"list",values:["button","submit","reset"],service:this,defaultValue:"button",propertyType:y.propertyAndAttribute},{name:"value",type:"string",service:this,propertyType:y.propertyAndAttribute}];anchorProperties=[{name:"href",type:"string",service:this,propertyType:y.propertyAndAttribute}];divProperties=[{name:"title",type:"string",service:this,propertyType:y.propertyAndAttribute}];imgProperties=[{name:"src",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"alt",type:"string",service:this,propertyType:y.propertyAndAttribute}];iframeProperties=[{name:"src",type:"string",service:this,propertyType:y.propertyAndAttribute}];formElementProperties=[{name:"autofocus",type:"boolean",service:this,propertyType:y.propertyAndAttribute},{name:"disabled",type:"boolean",service:this,propertyType:y.propertyAndAttribute},{name:"required",type:"boolean",service:this,propertyType:y.propertyAndAttribute}];meterProperties=[{name:"value",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"min",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"max",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"low",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"high",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"optimum",type:"number",service:this,propertyType:y.propertyAndAttribute}];name="native";getRefreshMode(e){return G.full}isHandledElement(e){switch(e.element.localName){case"input":case"textarea":case"select":case"button":case"a":case"div":case"span":case"br":case"img":case"iframe":case"meter":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"p":return!0}return!1}async getProperty(e,t){return(await this.getProperties(e)).find(i=>i.name==t)}async getProperties(e){if(!this.isHandledElement(e))return null;switch(e.element.localName){case"input":return[...this.inputProperties,...this.formElementProperties];case"textarea":return[...this.textareaProperties,...this.formElementProperties];case"select":return[...this.selectProperties,...this.formElementProperties];case"button":return[...this.buttonProperties,...this.formElementProperties];case"a":return this.anchorProperties;case"div":return this.divProperties;case"img":return this.imgProperties;case"iframe":return this.iframeProperties;case"meter":return this.meterProperties;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"p":return[]}return null}}});var Pe,Nt=u(()=>{"use strict";ee();fe();te();Pe=class extends K{getRefreshMode(e){return G.none}commonProperties=[{name:"class",type:"string",service:this,attributeName:"class",propertyName:"className",propertyType:y.attribute},{name:"title",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"part",type:"string",service:this,propertyType:y.propertyAndAttribute},{name:"tabindex",type:"number",service:this,propertyType:y.propertyAndAttribute}];name="common";isHandledElement(e){return!e.isRootItem}async getProperty(e,t){return this.commonProperties.find(i=>i.name==t)}async getProperties(e){return this.commonProperties}}});var sr,Ao=u(()=>{"use strict";Nt();ee();sr=class extends Pe{rectProperties=[{name:"x",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"y",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"width",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"height",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"rx",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"ry",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"pathLength",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"fill",type:"list",values:["transparent","black","white","blue","green","red","yellow","orange","brown","grey"],defaultValue:"transparent",service:this,propertyType:y.propertyAndAttribute},{name:"fill-opacity",type:"list",values:["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"],defaultValue:"1",service:this,propertyType:y.propertyAndAttribute}];lineProperties=[{name:"x1",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"y1",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"x2",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"y2",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"pathLength",type:"number",service:this,propertyType:y.propertyAndAttribute}];ellipseProperties=[{name:"cx",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"cy",type:"number",defaultValue:"0",service:this,propertyType:y.propertyAndAttribute},{name:"rx",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"ry",type:"number",defaultValue:"auto",service:this,propertyType:y.propertyAndAttribute},{name:"pathLength",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"fill",type:"list",values:["transparent","black","white","blue","green","red","yellow","orange","brown","grey"],defaultValue:"transparent",service:this,propertyType:y.propertyAndAttribute},{name:"fill-opacity",type:"list",values:["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"],defaultValue:"1",service:this,propertyType:y.propertyAndAttribute}];pathProperties=[{name:"d",type:"string",defaultValue:"",service:this,propertyType:y.propertyAndAttribute},{name:"pathLength",type:"number",service:this,propertyType:y.propertyAndAttribute}];svgProperties=[{name:"width",type:"number",defaultValue:"auto",service:this,propertyType:y.cssValue},{name:"height",type:"number",defaultValue:"auto",service:this,propertyType:y.cssValue},{name:"viewBox",type:"number",service:this,propertyType:y.cssValue}];defaultProperties=[{name:"stroke",type:"list",values:["black","white","blue","green","red","yellow","orange","brown","grey"],defaultValue:"currentcolor",service:this,propertyType:y.propertyAndAttribute},{name:"stroke-width",type:"number",service:this,propertyType:y.propertyAndAttribute},{name:"stroke-opacity",type:"list",values:["0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"],defaultValue:"1",service:this,propertyType:y.propertyAndAttribute},{name:"visibility",type:"list",values:["visible","hidden"],defaultValue:"visible",service:this,propertyType:y.propertyAndAttribute}];name="svg";isHandledElement(e){switch(e.element.localName){case"rect":case"line":case"ellipse":case"path":case"svg":return!0}return!1}async getProperty(e,t){return(await this.getProperties(e)).find(i=>i.name==t)}async getProperties(e){if(!this.isHandledElement(e))return null;switch(e.element.localName){case"rect":return[...this.rectProperties,...this.defaultProperties];case"line":return[...this.lineProperties,...this.defaultProperties];case"ellipse":return[...this.ellipseProperties,...this.defaultProperties];case"path":return[...this.pathProperties,...this.defaultProperties];case"svg":return this.svgProperties}return null}}});var Lt,Po=u(()=>{"use strict";Lt=class{constructor(e,t,i,r){this.title="Change Css Style "+t+" of <"+e.name+">",this.designItem=e,this.name=t,this.newValue=i,this.oldValue=r}title;get affectedItems(){return[this.designItem]}undo(){this.oldValue===""||this.oldValue==null?(this.designItem._withoutUndoRemoveStyle(this.name),this.name.startsWith("--")?this.designItem.element.style.removeProperty(this.name):this.designItem.element.style[this.name]=""):(this.designItem._withoutUndoSetStyle(this.name,this.oldValue),this.name.startsWith("--")?this.designItem.element.style.setProperty(this.name,this.oldValue):this.designItem.element.style[this.name]=this.oldValue)}do(){this.newValue===""||this.newValue==null?(this.designItem._withoutUndoRemoveStyle(this.name),this.name.startsWith("--")?this.designItem.element.style.removeProperty(this.name):this.designItem.element.style[this.name]=""):(this.designItem._withoutUndoSetStyle(this.name,this.newValue),this.name.startsWith("--")?this.designItem.element.style.setProperty(this.name,this.newValue):this.designItem.element.style[this.name]=this.newValue)}designItem;name;newValue;oldValue;mergeWith(e){return!1}}});var mi,ko=u(()=>{"use strict";mi=class s{constructor(e,t,i,r){this.title="Change Attribute "+t+" of <"+e.name+">",this.designItem=e,this.name=t,this.newValue=i,this.oldValue=r}title;get affectedItems(){return[this.designItem]}undo(){if(this.oldValue==null){this.designItem._withoutUndoRemoveAttribute(this.name);try{this.designItem.element.removeAttribute(this.name)}catch(e){e?.code!==5&&console.warn(e)}}else if(this.designItem._withoutUndoSetAttribute(this.name,this.oldValue),this.name!="draggable")try{typeof this.oldValue=="string"&&this.designItem.element.setAttribute(this.name,this.oldValue)}catch(e){e?.code!==5&&console.warn(e)}}do(){if(this.newValue==null){this.designItem._withoutUndoRemoveAttribute(this.name);try{this.designItem.element.removeAttribute(this.name)}catch(e){e?.code!==5&&console.warn(e)}}else if(this.designItem._withoutUndoSetAttribute(this.name,this.newValue),this.name!="draggable")try{typeof this.newValue=="string"&&this.designItem.element.setAttribute(this.name,this.newValue)}catch(e){e?.code!==5&&console.warn(e)}}designItem;name;newValue;oldValue;mergeWith(e){return e instanceof s&&this.designItem===e.designItem&&this.name===e.name?(this.newValue=e.newValue,!0):!1}}});var S,ke=u(()=>{"use strict";(function(s){s[s.Directly=0]="Directly",s[s.Permanent=1]="Permanent",s[s.Selection=2]="Selection",s[s.PrimarySelection=3]="PrimarySelection",s[s.PrimarySelectionContainer=4]="PrimarySelectionContainer",s[s.MouseOver=5]="MouseOver",s[s.OnlyOneItemSelected=6]="OnlyOneItemSelected",s[s.MultipleItemsSelected=7]="MultipleItemsSelected",s[s.ContainerDragOverAndCanBeEntered=8]="ContainerDragOverAndCanBeEntered",s[s.ContainerExternalDragOverAndCanBeEntered=9]="ContainerExternalDragOverAndCanBeEntered",s[s.ContainerDrag=10]="ContainerDrag",s[s.Doubleclick=11]="Doubleclick",s[s.Placement=12]="Placement",s[s.PrimarySelectionAndCanBeEntered=13]="PrimarySelectionAndCanBeEntered",s[s.PrimarySelectionContainerAndCanBeEntered=14]="PrimarySelectionContainerAndCanBeEntered",s[s.PrimarySelectionRefreshed=15]="PrimarySelectionRefreshed"})(S||(S={}))});var Re,or,ar,Io=u(()=>{"use strict";(function(s){s[s.Name=0]="Name",s[s.Value=1]="Value",s[s.InQuote=2]="InQuote"})(Re||(Re={}));or=class{constructor(e,t){this.name=e.trim(),this.value=t.trim()}name;value},ar=class{entries=[];parse(e,t="'"){this.entries=[];let i="",r="",n=Re.Name;for(let o=0;o<e.length;o++){let a=e[o];n===Re.Name?a===":"?n=Re.Value:a===";"?i="":i+=a:n===Re.Value?a===";"?(this.entries.push(new or(i,r)),i="",r="",n=Re.Name):(a===t&&(n=Re.InQuote),r+=a):n===Re.InQuote&&(a==="\\"?(r+=a,o++,a=e[o],r+=a):a===t?(r+=a,n=Re.Value):r+=a)}i.trim()!==""&&this.entries.push(new or(i,r))}}});var st,Do=u(()=>{"use strict";st=class{constructor(e,t,i){this.title="Move or Insert Item",this.designItem=e,this.newParent=t,this.newIndex=i}title;get affectedItems(){return this.oldParent?[this.designItem,this.newParent,this.oldParent]:[this.designItem,this.newParent]}undo(){this.oldParent?(this.oldParent._insertChildInternal(this.designItem,this.oldIndex),this.affectedItems[0].instanceServiceContainer.contentService.onContentChanged.emit({changeType:"moved",designItems:[this.designItem]})):(this.designItem.parent._removeChildInternal(this.designItem),this.affectedItems[0].instanceServiceContainer.contentService.onContentChanged.emit({changeType:"removed",designItems:[this.designItem]}))}do(){this.oldParent=this.designItem.parent,this.oldParent&&(this.oldIndex=this.designItem.parent.indexOf(this.designItem)),this.newParent._insertChildInternal(this.designItem,this.newIndex),this.affectedItems[0].instanceServiceContainer.contentService.onContentChanged.emit({changeType:this.oldParent?"moved":"added",designItems:[this.designItem]})}designItem;newParent;newIndex;oldParent;oldIndex;newItem;mergeWith(e){return!1}}});var lr,To=u(()=>{"use strict";lr=class{_textHolder="";indent=4;level=0;get position(){return this._textHolder.length}isLastCharNewline(){return this._textHolder[this._textHolder.length-1]===`
|
|
60
60
|
`}levelRaise(){this.level++}levelShrink(){this.level--}write(e){this._textHolder+=e}writeLine(e){this.writeIndent(),this._textHolder+=e,this.writeNewline()}writeIndent(){this._textHolder+="".padEnd(this.level*this.indent," ")}writeNewline(){this._textHolder+=`
|
|
61
61
|
`}getString(){return this._textHolder}}});var cr,nh=u(()=>{"use strict";cr=class{_textHolder="";get position(){return this._textHolder.length}isLastCharNewline(){return this._textHolder[this._textHolder.length-1]===`
|
|
62
62
|
`}levelRaise(){}levelShrink(){}write(e){this._textHolder+=e}writeLine(e){this._textHolder+=e}writeIndent(){}writeNewline(){}getString(){return this._textHolder}}});var U,Ie=u(()=>{"use strict";To();nh();U=class{static normalizeAttributeValue(e,t=!1){return typeof e=="number"&&(e=e.toString()),e?t?e.replaceAll("&","&").replaceAll("'","'").replaceAll("<","<").replaceAll(">",">"):e.replaceAll("&","&").replaceAll('"',""").replaceAll("<","<").replaceAll(">",">"):e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}static normalizeContentValue(e){return e&&e.replaceAll("&","&").replaceAll("<","<").replaceAll("\xA0"," ")}static IsSelfClosingElement(e){return e==="area"||e==="base"||e==="br"||e==="col"||e==="embed"||e==="hr"||e==="img"||e==="input"||e==="keygen"||e==="link"||e==="meta"||e==="param"||e==="source"||e==="track"||e==="wbr"}static ConvertToString(e,t,i=!1){let r=t!==!1?new lr:new cr;return e[0].serviceContainer.htmlWriterService.write(r,e,!0,i),r.getString()}}});import{css as Ld}from"@node-projects/base-custom-webcomponent";var le,Mo,ot=u(()=>{"use strict";le=class s{static _contextMenuCss=Ld`
|
|
@@ -178,12 +178,12 @@ var gd=Object.defineProperty;var u=(s,e)=>()=>(s&&(e=s(s=0)),e);var yd=(s,e)=>{f
|
|
|
178
178
|
|
|
179
179
|
.context_menu li.context_menu_marked {
|
|
180
180
|
background-color: #5ebdec;
|
|
181
|
-
}`;static count=0;static _openedContextMenus=new Set;menu;options;context;num;_menuElement;constructor(e,t,i){this.num=s.count++,this.menu=e,this.options=t,this.context=i,this.reload(),this._windowDown=this._windowDown.bind(this),this._windowKeyUp=this._windowKeyUp.bind(this),this._windowResize=this._windowResize.bind(this)}reload(){let e=this.options?.shadowRoot??document;this._menuElement==null&&(this._menuElement=document.createElement("div"),this._menuElement.className="context_menu",this._menuElement.id="context_menu_"+this.num,e===document?document.body.appendChild(this._menuElement):e.appendChild(this._menuElement)),this._menuElement.innerHTML="",e.adoptedStyleSheets.indexOf(s._contextMenuCss)<0&&(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s._contextMenuCss]),this._menuElement.appendChild(this.renderLevel(this.menu))}renderLevel(e){let t=document.createElement("ul"),i=!1;return e.forEach(r=>{if(r.title!=="-"){if(i){let c=document.createElement("li");c.className="context_menu_divider",i=!1,t.appendChild(c)}let n=document.createElement("li"),o=document.createElement("span");o.className="context_menu_icon_span",r.checked===!0?o.innerHTML="\u2714":(r.icon??"")!=""?o.innerHTML=r.icon:o.innerHTML=this.options?.defaultIcon??"";let a=document.createElement("span");a.className="context_menu_text",a.innerHTML=r.title;let l=document.createElement("span");if(l.className="context_menu_sub_span",r.children!=null&&(l.innerHTML=this.options?.subIcon??"›"),n.appendChild(o),n.appendChild(a),n.appendChild(l),r.disabled)n.setAttribute("disabled","");else if(r.action&&n.addEventListener("click",c=>{c.stopPropagation(),c.preventDefault(),r.action(c,r,this.context,this),this.close()}),this.options?.mode=="undo"&&n.addEventListener("mouseup",c=>{c.stopPropagation(),r.action(c,r,this.context,this),this.close()}),r.children!=null){let c=this.renderLevel(r.children);n.appendChild(c),n.addEventListener("mouseenter",()=>{let h=c.getBoundingClientRect();if(h.top+h.height>window.innerHeight&&(c.style.top="unset",c.style.bottom="0"),this.options?.mode=="undo"){let d=!0;for(let p of n.parentElement.children)d?p.classList.add("context_menu_marked"):p.classList.remove("context_menu_marked"),p==n&&(d=!1)}})}else this.options?.mode=="undo"&&n.addEventListener("mouseenter",()=>{let c=!0;for(let h of n.parentElement.children)c?h.classList.add("context_menu_marked"):h.classList.remove("context_menu_marked"),h==n&&(c=!1)});t.appendChild(n)}else i=!0}),t}display(e){let t=this._menuElement,i={x:e.clientX,y:e.clientY},r=i.x,n=i.y,o=t.offsetWidth+4,a=t.offsetHeight+4,l=window.innerWidth,c=window.innerHeight,h=this.options?.mouseOffset!=null?this.options.mouseOffset:2;l-r<o?t.style.left=l-o+"px":t.style.left=r+h+"px",c-n<a?t.style.top=c-a+"px":t.style.top=n+h+"px";let d=Mo.getSizes(t);l-r<d.width?t.classList.add("context_menu_border_right"):t.classList.remove("context_menu_border_right"),c-n<d.height?t.classList.add("context_menu_border_bottom"):t.classList.remove("context_menu_border_bottom"),t.classList.add("context_menu_display"),e.preventDefault(),window.addEventListener("keyup",this._windowKeyUp),window.addEventListener("mousedown",this._windowDown),window.addEventListener("resize",this._windowResize),setTimeout(()=>window.addEventListener("contextmenu",this._windowDown),100),s._openedContextMenus.add(this)}_windowResize(){this.close()}_windowDown(e){return e.preventDefault(),e.composedPath().indexOf(this._menuElement)<0&&this.close(),!1}_windowKeyUp(e){e.key==="Escape"&&this.close()}static show(e,t,i,r){let n=new s(e,i,r);return n.display(t),n}close(){this._menuElement.remove(),window.removeEventListener("keyup",this._windowKeyUp),window.removeEventListener("mousedown",this._windowDown),window.removeEventListener("resize",this._windowResize),setTimeout(()=>window.removeEventListener("contextmenu",this._windowDown),10),s._openedContextMenus.delete(this)}static closeAll(){for(let e of s._openedContextMenus.values())e.close()}},Mo=class s{static getSizes(e){let t=e.getElementsByTagName("li"),i=0,r=0;for(let a=0;a<t.length;a++){let l=t[a];l.offsetWidth>i&&(i=l.offsetWidth),l.offsetHeight>r&&(r=l.offsetHeight)}let n=i,o=r;for(let a=0;a<t.length;a++){let c=t[a].getElementsByTagName("ul");if(typeof c[0]<"u"){let h=s.getSizes(c[0]);i+h.width>n&&(n=i+h.width),r+h.height>o&&(o=r+h.height)}}return{width:n,height:o}}}});var Ce,_t=u(()=>{"use strict";ot();Ce=class{settingName;content;tooltp;contextmenu;constructor(e,t,i,r){this.settingName=e,this.content=t,this.tooltp=i,this.contextmenu=r}provideButtons(e,t){let i=document.createElement("div");typeof this.content=="string"?i.innerHTML=this.content:i.appendChild(this.content),i.title=this.tooltp,i.className="toolbar-control",t.instanceServiceContainer.designContext.extensionOptionsChanged.on(()=>{r[this.settingName]!==!1?i.classList.add("selected"):i.classList.remove("selected")});let r=t.instanceServiceContainer.designContext.extensionOptions;return r[this.settingName]!==!1&&i.classList.add("selected"),i.onclick=()=>{let n=r[this.settingName];r[this.settingName]=n===!1,r[this.settingName]!==!1?i.classList.add("selected"):i.classList.remove("selected")},i.oncontextmenu=n=>{n.preventDefault(),this.contextmenu&&le.show(this.contextmenu,n)},[i]}}});var dr,hr,pr=u(()=>{"use strict";_t();dr="enableStylesheetService",hr=class extends Ce{constructor(){super(dr,"ss","modify Stylesheet")}}});var mr,Oo=u(()=>{"use strict";mr=class{constructor(e,t,i){this.title="Change TextContent from '"+i+"' to '"+t+"'",this.designItem=e,this.newValue=t,this.oldValue=i}title;get affectedItems(){return[this.designItem]}undo(){this.designItem.element.textContent=this.oldValue}do(){this.designItem.element.textContent=this.newValue}designItem;newValue;oldValue;mergeWith(e){return!1}}});function sh(){return window.navigator.platform?.startsWith("Mac")||window.navigator.platform==="iPhone"||window.navigator.platform==="iPad"||window.navigator.platform==="iPod"}function at(s){return new Promise(e=>setTimeout(e,s))}async function No(s,e){let t=URL.createObjectURL(s),i=document.createElement("a");i.href=t,i.style.display="none",i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),await at(300)}function Lo(s){for(var e=s.split(",")[0].split(":")[1].split(";")[0],t=atob(s.split(",")[1]),i=[],r=0;r<t.length;r++)i.push(t.charCodeAt(r));return new Blob([new Uint8Array(i)],{type:e})}function Ro(s,e){return s.x>=e.x&&s.x<=e.x+e.width&&s.y>=e.y&&s.y<=e.y+e.height}function bt(s,e){return s.endsWith(e??"/")?s.substring(0,s.length-1):s}function ce(s,e){return s.startsWith(e??"/")?s.substring(1):s}function vf(){return new Promise(s=>requestAnimationFrame(s))}function xf(s,e){if(s===e)return!0;if(s==null||e==null||s.length!==e.length)return!1;for(var t=0;t<s.length;++t)if(s[t]!==e[t])return!1;return!0}function oh(s,e,t=!1,i="."){if(e==null)return s;let r=e.split(i);for(let n=0;n<r.length;n++)if(s!=null)s=s[r[n]];else return t?Rd:null;return s}function zo(s,e,t,i="."){if(e==null)return;let r=e.split(i);for(let n=0;n<r.length-1;n++)if(s!=null){let o=s[r[n]];o==null&&(o={},s[r[n]]=o),s=o}s!=null&&(s[r[r.length-1]]=t)}var Rd,Ee=u(()=>{"use strict"});var ur,Fo=u(()=>{"use strict";Ee();ur=class s{constructor(e,t,i,r){this.title="Change Property "+t+" of <"+e.name+">",this.designItem=e,this.name=t,this.newValue=i,this.oldValue=r}title;get affectedItems(){return[this.designItem]}undo(){zo(this.designItem.node,this.name,this.oldValue)}do(){zo(this.designItem.node,this.name,this.newValue)}designItem;name;newValue;oldValue;mergeWith(e){return e instanceof s&&this.designItem===e.designItem&&this.name===e.name?(this.newValue=e.newValue,!0):!1}}});import{TypedEvent as zd}from"@node-projects/base-custom-webcomponent";var Rt,zt,St,lt,ui,fi,gi,yi,vi,T,$=u(()=>{"use strict";Po();X();ko();ke();Io();ue();Do();Ie();pr();Oo();Fo();Ee();Rt="node-projects-hide-at-design-time",zt="node-projects-hide-at-run-time",St="node-projects-lock-at-design-time",lt="node-projects-force-hover",ui="node-projects-force-active",fi="node-projects-force-visited",gi="node-projects-force-focus",yi="node-projects-force-focus-within",vi="node-projects-force-focus-visible",T=class s{lastContainerSize;parsedNode;node;view;serviceContainer;instanceServiceContainer;nodeReplaced=new zd;get window(){return this.isRootItem&&this.node instanceof HTMLIFrameElement?this.node.contentDocument.defaultView:this.node.ownerDocument.defaultView??window}get document(){return this.isRootItem&&this.node instanceof HTMLIFrameElement?this.node.contentDocument:this.node.ownerDocument}get usableContainer(){return this.isRootItem&&this.element instanceof(this.element.ownerDocument.defaultView??window).HTMLIFrameElement?this.element.contentWindow.document:this.isRootItem?this.node.shadowRoot:this.element}async clone(){try{let e=U.ConvertToString([this],!1);return(await this.serviceContainer.htmlParserService.parse(e,this.serviceContainer,this.instanceServiceContainer,!0))[0]}catch{console.warn("could not clone design item.",this)}return null}*allMatching(e){if(this.hasChildren)for(let t of this.children())t.nodeType==E.Element&&t.element.matches(e)&&(yield t),yield*t.allMatching(e)}replaceNode(e){s._designItemMap.delete(this.node),s._designItemMap.set(e,this),this.view==this.node&&(this.view=e),this.node=e,this.nodeReplaced.emit()}get nodeType(){return this.node instanceof(this.node.ownerDocument.defaultView??window).Comment?E.Comment:this.node instanceof(this.node.ownerDocument.defaultView??window).Text?E.TextNode:E.Element}_attributes;get hasAttributes(){return this._attributes.size>0}hasAttribute(e){return this._attributes.has(e)}getAttribute(e){return this._attributes.get(e)}*attributes(){for(let e of this._attributes)yield e}_withoutUndoSetAttribute(e,t){this._attributes.set(e,t),this.serviceContainer.designItemService.handleSpecialAttributes(e,this)}_withoutUndoRemoveAttribute(e){this._attributes.delete(e),this.serviceContainer.designItemService.handleSpecialAttributes(e,this)}_styles;get hasStyles(){return this._styles.size>0}hasStyle(e){let t=e;return t.startsWith("--")||(t=R.camelToDashCase(e)),this._styles.has(t)}getStyle(e){let t=e;return t.startsWith("--")||(t=R.camelToDashCase(e)),this._styles.get(t)}*styles(){for(let e of this._styles)yield e}_withoutUndoSetStyle(e,t){let i=e;i.startsWith("--")||(i=R.camelToDashCase(e)),this._styles.set(i,t)}_withoutUndoRemoveStyle(e){let t=e;t.startsWith("--")||(t=R.camelToDashCase(e)),this._styles.delete(t)}static _designItemMap=new WeakMap;get element(){return this.view}get name(){return this.node.localName}get id(){return this.element.id}set id(e){this.element.id=e,this.id?this.setAttribute("id",e):this.removeAttribute("id")}get isRootItem(){return this.instanceServiceContainer.contentService.rootDesignItem===this}*childrenRect(e){if(this.hasChildren)for(let t of this.children())t.nodeType==E.Element&&t.element.matches(e)&&(yield t),yield*t.allMatching(e)}_childArray=[];get hasChildren(){return this._childArray.length>0}*children(e=!1){for(let t of this._childArray)if(yield t,e)for(let i of t.children(e))yield i}get childCount(){return this._childArray.length}get firstChild(){return this._childArray[0]}_parent;get parent(){return this._parent}indexOf(e){return this._childArray.indexOf(e)}insertAdjacentElement(e,t){let i;t=="afterbegin"?i=new st(e,this,0):t=="beforeend"?i=new st(e,this,this._childArray.length):t=="beforebegin"?i=new st(e,this.parent,this.parent.indexOf(this)):t=="afterend"&&(i=new st(e,this.parent,this.parent.indexOf(this)+1)),this.instanceServiceContainer.undoService.execute(i)}insertChild(e,t){let i=new st(e,this,t);this.instanceServiceContainer.undoService.execute(i)}removeChild(e){this.serviceContainer.deletionService.removeItems([e])}remove(){this.serviceContainer.deletionService.removeItems([this])}clearChildren(){for(let e=this._childArray.length-1;e>=0;e--)this._childArray[e].remove()}get hasContent(){return(this.nodeType==E.TextNode||this.nodeType==E.Comment)&&this.element.textContent!=""||this._childArray.length===0}get content(){return this.nodeType==E.TextNode||this.nodeType==E.Comment?this.node.textContent:this._childArray.map(e=>e.content).join()}set content(e){let t=this.openGroup("set content");this.clearChildren();let i=document.createTextNode(e),r=s.GetOrCreateDesignItem(i,i,this.serviceContainer,this.instanceServiceContainer);if(this.nodeType==E.TextNode){let n=this.parent.indexOf(this),o=this.parent;this.remove(),o.insertChild(r,n)}else if(this.nodeType==E.Comment){let n=new mr(this,e,this.content);this.instanceServiceContainer.undoService.execute(n)}else this.insertChild(r);t.commit()}get innerHTML(){return this.element.innerHTML}set innerHTML(e){if(this.nodeType!=E.TextNode){let t=this.openGroup("set innerHTML");this.clearChildren();let i=document.createRange();i.selectNode(document.body);let r=i.createContextualFragment(e);for(let n of[...r.childNodes]){let o=s.createDesignItemFromInstance(n,this.serviceContainer,this.instanceServiceContainer);this.insertChild(o)}t.commit()}}get isEmptyTextNode(){return this.nodeType===E.TextNode&&this.content?.trim()==""}get hideAtDesignTime(){return this.hasAttribute(Rt)}set hideAtDesignTime(e){e?this.setAttribute(Rt,""):this.removeAttribute(Rt)}get hideAtRunTime(){return this.hasAttribute(zt)}set hideAtRunTime(e){e?this.setAttribute(zt,""):this.removeAttribute(zt)}get lockAtDesignTime(){return this.hasAttribute(St)}set lockAtDesignTime(e){e?this.setAttribute(St,""):this.removeAttribute(St)}static createDesignItemFromInstance(e,t,i){let r=t.designItemService.createDesignItem(e,e,t,i);if(e instanceof(e.ownerDocument.defaultView??window).HTMLTemplateElement&&e.getAttribute("shadowrootmode")=="open")try{e.parentNode.attachShadow({mode:"open"}).appendChild(e.content.cloneNode(!0))}catch(n){console.error("error attaching shadowdom",n)}if(r.nodeType==E.Element){for(let n of r.element.attributes)n.name!=="style"&&r._attributes.set(n.name,n.value);if(e instanceof(e.ownerDocument.defaultView??window).HTMLElement||e instanceof(e.ownerDocument.defaultView??window).SVGElement){let n=new ar,o=e.getAttribute("style");if(o){n.parse(o);for(let a of n.entries)r._styles.set(a.name,a.value)}t.designItemService.handleSpecialAttributes(St,r)}e.draggable=!1}r._childArray=r._internalUpdateChildrenFromNodesChildren();for(let n of r._childArray)n._parent=r;return r}querySelectorAll(e){return this.usableContainer.querySelectorAll(e)}removeDesignerAttributesAndStylesFromChildren(){let e=this.querySelectorAll("*");for(let t of e){let i=s.GetDesignItem(t);i.hasAttribute("draggable")||t.removeAttribute("draggable"),i.hasStyle("pointer-events")||(t.style.pointerEvents="")}}updateChildrenFromNodesChildren(){this._childArray=this._internalUpdateChildrenFromNodesChildren();for(let e of this._childArray)e._parent=this}_internalUpdateChildrenFromNodesChildren(){let e=[];if(this.nodeType==E.Element)if(this.element instanceof(this.node.ownerDocument.defaultView??window).HTMLTemplateElement)for(let t of this.element.content.childNodes){let i=s.createDesignItemFromInstance(t,this.serviceContainer,this.instanceServiceContainer);e.push(i)}else if(this.isRootItem&&this.element instanceof(this.node.ownerDocument.defaultView??window).HTMLIFrameElement)for(let t of this.element.contentWindow.document.childNodes){let i=s.createDesignItemFromInstance(t,this.serviceContainer,this.instanceServiceContainer);e.push(i)}else for(let t of this.element.childNodes){let i=s.createDesignItemFromInstance(t,this.serviceContainer,this.instanceServiceContainer);e.push(i)}return e}_backupWhenEditContent;_inEditContent=!1;editContent(){this._inEditContent=!0,this._backupWhenEditContent=[...this.element.childNodes];let e=this.element.innerHTML;this.element.innerHTML="",this.element.innerHTML=e,this.element.setAttribute("contenteditable","")}editContentFinish(){if(this._inEditContent){this._inEditContent=!1,this.element.removeAttribute("contenteditable"),this.element.innerHTML="";for(let e of this._backupWhenEditContent)this.element.appendChild(e);this._backupWhenEditContent=null}}constructor(e,t,i,r){this.node=e,this.view=e,this.parsedNode=t,this.serviceContainer=i,this.instanceServiceContainer=r,this._attributes=new Map,this._styles=new Map,s._designItemMap.set(e,this)}setView(e){this.view=e,s._designItemMap.set(e,this)}openGroup(e){return this.instanceServiceContainer.undoService.openGroup(e)}getOrCreateDesignItem(e){return s.GetOrCreateDesignItem(e,e,this.serviceContainer,this.instanceServiceContainer)}static GetOrCreateDesignItem(e,t,i,r){if(!e)return null;let n=s._designItemMap.get(e);return n||(n=i.designItemService.createDesignItem(e,t,i,r)),n}static GetDesignItem(e){return e?s._designItemMap.get(e):null}setStyle(e,t,i){let r=e;if(r.startsWith("--")||(r=R.camelToDashCase(e)),this.isRootItem)throw"not allowed to set style on root item or use async setStyle";{let n=new Lt(this,r,t,this._styles.get(r));this.instanceServiceContainer.undoService.execute(n)}}async setStyleAsync(e,t,i){let r=e;if(r.startsWith("--")||(r=R.camelToDashCase(e)),this.isRootItem)if(this.instanceServiceContainer.stylesheetService){let n=this.instanceServiceContainer.stylesheetService.getDeclarationsSortedBySpecificity(this,e);if(n!==null&&n.length>0)this.instanceServiceContainer.stylesheetService.updateDeclarationValue(n[0],t,i);else{let o=this.instanceServiceContainer.stylesheetService.getRules(":host").filter(a=>!a.stylesheet?.readOnly);if(n===null||o.length===0){let a=this.openGroup("add rule and set style: "+e),l=this.instanceServiceContainer.stylesheetService.getStylesheets(),c=await this.instanceServiceContainer.stylesheetService.addRule(l[0],":host");this.instanceServiceContainer.stylesheetService.insertDeclarationIntoRule(c,e,t,i),a.commit()}else this.instanceServiceContainer.stylesheetService.insertDeclarationIntoRule(o[0],e,t,i)}}else throw"not allowed to set style on root item";else{let n=new Lt(this,r,t,this._styles.get(r));this.instanceServiceContainer.undoService.execute(n)}}removeStyle(e){let t=e;t.startsWith("--")||(t=R.camelToDashCase(e));let i=new Lt(this,t,"",this._styles.get(t));this.instanceServiceContainer.undoService.execute(i)}updateStyleInSheetOrLocal(e,t,i,r){let n=e;n.startsWith("--")||(n=R.camelToDashCase(e));let o=this.instanceServiceContainer.stylesheetService?.getDeclarationsSortedBySpecificity(this,n).filter(a=>!a.stylesheet?.readOnly);this.hasStyle(e)||this.instanceServiceContainer.designContext.extensionOptions[dr]===!1||!o?.length?this.getStyle(n)!=t||r?this.setStyle(n,t):t==null&&this.removeStyle(n):this.instanceServiceContainer.stylesheetService.updateDeclarationValue(o[0],t,!1)}async updateStyleInSheetOrLocalAsync(e,t,i,r){let n=e;n.startsWith("--")||(n=R.camelToDashCase(e));let o=this.instanceServiceContainer.stylesheetService?.getDeclarationsSortedBySpecificity(this,n).filter(a=>!a.stylesheet?.readOnly);this.hasStyle(e)||this.instanceServiceContainer.designContext.extensionOptions[dr]===!1||!o?.length?this.getStyle(n)!=t||r?await this.setStyleAsync(n,t):t==null&&this.removeStyle(n):this.instanceServiceContainer.stylesheetService.updateDeclarationValue(o[0],t,!1)}getStyleFromSheetOrLocal(e,t=null){let i=e;if(i.startsWith("--")||(i=R.camelToDashCase(e)),this.hasStyle(e))return this.getStyle(i);let r=this.instanceServiceContainer.stylesheetService?.getDeclarationsSortedBySpecificity(this,i);return r&&r.length>0?r[0].value:null}getStyleFromSheetOrLocalOrComputed(e,t=null){let i=e;i.startsWith("--")||(i=R.camelToDashCase(e));let r=this.getStyleFromSheetOrLocal(i);return r||(r=getComputedStyle(this.element).getPropertyValue(i)),r??t}getComputedStyleProperty(e,t=null){let i=e;i.startsWith("--")||(i=R.camelToDashCase(e));let r=this.getStyleFromSheetOrLocal(i);return r||(r=getComputedStyle(this.element).getPropertyValue(i)),r??t}getComputedStyle(){return this.nodeType==E.Element?this.window.getComputedStyle(this.element):null}_stylesCache=null;_cacheClearTimer;getAllStyles(){let e=this._stylesCache;if(e)return e;if(this.nodeType!=E.Element)return[];let t=[...this._styles.entries()].map(i=>({name:i[0],value:i[1],important:!1,parent:null}));if(this.instanceServiceContainer.stylesheetService)try{let i=this.instanceServiceContainer.stylesheetService?.getAppliedRules(this);if(i)return[{selector:null,declarations:t,specificity:null,stylesheet:null},...i]}catch(i){console.warn("getAppliedRules",i)}return e=[{selector:null,declarations:t,specificity:null,stylesheet:null}],this._stylesCache=e,clearTimeout(this._cacheClearTimer),this._cacheClearTimer=setTimeout(()=>this._stylesCache=null,30),e}setAttribute(e,t){if(this.isRootItem)throw"not allowed to set attribute on root item";let i=new mi(this,e,t,this._attributes.get(e));this.instanceServiceContainer.undoService.execute(i)}removeAttribute(e){let t=new mi(this,e,null,this._attributes.get(e));this.instanceServiceContainer.undoService.execute(t)}setProperty(e,t){if(this.isRootItem)throw"not allowed to set attribute on root item";let i=oh(this.node,e),r=new ur(this,e,t,i);this.instanceServiceContainer.undoService.execute(r)}_insertChildInternal(e,t){if(e.parent&&this.instanceServiceContainer.selectionService.primarySelection==e&&(e.instanceServiceContainer.designerCanvas.extensionManager.removeExtension(e.parent,S.PrimarySelectionContainer),e.instanceServiceContainer.designerCanvas.extensionManager.removeExtension(e.parent,S.PrimarySelectionContainerAndCanBeEntered)),e.parent&&e.parent._removeChildInternal(e),t==null||this._childArray.length==0||t>=this._childArray.length)this._childArray.push(e),this.isRootItem?(this.usableContainer?.children[0]instanceof this.window.HTMLHtmlElement&&this.usableContainer.children[0].remove(),this.usableContainer.appendChild(e.view)):this.view instanceof(this.node.ownerDocument.defaultView??window).HTMLTemplateElement?this.view.content.appendChild(e.view):this.view.appendChild(e.view);else{let i=this._childArray[t];this.isRootItem?(this.usableContainer?.children[0]instanceof this.window.HTMLHtmlElement&&this.usableContainer.children[0].remove(),this.usableContainer.insertBefore(e.view,i.element)):this.view instanceof(this.node.ownerDocument.defaultView??window).HTMLTemplateElement?this.view.content.insertBefore(e.view,i.element):this.view.insertBefore(e.view,i.element),this._childArray.splice(t,0,e)}e._parent=this,this.instanceServiceContainer.selectionService.primarySelection==e&&(e.instanceServiceContainer.designerCanvas.extensionManager.applyExtension(e.parent,S.PrimarySelectionContainer),e.getPlacementService().isEnterableContainer(this)&&e.instanceServiceContainer.designerCanvas.extensionManager.applyExtension(e.parent,S.PrimarySelectionContainerAndCanBeEntered)),this._refreshIfStyleSheet()}_removeChildInternal(e){e.parent&&this.instanceServiceContainer.selectionService.primarySelection==e&&(e.instanceServiceContainer.designerCanvas.extensionManager.removeExtension(e.parent,S.PrimarySelectionContainer),e.instanceServiceContainer.designerCanvas.extensionManager.removeExtension(e.parent,S.PrimarySelectionAndCanBeEntered)),e.instanceServiceContainer.designerCanvas.extensionManager.removeExtensions([e],!0);let t=this._childArray.indexOf(e);t>-1&&(this._childArray.splice(t,1),e.element.remove(),e._parent=null),this._refreshIfStyleSheet()}_refreshIfStyleSheet(){this.name=="style"||this.parent?.name=="style"||this.name=="link"}getPlacementService(e){return this.nodeType!=E.Element?null:(e??=getComputedStyle(this.element),this.serviceContainer.getLastServiceWhere("containerService",t=>t.serviceForContainer(this,e)))}static createDesignItemFromImageBlob(e,t,i){return new Promise(r=>{let n=new FileReader;n.onloadend=()=>{let o=document.createElement("img");o.src=n.result;let a=s.createDesignItemFromInstance(o,e,t);return r(a)},n.readAsDataURL(i)})}get hasForcedCss(){return this.cssForceHover||this.cssForceActive||this.cssForceVisited||this.cssForceFocus||this.cssForceFocusWithin||this.cssForceFocusVisible}get cssForceHover(){return this.element.hasAttribute(lt)}set cssForceHover(e){e?this.element.setAttribute(lt,""):this.element.removeAttribute(lt),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}get cssForceActive(){return this.element.hasAttribute(ui)}set cssForceActive(e){e?this.element.setAttribute(ui,""):this.element.removeAttribute(ui),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}get cssForceVisited(){return this.element.hasAttribute(fi)}set cssForceVisited(e){e?this.element.setAttribute(fi,""):this.element.removeAttribute(fi),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}get cssForceFocus(){return this.element.hasAttribute(gi)}set cssForceFocus(e){e?this.element.setAttribute(gi,""):this.element.removeAttribute(gi),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}get cssForceFocusWithin(){return this.element.hasAttribute(yi)}set cssForceFocusWithin(e){e?this.element.setAttribute(yi,""):this.element.removeAttribute(yi),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}get cssForceFocusVisible(){return this.element.hasAttribute(vi)}set cssForceFocusVisible(e){e?this.element.setAttribute(vi,""):this.element.removeAttribute(vi),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}}});function Bo(s){return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var ah=u(()=>{"use strict"});var fr,gr=u(()=>{"use strict";fr=navigator.userAgent.toLowerCase().includes("firefox")});var yr,Vo=u(()=>{"use strict";$();ah();Ye();gr();yr=class{async getElement(e,t,i){if(e.import){let l=e.import;l[0]==="."&&(l=(window.location.origin+window.location.pathname).split("/").slice(0,-1).join("/")+"/"+l),window.importShim?importShim(l).then(c=>{!customElements.get(e.tag)&&e.className&&c[e.className]&&customElements.define(e.tag,c[e.className])}):import(l).then(c=>{!customElements.get(e.tag)&&e.className&&c[e.className]&&customElements.define(e.tag,c[e.className])}),i.designContext.imports.indexOf(l)<=0&&i.designContext.imports.push(l)}let r="";if(e.defaultAttributes)for(let l in e.defaultAttributes){let c=e.defaultAttributes[l];try{typeof c=="object"?r+=" "+l+'="'+Bo(JSON.stringify(e.defaultAttributes[l]))+'"':r+=" "+l+'="'+Bo(e.defaultAttributes[l])+'"'}catch(h){console.warn(h)}}let n="<"+e.tag+r+"></"+e.tag+">",o=Ji(n,i.designerCanvas.rootDesignItem.document);if(o._inNodeProjectsDesignerView=!0,e.defaultWidth&&(o.style.width=e.defaultWidth),e.defaultHeight&&(o.style.height=e.defaultHeight),o.style.position="absolute",e.defaultStyles)for(let l in e.defaultStyles)o.style[l]=e.defaultStyles[l];if(e.defaultContent)if(typeof e.defaultContent=="string"){let l;i.designerCanvas.rootDesignItem.window.Document.parseHTMLUnsafe&&!fr?l=i.designerCanvas.rootDesignItem.window.Document.parseHTMLUnsafe(e.defaultContent):l=new i.designerCanvas.rootDesignItem.window.DOMParser().parseFromString(e.defaultContent,"text/html",{includeShadowRoots:!0}),o.append(...l.head.childNodes),o.append(...l.body.childNodes)}else o.appendChild(e.defaultContent);return T.createDesignItemFromInstance(o,t,i)}}});var q,ge=u(()=>{"use strict";Ke();q=class{element;property;designItems;disableChangeNotification=!1;constructor(e){this.property=e}async _valueChanged(e){if(!this.disableChangeNotification&&this.designItems&&this.designItems.length){let t=this.designItems[0].openGroup("set property: "+this.property.name);for(let i of this.designItems)e==null?this.property.service.clearValue([i],this.property,"value"):await this.property.service.setValue([i],this.property,e);t.commit()}}designItemsChanged(e){this.designItems=e}refreshValueWithoutNotification(e,t){e==V.none?this.element.classList.add("unset-value"):this.element.classList.remove("unset-value"),this.disableChangeNotification=!0;try{this.refreshValue(e,t)}catch(i){console.error(i)}this.disableChangeNotification=!1}}});var xi,Ho=u(()=>{"use strict";xi=class s{red=0;green=0;blue=0;hue=0;sat=0;lightness=0;whiteness=0;blackness=0;cyan=0;magenta=0;yellow=0;black=0;ncol="R";opacity=1;valid=!1;toRgbString(){return"rgb("+this.red+", "+this.green+", "+this.blue+")"}toRgbaString(){return"rgba("+this.red+", "+this.green+", "+this.blue+", "+this.opacity+")"}toHwbString(){return"hwb("+this.hue+", "+Math.round(this.whiteness*100)+"%, "+Math.round(this.blackness*100)+"%)"}toHwbStringDecimal(){return"hwb("+this.hue+", "+this.whiteness+", "+this.blackness+")"}toHwbaString(){return"hwba("+this.hue+", "+Math.round(this.whiteness*100)+"%, "+Math.round(this.blackness*100)+"%, "+this.opacity+")"}toHslString(){return"hsl("+this.hue+", "+Math.round(this.sat*100)+"%, "+Math.round(this.lightness*100)+"%)"}toHslStringDecimal(){return"hsl("+this.hue+", "+this.sat+", "+this.lightness+")"}toHslaString(){return"hsla("+this.hue+", "+Math.round(this.sat*100)+"%, "+Math.round(this.lightness*100)+"%, "+this.opacity+")"}toCmykString(){return"cmyk("+Math.round(this.cyan*100)+"%, "+Math.round(this.magenta*100)+"%, "+Math.round(this.yellow*100)+"%, "+Math.round(this.black*100)+"%)"}toCmykStringDecimal(){return"cmyk("+this.cyan+", "+this.magenta+", "+this.yellow+", "+this.black+")"}toNcolString(){return this.ncol+", "+Math.round(this.whiteness*100)+"%, "+Math.round(this.blackness*100)+"%"}toNcolStringDecimal(){return this.ncol+", "+this.whiteness+", "+this.blackness}toNcolaString(){return this.ncol+", "+Math.round(this.whiteness*100)+"%, "+Math.round(this.blackness*100)+"%, "+this.opacity}toName(){let e,t,i,r=s.getColorArr("hexs");for(let n=0;n<r.length;n++)if(e=parseInt(r[n].substr(0,2),16),t=parseInt(r[n].substr(2,2),16),i=parseInt(r[n].substr(4,2),16),this.red==e&&this.green==t&&this.blue==i)return s.getColorArr("names")[n];return null}toHexString(){let e=s.toHex(this.red),t=s.toHex(this.green),i=s.toHex(this.blue);return"#"+e+t+i}toNameOrHexString(){let e=this.toName();return e||(e=this.toHexString()),e}toRgb(){return{r:this.red,g:this.green,b:this.blue,a:this.opacity}}toHsl(){return{h:this.hue,s:this.sat,l:this.lightness,a:this.opacity}}toHwb(){return{h:this.hue,w:this.whiteness,b:this.blackness,a:this.opacity}}toCmyk(){return{c:this.cyan,m:this.magenta,y:this.yellow,k:this.black,a:this.opacity}}toNcol(){return{ncol:this.ncol,w:this.whiteness,b:this.blackness,a:this.opacity}}isDark(e){let t=e||128;return(this.red*299+this.green*587+this.blue*114)/1e3<t}saturate(e){let t,i,r;t=e/100||.1,this.sat+=t,this.sat>1&&(this.sat=1),i=s.hslToRgb(this.hue,this.sat,this.lightness),r=s.colorObject(i,this.opacity,this.hue,this.sat),this.attachValues(r)}desaturate(e){let t,i,r;t=e/100||.1,this.sat-=t,this.sat<0&&(this.sat=0),i=s.hslToRgb(this.hue,this.sat,this.lightness),r=s.colorObject(i,this.opacity,this.hue,this.sat),this.attachValues(r)}lighter(e){let t,i,r;t=e/100||.1,this.lightness+=t,this.lightness>1&&(this.lightness=1),i=s.hslToRgb(this.hue,this.sat,this.lightness),r=s.colorObject(i,this.opacity,this.hue,this.sat),this.attachValues(r)}darker(e){let t,i,r;t=e/100||.1,this.lightness-=t,this.lightness<0&&(this.lightness=0),i=s.hslToRgb(this.hue,this.sat,this.lightness),r=s.colorObject(i,this.opacity,this.hue,this.sat),this.attachValues(r)}attachValues(e){this.red=e.red,this.green=e.green,this.blue=e.blue,this.hue=e.hue,this.sat=e.sat,this.lightness=e.lightness,this.whiteness=e.whiteness,this.blackness=e.blackness,this.cyan=e.cyan,this.magenta=e.magenta,this.yellow=e.yellow,this.black=e.black,this.ncol=e.ncol,this.opacity=e.opacity,this.valid=e.valid}static toColorObject(e){let t,i,r,n=[],o,a,l,c,h,d,p,g,m=[],f=[];if(e=s.w3trim(e.toLowerCase()),t=e.substr(0,1).toUpperCase(),i=e.substr(1),h=1,(t=="R"||t=="Y"||t=="G"||t=="C"||t=="B"||t=="M"||t=="W")&&!isNaN(i)&&(e.length==6&&e.indexOf(",")==-1||(e="ncol("+e+")")),e.length!=3&&e.length!=6&&!isNaN(e)&&(e="ncol("+e+")"),e.indexOf(",")>0&&e.indexOf("(")==-1&&(e="ncol("+e+")"),e.substr(0,3)=="rgb"||e.substr(0,3)=="hsl"||e.substr(0,3)=="hwb"||e.substr(0,4)=="ncol"||e.substr(0,4)=="cmyk"){if(e.substr(0,4)=="ncol"?(e.split(",").length==4&&e.indexOf("ncola")==-1&&(e=e.replace("ncol","ncola")),r="ncol",e=e.substr(4)):e.substr(0,4)=="cmyk"?(r="cmyk",e=e.substr(4)):(r=e.substr(0,3),e=e.substr(3)),o=3,l=!1,e.substr(0,1).toLowerCase()=="a"?(o=4,l=!0,e=e.substr(1)):r=="cmyk"&&(o=4,e.split(",").length==5&&(o=5,l=!0)),e=e.replace("(",""),e=e.replace(")",""),n=e.split(","),r=="rgb"){if(n.length!=o)return new s;for(a=0;a<o;a++){if((n[a]==""||n[a]==" ")&&(n[a]="0"),n[a].indexOf("%")>-1&&(n[a]=n[a].replace("%",""),n[a]=Number(n[a]/100),a<3&&(n[a]=Math.round(n[a]*255))),isNaN(n[a]))return new s;parseInt(n[a])>255&&(n[a]=255),a<3&&(n[a]=parseInt(n[a])),a==3&&Number(n[a])>1&&(n[a]=1)}g={r:n[0],g:n[1],b:n[2]},l==!0&&(h=Number(n[3]))}if(r=="hsl"||r=="hwb"||r=="ncol"){for(;n.length<o;)n.push("0");for((r=="hsl"||r=="hwb")&&parseInt(n[0])>=360&&(n[0]=0),a=1;a<o;a++){if(n[a].indexOf("%")>-1){if(n[a]=n[a].replace("%",""),n[a]=Number(n[a]),isNaN(n[a]))return new s;n[a]=n[a]/100}else n[a]=Number(n[a]);Number(n[a])>1&&(n[a]=1),Number(n[a])<0&&(n[a]=0)}r=="hsl"&&(g=s.hslToRgb(n[0],n[1],n[2]),d=Number(n[0]),p=Number(n[1])),r=="hwb"&&(g=s.hwbToRgb(n[0],n[1],n[2])),r=="ncol"&&(g=s.ncolToRgb(n[0],n[1],n[2])),l==!0&&(h=Number(n[3]))}if(r=="cmyk"){for(;n.length<o;)n.push("0");for(a=0;a<o;a++){if(n[a].indexOf("%")>-1){if(n[a]=n[a].replace("%",""),n[a]=Number(n[a]),isNaN(n[a]))return new s;n[a]=n[a]/100}else n[a]=Number(n[a]);Number(n[a])>1&&(n[a]=1),Number(n[a])<0&&(n[a]=0)}g=s.cmykToRgb(n[0],n[1],n[2],n[3]),l==!0&&(h=Number(n[4]))}}else if(e.substr(0,3)=="ncs")g=s.ncsToRgb(e);else{for(c=!1,m=s.getColorArr("names"),a=0;a<m.length;a++)if(e.toLowerCase()==m[a].toLowerCase()){f=s.getColorArr("hexs"),c=!0,g={r:parseInt(f[a].substr(0,2),16),g:parseInt(f[a].substr(2,2),16),b:parseInt(f[a].substr(4,2),16)};break}if(c==!1){for(e=e.replace("#",""),e.length==3&&(e=e.substr(0,1)+e.substr(0,1)+e.substr(1,1)+e.substr(1,1)+e.substr(2,1)+e.substr(2,1)),a=0;a<e.length;a++)if(!s.isHex(e.substr(a,1)))return new s;for(n[0]=parseInt(e.substr(0,2),16),n[1]=parseInt(e.substr(2,2),16),n[2]=parseInt(e.substr(4,2),16),a=0;a<3;a++)if(isNaN(n[a]))return new s;g={r:n[0],g:n[1],b:n[2]}}}return s.colorObject(g,h,d,p)}static colorObject(e,t,i,r){let n,o,a,l,c,h,d;return e?(t===null&&(t=1),n=s.rgbToHsl(e.r,e.g,e.b),o=s.rgbToHwb(e.r,e.g,e.b),a=s.rgbToCmyk(e.r,e.g,e.b),h=i||n.h,d=r||n.s,l=s.hueToNcol(h),c={red:e.r,green:e.g,blue:e.b,hue:h,sat:d,lightness:n.l,whiteness:o.w,blackness:o.b,cyan:a.c,magenta:a.m,yellow:a.y,black:a.k,ncol:l,opacity:t,valid:!0},c=s.roundDecimals(c),Object.assign(new s,c)):new s}static getColorArr(e){return e=="names"?["AliceBlue","AntiqueWhite","Aqua","Aquamarine","Azure","Beige","Bisque","Black","BlanchedAlmond","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","CornflowerBlue","Cornsilk","Crimson","Cyan","DarkBlue","DarkCyan","DarkGoldenRod","DarkGray","DarkGrey","DarkGreen","DarkKhaki","DarkMagenta","DarkOliveGreen","DarkOrange","DarkOrchid","DarkRed","DarkSalmon","DarkSeaGreen","DarkSlateBlue","DarkSlateGray","DarkSlateGrey","DarkTurquoise","DarkViolet","DeepPink","DeepSkyBlue","DimGray","DimGrey","DodgerBlue","FireBrick","FloralWhite","ForestGreen","Fuchsia","Gainsboro","GhostWhite","Gold","GoldenRod","Gray","Grey","Green","GreenYellow","HoneyDew","HotPink","IndianRed","Indigo","Ivory","Khaki","Lavender","LavenderBlush","LawnGreen","LemonChiffon","LightBlue","LightCoral","LightCyan","LightGoldenRodYellow","LightGray","LightGrey","LightGreen","LightPink","LightSalmon","LightSeaGreen","LightSkyBlue","LightSlateGray","LightSlateGrey","LightSteelBlue","LightYellow","Lime","LimeGreen","Linen","Magenta","Maroon","MediumAquaMarine","MediumBlue","MediumOrchid","MediumPurple","MediumSeaGreen","MediumSlateBlue","MediumSpringGreen","MediumTurquoise","MediumVioletRed","MidnightBlue","MintCream","MistyRose","Moccasin","NavajoWhite","Navy","OldLace","Olive","OliveDrab","Orange","OrangeRed","Orchid","PaleGoldenRod","PaleGreen","PaleTurquoise","PaleVioletRed","PapayaWhip","PeachPuff","Peru","Pink","Plum","PowderBlue","Purple","RebeccaPurple","Red","RosyBrown","RoyalBlue","SaddleBrown","Salmon","SandyBrown","SeaGreen","SeaShell","Sienna","Silver","SkyBlue","SlateBlue","SlateGray","SlateGrey","Snow","SpringGreen","SteelBlue","Tan","Teal","Thistle","Tomato","Turquoise","Violet","Wheat","White","WhiteSmoke","Yellow","YellowGreen"]:e=="hexs"?["f0f8ff","faebd7","00ffff","7fffd4","f0ffff","f5f5dc","ffe4c4","000000","ffebcd","0000ff","8a2be2","a52a2a","deb887","5f9ea0","7fff00","d2691e","ff7f50","6495ed","fff8dc","dc143c","00ffff","00008b","008b8b","b8860b","a9a9a9","a9a9a9","006400","bdb76b","8b008b","556b2f","ff8c00","9932cc","8b0000","e9967a","8fbc8f","483d8b","2f4f4f","2f4f4f","00ced1","9400d3","ff1493","00bfff","696969","696969","1e90ff","b22222","fffaf0","228b22","ff00ff","dcdcdc","f8f8ff","ffd700","daa520","808080","808080","008000","adff2f","f0fff0","ff69b4","cd5c5c","4b0082","fffff0","f0e68c","e6e6fa","fff0f5","7cfc00","fffacd","add8e6","f08080","e0ffff","fafad2","d3d3d3","d3d3d3","90ee90","ffb6c1","ffa07a","20b2aa","87cefa","778899","778899","b0c4de","ffffe0","00ff00","32cd32","faf0e6","ff00ff","800000","66cdaa","0000cd","ba55d3","9370db","3cb371","7b68ee","00fa9a","48d1cc","c71585","191970","f5fffa","ffe4e1","ffe4b5","ffdead","000080","fdf5e6","808000","6b8e23","ffa500","ff4500","da70d6","eee8aa","98fb98","afeeee","db7093","ffefd5","ffdab9","cd853f","ffc0cb","dda0dd","b0e0e6","800080","663399","ff0000","bc8f8f","4169e1","8b4513","fa8072","f4a460","2e8b57","fff5ee","a0522d","c0c0c0","87ceeb","6a5acd","708090","708090","fffafa","00ff7f","4682b4","d2b48c","008080","d8bfd8","ff6347","40e0d0","ee82ee","f5deb3","ffffff","f5f5f5","ffff00","9acd32"]:null}static roundDecimals(e){return e.red=Number(e.red.toFixed(0)),e.green=Number(e.green.toFixed(0)),e.blue=Number(e.blue.toFixed(0)),e.hue=Number(e.hue.toFixed(0)),e.sat=Number(e.sat.toFixed(2)),e.lightness=Number(e.lightness.toFixed(2)),e.whiteness=Number(e.whiteness.toFixed(2)),e.blackness=Number(e.blackness.toFixed(2)),e.cyan=Number(e.cyan.toFixed(2)),e.magenta=Number(e.magenta.toFixed(2)),e.yellow=Number(e.yellow.toFixed(2)),e.black=Number(e.black.toFixed(2)),e.ncol=e.ncol.substr(0,1)+Math.round(Number(e.ncol.substr(1))),e.opacity=Number(e.opacity.toFixed(2)),e}static hslToRgb(e,t,i){let r,n,o,a,l;return e=e/60,i<=.5?n=i*(t+1):n=i+t-i*t,r=i*2-n,o=s.hueToRgb(r,n,e+2)*255,a=s.hueToRgb(r,n,e)*255,l=s.hueToRgb(r,n,e-2)*255,{r:o,g:a,b:l}}static hueToRgb(e,t,i){return i<0&&(i+=6),i>=6&&(i-=6),i<1?(t-e)*i+e:i<3?t:i<4?(t-e)*(4-i)+e:e}static hwbToRgb(e,t,i){let r,n,o=[],a;for(n=s.hslToRgb(e,1,.5),o[0]=n.r/255,o[1]=n.g/255,o[2]=n.b/255,a=t+i,a>1&&(t=Number((t/a).toFixed(2)),i=Number((i/a).toFixed(2))),r=0;r<3;r++)o[r]*=1-t-i,o[r]+=t,o[r]=Number(o[r]*255);return{r:o[0],g:o[1],b:o[2]}}static cmykToRgb(e,t,i,r){let n,o,a;return n=255-Math.min(1,e*(1-r)+r)*255,o=255-Math.min(1,t*(1-r)+r)*255,a=255-Math.min(1,i*(1-r)+r)*255,{r:n,g:o,b:a}}static ncolToRgb(e,t,i){let r,n,o;if(o=e,isNaN(e.substr(0,1))){if(r=e.substr(0,1).toUpperCase(),n=e.substr(1),n==""&&(n=0),n=Number(n),isNaN(n))return!1;r=="R"&&(o=0+n*.6),r=="Y"&&(o=60+n*.6),r=="G"&&(o=120+n*.6),r=="C"&&(o=180+n*.6),r=="B"&&(o=240+n*.6),r=="M"&&(o=300+n*.6),r=="W"&&(o=0,t=1-n/100,i=n/100)}return s.hwbToRgb(o,t,i)}static hueToNcol(e){for(;e>=360;)e=e-360;return e<60?"R"+e/.6:e<120?"Y"+(e-60)/.6:e<180?"G"+(e-120)/.6:e<240?"C"+(e-180)/.6:e<300?"B"+(e-240)/.6:e<360?"M"+(e-300)/.6:null}static ncsToRgb(e){let t,i,r,n,o,a,l,c,h,d,p,g,m,f,b,x,w,A,P;return e=s.w3trim(e).toUpperCase(),e=e.replace("(",""),e=e.replace(")",""),e=e.replace("NCS","NCS "),e=e.replace(/ /g," "),e.indexOf("NCS")==-1&&(e="NCS "+e),e=e.match(/^(?:NCS|NCS\sS)\s(\d{2})(\d{2})-(N|[A-Z])(\d{2})?([A-Z])?$/),e===null||(t=parseInt(e[1],10),i=parseInt(e[2],10),r=e[3],r!="N"&&r!="Y"&&r!="R"&&r!="B"&&r!="G")?null:(n=parseInt(e[4],10)||0,r!=="N"?(o=1.05*t-5.25,a=i,r==="Y"&&n<=60?h=1:r==="Y"&&n>60||r==="R"&&n<=80?(r==="Y"?l=n-60:l=n+40,h=(Math.sqrt(14884-Math.pow(l,2))-22)/100):r==="R"&&n>80||r==="B"?h=0:r==="G"&&(l=n-170,h=(Math.sqrt(33800-Math.pow(l,2))-70)/100),r==="Y"&&n<=80?c=0:r==="Y"&&n>80||r==="R"&&n<=60?(r==="Y"?l=n-80+20.5:l=n+20+20.5,c=(104-Math.sqrt(11236-Math.pow(l,2)))/100):r==="R"&&n>60||r==="B"&&n<=80?(r==="R"?l=n-60-60:l=n+40-60,c=(Math.sqrt(1e4-Math.pow(l,2))-10)/100):r==="B"&&n>80||r==="G"&&n<=40?(r==="B"?l=n-80-131:l=n+20-131,c=(122-Math.sqrt(19881-Math.pow(l,2)))/100):r==="G"&&n>40&&(c=0),r==="Y"?p=(85-17/20*n)/100:r==="R"&&n<=60?p=0:r==="R"&&n>60?(l=n-60+35,p=(67.5-Math.sqrt(5776-Math.pow(l,2)))/100):r==="B"&&n<=60?(l=1*n-68.5,p=(6.5+Math.sqrt(7044.5-Math.pow(l,2)))/100):r==="B"&&n>60||r==="G"&&n<=60?p=.9:r==="G"&&n>60&&(l=n-60,p=(90-1/8*l)/100),l=(h+p+c)/3,d=(l-h)*(100-a)/100+h,g=(l-p)*(100-a)/100+p,m=(l-c)*(100-a)/100+c,d>g&&d>m?f=d:g>d&&g>m?f=g:m>d&&m>g?f=m:f=(d+g+m)/3,b=1/f,w=parseInt(d*b*(100-o)/100*255,10),A=parseInt(g*b*(100-o)/100*255,10),P=parseInt(m*b*(100-o)/100*255,10),w>255&&(w=255),A>255&&(A=255),P>255&&(P=255),w<0&&(w=0),A<0&&(A=0),P<0&&(P=0)):(x=parseInt((1-t/100)*255,10),x>255&&(x=255),x<0&&(x=0),w=x,A=x,P=x),{r:w,g:A,b:P})}static rgbToHsl(e,t,i){let r,n,o,a,l,c,h,d=[];for(d[0]=e/255,d[1]=t/255,d[2]=i/255,r=d[0],n=d[0],c=0,o=0;o<d.length-1;o++)d[o+1]<=r&&(r=d[o+1]),d[o+1]>=n&&(n=d[o+1],c=o+1);return c==0&&(h=(d[1]-d[2])/(n-r)),c==1&&(h=2+(d[2]-d[0])/(n-r)),c==2&&(h=4+(d[0]-d[1])/(n-r)),isNaN(h)&&(h=0),h=h*60,h<0&&(h=h+360),a=(r+n)/2,r==n?l=0:a<.5?l=(n-r)/(n+r):l=(n-r)/(2-n-r),l=l,{h,s:l,l:a}}static rgbToHwb(e,t,i){let r,n,o;e=e/255,t=t/255,i=i/255;let a=Math.max(e,t,i),l=Math.min(e,t,i),c=a-l;return c==0?r=0:e==a?r=(t-i)/c%6*360:t==a?r=((i-e)/c+2)%6*360:r=((e-t)/c+4)%6*360,n=l,o=1-a,{h:r,w:n,b:o}}static rgbToCmyk(e,t,i){let r,n,o,a;return e=e/255,t=t/255,i=i/255,a=1-Math.max(e,t,i),a==1?(r=0,n=0,o=0):(r=(1-e-a)/(1-a),n=(1-t-a)/(1-a),o=(1-i-a)/(1-a)),{c:r,m:n,y:o,k:a}}static toHex(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return t}static w3trim(e){return e.replace(/^\s+|\s+$/g,"")}static isHex(e){return"0123456789ABCDEFabcdef".indexOf(e)>-1}}});var vr,Go=u(()=>{"use strict";ge();Ho();vr=class extends q{constructor(e){super(e);let t=document.createElement("input");t.type="color",t.onchange=i=>{let r=xi.toColorObject(t.value);this._valueChanged(r.toNameOrHexString())},this.element=t}refreshValue(e,t){if(!t)this.element.value="#000000";else{let i=xi.toColorObject(t);this.element.value=i.toHexString()}}}});var xr,Wo=u(()=>{"use strict";ge();xr=class extends q{constructor(e){super(e);let t=document.createElement("input");t.type="datetime-local",t.onchange=i=>this._valueChanged(t.value),this.element=t}refreshValue(e,t){t?this.element.value=t:this.element.value=null}}});import{html as Fd}from"@node-projects/base-custom-webcomponent";var _r,jo=u(()=>{"use strict";ge();_r=class s extends q{static template=Fd`
|
|
181
|
+
}`;static count=0;static _openedContextMenus=new Set;menu;options;context;num;_menuElement;constructor(e,t,i){this.num=s.count++,this.menu=e,this.options=t,this.context=i,this.reload(),this._windowDown=this._windowDown.bind(this),this._windowKeyUp=this._windowKeyUp.bind(this),this._windowResize=this._windowResize.bind(this)}reload(){let e=this.options?.shadowRoot??document;this._menuElement==null&&(this._menuElement=document.createElement("div"),this._menuElement.className="context_menu",this._menuElement.id="context_menu_"+this.num,e===document?document.body.appendChild(this._menuElement):e.appendChild(this._menuElement)),this._menuElement.innerHTML="",e.adoptedStyleSheets.indexOf(s._contextMenuCss)<0&&(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s._contextMenuCss]),this._menuElement.appendChild(this.renderLevel(this.menu))}renderLevel(e){let t=document.createElement("ul"),i=!1;return e.forEach(r=>{if(r.title!=="-"){if(i){let c=document.createElement("li");c.className="context_menu_divider",i=!1,t.appendChild(c)}let n=document.createElement("li"),o=document.createElement("span");o.className="context_menu_icon_span",r.checked===!0?o.innerHTML="\u2714":(r.icon??"")!=""?o.innerHTML=r.icon:o.innerHTML=this.options?.defaultIcon??"";let a=document.createElement("span");a.className="context_menu_text",a.innerHTML=r.title;let l=document.createElement("span");if(l.className="context_menu_sub_span",r.children!=null&&(l.innerHTML=this.options?.subIcon??"›"),n.appendChild(o),n.appendChild(a),n.appendChild(l),r.disabled)n.setAttribute("disabled","");else if(r.action&&n.addEventListener("click",c=>{c.stopPropagation(),c.preventDefault(),r.action(c,r,this.context,this),this.close()}),this.options?.mode=="undo"&&n.addEventListener("mouseup",c=>{c.stopPropagation(),r.action(c,r,this.context,this),this.close()}),r.children!=null){let c=this.renderLevel(r.children);n.appendChild(c),n.addEventListener("mouseenter",()=>{let h=c.getBoundingClientRect();if(h.top+h.height>window.innerHeight&&(c.style.top="unset",c.style.bottom="0"),this.options?.mode=="undo"){let d=!0;for(let p of n.parentElement.children)d?p.classList.add("context_menu_marked"):p.classList.remove("context_menu_marked"),p==n&&(d=!1)}})}else this.options?.mode=="undo"&&n.addEventListener("mouseenter",()=>{let c=!0;for(let h of n.parentElement.children)c?h.classList.add("context_menu_marked"):h.classList.remove("context_menu_marked"),h==n&&(c=!1)});t.appendChild(n)}else i=!0}),t}display(e){let t=this._menuElement,i={x:e.clientX,y:e.clientY},r=i.x,n=i.y,o=t.offsetWidth+4,a=t.offsetHeight+4,l=window.innerWidth,c=window.innerHeight,h=this.options?.mouseOffset!=null?this.options.mouseOffset:2;l-r<o?t.style.left=l-o+"px":t.style.left=r+h+"px",c-n<a?t.style.top=c-a+"px":t.style.top=n+h+"px";let d=Mo.getSizes(t);l-r<d.width?t.classList.add("context_menu_border_right"):t.classList.remove("context_menu_border_right"),c-n<d.height?t.classList.add("context_menu_border_bottom"):t.classList.remove("context_menu_border_bottom"),t.classList.add("context_menu_display"),e.preventDefault(),window.addEventListener("keyup",this._windowKeyUp),window.addEventListener("mousedown",this._windowDown),window.addEventListener("resize",this._windowResize),setTimeout(()=>window.addEventListener("contextmenu",this._windowDown),100),s._openedContextMenus.add(this)}_windowResize(){this.close()}_windowDown(e){return e.preventDefault(),e.composedPath().indexOf(this._menuElement)<0&&this.close(),!1}_windowKeyUp(e){e.key==="Escape"&&this.close()}static show(e,t,i,r){let n=new s(e,i,r);return n.display(t),n}close(){this._menuElement.remove(),window.removeEventListener("keyup",this._windowKeyUp),window.removeEventListener("mousedown",this._windowDown),window.removeEventListener("resize",this._windowResize),setTimeout(()=>window.removeEventListener("contextmenu",this._windowDown),10),s._openedContextMenus.delete(this)}static closeAll(){for(let e of s._openedContextMenus.values())e.close()}},Mo=class s{static getSizes(e){let t=e.getElementsByTagName("li"),i=0,r=0;for(let a=0;a<t.length;a++){let l=t[a];l.offsetWidth>i&&(i=l.offsetWidth),l.offsetHeight>r&&(r=l.offsetHeight)}let n=i,o=r;for(let a=0;a<t.length;a++){let c=t[a].getElementsByTagName("ul");if(typeof c[0]<"u"){let h=s.getSizes(c[0]);i+h.width>n&&(n=i+h.width),r+h.height>o&&(o=r+h.height)}}return{width:n,height:o}}}});var Ce,_t=u(()=>{"use strict";ot();Ce=class{settingName;content;tooltp;contextmenu;constructor(e,t,i,r){this.settingName=e,this.content=t,this.tooltp=i,this.contextmenu=r}provideButtons(e,t){let i=document.createElement("div");typeof this.content=="string"?i.innerHTML=this.content:i.appendChild(this.content),i.title=this.tooltp,i.className="toolbar-control",t.instanceServiceContainer.designContext.extensionOptionsChanged.on(()=>{r[this.settingName]!==!1?i.classList.add("selected"):i.classList.remove("selected")});let r=t.instanceServiceContainer.designContext.extensionOptions;return r[this.settingName]!==!1&&i.classList.add("selected"),i.onclick=()=>{let n=r[this.settingName];r[this.settingName]=n===!1,r[this.settingName]!==!1?i.classList.add("selected"):i.classList.remove("selected")},i.oncontextmenu=n=>{n.preventDefault(),this.contextmenu&&le.show(this.contextmenu,n)},[i]}}});var dr,hr,pr=u(()=>{"use strict";_t();dr="enableStylesheetService",hr=class extends Ce{constructor(){super(dr,"ss","modify Stylesheet")}}});var mr,Oo=u(()=>{"use strict";mr=class{constructor(e,t,i){this.title="Change TextContent from '"+i+"' to '"+t+"'",this.designItem=e,this.newValue=t,this.oldValue=i}title;get affectedItems(){return[this.designItem]}undo(){this.designItem.element.textContent=this.oldValue}do(){this.designItem.element.textContent=this.newValue}designItem;newValue;oldValue;mergeWith(e){return!1}}});function sh(){return window.navigator.platform?.startsWith("Mac")||window.navigator.platform==="iPhone"||window.navigator.platform==="iPad"||window.navigator.platform==="iPod"}function at(s){return new Promise(e=>setTimeout(e,s))}async function No(s,e){let t=URL.createObjectURL(s),i=document.createElement("a");i.href=t,i.style.display="none",i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),await at(300)}function Lo(s){for(var e=s.split(",")[0].split(":")[1].split(";")[0],t=atob(s.split(",")[1]),i=[],r=0;r<t.length;r++)i.push(t.charCodeAt(r));return new Blob([new Uint8Array(i)],{type:e})}function Ro(s,e){return s.x>=e.x&&s.x<=e.x+e.width&&s.y>=e.y&&s.y<=e.y+e.height}function bt(s,e){return s.endsWith(e??"/")?s.substring(0,s.length-1):s}function ce(s,e){return s.startsWith(e??"/")?s.substring(1):s}function vf(){return new Promise(s=>requestAnimationFrame(s))}function xf(s,e){if(s===e)return!0;if(s==null||e==null||s.length!==e.length)return!1;for(var t=0;t<s.length;++t)if(s[t]!==e[t])return!1;return!0}function oh(s,e,t=!1,i="."){if(e==null)return s;let r=e.split(i);for(let n=0;n<r.length;n++)if(s!=null)s=s[r[n]];else return t?Rd:null;return s}function zo(s,e,t,i="."){if(e==null)return;let r=e.split(i);for(let n=0;n<r.length-1;n++)if(s!=null){let o=s[r[n]];o==null&&(o={},s[r[n]]=o),s=o}s!=null&&(s[r[r.length-1]]=t)}var Rd,Ee=u(()=>{"use strict"});var ur,Fo=u(()=>{"use strict";Ee();ur=class s{constructor(e,t,i,r){this.title="Change Property "+t+" of <"+e.name+">",this.designItem=e,this.name=t,this.newValue=i,this.oldValue=r}title;get affectedItems(){return[this.designItem]}undo(){zo(this.designItem.node,this.name,this.oldValue)}do(){zo(this.designItem.node,this.name,this.newValue)}designItem;name;newValue;oldValue;mergeWith(e){return e instanceof s&&this.designItem===e.designItem&&this.name===e.name?(this.newValue=e.newValue,!0):!1}}});import{TypedEvent as zd}from"@node-projects/base-custom-webcomponent";var Rt,zt,St,lt,ui,fi,gi,yi,vi,T,$=u(()=>{"use strict";Po();X();ko();ke();Io();ue();Do();Ie();pr();Oo();Fo();Ee();Rt="node-projects-hide-at-design-time",zt="node-projects-hide-at-run-time",St="node-projects-lock-at-design-time",lt="node-projects-force-hover",ui="node-projects-force-active",fi="node-projects-force-visited",gi="node-projects-force-focus",yi="node-projects-force-focus-within",vi="node-projects-force-focus-visible",T=class s{lastContainerSize;parsedNode;node;view;serviceContainer;instanceServiceContainer;nodeReplaced=new zd;get window(){return this.isRootItem&&this.node instanceof HTMLIFrameElement?this.node.contentDocument.defaultView:this.node.ownerDocument.defaultView??window}get document(){return this.isRootItem&&this.node instanceof HTMLIFrameElement?this.node.contentDocument:this.node.ownerDocument}get usableContainer(){return this.isRootItem&&this.element instanceof(this.element.ownerDocument.defaultView??window).HTMLIFrameElement?this.element.contentWindow.document:this.isRootItem?this.node.shadowRoot:this.element}async clone(){try{let e=U.ConvertToString([this],!1);return(await this.serviceContainer.htmlParserService.parse(e,this.serviceContainer,this.instanceServiceContainer,!0))[0]}catch{console.warn("could not clone design item.",this)}return null}*allMatching(e){if(this.hasChildren)for(let t of this.children())t.nodeType==E.Element&&t.element.matches(e)&&(yield t),yield*t.allMatching(e)}replaceNode(e){s._designItemMap.delete(this.node),s._designItemMap.set(e,this),this.view==this.node&&(this.view=e),this.node=e,this.nodeReplaced.emit()}get nodeType(){return this.node instanceof(this.node.ownerDocument.defaultView??window).Comment?E.Comment:this.node instanceof(this.node.ownerDocument.defaultView??window).Text?E.TextNode:E.Element}_attributes;get hasAttributes(){return this._attributes.size>0}hasAttribute(e){return this._attributes.has(e)}getAttribute(e){return this._attributes.get(e)}*attributes(){for(let e of this._attributes)yield e}_withoutUndoSetAttribute(e,t){this._attributes.set(e,t),this.serviceContainer.designItemService.handleSpecialAttributes(e,this)}_withoutUndoRemoveAttribute(e){this._attributes.delete(e),this.serviceContainer.designItemService.handleSpecialAttributes(e,this)}_styles;get hasStyles(){return this._styles.size>0}hasStyle(e){let t=e;return t.startsWith("--")||(t=R.camelToDashCase(e)),this._styles.has(t)}getStyle(e){let t=e;return t.startsWith("--")||(t=R.camelToDashCase(e)),this._styles.get(t)}*styles(){for(let e of this._styles)yield e}_withoutUndoSetStyle(e,t){let i=e;i.startsWith("--")||(i=R.camelToDashCase(e)),this._styles.set(i,t)}_withoutUndoRemoveStyle(e){let t=e;t.startsWith("--")||(t=R.camelToDashCase(e)),this._styles.delete(t)}static _designItemMap=new WeakMap;get element(){return this.view}get name(){return this.node.localName}get id(){return this.element.id}set id(e){this.element.id=e,this.id?this.setAttribute("id",e):this.removeAttribute("id")}get isRootItem(){return this.instanceServiceContainer.contentService.rootDesignItem===this}*childrenRect(e){if(this.hasChildren)for(let t of this.children())t.nodeType==E.Element&&t.element.matches(e)&&(yield t),yield*t.allMatching(e)}_childArray=[];get hasChildren(){return this._childArray.length>0}*children(e=!1){for(let t of this._childArray)if(yield t,e)for(let i of t.children(e))yield i}get childCount(){return this._childArray.length}get firstChild(){return this._childArray[0]}_parent;get parent(){return this._parent}indexOf(e){return this._childArray.indexOf(e)}insertAdjacentElement(e,t){let i;t=="afterbegin"?i=new st(e,this,0):t=="beforeend"?i=new st(e,this,this._childArray.length):t=="beforebegin"?i=new st(e,this.parent,this.parent.indexOf(this)):t=="afterend"&&(i=new st(e,this.parent,this.parent.indexOf(this)+1)),this.instanceServiceContainer.undoService.execute(i)}insertChild(e,t){let i=new st(e,this,t);this.instanceServiceContainer.undoService.execute(i)}removeChild(e){this.serviceContainer.deletionService.removeItems([e])}remove(){this.serviceContainer.deletionService.removeItems([this])}clearChildren(){for(let e=this._childArray.length-1;e>=0;e--)this._childArray[e].remove()}get hasContent(){return(this.nodeType==E.TextNode||this.nodeType==E.Comment)&&this.element.textContent!=""||this._childArray.length===0}get content(){return this.nodeType==E.TextNode||this.nodeType==E.Comment?this.node.textContent:this._childArray.map(e=>e.content).join()}set content(e){let t=this.openGroup("set content");this.clearChildren();let i=document.createTextNode(e),r=s.GetOrCreateDesignItem(i,i,this.serviceContainer,this.instanceServiceContainer);if(this.nodeType==E.TextNode){let n=this.parent.indexOf(this),o=this.parent;this.remove(),o.insertChild(r,n)}else if(this.nodeType==E.Comment){let n=new mr(this,e,this.content);this.instanceServiceContainer.undoService.execute(n)}else this.insertChild(r);t.commit()}get innerHTML(){return this.element.innerHTML}set innerHTML(e){if(this.nodeType!=E.TextNode){let t=this.openGroup("set innerHTML");this.clearChildren();let i=document.createRange();i.selectNode(document.body);let r=i.createContextualFragment(e);for(let n of[...r.childNodes]){let o=s.createDesignItemFromInstance(n,this.serviceContainer,this.instanceServiceContainer);this.insertChild(o)}t.commit()}}get isEmptyTextNode(){return this.nodeType===E.TextNode&&this.content?.trim()==""}get hideAtDesignTime(){return this.hasAttribute(Rt)}set hideAtDesignTime(e){e?this.setAttribute(Rt,""):this.removeAttribute(Rt)}get hideAtRunTime(){return this.hasAttribute(zt)}set hideAtRunTime(e){e?this.setAttribute(zt,""):this.removeAttribute(zt)}get lockAtDesignTime(){return this.hasAttribute(St)}set lockAtDesignTime(e){e?this.setAttribute(St,""):this.removeAttribute(St)}static createDesignItemFromInstance(e,t,i){let r=t.designItemService.createDesignItem(e,e,t,i);if(e instanceof(e.ownerDocument.defaultView??window).HTMLTemplateElement&&e.getAttribute("shadowrootmode")=="open")try{e.parentNode.attachShadow({mode:"open"}).appendChild(e.content.cloneNode(!0))}catch(n){console.error("error attaching shadowdom",n)}if(r.nodeType==E.Element){for(let n of r.element.attributes)n.name!=="style"&&r._attributes.set(n.name,n.value);if(e instanceof(e.ownerDocument.defaultView??window).HTMLElement||e instanceof(e.ownerDocument.defaultView??window).SVGElement){let n=new ar,o=e.getAttribute("style");if(o){n.parse(o);for(let a of n.entries)r._styles.set(a.name,a.value)}t.designItemService.handleSpecialAttributes(St,r)}e.draggable=!1}r._childArray=r._internalUpdateChildrenFromNodesChildren();for(let n of r._childArray)n._parent=r;return r}querySelectorAll(e){return this.usableContainer.querySelectorAll(e)}removeDesignerAttributesAndStylesFromChildren(){let e=this.querySelectorAll("*");for(let t of e){let i=s.GetDesignItem(t);i.hasAttribute("draggable")||t.removeAttribute("draggable"),i.hasStyle("pointer-events")||(t.style.pointerEvents="")}}updateChildrenFromNodesChildren(){this._childArray=this._internalUpdateChildrenFromNodesChildren();for(let e of this._childArray)e._parent=this}_internalUpdateChildrenFromNodesChildren(){let e=[];if(this.nodeType==E.Element)if(this.element instanceof(this.node.ownerDocument.defaultView??window).HTMLTemplateElement)for(let t of this.element.content.childNodes){let i=s.createDesignItemFromInstance(t,this.serviceContainer,this.instanceServiceContainer);e.push(i)}else if(this.isRootItem&&this.element instanceof(this.node.ownerDocument.defaultView??window).HTMLIFrameElement)for(let t of this.element.contentWindow.document.childNodes){let i=s.createDesignItemFromInstance(t,this.serviceContainer,this.instanceServiceContainer);e.push(i)}else for(let t of this.element.childNodes){let i=s.createDesignItemFromInstance(t,this.serviceContainer,this.instanceServiceContainer);e.push(i)}return e}_backupWhenEditContent;_inEditContent=!1;editContent(){this._inEditContent=!0,this._backupWhenEditContent=[...this.element.childNodes];let e=this.element.innerHTML;this.element.innerHTML="",this.element.innerHTML=e,this.element.setAttribute("contenteditable","")}editContentFinish(){if(this._inEditContent){this._inEditContent=!1,this.element.removeAttribute("contenteditable"),this.element.innerHTML="";for(let e of this._backupWhenEditContent)this.element.appendChild(e);this._backupWhenEditContent=null}}constructor(e,t,i,r){this.node=e,this.view=e,this.parsedNode=t,this.serviceContainer=i,this.instanceServiceContainer=r,this._attributes=new Map,this._styles=new Map,s._designItemMap.set(e,this)}setView(e){this.view=e,s._designItemMap.set(e,this)}openGroup(e){return this.instanceServiceContainer.undoService.openGroup(e)}getOrCreateDesignItem(e){return s.GetOrCreateDesignItem(e,e,this.serviceContainer,this.instanceServiceContainer)}static GetOrCreateDesignItem(e,t,i,r){if(!e)return null;let n=s._designItemMap.get(e);return n||(n=i.designItemService.createDesignItem(e,t,i,r)),n}static GetDesignItem(e){return e?s._designItemMap.get(e):null}setStyle(e,t,i){let r=e;if(r.startsWith("--")||(r=R.camelToDashCase(e)),this.isRootItem)throw"not allowed to set style on root item or use async setStyle";{let n=new Lt(this,r,t,this._styles.get(r));this.instanceServiceContainer.undoService.execute(n)}}async setStyleAsync(e,t,i){let r=e;if(r.startsWith("--")||(r=R.camelToDashCase(e)),this.isRootItem)if(this.instanceServiceContainer.stylesheetService){let n=this.instanceServiceContainer.stylesheetService.getDeclarationsSortedBySpecificity(this,e);if(n!==null&&n.length>0)this.instanceServiceContainer.stylesheetService.updateDeclarationValue(n[0],t,i);else{let o=this.instanceServiceContainer.stylesheetService.getRules(":host").filter(a=>!a.stylesheet?.readOnly);if(n===null||o.length===0){let a=this.openGroup("add rule and set style: "+e),l=this.instanceServiceContainer.stylesheetService.getStylesheets(),c=await this.instanceServiceContainer.stylesheetService.addRule(l[0],":host");this.instanceServiceContainer.stylesheetService.insertDeclarationIntoRule(c,e,t,i),a.commit()}else this.instanceServiceContainer.stylesheetService.insertDeclarationIntoRule(o[0],e,t,i)}}else throw"not allowed to set style on root item";else{let n=new Lt(this,r,t,this._styles.get(r));this.instanceServiceContainer.undoService.execute(n)}}removeStyle(e){let t=e;t.startsWith("--")||(t=R.camelToDashCase(e));let i=new Lt(this,t,"",this._styles.get(t));this.instanceServiceContainer.undoService.execute(i)}updateStyleInSheetOrLocal(e,t,i,r){let n=e;n.startsWith("--")||(n=R.camelToDashCase(e));let o=this.instanceServiceContainer.stylesheetService?.getDeclarationsSortedBySpecificity(this,n).filter(a=>!a.stylesheet?.readOnly);this.hasStyle(e)||this.instanceServiceContainer.designContext.extensionOptions[dr]===!1||!o?.length?this.getStyle(n)!=t||r?this.setStyle(n,t):t==null&&this.removeStyle(n):this.instanceServiceContainer.stylesheetService.updateDeclarationValue(o[0],t,!1)}async updateStyleInSheetOrLocalAsync(e,t,i,r){let n=e;n.startsWith("--")||(n=R.camelToDashCase(e));let o=this.instanceServiceContainer.stylesheetService?.getDeclarationsSortedBySpecificity(this,n).filter(a=>!a.stylesheet?.readOnly);this.hasStyle(e)||this.instanceServiceContainer.designContext.extensionOptions[dr]===!1||!o?.length?this.getStyle(n)!=t||r?await this.setStyleAsync(n,t):t==null&&this.removeStyle(n):this.instanceServiceContainer.stylesheetService.updateDeclarationValue(o[0],t,!1)}getStyleFromSheetOrLocal(e,t=null){let i=e;if(i.startsWith("--")||(i=R.camelToDashCase(e)),this.hasStyle(e))return this.getStyle(i);let r=this.instanceServiceContainer.stylesheetService?.getDeclarationsSortedBySpecificity(this,i);return r&&r.length>0?r[0].value:null}getStyleFromSheetOrLocalOrComputed(e,t=null){let i=e;i.startsWith("--")||(i=R.camelToDashCase(e));let r=this.getStyleFromSheetOrLocal(i);return r||(r=getComputedStyle(this.element).getPropertyValue(i)),r??t}getComputedStyleProperty(e,t=null){let i=e;i.startsWith("--")||(i=R.camelToDashCase(e));let r=this.getStyleFromSheetOrLocal(i);return r||(r=getComputedStyle(this.element).getPropertyValue(i)),r??t}getComputedStyle(){return this.nodeType==E.Element?this.window.getComputedStyle(this.element):null}_stylesCache=null;_cacheClearTimer;getAllStyles(){let e=this._stylesCache;if(e)return e;if(this.nodeType!=E.Element)return[];let t=[...this._styles.entries()].map(i=>({name:i[0],value:i[1],important:!1,parent:null}));if(this.instanceServiceContainer.stylesheetService)try{let i=this.instanceServiceContainer.stylesheetService?.getAppliedRules(this);if(i)return[{selector:null,declarations:t,specificity:null,stylesheet:null},...i]}catch(i){console.warn("getAppliedRules",i)}return e=[{selector:null,declarations:t,specificity:null,stylesheet:null}],this._stylesCache=e,clearTimeout(this._cacheClearTimer),this._cacheClearTimer=setTimeout(()=>this._stylesCache=null,30),e}setAttribute(e,t){if(this.isRootItem)throw"not allowed to set attribute on root item";let i=new mi(this,e,t,this._attributes.get(e));this.instanceServiceContainer.undoService.execute(i)}removeAttribute(e){let t=new mi(this,e,null,this._attributes.get(e));this.instanceServiceContainer.undoService.execute(t)}setProperty(e,t){if(this.isRootItem)throw"not allowed to set attribute on root item";let i=oh(this.node,e),r=new ur(this,e,t,i);this.instanceServiceContainer.undoService.execute(r)}_insertChildInternal(e,t){if(e.parent&&this.instanceServiceContainer.selectionService.primarySelection==e&&(e.instanceServiceContainer.designerCanvas.extensionManager.removeExtension(e.parent,S.PrimarySelectionContainer),e.instanceServiceContainer.designerCanvas.extensionManager.removeExtension(e.parent,S.PrimarySelectionContainerAndCanBeEntered)),e.parent&&e.parent._removeChildInternal(e),t==null||this._childArray.length==0||t>=this._childArray.length)this._childArray.push(e),this.isRootItem?(this.usableContainer?.children[0]instanceof this.window.HTMLHtmlElement&&this.usableContainer.children[0].remove(),this.usableContainer.appendChild(e.view)):this.view instanceof(this.node.ownerDocument.defaultView??window).HTMLTemplateElement?this.view.content.appendChild(e.view):this.view.appendChild(e.view);else{let i=this._childArray[t];this.isRootItem?(this.usableContainer?.children[0]instanceof this.window.HTMLHtmlElement&&this.usableContainer.children[0].remove(),this.usableContainer.insertBefore(e.view,i.element)):this.view instanceof(this.node.ownerDocument.defaultView??window).HTMLTemplateElement?this.view.content.insertBefore(e.view,i.element):this.view.insertBefore(e.view,i.element),this._childArray.splice(t,0,e)}e._parent=this,this.instanceServiceContainer.selectionService.primarySelection==e&&(e.instanceServiceContainer.designerCanvas.extensionManager.applyExtension(e.parent,S.PrimarySelectionContainer),e.getPlacementService().isEnterableContainer(this)&&e.instanceServiceContainer.designerCanvas.extensionManager.applyExtension(e.parent,S.PrimarySelectionContainerAndCanBeEntered)),this._refreshIfStyleSheet()}_removeChildInternal(e){e.parent&&this.instanceServiceContainer.selectionService.primarySelection==e&&(e.instanceServiceContainer.designerCanvas.extensionManager.removeExtension(e.parent,S.PrimarySelectionContainer),e.instanceServiceContainer.designerCanvas.extensionManager.removeExtension(e.parent,S.PrimarySelectionAndCanBeEntered)),e.instanceServiceContainer.designerCanvas.extensionManager.removeExtensions([e],!0);let t=this._childArray.indexOf(e);t>-1&&(this._childArray.splice(t,1),e.element.remove(),e._parent=null),this._refreshIfStyleSheet()}_refreshIfStyleSheet(){this.name=="style"||this.parent?.name=="style"||this.name=="link"}getPlacementService(e){return this.nodeType!=E.Element?null:(e??=getComputedStyle(this.element),this.serviceContainer.getLastServiceWhere("containerService",t=>t.serviceForContainer(this,e)))}static createDesignItemFromImageBlob(e,t,i){return new Promise(r=>{let n=new FileReader;n.onloadend=()=>{let o=document.createElement("img");o.src=n.result;let a=s.createDesignItemFromInstance(o,e,t);return r(a)},n.readAsDataURL(i)})}get hasForcedCss(){return this.cssForceHover||this.cssForceActive||this.cssForceVisited||this.cssForceFocus||this.cssForceFocusWithin||this.cssForceFocusVisible}get cssForceHover(){return this.element.hasAttribute(lt)}set cssForceHover(e){e?this.element.setAttribute(lt,""):this.element.removeAttribute(lt),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}get cssForceActive(){return this.element.hasAttribute(ui)}set cssForceActive(e){e?this.element.setAttribute(ui,""):this.element.removeAttribute(ui),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}get cssForceVisited(){return this.element.hasAttribute(fi)}set cssForceVisited(e){e?this.element.setAttribute(fi,""):this.element.removeAttribute(fi),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}get cssForceFocus(){return this.element.hasAttribute(gi)}set cssForceFocus(e){e?this.element.setAttribute(gi,""):this.element.removeAttribute(gi),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}get cssForceFocusWithin(){return this.element.hasAttribute(yi)}set cssForceFocusWithin(e){e?this.element.setAttribute(yi,""):this.element.removeAttribute(yi),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}get cssForceFocusVisible(){return this.element.hasAttribute(vi)}set cssForceFocusVisible(e){e?this.element.setAttribute(vi,""):this.element.removeAttribute(vi),this.instanceServiceContainer.contentService.onContentChanged.emit({changeType:"changed",designItems:[this]})}}});function Bo(s){return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var ah=u(()=>{"use strict"});var fr,gr=u(()=>{"use strict";fr=navigator.userAgent.toLowerCase().includes("firefox")});var yr,Vo=u(()=>{"use strict";$();ah();Ye();gr();yr=class{async getElement(e,t,i){if(e.import){let l=e.import;l[0]==="."&&(l=(window.location.origin+window.location.pathname).split("/").slice(0,-1).join("/")+"/"+l),window.importShim?importShim(l).then(c=>{!customElements.get(e.tag)&&e.className&&c[e.className]&&customElements.define(e.tag,c[e.className])}):import(l).then(c=>{!customElements.get(e.tag)&&e.className&&c[e.className]&&customElements.define(e.tag,c[e.className])}),i.designContext.imports.indexOf(l)<=0&&i.designContext.imports.push(l)}let r="";if(e.defaultAttributes)for(let l in e.defaultAttributes){let c=e.defaultAttributes[l];try{typeof c=="object"?r+=" "+l+'="'+Bo(JSON.stringify(e.defaultAttributes[l]))+'"':r+=" "+l+'="'+Bo(e.defaultAttributes[l])+'"'}catch(h){console.warn(h)}}let n="<"+e.tag+r+"></"+e.tag+">",o=Ji(n,i.designerCanvas.rootDesignItem.document);if(o._inNodeProjectsDesignerView=!0,e.defaultWidth&&(o.style.width=e.defaultWidth),e.defaultHeight&&(o.style.height=e.defaultHeight),o.style.position="absolute",e.defaultStyles)for(let l in e.defaultStyles)o.style[l]=e.defaultStyles[l];if(e.defaultContent)if(typeof e.defaultContent=="string"){let l;i.designerCanvas.rootDesignItem.window.Document.parseHTMLUnsafe&&!fr?l=i.designerCanvas.rootDesignItem.window.Document.parseHTMLUnsafe(e.defaultContent):l=new i.designerCanvas.rootDesignItem.window.DOMParser().parseFromString(e.defaultContent,"text/html",{includeShadowRoots:!0}),o.append(...l.head.childNodes),o.append(...l.body.childNodes)}else o.appendChild(e.defaultContent);return T.createDesignItemFromInstance(o,t,i)}}});var q,ge=u(()=>{"use strict";Ke();q=class{element;property;designItems;disableChangeNotification=!1;constructor(e){this.property=e}async _valueChanged(e){if(!this.disableChangeNotification&&this.designItems&&this.designItems.length){let t=this.designItems[0].openGroup("set property: "+this.property.name);for(let i of this.designItems)e==null?this.property.service.clearValue([i],this.property,"value"):await this.property.service.setValue([i],this.property,e);t.commit()}}designItemsChanged(e){this.designItems=e}refreshValueWithoutNotification(e,t){e==V.none?this.element.classList.add("unset-value"):this.element.classList.remove("unset-value"),this.disableChangeNotification=!0;try{this.refreshValue(e,t)}catch(i){console.error(i)}this.disableChangeNotification=!1}}});var xi,Ho=u(()=>{"use strict";xi=class s{red=0;green=0;blue=0;hue=0;sat=0;lightness=0;whiteness=0;blackness=0;cyan=0;magenta=0;yellow=0;black=0;ncol="R";opacity=1;valid=!1;toRgbString(){return"rgb("+this.red+", "+this.green+", "+this.blue+")"}toRgbaString(){return"rgba("+this.red+", "+this.green+", "+this.blue+", "+this.opacity+")"}toHwbString(){return"hwb("+this.hue+", "+Math.round(this.whiteness*100)+"%, "+Math.round(this.blackness*100)+"%)"}toHwbStringDecimal(){return"hwb("+this.hue+", "+this.whiteness+", "+this.blackness+")"}toHwbaString(){return"hwba("+this.hue+", "+Math.round(this.whiteness*100)+"%, "+Math.round(this.blackness*100)+"%, "+this.opacity+")"}toHslString(){return"hsl("+this.hue+", "+Math.round(this.sat*100)+"%, "+Math.round(this.lightness*100)+"%)"}toHslStringDecimal(){return"hsl("+this.hue+", "+this.sat+", "+this.lightness+")"}toHslaString(){return"hsla("+this.hue+", "+Math.round(this.sat*100)+"%, "+Math.round(this.lightness*100)+"%, "+this.opacity+")"}toCmykString(){return"cmyk("+Math.round(this.cyan*100)+"%, "+Math.round(this.magenta*100)+"%, "+Math.round(this.yellow*100)+"%, "+Math.round(this.black*100)+"%)"}toCmykStringDecimal(){return"cmyk("+this.cyan+", "+this.magenta+", "+this.yellow+", "+this.black+")"}toNcolString(){return this.ncol+", "+Math.round(this.whiteness*100)+"%, "+Math.round(this.blackness*100)+"%"}toNcolStringDecimal(){return this.ncol+", "+this.whiteness+", "+this.blackness}toNcolaString(){return this.ncol+", "+Math.round(this.whiteness*100)+"%, "+Math.round(this.blackness*100)+"%, "+this.opacity}toName(){let e,t,i,r=s.getColorArr("hexs");for(let n=0;n<r.length;n++)if(e=parseInt(r[n].substr(0,2),16),t=parseInt(r[n].substr(2,2),16),i=parseInt(r[n].substr(4,2),16),this.red==e&&this.green==t&&this.blue==i)return s.getColorArr("names")[n];return null}toHexString(){let e=s.toHex(this.red),t=s.toHex(this.green),i=s.toHex(this.blue);return"#"+e+t+i}toNameOrHexString(){let e=this.toName();return e||(e=this.toHexString()),e}toRgb(){return{r:this.red,g:this.green,b:this.blue,a:this.opacity}}toHsl(){return{h:this.hue,s:this.sat,l:this.lightness,a:this.opacity}}toHwb(){return{h:this.hue,w:this.whiteness,b:this.blackness,a:this.opacity}}toCmyk(){return{c:this.cyan,m:this.magenta,y:this.yellow,k:this.black,a:this.opacity}}toNcol(){return{ncol:this.ncol,w:this.whiteness,b:this.blackness,a:this.opacity}}isDark(e){let t=e||128;return(this.red*299+this.green*587+this.blue*114)/1e3<t}saturate(e){let t,i,r;t=e/100||.1,this.sat+=t,this.sat>1&&(this.sat=1),i=s.hslToRgb(this.hue,this.sat,this.lightness),r=s.colorObject(i,this.opacity,this.hue,this.sat),this.attachValues(r)}desaturate(e){let t,i,r;t=e/100||.1,this.sat-=t,this.sat<0&&(this.sat=0),i=s.hslToRgb(this.hue,this.sat,this.lightness),r=s.colorObject(i,this.opacity,this.hue,this.sat),this.attachValues(r)}lighter(e){let t,i,r;t=e/100||.1,this.lightness+=t,this.lightness>1&&(this.lightness=1),i=s.hslToRgb(this.hue,this.sat,this.lightness),r=s.colorObject(i,this.opacity,this.hue,this.sat),this.attachValues(r)}darker(e){let t,i,r;t=e/100||.1,this.lightness-=t,this.lightness<0&&(this.lightness=0),i=s.hslToRgb(this.hue,this.sat,this.lightness),r=s.colorObject(i,this.opacity,this.hue,this.sat),this.attachValues(r)}attachValues(e){this.red=e.red,this.green=e.green,this.blue=e.blue,this.hue=e.hue,this.sat=e.sat,this.lightness=e.lightness,this.whiteness=e.whiteness,this.blackness=e.blackness,this.cyan=e.cyan,this.magenta=e.magenta,this.yellow=e.yellow,this.black=e.black,this.ncol=e.ncol,this.opacity=e.opacity,this.valid=e.valid}static toColorObject(e){let t,i,r,n=[],o,a,l,c,h,d,p,g,m=[],f=[];if(e=s.w3trim(e.toLowerCase()),t=e.substr(0,1).toUpperCase(),i=e.substr(1),h=1,(t=="R"||t=="Y"||t=="G"||t=="C"||t=="B"||t=="M"||t=="W")&&!isNaN(i)&&(e.length==6&&e.indexOf(",")==-1||(e="ncol("+e+")")),e.length!=3&&e.length!=6&&!isNaN(e)&&(e="ncol("+e+")"),e.indexOf(",")>0&&e.indexOf("(")==-1&&(e="ncol("+e+")"),e.substr(0,3)=="rgb"||e.substr(0,3)=="hsl"||e.substr(0,3)=="hwb"||e.substr(0,4)=="ncol"||e.substr(0,4)=="cmyk"){if(e.substr(0,4)=="ncol"?(e.split(",").length==4&&e.indexOf("ncola")==-1&&(e=e.replace("ncol","ncola")),r="ncol",e=e.substr(4)):e.substr(0,4)=="cmyk"?(r="cmyk",e=e.substr(4)):(r=e.substr(0,3),e=e.substr(3)),o=3,l=!1,e.substr(0,1).toLowerCase()=="a"?(o=4,l=!0,e=e.substr(1)):r=="cmyk"&&(o=4,e.split(",").length==5&&(o=5,l=!0)),e=e.replace("(",""),e=e.replace(")",""),n=e.split(","),r=="rgb"){if(n.length!=o)return new s;for(a=0;a<o;a++){if((n[a]==""||n[a]==" ")&&(n[a]="0"),n[a].indexOf("%")>-1&&(n[a]=n[a].replace("%",""),n[a]=Number(n[a]/100),a<3&&(n[a]=Math.round(n[a]*255))),isNaN(n[a]))return new s;parseInt(n[a])>255&&(n[a]=255),a<3&&(n[a]=parseInt(n[a])),a==3&&Number(n[a])>1&&(n[a]=1)}g={r:n[0],g:n[1],b:n[2]},l==!0&&(h=Number(n[3]))}if(r=="hsl"||r=="hwb"||r=="ncol"){for(;n.length<o;)n.push("0");for((r=="hsl"||r=="hwb")&&parseInt(n[0])>=360&&(n[0]=0),a=1;a<o;a++){if(n[a].indexOf("%")>-1){if(n[a]=n[a].replace("%",""),n[a]=Number(n[a]),isNaN(n[a]))return new s;n[a]=n[a]/100}else n[a]=Number(n[a]);Number(n[a])>1&&(n[a]=1),Number(n[a])<0&&(n[a]=0)}r=="hsl"&&(g=s.hslToRgb(n[0],n[1],n[2]),d=Number(n[0]),p=Number(n[1])),r=="hwb"&&(g=s.hwbToRgb(n[0],n[1],n[2])),r=="ncol"&&(g=s.ncolToRgb(n[0],n[1],n[2])),l==!0&&(h=Number(n[3]))}if(r=="cmyk"){for(;n.length<o;)n.push("0");for(a=0;a<o;a++){if(n[a].indexOf("%")>-1){if(n[a]=n[a].replace("%",""),n[a]=Number(n[a]),isNaN(n[a]))return new s;n[a]=n[a]/100}else n[a]=Number(n[a]);Number(n[a])>1&&(n[a]=1),Number(n[a])<0&&(n[a]=0)}g=s.cmykToRgb(n[0],n[1],n[2],n[3]),l==!0&&(h=Number(n[4]))}}else if(e.substr(0,3)=="ncs")g=s.ncsToRgb(e);else{for(c=!1,m=s.getColorArr("names"),a=0;a<m.length;a++)if(e.toLowerCase()==m[a].toLowerCase()){f=s.getColorArr("hexs"),c=!0,g={r:parseInt(f[a].substr(0,2),16),g:parseInt(f[a].substr(2,2),16),b:parseInt(f[a].substr(4,2),16)};break}if(c==!1){for(e=e.replace("#",""),e.length==3&&(e=e.substr(0,1)+e.substr(0,1)+e.substr(1,1)+e.substr(1,1)+e.substr(2,1)+e.substr(2,1)),a=0;a<e.length;a++)if(!s.isHex(e.substr(a,1)))return new s;for(n[0]=parseInt(e.substr(0,2),16),n[1]=parseInt(e.substr(2,2),16),n[2]=parseInt(e.substr(4,2),16),a=0;a<3;a++)if(isNaN(n[a]))return new s;g={r:n[0],g:n[1],b:n[2]}}}return s.colorObject(g,h,d,p)}static colorObject(e,t,i,r){let n,o,a,l,c,h,d;return e?(t===null&&(t=1),n=s.rgbToHsl(e.r,e.g,e.b),o=s.rgbToHwb(e.r,e.g,e.b),a=s.rgbToCmyk(e.r,e.g,e.b),h=i||n.h,d=r||n.s,l=s.hueToNcol(h),c={red:e.r,green:e.g,blue:e.b,hue:h,sat:d,lightness:n.l,whiteness:o.w,blackness:o.b,cyan:a.c,magenta:a.m,yellow:a.y,black:a.k,ncol:l,opacity:t,valid:!0},c=s.roundDecimals(c),Object.assign(new s,c)):new s}static getColorArr(e){return e=="names"?["AliceBlue","AntiqueWhite","Aqua","Aquamarine","Azure","Beige","Bisque","Black","BlanchedAlmond","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","CornflowerBlue","Cornsilk","Crimson","Cyan","DarkBlue","DarkCyan","DarkGoldenRod","DarkGray","DarkGrey","DarkGreen","DarkKhaki","DarkMagenta","DarkOliveGreen","DarkOrange","DarkOrchid","DarkRed","DarkSalmon","DarkSeaGreen","DarkSlateBlue","DarkSlateGray","DarkSlateGrey","DarkTurquoise","DarkViolet","DeepPink","DeepSkyBlue","DimGray","DimGrey","DodgerBlue","FireBrick","FloralWhite","ForestGreen","Fuchsia","Gainsboro","GhostWhite","Gold","GoldenRod","Gray","Grey","Green","GreenYellow","HoneyDew","HotPink","IndianRed","Indigo","Ivory","Khaki","Lavender","LavenderBlush","LawnGreen","LemonChiffon","LightBlue","LightCoral","LightCyan","LightGoldenRodYellow","LightGray","LightGrey","LightGreen","LightPink","LightSalmon","LightSeaGreen","LightSkyBlue","LightSlateGray","LightSlateGrey","LightSteelBlue","LightYellow","Lime","LimeGreen","Linen","Magenta","Maroon","MediumAquaMarine","MediumBlue","MediumOrchid","MediumPurple","MediumSeaGreen","MediumSlateBlue","MediumSpringGreen","MediumTurquoise","MediumVioletRed","MidnightBlue","MintCream","MistyRose","Moccasin","NavajoWhite","Navy","OldLace","Olive","OliveDrab","Orange","OrangeRed","Orchid","PaleGoldenRod","PaleGreen","PaleTurquoise","PaleVioletRed","PapayaWhip","PeachPuff","Peru","Pink","Plum","PowderBlue","Purple","RebeccaPurple","Red","RosyBrown","RoyalBlue","SaddleBrown","Salmon","SandyBrown","SeaGreen","SeaShell","Sienna","Silver","SkyBlue","SlateBlue","SlateGray","SlateGrey","Snow","SpringGreen","SteelBlue","Tan","Teal","Thistle","Tomato","Turquoise","Violet","Wheat","White","WhiteSmoke","Yellow","YellowGreen"]:e=="hexs"?["f0f8ff","faebd7","00ffff","7fffd4","f0ffff","f5f5dc","ffe4c4","000000","ffebcd","0000ff","8a2be2","a52a2a","deb887","5f9ea0","7fff00","d2691e","ff7f50","6495ed","fff8dc","dc143c","00ffff","00008b","008b8b","b8860b","a9a9a9","a9a9a9","006400","bdb76b","8b008b","556b2f","ff8c00","9932cc","8b0000","e9967a","8fbc8f","483d8b","2f4f4f","2f4f4f","00ced1","9400d3","ff1493","00bfff","696969","696969","1e90ff","b22222","fffaf0","228b22","ff00ff","dcdcdc","f8f8ff","ffd700","daa520","808080","808080","008000","adff2f","f0fff0","ff69b4","cd5c5c","4b0082","fffff0","f0e68c","e6e6fa","fff0f5","7cfc00","fffacd","add8e6","f08080","e0ffff","fafad2","d3d3d3","d3d3d3","90ee90","ffb6c1","ffa07a","20b2aa","87cefa","778899","778899","b0c4de","ffffe0","00ff00","32cd32","faf0e6","ff00ff","800000","66cdaa","0000cd","ba55d3","9370db","3cb371","7b68ee","00fa9a","48d1cc","c71585","191970","f5fffa","ffe4e1","ffe4b5","ffdead","000080","fdf5e6","808000","6b8e23","ffa500","ff4500","da70d6","eee8aa","98fb98","afeeee","db7093","ffefd5","ffdab9","cd853f","ffc0cb","dda0dd","b0e0e6","800080","663399","ff0000","bc8f8f","4169e1","8b4513","fa8072","f4a460","2e8b57","fff5ee","a0522d","c0c0c0","87ceeb","6a5acd","708090","708090","fffafa","00ff7f","4682b4","d2b48c","008080","d8bfd8","ff6347","40e0d0","ee82ee","f5deb3","ffffff","f5f5f5","ffff00","9acd32"]:null}static roundDecimals(e){return e.red=Number(e.red.toFixed(0)),e.green=Number(e.green.toFixed(0)),e.blue=Number(e.blue.toFixed(0)),e.hue=Number(e.hue.toFixed(0)),e.sat=Number(e.sat.toFixed(2)),e.lightness=Number(e.lightness.toFixed(2)),e.whiteness=Number(e.whiteness.toFixed(2)),e.blackness=Number(e.blackness.toFixed(2)),e.cyan=Number(e.cyan.toFixed(2)),e.magenta=Number(e.magenta.toFixed(2)),e.yellow=Number(e.yellow.toFixed(2)),e.black=Number(e.black.toFixed(2)),e.ncol=e.ncol.substr(0,1)+Math.round(Number(e.ncol.substr(1))),e.opacity=Number(e.opacity.toFixed(2)),e}static hslToRgb(e,t,i){let r,n,o,a,l;return e=e/60,i<=.5?n=i*(t+1):n=i+t-i*t,r=i*2-n,o=s.hueToRgb(r,n,e+2)*255,a=s.hueToRgb(r,n,e)*255,l=s.hueToRgb(r,n,e-2)*255,{r:o,g:a,b:l}}static hueToRgb(e,t,i){return i<0&&(i+=6),i>=6&&(i-=6),i<1?(t-e)*i+e:i<3?t:i<4?(t-e)*(4-i)+e:e}static hwbToRgb(e,t,i){let r,n,o=[],a;for(n=s.hslToRgb(e,1,.5),o[0]=n.r/255,o[1]=n.g/255,o[2]=n.b/255,a=t+i,a>1&&(t=Number((t/a).toFixed(2)),i=Number((i/a).toFixed(2))),r=0;r<3;r++)o[r]*=1-t-i,o[r]+=t,o[r]=Number(o[r]*255);return{r:o[0],g:o[1],b:o[2]}}static cmykToRgb(e,t,i,r){let n,o,a;return n=255-Math.min(1,e*(1-r)+r)*255,o=255-Math.min(1,t*(1-r)+r)*255,a=255-Math.min(1,i*(1-r)+r)*255,{r:n,g:o,b:a}}static ncolToRgb(e,t,i){let r,n,o;if(o=e,isNaN(e.substr(0,1))){if(r=e.substr(0,1).toUpperCase(),n=e.substr(1),n==""&&(n=0),n=Number(n),isNaN(n))return!1;r=="R"&&(o=0+n*.6),r=="Y"&&(o=60+n*.6),r=="G"&&(o=120+n*.6),r=="C"&&(o=180+n*.6),r=="B"&&(o=240+n*.6),r=="M"&&(o=300+n*.6),r=="W"&&(o=0,t=1-n/100,i=n/100)}return s.hwbToRgb(o,t,i)}static hueToNcol(e){for(;e>=360;)e=e-360;return e<60?"R"+e/.6:e<120?"Y"+(e-60)/.6:e<180?"G"+(e-120)/.6:e<240?"C"+(e-180)/.6:e<300?"B"+(e-240)/.6:e<360?"M"+(e-300)/.6:null}static ncsToRgb(e){let t,i,r,n,o,a,l,c,h,d,p,g,m,f,b,x,w,A,P;return e=s.w3trim(e).toUpperCase(),e=e.replace("(",""),e=e.replace(")",""),e=e.replace("NCS","NCS "),e=e.replace(/ /g," "),e.indexOf("NCS")==-1&&(e="NCS "+e),e=e.match(/^(?:NCS|NCS\sS)\s(\d{2})(\d{2})-(N|[A-Z])(\d{2})?([A-Z])?$/),e===null||(t=parseInt(e[1],10),i=parseInt(e[2],10),r=e[3],r!="N"&&r!="Y"&&r!="R"&&r!="B"&&r!="G")?null:(n=parseInt(e[4],10)||0,r!=="N"?(o=1.05*t-5.25,a=i,r==="Y"&&n<=60?h=1:r==="Y"&&n>60||r==="R"&&n<=80?(r==="Y"?l=n-60:l=n+40,h=(Math.sqrt(14884-Math.pow(l,2))-22)/100):r==="R"&&n>80||r==="B"?h=0:r==="G"&&(l=n-170,h=(Math.sqrt(33800-Math.pow(l,2))-70)/100),r==="Y"&&n<=80?c=0:r==="Y"&&n>80||r==="R"&&n<=60?(r==="Y"?l=n-80+20.5:l=n+20+20.5,c=(104-Math.sqrt(11236-Math.pow(l,2)))/100):r==="R"&&n>60||r==="B"&&n<=80?(r==="R"?l=n-60-60:l=n+40-60,c=(Math.sqrt(1e4-Math.pow(l,2))-10)/100):r==="B"&&n>80||r==="G"&&n<=40?(r==="B"?l=n-80-131:l=n+20-131,c=(122-Math.sqrt(19881-Math.pow(l,2)))/100):r==="G"&&n>40&&(c=0),r==="Y"?p=(85-17/20*n)/100:r==="R"&&n<=60?p=0:r==="R"&&n>60?(l=n-60+35,p=(67.5-Math.sqrt(5776-Math.pow(l,2)))/100):r==="B"&&n<=60?(l=1*n-68.5,p=(6.5+Math.sqrt(7044.5-Math.pow(l,2)))/100):r==="B"&&n>60||r==="G"&&n<=60?p=.9:r==="G"&&n>60&&(l=n-60,p=(90-1/8*l)/100),l=(h+p+c)/3,d=(l-h)*(100-a)/100+h,g=(l-p)*(100-a)/100+p,m=(l-c)*(100-a)/100+c,d>g&&d>m?f=d:g>d&&g>m?f=g:m>d&&m>g?f=m:f=(d+g+m)/3,b=1/f,w=parseInt(d*b*(100-o)/100*255,10),A=parseInt(g*b*(100-o)/100*255,10),P=parseInt(m*b*(100-o)/100*255,10),w>255&&(w=255),A>255&&(A=255),P>255&&(P=255),w<0&&(w=0),A<0&&(A=0),P<0&&(P=0)):(x=parseInt((1-t/100)*255,10),x>255&&(x=255),x<0&&(x=0),w=x,A=x,P=x),{r:w,g:A,b:P})}static rgbToHsl(e,t,i){let r,n,o,a,l,c,h,d=[];for(d[0]=e/255,d[1]=t/255,d[2]=i/255,r=d[0],n=d[0],c=0,o=0;o<d.length-1;o++)d[o+1]<=r&&(r=d[o+1]),d[o+1]>=n&&(n=d[o+1],c=o+1);return c==0&&(h=(d[1]-d[2])/(n-r)),c==1&&(h=2+(d[2]-d[0])/(n-r)),c==2&&(h=4+(d[0]-d[1])/(n-r)),isNaN(h)&&(h=0),h=h*60,h<0&&(h=h+360),a=(r+n)/2,r==n?l=0:a<.5?l=(n-r)/(n+r):l=(n-r)/(2-n-r),l=l,{h,s:l,l:a}}static rgbToHwb(e,t,i){let r,n,o;e=e/255,t=t/255,i=i/255;let a=Math.max(e,t,i),l=Math.min(e,t,i),c=a-l;return c==0?r=0:e==a?r=(t-i)/c%6*360:t==a?r=((i-e)/c+2)%6*360:r=((e-t)/c+4)%6*360,n=l,o=1-a,{h:r,w:n,b:o}}static rgbToCmyk(e,t,i){let r,n,o,a;return e=e/255,t=t/255,i=i/255,a=1-Math.max(e,t,i),a==1?(r=0,n=0,o=0):(r=(1-e-a)/(1-a),n=(1-t-a)/(1-a),o=(1-i-a)/(1-a)),{c:r,m:n,y:o,k:a}}static toHex(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return t}static w3trim(e){return e.replace(/^\s+|\s+$/g,"")}static isHex(e){return"0123456789ABCDEFabcdef".indexOf(e)>-1}}});var vr,Go=u(()=>{"use strict";ge();Ho();vr=class extends q{constructor(e){super(e);let t=document.createElement("input");t.type="color",e.readonly&&(t.readOnly=!0),t.onchange=i=>{let r=xi.toColorObject(t.value);this._valueChanged(r.toNameOrHexString())},this.element=t}refreshValue(e,t){if(!t)this.element.value="#000000";else{let i=xi.toColorObject(t);this.element.value=i.toHexString()}}}});var xr,Wo=u(()=>{"use strict";ge();xr=class extends q{constructor(e){super(e);let t=document.createElement("input");t.type="datetime-local",e.readonly&&(t.readOnly=!0),t.onchange=i=>this._valueChanged(t.value),this.element=t}refreshValue(e,t){t?this.element.value=t:this.element.value=null}}});import{html as Fd}from"@node-projects/base-custom-webcomponent";var _r,jo=u(()=>{"use strict";ge();_r=class s extends q{static template=Fd`
|
|
182
182
|
<div style="display: flex;">
|
|
183
183
|
<input id="input" type="text">
|
|
184
184
|
<button style="width: 30px;">...</button>
|
|
185
185
|
</div>
|
|
186
|
-
`;_input;constructor(e){super(e);let t=s.template.content.cloneNode(!0);this._input=t.getElementById("input"),this._input.onchange=i=>this._valueChanged(this._input.value),this.element=t}refreshValue(e,t){this._input.value=t}}});var br,Uo=u(()=>{"use strict";ge();br=class extends q{constructor(e){super(e);let t=document.createElement("input");t.type="number",t.min=e.min,t.max=e.max,t.step=e.step,t.onchange=i=>this._valueChanged(t.value==""?null:t.valueAsNumber),this.element=t}refreshValue(e,t){this.element.value=t===void 0?null:t}}});var _i,Ko=u(()=>{"use strict";ge();_i=class extends q{elementSelect;elementInput;constructor(e){super(e);let t=document.createElement("div"),i=document.createElement("select");if(e.type=="enum")for(let n of e.enumValues){let o=document.createElement("option");o.value=n[1],o.text=n[0],i.appendChild(o)}else for(let n of e.values){let o=document.createElement("option");o.value=n,o.text=n,i.appendChild(o)}i.onchange=n=>this._valueChanged(i.value);let r=document.createElement("input");r.style.display="none",r.onchange=n=>this._valueChanged(r.value),this.elementSelect=i,this.elementInput=r,t.appendChild(this.elementSelect),t.appendChild(this.elementInput),this.element=t}refreshValue(e,t){this.elementSelect.style.display="block",this.elementInput.style.display="none",this.elementSelect.value=t,this.elementSelect.value!=t&&t&&(this.elementInput.value=t,this.elementSelect.style.display="none",this.elementInput.style.display="block")}}});var Sr,Yo=u(()=>{"use strict";ge();Sr=class extends q{constructor(e){super(e);let t=document.createElement("input");t.type="text",t.onchange=i=>this._valueChanged(t.value),t.onfocus=i=>{t.selectionStart=0,t.selectionEnd=t.value?.length},this.element=t}refreshValue(e,t){t==null?this.element.value="":this.element.value=t}}});var wr,Xo=u(()=>{"use strict";ge();wr=class extends q{constructor(e){super(e);let t=document.createElement("input");t.type="checkbox",t.onchange=i=>this._valueChanged(t.checked),this.element=t}refreshValue(e,t){this.element.checked=t}}});import{BaseCustomWebComponentConstructorAppend as Bd,css as Vd,html as Hd}from"@node-projects/base-custom-webcomponent";var bi,lh=u(()=>{"use strict";bi=class extends Bd{static style=Vd`
|
|
186
|
+
`;_input;constructor(e){super(e);let t=s.template.content.cloneNode(!0);this._input=t.getElementById("input"),e.readonly&&(this._input.readOnly=!0),this._input.onchange=i=>this._valueChanged(this._input.value),this.element=t}refreshValue(e,t){this._input.value=t}}});var br,Uo=u(()=>{"use strict";ge();br=class extends q{constructor(e){super(e);let t=document.createElement("input");t.type="number",e.readonly&&(t.readOnly=!0),t.min=e.min,t.max=e.max,t.step=e.step,t.onchange=i=>this._valueChanged(t.value==""?null:t.valueAsNumber),this.element=t}refreshValue(e,t){this.element.value=t===void 0?null:t}}});var _i,Ko=u(()=>{"use strict";ge();_i=class extends q{elementSelect;elementInput;constructor(e){super(e);let t=document.createElement("div"),i=document.createElement("select");if(e.type=="enum")for(let n of e.enumValues){let o=document.createElement("option");o.value=n[1],o.text=n[0],i.appendChild(o)}else for(let n of e.values){let o=document.createElement("option");o.value=n,o.text=n,i.appendChild(o)}e.readonly&&(i.disabled=!0),i.onchange=n=>this._valueChanged(i.value);let r=document.createElement("input");r.style.display="none",r.onchange=n=>this._valueChanged(r.value),this.elementSelect=i,this.elementInput=r,t.appendChild(this.elementSelect),t.appendChild(this.elementInput),this.element=t}refreshValue(e,t){this.elementSelect.style.display="block",this.elementInput.style.display="none",this.elementSelect.value=t,this.elementSelect.value!=t&&t&&(this.elementInput.value=t,this.elementSelect.style.display="none",this.elementInput.style.display="block")}}});var Sr,Yo=u(()=>{"use strict";ge();Sr=class extends q{constructor(e){super(e);let t=document.createElement("input");t.type="text",e.readonly&&(t.readOnly=!0),t.onchange=i=>this._valueChanged(t.value),t.onfocus=i=>{t.selectionStart=0,t.selectionEnd=t.value?.length},this.element=t}refreshValue(e,t){t==null?this.element.value="":this.element.value=t}}});var wr,Xo=u(()=>{"use strict";ge();wr=class extends q{constructor(e){super(e);let t=document.createElement("input");t.type="checkbox",e.readonly&&(t.readOnly=!0),t.onchange=i=>this._valueChanged(t.checked),this.element=t}refreshValue(e,t){this.element.checked=t}}});import{BaseCustomWebComponentConstructorAppend as Bd,css as Vd,html as Hd}from"@node-projects/base-custom-webcomponent";var bi,lh=u(()=>{"use strict";bi=class extends Bd{static style=Vd`
|
|
187
187
|
div {
|
|
188
188
|
font-size: 10px;
|
|
189
189
|
color: white;
|
|
@@ -268,7 +268,7 @@ var gd=Object.defineProperty;var u=(s,e)=>()=>(s&&(e=s(s=0)),e);var yd=(s,e)=>{f
|
|
|
268
268
|
<input id="bottom">
|
|
269
269
|
<div id="rect"></div>
|
|
270
270
|
</div>
|
|
271
|
-
`;_leftInput;_topInput;_rightInput;_bottomInput;_valueLeft;get valueLeft(){return this._valueLeft}set valueLeft(e){let t=this._valueLeft;this._valueLeft=e,t!==e&&(this._updateValue(),this.valueLeftChanged.emit({newValue:e,oldValue:t}))}valueLeftChanged=new Ar;_valueTop;get valueTop(){return this._valueTop}set valueTop(e){let t=this._valueTop;this._valueTop=e,t!==e&&(this._updateValue(),this.valueTopChanged.emit({newValue:e,oldValue:t}))}valueTopChanged=new Ar;_valueRight;get valueRight(){return this._valueRight}set valueRight(e){let t=this._valueRight;this._valueRight=e,t!==e&&(this._updateValue(),this.valueRightChanged.emit({newValue:e,oldValue:t}))}valueRightChanged=new Ar;_valueBottom;get valueBottom(){return this._valueBottom}set valueBottom(e){let t=this._valueBottom;this._valueBottom=e,t!==e&&(this._updateValue(),this.valueBottomChanged.emit({newValue:e,oldValue:t}))}valueBottomChanged=new Ar;property;unsetValue;_updateValue(){this._leftInput.value=this.valueLeft,this._topInput.value=this.valueTop,this._rightInput.value=this.valueRight,this._bottomInput.value=this._valueBottom}ready(){this._parseAttributesToProperties(),this._leftInput=this._getDomElement("left"),this._topInput=this._getDomElement("top"),this._rightInput=this._getDomElement("right"),this._bottomInput=this._getDomElement("bottom"),this._leftInput.onkeyup=e=>{e.key==="Enter"&&(this._valueLeft=this._leftInput.value)},this._topInput.onkeyup=e=>{e.key==="Enter"&&(this._valueTop=this._topInput.value)},this._rightInput.onkeyup=e=>{e.key==="Enter"&&(this._valueRight=this._rightInput.value)},this._bottomInput.onkeyup=e=>{e.key==="Enter"&&(this._valueBottom=this._bottomInput.value)},this._leftInput.onblur=e=>this._valueLeft=this._leftInput.value,this._topInput.onblur=e=>this._valueTop=this._topInput.value,this._rightInput.onblur=e=>this._valueRight=this._rightInput.value,this._bottomInput.onblur=e=>this._valueBottom=this._bottomInput.value,this._updateValue()}};customElements.define("node-projects-thickness-editor",Si)});var Pr,qo=u(()=>{"use strict";ge();hh();Pr=class extends q{constructor(e){super(e);let t=new Si;t.property=e.name,t.valueLeftChanged.on(i=>this._valueChanged(i.newValue)),this.element=t}refreshValue(e,t){this.element.valueLeft=t}}});var Ft,Qo=u(()=>{"use strict";ge();Ft=class s extends q{static fontList;constructor(e){super(e);let t=document.createElement("select");this.element=t,s.addFontsToSelect(t),this.element.onchange=i=>this._valueChanged(this.element.value)}static addFontsToSelect(e){s.fontList?s.parseFontList(e):window.queryLocalFonts?window.queryLocalFonts().then(t=>{s.fontList=[...new Set(t.map(i=>i.family))],s.parseFontList(e)}):(s.fontList=["Verdana","Arial","Tahoma","Trebuchet MS","Times New Roman","Georgia","Garamond","Courier New","Brush Script MT"],s.parseFontList(e))}static parseFontList(e){for(let t of s.fontList){let i=document.createElement("option");i.value=t,i.text=t,e.appendChild(i)}}refreshValue(e,t){this.element.value=t}}});var kr,Jo=u(()=>{"use strict";Go();Wo();jo();Uo();Ko();Yo();Xo();$o();qo();Qo();kr=class{getEditorForProperty(e){if(e.createEditor)return e.createEditor(e);switch(e.type){case"json":return new _r(e);case"color":return new vr(e);case"font":return new Ft(e);case"date":return new xr(e);case"number":return new br(e);case"list":return new _i(e);case"enum":return new _i(e);case"boolean":return new wr(e);case"img-list":return new Er(e);case"thickness":return new Pr(e);case"css-length":case"string":default:return new Sr(e)}}}});import{BaseCustomWebComponentLazyAppend as Ud,BaseCustomWebComponentConstructorAppend as Kd,BaseCustomWebComponentNoAttachedTemplate as Yd,BaseCustomWebComponentConstructorAppendLazyReady as Xd}from"@node-projects/base-custom-webcomponent";var Ir,ea=u(()=>{"use strict";Ot();Ir=class extends Le{name="baseCustomWebComponent";isHandledElement(e){return e.element instanceof Ud||e.element instanceof Xd||e.element instanceof Kd||e.element instanceof Yd}_notifyChangedProperty(e,t,i){e.element._parseAttributesToProperties()}}});function Dr(s,e,t){if(e==null||e==""){s.style.transform=t;return}let i=new DOMMatrix(e),n=new DOMMatrix(t).multiply(i);s.style.transform=n.toString()}function ta(s,e){let t=e.inverse();return s.matrixTransform(t)}function Bt(s){return new DOMPoint(s.m41,s.m42,0,0)}var Tr=u(()=>{"use strict"});function ie(s){let e=[];e:for(let t of s){let i=t.parent;for(;i!=null&&!i.isRootItem;){if(s.indexOf(i)>=0)continue e;i=i.parent}e.push(t)}return e}function Mr(s,e){if(e==="position"){let t=getComputedStyle(s.element),i=parseFloat(t.left);i=Number.isNaN(i)?null:i;let r=parseFloat(t.top);return r=Number.isNaN(r)?null:r,{x:i,y:r}}return{x:0,y:0}}function Or(s,e,t,i){let r=e.element,n=getComputedStyle(r);if(i==="position"){let o=s.element,a=s.getComputedStyle();a.position!=="relative"&&a.position!=="absolute"&&o.offsetParent&&(o=o.offsetParent,a=s.window.getComputedStyle(o));let l=null,c=null,h=null,d=null,p=0,g=0,m=0,f=0,b=!1;if(n.position==="relative"||n.position==="absolute")l=parseFloat(r.style.left),l=Number.isNaN(l)?null:l,h=parseFloat(r.style.top),h=Number.isNaN(h)?null:h,c=parseFloat(r.style.right),c=Number.isNaN(c)?null:c,d=parseFloat(r.style.bottom),d=Number.isNaN(d)?null:d,b=!0;else if(o!==s.element){let x=o.getBoundingClientRect(),w=e.element.getBoundingClientRect();p=w.left-x.left,g=w.right-x.right,m=w.top-x.top,f=w.bottom-x.bottom}b||e.setStyle("position","absolute"),(l||c==null)&&e.setStyle("left",O(e,t.x+(l??0)+p)+"px"),(h||d==null)&&e.setStyle("top",O(e,t.y+(h??0)+m)+"px"),c&&e.setStyle("right",O(e,(c??0)-t.x+g)+"px"),d&&e.setStyle("bottom",O(e,(d??0)-t.y+f)+"px")}}function O(s,e){return s.serviceContainer.options.roundPixelsToDecimalPlaces>=0?e.toFixed(s.serviceContainer.options.roundPixelsToDecimalPlaces):e.toString()}var xe=u(()=>{"use strict"});function Xe(s,e,t=!1){let i,r=dh(s,e),n;return t?r>=315&&r<360||r>=0&&r<45?i={x:e.x,y:s.y}:r>=45&&r<135?i={x:s.x,y:e.y}:r>=135&&r<225?i={x:e.x,y:s.y}:r>=225&&r<315&&(i={x:s.x,y:e.y}):r>=337.5&&r<360||r>=0&&r<22.5?i={x:e.x,y:s.y}:r>=22.5&&r<67.5?(n=ze(s,e),i={x:s.x+n,y:s.y-n}):r>=67.5&&r<112.5?i={x:s.x,y:e.y}:r>=112.5&&r<157.5?(n=ze(s,e),i={x:s.x-n,y:s.y-n}):r>=157.5&&r<202.5?i={x:e.x,y:s.y}:r>=202.5&&r<247.5?(n=ze(s,e),i={x:s.x-n,y:s.y+n}):r>=247.5&&r<292.5?i={x:s.x,y:e.y}:r>=292.5&&r<337.5&&(n=ze(s,e),i={x:s.x+n,y:s.y+n}),i}function ze(s,e){let t,i=Math.sqrt(Math.pow(e.x-s.x,2)+Math.pow(e.y-s.y,2)),r=dh(s,e),n=r-(Math.floor(r/90)*90+45);return t=i*Math.cos(n*(Math.PI/180))/Math.sqrt(2),t}function dh(s,e){let t=-1*Math.atan2(e.y-s.y,e.x-s.x)*180/Math.PI;return t<0&&(t+=360),t}function ph(s,e,t){let i="",r=s.getPathData({normalize:!0});for(let n of r)switch(n.type){case"M":case"m":case"L":case"l":case"T":case"t":i+=n.type+" "+(n.values[0]-e)+" "+(n.values[1]-t)+" ";break;case"Z":case"z":i+=n.type+" ";break;case"C":case"c":i+=n.type+" "+(n.values[0]-e)+" "+(n.values[1]-t)+" "+(n.values[2]-e)+" "+(n.values[3]-t)+" "+(n.values[4]-e)+" "+(n.values[5]-t)+" ";break;case"S":case"s":case"Q":case"q":i+=n.type+" "+(n.values[0]-e)+" "+(n.values[1]-t)+" "+(n.values[2]-e)+" "+(n.values[3]-t)+" ";break;case"A":case"a":i+=n.type+" "+(n.values[0]-e)+" "+(n.values[1]-t)+" "+n.values[2]+" "+n.values[3]+" "+n.values[4]+" "+(n.values[5]-e)+" "+(n.values[6]-t)+" ";break}return i}function De(s){let e="";for(let i of s){e+=i.type+" ";for(var t=0;t<i.values.length;t++)i.values[t]!=null&&!isNaN(i.values[t])&&(e+=i.values[t]+" ")}return e}var Te=u(()=>{"use strict";(!SVGPathElement.prototype.getPathData||!SVGPathElement.prototype.setPathData)&&(function(){var s={Z:"Z",M:"M",L:"L",C:"C",Q:"Q",A:"A",H:"H",V:"V",S:"S",T:"T",z:"Z",m:"m",l:"l",c:"c",q:"q",a:"a",h:"h",v:"v",s:"s",t:"t"},e=function(o){this._string=o,this._currentIndex=0,this._endIndex=this._string.length,this._prevCommand=null,this._skipOptionalSpaces()};e.prototype={parseSegment:function(){var o=this._string[this._currentIndex],a=s[o]?s[o]:null;if(a===null){if(this._prevCommand===null||((o==="+"||o==="-"||o==="."||o>="0"&&o<="9")&&this._prevCommand!=="Z"?this._prevCommand==="M"?a="L":this._prevCommand==="m"?a="l":a=this._prevCommand:a=null,a===null))return null}else this._currentIndex+=1;this._prevCommand=a;var l=null,c=a.toUpperCase();return c==="H"||c==="V"?l=[this._parseNumber()]:c==="M"||c==="L"||c==="T"?l=[this._parseNumber(),this._parseNumber()]:c==="S"||c==="Q"?l=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:c==="C"?l=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:c==="A"?l=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseArcFlag(),this._parseArcFlag(),this._parseNumber(),this._parseNumber()]:c==="Z"&&(this._skipOptionalSpaces(),l=[]),l===null||l.indexOf(null)>=0?null:{type:a,values:l}},hasMoreData:function(){return this._currentIndex<this._endIndex},peekSegmentType:function(){var o=this._string[this._currentIndex];return s[o]?s[o]:null},initialCommandIsMoveTo:function(){if(!this.hasMoreData())return!0;var o=this.peekSegmentType();return o==="M"||o==="m"},_isCurrentSpace:function(){var o=this._string[this._currentIndex];return o<=" "&&(o===" "||o===`
|
|
271
|
+
`;_leftInput;_topInput;_rightInput;_bottomInput;_valueLeft;get valueLeft(){return this._valueLeft}set valueLeft(e){let t=this._valueLeft;this._valueLeft=e,t!==e&&(this._updateValue(),this.valueLeftChanged.emit({newValue:e,oldValue:t}))}valueLeftChanged=new Ar;_valueTop;get valueTop(){return this._valueTop}set valueTop(e){let t=this._valueTop;this._valueTop=e,t!==e&&(this._updateValue(),this.valueTopChanged.emit({newValue:e,oldValue:t}))}valueTopChanged=new Ar;_valueRight;get valueRight(){return this._valueRight}set valueRight(e){let t=this._valueRight;this._valueRight=e,t!==e&&(this._updateValue(),this.valueRightChanged.emit({newValue:e,oldValue:t}))}valueRightChanged=new Ar;_valueBottom;get valueBottom(){return this._valueBottom}set valueBottom(e){let t=this._valueBottom;this._valueBottom=e,t!==e&&(this._updateValue(),this.valueBottomChanged.emit({newValue:e,oldValue:t}))}valueBottomChanged=new Ar;property;unsetValue;_updateValue(){this._leftInput.value=this.valueLeft,this._topInput.value=this.valueTop,this._rightInput.value=this.valueRight,this._bottomInput.value=this._valueBottom}ready(){this._parseAttributesToProperties(),this._leftInput=this._getDomElement("left"),this._topInput=this._getDomElement("top"),this._rightInput=this._getDomElement("right"),this._bottomInput=this._getDomElement("bottom"),this._leftInput.onkeyup=e=>{e.key==="Enter"&&(this._valueLeft=this._leftInput.value)},this._topInput.onkeyup=e=>{e.key==="Enter"&&(this._valueTop=this._topInput.value)},this._rightInput.onkeyup=e=>{e.key==="Enter"&&(this._valueRight=this._rightInput.value)},this._bottomInput.onkeyup=e=>{e.key==="Enter"&&(this._valueBottom=this._bottomInput.value)},this._leftInput.onblur=e=>this._valueLeft=this._leftInput.value,this._topInput.onblur=e=>this._valueTop=this._topInput.value,this._rightInput.onblur=e=>this._valueRight=this._rightInput.value,this._bottomInput.onblur=e=>this._valueBottom=this._bottomInput.value,this._updateValue()}};customElements.define("node-projects-thickness-editor",Si)});var Pr,qo=u(()=>{"use strict";ge();hh();Pr=class extends q{constructor(e){super(e);let t=new Si;t.property=e.name,t.valueLeftChanged.on(i=>this._valueChanged(i.newValue)),this.element=t}refreshValue(e,t){this.element.valueLeft=t}}});var Ft,Qo=u(()=>{"use strict";ge();Ft=class s extends q{static fontList;constructor(e){super(e);let t=document.createElement("select");e.readonly&&(t.disabled=!0),this.element=t,s.addFontsToSelect(t),this.element.onchange=i=>this._valueChanged(this.element.value)}static addFontsToSelect(e){s.fontList?s.parseFontList(e):window.queryLocalFonts?window.queryLocalFonts().then(t=>{s.fontList=[...new Set(t.map(i=>i.family))],s.parseFontList(e)}):(s.fontList=["Verdana","Arial","Tahoma","Trebuchet MS","Times New Roman","Georgia","Garamond","Courier New","Brush Script MT"],s.parseFontList(e))}static parseFontList(e){for(let t of s.fontList){let i=document.createElement("option");i.value=t,i.text=t,e.appendChild(i)}}refreshValue(e,t){this.element.value=t}}});var kr,Jo=u(()=>{"use strict";Go();Wo();jo();Uo();Ko();Yo();Xo();$o();qo();Qo();kr=class{getEditorForProperty(e){if(e.createEditor)return e.createEditor(e);switch(e.type){case"json":return new _r(e);case"color":return new vr(e);case"font":return new Ft(e);case"date":return new xr(e);case"number":return new br(e);case"list":return new _i(e);case"enum":return new _i(e);case"boolean":return new wr(e);case"img-list":return new Er(e);case"thickness":return new Pr(e);case"css-length":case"string":default:return new Sr(e)}}}});import{BaseCustomWebComponentLazyAppend as Ud,BaseCustomWebComponentConstructorAppend as Kd,BaseCustomWebComponentNoAttachedTemplate as Yd,BaseCustomWebComponentConstructorAppendLazyReady as Xd}from"@node-projects/base-custom-webcomponent";var Ir,ea=u(()=>{"use strict";Ot();Ir=class extends Le{name="baseCustomWebComponent";isHandledElement(e){return e.element instanceof Ud||e.element instanceof Xd||e.element instanceof Kd||e.element instanceof Yd}_notifyChangedProperty(e,t,i){e.element._parseAttributesToProperties()}}});function Dr(s,e,t){if(e==null||e==""){s.style.transform=t;return}let i=new DOMMatrix(e),n=new DOMMatrix(t).multiply(i);s.style.transform=n.toString()}function ta(s,e){let t=e.inverse();return s.matrixTransform(t)}function Bt(s){return new DOMPoint(s.m41,s.m42,0,0)}var Tr=u(()=>{"use strict"});function ie(s){let e=[];e:for(let t of s){let i=t.parent;for(;i!=null&&!i.isRootItem;){if(s.indexOf(i)>=0)continue e;i=i.parent}e.push(t)}return e}function Mr(s,e){if(e==="position"){let t=getComputedStyle(s.element),i=parseFloat(t.left);i=Number.isNaN(i)?null:i;let r=parseFloat(t.top);return r=Number.isNaN(r)?null:r,{x:i,y:r}}return{x:0,y:0}}function Or(s,e,t,i){let r=e.element,n=getComputedStyle(r);if(i==="position"){let o=s.element,a=s.getComputedStyle();a.position!=="relative"&&a.position!=="absolute"&&o.offsetParent&&(o=o.offsetParent,a=s.window.getComputedStyle(o));let l=null,c=null,h=null,d=null,p=0,g=0,m=0,f=0,b=!1;if(n.position==="relative"||n.position==="absolute")l=parseFloat(r.style.left),l=Number.isNaN(l)?null:l,h=parseFloat(r.style.top),h=Number.isNaN(h)?null:h,c=parseFloat(r.style.right),c=Number.isNaN(c)?null:c,d=parseFloat(r.style.bottom),d=Number.isNaN(d)?null:d,b=!0;else if(o!==s.element){let x=o.getBoundingClientRect(),w=e.element.getBoundingClientRect();p=w.left-x.left,g=w.right-x.right,m=w.top-x.top,f=w.bottom-x.bottom}b||e.setStyle("position","absolute"),(l||c==null)&&e.setStyle("left",O(e,t.x+(l??0)+p)+"px"),(h||d==null)&&e.setStyle("top",O(e,t.y+(h??0)+m)+"px"),c&&e.setStyle("right",O(e,(c??0)-t.x+g)+"px"),d&&e.setStyle("bottom",O(e,(d??0)-t.y+f)+"px")}}function O(s,e){return s.serviceContainer.options.roundPixelsToDecimalPlaces>=0?e.toFixed(s.serviceContainer.options.roundPixelsToDecimalPlaces):e.toString()}var xe=u(()=>{"use strict"});function Xe(s,e,t=!1){let i,r=dh(s,e),n;return t?r>=315&&r<360||r>=0&&r<45?i={x:e.x,y:s.y}:r>=45&&r<135?i={x:s.x,y:e.y}:r>=135&&r<225?i={x:e.x,y:s.y}:r>=225&&r<315&&(i={x:s.x,y:e.y}):r>=337.5&&r<360||r>=0&&r<22.5?i={x:e.x,y:s.y}:r>=22.5&&r<67.5?(n=ze(s,e),i={x:s.x+n,y:s.y-n}):r>=67.5&&r<112.5?i={x:s.x,y:e.y}:r>=112.5&&r<157.5?(n=ze(s,e),i={x:s.x-n,y:s.y-n}):r>=157.5&&r<202.5?i={x:e.x,y:s.y}:r>=202.5&&r<247.5?(n=ze(s,e),i={x:s.x-n,y:s.y+n}):r>=247.5&&r<292.5?i={x:s.x,y:e.y}:r>=292.5&&r<337.5&&(n=ze(s,e),i={x:s.x+n,y:s.y+n}),i}function ze(s,e){let t,i=Math.sqrt(Math.pow(e.x-s.x,2)+Math.pow(e.y-s.y,2)),r=dh(s,e),n=r-(Math.floor(r/90)*90+45);return t=i*Math.cos(n*(Math.PI/180))/Math.sqrt(2),t}function dh(s,e){let t=-1*Math.atan2(e.y-s.y,e.x-s.x)*180/Math.PI;return t<0&&(t+=360),t}function ph(s,e,t){let i="",r=s.getPathData({normalize:!0});for(let n of r)switch(n.type){case"M":case"m":case"L":case"l":case"T":case"t":i+=n.type+" "+(n.values[0]-e)+" "+(n.values[1]-t)+" ";break;case"Z":case"z":i+=n.type+" ";break;case"C":case"c":i+=n.type+" "+(n.values[0]-e)+" "+(n.values[1]-t)+" "+(n.values[2]-e)+" "+(n.values[3]-t)+" "+(n.values[4]-e)+" "+(n.values[5]-t)+" ";break;case"S":case"s":case"Q":case"q":i+=n.type+" "+(n.values[0]-e)+" "+(n.values[1]-t)+" "+(n.values[2]-e)+" "+(n.values[3]-t)+" ";break;case"A":case"a":i+=n.type+" "+(n.values[0]-e)+" "+(n.values[1]-t)+" "+n.values[2]+" "+n.values[3]+" "+n.values[4]+" "+(n.values[5]-e)+" "+(n.values[6]-t)+" ";break}return i}function De(s){let e="";for(let i of s){e+=i.type+" ";for(var t=0;t<i.values.length;t++)i.values[t]!=null&&!isNaN(i.values[t])&&(e+=i.values[t]+" ")}return e}var Te=u(()=>{"use strict";(!SVGPathElement.prototype.getPathData||!SVGPathElement.prototype.setPathData)&&(function(){var s={Z:"Z",M:"M",L:"L",C:"C",Q:"Q",A:"A",H:"H",V:"V",S:"S",T:"T",z:"Z",m:"m",l:"l",c:"c",q:"q",a:"a",h:"h",v:"v",s:"s",t:"t"},e=function(o){this._string=o,this._currentIndex=0,this._endIndex=this._string.length,this._prevCommand=null,this._skipOptionalSpaces()};e.prototype={parseSegment:function(){var o=this._string[this._currentIndex],a=s[o]?s[o]:null;if(a===null){if(this._prevCommand===null||((o==="+"||o==="-"||o==="."||o>="0"&&o<="9")&&this._prevCommand!=="Z"?this._prevCommand==="M"?a="L":this._prevCommand==="m"?a="l":a=this._prevCommand:a=null,a===null))return null}else this._currentIndex+=1;this._prevCommand=a;var l=null,c=a.toUpperCase();return c==="H"||c==="V"?l=[this._parseNumber()]:c==="M"||c==="L"||c==="T"?l=[this._parseNumber(),this._parseNumber()]:c==="S"||c==="Q"?l=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:c==="C"?l=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:c==="A"?l=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseArcFlag(),this._parseArcFlag(),this._parseNumber(),this._parseNumber()]:c==="Z"&&(this._skipOptionalSpaces(),l=[]),l===null||l.indexOf(null)>=0?null:{type:a,values:l}},hasMoreData:function(){return this._currentIndex<this._endIndex},peekSegmentType:function(){var o=this._string[this._currentIndex];return s[o]?s[o]:null},initialCommandIsMoveTo:function(){if(!this.hasMoreData())return!0;var o=this.peekSegmentType();return o==="M"||o==="m"},_isCurrentSpace:function(){var o=this._string[this._currentIndex];return o<=" "&&(o===" "||o===`
|
|
272
272
|
`||o===" "||o==="\r"||o==="\f")},_skipOptionalSpaces:function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex+=1;return this._currentIndex<this._endIndex},_skipOptionalSpacesOrDelimiter:function(){return this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&this._string[this._currentIndex]!==","?!1:(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&this._string[this._currentIndex]===","&&(this._currentIndex+=1,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},_parseNumber:function(){var o=0,a=0,l=1,c=0,h=1,d=1,p=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&this._string[this._currentIndex]==="+"?this._currentIndex+=1:this._currentIndex<this._endIndex&&this._string[this._currentIndex]==="-"&&(this._currentIndex+=1,h=-1),this._currentIndex===this._endIndex||(this._string[this._currentIndex]<"0"||this._string[this._currentIndex]>"9")&&this._string[this._currentIndex]!==".")return null;for(var g=this._currentIndex;this._currentIndex<this._endIndex&&this._string[this._currentIndex]>="0"&&this._string[this._currentIndex]<="9";)this._currentIndex+=1;if(this._currentIndex!==g)for(var m=this._currentIndex-1,f=1;m>=g;)a+=f*(this._string[m]-"0"),m-=1,f*=10;if(this._currentIndex<this._endIndex&&this._string[this._currentIndex]==="."){if(this._currentIndex+=1,this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||this._string[this._currentIndex]>"9")return null;for(;this._currentIndex<this._endIndex&&this._string[this._currentIndex]>="0"&&this._string[this._currentIndex]<="9";)l*=10,c+=(this._string.charAt(this._currentIndex)-"0")/l,this._currentIndex+=1}if(this._currentIndex!==p&&this._currentIndex+1<this._endIndex&&(this._string[this._currentIndex]==="e"||this._string[this._currentIndex]==="E")&&this._string[this._currentIndex+1]!=="x"&&this._string[this._currentIndex+1]!=="m"){if(this._currentIndex+=1,this._string[this._currentIndex]==="+"?this._currentIndex+=1:this._string[this._currentIndex]==="-"&&(this._currentIndex+=1,d=-1),this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||this._string[this._currentIndex]>"9")return null;for(;this._currentIndex<this._endIndex&&this._string[this._currentIndex]>="0"&&this._string[this._currentIndex]<="9";)o*=10,o+=this._string[this._currentIndex]-"0",this._currentIndex+=1}var b=a+c;return b*=h,o&&(b*=Math.pow(10,d*o)),p===this._currentIndex?null:(this._skipOptionalSpacesOrDelimiter(),b)},_parseArcFlag:function(){if(this._currentIndex>=this._endIndex)return null;var o=null,a=this._string[this._currentIndex];if(this._currentIndex+=1,a==="0")o=0;else if(a==="1")o=1;else return null;return this._skipOptionalSpacesOrDelimiter(),o}};var t=function(o){if(!o||o.length===0)return[];var a=new e(o),l=[];if(a.initialCommandIsMoveTo())for(;a.hasMoreData();){var c=a.parseSegment();if(c===null)break;l.push(c)}return l},i=function(o,a,l,c,h,d,p,g,m,f){var b=function(gt){return Math.PI*gt/180},x=function(gt,li,yt){var ud=gt*Math.cos(yt)-li*Math.sin(yt),fd=gt*Math.sin(yt)+li*Math.cos(yt);return{x:ud,y:fd}},w=b(p),A=[],P,D,k,L;if(f)P=f[0],D=f[1],k=f[2],L=f[3];else{var H=x(o,a,-w);o=H.x,a=H.y;var se=x(l,c,-w);l=se.x,c=se.y;var B=(o-l)/2,ye=(a-c)/2,Ne=B*B/(h*h)+ye*ye/(d*d);Ne>1&&(Ne=Math.sqrt(Ne),h=Ne*h,d=Ne*d);var ft;g===m?ft=-1:ft=1;var je=h*h,Dt=d*d,sd=je*Dt-je*ye*ye-Dt*B*B,od=je*ye*ye+Dt*B*B,Ki=ft*Math.sqrt(Math.abs(sd/od));k=Ki*h*ye/d+(o+l)/2,L=Ki*-d*B/h+(a+c)/2,P=Math.asin(parseFloat(((a-L)/d).toFixed(9))),D=Math.asin(parseFloat(((c-L)/d).toFixed(9))),o<k&&(P=Math.PI-P),l<k&&(D=Math.PI-D),P<0&&(P=Math.PI*2+P),D<0&&(D=Math.PI*2+D),m&&P>D&&(P=P-Math.PI*2),!m&&D>P&&(D=D-Math.PI*2)}var yo=D-P;if(Math.abs(yo)>Math.PI*120/180){var ad=D,ld=l,cd=c;m&&D>P?D=P+Math.PI*120/180*1:D=P+Math.PI*120/180*-1,l=k+h*Math.cos(D),c=L+d*Math.sin(D),A=i(l,c,ld,cd,h,d,p,0,m,[D,ad,k,L])}yo=D-P;var hd=Math.cos(P),dd=Math.sin(P),pd=Math.cos(D),md=Math.sin(D),Uc=Math.tan(yo/4),Kc=4/3*h*Uc,Yc=4/3*d*Uc,Xc=[o,a],Tt=[o+Kc*dd,a-Yc*hd],Zc=[l+Kc*md,c-Yc*pd],$c=[l,c];if(Tt[0]=2*Xc[0]-Tt[0],Tt[1]=2*Xc[1]-Tt[1],f)return[Tt,Zc,$c].concat(A);A=[Tt,Zc,$c].concat(A);for(var qc=[],it=0;it<A.length;it+=3){let gt=x(A[it][0],A[it][1],w),li=x(A[it+1][0],A[it+1][1],w),yt=x(A[it+2][0],A[it+2][1],w);qc.push([gt.x,gt.y,li.x,li.y,yt.x,yt.y])}return qc},r=function(o){var a=[],l=null,c=null,h=null,d=null;return o.forEach(function(p){var g=p.type;if(g==="M"){var m=p.values[0],f=p.values[1];a.push({type:"M",values:[m,f]}),h=m,d=f,l=m,c=f}else if(g==="m"){var m=l+p.values[0],f=c+p.values[1];a.push({type:"M",values:[m,f]}),h=m,d=f,l=m,c=f}else if(g==="L"){var m=p.values[0],f=p.values[1];a.push({type:"L",values:[m,f]}),l=m,c=f}else if(g==="l"){var m=l+p.values[0],f=c+p.values[1];a.push({type:"L",values:[m,f]}),l=m,c=f}else if(g==="C"){var b=p.values[0],x=p.values[1],w=p.values[2],A=p.values[3],m=p.values[4],f=p.values[5];a.push({type:"C",values:[b,x,w,A,m,f]}),l=m,c=f}else if(g==="c"){var b=l+p.values[0],x=c+p.values[1],w=l+p.values[2],A=c+p.values[3],m=l+p.values[4],f=c+p.values[5];a.push({type:"C",values:[b,x,w,A,m,f]}),l=m,c=f}else if(g==="Q"){var b=p.values[0],x=p.values[1],m=p.values[2],f=p.values[3];a.push({type:"Q",values:[b,x,m,f]}),l=m,c=f}else if(g==="q"){var b=l+p.values[0],x=c+p.values[1],m=l+p.values[2],f=c+p.values[3];a.push({type:"Q",values:[b,x,m,f]}),l=m,c=f}else if(g==="A"){var m=p.values[5],f=p.values[6];a.push({type:"A",values:[p.values[0],p.values[1],p.values[2],p.values[3],p.values[4],m,f]}),l=m,c=f}else if(g==="a"){var m=l+p.values[5],f=c+p.values[6];a.push({type:"A",values:[p.values[0],p.values[1],p.values[2],p.values[3],p.values[4],m,f]}),l=m,c=f}else if(g==="H"){var m=p.values[0];a.push({type:"H",values:[m]}),l=m}else if(g==="h"){var m=l+p.values[0];a.push({type:"H",values:[m]}),l=m}else if(g==="V"){var f=p.values[0];a.push({type:"V",values:[f]}),c=f}else if(g==="v"){var f=c+p.values[0];a.push({type:"V",values:[f]}),c=f}else if(g==="S"){var w=p.values[0],A=p.values[1],m=p.values[2],f=p.values[3];a.push({type:"S",values:[w,A,m,f]}),l=m,c=f}else if(g==="s"){var w=l+p.values[0],A=c+p.values[1],m=l+p.values[2],f=c+p.values[3];a.push({type:"S",values:[w,A,m,f]}),l=m,c=f}else if(g==="T"){var m=p.values[0],f=p.values[1];a.push({type:"T",values:[m,f]}),l=m,c=f}else if(g==="t"){var m=l+p.values[0],f=c+p.values[1];a.push({type:"T",values:[m,f]}),l=m,c=f}else(g==="Z"||g==="z")&&(a.push({type:"Z",values:[]}),l=h,c=d)}),a},n=function(o){var a=[],l=null,c=null,h=null,d=null,p=null,g=null,m=null;return o.forEach(function(f){if(f.type==="M"){var b=f.values[0],x=f.values[1];a.push({type:"M",values:[b,x]}),g=b,m=x,d=b,p=x}else if(f.type==="C"){var w=f.values[0],A=f.values[1],P=f.values[2],D=f.values[3],b=f.values[4],x=f.values[5];a.push({type:"C",values:[w,A,P,D,b,x]}),c=P,h=D,d=b,p=x}else if(f.type==="L"){var b=f.values[0],x=f.values[1];a.push({type:"L",values:[b,x]}),d=b,p=x}else if(f.type==="H"){var b=f.values[0];a.push({type:"L",values:[b,p]}),d=b}else if(f.type==="V"){var x=f.values[0];a.push({type:"L",values:[d,x]}),p=x}else if(f.type==="S"){var P=f.values[0],D=f.values[1],b=f.values[2],x=f.values[3],k,L;l==="C"||l==="S"?(k=d+(d-c),L=p+(p-h)):(k=d,L=p),a.push({type:"C",values:[k,L,P,D,b,x]}),c=P,h=D,d=b,p=x}else if(f.type==="T"){var b=f.values[0],x=f.values[1],w,A;l==="Q"||l==="T"?(w=d+(d-c),A=p+(p-h)):(w=d,A=p);var k=d+2*(w-d)/3,L=p+2*(A-p)/3,H=b+2*(w-b)/3,se=x+2*(A-x)/3;a.push({type:"C",values:[k,L,H,se,b,x]}),c=w,h=A,d=b,p=x}else if(f.type==="Q"){var w=f.values[0],A=f.values[1],b=f.values[2],x=f.values[3],k=d+2*(w-d)/3,L=p+2*(A-p)/3,H=b+2*(w-b)/3,se=x+2*(A-x)/3;a.push({type:"C",values:[k,L,H,se,b,x]}),c=w,h=A,d=b,p=x}else if(f.type==="A"){let je=Math.abs(f.values[0]),Dt=Math.abs(f.values[1]);var B=f.values[2],ye=f.values[3],Ne=f.values[4],b=f.values[5],x=f.values[6];if(je===0||Dt===0)a.push({type:"C",values:[d,p,b,x,b,x]}),d=b,p=x;else if(d!==b||p!==x){var ft=i(d,p,b,x,je,Dt,B,ye,Ne);ft.forEach(function(Ki){a.push({type:"C",values:Ki})}),d=b,p=x}}else f.type==="Z"&&(a.push(f),d=g,p=m);l=f.type}),a};SVGPathElement.prototype.getPathData=function(o){if(o&&o.normalize){let a;return a=t(this.getAttribute("d")||""),n(r(a))}else return t(this.getAttribute("d")||"")},SVGPathElement.prototype.setPathData=function(o){if(o.length===0)this.removeAttribute("d");else{let a="";for(let l=0,c=o.length;l<c;l+=1){let h=o[l];l>0&&(a+=" "),a+=h.type,h.values&&h.values.length>0&&(a+=" "+h.values.join(" "))}this.setAttribute("d",a)}},SVGRectElement.prototype.getPathData=function(o){var a=this.x.baseVal.value,l=this.y.baseVal.value,c=this.width.baseVal.value,h=this.height.baseVal.value,d=this.hasAttribute("rx")?this.rx.baseVal.value:this.ry.baseVal.value,p=this.hasAttribute("ry")?this.ry.baseVal.value:this.rx.baseVal.value;d>c/2&&(d=c/2),p>h/2&&(p=h/2);var g=[{type:"M",values:[a+d,l]},{type:"H",values:[a+c-d]},{type:"A",values:[d,p,0,0,1,a+c,l+p]},{type:"V",values:[l+h-p]},{type:"A",values:[d,p,0,0,1,a+c-d,l+h]},{type:"H",values:[a+d]},{type:"A",values:[d,p,0,0,1,a,l+h-p]},{type:"V",values:[l+p]},{type:"A",values:[d,p,0,0,1,a+d,l]},{type:"Z",values:[]}];return g=g.filter(function(m){return!(m.type==="A"&&(m.values[0]===0||m.values[1]===0))}),o&&o.normalize===!0&&(g=n(g)),g},SVGCircleElement.prototype.getPathData=function(o){var a=this.cx.baseVal.value,l=this.cy.baseVal.value,c=this.r.baseVal.value,h=[{type:"M",values:[a+c,l]},{type:"A",values:[c,c,0,0,1,a,l+c]},{type:"A",values:[c,c,0,0,1,a-c,l]},{type:"A",values:[c,c,0,0,1,a,l-c]},{type:"A",values:[c,c,0,0,1,a+c,l]},{type:"Z",values:[]}];return o&&o.normalize===!0&&(h=n(h)),h},SVGEllipseElement.prototype.getPathData=function(o){var a=this.cx.baseVal.value,l=this.cy.baseVal.value,c=this.rx.baseVal.value,h=this.ry.baseVal.value,d=[{type:"M",values:[a+c,l]},{type:"A",values:[c,h,0,0,1,a,l+h]},{type:"A",values:[c,h,0,0,1,a-c,l]},{type:"A",values:[c,h,0,0,1,a,l-h]},{type:"A",values:[c,h,0,0,1,a+c,l]},{type:"Z",values:[]}];return o&&o.normalize===!0&&(d=n(d)),d},SVGLineElement.prototype.getPathData=function(){return[{type:"M",values:[this.x1.baseVal.value,this.y1.baseVal.value]},{type:"L",values:[this.x2.baseVal.value,this.y2.baseVal.value]}]},SVGPolylineElement.prototype.getPathData=function(){for(var o=[],a=0;a<this.points.numberOfItems;a+=1){var l=this.points.getItem(a);o.push({type:a===0?"M":"L",values:[l.x,l.y]})}return o},SVGPolygonElement.prototype.getPathData=function(){for(var o=[],a=0;a<this.points.numberOfItems;a+=1){var l=this.points.getItem(a);o.push({type:a===0?"M":"L",values:[l.x,l.y]})}return o.push({type:"Z",values:[]}),o}})()});function W(s){return sh()?s.metaKey:s.ctrlKey}var Me=u(()=>{"use strict";Ee()});function ia(s){let e=[];for(let t of s)t.nodeType===E.TextNode||t.nodeType===E.Comment||e.push(t);return e}var Fe,Vt=u(()=>{"use strict";Ie();Tr();xe();ke();Te();Me();X();Fe=class{serviceForContainer(e,t,i){return i!=null&&i.getComputedStyle()?.position=="absolute"?!0:!(t.display==="grid"||t.display==="inline-grid"||t.display==="flex"||t.display==="inline-flex")}isEnterableContainer(e){return!(U.IsSelfClosingElement(e.element.localName)||!e.isRootItem&&e.element.shadowRoot&&e.element.shadowRoot.querySelector("slot")==null)}canEnter(e,t){return!(!this.isEnterableContainer(e)||!t.every(i=>!i.element.contains(e.element)&&i!==e))}canLeave(e,t){return!0}getElementOffset(e,t){return e.instanceServiceContainer.designerCanvas.getNormalizedElementCoordinates(e.element)}calculateTrack(e,t,i,r,n,o){let a=n.x-i.x,l=n.y-i.y;if(!W(e)){if(t.alignOnGrid){let c=Mr(o,"position");c.x=c.x%t.gridSize,c.y=c.y%t.gridSize,a=Math.round(a/t.gridSize)*t.gridSize-c.x,l=Math.round(l/t.gridSize)*t.gridSize-c.y}else if(t.alignOnSnap){let c=o.element.getBoundingClientRect(),h=t.snapLines.snapToPosition({x:n.x-r.x,y:n.y-r.y},{width:c.width/t.scaleFactor,height:c.height/t.scaleFactor},{x:a>0?1:-1,y:l>0?1:-1});h.x!==null?a=h.x-Math.round(i.x)+Math.round(r.x):a=Math.round(a),h.y!==null?l=h.y-Math.round(i.y)+Math.round(r.y):l=Math.round(l)}}return{x:a,y:l}}placePoint(e,t,i,r,n,o,a){let l=o.x,c=o.y;if(!W(e)){if(t.alignOnGrid)l=Math.round(l/t.gridSize)*t.gridSize,c=Math.round(c/t.gridSize)*t.gridSize;else if(t.alignOnSnap){let h=t.snapLines.snapToPosition({x:o.x-n.x,y:o.y-n.y},null,{x:l>0?1:-1,y:c>0?1:-1});h.x!==null?l=h.x:l=Math.round(l),h.y!==null?c=h.y:c=Math.round(c)}}return{x:l,y:c}}startPlace(e,t,i,r,n,o,a){}place(e,t,i,r,n,o,a){let l=this.calculateTrack(e,t,r,n,o,a[0]);e.shiftKey&&(l=Xe({x:0,y:0},l,!0));let c=ie(ia(a));for(let h of c){let d=h.instanceServiceContainer.designerCanvas.canvas,p=h.parent.element.getBoxQuads({relativeTo:d,iframes:h.instanceServiceContainer.designerCanvas.iframes})[0],g=h.parent.element.convertPointFromNode(new DOMPoint(l.x+p.p1.x,l.y+p.p1.y),d,{iframes:h.instanceServiceContainer.designerCanvas.iframes}),m=getComputedStyle(h.element),f=new DOMMatrix;m.rotate!="none"&&m.rotate&&(f=f.multiply(new DOMMatrix("rotate("+m.rotate.replace(" ",",")+")"))),m.scale!="none"&&m.scale&&(f=f.multiply(new DOMMatrix("scale("+m.scale.replace(" ",",")+")"))),g=f.inverse().transformPoint(g);let b=new DOMMatrix().translate(g.x,g.y);Dr(h.element,h.getStyle("transform"),b.toString())}a[0].instanceServiceContainer.designerCanvas?.raiseDesignItemsChanged(c,"place",!1)}moveElements(e,t,i){for(let r of e)t.x&&r.setStyle("left",parseInt(r.element.style.left)-t.x+"px"),t.y&&r.setStyle("top",parseInt(r.element.style.top)-t.y+"px");e[0].instanceServiceContainer.designerCanvas.extensionManager.refreshExtensions(e),e[0].instanceServiceContainer.designerCanvas?.raiseDesignItemsChanged(e,"place",!0)}enterContainer(e,t,i){let r=ie(t);for(let n of r)i=="drop"&&n.setStyle("position","absolute"),e.insertChild(n),n.lastContainerSize&&(n.hasStyle("width")||n.setStyle("width",n.lastContainerSize.width+"px"),n.hasStyle("height")||n.setStyle("height",n.lastContainerSize.height+"px"));t[0].instanceServiceContainer.designerCanvas?.raiseDesignItemsChanged(r,"place",!0)}leaveContainer(e,t){let i=ie(t);t[0].instanceServiceContainer.designerCanvas?.raiseDesignItemsChanged(i,"place",!0)}finishPlace(e,t,i,r,n,o,a){let l=ie(a);for(let c of l){let h=Bt(new DOMMatrix(c.element.style.transform)),d=Bt(new DOMMatrix(c.getStyle("transform")??""));c.element.style.transform=c.getStyle("transform")??"";let p={x:h.x,y:h.y},g=getComputedStyle(c.element),m=new DOMMatrix;g.rotate!="none"&&g.rotate&&(m=m.multiply(new DOMMatrix("rotate("+g.rotate.replace(" ",",")+")"))),g.scale!="none"&&g.scale&&(m=m.multiply(new DOMMatrix("scale("+g.scale.replace(" ",",")+")"))),p=m.transformPoint(p),Or(i,c,{x:p.x-d.x,y:p.y-d.y},"position")}for(let c of a)t.extensionManager.removeExtension(c,S.Placement);a[0].instanceServiceContainer.designerCanvas?.raiseDesignItemsChanged(l,"place",!0)}}});var ct,wi=u(()=>{"use strict";$();gr();ct=class{async parse(e,t,i,r){let n;Document.parseHTMLUnsafe&&!fr?n=Document.parseHTMLUnsafe(e):n=new DOMParser().parseFromString(e,"text/html",{includeShadowRoots:!0});let o=this.createDesignItems(n.head.childNodes,t,i),a=this.createDesignItems(n.body.childNodes,t,i);return[...o,...a]}createDesignItems(e,t,i){let r=[];for(let n of e)r.push(this._createDesignItemsRecursive(n,t,i));return r}_createDesignItemsRecursive(e,t,i){return T.createDesignItemFromInstance(e,t,i)}}});var Nr,ra=u(()=>{"use strict";Ot();ue();ee();Nr=class extends Le{name="lit2";isHandledElement(e){return!!e.element.constructor.elementProperties}async getProperties(e){if(!this.isHandledElement(e))return null;let t=[];for(let i of e.element.constructor.elementProperties.entries()){let r=i[0],n=i[1],o=n;if(n.type&&(o=n.type),o===String){let a={name:r,type:"string",service:this,propertyType:y.propertyAndAttribute};t.push(a)}else if(o===Object){let a={name:r,type:"string",service:this,propertyType:y.propertyAndAttribute};t.push(a)}else if(o===Number){let a={name:r,type:"number",service:this,propertyType:y.propertyAndAttribute};t.push(a)}else if(o===Date){let a={name:r,type:"date",service:this,propertyType:y.propertyAndAttribute};t.push(a)}else if(o===Boolean){let a={name:r,type:"boolean",service:this,propertyType:y.propertyAndAttribute};t.push(a)}else if(R.isTypescriptEnum(o)){let a={name:r,type:"enum",enumValues:R.getTypescriptEnumEntries(o),service:this,propertyType:y.propertyAndAttribute};t.push(a)}}return t}_notifyChangedProperty(e,t,i){}}});function mh(s,e){na||(na=document.createElement("canvas"));let t=na.getContext("2d");return t.font=e,t.measureText(s).width}var na,uh=u(()=>{"use strict"});var j,Ze=u(()=>{"use strict";(function(s){s.Pointer="Pointer",s.DrawSelection="DrawSelection",s.DrawPath="DrawPath",s.DrawRect="DrawRect",s.DrawEllipsis="DrawEllipsis",s.DrawLine="DrawLine",s.Zoom="Zoom",s.Pan="Pan",s.MagicWandSelector="MagicWandSelector",s.RectangleSelector="RectangleSelector",s.PickColor="PickColor",s.Text="Text",s.DrawElementTool="DrawElementTool",s.Guides="Guides",s.Inspect="Inspect",s.Accessibility="Accessibility",s.Position="Position",s.Padding="Padding",s.Margin="Margin",s.Flexbox="Flexbox",s.Move="Move",s.HueShift="HueShift",s.BoxShadows="BoxShadows",s.FontStyles="FontStyles"})(j||(j={}))});var I,Y=u(()=>{"use strict";(function(s){s[s.Background=10]="Background",s[s.Normal=20]="Normal",s[s.Foreground=30]="Foreground"})(I||(I={}))});var Ht,sa=u(()=>{"use strict";Y();Ht=class{overlays=[];overlayLayerView;extensionManager;designerCanvas;constructor(e,t){this.extensionManager=e,this.designerCanvas=t,this.overlayLayerView=t.overlayLayer}_backup;_valuesHaveChanges(...e){if(this._backup==null)return this._backup=e,!0;for(let t=0;t<e.length;t++)if(e[t]!==this._backup[t])return this._backup=e,!0;return!1}_removeAllOverlays(){for(let e of this.overlays)try{this.overlayLayerView.removeOverlay(e)}catch(t){console.error(t)}this.overlays=[]}_addOverlay(e,t=I.Normal){this.overlayLayerView.addOverlay(this.constructor.name,e,t),this.overlays.push(e)}_drawGroup(e,t,i){let r=this.overlayLayerView.drawGroup(this.constructor.name,e,t,i);return t||this.overlays.push(r),r}_drawLine(e,t,i,r,n,o,a){let l=this.overlayLayerView.drawLine(this.constructor.name,e,t,i,r,n,o,a);return o||this.overlays.push(l),l}_drawCircle(e,t,i,r,n,o){let a=this.overlayLayerView.drawCircle(this.constructor.name,e,t,i,r,n,o);return n||this.overlays.push(a),a}_drawRect(e,t,i,r,n,o,a){let l=this.overlayLayerView.drawRect(this.constructor.name,e,t,i,r,n,o,a);return o||this.overlays.push(l),l}_drawComplexRect(e,t,i,r){let n="M"+e.map(a=>a.x+","+a.y).join(" ")+"Z",o=this.overlayLayerView.drawPath(this.constructor.name,n,t,i,r);return i||this.overlays.push(o),o}_drawPath(e,t,i,r){let n=this.overlayLayerView.drawPath(this.constructor.name,e,t,i,r);return i||this.overlays.push(n),n}_drawText(e,t,i,r,n,o){let a=this.overlayLayerView.drawText(this.constructor.name,e,t,i,r,n,o);return n||this.overlays.push(a),a}_drawHTML(e,t,i,r,n,o,a,l){let c=this.overlayLayerView.drawHTML(this.constructor.name,e,t,i,r,n,o,a,l);return a||this.overlays.push(c),c}_drawTextWithBackground(e,t,i,r,n,o,a){let l=this.overlayLayerView.drawTextWithBackground(this.constructor.name,e,t,i,r,n,o,a);return o||this.overlays.push(...l),l}_drawTransformedRect(e,t,i,r){let n="M"+e.p1.x+" "+e.p1.y+" L"+e.p2.x+" "+e.p2.y+" L"+e.p3.x+" "+e.p3.y+" L"+e.p4.x+" "+e.p4.y+"Z",o=this.overlayLayerView.drawPath(this.constructor.name,n,t,i,r);return i||this.overlays.push(o),o}}});var N,Q=u(()=>{"use strict";sa();Y();N=class extends Ht{extendedItem;constructor(e,t,i){super(e,t),this.extendedItem=i}remove(){this.extensionManager.removeExtensionInstance(this.extendedItem,this)}createToolbar(e,t,i,r=I.Foreground){let n=e.content.cloneNode(!0);n.querySelectorAll("*").forEach(a=>{a.onpointerdown=l=>{this.designerCanvas.ignoreEvent(l)},a instanceof HTMLInputElement&&(a.addEventListener("keydown",l=>{this.designerCanvas.ignoreEvent(l)},{capture:!0}),a.addEventListener("keyup",l=>{this.designerCanvas.ignoreEvent(l)},{capture:!0}))});let o=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");return o.classList.add("svg-toolbar-container"),o.setAttribute("width",""+t),o.setAttribute("height",""+i),o.appendChild(n),o.style.scale=""+1/this.designerCanvas.zoomFactor,o.style.transformBox="fill-box",this._addOverlay(o,r),o.updatePosition=a=>{o.style.scale=""+1/this.designerCanvas.zoomFactor;let l=this.overlayLayerView.getBoundingClientRect(),c=o.children[0].getBoundingClientRect(),h=this.designerCanvas.scaleFactor,d=l.width/h-this.designerCanvas.canvasOffset.x*h;c.width+a.x*h>d&&(a.x=(d-c.width)/h),a.x<-this.designerCanvas.canvasOffset.x&&(a.x=-this.designerCanvas.canvasOffset.x),o.setAttribute("x",""+a.x),o.setAttribute("y",""+a.y)},o.getById=a=>o.querySelector("#"+a),o}}});var Zd,Lr,oa=u(()=>{"use strict";uh();Ze();Q();Zd=60,Lr=class extends N{_rect;_clickRect;_text;_width;_createTitleText;constructor(e,t,i,r){super(e,t,i),this._createTitleText=r}extend(e,t){let i=this.extendedItem.element.getBoxQuads({relativeTo:this.designerCanvas.canvas})[0];if(i&&!isNaN(i.p1.x)){let r=this.extendedItem.element.getBoundingClientRect(),n=mh(this.extendedItem.name,"10px monospace"),o=Math.sqrt(Math.pow(i.p2.x-i.p1.x,2)+Math.pow(i.p2.y-i.p1.y,2)),a=this.extendedItem.name;this.extendedItem.id&&(a="#"+this.extendedItem.id),this._createTitleText&&(a=this._createTitleText(this.extendedItem)),this._width=Math.max(Math.min(o,n),Zd),this._rect=this._drawRect(i.p1.x,i.p1.y,this._width,15,"svg-primary-selection-move",this._rect),this._clickRect=this._drawRect(i.p1.x,i.p1.y,this._width,18,"svg-invisible",this._clickRect),this._clickRect.style.background="transparent",this._text=this._drawHTML('<div style="position:relative; pointer-events: none;"><span style="width: 100%; position: absolute; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform-origin: 0 0; padding-left: 2px;">'+a+"</span></div>",(r.x-this.designerCanvas.containerBoundingRect.x)/this.designerCanvas.scaleFactor,i.p1.y-16,this._width,15,"svg-text-primary",this._text),this._text.style.overflow="visible",this._clickRect.addEventListener("pointerdown",l=>this._pointerEvent(l)),this._clickRect.addEventListener("pointermove",l=>this._pointerEvent(l)),this._clickRect.addEventListener("pointerup",l=>this._pointerEvent(l)),this._clickRect.addEventListener("contextmenu",l=>{l.preventDefault(),this.designerCanvas.showDesignItemContextMenu(this.extendedItem,l)}),this.refresh(e,t)}}_drawMoveOverlay(e){}refresh(e,t){let i=this.extendedItem.element.getBoxQuads({relativeTo:this.designerCanvas.canvas})[0];if(!isNaN(i.p1.x)){let r=Math.atan2(i.p2.y-i.p1.y,i.p2.x-i.p1.x)*180/Math.PI;if(this._valuesHaveChanges(i.p1.x,i.p1.y,r,this.designerCanvas.scaleFactor)){let n=15/this.designerCanvas.scaleFactor,o=-(16/this.designerCanvas.scaleFactor),a=this._width/this.designerCanvas.scaleFactor;this._rect.setAttribute("x",""+i.p1.x),this._rect.setAttribute("y",""+i.p1.y),this._rect.style.rotate=r+"deg",this._rect.style.translate="0 "+o+"px",this._rect.style.transformOrigin="0 100%",this._rect.style.transformBox="fill-box",this._rect.setAttribute("height",""+n),this._rect.setAttribute("width",""+a),this._rect.style.strokeWidth=(1/this.designerCanvas.scaleFactor).toString(),this._clickRect.setAttribute("x",""+i.p1.x),this._clickRect.setAttribute("y",""+i.p1.y),this._clickRect.style.rotate=r+"deg",this._clickRect.style.translate="0 "+o+"px",this._clickRect.style.transformOrigin="0 100%",this._clickRect.style.transformBox="fill-box",this._clickRect.setAttribute("height",""+(n+3)),this._clickRect.setAttribute("width",""+a),this._clickRect.style.strokeWidth=(1/this.designerCanvas.scaleFactor).toString(),this._text.setAttribute("x",""+i.p1.x),this._text.setAttribute("y",""+i.p1.y),this._text.style.fontSize=10/this.designerCanvas.scaleFactor+"px",this._text.setAttribute("height",""+n),this._text.setAttribute("width",""+a),this._text.children[0].children[0].style.rotate=r+"deg",this._text.children[0].children[0].style.translate="0 "+o+"px",this._text.children[0].children[0].style.transformOrigin="0 100%"}}}_pointerEvent(e){e.preventDefault(),e.stopPropagation(),e.button!=2&&this.designerCanvas.serviceContainer.designerTools.get(j.Pointer).pointerEventHandler(this.designerCanvas,e,this.extendedItem.element)}dispose(){this._removeAllOverlays()}}});import{css as $d}from"@node-projects/base-custom-webcomponent";var Rr,aa=u(()=>{"use strict";oa();Rr=class{_createTitleText;constructor(e){this._createTitleText=e}shouldExtend(e,t,i){return!i.isRootItem&&!(i.element instanceof HTMLTemplateElement)}getExtension(e,t,i){return new Lr(e,t,i,this._createTitleText)}static style=$d`
|
|
273
273
|
.svg-text-primary { stroke: none; color: white; font-family: monospace; }
|
|
274
274
|
`}});var _,J=u(()=>{"use strict";(function(s){s.PointerDown="pointerdown",s.PointerMove="pointermove",s.PointerUp="pointerup",s.DragEnter="dragenter",s.DragEnd="dragend",s.DragLeave="dragleave",s.DragOver="dragover",s.Drop="drop",s.Scroll="scroll",s.Wheel="wheel",s.ContextMenu="contextmenu",s.KeyDown="keydown",s.KeyUp="keyup",s.DblClick="dblclick"})(_||(_={}))});function la(s,e,t){if(!s)return null;let i={px:n=>n,cm:n=>n*38,mm:n=>n*3.8,q:n=>n*.95,in:n=>n*96,pc:n=>n*16,pt:n=>n*1.333333,rem:n=>n*parseFloat(getComputedStyle(document.documentElement).fontSize),em:n=>n*parseFloat(getComputedStyle(e).fontSize),vw:n=>n/100*window.innerWidth,vh:n=>n/100*window.innerHeight,vmin:n=>n/100*(window.innerHeight<window.innerWidth?window.innerHeight:window.innerWidth),vmax:n=>n/100*(window.innerHeight>window.innerWidth?window.innerHeight:window.innerWidth),lh:n=>n*parseFloat(getComputedStyle(e).lineHeight),rlh:n=>n*parseFloat(getComputedStyle(document.documentElement).lineHeight),"%":n=>n/100*(t=="height"?zr(e).height:zr(e).width),ms:n=>n,s:n=>n*1e3,deg:n=>n,rad:n=>n*(180/Math.PI),grad:n=>n*(180/200),turn:n=>n*360},r=s.trim().match(fh);if(r){let n=Number(r[1]),o=r[2].toLowerCase();if(o in i)return i[o](n)}return s}function Ct(s){let e=s.trim().match(fh);return e?e[2].toLowerCase():null}function Gt(s,e,t,i,r){if(!s)return null;let n={px:o=>o,cm:o=>o/38,mm:o=>o/3.8,q:o=>o/.95,in:o=>o/96,pc:o=>o/16,pt:o=>o/1.333333,rem:o=>o/parseFloat(getComputedStyle(document.documentElement).fontSize),em:o=>o/parseFloat(getComputedStyle(e).fontSize),vw:o=>o*100/window.innerWidth,vh:o=>o*100/window.innerHeight,vmin:o=>o*100/(window.innerHeight<window.innerWidth?window.innerHeight:window.innerWidth),vmax:o=>o*100/(window.innerHeight>window.innerWidth?window.innerHeight:window.innerWidth),lh:o=>o/parseFloat(getComputedStyle(e).lineHeight),rlh:o=>o/parseFloat(getComputedStyle(document.documentElement).lineHeight),"%":o=>o*100/(t=="height"?zr(e).height:zr(e).width),ms:o=>o,s:o=>o/1e3,deg:o=>o,rad:o=>o/(180/Math.PI),grad:o=>o/(180/200),turn:o=>o/360};if(typeof s=="string"&&(s=la(s,e,t)),i in n){let o=n[i](s);return r?r(o)+i:o+i}return r?r(s):s}function zr(s){return{width:s.offsetWidth,height:s.offsetHeight}}function Qd(s){let e=s.split(" "),t=[];for(let i=0;i<e.length;i++){let r=e[i];if(r.startsWith("repeat("))for(;!r.includes(")");)i++,e[i]&&(r+=e[i]);t.push(r)}return t}function gh(s){let e=Qd(s),t=[];for(let i of e)if(i.startsWith("repeat(")){let r=i.split(",");for(let n=0;n<parseInt(r[0].substring(7));n++)t.push(r[1].substring(0,r[1].length-1))}else t.push(i);return t.map(i=>Ct(i))}var qd,fh,ca=u(()=>{"use strict";qd=["px","cm","mm","q","in","pc","pt","rem","em","vw","vh","vmin","vmax","lh","rlh","%","ms","s","deg","rad","grad","turn","cqw","cqh","cqi","cqb","cqmin","cqmax","fr"],fh=new RegExp(`^([-+]?(?:\\d+(?:\\.\\d+)?))(${qd.join("|")})$`,"i")});var Fr,ha=u(()=>{"use strict";J();ca();xe();Q();Fr=class extends N{_startPos;_circle;_circle2;_oldValue;_offsetInControl;constructor(e,t,i){super(e,t,i)}refresh(e,t){let r=getComputedStyle(this.extendedItem.element).transformOrigin.split(" "),n=this.designerCanvas.canvas.convertPointFromNode({x:parseFloat(r[0]),y:parseFloat(r[1])},this.extendedItem.element);this._valuesHaveChanges(n.x,n.y,this.designerCanvas.zoomFactor)&&(this._removeAllOverlays(),this._circle=this._drawCircle(n.x,n.y,5/this.designerCanvas.zoomFactor,"svg-transform-origin"),this._circle.style.strokeWidth=(1/this.designerCanvas.zoomFactor).toString(),this._circle.style.cursor="pointer",this._circle2=this._drawCircle(n.x,n.y,1/this.designerCanvas.zoomFactor,"svg-transform-origin"),this._circle2.style.strokeWidth=(1/this.designerCanvas.zoomFactor).toString(),this._circle2.style.pointerEvents="none",this._circle.addEventListener(_.PointerDown,o=>this.pointerEvent(o)),this._circle.addEventListener(_.PointerMove,o=>this.pointerEvent(o)),this._circle.addEventListener(_.PointerUp,o=>this.pointerEvent(o)))}extend(e,t){let r=getComputedStyle(this.extendedItem.element).transformOrigin.split(" "),n=this.designerCanvas.canvas.convertPointFromNode({x:parseFloat(r[0]),y:parseFloat(r[1])},this.extendedItem.element);if(isNaN(n.x)||isNaN(n.y)){this.remove();return}else{let o=this.extendedItem.getStyleFromSheetOrLocal("transform-origin");o&&(this._oldValue=o),this.refresh(e,t)}}pointerEvent(e){e.stopPropagation();let t=getComputedStyle(this.extendedItem.element),i=t.transformOrigin.split(" "),r=[];r[0]=parseFloat(i[0])/parseFloat(this.extendedItem.element.style.width),r[1]=parseFloat(i[1])/parseFloat(this.extendedItem.element.style.height);let n=this.designerCanvas.canvas.convertPointFromNode({x:parseFloat(i[0]),y:parseFloat(i[1])},this.extendedItem.element),o=this.designerCanvas.getNormalizedEventCoordinates(e),a=this.extendedItem.element.convertPointFromNode(o,this.designerCanvas.canvas),l=this.designerCanvas.getNormalizedEventCoordinates(e);switch(e.type){case _.PointerDown:e.target.setPointerCapture(e.pointerId);let c=e.target.getBoundingClientRect();this._offsetInControl={x:c.width/2+(c.x-e.x),y:c.height/2+(c.y-e.y)},this._startPos={x:l.x,y:l.y};break;case _.PointerMove:if(this._startPos&&e.buttons>0){let h=l.x-this._startPos.x,d=l.y-this._startPos.y;this._circle.setAttribute("cx",n.x+h),this._circle.setAttribute("cy",n.y+d),this._circle2.setAttribute("cx",n.x+h),this._circle2.setAttribute("cy",n.y+d)}break;case _.PointerUp:if(e.target.releasePointerCapture(e.pointerId),this._startPos){a.x+=this._offsetInControl.x,a.y+=this._offsetInControl.y;let h=this.extendedItem.openGroup("change transform-origin"),d=this.extendedItem.element.getBoxQuads({relativeTo:this.designerCanvas.rootDesignItem.element})[0];if(this._oldValue)try{let m=this._oldValue.split(" "),f=Gt(a.x,this.extendedItem.element,"width",Ct(m[0]),x=>O(this.extendedItem,x)),b=Gt(a.x,this.extendedItem.element,"width",Ct(m[0]),x=>O(this.extendedItem,x));m.length>1&&(b=Gt(a.y,this.extendedItem.element,"height",Ct(m[1]),x=>O(this.extendedItem,x))),this.extendedItem.updateStyleInSheetOrLocal("transform-origin",f+" "+b)}catch{this.extendedItem.updateStyleInSheetOrLocal("transform-origin",O(this.extendedItem,a.x)+"px "+O(this.extendedItem,a.y)+"px")}else this.extendedItem.updateStyleInSheetOrLocal("transform-origin",O(this.extendedItem,a.x)+"px "+O(this.extendedItem,a.y)+"px");let p=this.extendedItem.element.getBoxQuads({relativeTo:this.designerCanvas.rootDesignItem.element})[0],g={x:d.p1.x-p.p1.x,y:d.p1.y-p.p1.y};t.translate&&t.translate!=="none"&&(g.x+=parseFloat(t.translate.split(" ")[0]),t.translate.split(" ").length===1?g.y+=parseFloat(t.translate.split(" ")[0]):g.y+=parseFloat(t.translate.split(" ")[1])),this.extendedItem.updateStyleInSheetOrLocal("translate",O(this.extendedItem,g.x)+"px "+O(this.extendedItem,g.y)+"px"),h.commit(),this.refresh(null,null),this._startPos=null}break}}dispose(){this._removeAllOverlays()}}});import{css as Jd}from"@node-projects/base-custom-webcomponent";var Br,da=u(()=>{"use strict";ha();Br=class{showOnlyWhenSet;constructor(e=!0){this.showOnlyWhenSet=e}shouldExtend(e,t,i){if(!i.isRootItem&&i.node instanceof HTMLElement||i.node instanceof SVGElement&&i.node.localName==="svg"){if(!this.showOnlyWhenSet||i.hasStyle("transformOrigin"))return!0;let r=getComputedStyle(i.element);if(r.display!="inline"&&i.element.getBoundingClientRect){let n=i.element.getBoundingClientRect(),o=r.transformOrigin.split(" "),a=parseFloat(o[0])-n.width/2,l=parseFloat(o[1])-n.height/2;if(a>.5||a<-.5||l>.5||l<-.5)return!0}}return!1}getExtension(e,t,i){return new Fr(e,t,i)}static style=Jd`
|
|
@@ -1182,7 +1182,7 @@ declare global {
|
|
|
1182
1182
|
outline-offset: -2px;
|
|
1183
1183
|
}
|
|
1184
1184
|
`}constructor(e){super(),this._restoreCachedInititalValues(),this._serviceContainer=e,this._div=document.createElement("div"),this._div.className="content-wrapper",this.shadowRoot.appendChild(this._div)}setPropertiesService(e){this._propertiesService!=e&&(this._propertiesService=e,Jh.removeAllChildnodes(this._div),this._propertyMap.clear())}async createElements(e){if(this._propertiesService&&this._propertiesService.getRefreshMode(e)!==G.none&&(this._propertiesService.getRefreshMode(e)!==G.fullOnClassChange||this._lastClassType!==e.element.constructor)||this._propertyMap.size==0){if(this._lastClassType=e.element.constructor,Jh.removeAllChildnodes(this._div),this._propertyMap.clear(),this._propertiesService){let t=await this._propertiesService.getProperties(e);if(t?.length)return"properties"in t[0]?this.createPropertyGroups(t):this.createPropertyEditors(t),!0}return!1}return!0}createPropertyGroups(e){for(let t of e){let i=document.createElement("span");i.innerHTML=t.name.replaceAll(`
|
|
1185
|
-
`,"<br>"),i.className="group-header",this._div.appendChild(i);let r=document.createElement("span");r.innerHTML=t.description??"",r.className="group-desc",this.propertyGroupHover&&(i.onmouseenter=()=>{this.propertyGroupHover(t,"name")?i.setAttribute("clickable",""):i.removeAttribute("clickable")},i.onclick=()=>{this.propertyGroupClick&&this.propertyGroupClick(t,"name")},r.onmouseenter=()=>{this.propertyGroupHover(t,"desc")?r.setAttribute("clickable",""):r.removeAttribute("clickable")},r.onclick=()=>{this.propertyGroupClick&&this.propertyGroupClick(t,"desc")}),this._div.appendChild(r),this.createPropertyEditors(t.properties)}}createPropertyEditors(e){for(let t of e){let i;if(t.createEditor?i=t.createEditor(t):i=this._serviceContainer.forSomeServicesTillResult("editorTypesService",r=>r.getEditorForProperty(t)),i){let r=document.createElement("div");r.style.width="20px",r.style.height="20px",r.style.display="flex",r.style.alignItems="center";let n=document.createElement("div");if(n.style.width="7px",n.style.height="7px",n.style.border="1px white solid",n.style.cursor="pointer",t.propertyType!=y.complex&&r.appendChild(n),this._div.appendChild(r),n.oncontextmenu=o=>{o.preventDefault(),this.openContextMenu(o,t)},n.onclick=o=>{o.preventDefault(),this.openContextMenu(o,t)},t.type=="addNew"){let o=i.element;o.disabled=!0,o.id="addNew_input_"+ ++this._addCounter;let a=document.createElement("input");if(a.value=t.name,a.type="text",a.id="addNew_label_"+this._addCounter,a.onkeyup=l=>{l.key=="Enter"&&a.value&&(t.name=a.value,a.disabled=!0,o.disabled=!1,o.focus())},t.service.getPropertyNameSuggestions){let l=t.service.getPropertyNameSuggestions(null),c=document.createElement("datalist");c.id="addNew_"+this._addCounter+"_datalist";for(let h of l){let d=document.createElement("option");d.value=h,c.append(d)}this._div.appendChild(c),a.setAttribute("list",c.id)}this._div.appendChild(a)}else if(t.renamable){let o=document.createElement("input");o.id="label_"+t.name;let a=i.element;o.value=t.name,o.onkeyup=async l=>{if(l.key=="Enter"&&o.value){let c=this._designItems[0].openGroup("rename property name from '"+t.name+"' to '"+o.value+"'");t.service.clearValue(this._designItems,t,"all"),t.name=o.value,await t.service.setValue(this._designItems,t,a.value),c.commit(),this._designItems[0].instanceServiceContainer.designerCanvas.extensionManager.refreshAllExtensions(this._designItems)}},this._div.appendChild(o)}else{let o=document.createElement("label");o.htmlFor=t.name,o.textContent=t.name,o.title=t.description??t.name+" (type: "+t.type+(t.defaultValue?", default: "+t.defaultValue:"")+", propertytype: "+t.propertyType+")",o.ondragleave=a=>this._onDragLeave(a,t,o),o.ondragover=a=>this._onDragOver(a,t,o),o.ondrop=a=>this._onDrop(a,t,o),this._div.appendChild(o)}t.name&&(i.element.id=t.name),this._div.appendChild(i.element),this._propertyMap.set(t,{isSetElement:n,editor:i})}}}_onDragLeave(e,t,i){e.preventDefault(),i.classList.remove("dragOverProperty")}_onDragOver(e,t,i){if(e.preventDefault(),e.dataTransfer.types.indexOf(wt)>=0){let o=this._serviceContainer.bindableObjectDragDropService;if(o){let a=o.dragOverOnProperty(e,t,this._designItems);(a??"none")!="none"?(i.classList.add("dragOverProperty"),e.dataTransfer.dropEffect=a):i.classList.remove("dragOverProperty")}}if(e.dataTransfer.types.indexOf(Zo)>=0){let o=this._serviceContainer.propertyGridDragDropService;if(o){let a=o.dragOverOnProperty(e,t,this._designItems);(a??"none")!="none"?(i.classList.add("dragOverProperty"),e.dataTransfer.dropEffect=a):i.classList.remove("dragOverProperty")}}}_onDrop(e,t,i){e.preventDefault(),i.classList.remove("dragOverProperty");let r=e.dataTransfer.getData(wt);if(r){let o=JSON.parse(r),a=this._serviceContainer.bindableObjectDragDropService;a&&a.dropOnProperty(e,t,o,this._designItems)}let n=e.dataTransfer.getData(Zo);if(n){let o=JSON.parse(n),a=this._serviceContainer.propertyGridDragDropService;a&&a.dropOnProperty(e,t,o,this._designItems)}}openContextMenu(e,t){let i;this.propertyContextMenuProvider&&(i=this.propertyContextMenuProvider(this._designItems,t)),i||(i=t.service.getContextMenu(this._designItems,t)),le.show(i,e)}designItemsChanged(e){this._designItems=e;for(let t of this._propertyMap)t[1].editor.designItemsChanged(e)}refreshForDesignItems(e){for(let t of this._propertyMap)s.refreshIsSetElementAndEditorForDesignItems(t[1].isSetElement,t[0],e,this._propertiesService,t[1].editor)}static refreshIsSetElementAndEditorForDesignItems(e,t,i,r,n){if(i&&i.length){let o=r.isSet(i,t),a=r.getValue(i,t);e.title=t.name+": "+o,o==V.none?(e.style.background="",a=r.getUnsetValue(i,t)):o==V.all?e.style.background="white":o==V.some?e.style.background="gray":o==V.bound?e.style.background="orange":o==V.fromStylesheet&&(a=r.getUnsetValue(i,t),e.style.background="yellow"),n?.refreshValueWithoutNotification(o,a)}else e.style.background=""}};customElements.define("node-projects-property-grid-property-list",we);te();import{BaseCustomWebComponentLazyAppend as cm,css as hm}from"@node-projects/base-custom-webcomponent";var Rc=class extends cm{_serviceContainer;_designerTabControl;_selectedItems;_propertyGridPropertyLists;_propertyGridPropertyListsDict;_itemsObserver;_nodeReplacedCb;_instanceServiceContainer;_selectionChangedHandler;propertyGroupHover;propertyGroupClick;propertyContextMenuProvider;static style=hm`
|
|
1185
|
+
`,"<br>"),i.className="group-header",this._div.appendChild(i);let r=document.createElement("span");r.innerHTML=t.description??"",r.className="group-desc",this.propertyGroupHover&&(i.onmouseenter=()=>{this.propertyGroupHover(t,"name")?i.setAttribute("clickable",""):i.removeAttribute("clickable")},i.onclick=()=>{this.propertyGroupClick&&this.propertyGroupClick(t,"name")},r.onmouseenter=()=>{this.propertyGroupHover(t,"desc")?r.setAttribute("clickable",""):r.removeAttribute("clickable")},r.onclick=()=>{this.propertyGroupClick&&this.propertyGroupClick(t,"desc")}),this._div.appendChild(r),this.createPropertyEditors(t.properties)}}createPropertyEditors(e){for(let t of e){let i;if(t.createEditor?i=t.createEditor(t):i=this._serviceContainer.forSomeServicesTillResult("editorTypesService",r=>r.getEditorForProperty(t)),i){let r=document.createElement("div");r.style.width="20px",r.style.height="20px",r.style.display="flex",r.style.alignItems="center";let n=document.createElement("div");if(n.style.width="7px",n.style.height="7px",n.style.border="1px white solid",n.style.cursor="pointer",t.propertyType!=y.complex&&r.appendChild(n),this._div.appendChild(r),t.readonly===!0&&(n.oncontextmenu=o=>{o.preventDefault(),this.openContextMenu(o,t)},n.onclick=o=>{o.preventDefault(),this.openContextMenu(o,t)}),t.type=="addNew"){let o=i.element;o.disabled=!0,o.id="addNew_input_"+ ++this._addCounter;let a=document.createElement("input");if(a.value=t.name,a.type="text",a.id="addNew_label_"+this._addCounter,a.onkeyup=l=>{l.key=="Enter"&&a.value&&(t.name=a.value,a.disabled=!0,o.disabled=!1,o.focus())},t.service.getPropertyNameSuggestions){let l=t.service.getPropertyNameSuggestions(null),c=document.createElement("datalist");c.id="addNew_"+this._addCounter+"_datalist";for(let h of l){let d=document.createElement("option");d.value=h,c.append(d)}this._div.appendChild(c),a.setAttribute("list",c.id)}this._div.appendChild(a)}else if(t.renamable){let o=document.createElement("input");o.id="label_"+t.name;let a=i.element;o.value=t.name,o.onkeyup=async l=>{if(l.key=="Enter"&&o.value){let c=this._designItems[0].openGroup("rename property name from '"+t.name+"' to '"+o.value+"'");t.service.clearValue(this._designItems,t,"all"),t.name=o.value,await t.service.setValue(this._designItems,t,a.value),c.commit(),this._designItems[0].instanceServiceContainer.designerCanvas.extensionManager.refreshAllExtensions(this._designItems)}},this._div.appendChild(o)}else{let o=document.createElement("label");o.htmlFor=t.name,o.textContent=t.name,o.title=t.description??t.name+" (type: "+t.type+(t.defaultValue?", default: "+t.defaultValue:"")+", propertytype: "+t.propertyType+")",o.ondragleave=a=>this._onDragLeave(a,t,o),o.ondragover=a=>this._onDragOver(a,t,o),o.ondrop=a=>this._onDrop(a,t,o),this._div.appendChild(o)}t.name&&(i.element.id=t.name),this._div.appendChild(i.element),this._propertyMap.set(t,{isSetElement:n,editor:i})}}}_onDragLeave(e,t,i){e.preventDefault(),i.classList.remove("dragOverProperty")}_onDragOver(e,t,i){if(e.preventDefault(),e.dataTransfer.types.indexOf(wt)>=0){let o=this._serviceContainer.bindableObjectDragDropService;if(o){let a=o.dragOverOnProperty(e,t,this._designItems);(a??"none")!="none"?(i.classList.add("dragOverProperty"),e.dataTransfer.dropEffect=a):i.classList.remove("dragOverProperty")}}if(e.dataTransfer.types.indexOf(Zo)>=0){let o=this._serviceContainer.propertyGridDragDropService;if(o){let a=o.dragOverOnProperty(e,t,this._designItems);(a??"none")!="none"?(i.classList.add("dragOverProperty"),e.dataTransfer.dropEffect=a):i.classList.remove("dragOverProperty")}}}_onDrop(e,t,i){e.preventDefault(),i.classList.remove("dragOverProperty");let r=e.dataTransfer.getData(wt);if(r){let o=JSON.parse(r),a=this._serviceContainer.bindableObjectDragDropService;a&&a.dropOnProperty(e,t,o,this._designItems)}let n=e.dataTransfer.getData(Zo);if(n){let o=JSON.parse(n),a=this._serviceContainer.propertyGridDragDropService;a&&a.dropOnProperty(e,t,o,this._designItems)}}openContextMenu(e,t){let i;this.propertyContextMenuProvider&&(i=this.propertyContextMenuProvider(this._designItems,t)),i||(i=t.service.getContextMenu(this._designItems,t)),le.show(i,e)}designItemsChanged(e){this._designItems=e;for(let t of this._propertyMap)t[1].editor.designItemsChanged(e)}refreshForDesignItems(e){for(let t of this._propertyMap)s.refreshIsSetElementAndEditorForDesignItems(t[1].isSetElement,t[0],e,this._propertiesService,t[1].editor)}static refreshIsSetElementAndEditorForDesignItems(e,t,i,r,n){if(i&&i.length){let o=r.isSet(i,t),a=r.getValue(i,t);e.title=t.name+": "+o,o==V.none?(e.style.background="",a=r.getUnsetValue(i,t)):o==V.all?e.style.background="white":o==V.some?e.style.background="gray":o==V.bound?e.style.background="orange":o==V.fromStylesheet&&(a=r.getUnsetValue(i,t),e.style.background="yellow"),n?.refreshValueWithoutNotification(o,a)}else e.style.background=""}};customElements.define("node-projects-property-grid-property-list",we);te();import{BaseCustomWebComponentLazyAppend as cm,css as hm}from"@node-projects/base-custom-webcomponent";var Rc=class extends cm{_serviceContainer;_designerTabControl;_selectedItems;_propertyGridPropertyLists;_propertyGridPropertyListsDict;_itemsObserver;_nodeReplacedCb;_instanceServiceContainer;_selectionChangedHandler;propertyGroupHover;propertyGroupClick;propertyContextMenuProvider;static style=hm`
|
|
1186
1186
|
:host {
|
|
1187
1187
|
display: block;
|
|
1188
1188
|
height: 100%;
|
package/package.json
CHANGED