base-screen 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +12 -5
  2. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-callbacks.d.ts +2 -0
  3. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-controller.d.ts +73 -16
  4. package/dist/_internal/engine/browser/controllers/blueprint/designer-blueprint-workbench-panel.d.ts +41 -0
  5. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-panel-controller.d.ts +62 -0
  6. package/dist/_internal/engine/browser/controllers/designer-size-tier-controller.d.ts +60 -0
  7. package/dist/_internal/engine/browser/controllers/panel/designer-material-group-navigation-controller.d.ts +2 -0
  8. package/dist/_internal/engine/browser/controllers/panel/designer-panel-controller.d.ts +2 -0
  9. package/dist/_internal/engine/browser/controllers/panel/designer-panel-inspector-controller.d.ts +6 -0
  10. package/dist/_internal/engine/browser/controllers/panel/designer-panel-material-controller.d.ts +1 -0
  11. package/dist/_internal/engine/browser/controllers/workbench/designer-panel-layout-controller.d.ts +22 -1
  12. package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-controller.d.ts +5 -0
  13. package/dist/_internal/engine/browser/controllers/workbench/designer-workbench-tabs-controller.d.ts +1 -0
  14. package/dist/_internal/engine/browser/dom/workspace/designer-workspace-markup.d.ts +2 -0
  15. package/dist/_internal/engine/browser/dom/workspace/designer-workspace-skeleton.d.ts +7 -0
  16. package/dist/_internal/engine/browser/dom/workspace/designer-workspace.d.ts +1 -1
  17. package/dist/_internal/engine/common/ui-text/designer-blueprint-ui-text.d.ts +1 -0
  18. package/dist/_internal/engine/common/ui-text/designer-ui-text.d.ts +5 -1
  19. package/dist/_internal/engine/designer-blueprint-workbench-panel-C2MoZwKA.js +3548 -0
  20. package/dist/_internal/engine/designer-dataset-controller-CPytVNBK.js +4426 -0
  21. package/dist/_internal/engine/designer-element/runtime/designer-element-rendering.d.ts +7 -0
  22. package/dist/_internal/engine/designer-element/runtime/designer-element-skeleton.d.ts +14 -0
  23. package/dist/_internal/engine/designer-element/runtime/designer-element-state.d.ts +12 -2
  24. package/dist/_internal/engine/designer-left-panel-groups-dom-WMsH33zw.js +573 -0
  25. package/dist/_internal/engine/designer-ui-primitives-CH4RNiMa.js +2155 -0
  26. package/dist/_internal/engine/host-resource-selection-5Cf_gclK.js +2188 -0
  27. package/dist/_internal/engine/index.js +4944 -17147
  28. package/dist/_internal/renderer/index.js +266 -216
  29. package/dist/_internal/renderer/viewer/viewer-skeleton.d.ts +10 -0
  30. package/dist/_internal/renderer/viewer/viewer-variable-controller.d.ts +2 -0
  31. package/dist/_internal/renderer/viewer/viewer.d.ts +8 -0
  32. package/dist/_internal/sdk/auto-register.js +7 -7
  33. package/dist/_internal/sdk/designer-auto-register.js +2 -2
  34. package/dist/_internal/sdk/designer.d.ts +6 -0
  35. package/dist/_internal/sdk/designer.js +11 -1
  36. package/dist/_internal/sdk/index.d.ts +1 -1
  37. package/dist/_internal/sdk/index.js +6 -6
  38. package/dist/authoring-EcyK2YVN.js +103 -0
  39. package/dist/authoring-EcyK2YVN.js.map +1 -0
  40. package/dist/auto-register.js +12 -10
  41. package/dist/auto-register.js.map +1 -1
  42. package/dist/contracts.js +5 -4
  43. package/dist/contracts.js.map +1 -1
  44. package/dist/{contrast-B4TH-dvm.js → contrast-CZFqj1I5.js} +23 -23
  45. package/dist/{contrast-B4TH-dvm.js.map → contrast-CZFqj1I5.js.map} +1 -1
  46. package/dist/core.js +10 -8
  47. package/dist/core.js.map +1 -1
  48. package/dist/designer-Byw45cUM.js +21 -0
  49. package/dist/designer-Byw45cUM.js.map +1 -0
  50. package/dist/designer-auto-register.js +5 -3
  51. package/dist/designer-auto-register.js.map +1 -1
  52. package/dist/designer-blueprint-workbench-panel-C2MoZwKA-CbXkv78O.js +3517 -0
  53. package/dist/designer-blueprint-workbench-panel-C2MoZwKA-CbXkv78O.js.map +1 -0
  54. package/dist/designer-dataset-controller-CPytVNBK-DWL3SRTP.js +4354 -0
  55. package/dist/designer-dataset-controller-CPytVNBK-DWL3SRTP.js.map +1 -0
  56. package/dist/designer-left-panel-groups-dom-WMsH33zw-B9pl8loh.js +557 -0
  57. package/dist/designer-left-panel-groups-dom-WMsH33zw-B9pl8loh.js.map +1 -0
  58. package/dist/designer-ui-primitives-CH4RNiMa-BNXQwJPZ.js +2146 -0
  59. package/dist/designer-ui-primitives-CH4RNiMa-BNXQwJPZ.js.map +1 -0
  60. package/dist/designer.js +5 -3
  61. package/dist/{dist-CR13A2Yb.js → dist-BHTClwId.js} +4785 -16808
  62. package/dist/dist-BHTClwId.js.map +1 -0
  63. package/dist/{dist-CAdGDmU3.js → dist-DfAV2jGI.js} +277 -227
  64. package/dist/dist-DfAV2jGI.js.map +1 -0
  65. package/dist/editor-descriptor-schema-Be30Wv8w.js +190 -0
  66. package/dist/editor-descriptor-schema-Be30Wv8w.js.map +1 -0
  67. package/dist/engine.js +4 -2
  68. package/dist/hierarchy-BQZrZWbC.js +86 -0
  69. package/dist/hierarchy-BQZrZWbC.js.map +1 -0
  70. package/dist/host-resource-selection-5Cf_gclK-Sv4Z8UXS.js +2141 -0
  71. package/dist/host-resource-selection-5Cf_gclK-Sv4Z8UXS.js.map +1 -0
  72. package/dist/index.js +11 -9
  73. package/dist/{manager-Bhqi_KmD.js → manager-B2CZ2b5I.js} +2 -2
  74. package/dist/{manager-Bhqi_KmD.js.map → manager-B2CZ2b5I.js.map} +1 -1
  75. package/dist/material-BPlvEmDi.js +12 -0
  76. package/dist/material-BPlvEmDi.js.map +1 -0
  77. package/dist/material-auto-register.d.ts +1 -0
  78. package/dist/material-auto-register.js +16 -0
  79. package/dist/material-auto-register.js.map +1 -0
  80. package/dist/{material-definition-BJ4ujhuj.js → material-definition-B9xCZcD-.js} +2 -2
  81. package/dist/{material-definition-BJ4ujhuj.js.map → material-definition-B9xCZcD-.js.map} +1 -1
  82. package/dist/{material-manifest-LdgIkzgH.js → material-manifest-bsGl6vZZ.js} +70 -256
  83. package/dist/material-manifest-bsGl6vZZ.js.map +1 -0
  84. package/dist/material.js +3 -2
  85. package/dist/parse-B0hwp_yj.js +264 -0
  86. package/dist/parse-B0hwp_yj.js.map +1 -0
  87. package/dist/plugin-core.js +3 -2
  88. package/dist/plugin-manager.js +1 -1
  89. package/dist/{plugin-package-BfZLl3ru.js → plugin-package-BT-pCoTt.js} +3 -3
  90. package/dist/{plugin-package-BfZLl3ru.js.map → plugin-package-BT-pCoTt.js.map} +1 -1
  91. package/dist/{plugin-registration-CYtTqIxF.js → plugin-registration-BjS_CXJU.js} +2 -2
  92. package/dist/{plugin-registration-CYtTqIxF.js.map → plugin-registration-BjS_CXJU.js.map} +1 -1
  93. package/dist/plugin-sdk.js +3 -3
  94. package/dist/{plugins-DRaykV9c.js → plugins-B9bwk-t6.js} +2 -2
  95. package/dist/{plugins-DRaykV9c.js.map → plugins-B9bwk-t6.js.map} +1 -1
  96. package/dist/plugins.js +5 -5
  97. package/dist/renderer.js +1 -1
  98. package/dist/runtime-dispatch-Dt9fhcI5.js +360 -0
  99. package/dist/runtime-dispatch-Dt9fhcI5.js.map +1 -0
  100. package/dist/{src-Bm7u11mN-BPS5TRsq.js → src-Bm7u11mN-BMeb9fvV.js} +40 -39
  101. package/dist/{src-Bm7u11mN-BPS5TRsq.js.map → src-Bm7u11mN-BMeb9fvV.js.map} +1 -1
  102. package/dist/{material-2XmHe-aH.js → text-BVzTcUas.js} +44 -52
  103. package/dist/text-BVzTcUas.js.map +1 -0
  104. package/dist/value-ref-y4_YKUP5.js +278 -0
  105. package/dist/value-ref-y4_YKUP5.js.map +1 -0
  106. package/dist/{viewer-CrJupI8I-D2BtwLsA.js → viewer-CrJupI8I-DZZfdHXr.js} +5 -5
  107. package/dist/{viewer-CrJupI8I-D2BtwLsA.js.map → viewer-CrJupI8I-DZZfdHXr.js.map} +1 -1
  108. package/dist/viewer-auto-register.js +2 -2
  109. package/dist/viewer.js +2 -2
  110. package/package.json +12 -17
  111. package/dist/_internal/react/components.d.ts +0 -32
  112. package/dist/_internal/react/index.d.ts +0 -14
  113. package/dist/_internal/react/index.js +0 -215
  114. package/dist/_internal/vue/components.d.ts +0 -36
  115. package/dist/_internal/vue/global-styles.d.ts +0 -10
  116. package/dist/_internal/vue/index.d.ts +0 -14
  117. package/dist/_internal/vue/index.js +0 -290
  118. package/dist/designer-xtN0h7PL.js +0 -11
  119. package/dist/designer-xtN0h7PL.js.map +0 -1
  120. package/dist/dist-CAdGDmU3.js.map +0 -1
  121. package/dist/dist-CR13A2Yb.js.map +0 -1
  122. package/dist/material-2XmHe-aH.js.map +0 -1
  123. package/dist/material-manifest-LdgIkzgH.js.map +0 -1
  124. package/dist/parse-CYwxTDJU.js +0 -364
  125. package/dist/parse-CYwxTDJU.js.map +0 -1
  126. package/dist/react.d.ts +0 -1
  127. package/dist/react.js +0 -213
  128. package/dist/react.js.map +0 -1
  129. package/dist/value-ref-Z0o70Vy6.js +0 -716
  130. package/dist/value-ref-Z0o70Vy6.js.map +0 -1
  131. package/dist/vue.d.ts +0 -1
  132. package/dist/vue.js +0 -288
  133. package/dist/vue.js.map +0 -1
@@ -6,54 +6,56 @@ import { T as s } from "./schema-C38FI_z2.js";
6
6
  import { n as c, o as l } from "./parse-BQw3u9_4.js";
7
7
  import { a as u, i as d, n as f, r as p } from "./read-data-value-WmMKWshv.js";
8
8
  import { t as m } from "./equality-DjZ9cv4u.js";
9
- import { S as h, a as g, r as _, t as v, v as y, w as b } from "./value-ref-Z0o70Vy6.js";
10
- import { n as ee, t as te } from "./data-capabilities-V1eEBn7W.js";
11
- import { a as ne, n as x, r as S } from "./material-schema-CtxTkCP2.js";
9
+ import { n as h, t as g } from "./data-capabilities-V1eEBn7W.js";
10
+ import { a as ee, n as _, r as v } from "./material-schema-CtxTkCP2.js";
11
+ import { r as y, t as te } from "./runtime-dispatch-Dt9fhcI5.js";
12
+ import { o as ne } from "./hierarchy-BQZrZWbC.js";
13
+ import { a as re, r as b, t as x } from "./value-ref-y4_YKUP5.js";
12
14
  //#region ../renderer/dist/index.js
13
- function re(e, t) {
15
+ function ie(e, t) {
14
16
  let n = t.background;
15
17
  e.style.backgroundColor = n?.type === "solid" ? n.color : t.backgroundColor;
16
18
  let r = [], i = [];
17
- t.backgroundImage !== void 0 && (r.push(`url("${ae(t.backgroundImage)}")`), i.push(t.backgroundImageFit === "contain" ? "contain" : "cover"));
18
- let a = n === void 0 ? void 0 : ie(n);
19
+ t.backgroundImage !== void 0 && (r.push(`url("${oe(t.backgroundImage)}")`), i.push(t.backgroundImageFit === "contain" ? "contain" : "cover"));
20
+ let a = n === void 0 ? void 0 : ae(n);
19
21
  if (a !== void 0 && (r.push(a), i.push("100% 100%")), r.length === 0) {
20
22
  e.style.backgroundImage = "", e.style.backgroundSize = "", e.style.backgroundPosition = "", e.style.backgroundRepeat = "";
21
23
  return;
22
24
  }
23
25
  e.style.backgroundImage = r.join(", "), e.style.backgroundSize = i.join(", "), e.style.backgroundPosition = r.map(() => "center").join(", "), e.style.backgroundRepeat = r.map(() => "no-repeat").join(", ");
24
26
  }
25
- function ie(e) {
27
+ function ae(e) {
26
28
  if (e.type === "solid") return;
27
29
  let t = e.stops.map((e) => `${e.color} ${e.position}%`).join(", ");
28
30
  return e.type === "linear-gradient" ? `linear-gradient(${e.angle}deg, ${t})` : `radial-gradient(circle at ${e.position.x}% ${e.position.y}%, ${t})`;
29
31
  }
30
- function ae(e) {
32
+ function oe(e) {
31
33
  return e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
32
34
  }
33
- function C(e) {
35
+ function S(e) {
34
36
  if (e === null) return "null";
35
37
  if (typeof e == "boolean") return e ? "true" : "false";
36
38
  if (typeof e == "number" || typeof e == "string") return JSON.stringify(e);
37
- if (Array.isArray(e)) return `[${e.map((e) => C(e)).join(",")}]`;
39
+ if (Array.isArray(e)) return `[${e.map((e) => S(e)).join(",")}]`;
38
40
  let t = e;
39
- return `{${Object.keys(t).sort().map((e) => `${JSON.stringify(e)}:${C(t[e])}`).join(",")}}`;
41
+ return `{${Object.keys(t).sort().map((e) => `${JSON.stringify(e)}:${S(t[e])}`).join(",")}}`;
40
42
  }
41
- function oe() {
43
+ function se() {
42
44
  return {
43
45
  projectionKey: void 0,
44
46
  dataState: { status: "idle" }
45
47
  };
46
48
  }
47
- function se(e) {
48
- return C(e);
49
+ function ce(e) {
50
+ return S(e);
49
51
  }
50
- function w(e, t) {
52
+ function C(e, t) {
51
53
  return e.map((e) => ({
52
54
  ...e,
53
55
  path: [...t, ...e.path]
54
56
  }));
55
57
  }
56
- function T(e, t, n) {
58
+ function w(e, t, n) {
57
59
  return {
58
60
  severity: "error",
59
61
  code: e,
@@ -61,13 +63,13 @@ function T(e, t, n) {
61
63
  message: n
62
64
  };
63
65
  }
64
- function E(e, t, n) {
66
+ function T(e, t, n) {
65
67
  return {
66
68
  ok: !1,
67
- diagnostics: [T(e, t, n)]
69
+ diagnostics: [w(e, t, n)]
68
70
  };
69
71
  }
70
- function D(e, t) {
72
+ function E(e, t) {
71
73
  return {
72
74
  severity: "error",
73
75
  code: "PLUGIN_CORE_RENDER_FAILED",
@@ -75,16 +77,16 @@ function D(e, t) {
75
77
  message: t
76
78
  };
77
79
  }
78
- function O(e) {
80
+ function D(e) {
79
81
  return t(e);
80
82
  }
81
- function ce(e, t, r, i, a) {
83
+ function le(e, t, r, i, a) {
82
84
  if (r === null) return {
83
85
  status: "ready",
84
86
  value: t
85
87
  };
86
88
  let o = n(t);
87
- return o.ok ? A(e, o.value, r, i, a, {
89
+ return o.ok ? k(e, o.value, r, i, a, {
88
90
  bindingCode: "Host dataset binding is invalid.",
89
91
  adapterCode: "Host dataset adapter failed."
90
92
  }) : {
@@ -93,7 +95,7 @@ function ce(e, t, r, i, a) {
93
95
  message: "Host dataset is invalid."
94
96
  };
95
97
  }
96
- function k(e, t, r) {
98
+ function O(e, t, r) {
97
99
  if (e.manifest.staticData?.kind !== "tabular") return {
98
100
  status: "ready",
99
101
  value: t
@@ -103,7 +105,7 @@ function k(e, t, r) {
103
105
  status: "error",
104
106
  code: "HOST_DATASET_BINDING_INVALID",
105
107
  message: "Static dataset binding is invalid."
106
- } : A(e, i.value, r, void 0, void 0, {
108
+ } : k(e, i.value, r, void 0, void 0, {
107
109
  bindingCode: "Static dataset binding is invalid.",
108
110
  adapterCode: "Static dataset adapter failed."
109
111
  }) : {
@@ -112,14 +114,14 @@ function k(e, t, r) {
112
114
  message: "Static dataset is invalid."
113
115
  };
114
116
  }
115
- function A(t, n, r, i, a, o) {
117
+ function k(t, n, r, i, a, o) {
116
118
  let s = t.manifest.dataBinding, c = t.tabularDataAdapter;
117
119
  if (s === void 0 || c === void 0) return {
118
120
  status: "error",
119
121
  code: "HOST_DATASET_BINDING_INVALID",
120
122
  message: o.bindingCode
121
123
  };
122
- let l = g(r, n.fields, s.roles);
124
+ let l = re(r, n.fields, s.roles);
123
125
  if (!l.ok) return {
124
126
  status: "error",
125
127
  code: "HOST_DATASET_BINDING_INVALID",
@@ -145,7 +147,7 @@ function A(t, n, r, i, a, o) {
145
147
  message: o.adapterCode
146
148
  };
147
149
  } catch {
148
- return i !== void 0 && a?.(T("PLUGIN_CORE_RENDER_FAILED", [
150
+ return i !== void 0 && a?.(w("PLUGIN_CORE_RENDER_FAILED", [
149
151
  "components",
150
152
  i,
151
153
  "dataBinding"
@@ -156,12 +158,12 @@ function A(t, n, r, i, a, o) {
156
158
  };
157
159
  }
158
160
  }
159
- function j(e, t, n, r, i, a, o, s = "fail") {
161
+ function A(e, t, n, r, i, a, o, s = "fail") {
160
162
  let c = [], l = [], u = /* @__PURE__ */ new Map();
161
163
  for (let s = 0; s < e.components.length; s++) {
162
164
  let d = e.components[s], f = t.get(d.type);
163
165
  if (f === void 0) {
164
- l.push(T("PLUGIN_CORE_IDENTITY_INVALID", [
166
+ l.push(w("PLUGIN_CORE_IDENTITY_INVALID", [
165
167
  "components",
166
168
  s,
167
169
  "type"
@@ -171,18 +173,18 @@ function j(e, t, n, r, i, a, o, s = "fail") {
171
173
  let p = o.entries.get(d), m, h;
172
174
  if (p !== void 0 && p.entry === f) m = p.props, h = p.style, u.set(d, p);
173
175
  else {
174
- let e = x(d.props, f.manifest.propsSchema);
176
+ let e = _(d.props, f.manifest.propsSchema);
175
177
  if (!e.ok) {
176
- l.push(...w(e.diagnostics, [
178
+ l.push(...C(e.diagnostics, [
177
179
  "components",
178
180
  s,
179
181
  "props"
180
182
  ]));
181
183
  continue;
182
184
  }
183
- let t = S(d.style, f.manifest.styleSchema);
185
+ let t = v(d.style, f.manifest.styleSchema);
184
186
  if (!t.ok) {
185
- l.push(...w(t.diagnostics, [
187
+ l.push(...C(t.diagnostics, [
186
188
  "components",
187
189
  s,
188
190
  "style"
@@ -191,12 +193,12 @@ function j(e, t, n, r, i, a, o, s = "fail") {
191
193
  }
192
194
  let n = d.styleRules ?? [], r = !0;
193
195
  for (let e = 0; e < n.length; e++) {
194
- let i = S({
196
+ let i = v({
195
197
  ...t.value,
196
198
  ...n[e].style
197
199
  }, f.manifest.styleSchema);
198
200
  if (!i.ok) {
199
- l.push(...w(i.diagnostics, [
201
+ l.push(...C(i.diagnostics, [
200
202
  "components",
201
203
  s,
202
204
  "styleRules",
@@ -213,7 +215,7 @@ function j(e, t, n, r, i, a, o, s = "fail") {
213
215
  style: h
214
216
  });
215
217
  }
216
- let g = M(a, d, f, i, ["components", s]);
218
+ let g = j(a, d, f, i, ["components", s]);
217
219
  if ("diagnostic" in g) {
218
220
  l.push(g.diagnostic);
219
221
  continue;
@@ -242,7 +244,7 @@ function j(e, t, n, r, i, a, o, s = "fail") {
242
244
  value: c,
243
245
  diagnostics: []
244
246
  };
245
- let d = O(l);
247
+ let d = D(l);
246
248
  return s === "skip" ? {
247
249
  ok: !0,
248
250
  value: c,
@@ -252,21 +254,21 @@ function j(e, t, n, r, i, a, o, s = "fail") {
252
254
  diagnostics: d
253
255
  };
254
256
  }
255
- function M(e, t, n, r, i, a) {
257
+ function j(e, t, n, r, i, a) {
256
258
  let o = p(t), s = f(t);
257
259
  if (o === null) return s !== null || n.manifest.defaultData === void 0 ? {
258
260
  dataState: { status: "idle" },
259
261
  dataSource: void 0,
260
262
  epoch: void 0
261
263
  } : {
262
- dataState: k(n, n.manifest.defaultData, n.manifest.staticData?.kind === "tabular" ? n.manifest.staticData.defaultBinding : null),
264
+ dataState: O(n, n.manifest.defaultData, n.manifest.staticData?.kind === "tabular" ? n.manifest.staticData.defaultBinding : null),
263
265
  dataSource: void 0,
264
266
  epoch: void 0
265
267
  };
266
268
  let c = o.kind === "data-source-field" ? e.read(o.dataSourceId) : void 0, l = c?.source;
267
- if (!te(n.manifest.dataCapabilities, o, l)) return { diagnostic: T("PLUGIN_CORE_MANIFEST_FIELD_INVALID", [...i, "dataValue"], "Material does not accept the configured data source.") };
269
+ if (!g(n.manifest.dataCapabilities, o, l)) return { diagnostic: w("PLUGIN_CORE_MANIFEST_FIELD_INVALID", [...i, "dataValue"], "Material does not accept the configured data source.") };
268
270
  if (o.kind !== "data-source-field") return {
269
- dataState: N(e.evaluate(o), n, s),
271
+ dataState: M(e.evaluate(o), n, s),
270
272
  dataSource: void 0,
271
273
  epoch: e.variablesKey
272
274
  };
@@ -279,11 +281,11 @@ function M(e, t, n, r, i, a) {
279
281
  dataSource: void 0,
280
282
  epoch: void 0
281
283
  };
282
- let u = le(l.kind === "host-resource" ? l.resourceType : void 0, r, i);
284
+ let u = ue(l.kind === "host-resource" ? l.resourceType : void 0, r, i);
283
285
  if (u !== void 0) return { diagnostic: u };
284
286
  let d = {
285
287
  dataSourceId: o.dataSourceId,
286
- projectionKey: se(s)
288
+ projectionKey: ce(s)
287
289
  };
288
290
  if (s !== null && (n.manifest.dataBinding === void 0 || n.tabularDataAdapter === void 0)) return {
289
291
  dataState: {
@@ -305,16 +307,16 @@ function M(e, t, n, r, i, a) {
305
307
  dataSource: d,
306
308
  epoch: c.dataState
307
309
  } : {
308
- dataState: ce(n, m.value, s, t.id, a),
310
+ dataState: le(n, m.value, s, t.id, a),
309
311
  dataSource: d,
310
312
  epoch: c.dataState
311
313
  } : {
312
- dataState: N(m, n, s),
314
+ dataState: M(m, n, s),
313
315
  dataSource: d,
314
316
  epoch: c.dataState
315
317
  };
316
318
  }
317
- function N(e, t, n) {
319
+ function M(e, t, n) {
318
320
  switch (e.kind) {
319
321
  case "pending": return { status: "loading" };
320
322
  case "failed": return e.reason === "variable-missing" ? {
@@ -330,27 +332,27 @@ function N(e, t, n) {
330
332
  code: "HOST_RESOURCE_FAILED",
331
333
  message: "Host resource request failed."
332
334
  };
333
- default: return e.value === void 0 ? { status: "idle" } : k(t, e.value, n);
335
+ default: return e.value === void 0 ? { status: "idle" } : O(t, e.value, n);
334
336
  }
335
337
  }
336
- function le(e, t, n) {
337
- if (e !== void 0 && t !== void 0 && t.getResourceType(e) === void 0) return T("PLUGIN_CORE_CONTRIBUTION_UNKNOWN", [
338
+ function ue(e, t, n) {
339
+ if (e !== void 0 && t !== void 0 && t.getResourceType(e) === void 0) return w("PLUGIN_CORE_CONTRIBUTION_UNKNOWN", [
338
340
  ...n,
339
341
  "dataSource",
340
342
  "resourceType"
341
343
  ], "Host resource type is not enabled by an active plugin contribution.");
342
344
  }
343
- function ue(e, t) {
345
+ function de(e, t) {
344
346
  if (e === void 0 || e.length === 0 || t.status !== "ready") return;
345
347
  let n;
346
- for (let r of e) de(r, t.value) && (n = {
348
+ for (let r of e) fe(r, t.value) && (n = {
347
349
  ...n ?? {},
348
350
  ...r.style
349
351
  });
350
352
  return n;
351
353
  }
352
- function de(e, t) {
353
- let n = fe(t, e.when.path);
354
+ function fe(e, t) {
355
+ let n = pe(t, e.when.path);
354
356
  if (e.when.operator === "exists") return n.ok;
355
357
  if (!n.ok) return !1;
356
358
  let r = n.value, i = e.when.value;
@@ -360,12 +362,12 @@ function de(e, t) {
360
362
  case "gt":
361
363
  case "gte":
362
364
  case "lt":
363
- case "lte": return !P(r) || !P(i) ? !1 : e.when.operator === "gt" ? r > i : e.when.operator === "gte" ? r >= i : e.when.operator === "lt" ? r < i : r <= i;
365
+ case "lte": return !N(r) || !N(i) ? !1 : e.when.operator === "gt" ? r > i : e.when.operator === "gte" ? r >= i : e.when.operator === "lt" ? r < i : r <= i;
364
366
  case "contains": return typeof r == "string" ? typeof i == "string" && r.includes(i) : Array.isArray(r) && r.some((e) => m(e, i));
365
367
  default: return !1;
366
368
  }
367
369
  }
368
- function fe(e, t) {
370
+ function pe(e, t) {
369
371
  let n = e;
370
372
  for (let e of t) {
371
373
  if (typeof n != "object" || !n) return { ok: !1 };
@@ -384,23 +386,23 @@ function fe(e, t) {
384
386
  value: n
385
387
  };
386
388
  }
387
- function P(e) {
389
+ function N(e) {
388
390
  return typeof e == "number" && Number.isFinite(e);
389
391
  }
390
- function F(e, t, n) {
391
- let r = ue(t.component.styleRules, n), i = r === void 0 ? t.model.style : {
392
+ function P(e, t, n) {
393
+ let r = de(t.component.styleRules, n), i = r === void 0 ? t.model.style : {
392
394
  ...t.model.style,
393
395
  ...r
394
396
  }, a = e.options.conditionalStylePort;
395
397
  if (a !== void 0) {
396
- let r = pe(e, a, t.component.id, n);
398
+ let r = me(e, a, t.component.id, n);
397
399
  if (r !== void 0) {
398
- let n = S({
400
+ let n = v({
399
401
  ...i,
400
402
  ...r
401
403
  }, t.entry.manifest.styleSchema);
402
404
  if (n.ok) i = n.value;
403
- else for (let r of w(n.diagnostics, [
405
+ else for (let r of C(n.diagnostics, [
404
406
  "components",
405
407
  t.component.id,
406
408
  "conditionalStyle"
@@ -413,14 +415,14 @@ function F(e, t, n) {
413
415
  style: i
414
416
  };
415
417
  }
416
- function pe(e, t, n, r) {
418
+ function me(e, t, n, r) {
417
419
  try {
418
420
  return t.resolve({
419
421
  componentId: n,
420
422
  dataState: r
421
423
  });
422
424
  } catch {
423
- e.options.onDiagnostic?.(T("PLUGIN_CORE_RENDER_FAILED", [
425
+ e.options.onDiagnostic?.(w("PLUGIN_CORE_RENDER_FAILED", [
424
426
  "components",
425
427
  n,
426
428
  "conditionalStyle"
@@ -428,10 +430,10 @@ function pe(e, t, n, r) {
428
430
  return;
429
431
  }
430
432
  }
431
- function I(e, t, n, r, i) {
432
- L(e, t, n, i), e.model = n, R(e, r);
433
+ function F(e, t, n, r, i) {
434
+ I(e, t, n, i), e.model = n, L(e, r);
433
435
  }
434
- function L(e, t, n, r) {
436
+ function I(e, t, n, r) {
435
437
  let i = t.position, a = e.style;
436
438
  a.position !== "absolute" && (a.position = "absolute");
437
439
  let o = `${i.x}px`;
@@ -449,24 +451,24 @@ function L(e, t, n, r) {
449
451
  let h = typeof n.style.opacity == "number" && Number.isFinite(n.style.opacity) ? String(Math.min(1, Math.max(0, n.style.opacity))) : "";
450
452
  a.opacity !== h && (a.opacity = h);
451
453
  }
452
- function R(e, t) {
454
+ function L(e, t) {
453
455
  let n = t ? "none" : "block";
454
456
  e.style.display !== n && (e.style.display = n);
455
457
  }
456
- function z(e, t, n, r) {
458
+ function R(e, t, n, r) {
457
459
  n.stackOrder = r, n.projection.projectionKey = t.dataSource?.projectionKey, n.projection.dataState = t.model.dataState;
458
- let i = V(e, t, r);
459
- if (n.applied !== void 0 && n.appliedModel !== void 0 && me(n.applied, i)) {
460
- L(n.element, t.component, n.appliedModel, r), R(n.element, e.visibility.isHidden(t.component.id));
460
+ let i = B(e, t, r);
461
+ if (n.applied !== void 0 && n.appliedModel !== void 0 && he(n.applied, i)) {
462
+ I(n.element, t.component, n.appliedModel, r), L(n.element, e.visibility.isHidden(t.component.id));
461
463
  return;
462
464
  }
463
- B(e, t, n, r);
465
+ z(e, t, n, r);
464
466
  }
465
- function B(e, t, n, r) {
466
- let i = F(e, t, t.model.dataState);
467
- I(n.element, t.component, i, e.visibility.isHidden(t.component.id), r), n.applied = V(e, t, r), n.appliedModel = i;
467
+ function z(e, t, n, r) {
468
+ let i = P(e, t, t.model.dataState);
469
+ F(n.element, t.component, i, e.visibility.isHidden(t.component.id), r), n.applied = B(e, t, r), n.appliedModel = i;
468
470
  }
469
- function V(e, t, n) {
471
+ function B(e, t, n) {
470
472
  return {
471
473
  component: t.component,
472
474
  entry: t.entry,
@@ -476,18 +478,18 @@ function V(e, t, n) {
476
478
  dataEpoch: t.dataEpoch
477
479
  };
478
480
  }
479
- function me(e, t) {
481
+ function he(e, t) {
480
482
  return e.component === t.component && e.entry === t.entry && e.interactive === t.interactive && e.stackOrder === t.stackOrder && e.hidden === t.hidden && e.dataEpoch === t.dataEpoch;
481
483
  }
482
- function he(e, t, n) {
483
- let r = F(e, t, t.model.dataState);
484
+ function ge(e, t, n) {
485
+ let r = P(e, t, t.model.dataState);
484
486
  n.element.model = r, n.appliedModel = r;
485
487
  }
486
- function ge(e, t, n) {
488
+ function _e(e, t, n) {
487
489
  if (n.bubbles !== !0 || n.composed !== !0 || n.type !== "base-screen-material-event") return;
488
490
  let r = e.candidates.get(t.component.id) ?? t;
489
491
  if (r.model.interactive !== !0) return;
490
- let i = ne(n.detail);
492
+ let i = ee(n.detail);
491
493
  if (!(!i.ok || !r.entry.manifest.events.includes(i.value.name))) {
492
494
  n.stopPropagation();
493
495
  try {
@@ -507,7 +509,7 @@ function ge(e, t, n) {
507
509
  }
508
510
  }
509
511
  }
510
- var _e = class {
512
+ var ve = class {
511
513
  root;
512
514
  #e = /* @__PURE__ */ new Map();
513
515
  #t = /* @__PURE__ */ new Map();
@@ -588,7 +590,7 @@ var _e = class {
588
590
  ...d ? { translate: "0 12px" } : {}
589
591
  }], p = t.animate(f, {
590
592
  duration: r.durationMs,
591
- easing: ve(r.easing),
593
+ easing: ye(r.easing),
592
594
  fill: "none"
593
595
  });
594
596
  this.#n.set(e, p), p.finished.then(() => {
@@ -596,14 +598,14 @@ var _e = class {
596
598
  }).catch(() => void 0);
597
599
  }
598
600
  };
599
- function ve(e) {
601
+ function ye(e) {
600
602
  return e === "ease-in-out-quad" ? "cubic-bezier(0.455, 0.03, 0.515, 0.955)" : e === "ease-in-out-expo" ? "cubic-bezier(1, 0, 0, 1)" : "linear";
601
603
  }
602
- var ye = "#source-dataset", be = "#source-resource", xe = "#source";
603
- function Se(e) {
604
- return e.kind === "dataset" ? ye : e.kind === "host-resource" ? be : xe;
604
+ var be = "#source-dataset", xe = "#source-resource", Se = "#source";
605
+ function Ce(e) {
606
+ return e.kind === "dataset" ? be : e.kind === "host-resource" ? xe : Se;
605
607
  }
606
- var Ce = class {
608
+ var we = class {
607
609
  resources;
608
610
  datasets;
609
611
  hostCatalog;
@@ -630,51 +632,51 @@ var Ce = class {
630
632
  resourceType: e.source.resourceType,
631
633
  resourceId: e.source.resourceId,
632
634
  params: e.params
633
- }, t) ?? Promise.resolve(H());
635
+ }, t) ?? Promise.resolve(V());
634
636
  default: return this.hostCatalog?.resolve({
635
637
  sourceId: e.source.sourceId,
636
638
  params: e.params,
637
639
  purpose: "runtime",
638
640
  signal: t.signal
639
- }) ?? Promise.resolve(H());
641
+ }) ?? Promise.resolve(V());
640
642
  }
641
643
  }
642
644
  async queryDataset(e, t, a) {
643
- if (this.datasets === void 0) return H();
645
+ if (this.datasets === void 0) return V();
644
646
  let o = this.#t, s = () => !a.signal.aborted && o === this.#t;
645
- if (!s()) return W();
647
+ if (!s()) return U();
646
648
  let c = this.#e.get(t);
647
649
  if (c === void 0) {
648
650
  let e = await this.datasets.describe({
649
651
  datasetId: t,
650
652
  signal: a.signal
651
653
  });
652
- if (!s()) return W();
654
+ if (!s()) return U();
653
655
  if (!e.ok) return e;
654
656
  let n = r(e.value);
655
657
  if (!n.ok) return n;
656
- if (n.value.datasetId !== t) return U();
658
+ if (n.value.datasetId !== t) return H();
657
659
  c = n.value, this.#e.size >= 32 && this.#e.delete(this.#e.keys().next().value), this.#e.set(t, c);
658
660
  }
659
661
  let l = i(c.parameters, e.params);
660
662
  if (!l.ok) return l;
661
- if (!s()) return W();
663
+ if (!s()) return U();
662
664
  let u = await this.datasets.query({
663
665
  datasetId: t,
664
666
  dataSourceId: e.dataSourceId,
665
667
  params: l.value
666
668
  }, a);
667
- if (!s()) return W();
669
+ if (!s()) return U();
668
670
  if (!u.ok) return u;
669
671
  let d = n(u.value);
670
- return d.ok ? C(d.value.fields) === C(c.fields) ? {
672
+ return d.ok ? S(d.value.fields) === S(c.fields) ? {
671
673
  ok: !0,
672
674
  value: d.value,
673
675
  diagnostics: []
674
- } : U() : d;
676
+ } : H() : d;
675
677
  }
676
678
  };
677
- function H() {
679
+ function V() {
678
680
  return {
679
681
  ok: !1,
680
682
  diagnostics: [{
@@ -685,7 +687,7 @@ function H() {
685
687
  }]
686
688
  };
687
689
  }
688
- function U() {
690
+ function H() {
689
691
  return {
690
692
  ok: !1,
691
693
  diagnostics: [{
@@ -696,18 +698,18 @@ function U() {
696
698
  }]
697
699
  };
698
700
  }
699
- function W() {
701
+ function U() {
700
702
  return {
701
703
  ok: !1,
702
704
  diagnostics: []
703
705
  };
704
706
  }
705
- var we = class {
707
+ var Te = class {
706
708
  options;
707
709
  #e = /* @__PURE__ */ new Map();
708
710
  #t;
709
711
  #n = {};
710
- #r = C({});
712
+ #r = S({});
711
713
  constructor(e) {
712
714
  this.options = e;
713
715
  }
@@ -715,12 +717,12 @@ var we = class {
715
717
  return this.#r;
716
718
  }
717
719
  ensure(e, t, n, r = {}) {
718
- this.#t = e, t !== this.#n && (this.#n = t, this.#r = C(t));
720
+ this.#t = e, t !== this.#n && (this.#n = t, this.#r = S(t));
719
721
  let i = {
720
722
  variableValues: t,
721
723
  dataSourceValues: /* @__PURE__ */ new Map(),
722
724
  dataSourceErrors: /* @__PURE__ */ new Map()
723
- }, a = Te(e);
725
+ }, a = Ee(e);
724
726
  for (let e of a) {
725
727
  let t = this.#i(e.id);
726
728
  t.source = e.source, this.#a(t, e, i, n, r.startOnly);
@@ -731,7 +733,7 @@ var we = class {
731
733
  reportProjection(e, t, n) {
732
734
  let r = this.#e.get(e);
733
735
  if (r === void 0) return;
734
- let i = G(n);
736
+ let i = W(n);
735
737
  this.#u(r, "adapted", {
736
738
  startedAt: r.startedAt,
737
739
  ...i
@@ -747,14 +749,14 @@ var we = class {
747
749
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
748
750
  if (e.kind === "data-source-field") {
749
751
  let r = this.#e.get(e.dataSourceId);
750
- r?.dataState.status === "ready" && r.rawValue !== void 0 ? t.set(e.dataSourceId, r.rawValue) : r?.dataState.status === "error" && n.set(e.dataSourceId, r.rawError ?? K("Host data source failed."));
752
+ r?.dataState.status === "ready" && r.rawValue !== void 0 ? t.set(e.dataSourceId, r.rawValue) : r?.dataState.status === "error" && n.set(e.dataSourceId, r.rawError ?? G("Host data source failed."));
751
753
  }
752
754
  let r = {
753
755
  variableValues: this.#n,
754
756
  dataSourceValues: t,
755
757
  dataSourceErrors: n
756
758
  };
757
- return _(e, r);
759
+ return b(e, r);
758
760
  }
759
761
  refresh(e, t) {
760
762
  let n = e === void 0 ? [...this.#e.keys()] : this.#e.has(e) ? [e] : [], r = [];
@@ -772,7 +774,7 @@ var we = class {
772
774
  }
773
775
  clear() {
774
776
  for (let e of this.#e.values()) this.#l(e);
775
- this.#e.clear(), this.#t = void 0, this.#n = {}, this.#r = C({});
777
+ this.#e.clear(), this.#t = void 0, this.#n = {}, this.#r = S({});
776
778
  }
777
779
  #i(e) {
778
780
  let t = this.#e.get(e);
@@ -803,14 +805,14 @@ var we = class {
803
805
  this.#c(e, a.diagnostic), n.dataSourceErrors.set(e.dataSourceId, a.diagnostic);
804
806
  return;
805
807
  }
806
- let o = Ee(e.dataSourceId, t.source, a.params);
808
+ let o = De(e.dataSourceId, t.source, a.params);
807
809
  if (e.requestKey !== o && (this.#l(e), e.requestKey = o, e.params = a.params, e.dataState = { status: "loading" }, e.rawValue = void 0, e.rawError = void 0), e.requestSlotId === void 0) {
808
810
  if (e.dataState.status === "ready") {
809
811
  e.rawValue !== void 0 && n.dataSourceValues.set(e.dataSourceId, e.rawValue);
810
812
  return;
811
813
  }
812
814
  if (e.dataState.status === "error") {
813
- n.dataSourceErrors.set(e.dataSourceId, e.rawError ?? K("Host data source failed."));
815
+ n.dataSourceErrors.set(e.dataSourceId, e.rawError ?? G("Host data source failed."));
814
816
  return;
815
817
  }
816
818
  i !== void 0 && !i.has(e.dataSourceId) || this.#s(e, r);
@@ -819,18 +821,18 @@ var we = class {
819
821
  #o(e, t) {
820
822
  let n = {}, r = !1;
821
823
  for (let [i, a] of Object.entries(e)) {
822
- let e = _(a, t);
824
+ let e = b(a, t);
823
825
  if (e.kind === "pending") {
824
826
  r = !0;
825
827
  continue;
826
828
  }
827
829
  if (e.kind === "failed") return {
828
830
  kind: "failed",
829
- diagnostic: K(e.reason === "variable-missing" ? "Data source parameter references a variable without a value." : "Data source parameter is invalid.")
831
+ diagnostic: G(e.reason === "variable-missing" ? "Data source parameter references a variable without a value." : "Data source parameter is invalid.")
830
832
  };
831
833
  if (e.value === void 0) return {
832
834
  kind: "failed",
833
- diagnostic: K("Data source parameter resolved to no value.")
835
+ diagnostic: G("Data source parameter resolved to no value.")
834
836
  };
835
837
  n[i] = e.value;
836
838
  }
@@ -863,7 +865,7 @@ var we = class {
863
865
  }
864
866
  let c = ++t.generation, l = this.options.createExecutionContext(n, t.dataSourceId), u = Date.now(), d = `${t.dataSourceId}:${t.requestKey}:${c}`;
865
867
  t.executionContext = l, t.startedAt = u, t.requestId = d;
866
- let { resolution: f, slotId: p } = o.request(t.requestKey, Se(r), t.dataSourceId, {
868
+ let { resolution: f, slotId: p } = o.request(t.requestKey, Ce(r), t.dataSourceId, {
867
869
  dataSourceId: t.dataSourceId,
868
870
  source: r,
869
871
  params: t.params
@@ -883,7 +885,7 @@ var we = class {
883
885
  return;
884
886
  }
885
887
  if (n.kind === "failure") {
886
- let e = n.diagnostics.diagnostics[0], r = e === void 0 ? K() : e;
888
+ let e = n.diagnostics.diagnostics[0], r = e === void 0 ? G() : e;
887
889
  this.#c(t, r, { emitStarted: !1 }), this.#u(t, "failed", {
888
890
  startedAt: u,
889
891
  code: a(r).code
@@ -908,7 +910,7 @@ var we = class {
908
910
  status: "ready",
909
911
  value: r.value
910
912
  }, t.rawValue = r.value, t.rawError = void 0;
911
- let i = G(r.value);
913
+ let i = W(r.value);
912
914
  this.#u(t, "succeeded", {
913
915
  startedAt: u,
914
916
  ...i
@@ -934,7 +936,7 @@ var we = class {
934
936
  #u(e, t, n, r) {
935
937
  let i = e.source;
936
938
  if (i === void 0) return;
937
- let a = De(i), o = e.executionContext ?? this.options.createExecutionContext({
939
+ let a = Oe(i), o = e.executionContext ?? this.options.createExecutionContext({
938
940
  trigger: "manual",
939
941
  traceId: ""
940
942
  }, e.dataSourceId);
@@ -961,7 +963,7 @@ var we = class {
961
963
  return e;
962
964
  }
963
965
  };
964
- function Te(e) {
966
+ function Ee(e) {
965
967
  let t = d(e), n = new Map(t.map((e) => [e.id, e])), r = [];
966
968
  for (let t of l(e)) {
967
969
  let e = n.get(t);
@@ -970,10 +972,10 @@ function Te(e) {
970
972
  for (let e of t) n.has(e.id) && r.push(e);
971
973
  return r;
972
974
  }
973
- function Ee(e, t, n) {
974
- return `ds:${e}:${C(t)}:${C(n)}`;
975
+ function De(e, t, n) {
976
+ return `ds:${e}:${S(t)}:${S(n)}`;
975
977
  }
976
- function De(e) {
978
+ function Oe(e) {
977
979
  switch (e.kind) {
978
980
  case "dataset": return {
979
981
  resourceType: "dataset",
@@ -989,7 +991,7 @@ function De(e) {
989
991
  };
990
992
  }
991
993
  }
992
- function G(e) {
994
+ function W(e) {
993
995
  if (e === void 0 || typeof e != "object" || !e || Array.isArray(e)) return {};
994
996
  let t = e.fields, n = e.rows;
995
997
  return {
@@ -997,7 +999,7 @@ function G(e) {
997
999
  ...Array.isArray(n) ? { rowCount: n.length } : {}
998
1000
  };
999
1001
  }
1000
- function K(e = "Host resource request failed.") {
1002
+ function G(e = "Host resource request failed.") {
1001
1003
  return {
1002
1004
  severity: "error",
1003
1005
  code: "HOST_RESOURCE_FAILED",
@@ -1005,7 +1007,7 @@ function K(e = "Host resource request failed.") {
1005
1007
  message: e
1006
1008
  };
1007
1009
  }
1008
- var Oe = class {
1010
+ var ke = class {
1009
1011
  resourcePort;
1010
1012
  isShareable;
1011
1013
  timeoutMs;
@@ -1096,16 +1098,16 @@ var Oe = class {
1096
1098
  e.timer !== void 0 && clearTimeout(e.timer), e.controller.abort(), this.#e.get(e.slotId) === e && this.#e.delete(e.slotId);
1097
1099
  }
1098
1100
  };
1099
- function ke(e) {
1100
- if (!Pe(e.resourceTimeoutMs ?? 15e3)) throw RangeError("resourceTimeoutMs must be an integer between 100 and 60000.");
1101
- let t = new Ce(e.resourcePort, e.datasetPort, e.hostCatalogPort), n, r = e.resourcePort !== void 0 || e.datasetPort !== void 0 || e.hostCatalogPort !== void 0 ? new Oe({ resolve: (e, n) => t.query(e, n) }, (t) => Ae(t, e), e.resourceTimeoutMs ?? 15e3) : void 0, i = new we({
1101
+ function Ae(e) {
1102
+ if (!Fe(e.resourceTimeoutMs ?? 15e3)) throw RangeError("resourceTimeoutMs must be an integer between 100 and 60000.");
1103
+ let t = new we(e.resourcePort, e.datasetPort, e.hostCatalogPort), n, r = e.resourcePort !== void 0 || e.datasetPort !== void 0 || e.hostCatalogPort !== void 0 ? new ke({ resolve: (e, n) => t.query(e, n) }, (t) => je(t, e), e.resourceTimeoutMs ?? 15e3) : void 0, i = new Te({
1102
1104
  sourcePort: t,
1103
1105
  coordinator: r,
1104
1106
  isSuspended: () => n.dataSuspended,
1105
- createExecutionContext: (e, t) => Ne(n, t, e),
1106
- emit: (e) => Me(n, e),
1107
+ createExecutionContext: (e, t) => Pe(n, t, e),
1108
+ emit: (e) => Ne(n, e),
1107
1109
  onChanged: (e) => n.onDataSourceChanged(e),
1108
- validateParams: (e, t) => je(n, e, t)
1110
+ validateParams: (e, t) => Me(n, e, t)
1109
1111
  });
1110
1112
  return n = {
1111
1113
  options: e,
@@ -1122,14 +1124,14 @@ function ke(e) {
1122
1124
  coordinator: r,
1123
1125
  sourceQueries: t,
1124
1126
  dataSources: i,
1125
- visibility: new _e(e.root),
1127
+ visibility: new ve(e.root),
1126
1128
  onDataSourceChanged: () => {}
1127
1129
  }, n;
1128
1130
  }
1129
- function Ae(e, t) {
1131
+ function je(e, t) {
1130
1132
  return e === "#source-dataset" ? t.datasetPort?.queryScope === "dataset" : e === "#source-resource";
1131
1133
  }
1132
- function je(e, t, n) {
1134
+ function Me(e, t, n) {
1133
1135
  if (t.kind !== "host-resource") return;
1134
1136
  let r = e.options.contributionIndex;
1135
1137
  if (r === void 0) return;
@@ -1140,14 +1142,14 @@ function je(e, t, n) {
1140
1142
  path: [],
1141
1143
  message: "Host resource type is not enabled by an active plugin contribution."
1142
1144
  };
1143
- if (!x(n, i.configSchema).ok) return {
1145
+ if (!_(n, i.configSchema).ok) return {
1144
1146
  severity: "error",
1145
1147
  code: "HOST_RESOURCE_FAILED",
1146
1148
  path: [],
1147
1149
  message: "Host resource request failed."
1148
1150
  };
1149
1151
  }
1150
- function Me(e, t) {
1152
+ function Ne(e, t) {
1151
1153
  let n = e.options.observer;
1152
1154
  if (n !== void 0) try {
1153
1155
  n({
@@ -1164,7 +1166,7 @@ function Me(e, t) {
1164
1166
  });
1165
1167
  } catch {}
1166
1168
  }
1167
- function Ne(e, t, n) {
1169
+ function Pe(e, t, n) {
1168
1170
  return {
1169
1171
  instanceId: e.options.instanceId ?? "renderer",
1170
1172
  mode: e.options.executionMode ?? "viewer",
@@ -1174,20 +1176,20 @@ function Ne(e, t, n) {
1174
1176
  ...e.options.documentRevision === void 0 ? {} : { documentRevision: e.options.documentRevision }
1175
1177
  };
1176
1178
  }
1177
- function Pe(e) {
1179
+ function Fe(e) {
1178
1180
  return Number.isInteger(e) && e >= 100 && e <= 6e4;
1179
1181
  }
1180
- function q(e) {
1181
- return new Fe(e);
1182
+ function K(e) {
1183
+ return new Ie(e);
1182
1184
  }
1183
- var Fe = class {
1185
+ var Ie = class {
1184
1186
  #e;
1185
1187
  #t = /* @__PURE__ */ new Map();
1186
1188
  constructor(e) {
1187
- this.#e = ke(e), this.#e.onDataSourceChanged = (e) => this.#n(e);
1189
+ this.#e = Ae(e), this.#e.onDataSourceChanged = (e) => this.#n(e);
1188
1190
  }
1189
1191
  render(e, t) {
1190
- if (this.#e.disposed) return E("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1192
+ if (this.#e.disposed) return T("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1191
1193
  let n = e === this.#e.lastValidatedInput && this.#e.document !== void 0 ? {
1192
1194
  ok: !0,
1193
1195
  value: this.#e.document,
@@ -1198,19 +1200,19 @@ var Fe = class {
1198
1200
  trigger: t?.trigger ?? "manual",
1199
1201
  traceId: t?.traceId ?? ""
1200
1202
  };
1201
- this.#e.dataSources.ensure(n.value, this.#e.variables, r), this.#t = J(n.value);
1202
- let i = j(n.value, this.#e.catalog, this.#e.options.mode, this.#e.interactive, this.#e.options.contributionIndex, this.#e.dataSources, this.#e.validationCache, this.#e.options.componentFailurePolicy ?? "fail");
1203
+ this.#e.dataSources.ensure(n.value, this.#e.variables, r), this.#t = q(n.value);
1204
+ let i = A(n.value, this.#e.catalog, this.#e.options.mode, this.#e.interactive, this.#e.options.contributionIndex, this.#e.dataSources, this.#e.validationCache, this.#e.options.componentFailurePolicy ?? "fail");
1203
1205
  if (!i.ok) return i;
1204
- let a = new Map(y(n.value).map((e, t) => [e, t]));
1206
+ let a = new Map(ne(n.value).map((e, t) => [e, t]));
1205
1207
  this.#e.visibility.prepare(n.value);
1206
1208
  let o = [...i.value].sort((e, t) => a.get(e.component.id) - a.get(t.component.id)), s = /* @__PURE__ */ new Map(), l = [];
1207
1209
  for (let e of o) {
1208
1210
  let t = a.get(e.component.id), n = this.#e.mounted.get(e.component.id);
1209
1211
  if (n !== void 0 && n.type === e.component.type) {
1210
1212
  try {
1211
- z(this.#e, e, n, t);
1213
+ R(this.#e, e, n, t);
1212
1214
  } catch {
1213
- l.push(D(e, "Material model update raised an exception."));
1215
+ l.push(E(e, "Material model update raised an exception."));
1214
1216
  }
1215
1217
  s.set(e.component.id, n);
1216
1218
  continue;
@@ -1220,16 +1222,16 @@ var Fe = class {
1220
1222
  try {
1221
1223
  r = new e.entry.constructor();
1222
1224
  } catch {
1223
- l.push(D(e, "Material constructor raised an exception."));
1225
+ l.push(E(e, "Material constructor raised an exception."));
1224
1226
  continue;
1225
1227
  }
1226
- let i = (t) => ge(this.#e, e, t);
1228
+ let i = (t) => _e(this.#e, e, t);
1227
1229
  r.addEventListener("base-screen-material-event", i);
1228
1230
  let o;
1229
1231
  try {
1230
- o = F(this.#e, e, e.model.dataState), I(r, e.component, o, this.#e.visibility.isHidden(e.component.id), t);
1232
+ o = P(this.#e, e, e.model.dataState), F(r, e.component, o, this.#e.visibility.isHidden(e.component.id), t);
1231
1233
  } catch {
1232
- l.push(D(e, "Material render raised an exception."));
1234
+ l.push(E(e, "Material render raised an exception."));
1233
1235
  continue;
1234
1236
  }
1235
1237
  this.#e.options.root.appendChild(r);
@@ -1237,15 +1239,15 @@ var Fe = class {
1237
1239
  type: e.component.type,
1238
1240
  element: r,
1239
1241
  onEvent: i,
1240
- projection: oe(),
1242
+ projection: se(),
1241
1243
  stackOrder: t,
1242
- applied: V(this.#e, e, t),
1244
+ applied: B(this.#e, e, t),
1243
1245
  appliedModel: o
1244
1246
  };
1245
1247
  c.projection.dataState = e.model.dataState, c.projection.projectionKey = e.dataSource?.projectionKey, s.set(e.component.id, c);
1246
1248
  }
1247
1249
  for (let [e, t] of this.#e.mounted) s.has(e) || (t.element.removeEventListener("base-screen-material-event", t.onEvent), t.element.remove());
1248
- if (this.#e.options.root.style.position = "relative", this.#e.options.root.style.width = `${n.value.canvas.width}px`, this.#e.options.root.style.height = `${n.value.canvas.height}px`, this.#e.options.mode !== "design" && this.#e.options.root.style.overflow !== "hidden" && (this.#e.options.root.style.overflow = "hidden"), re(this.#e.options.root, n.value.canvas), this.#e.mounted = s, this.#e.candidates = new Map(o.map((e) => [e.component.id, e])), this.#e.document = n.value, this.#e.lastValidatedInput = e, l.length > 0) for (let e of l) this.#e.options.onDiagnostic?.(e);
1250
+ if (this.#e.options.root.style.position = "relative", this.#e.options.root.style.width = `${n.value.canvas.width}px`, this.#e.options.root.style.height = `${n.value.canvas.height}px`, this.#e.options.mode !== "design" && this.#e.options.root.style.overflow !== "hidden" && (this.#e.options.root.style.overflow = "hidden"), ie(this.#e.options.root, n.value.canvas), this.#e.mounted = s, this.#e.candidates = new Map(o.map((e) => [e.component.id, e])), this.#e.document = n.value, this.#e.lastValidatedInput = e, l.length > 0) for (let e of l) this.#e.options.onDiagnostic?.(e);
1249
1251
  return {
1250
1252
  ok: !0,
1251
1253
  value: null,
@@ -1254,25 +1256,25 @@ var Fe = class {
1254
1256
  }
1255
1257
  setVariables(t) {
1256
1258
  let n = e(t, { maxBytes: 2097152 });
1257
- return !n.ok || n.value === null || Array.isArray(n.value) || typeof n.value != "object" ? E("HOST_DATASET_VARIABLE_INVALID", [], "Runtime variables are invalid.") : (this.#e.variables = n.value, this.#e.dataSuspended = !1, {
1259
+ return !n.ok || n.value === null || Array.isArray(n.value) || typeof n.value != "object" ? T("HOST_DATASET_VARIABLE_INVALID", [], "Runtime variables are invalid.") : (this.#e.variables = n.value, this.#e.dataSuspended = !1, {
1258
1260
  ok: !0,
1259
1261
  value: null,
1260
1262
  diagnostics: []
1261
1263
  });
1262
1264
  }
1263
1265
  setInteractive(e) {
1264
- return this.#e.disposed ? E("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.") : this.#e.interactive === e || (this.#e.interactive = e, this.#e.document === void 0) ? {
1266
+ return this.#e.disposed ? T("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.") : this.#e.interactive === e || (this.#e.interactive = e, this.#e.document === void 0) ? {
1265
1267
  ok: !0,
1266
1268
  value: null,
1267
1269
  diagnostics: []
1268
1270
  } : this.render(this.#e.document);
1269
1271
  }
1270
1272
  validateCatalog(e, t) {
1271
- if (this.#e.disposed) return E("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1273
+ if (this.#e.disposed) return T("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1272
1274
  let n = c(e, this.#e.lastValidatedInput);
1273
1275
  if (!n.ok) return n;
1274
1276
  try {
1275
- let e = j(n.value, t, this.#e.options.mode, this.#e.interactive, this.#e.options.contributionIndex, this.#e.dataSources, { entries: /* @__PURE__ */ new Map() }, "fail");
1277
+ let e = A(n.value, t, this.#e.options.mode, this.#e.interactive, this.#e.options.contributionIndex, this.#e.dataSources, { entries: /* @__PURE__ */ new Map() }, "fail");
1276
1278
  return e.ok ? {
1277
1279
  ok: !0,
1278
1280
  value: null,
@@ -1282,17 +1284,17 @@ var Fe = class {
1282
1284
  diagnostics: e.diagnostics
1283
1285
  };
1284
1286
  } catch {
1285
- return E("PLUGIN_CORE_RENDER_FAILED", [], "Catalog validation failed.");
1287
+ return T("PLUGIN_CORE_RENDER_FAILED", [], "Catalog validation failed.");
1286
1288
  }
1287
1289
  }
1288
1290
  setCatalog(e) {
1289
- if (this.#e.disposed) return E("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1291
+ if (this.#e.disposed) return T("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.");
1290
1292
  if (e === this.#e.catalog) return {
1291
1293
  ok: !0,
1292
1294
  value: null,
1293
1295
  diagnostics: []
1294
1296
  };
1295
- let t = ee(this.#e.catalog, e), n = new Set(t.implementationChanged), r = new Set(t.removed);
1297
+ let t = h(this.#e.catalog, e), n = new Set(t.implementationChanged), r = new Set(t.removed);
1296
1298
  for (let [e, t] of this.#e.mounted) !n.has(t.type) && !r.has(t.type) || (t.element.removeEventListener("base-screen-material-event", t.onEvent), t.element.remove(), this.#e.mounted.delete(e), this.#e.candidates.delete(e));
1297
1299
  let i = new Set(t.unchanged);
1298
1300
  for (let t of this.#e.mounted.values()) {
@@ -1310,7 +1312,7 @@ var Fe = class {
1310
1312
  };
1311
1313
  }
1312
1314
  applyBlueprintVisibilityEffects(e) {
1313
- return this.#e.disposed ? E("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.") : this.#e.visibility.apply(e, this.#e.document, this.#e.mounted);
1315
+ return this.#e.disposed ? T("PLUGIN_CORE_LIFECYCLE_INVALID", [], "Renderer has been disposed.") : this.#e.visibility.apply(e, this.#e.document, this.#e.mounted);
1314
1316
  }
1315
1317
  resetBlueprintVisibility() {
1316
1318
  this.#e.visibility.reset();
@@ -1349,9 +1351,9 @@ var Fe = class {
1349
1351
  for (let e of t) {
1350
1352
  let t = this.#e.candidates.get(e), n = this.#e.mounted.get(e);
1351
1353
  if (t !== void 0 && n !== void 0) try {
1352
- he(this.#e, t, n);
1354
+ ge(this.#e, t, n);
1353
1355
  } catch {
1354
- this.#e.options.onDiagnostic?.(T("PLUGIN_CORE_RENDER_FAILED", [
1356
+ this.#e.options.onDiagnostic?.(w("PLUGIN_CORE_RENDER_FAILED", [
1355
1357
  "components",
1356
1358
  e,
1357
1359
  "conditionalStyle"
@@ -1365,7 +1367,7 @@ var Fe = class {
1365
1367
  i.ok && (this.#e.dataSources.ensure(i.value, t, {
1366
1368
  trigger: n?.trigger ?? "manual",
1367
1369
  traceId: n?.traceId ?? ""
1368
- }, r === void 0 ? {} : { startOnly: r }), this.#t = J(i.value));
1370
+ }, r === void 0 ? {} : { startOnly: r }), this.#t = q(i.value));
1369
1371
  }
1370
1372
  refreshDataSource(e, t) {
1371
1373
  this.#e.dataSources.refresh(e, {
@@ -1403,7 +1405,7 @@ var Fe = class {
1403
1405
  for (let t of this.#t.get(e) ?? []) {
1404
1406
  let r = n.get(t), i = this.#e.candidates.get(t), a = this.#e.mounted.get(t);
1405
1407
  if (r === void 0 || i === void 0 || a === void 0) continue;
1406
- let o = M(this.#e.dataSources, r, i.entry, this.#e.options.contributionIndex, ["components", t], (e) => this.#e.options.onDiagnostic?.(e));
1408
+ let o = j(this.#e.dataSources, r, i.entry, this.#e.options.contributionIndex, ["components", t], (e) => this.#e.options.onDiagnostic?.(e));
1407
1409
  if ("diagnostic" in o) continue;
1408
1410
  let s = {
1409
1411
  ...i,
@@ -1414,11 +1416,11 @@ var Fe = class {
1414
1416
  dataSource: o.dataSource,
1415
1417
  dataEpoch: o.epoch
1416
1418
  };
1417
- this.#e.candidates.set(t, s), o.dataState.status === "ready" && this.#e.dataSources.reportProjection(e, t, o.dataState.value), a.projection.dataState = o.dataState, a.projection.projectionKey = o.dataSource?.projectionKey, B(this.#e, s, a, a.stackOrder);
1419
+ this.#e.candidates.set(t, s), o.dataState.status === "ready" && this.#e.dataSources.reportProjection(e, t, o.dataState.value), a.projection.dataState = o.dataState, a.projection.projectionKey = o.dataSource?.projectionKey, z(this.#e, s, a, a.stackOrder);
1418
1420
  }
1419
1421
  }
1420
1422
  };
1421
- function J(e) {
1423
+ function q(e) {
1422
1424
  let t = /* @__PURE__ */ new Map();
1423
1425
  for (let n of e.components) {
1424
1426
  let e = p(n);
@@ -1428,9 +1430,9 @@ function J(e) {
1428
1430
  }
1429
1431
  return t;
1430
1432
  }
1431
- function Ie(e, t, n, r) {
1433
+ function Le(e, t, n, r) {
1432
1434
  let i = [];
1433
- if (C(n) !== C(r.variables)) {
1435
+ if (S(n) !== S(r.variables)) {
1434
1436
  let n = e.setVariables(r.variables);
1435
1437
  if (n.ok) {
1436
1438
  let n = e.render(t, { trigger: "variable" });
@@ -1443,13 +1445,13 @@ function Ie(e, t, n, r) {
1443
1445
  }
1444
1446
  return i;
1445
1447
  }
1446
- function Y(e) {
1448
+ function J(e) {
1447
1449
  return typeof e == "object" && !!e && typeof e.get == "function" && typeof e.has == "function" && typeof e.list == "function";
1448
1450
  }
1449
- function Le(e) {
1451
+ function Re(e) {
1450
1452
  return typeof e == "object" && !!e && typeof e.resolve == "function";
1451
1453
  }
1452
- function Re(e) {
1454
+ function ze(e) {
1453
1455
  if (typeof e != "object" || !e) return !1;
1454
1456
  let t = e;
1455
1457
  return [
@@ -1458,19 +1460,19 @@ function Re(e) {
1458
1460
  "resolve"
1459
1461
  ].every((e) => typeof t[e] == "function");
1460
1462
  }
1461
- function ze(e) {
1463
+ function Be(e) {
1462
1464
  return typeof e == "object" && !!e && typeof e.getResourceType == "function" && typeof e.hasBlueprintCapability == "function";
1463
1465
  }
1464
- function Be(e) {
1466
+ function Ve(e) {
1465
1467
  return typeof e == "object" && !!e && typeof e.emit == "function";
1466
1468
  }
1467
- function Ve(e) {
1469
+ function He(e) {
1468
1470
  return typeof e == "object" && !!e && typeof e.resolve == "function";
1469
1471
  }
1470
- function He(e) {
1472
+ function Ue(e) {
1471
1473
  return typeof e == "object" && !!e && typeof e.execute == "function";
1472
1474
  }
1473
- function X(e) {
1475
+ function Y(e) {
1474
1476
  return {
1475
1477
  ok: !1,
1476
1478
  diagnostics: [{
@@ -1481,11 +1483,11 @@ function X(e) {
1481
1483
  }]
1482
1484
  };
1483
1485
  }
1484
- function Ue(e) {
1485
- if (!Y(e.catalog)) return X("Viewer catalog 必须是合法的物料目录。");
1486
- if (e.datasetPort !== void 0 && !o(e.datasetPort)) return X("Viewer dataset port must provide list, describe and query.");
1486
+ function We(e) {
1487
+ if (!J(e.catalog)) return Y("Viewer catalog 必须是合法的物料目录。");
1488
+ if (e.datasetPort !== void 0 && !o(e.datasetPort)) return Y("Viewer dataset port must provide list, describe and query.");
1487
1489
  let t = e.resourceTimeoutMs ?? 15e3;
1488
- return !Number.isInteger(t) || t < 100 || t > 6e4 ? X("resourceTimeoutMs 必须是 100..60000 的整数。") : e.resourcePort !== void 0 && !Le(e.resourcePort) ? X("Viewer resource port 必须是含 resolve 的对象。") : e.hostCatalogPort !== void 0 && !Re(e.hostCatalogPort) ? X("Viewer host catalog port 必须同时提供 list、describe 与 resolve。") : e.conditionalStylePort !== void 0 && !Ve(e.conditionalStylePort) ? X("Viewer conditional style port 必须是含 resolve 的对象。") : e.runtimeContributions !== void 0 && !ze(e.runtimeContributions) ? X("Viewer runtime contributions 必须是含 getResourceType 的对象。") : e.blueprintRuntimePort !== void 0 && !Be(e.blueprintRuntimePort) ? X("Viewer blueprint runtime port 必须是含 emit 的对象。") : e.blueprintHostActionPort !== void 0 && !He(e.blueprintHostActionPort) ? X("Viewer blueprint host action port 必须是含 execute 的对象。") : {
1490
+ return !Number.isInteger(t) || t < 100 || t > 6e4 ? Y("resourceTimeoutMs 必须是 100..60000 的整数。") : e.resourcePort !== void 0 && !Re(e.resourcePort) ? Y("Viewer resource port 必须是含 resolve 的对象。") : e.hostCatalogPort !== void 0 && !ze(e.hostCatalogPort) ? Y("Viewer host catalog port 必须同时提供 list、describe 与 resolve。") : e.conditionalStylePort !== void 0 && !He(e.conditionalStylePort) ? Y("Viewer conditional style port 必须是含 resolve 的对象。") : e.runtimeContributions !== void 0 && !Be(e.runtimeContributions) ? Y("Viewer runtime contributions 必须是含 getResourceType 的对象。") : e.blueprintRuntimePort !== void 0 && !Ve(e.blueprintRuntimePort) ? Y("Viewer blueprint runtime port 必须是含 emit 的对象。") : e.blueprintHostActionPort !== void 0 && !Ue(e.blueprintHostActionPort) ? Y("Viewer blueprint host action port 必须是含 execute 的对象。") : {
1489
1491
  ok: !0,
1490
1492
  value: {
1491
1493
  ...e,
@@ -1494,7 +1496,7 @@ function Ue(e) {
1494
1496
  diagnostics: []
1495
1497
  };
1496
1498
  }
1497
- var Z = class {
1499
+ var X = class {
1498
1500
  host;
1499
1501
  #e = /* @__PURE__ */ new Map();
1500
1502
  #t = !1;
@@ -1504,7 +1506,7 @@ var Z = class {
1504
1506
  sync(e) {
1505
1507
  let t = /* @__PURE__ */ new Map();
1506
1508
  for (let n of e === void 0 ? [] : d(e)) {
1507
- let e = We(n);
1509
+ let e = Ge(n);
1508
1510
  e !== void 0 && t.set(n.id, e);
1509
1511
  }
1510
1512
  for (let [e, n] of this.#e) t.get(e) !== n.intervalSeconds && (clearTimeout(n.timer), this.#e.delete(e));
@@ -1534,10 +1536,43 @@ var Z = class {
1534
1536
  });
1535
1537
  }
1536
1538
  };
1537
- function We(e) {
1539
+ function Ge(e) {
1538
1540
  return e.updatePolicy?.mode === "auto" ? e.updatePolicy.intervalSeconds : void 0;
1539
1541
  }
1540
- var Ge = class {
1542
+ var Z = "data-viewer-skeleton", Ke = `
1543
+ [${Z}] {
1544
+ display: block;
1545
+ box-sizing: border-box;
1546
+ width: 100%;
1547
+ height: 100%;
1548
+ background: rgba(127, 127, 127, 0.12);
1549
+ background: color-mix(in srgb, currentColor 10%, transparent);
1550
+ animation: base-screen-viewer-skeleton-pulse 1.4s ease-in-out infinite;
1551
+ }
1552
+ @keyframes base-screen-viewer-skeleton-pulse {
1553
+ 0%,
1554
+ 100% {
1555
+ opacity: 0.6;
1556
+ }
1557
+ 50% {
1558
+ opacity: 1;
1559
+ }
1560
+ }
1561
+ @media (prefers-reduced-motion: reduce) {
1562
+ [${Z}] {
1563
+ animation: none;
1564
+ }
1565
+ }
1566
+ `;
1567
+ function qe(e) {
1568
+ let t = e.createElement("style");
1569
+ return t.setAttribute("data-viewer-skeleton-style", "true"), t.textContent = Ke, t;
1570
+ }
1571
+ function Je(e) {
1572
+ let t = e.createElement("div");
1573
+ return t.setAttribute(Z, "true"), t.setAttribute("aria-hidden", "true"), t;
1574
+ }
1575
+ var Ye = class {
1541
1576
  #e;
1542
1577
  #t = /* @__PURE__ */ new Map();
1543
1578
  #n = 0;
@@ -1569,7 +1604,7 @@ var Ge = class {
1569
1604
  let r = e.variableIds === void 0 ? void 0 : new Set(e.variableIds), i = /* @__PURE__ */ new Set();
1570
1605
  for (let e of t.variables) {
1571
1606
  let t = u(e);
1572
- if (!(r !== void 0 && !r.has(t.id))) for (let e of v(t.value).dataSourceIds) i.add(e);
1607
+ if (!(r !== void 0 && !r.has(t.id))) for (let e of x(t.value).dataSourceIds) i.add(e);
1573
1608
  }
1574
1609
  for (let t of i) n.refreshDataSource(t, {
1575
1610
  trigger: "variable",
@@ -1615,7 +1650,7 @@ var Ge = class {
1615
1650
  let t = this.#e.readBlueprintVariables() ?? o.initialVariables, s = /* @__PURE__ */ new Set();
1616
1651
  for (let e of a.variables) {
1617
1652
  let t = u(e);
1618
- for (let e of v(t.value).dataSourceIds) s.add(e);
1653
+ for (let e of x(t.value).dataSourceIds) s.add(e);
1619
1654
  }
1620
1655
  if (i.prepareDataSources(a, t, {
1621
1656
  trigger: n,
@@ -1662,7 +1697,7 @@ var Ge = class {
1662
1697
  }
1663
1698
  s.diagnostics.length > 0 && this.#e.emitDiagnostics(s.diagnostics), this.#e.writeBlueprintVariables(c), a || (this.#c = !0), a && o.refreshData(t, n === "polling" ? "polling" : "manual", r);
1664
1699
  } finally {
1665
- this.#r = !1;
1700
+ this.#r = !1, this.#e.onRenderSettled?.();
1666
1701
  }
1667
1702
  this.#i && (this.#i = !1, this.#f("variable"));
1668
1703
  }
@@ -1671,7 +1706,7 @@ var Ge = class {
1671
1706
  let t = this.#e.readRenderer(), n = this.#e.readDocument(), r = this.#e.readBlueprintPlan();
1672
1707
  if (t === void 0 || n === void 0 || r === void 0) return;
1673
1708
  let i = this.#p(n, r, t), a = this.#e.readBlueprintVariables();
1674
- if (a !== void 0 && C(a) === C(i)) return;
1709
+ if (a !== void 0 && S(a) === S(i)) return;
1675
1710
  let o = ++this.#n;
1676
1711
  this.#r = !0;
1677
1712
  try {
@@ -1729,7 +1764,7 @@ function Q(e) {
1729
1764
  }]
1730
1765
  };
1731
1766
  }
1732
- function Ke(e, t, n) {
1767
+ function Xe(e, t, n) {
1733
1768
  if (e === void 0) return n;
1734
1769
  let r;
1735
1770
  for (let i of e.variables) {
@@ -1738,7 +1773,7 @@ function Ke(e, t, n) {
1738
1773
  }
1739
1774
  return r ?? n;
1740
1775
  }
1741
- var qe = class {
1776
+ var Ze = class {
1742
1777
  host;
1743
1778
  #e = /* @__PURE__ */ new Map();
1744
1779
  constructor(e) {
@@ -1786,7 +1821,7 @@ var qe = class {
1786
1821
  function $(e, t) {
1787
1822
  return JSON.stringify(e) === JSON.stringify(t);
1788
1823
  }
1789
- var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1824
+ var Qe = globalThis.HTMLElement ?? class {}, $e = class extends Qe {
1790
1825
  #e;
1791
1826
  #t;
1792
1827
  #n;
@@ -1806,13 +1841,16 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1806
1841
  #g;
1807
1842
  #_;
1808
1843
  #v;
1809
- #y = new qe({
1844
+ #y = !1;
1845
+ #b;
1846
+ #x;
1847
+ #S = new Ze({
1810
1848
  readDocument: () => this.#c,
1811
1849
  readVariables: () => this.#u,
1812
1850
  setValue: (e, t) => this.setVariableValue(e, t),
1813
1851
  reportListenerFailure: () => this.emitLifecycleDiagnostic("Variable change listener failed.")
1814
1852
  });
1815
- #b = new Ge({
1853
+ #C = new Ye({
1816
1854
  readRenderer: () => this.#h,
1817
1855
  readDocument: () => this.#c,
1818
1856
  readBlueprintPlan: () => this.#l,
@@ -1820,18 +1858,19 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1820
1858
  writeBlueprintVariables: (e) => {
1821
1859
  this.writeBlueprintVariables(e, !0);
1822
1860
  },
1823
- emitDiagnostics: (e) => this.emitDiagnostics(e)
1861
+ emitDiagnostics: (e) => this.emitDiagnostics(e),
1862
+ onRenderSettled: () => this.markRendered()
1824
1863
  });
1825
- #x = new Z({
1864
+ #w = new X({
1826
1865
  readRenderer: () => this.#h,
1827
1866
  readDocument: () => this.#c
1828
1867
  });
1829
1868
  configure(e) {
1830
- if (this.#h !== void 0) return X("Viewer 已初始化,请先 unload 再重新配置。");
1831
- let t = Ue(e);
1869
+ if (this.#h !== void 0) return Y("Viewer 已初始化,请先 unload 再重新配置。");
1870
+ let t = We(e);
1832
1871
  if (!t.ok) return t;
1833
1872
  let n = t.value;
1834
- return this.#e = n.catalog, this.#t = n.resourcePort, this.#n = n.datasetPort, this.#r = n.hostCatalogPort, this.#i = n.conditionalStylePort, this.#a = n.runtimeContributions, this.#o = n.blueprintRuntimePort, this.#s = n.blueprintHostActionPort, this.#d = n.resourceTimeoutMs, this.#f = n.instanceId ?? "viewer", this.#p = n.mode ?? "viewer", this.#m = n.observer, this.#_ = n.projectId, this.#v = n.documentRevision, this.initialize(), this.#b.start(void 0, !1, !0), this.#x.sync(this.#c), {
1873
+ return this.#e = n.catalog, this.#t = n.resourcePort, this.#n = n.datasetPort, this.#r = n.hostCatalogPort, this.#i = n.conditionalStylePort, this.#a = n.runtimeContributions, this.#o = n.blueprintRuntimePort, this.#s = n.blueprintHostActionPort, this.#d = n.resourceTimeoutMs, this.#f = n.instanceId ?? "viewer", this.#p = n.mode ?? "viewer", this.#m = n.observer, this.#b = n.projectId, this.#x = n.documentRevision, this.initialize(), this.#C.start(void 0, !1, !0), this.#w.sync(this.#c), {
1835
1874
  ok: !0,
1836
1875
  value: null,
1837
1876
  diagnostics: []
@@ -1849,7 +1888,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1849
1888
  }
1850
1889
  refreshCatalog(e) {
1851
1890
  let t = this.#e;
1852
- if (t === void 0 || !Y(e)) return X("Viewer must have a configured catalog before refreshing a valid catalog.");
1891
+ if (t === void 0 || !J(e)) return Y("Viewer must have a configured catalog before refreshing a valid catalog.");
1853
1892
  if (t === e) return {
1854
1893
  ok: !0,
1855
1894
  value: null,
@@ -1860,12 +1899,12 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1860
1899
  ok: !0,
1861
1900
  value: null,
1862
1901
  diagnostics: []
1863
- }) : X("Catalog refresh requires an initialized renderer while a document is loaded.");
1902
+ }) : Y("Catalog refresh requires an initialized renderer while a document is loaded.");
1864
1903
  if (r !== void 0) {
1865
1904
  let t = n.validateCatalog(r, e);
1866
1905
  if (!t.ok) return t;
1867
1906
  }
1868
- let i = this.#b.hasDeferredDocument;
1907
+ let i = this.#C.hasDeferredDocument;
1869
1908
  try {
1870
1909
  let a = n.setCatalog(e);
1871
1910
  if (!a.ok) return a;
@@ -1881,7 +1920,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1881
1920
  diagnostics: [...o.diagnostics, ...c.diagnostics]
1882
1921
  };
1883
1922
  } catch {
1884
- let e = X("Viewer catalog refresh failed.");
1923
+ let e = Y("Viewer catalog refresh failed.");
1885
1924
  try {
1886
1925
  let a = n.setCatalog(t), o = a.ok && r !== void 0 && !i ? n.render(r) : a;
1887
1926
  return {
@@ -1891,7 +1930,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1891
1930
  } catch {
1892
1931
  return {
1893
1932
  ok: !1,
1894
- diagnostics: [...e.diagnostics, ...X("Viewer catalog rollback failed.").diagnostics]
1933
+ diagnostics: [...e.diagnostics, ...Y("Viewer catalog rollback failed.").diagnostics]
1895
1934
  };
1896
1935
  }
1897
1936
  }
@@ -1966,33 +2005,33 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
1966
2005
  return this.#c;
1967
2006
  }
1968
2007
  set document(e) {
1969
- this.#b.cancel(), this.#x.suspend(), this.#h?.resetBlueprintVisibility(), this.#c = e, this.compileBlueprint(), this.initialize(), this.#b.start(void 0, !1, !0), this.#x.resume();
2008
+ this.#C.cancel(), this.#w.suspend(), this.#h?.resetBlueprintVisibility(), this.#c = e, this.compileBlueprint(), e !== void 0 && this.ensureSkeleton(), this.initialize(), this.#C.start(void 0, !1, !0), this.#w.resume(), e === void 0 ? this.clearSkeleton() : this.#l === void 0 && this.markRendered();
1970
2009
  }
1971
2010
  connectedCallback() {
1972
- this.initialize(), this.#b.start(void 0, !1, !0), this.#x.resume();
2011
+ this.ensureSkeleton(), this.initialize(), this.#C.start(void 0, !1, !0), this.#w.resume();
1973
2012
  }
1974
2013
  disconnectedCallback() {
1975
- this.#x.suspend(), this.#b.cancel(), this.#h?.clear();
2014
+ this.#w.suspend(), this.#C.cancel(), this.#h?.clear();
1976
2015
  }
1977
2016
  unload() {
1978
- this.#x.dispose(), this.#b.reset(), this.#y.clear(), this.disposeRenderer(), this.#c = void 0, this.compileBlueprint();
2017
+ this.#w.dispose(), this.#C.reset(), this.#S.clear(), this.disposeRenderer(), this.#c = void 0, this.compileBlueprint(), this.#y = !1;
1979
2018
  }
1980
2019
  refreshData(e) {
1981
- this.#b.refreshData(e);
2020
+ this.#C.refreshData(e);
1982
2021
  }
1983
2022
  refreshVariables(e) {
1984
- this.#b.refreshVariables(e);
2023
+ this.#C.refreshVariables(e);
1985
2024
  }
1986
2025
  refreshConditionalStyles(e) {
1987
2026
  this.#h?.refreshConditionalStyles(e);
1988
2027
  }
1989
2028
  getVariable(e) {
1990
- return this.#y.get(e);
2029
+ return this.#S.get(e);
1991
2030
  }
1992
2031
  initialize() {
1993
2032
  if (!this.isConnected || this.#e === void 0 || this.#h !== void 0) return;
1994
2033
  let e = this.shadowRoot ?? this.attachShadow({ mode: "open" });
1995
- this.#g = this.ownerDocument.createElement("div"), e.appendChild(this.#g), this.#h = q({
2034
+ this.#g = this.ownerDocument.createElement("div"), e.appendChild(this.#g), this.#h = K({
1996
2035
  root: this.#g,
1997
2036
  catalog: this.#e,
1998
2037
  mode: "viewer",
@@ -2008,26 +2047,37 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2008
2047
  resourcePort: this.#t,
2009
2048
  ...this.#n === void 0 ? {} : { datasetPort: this.#n },
2010
2049
  ...this.#r === void 0 ? {} : { hostCatalogPort: this.#r },
2011
- onDataSourceSettled: (e) => this.#b.handleDataSourceSettled(e),
2050
+ onDataSourceSettled: (e) => this.#C.handleDataSourceSettled(e),
2012
2051
  ...this.#i === void 0 ? {} : { conditionalStylePort: this.#i },
2013
2052
  resourceTimeoutMs: this.#d,
2014
2053
  ...this.#a === void 0 ? {} : { contributionIndex: this.#a },
2015
2054
  ...this.#m === void 0 ? {} : { observer: this.#m },
2016
2055
  ...this.#f === void 0 ? {} : { instanceId: this.#f },
2017
2056
  ...this.#p === void 0 ? {} : { executionMode: this.#p },
2018
- ...this.#_ === void 0 ? {} : { projectId: this.#_ },
2019
- ...this.#v === void 0 ? {} : { documentRevision: this.#v }
2057
+ ...this.#b === void 0 ? {} : { projectId: this.#b },
2058
+ ...this.#x === void 0 ? {} : { documentRevision: this.#x }
2020
2059
  });
2021
2060
  }
2061
+ ensureSkeleton() {
2062
+ if (this.#y || this.#_ !== void 0) return;
2063
+ let e = this.shadowRoot ?? this.attachShadow({ mode: "open" });
2064
+ this.#v === void 0 && (this.#v = qe(this.ownerDocument), e.appendChild(this.#v)), this.#_ = Je(this.ownerDocument), e.appendChild(this.#_), this.setAttribute("data-viewer-state", "loading"), this.setAttribute("aria-busy", "true");
2065
+ }
2066
+ markRendered() {
2067
+ this.#y = !0, this.clearSkeleton(), this.isConnected && (this.setAttribute("data-viewer-state", "ready"), this.removeAttribute("aria-busy"));
2068
+ }
2069
+ clearSkeleton() {
2070
+ this.#_?.remove(), this.#_ = void 0, this.#v?.remove(), this.#v = void 0;
2071
+ }
2022
2072
  disposeRenderer() {
2023
- this.#h?.dispose(), this.#h = void 0, this.#g?.remove(), this.#g = void 0;
2073
+ this.#h?.dispose(), this.#h = void 0, this.#g?.remove(), this.#g = void 0, this.clearSkeleton();
2024
2074
  }
2025
2075
  compileBlueprint() {
2026
2076
  if (this.#c === void 0) {
2027
2077
  this.#l = void 0, this.#u = void 0;
2028
2078
  return;
2029
2079
  }
2030
- let e = b(this.#c, this.#a ?? { hasBlueprintCapability: () => !1 });
2080
+ let e = y(this.#c, this.#a ?? { hasBlueprintCapability: () => !1 });
2031
2081
  if (!e.ok) {
2032
2082
  this.#l = void 0, this.#u = void 0, this.dispatchEvent(new CustomEvent("base-screen-diagnostic", { detail: { diagnostics: e.diagnostics } }));
2033
2083
  return;
@@ -2048,17 +2098,17 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2048
2098
  this.emitLifecycleDiagnostic("Blueprint variable event cycle exceeded its limit.");
2049
2099
  return;
2050
2100
  }
2051
- let n = this.#u, r = h(this.#l, n, e);
2101
+ let n = this.#u, r = te(this.#l, n, e);
2052
2102
  if (!r.ok) {
2053
2103
  this.emitLifecycleDiagnostic("Blueprint event payload is invalid.");
2054
2104
  return;
2055
2105
  }
2056
2106
  let i = this.#h, a = this.#c, o = {
2057
2107
  ...r.value,
2058
- variables: Ke(a, n, r.value.variables)
2108
+ variables: Xe(a, n, r.value.variables)
2059
2109
  }, s = this.writeBlueprintVariables(o.variables, !1);
2060
2110
  if (i !== void 0 && a !== void 0) {
2061
- let e = Ie(i, a, n, o);
2111
+ let e = Le(i, a, n, o);
2062
2112
  e.length > 0 && this.emitDiagnostics(e);
2063
2113
  }
2064
2114
  for (let e of r.value.hostEvents) this.#o === void 0 ? this.dispatchEvent(new CustomEvent("base-screen-blueprint-event", { detail: e })) : Promise.resolve(this.#o.emit(e)).catch(() => {
@@ -2068,7 +2118,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2068
2118
  this.emitLifecycleDiagnostic("Blueprint host action failed.");
2069
2119
  });
2070
2120
  for (let e of r.value.componentDataRequests) i?.refreshData(e);
2071
- r.value.variableRequests.length > 0 && this.#b.refreshVariables({ variableIds: [...new Set(r.value.variableRequests)] });
2121
+ r.value.variableRequests.length > 0 && this.#C.refreshVariables({ variableIds: [...new Set(r.value.variableRequests)] });
2072
2122
  for (let e of s) this.handleBlueprintEvent({
2073
2123
  type: "variable-event",
2074
2124
  variableId: e,
@@ -2080,7 +2130,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2080
2130
  let r = e(n);
2081
2131
  if (!r.ok) return r;
2082
2132
  let i = this.#h, a = this.#c, o = this.#u, s = a?.variables.find((e) => e.id === t);
2083
- if (i === void 0 || a === void 0 || o === void 0 || s === void 0) return X("Viewer variable is unavailable.");
2133
+ if (i === void 0 || a === void 0 || o === void 0 || s === void 0) return Y("Viewer variable is unavailable.");
2084
2134
  let c = Q(s);
2085
2135
  if (c !== void 0) return c;
2086
2136
  if ($(o[t], r.value)) return {
@@ -2108,7 +2158,7 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2108
2158
  writeBlueprintVariables(e, t = !1) {
2109
2159
  let n = this.#u;
2110
2160
  if (this.#u = e, n === void 0) return [];
2111
- let r = this.#y.notify(n, e);
2161
+ let r = this.#S.notify(n, e);
2112
2162
  if (t) for (let t of r) this.handleBlueprintEvent({
2113
2163
  type: "variable-event",
2114
2164
  variableId: t,
@@ -2130,6 +2180,6 @@ var Je = globalThis.HTMLElement ?? class {}, Ye = class extends Je {
2130
2180
  }
2131
2181
  };
2132
2182
  //#endregion
2133
- export { q as n, Ye as t };
2183
+ export { K as n, $e as t };
2134
2184
 
2135
- //# sourceMappingURL=dist-CAdGDmU3.js.map
2185
+ //# sourceMappingURL=dist-DfAV2jGI.js.map