@ifc-lite/viewer 1.26.0 → 1.28.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 (150) hide show
  1. package/.turbo/turbo-build.log +45 -38
  2. package/CHANGELOG.md +93 -0
  3. package/dist/assets/{basketViewActivator-ZpTYWE3K.js → basketViewActivator-BNRDNuUJ.js} +9 -9
  4. package/dist/assets/{bcf-Ctcu_Sc2.js → bcf-DCwCuP7n.js} +56 -56
  5. package/dist/assets/{browser-DXS29_v9.js → browser-BIoDDfBW.js} +1 -1
  6. package/dist/assets/{cesium-BoVuJvTC.js → cesium-CzZn5yVA.js} +319 -319
  7. package/dist/assets/{decode-worker-CgM1iNSK.js → decode-worker-Cjign7Zh.js} +1 -1
  8. package/dist/assets/deflate-DNGgs8Ur.js +1 -0
  9. package/dist/assets/drawing-2d-D0dDf6Lh.js +257 -0
  10. package/dist/assets/e57-source-2wI9jkCA.js +1 -0
  11. package/dist/assets/exceljs.min-DsuzKYnj.js +29 -0
  12. package/dist/assets/{exporters-DSq76AVM.js → exporters-B9v81gi9.js} +1861 -1524
  13. package/dist/assets/geometry.worker-Bpa3115V.js +1 -0
  14. package/dist/assets/{geotiff-A5UjhI6L.js → geotiff-D-YCLS4g.js} +10 -10
  15. package/dist/assets/html2canvas.esm-Ge7aVWlp.js +5 -0
  16. package/dist/assets/{ids-DiLcGTer.js → ids-CCpq-5d3.js} +952 -945
  17. package/dist/assets/ifc-lite_bg-DbgS5EUA.wasm +0 -0
  18. package/dist/assets/{index-BAH8IJVR.js → index-Bgb3_Pu_.js} +47682 -42474
  19. package/dist/assets/index-BtbXFKsX.css +1 -0
  20. package/dist/assets/index.es-CWfqZyyr.js +6866 -0
  21. package/dist/assets/{jpeg-BzSkwo5D.js → jpeg-DGOAeUqU.js} +1 -1
  22. package/dist/assets/jspdf.es.min-XPLU2Wkq.js +19571 -0
  23. package/dist/assets/jspdf.plugin.autotable-BBLUVd7n.js +2 -0
  24. package/dist/assets/lens-C4p1kQ0p.js +1 -0
  25. package/dist/assets/{lerc-Cg2Rz-D5.js → lerc-1PMSCHwX.js} +1 -1
  26. package/dist/assets/{lzw-BBPPLW-0.js → lzw-C65U9lNM.js} +1 -1
  27. package/dist/assets/{maplibre-gl-Do6O5tDc.js → maplibre-gl-BF3Z0idw.js} +1 -1
  28. package/dist/assets/{native-bridge-CPojOeGE.js → native-bridge-XxXos6yI.js} +2 -2
  29. package/dist/assets/{packbits-yLSpjW-V.js → packbits-BdMWXC3m.js} +1 -1
  30. package/dist/assets/{pako.esm-Cram60i4.js → pako.esm-n3Pgozwg.js} +1 -1
  31. package/dist/assets/parser.worker-Ddwo3_06.js +182 -0
  32. package/dist/assets/pdf-CRwaZf3s.js +135 -0
  33. package/dist/assets/raw-CJgQdyuZ.js +1 -0
  34. package/dist/assets/{sandbox-CsRXlgCO.js → sandbox-0sDo3g3m.js} +3037 -2554
  35. package/dist/assets/server-client-cTCJ-853.js +719 -0
  36. package/dist/assets/{webimage-YafxjjGr.js → webimage-BtakWX7W.js} +1 -1
  37. package/dist/assets/xlsx-B1YOg2QB.js +142 -0
  38. package/dist/assets/{zip-BJqVbRkU.js → zip-DFgP-l20.js} +1 -1
  39. package/dist/assets/{zstd-CkSLOiuu.js → zstd-CmwsbxmM.js} +1 -1
  40. package/dist/index.html +10 -10
  41. package/package.json +27 -23
  42. package/src/components/mcp/PlaygroundChat.tsx +1 -0
  43. package/src/components/mcp/data.ts +6 -0
  44. package/src/components/mcp/playground-dispatcher.ts +280 -0
  45. package/src/components/mcp/playground-files.ts +33 -1
  46. package/src/components/mcp/types.ts +2 -1
  47. package/src/components/ui/combo-input.tsx +163 -0
  48. package/src/components/ui/tabs.tsx +1 -1
  49. package/src/components/viewer/CommandPalette.tsx +6 -1
  50. package/src/components/viewer/ComparePanel.tsx +420 -0
  51. package/src/components/viewer/HierarchyPanel.tsx +46 -7
  52. package/src/components/viewer/MainToolbar.tsx +19 -2
  53. package/src/components/viewer/PropertiesPanel.tsx +84 -8
  54. package/src/components/viewer/SearchInline.tsx +62 -2
  55. package/src/components/viewer/SearchModal.filter.builder.tsx +24 -393
  56. package/src/components/viewer/SearchModal.filter.editors.tsx +503 -0
  57. package/src/components/viewer/SearchModal.filter.tsx +64 -1
  58. package/src/components/viewer/SearchModal.tsx +19 -6
  59. package/src/components/viewer/ViewerLayout.tsx +5 -0
  60. package/src/components/viewer/Viewport.tsx +18 -0
  61. package/src/components/viewer/hierarchy/HierarchyNode.tsx +3 -3
  62. package/src/components/viewer/hierarchy/ifc-icons.ts +9 -0
  63. package/src/components/viewer/hierarchy/treeDataBuilder.ts +87 -0
  64. package/src/components/viewer/hierarchy/types.ts +1 -0
  65. package/src/components/viewer/hierarchy/useHierarchyTree.ts +6 -2
  66. package/src/components/viewer/lists/ColumnHeaderMenu.tsx +84 -0
  67. package/src/components/viewer/lists/ListBuilder.tsx +789 -280
  68. package/src/components/viewer/lists/ListGroupingBar.tsx +72 -0
  69. package/src/components/viewer/lists/ListPanel.tsx +49 -5
  70. package/src/components/viewer/lists/ListResultsTable.tsx +270 -176
  71. package/src/components/viewer/lists/list-table-utils.ts +123 -0
  72. package/src/components/viewer/properties/MaterialTotalsPanel.tsx +283 -0
  73. package/src/generated/mcp-catalog.json +4 -0
  74. package/src/hooks/federationLoadGate.test.ts +12 -2
  75. package/src/hooks/federationLoadGate.ts +9 -2
  76. package/src/hooks/ingest/federationAlign.ts +481 -0
  77. package/src/hooks/ingest/viewerModelIngest.ts +3 -212
  78. package/src/hooks/source-key.ts +35 -0
  79. package/src/hooks/useAlignmentLines3D.ts +1 -26
  80. package/src/hooks/useCompare.ts +0 -0
  81. package/src/hooks/useCompareOverlay.ts +119 -0
  82. package/src/hooks/useDrawingGeneration.ts +23 -1
  83. package/src/hooks/useGridLines3D.ts +140 -0
  84. package/src/hooks/useIfc.ts +1 -1
  85. package/src/hooks/useIfcCache.ts +32 -9
  86. package/src/hooks/useIfcFederation.ts +42 -810
  87. package/src/hooks/useIfcLoader.ts +361 -488
  88. package/src/hooks/useIfcServer.ts +3 -0
  89. package/src/hooks/useLens.ts +5 -1
  90. package/src/hooks/useSymbolicAnnotations.ts +70 -38
  91. package/src/lib/compare/buildFingerprints.ts +173 -0
  92. package/src/lib/compare/describeChange.ts +0 -0
  93. package/src/lib/compare/geometricData.test.ts +54 -0
  94. package/src/lib/compare/geometricData.ts +37 -0
  95. package/src/lib/compare/overlay.test.ts +99 -0
  96. package/src/lib/compare/overlay.ts +91 -0
  97. package/src/lib/geo/cesium-placement.ts +1 -1
  98. package/src/lib/geo/reproject.ts +4 -1
  99. package/src/lib/length-unit-scale.ts +41 -0
  100. package/src/lib/lists/adapter.ts +136 -11
  101. package/src/lib/lists/export/csv.ts +47 -0
  102. package/src/lib/lists/export/index.ts +49 -0
  103. package/src/lib/lists/export/model.ts +111 -0
  104. package/src/lib/lists/export/pdf.ts +67 -0
  105. package/src/lib/lists/export/xlsx.ts +83 -0
  106. package/src/lib/lists/index.ts +2 -0
  107. package/src/lib/llm/script-edit-ops.ts +23 -0
  108. package/src/lib/llm/stream-client.ts +8 -1
  109. package/src/lib/search/filter-evaluate.test.ts +81 -0
  110. package/src/lib/search/filter-evaluate.ts +59 -87
  111. package/src/lib/search/filter-match.ts +167 -0
  112. package/src/lib/search/filter-rules.test.ts +25 -0
  113. package/src/lib/search/filter-rules.ts +75 -2
  114. package/src/lib/search/filter-schema.ts +0 -0
  115. package/src/lib/search/result-export.ts +7 -1
  116. package/src/lib/slab-edit.test.ts +72 -0
  117. package/src/lib/slab-edit.ts +159 -19
  118. package/src/sdk/adapters/export-adapter.ts +9 -4
  119. package/src/sdk/adapters/query-adapter.ts +3 -3
  120. package/src/store/globalId.ts +15 -13
  121. package/src/store/index.ts +16 -1
  122. package/src/store/slices/cesiumSlice.ts +8 -1
  123. package/src/store/slices/compareSlice.ts +96 -0
  124. package/src/store/slices/lensSlice.ts +8 -0
  125. package/src/store/slices/listSlice.ts +6 -0
  126. package/src/store/slices/mutationSlice.ts +14 -6
  127. package/src/store/slices/searchSlice.ts +29 -3
  128. package/src/utils/acquireFileBuffer.test.ts +12 -4
  129. package/src/utils/desktopModelSnapshot.ts +2 -1
  130. package/src/utils/loadingUtils.ts +32 -0
  131. package/src/utils/nativeSpatialDataStore.ts +6 -0
  132. package/src/utils/serverDataModel.test.ts +6 -0
  133. package/src/utils/serverDataModel.ts +7 -0
  134. package/src/utils/spatialHierarchy.test.ts +53 -1
  135. package/src/utils/spatialHierarchy.ts +42 -2
  136. package/src/vite-env.d.ts +2 -0
  137. package/dist/assets/deflate-Cnx0il6E.js +0 -1
  138. package/dist/assets/drawing-2d-C71b8Ugx.js +0 -257
  139. package/dist/assets/e57-source-CQHxE8n3.js +0 -1
  140. package/dist/assets/geometry.worker-0Q9qEa6p.js +0 -1
  141. package/dist/assets/ifc-lite_bg-CEZnhM2e.wasm +0 -0
  142. package/dist/assets/index-B9Ug2EqU.css +0 -1
  143. package/dist/assets/lens-PYsLu_MA.js +0 -1
  144. package/dist/assets/parser.worker-8md211IW.js +0 -182
  145. package/dist/assets/raw-BQrAgxwT.js +0 -1
  146. package/dist/assets/server-client-Bk4c1CPO.js +0 -626
  147. package/src/hooks/ingest/resolveDataStoreOrAbort.test.ts +0 -61
  148. package/src/hooks/ingest/resolveDataStoreOrAbort.ts +0 -28
  149. package/src/hooks/ingest/watchedGeometryStream.test.ts +0 -78
  150. package/src/hooks/ingest/watchedGeometryStream.ts +0 -76
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sandbox-CsRXlgCO.js","assets/lens-PYsLu_MA.js"])))=>i.map(i=>d[i]);
2
- import { au as $, ap as fe, af as J, ao as ye, ad as he, ae as ve, ag as Ee, o as Te, _ as Ie, a1 as be, E as ge, a7 as Se, a8 as Ae, p as A, a0 as N, ac as xe, ab as Ce, a6 as Re, an as Me, __tla as __tla_0 } from "./sandbox-CsRXlgCO.js";
3
- let g, oa, ua, ca, Ne, la;
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sandbox-0sDo3g3m.js","assets/lens-C4p1kQ0p.js"])))=>i.map(i=>d[i]);
2
+ import { aC as $, aw as he, al as Z, au as ve, aj as Ee, ak as Te, am as Ie, o as be, _ as ge, a4 as Se, E as Ae, ac as xe, ad as Ce, p as A, a3 as N, ai as Re, ah as Me, ab as Ne, at as _e, __tla as __tla_0 } from "./sandbox-0sDo3g3m.js";
3
+ let g, ua, ca, pa, Pe, oa;
4
4
  let __tla = Promise.all([
5
5
  (()=>{
6
6
  try {
@@ -10,8 +10,8 @@ let __tla = Promise.all([
10
10
  ]).then(async ()=>{
11
11
  const O = "http://www.w3.org/2001/XMLSchema";
12
12
  g = class extends Error {
13
- constructor(t, a){
14
- super(t), this.details = a, this.name = "IDSParseError";
13
+ constructor(t, i){
14
+ super(t), this.details = i, this.name = "IDSParseError";
15
15
  }
16
16
  };
17
17
  let V = typeof globalThis < "u" && typeof globalThis.DOMParser == "function" ? globalThis.DOMParser : null;
@@ -19,28 +19,28 @@ let __tla = Promise.all([
19
19
  await m.__tla;
20
20
  return m;
21
21
  })).DOMParser);
22
- Ne = function(e) {
22
+ Pe = function(e) {
23
23
  let t = typeof e == "string" ? e : new TextDecoder().decode(e);
24
24
  if (t.charCodeAt(0) === 65279 && (t = t.slice(1)), !V) throw new g("No DOMParser implementation available", "Neither globalThis.DOMParser nor @xmldom/xmldom could be loaded.");
25
- const a = new V;
26
- let i;
25
+ const i = new V;
26
+ let a;
27
27
  try {
28
- i = a.parseFromString(t, "text/xml");
28
+ a = i.parseFromString(t, "text/xml");
29
29
  } catch (s) {
30
30
  throw new g("Failed to parse IDS XML", s instanceof Error ? s.message : String(s));
31
31
  }
32
- const n = typeof i.querySelector == "function" ? i.querySelector("parsererror") : null;
32
+ const n = typeof a.querySelector == "function" ? a.querySelector("parsererror") : null;
33
33
  if (n) throw new g("Invalid XML format", n.textContent || void 0);
34
- const r = i.documentElement;
34
+ const r = a.documentElement;
35
35
  if (!r) throw new g("Failed to parse IDS XML", "Parser returned a document with no root element.");
36
36
  if (r.localName !== "ids") throw new g(`Invalid root element: expected "ids", got "${r.localName}"`);
37
37
  return {
38
- info: _e(r),
39
- specifications: Pe(r),
38
+ info: $e(r),
39
+ specifications: we(r),
40
40
  schemaLocation: r.getAttribute("xsi:schemaLocation") || r.getAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation") || void 0
41
41
  };
42
42
  };
43
- function _e(e) {
43
+ function $e(e) {
44
44
  const t = h(e, "info");
45
45
  return t ? {
46
46
  title: C(t, "title") || "Untitled IDS",
@@ -55,30 +55,30 @@ let __tla = Promise.all([
55
55
  title: "Untitled IDS"
56
56
  };
57
57
  }
58
- function Pe(e) {
58
+ function we(e) {
59
59
  const t = h(e, "specifications");
60
- return t ? U(t, "specification").map((i, n)=>$e(i, n)) : [];
60
+ return t ? U(t, "specification").map((a, n)=>Fe(a, n)) : [];
61
61
  }
62
- function $e(e, t) {
63
- const a = e.getAttribute("name") || `Specification ${t + 1}`, n = (e.getAttribute("ifcVersion") || "IFC4").split(/\s+/).map((m)=>we(m)).filter((m)=>m !== null), r = h(e, "applicability"), s = {
64
- facets: r ? Fe(r) : [],
62
+ function Fe(e, t) {
63
+ const i = e.getAttribute("name") || `Specification ${t + 1}`, n = (e.getAttribute("ifcVersion") || "IFC4").split(/\s+/).map((f)=>Oe(f)).filter((f)=>f !== null), r = h(e, "applicability"), s = {
64
+ facets: r ? Le(r) : [],
65
65
  cardinality: r?.getAttribute("cardinality") ?? void 0
66
66
  }, l = (r ? r.getAttribute("minOccurs") : null) ?? e.getAttribute("minOccurs"), o = (r ? r.getAttribute("maxOccurs") : null) ?? e.getAttribute("maxOccurs");
67
67
  let u;
68
68
  if (l !== null) {
69
- const m = parseInt(l, 10);
70
- Number.isFinite(m) && (u = m);
69
+ const f = parseInt(l, 10);
70
+ Number.isFinite(f) && (u = f);
71
71
  }
72
72
  let c;
73
73
  if (o !== null) {
74
- const m = parseInt(o, 10);
75
- o === "unbounded" ? c = "unbounded" : Number.isFinite(m) && (c = m);
74
+ const f = parseInt(o, 10);
75
+ o === "unbounded" ? c = "unbounded" : Number.isFinite(f) && (c = f);
76
76
  }
77
77
  u === void 0 && (r || c !== void 0) && (u = 1);
78
- const f = h(e, "requirements"), d = f ? qe(f) : [];
78
+ const m = h(e, "requirements"), d = m ? He(m) : [];
79
79
  return {
80
80
  id: e.getAttribute("identifier") || `spec-${t}`,
81
- name: a,
81
+ name: i,
82
82
  description: e.getAttribute("description") || void 0,
83
83
  instructions: e.getAttribute("instructions") || void 0,
84
84
  identifier: e.getAttribute("identifier") || void 0,
@@ -92,7 +92,7 @@ let __tla = Promise.all([
92
92
  maxOccurs: c
93
93
  };
94
94
  }
95
- function we(e) {
95
+ function Oe(e) {
96
96
  const t = e.toUpperCase().replace(/[^A-Z0-9]/g, "");
97
97
  switch(t){
98
98
  case "IFC2X3":
@@ -106,90 +106,90 @@ let __tla = Promise.all([
106
106
  return t.startsWith("IFC4X3") ? "IFC4X3" : t.startsWith("IFC4") ? "IFC4" : t.startsWith("IFC2X3") ? "IFC2X3" : null;
107
107
  }
108
108
  }
109
- function Fe(e) {
109
+ function Le(e) {
110
110
  const t = [];
111
- for (const a of Array.from(e.children)){
112
- const i = Z(a);
113
- i && t.push(i);
111
+ for (const i of Array.from(e.children)){
112
+ const a = ee(i);
113
+ a && t.push(a);
114
114
  }
115
115
  return t;
116
116
  }
117
- function Z(e) {
117
+ function ee(e) {
118
118
  switch(e.localName.toLowerCase()){
119
119
  case "entity":
120
- return ee(e);
120
+ return te(e);
121
121
  case "attribute":
122
- return Oe(e);
122
+ return Ve(e);
123
123
  case "property":
124
- return Le(e);
124
+ return De(e);
125
125
  case "classification":
126
- return Ve(e);
126
+ return Ue(e);
127
127
  case "material":
128
- return De(e);
128
+ return ke(e);
129
129
  case "partof":
130
- return Ue(e);
130
+ return Be(e);
131
131
  default:
132
132
  return null;
133
133
  }
134
134
  }
135
- function ee(e) {
136
- const t = h(e, "name"), a = h(e, "predefinedType");
135
+ function te(e) {
136
+ const t = h(e, "name"), i = h(e, "predefinedType");
137
137
  if (!t) throw new g("Entity facet must have a name element");
138
138
  return {
139
139
  type: "entity",
140
140
  name: T(t),
141
- predefinedType: a ? T(a) : void 0
141
+ predefinedType: i ? T(i) : void 0
142
142
  };
143
143
  }
144
- function Oe(e) {
145
- const t = h(e, "name"), a = h(e, "value");
144
+ function Ve(e) {
145
+ const t = h(e, "name"), i = h(e, "value");
146
146
  if (!t) throw new g("Attribute facet must have a name element");
147
147
  return {
148
148
  type: "attribute",
149
149
  name: T(t),
150
- value: a ? T(a) : void 0
150
+ value: i ? T(i) : void 0
151
151
  };
152
152
  }
153
- function Le(e) {
154
- const t = h(e, "propertySet"), a = h(e, "baseName"), i = e.getAttribute("dataType"), n = h(e, "dataType"), r = h(e, "value");
153
+ function De(e) {
154
+ const t = h(e, "propertySet"), i = h(e, "baseName"), a = e.getAttribute("dataType"), n = h(e, "dataType"), r = h(e, "value");
155
155
  if (!t) throw new g("Property facet must have a propertySet element");
156
- if (!a) throw new g("Property facet must have a baseName element");
156
+ if (!i) throw new g("Property facet must have a baseName element");
157
157
  let s;
158
- return i ? s = {
158
+ return a ? s = {
159
159
  type: "simpleValue",
160
- value: i
160
+ value: a
161
161
  } : n && (s = T(n)), {
162
162
  type: "property",
163
163
  propertySet: T(t),
164
- baseName: T(a),
164
+ baseName: T(i),
165
165
  dataType: s,
166
166
  value: r ? T(r) : void 0
167
167
  };
168
168
  }
169
- function Ve(e) {
170
- const t = h(e, "system"), a = h(e, "value");
169
+ function Ue(e) {
170
+ const t = h(e, "system"), i = h(e, "value");
171
171
  return {
172
172
  type: "classification",
173
173
  system: t ? T(t) : void 0,
174
- value: a ? T(a) : void 0
174
+ value: i ? T(i) : void 0
175
175
  };
176
176
  }
177
- function De(e) {
177
+ function ke(e) {
178
178
  const t = h(e, "value");
179
179
  return {
180
180
  type: "material",
181
181
  value: t ? T(t) : void 0
182
182
  };
183
183
  }
184
- function Ue(e) {
185
- const t = e.getAttribute("relation"), a = t || "IfcRelContainedInSpatialStructure", i = h(e, "entity"), n = Be(a), r = ke(a), s = {
184
+ function Be(e) {
185
+ const t = e.getAttribute("relation"), i = t || "IfcRelContainedInSpatialStructure", a = h(e, "entity"), n = Ye(i), r = qe(i), s = {
186
186
  type: "partOf",
187
187
  relation: n,
188
- entity: i ? ee(i) : void 0
188
+ entity: a ? te(a) : void 0
189
189
  };
190
190
  return !r && t && (s.rawRelation = t), s;
191
191
  }
192
- function ke(e) {
192
+ function qe(e) {
193
193
  switch(e){
194
194
  case "IfcRelAggregates":
195
195
  case "IfcRelContainedInSpatialStructure":
@@ -202,17 +202,17 @@ let __tla = Promise.all([
202
202
  return !1;
203
203
  }
204
204
  }
205
- function Be(e) {
205
+ function Ye(e) {
206
206
  const t = e.toUpperCase();
207
207
  return t.includes("ASSIGNSTOGROUP") || t.includes("GROUP") ? "IfcRelAssignsToGroup" : t.includes("AGGREGATE") ? "IfcRelAggregates" : t.includes("CONTAINED") || t.includes("SPATIAL") ? "IfcRelContainedInSpatialStructure" : t.includes("NEST") ? "IfcRelNests" : t.includes("VOID") ? "IfcRelVoidsElement" : t.includes("FILL") ? "IfcRelFillsElement" : "IfcRelContainedInSpatialStructure";
208
208
  }
209
- function qe(e) {
209
+ function He(e) {
210
210
  const t = [];
211
- let a = 0;
212
- for (const i of Array.from(e.children)){
213
- const n = Z(i);
211
+ let i = 0;
212
+ for (const a of Array.from(e.children)){
213
+ const n = ee(a);
214
214
  if (n) {
215
- const r = i.getAttribute("cardinality"), s = i.getAttribute("minOccurs"), l = i.getAttribute("maxOccurs");
215
+ const r = a.getAttribute("cardinality"), s = a.getAttribute("minOccurs"), l = a.getAttribute("maxOccurs");
216
216
  let o = "required", u;
217
217
  if (r !== null) if (r === "required" || r === "optional" || r === "prohibited") o = r;
218
218
  else {
@@ -221,12 +221,12 @@ let __tla = Promise.all([
221
221
  }
222
222
  else s === "0" && l === "0" ? o = "prohibited" : s === "0" && (o = "optional");
223
223
  t.push({
224
- id: `req-${a++}`,
224
+ id: `req-${i++}`,
225
225
  facet: n,
226
226
  optionality: o,
227
227
  cardinalityRaw: u,
228
- description: i.getAttribute("description") || void 0,
229
- instructions: i.getAttribute("instructions") || void 0
228
+ description: a.getAttribute("description") || void 0,
229
+ instructions: a.getAttribute("instructions") || void 0
230
230
  });
231
231
  }
232
232
  }
@@ -238,32 +238,32 @@ let __tla = Promise.all([
238
238
  type: "simpleValue",
239
239
  value: t.textContent?.trim() || ""
240
240
  };
241
- const a = te(e, "restriction", O) || h(e, "restriction");
242
- if (a) return Ye(a);
243
- const i = e.textContent?.trim();
244
- return i ? {
241
+ const i = ie(e, "restriction", O) || h(e, "restriction");
242
+ if (i) return Ge(i);
243
+ const a = e.textContent?.trim();
244
+ return a ? {
245
245
  type: "simpleValue",
246
- value: i
246
+ value: a
247
247
  } : {
248
248
  type: "simpleValue",
249
249
  value: ""
250
250
  };
251
251
  }
252
- function Ye(e) {
253
- const t = e.getAttribute("base") || void 0, a = (()=>{
252
+ function Ge(e) {
253
+ const t = e.getAttribute("base") || void 0, i = (()=>{
254
254
  const s = q(e, "pattern", O);
255
255
  return s.length > 0 ? s : U(e, "pattern");
256
256
  })();
257
- if (a.length > 0) {
258
- const s = a.map((o)=>o.getAttribute("value") || o.textContent || "").filter((o)=>o.length > 0);
257
+ if (i.length > 0) {
258
+ const s = i.map((o)=>o.getAttribute("value") || o.textContent || "").filter((o)=>o.length > 0);
259
259
  return {
260
260
  type: "pattern",
261
261
  pattern: s.length === 1 ? s[0] : s.map((o)=>`(?:${o})`).join("|"),
262
262
  base: t
263
263
  };
264
264
  }
265
- const i = q(e, "enumeration", O);
266
- if (i.length === 0) {
265
+ const a = q(e, "enumeration", O);
266
+ if (a.length === 0) {
267
267
  const s = U(e, "enumeration");
268
268
  if (s.length > 0) return {
269
269
  type: "enumeration",
@@ -272,7 +272,7 @@ let __tla = Promise.all([
272
272
  };
273
273
  } else return {
274
274
  type: "enumeration",
275
- values: i.map((s)=>s.getAttribute("value") || s.textContent || ""),
275
+ values: a.map((s)=>s.getAttribute("value") || s.textContent || ""),
276
276
  base: t
277
277
  };
278
278
  const n = {};
@@ -284,7 +284,7 @@ let __tla = Promise.all([
284
284
  "length",
285
285
  "minLength",
286
286
  "maxLength"
287
- ])n[s] = te(e, s, O) || h(e, s);
287
+ ])n[s] = ie(e, s, O) || h(e, s);
288
288
  if (Object.values(n).some((s)=>s !== null)) {
289
289
  const s = {
290
290
  type: "bounds",
@@ -315,99 +315,99 @@ let __tla = Promise.all([
315
315
  };
316
316
  }
317
317
  function h(e, t) {
318
- for (const a of Array.from(e.children))if (a.localName.toLowerCase() === t.toLowerCase()) return a;
318
+ for (const i of Array.from(e.children))if (i.localName.toLowerCase() === t.toLowerCase()) return i;
319
319
  return null;
320
320
  }
321
321
  function U(e, t) {
322
- const a = [];
323
- for (const i of Array.from(e.children))i.localName.toLowerCase() === t.toLowerCase() && a.push(i);
324
- return a;
322
+ const i = [];
323
+ for (const a of Array.from(e.children))a.localName.toLowerCase() === t.toLowerCase() && i.push(a);
324
+ return i;
325
325
  }
326
- function te(e, t, a) {
327
- for (const i of Array.from(e.children))if (i.localName.toLowerCase() === t.toLowerCase() && i.namespaceURI === a) return i;
326
+ function ie(e, t, i) {
327
+ for (const a of Array.from(e.children))if (a.localName.toLowerCase() === t.toLowerCase() && a.namespaceURI === i) return a;
328
328
  return null;
329
329
  }
330
- function q(e, t, a) {
331
- const i = [];
332
- for (const n of Array.from(e.children))n.localName.toLowerCase() === t.toLowerCase() && n.namespaceURI === a && i.push(n);
333
- return i;
330
+ function q(e, t, i) {
331
+ const a = [];
332
+ for (const n of Array.from(e.children))n.localName.toLowerCase() === t.toLowerCase() && n.namespaceURI === i && a.push(n);
333
+ return a;
334
334
  }
335
335
  function C(e, t) {
336
336
  return h(e, t)?.textContent?.trim() || void 0;
337
337
  }
338
- const Y = /^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/, He = 1e-6;
339
- function Xe(e, t) {
340
- const a = He * (1 + Math.abs(e)), i = 16 * Number.EPSILON * Math.max(Math.abs(e), typeof t == "number" ? Math.abs(t) : 0);
341
- return a + i;
342
- }
343
- function ie(e, t) {
344
- const a = String(t), i = Y.test(e), n = typeof t == "number" || Y.test(a);
345
- if (!i || !n) return;
346
- const r = parseFloat(e), s = typeof t == "number" ? t : parseFloat(a);
347
- if (!(Number.isNaN(r) || Number.isNaN(s))) return Math.abs(r - s) <= Xe(r, s);
338
+ const Y = /^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/, Xe = 1e-6;
339
+ function je(e, t) {
340
+ const i = Xe * (1 + Math.abs(e)), a = 16 * Number.EPSILON * Math.max(Math.abs(e), typeof t == "number" ? Math.abs(t) : 0);
341
+ return i + a;
348
342
  }
349
343
  function ae(e, t) {
344
+ const i = String(t), a = Y.test(e), n = typeof t == "number" || Y.test(i);
345
+ if (!a || !n) return;
346
+ const r = parseFloat(e), s = typeof t == "number" ? t : parseFloat(i);
347
+ if (!(Number.isNaN(r) || Number.isNaN(s))) return Math.abs(r - s) <= je(r, s);
348
+ }
349
+ function ne(e, t) {
350
350
  if (!(e !== "true" && e !== "false")) return typeof t == "boolean" ? e === "true" ? t === !0 : t === !1 : t === "true" || t === "false" ? t === e : !1;
351
351
  }
352
- function ne(e, t, a) {
353
- const i = String(t);
354
- if (i === e || a && i.toUpperCase() === e.toUpperCase()) return !0;
352
+ function re(e, t, i) {
353
+ const a = String(t);
354
+ if (a === e || i && a.toUpperCase() === e.toUpperCase()) return !0;
355
355
  }
356
- function v(e, t, a) {
356
+ function v(e, t, i) {
357
357
  if (t == null) return !1;
358
- const i = a?.caseInsensitive ?? !1;
358
+ const a = i?.caseInsensitive ?? !1;
359
359
  switch(e.type){
360
360
  case "simpleValue":
361
- return Ge(e, t, i);
361
+ return We(e, t, a);
362
362
  case "pattern":
363
- return je(e, t, i);
363
+ return ze(e, t, a);
364
364
  case "enumeration":
365
- return ze(e, t, i);
365
+ return Qe(e, t, a);
366
366
  case "bounds":
367
- return Ke(e, t);
367
+ return Je(e, t);
368
368
  default:
369
369
  return !1;
370
370
  }
371
371
  }
372
- function Ge(e, t, a) {
373
- const i = e.value, n = ne(i, t, a);
372
+ function We(e, t, i) {
373
+ const a = e.value, n = re(a, t, i);
374
374
  if (n !== void 0) return n;
375
- const r = ie(i, t);
375
+ const r = ae(a, t);
376
376
  if (r !== void 0) return r;
377
- const s = ae(i, t);
377
+ const s = ne(a, t);
378
378
  return s !== void 0 ? s : !1;
379
379
  }
380
- function je(e, t, a = !1) {
380
+ function ze(e, t, i = !1) {
381
381
  if (typeof t == "number" || typeof t == "boolean") return !1;
382
- const i = String(t);
382
+ const a = String(t);
383
383
  try {
384
- const n = We(e.pattern), r = a ? "i" : "";
385
- return new RegExp(`^${n}$`, r).test(i);
384
+ const n = Ke(e.pattern), r = i ? "i" : "";
385
+ return new RegExp(`^${n}$`, r).test(a);
386
386
  } catch {
387
387
  return !1;
388
388
  }
389
389
  }
390
- function We(e) {
390
+ function Ke(e) {
391
391
  return e.replace(/\\i/g, "[A-Za-z_:]").replace(/\\c/g, "[A-Za-z0-9._:-]").replace(/\\p\{[^}]+\}/g, ".").replace(/\[([^\]]+)-\[[^\]]+\]\]/g, "[$1]");
392
392
  }
393
- function ze(e, t, a) {
394
- return e.values.some((i)=>{
395
- const n = ne(i, t, a);
393
+ function Qe(e, t, i) {
394
+ return e.values.some((a)=>{
395
+ const n = re(a, t, i);
396
396
  if (n !== void 0) return n;
397
- const r = ie(i, t);
397
+ const r = ae(a, t);
398
398
  if (r !== void 0) return r;
399
- const s = ae(i, t);
399
+ const s = ne(a, t);
400
400
  return s !== void 0 ? s : !1;
401
401
  });
402
402
  }
403
- function Ke(e, t) {
403
+ function Je(e, t) {
404
404
  if (e.length !== void 0 || e.minLength !== void 0 || e.maxLength !== void 0) {
405
- const i = String(t);
406
- if (e.length !== void 0 && i.length !== e.length || e.minLength !== void 0 && i.length < e.minLength || e.maxLength !== void 0 && i.length > e.maxLength) return !1;
405
+ const a = String(t);
406
+ if (e.length !== void 0 && a.length !== e.length || e.minLength !== void 0 && a.length < e.minLength || e.maxLength !== void 0 && a.length > e.maxLength) return !1;
407
407
  if (e.minInclusive === void 0 && e.maxInclusive === void 0 && e.minExclusive === void 0 && e.maxExclusive === void 0) return !0;
408
408
  }
409
- const a = typeof t == "number" ? t : parseFloat(String(t));
410
- return !(isNaN(a) || e.minInclusive !== void 0 && a < e.minInclusive || e.maxInclusive !== void 0 && a > e.maxInclusive || e.minExclusive !== void 0 && a <= e.minExclusive || e.maxExclusive !== void 0 && a >= e.maxExclusive);
409
+ const i = typeof t == "number" ? t : parseFloat(String(t));
410
+ return !(isNaN(i) || e.minInclusive !== void 0 && i < e.minInclusive || e.maxInclusive !== void 0 && i > e.maxInclusive || e.minExclusive !== void 0 && i <= e.minExclusive || e.maxExclusive !== void 0 && i >= e.maxExclusive);
411
411
  }
412
412
  function p(e) {
413
413
  switch(e.type){
@@ -418,21 +418,21 @@ let __tla = Promise.all([
418
418
  case "enumeration":
419
419
  return e.values.length === 1 ? `"${e.values[0]}"` : `one of [${e.values.map((t)=>`"${t}"`).join(", ")}]`;
420
420
  case "bounds":
421
- return Qe(e);
421
+ return Ze(e);
422
422
  default:
423
423
  return "unknown";
424
424
  }
425
425
  }
426
- function Qe(e) {
426
+ function Ze(e) {
427
427
  const t = [];
428
428
  return e.minInclusive !== void 0 && e.maxInclusive !== void 0 ? `between ${e.minInclusive} and ${e.maxInclusive}` : (e.minInclusive !== void 0 && t.push(`>= ${e.minInclusive}`), e.maxInclusive !== void 0 && t.push(`<= ${e.maxInclusive}`), e.minExclusive !== void 0 && t.push(`> ${e.minExclusive}`), e.maxExclusive !== void 0 && t.push(`< ${e.maxExclusive}`), t.join(" and ") || "any value");
429
429
  }
430
- const Je = {
430
+ const et = {
431
431
  caseInsensitive: !0
432
432
  };
433
- function Ze(e, t, a) {
434
- const i = a.getEntityType(t);
435
- if (!i) return {
433
+ function tt(e, t, i) {
434
+ const a = i.getEntityType(t);
435
+ if (!a) return {
436
436
  passed: !1,
437
437
  actualValue: void 0,
438
438
  expectedValue: p(e.name),
@@ -445,31 +445,31 @@ let __tla = Promise.all([
445
445
  };
446
446
  if (e.name.type === "simpleValue" && e.name.value !== e.name.value.toUpperCase()) return {
447
447
  passed: !1,
448
- actualValue: i,
448
+ actualValue: a,
449
449
  expectedValue: p(e.name),
450
450
  failure: {
451
451
  type: "ENTITY_TYPE_MISMATCH",
452
452
  field: "entityType",
453
- actual: i,
453
+ actual: a,
454
454
  expected: p(e.name)
455
455
  }
456
456
  };
457
- if (!v(e.name, i, Je)) return {
457
+ if (!v(e.name, a, et)) return {
458
458
  passed: !1,
459
- actualValue: i,
459
+ actualValue: a,
460
460
  expectedValue: p(e.name),
461
461
  failure: {
462
462
  type: "ENTITY_TYPE_MISMATCH",
463
463
  field: "entityType",
464
- actual: i,
464
+ actual: a,
465
465
  expected: p(e.name)
466
466
  }
467
467
  };
468
468
  if (e.predefinedType) {
469
- const n = a.getPredefinedTypeRaw?.(t), r = a.getObjectType(t);
469
+ const n = i.getPredefinedTypeRaw?.(t), r = i.getObjectType(t);
470
470
  if (!n && !r) return {
471
471
  passed: !1,
472
- actualValue: i,
472
+ actualValue: a,
473
473
  expectedValue: `${p(e.name)} with predefinedType ${p(e.predefinedType)}`,
474
474
  failure: {
475
475
  type: "PREDEFINED_TYPE_MISSING",
@@ -482,7 +482,7 @@ let __tla = Promise.all([
482
482
  const l = r || n || "(none)";
483
483
  return {
484
484
  passed: !1,
485
- actualValue: `${i}[${l}]`,
485
+ actualValue: `${a}[${l}]`,
486
486
  expectedValue: `${p(e.name)} with predefinedType ${p(e.predefinedType)}`,
487
487
  failure: {
488
488
  type: "PREDEFINED_TYPE_MISMATCH",
@@ -495,44 +495,44 @@ let __tla = Promise.all([
495
495
  }
496
496
  return {
497
497
  passed: !0,
498
- actualValue: e.predefinedType ? `${i}[${a.getObjectType(t) || ""}]` : i,
498
+ actualValue: e.predefinedType ? `${a}[${i.getObjectType(t) || ""}]` : a,
499
499
  expectedValue: p(e.name)
500
500
  };
501
501
  }
502
- function et(e, t) {
503
- const a = e.name;
504
- if (a.type === "simpleValue") return t.getEntitiesByType(a.value);
505
- if (a.type === "enumeration") {
506
- const i = [];
507
- for (const n of a.values)i.push(...t.getEntitiesByType(n));
508
- return i;
502
+ function it(e, t) {
503
+ const i = e.name;
504
+ if (i.type === "simpleValue") return t.getEntitiesByType(i.value);
505
+ if (i.type === "enumeration") {
506
+ const a = [];
507
+ for (const n of i.values)a.push(...t.getEntitiesByType(n));
508
+ return a;
509
509
  }
510
510
  }
511
- const tt = /^[+-]?\d+$/, it = /^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/, at = /^\d{4}-\d{2}-\d{2}(Z|[+-]\d{2}:\d{2})?$/, nt = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?$/, rt = /^-?P(?:\d+Y)?(?:\d+M)?(?:\d+D)?(?:T(?:\d+H)?(?:\d+M)?(?:\d+(?:\.\d+)?S)?)?$/;
512
- function re(e, t) {
513
- return !t || t.length === 0 ? !0 : t.some((a)=>st(e, a));
511
+ const at = /^[+-]?\d+$/, nt = /^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/, rt = /^\d{4}-\d{2}-\d{2}(Z|[+-]\d{2}:\d{2})?$/, st = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?$/, lt = /^-?P(?:\d+Y)?(?:\d+M)?(?:\d+D)?(?:T(?:\d+H)?(?:\d+M)?(?:\d+(?:\.\d+)?S)?)?$/;
512
+ function se(e, t) {
513
+ return !t || t.length === 0 ? !0 : t.some((i)=>ot(e, i));
514
514
  }
515
- function st(e, t) {
515
+ function ot(e, t) {
516
516
  switch(t){
517
517
  case "xs:integer":
518
- return tt.test(e);
518
+ return at.test(e);
519
519
  case "xs:double":
520
- return it.test(e);
520
+ return nt.test(e);
521
521
  case "xs:boolean":
522
522
  return e === "true" || e === "false";
523
523
  case "xs:date":
524
- return at.test(e);
524
+ return rt.test(e);
525
525
  case "xs:dateTime":
526
- return nt.test(e);
526
+ return st.test(e);
527
527
  case "xs:duration":
528
- return rt.test(e);
528
+ return lt.test(e);
529
529
  case "xs:string":
530
530
  return !0;
531
531
  default:
532
532
  return !0;
533
533
  }
534
534
  }
535
- function lt(e) {
535
+ function ut(e) {
536
536
  if (!e) return [];
537
537
  const t = e.toUpperCase();
538
538
  return t === "IFCINTEGER" || t === "IFCCOUNTMEASURE" ? [
@@ -554,9 +554,9 @@ let __tla = Promise.all([
554
554
  "xs:string"
555
555
  ] : [];
556
556
  }
557
- const ot = {
557
+ const ct = {
558
558
  caseInsensitive: !0
559
- }, ut = [
559
+ }, pt = [
560
560
  "Name",
561
561
  "Description",
562
562
  "ObjectType",
@@ -564,34 +564,34 @@ let __tla = Promise.all([
564
564
  "GlobalId",
565
565
  "LongName"
566
566
  ];
567
- function ct(e, t, a) {
568
- const i = e.name;
567
+ function dt(e, t, i) {
568
+ const a = e.name;
569
569
  let n;
570
- if (i.type === "simpleValue") n = [
571
- i.value
570
+ if (a.type === "simpleValue") n = [
571
+ a.value
572
572
  ];
573
573
  else {
574
- const s = a.getAttributeNames?.(t);
575
- if (n = (s && s.length > 0 ? s : ut).filter((o)=>v(i, o, ot)), n.length === 0) return {
574
+ const s = i.getAttributeNames?.(t);
575
+ if (n = (s && s.length > 0 ? s : pt).filter((o)=>v(a, o, ct)), n.length === 0) return {
576
576
  passed: !1,
577
- expectedValue: e.value ? p(e.value) : `attribute matching ${p(i)} to exist`,
577
+ expectedValue: e.value ? p(e.value) : `attribute matching ${p(a)} to exist`,
578
578
  failure: {
579
579
  type: "ATTRIBUTE_MISSING",
580
- field: p(i),
581
- expected: p(i)
580
+ field: p(a),
581
+ expected: p(a)
582
582
  }
583
583
  };
584
584
  }
585
585
  let r;
586
586
  for (const s of n){
587
- const l = pt(e, s, t, a);
587
+ const l = mt(e, s, t, i);
588
588
  if (l.passed) return l;
589
589
  (!r || l.failure?.type !== "ATTRIBUTE_MISSING" && r.failure?.type === "ATTRIBUTE_MISSING") && (r = l);
590
590
  }
591
591
  return r;
592
592
  }
593
- function pt(e, t, a, i) {
594
- const n = dt(t, a, i);
593
+ function mt(e, t, i, a) {
594
+ const n = ft(t, i, a);
595
595
  if (n == null) return {
596
596
  passed: !1,
597
597
  actualValue: void 0,
@@ -619,8 +619,8 @@ let __tla = Promise.all([
619
619
  expectedValue: `attribute "${t}" to exist`
620
620
  };
621
621
  if (e.value.type === "simpleValue") {
622
- const r = i.getAttributeXsdTypes?.(a, t);
623
- if (r && !re(e.value.value, r)) return {
622
+ const r = a.getAttributeXsdTypes?.(i, t);
623
+ if (r && !se(e.value.value, r)) return {
624
624
  passed: !1,
625
625
  actualValue: String(n),
626
626
  expectedValue: p(e.value),
@@ -648,26 +648,26 @@ let __tla = Promise.all([
648
648
  }
649
649
  };
650
650
  }
651
- function dt(e, t, a) {
651
+ function ft(e, t, i) {
652
652
  switch(e.toLowerCase()){
653
653
  case "name":
654
- return a.getEntityName(t);
654
+ return i.getEntityName(t);
655
655
  case "description":
656
- return a.getDescription(t);
656
+ return i.getDescription(t);
657
657
  case "objecttype":
658
- return a.getObjectType(t);
658
+ return i.getObjectType(t);
659
659
  case "globalid":
660
- return a.getGlobalId(t);
660
+ return i.getGlobalId(t);
661
661
  default:
662
- return a.getAttribute(t, e);
662
+ return i.getAttribute(t, e);
663
663
  }
664
664
  }
665
- const mt = {
665
+ const yt = {
666
666
  caseInsensitive: !0
667
667
  };
668
- function ft(e, t, a) {
669
- const i = a.getPropertySets(t);
670
- if (i.length === 0) return {
668
+ function ht(e, t, i) {
669
+ const a = i.getPropertySets(t);
670
+ if (a.length === 0) return {
671
671
  passed: !1,
672
672
  expectedValue: `property "${p(e.baseName)}" in "${p(e.propertySet)}"`,
673
673
  failure: {
@@ -676,9 +676,9 @@ let __tla = Promise.all([
676
676
  expected: p(e.propertySet)
677
677
  }
678
678
  };
679
- const n = i.filter((u)=>v(e.propertySet, u.name));
679
+ const n = a.filter((u)=>v(e.propertySet, u.name));
680
680
  if (n.length === 0) {
681
- const u = i.map((c)=>c.name).join(", ");
681
+ const u = a.map((c)=>c.name).join(", ");
682
682
  return {
683
683
  passed: !1,
684
684
  actualValue: u || "(none)",
@@ -696,7 +696,7 @@ let __tla = Promise.all([
696
696
  }
697
697
  let r, s;
698
698
  for (const u of n){
699
- const c = yt(e, u);
699
+ const c = vt(e, u);
700
700
  if (c.passed) {
701
701
  r = c;
702
702
  continue;
@@ -722,9 +722,9 @@ let __tla = Promise.all([
722
722
  }
723
723
  };
724
724
  }
725
- function yt(e, t) {
726
- const a = t.properties.filter((r)=>v(e.baseName, r.name));
727
- if (a.length === 0) return {
725
+ function vt(e, t) {
726
+ const i = t.properties.filter((r)=>v(e.baseName, r.name));
727
+ if (i.length === 0) return {
728
728
  passed: !1,
729
729
  failure: {
730
730
  type: "PROPERTY_MISSING",
@@ -736,78 +736,78 @@ let __tla = Promise.all([
736
736
  }
737
737
  }
738
738
  };
739
- let i, n;
740
- for (const r of a){
741
- const s = ht(e, t, r);
739
+ let a, n;
740
+ for (const r of i){
741
+ const s = Et(e, t, r);
742
742
  if (s.passed) {
743
- i = s;
743
+ a = s;
744
744
  continue;
745
745
  }
746
746
  n ? n.failure?.type === "PROPERTY_MISSING" && s.failure?.type !== "PROPERTY_MISSING" && (n = s) : n = s;
747
747
  }
748
- return n || i;
748
+ return n || a;
749
749
  }
750
- function ht(e, t, a) {
751
- if (a.value === null || a.value === void 0 || a.value === "") return {
750
+ function Et(e, t, i) {
751
+ if (i.value === null || i.value === void 0 || i.value === "") return {
752
752
  passed: !1,
753
753
  actualValue: "(empty)",
754
- expectedValue: e.value ? p(e.value) : `property "${t.name}.${a.name}" must have a value`,
754
+ expectedValue: e.value ? p(e.value) : `property "${t.name}.${i.name}" must have a value`,
755
755
  failure: {
756
756
  type: "PROPERTY_VALUE_MISMATCH",
757
- field: `${t.name}.${a.name}`,
757
+ field: `${t.name}.${i.name}`,
758
758
  actual: "(empty)",
759
759
  expected: e.value ? p(e.value) : "a non-empty value"
760
760
  }
761
761
  };
762
- if (e.dataType && a.dataType && !v(e.dataType, a.dataType, mt)) return {
762
+ if (e.dataType && i.dataType && !v(e.dataType, i.dataType, yt)) return {
763
763
  passed: !1,
764
- actualValue: `${t.name}.${a.name} (${a.dataType})`,
764
+ actualValue: `${t.name}.${i.name} (${i.dataType})`,
765
765
  expectedValue: `dataType ${p(e.dataType)}`,
766
766
  failure: {
767
767
  type: "PROPERTY_DATATYPE_MISMATCH",
768
- field: `${t.name}.${a.name}`,
769
- actual: a.dataType,
768
+ field: `${t.name}.${i.name}`,
769
+ actual: i.dataType,
770
770
  expected: p(e.dataType)
771
771
  }
772
772
  };
773
773
  if (e.value) {
774
- const i = a.value;
775
- if (i == null || i === "") return {
774
+ const a = i.value;
775
+ if (a == null || a === "") return {
776
776
  passed: !1,
777
777
  actualValue: "(empty)",
778
778
  expectedValue: p(e.value),
779
779
  failure: {
780
780
  type: "PROPERTY_VALUE_MISMATCH",
781
- field: `${t.name}.${a.name}`,
781
+ field: `${t.name}.${i.name}`,
782
782
  actual: "(empty)",
783
783
  expected: p(e.value)
784
784
  }
785
785
  };
786
786
  if (e.value.type === "simpleValue") {
787
- const s = lt(a.dataType);
788
- if (s.length > 0 && !re(e.value.value, s)) return {
787
+ const s = ut(i.dataType);
788
+ if (s.length > 0 && !se(e.value.value, s)) return {
789
789
  passed: !1,
790
- actualValue: String(i),
790
+ actualValue: String(a),
791
791
  expectedValue: p(e.value),
792
792
  failure: {
793
793
  type: "PROPERTY_VALUE_MISMATCH",
794
- field: `${t.name}.${a.name}`,
795
- actual: String(i),
794
+ field: `${t.name}.${i.name}`,
795
+ actual: String(a),
796
796
  expected: p(e.value)
797
797
  }
798
798
  };
799
799
  }
800
- if (!(a.values && a.values.length > 0 ? a.values : [
801
- i
800
+ if (!(i.values && i.values.length > 0 ? i.values : [
801
+ a
802
802
  ]).some((s)=>v(e.value, s))) {
803
- const s = e.value.type === "bounds" ? "PROPERTY_OUT_OF_BOUNDS" : "PROPERTY_VALUE_MISMATCH", l = a.values && a.values.length > 0 ? a.values.join(", ") : String(i);
803
+ const s = e.value.type === "bounds" ? "PROPERTY_OUT_OF_BOUNDS" : "PROPERTY_VALUE_MISMATCH", l = i.values && i.values.length > 0 ? i.values.join(", ") : String(a);
804
804
  return {
805
805
  passed: !1,
806
806
  actualValue: l,
807
807
  expectedValue: p(e.value),
808
808
  failure: {
809
809
  type: s,
810
- field: `${t.name}.${a.name}`,
810
+ field: `${t.name}.${i.name}`,
811
811
  actual: l,
812
812
  expected: p(e.value)
813
813
  }
@@ -816,15 +816,15 @@ let __tla = Promise.all([
816
816
  }
817
817
  return {
818
818
  passed: !0,
819
- actualValue: `${t.name}.${a.name} = ${a.value}`,
819
+ actualValue: `${t.name}.${i.name} = ${i.value}`,
820
820
  expectedValue: e.value ? p(e.value) : "property exists"
821
821
  };
822
822
  }
823
- function vt(e, t, a) {
824
- const i = a.getClassifications(t), n = i.length > 0;
823
+ function Tt(e, t, i) {
824
+ const a = i.getClassifications(t), n = a.length > 0;
825
825
  if (!e.system && !e.value) return n ? {
826
826
  passed: !0,
827
- actualValue: i.map((s)=>`${s.system}:${s.value}`).join(", "),
827
+ actualValue: a.map((s)=>`${s.system}:${s.value}`).join(", "),
828
828
  expectedValue: "any classification"
829
829
  } : {
830
830
  passed: !1,
@@ -847,10 +847,10 @@ let __tla = Promise.all([
847
847
  }
848
848
  };
849
849
  }
850
- let r = i;
851
- if (e.system && (r = i.filter((s)=>v(e.system, s.system)), r.length === 0)) {
850
+ let r = a;
851
+ if (e.system && (r = a.filter((s)=>v(e.system, s.system)), r.length === 0)) {
852
852
  const s = [
853
- ...new Set(i.map((l)=>l.system))
853
+ ...new Set(a.map((l)=>l.system))
854
854
  ].join(", ");
855
855
  return {
856
856
  passed: !1,
@@ -899,9 +899,9 @@ let __tla = Promise.all([
899
899
  expectedValue: p(e.system)
900
900
  };
901
901
  }
902
- function Et(e, t, a) {
903
- const i = a.getMaterials(t);
904
- if (!e.value) return i.length === 0 ? {
902
+ function It(e, t, i) {
903
+ const a = i.getMaterials(t);
904
+ if (!e.value) return a.length === 0 ? {
905
905
  passed: !1,
906
906
  actualValue: "(none)",
907
907
  expectedValue: "any material",
@@ -911,12 +911,12 @@ let __tla = Promise.all([
911
911
  }
912
912
  } : {
913
913
  passed: !0,
914
- actualValue: i.map((r)=>r.name).join(", "),
914
+ actualValue: a.map((r)=>r.name).join(", "),
915
915
  expectedValue: "any material"
916
916
  };
917
- const n = i.filter((r)=>v(e.value, r.name) || r.category && v(e.value, r.category));
917
+ const n = a.filter((r)=>v(e.value, r.name) || r.category && v(e.value, r.category));
918
918
  if (n.length === 0) {
919
- if (i.length === 0) return {
919
+ if (a.length === 0) return {
920
920
  passed: !1,
921
921
  actualValue: "(none)",
922
922
  expectedValue: p(e.value),
@@ -925,7 +925,7 @@ let __tla = Promise.all([
925
925
  expected: p(e.value)
926
926
  }
927
927
  };
928
- const r = i.map((s)=>s.name).join(", ");
928
+ const r = a.map((s)=>s.name).join(", ");
929
929
  return {
930
930
  passed: !1,
931
931
  actualValue: r,
@@ -957,13 +957,13 @@ let __tla = Promise.all([
957
957
  IfcRelVoidsElement: "voiding",
958
958
  IfcRelFillsElement: "filling"
959
959
  };
960
- function Tt(e, t, a) {
961
- const i = a.getAncestors ? a.getAncestors(t, e.relation) : [];
962
- if (i.length === 0) {
963
- const r = a.getParent(t, e.relation);
964
- r && i.push(r);
960
+ function bt(e, t, i) {
961
+ const a = i.getAncestors ? i.getAncestors(t, e.relation) : [];
962
+ if (a.length === 0) {
963
+ const r = i.getParent(t, e.relation);
964
+ r && a.push(r);
965
965
  }
966
- if (i.length === 0) {
966
+ if (a.length === 0) {
967
967
  const r = L[e.relation] || e.relation, s = e.entity ? p(e.entity.name) : "any entity";
968
968
  return {
969
969
  passed: !1,
@@ -980,14 +980,14 @@ let __tla = Promise.all([
980
980
  };
981
981
  }
982
982
  let n;
983
- for (const r of i){
984
- const s = It(e, r);
983
+ for (const r of a){
984
+ const s = gt(e, r);
985
985
  if (s.passed) return s;
986
986
  (!n || s.failure?.type !== "PARTOF_ENTITY_MISMATCH" && n.failure?.type === "PARTOF_ENTITY_MISMATCH") && (n = s);
987
987
  }
988
988
  return n;
989
989
  }
990
- function It(e, t) {
990
+ function gt(e, t) {
991
991
  if (!e.entity) {
992
992
  const n = L[e.relation] || e.relation;
993
993
  return {
@@ -1045,27 +1045,27 @@ let __tla = Promise.all([
1045
1045
  }
1046
1046
  };
1047
1047
  }
1048
- const a = L[e.relation] || e.relation, i = t.predefinedType ? `${t.entityType}[${t.predefinedType}]` : t.entityType;
1048
+ const i = L[e.relation] || e.relation, a = t.predefinedType ? `${t.entityType}[${t.predefinedType}]` : t.entityType;
1049
1049
  return {
1050
1050
  passed: !0,
1051
- actualValue: `${a} ${i}`,
1052
- expectedValue: `${a} ${p(e.entity.name)}`
1051
+ actualValue: `${i} ${a}`,
1052
+ expectedValue: `${i} ${p(e.entity.name)}`
1053
1053
  };
1054
1054
  }
1055
- function se(e, t, a) {
1055
+ function le(e, t, i) {
1056
1056
  switch(e.type){
1057
1057
  case "entity":
1058
- return Ze(e, t, a);
1058
+ return tt(e, t, i);
1059
1059
  case "attribute":
1060
- return ct(e, t, a);
1060
+ return dt(e, t, i);
1061
1061
  case "property":
1062
- return ft(e, t, a);
1062
+ return ht(e, t, i);
1063
1063
  case "classification":
1064
- return vt(e, t, a);
1064
+ return Tt(e, t, i);
1065
1065
  case "material":
1066
- return Et(e, t, a);
1066
+ return It(e, t, i);
1067
1067
  case "partOf":
1068
- return Tt(e, t, a);
1068
+ return bt(e, t, i);
1069
1069
  default:
1070
1070
  return {
1071
1071
  passed: !1,
@@ -1077,18 +1077,18 @@ let __tla = Promise.all([
1077
1077
  };
1078
1078
  }
1079
1079
  }
1080
- function bt(e, t) {
1080
+ function St(e, t) {
1081
1081
  switch(e.type){
1082
1082
  case "entity":
1083
- return et(e, t);
1083
+ return it(e, t);
1084
1084
  default:
1085
1085
  return;
1086
1086
  }
1087
1087
  }
1088
- la = async function(e, t, a, i = {}) {
1089
- const { translator: n, onProgress: r, includePassingEntities: s = !0 } = i, l = [], o = e.specifications.length;
1088
+ oa = async function(e, t, i, a = {}) {
1089
+ const { translator: n, onProgress: r, includePassingEntities: s = !0 } = a, l = [], o = e.specifications.length;
1090
1090
  for(let c = 0; c < o; c++){
1091
- const f = e.specifications[c];
1091
+ const m = e.specifications[c];
1092
1092
  r && r({
1093
1093
  phase: "filtering",
1094
1094
  specificationIndex: c,
@@ -1097,12 +1097,12 @@ let __tla = Promise.all([
1097
1097
  totalEntities: 0,
1098
1098
  percentage: Math.floor(c / o * 100)
1099
1099
  });
1100
- const d = await gt(f, t, a, i, (m)=>{
1100
+ const d = await At(m, t, i, a, (f)=>{
1101
1101
  r && r({
1102
- ...m,
1102
+ ...f,
1103
1103
  specificationIndex: c,
1104
1104
  totalSpecifications: o,
1105
- percentage: Math.floor((c + m.entitiesProcessed / Math.max(m.totalEntities, 1)) / o * 100)
1105
+ percentage: Math.floor((c + f.entitiesProcessed / Math.max(f.totalEntities, 1)) / o * 100)
1106
1106
  });
1107
1107
  });
1108
1108
  l.push(d);
@@ -1115,17 +1115,17 @@ let __tla = Promise.all([
1115
1115
  totalEntities: 0,
1116
1116
  percentage: 100
1117
1117
  });
1118
- const u = Rt(l);
1118
+ const u = Nt(l);
1119
1119
  return {
1120
1120
  document: e,
1121
- modelInfo: a,
1121
+ modelInfo: i,
1122
1122
  timestamp: new Date,
1123
1123
  summary: u,
1124
1124
  specificationResults: l
1125
1125
  };
1126
1126
  };
1127
- async function gt(e, t, a, i, n) {
1128
- const { translator: r, maxEntities: s, includePassingEntities: l = !0 } = i, o = a.modelId, u = St(e, t), c = s ? u.slice(0, s) : u, f = [], d = c.length;
1127
+ async function At(e, t, i, a, n) {
1128
+ const { translator: r, maxEntities: s, includePassingEntities: l = !0 } = a, o = i.modelId, u = xt(e, t), c = s ? u.slice(0, s) : u, m = [], d = c.length;
1129
1129
  for(let I = 0; I < d; I++){
1130
1130
  const b = c[I];
1131
1131
  n && I % 100 === 0 && n({
@@ -1133,43 +1133,43 @@ let __tla = Promise.all([
1133
1133
  entitiesProcessed: I,
1134
1134
  totalEntities: d
1135
1135
  });
1136
- const P = At(e, b, o, t, r);
1137
- (l || !P.passed) && f.push(P);
1136
+ const P = Ct(e, b, o, t, r);
1137
+ (l || !P.passed) && m.push(P);
1138
1138
  }
1139
- let m = 0, y = 0;
1140
- for (const I of f)I.passed ? m++ : y++;
1141
- l || (m = d - y);
1142
- const M = Ct(e, u.length);
1139
+ let f = 0, y = 0;
1140
+ for (const I of m)I.passed ? f++ : y++;
1141
+ l || (f = d - y);
1142
+ const M = Mt(e, u.length);
1143
1143
  let x = "pass";
1144
1144
  u.length === 0 ? M?.passed === !1 ? x = "fail" : M?.passed === !0 ? x = "pass" : x = "not_applicable" : (y > 0 || M?.passed === !1) && (x = "fail");
1145
- const _ = d > 0 ? Math.floor(m / d * 100) : 100;
1145
+ const _ = d > 0 ? Math.floor(f / d * 100) : 100;
1146
1146
  return {
1147
1147
  specification: e,
1148
1148
  status: x,
1149
1149
  applicableCount: u.length,
1150
- passedCount: m,
1150
+ passedCount: f,
1151
1151
  failedCount: y,
1152
1152
  passRate: _,
1153
- entityResults: f,
1153
+ entityResults: m,
1154
1154
  cardinalityResult: M
1155
1155
  };
1156
1156
  }
1157
- function St(e, t) {
1158
- const a = e.applicability.facets;
1159
- if (a.length === 0) return t.getAllEntityIds();
1160
- let i;
1161
- for (const r of a){
1162
- const s = bt(r, t);
1157
+ function xt(e, t) {
1158
+ const i = e.applicability.facets;
1159
+ if (i.length === 0) return t.getAllEntityIds();
1160
+ let a;
1161
+ for (const r of i){
1162
+ const s = St(r, t);
1163
1163
  if (s !== void 0) {
1164
- i = s;
1164
+ a = s;
1165
1165
  break;
1166
1166
  }
1167
1167
  }
1168
- i === void 0 && (i = t.getAllEntityIds());
1168
+ a === void 0 && (a = t.getAllEntityIds());
1169
1169
  const n = [];
1170
- for (const r of i){
1170
+ for (const r of a){
1171
1171
  let s = !0;
1172
- for (const l of a)if (!se(l, r, t).passed) {
1172
+ for (const l of i)if (!le(l, r, t).passed) {
1173
1173
  s = !1;
1174
1174
  break;
1175
1175
  }
@@ -1177,29 +1177,29 @@ let __tla = Promise.all([
1177
1177
  }
1178
1178
  return n;
1179
1179
  }
1180
- function At(e, t, a, i, n) {
1180
+ function Ct(e, t, i, a, n) {
1181
1181
  const r = [];
1182
1182
  let s = !0;
1183
1183
  for (const l of e.requirements){
1184
- const o = xt(l, t, i, n);
1184
+ const o = Rt(l, t, a, n);
1185
1185
  r.push(o), o.status === "fail" && (s = !1);
1186
1186
  }
1187
1187
  return {
1188
1188
  expressId: t,
1189
- modelId: a,
1190
- entityType: i.getEntityType(t) || "Unknown",
1191
- entityName: i.getEntityName(t),
1192
- globalId: i.getGlobalId(t),
1189
+ modelId: i,
1190
+ entityType: a.getEntityType(t) || "Unknown",
1191
+ entityName: a.getEntityName(t),
1192
+ globalId: a.getGlobalId(t),
1193
1193
  passed: s,
1194
1194
  requirementResults: r
1195
1195
  };
1196
1196
  }
1197
- function xt(e, t, a, i) {
1198
- const n = se(e.facet, t, a);
1197
+ function Rt(e, t, i, a) {
1198
+ const n = le(e.facet, t, i);
1199
1199
  let r, s;
1200
1200
  switch(e.optionality){
1201
1201
  case "required":
1202
- r = n.passed ? "pass" : "fail", n.passed || (s = i ? i.describeFailure({
1202
+ r = n.passed ? "pass" : "fail", n.passed || (s = a ? a.describeFailure({
1203
1203
  requirement: e,
1204
1204
  status: "fail",
1205
1205
  facetType: e.facet.type,
@@ -1207,7 +1207,7 @@ let __tla = Promise.all([
1207
1207
  actualValue: n.actualValue,
1208
1208
  expectedValue: n.expectedValue,
1209
1209
  failure: n.failure
1210
- }) : X(n));
1210
+ }) : G(n));
1211
1211
  break;
1212
1212
  case "optional":
1213
1213
  if (n.passed) r = "pass";
@@ -1220,7 +1220,7 @@ let __tla = Promise.all([
1220
1220
  "MATERIAL_MISSING",
1221
1221
  "PARTOF_RELATION_MISSING"
1222
1222
  ]);
1223
- n.failure?.type && o.has(n.failure.type) ? r = "pass" : (r = "fail", s = i ? i.describeFailure({
1223
+ n.failure?.type && o.has(n.failure.type) ? r = "pass" : (r = "fail", s = a ? a.describeFailure({
1224
1224
  requirement: e,
1225
1225
  status: "fail",
1226
1226
  facetType: e.facet.type,
@@ -1228,18 +1228,18 @@ let __tla = Promise.all([
1228
1228
  actualValue: n.actualValue,
1229
1229
  expectedValue: n.expectedValue,
1230
1230
  failure: n.failure
1231
- }) : X(n));
1231
+ }) : G(n));
1232
1232
  }
1233
1233
  break;
1234
1234
  case "prohibited":
1235
- r = n.passed ? "fail" : "pass", r === "fail" && (s = i ? i.t("failures.prohibited", {
1235
+ r = n.passed ? "fail" : "pass", r === "fail" && (s = a ? a.t("failures.prohibited", {
1236
1236
  field: n.actualValue || "value"
1237
1237
  }) : `Prohibited: found ${n.actualValue}`);
1238
1238
  break;
1239
1239
  default:
1240
1240
  r = n.passed ? "pass" : "fail";
1241
1241
  }
1242
- const l = i ? i.describeRequirement(e) : Mt(e);
1242
+ const l = a ? a.describeRequirement(e) : _t(e);
1243
1243
  return {
1244
1244
  requirement: e,
1245
1245
  status: r,
@@ -1251,12 +1251,12 @@ let __tla = Promise.all([
1251
1251
  failure: n.failure
1252
1252
  };
1253
1253
  }
1254
- function Ct(e, t) {
1254
+ function Mt(e, t) {
1255
1255
  if (e.minOccurs === void 0 && e.maxOccurs === void 0) return;
1256
- const a = e.minOccurs ?? 0, i = e.maxOccurs;
1256
+ const i = e.minOccurs ?? 0, a = e.maxOccurs;
1257
1257
  let n = !0;
1258
1258
  const r = [];
1259
- return t < a && (n = !1, r.push(`Expected at least ${a}, found ${t}`)), i !== "unbounded" && i !== void 0 && t > i && (n = !1, r.push(`Expected at most ${i}, found ${t}`)), {
1259
+ return t < i && (n = !1, r.push(`Expected at least ${i}, found ${t}`)), a !== "unbounded" && a !== void 0 && t > a && (n = !1, r.push(`Expected at most ${a}, found ${t}`)), {
1260
1260
  passed: n,
1261
1261
  actualCount: t,
1262
1262
  minExpected: e.minOccurs,
@@ -1264,117 +1264,117 @@ let __tla = Promise.all([
1264
1264
  message: r.length > 0 ? r.join("; ") : "Cardinality satisfied"
1265
1265
  };
1266
1266
  }
1267
- function Rt(e) {
1268
- let t = e.length, a = 0, i = 0, n = 0, r = 0, s = 0;
1269
- for (const o of e)o.status === "pass" ? a++ : o.status === "fail" && i++, n += o.applicableCount, r += o.passedCount, s += o.failedCount;
1267
+ function Nt(e) {
1268
+ let t = e.length, i = 0, a = 0, n = 0, r = 0, s = 0;
1269
+ for (const o of e)o.status === "pass" ? i++ : o.status === "fail" && a++, n += o.applicableCount, r += o.passedCount, s += o.failedCount;
1270
1270
  const l = n > 0 ? Math.floor(r / n * 100) : 100;
1271
1271
  return {
1272
1272
  totalSpecifications: t,
1273
- passedSpecifications: a,
1274
- failedSpecifications: i,
1273
+ passedSpecifications: i,
1274
+ failedSpecifications: a,
1275
1275
  totalEntitiesChecked: n,
1276
1276
  totalEntitiesPassed: r,
1277
1277
  totalEntitiesFailed: s,
1278
1278
  overallPassRate: l
1279
1279
  };
1280
1280
  }
1281
- function X(e) {
1281
+ function G(e) {
1282
1282
  if (!e.failure) return `Expected ${e.expectedValue}, got ${e.actualValue}`;
1283
- const { type: t, field: a, actual: i, expected: n } = e.failure;
1283
+ const { type: t, field: i, actual: a, expected: n } = e.failure;
1284
1284
  switch(t){
1285
1285
  case "ENTITY_TYPE_MISMATCH":
1286
- return `Entity type "${i}" does not match expected ${n}`;
1286
+ return `Entity type "${a}" does not match expected ${n}`;
1287
1287
  case "PREDEFINED_TYPE_MISMATCH":
1288
- return `Predefined type "${i}" does not match expected ${n}`;
1288
+ return `Predefined type "${a}" does not match expected ${n}`;
1289
1289
  case "PREDEFINED_TYPE_MISSING":
1290
1290
  return `Predefined type is missing, expected ${n}`;
1291
1291
  case "ATTRIBUTE_MISSING":
1292
- return `Attribute "${a}" is missing`;
1292
+ return `Attribute "${i}" is missing`;
1293
1293
  case "ATTRIBUTE_VALUE_MISMATCH":
1294
- return `Attribute "${a}" value "${i}" does not match expected ${n}`;
1294
+ return `Attribute "${i}" value "${a}" does not match expected ${n}`;
1295
1295
  case "ATTRIBUTE_PATTERN_MISMATCH":
1296
- return `Attribute "${a}" value "${i}" does not match pattern ${n}`;
1296
+ return `Attribute "${i}" value "${a}" does not match pattern ${n}`;
1297
1297
  case "PSET_MISSING":
1298
- return `Property set "${a || n}" not found`;
1298
+ return `Property set "${i || n}" not found`;
1299
1299
  case "PROPERTY_MISSING":
1300
- return `Property "${a}" not found`;
1300
+ return `Property "${i}" not found`;
1301
1301
  case "PROPERTY_VALUE_MISMATCH":
1302
- return `Property "${a}" value "${i}" does not match expected ${n}`;
1302
+ return `Property "${i}" value "${a}" does not match expected ${n}`;
1303
1303
  case "PROPERTY_DATATYPE_MISMATCH":
1304
- return `Property "${a}" type "${i}" does not match expected ${n}`;
1304
+ return `Property "${i}" type "${a}" does not match expected ${n}`;
1305
1305
  case "PROPERTY_OUT_OF_BOUNDS":
1306
- return `Property "${a}" value ${i} is out of bounds ${n}`;
1306
+ return `Property "${i}" value ${a} is out of bounds ${n}`;
1307
1307
  case "CLASSIFICATION_MISSING":
1308
1308
  return "No classification found";
1309
1309
  case "CLASSIFICATION_SYSTEM_MISMATCH":
1310
- return `Classification system "${i}" does not match expected ${n}`;
1310
+ return `Classification system "${a}" does not match expected ${n}`;
1311
1311
  case "CLASSIFICATION_VALUE_MISMATCH":
1312
- return `Classification value "${i}" does not match expected ${n}`;
1312
+ return `Classification value "${a}" does not match expected ${n}`;
1313
1313
  case "MATERIAL_MISSING":
1314
1314
  return "No material assigned";
1315
1315
  case "MATERIAL_VALUE_MISMATCH":
1316
- return `Material "${i}" does not match expected ${n}`;
1316
+ return `Material "${a}" does not match expected ${n}`;
1317
1317
  case "PARTOF_RELATION_MISSING":
1318
- return `Not ${a} any entity`;
1318
+ return `Not ${i} any entity`;
1319
1319
  case "PARTOF_ENTITY_MISMATCH":
1320
- return `Parent entity "${i}" does not match expected ${n}`;
1320
+ return `Parent entity "${a}" does not match expected ${n}`;
1321
1321
  case "PARTOF_PREDEFINED_TYPE_MISSING":
1322
1322
  return `Parent entity predefined type is missing, expected ${n}`;
1323
1323
  case "PARTOF_PREDEFINED_TYPE_MISMATCH":
1324
- return `Parent entity predefined type "${i}" does not match expected ${n}`;
1324
+ return `Parent entity predefined type "${a}" does not match expected ${n}`;
1325
1325
  default:
1326
1326
  return `Validation failed: ${t}`;
1327
1327
  }
1328
1328
  }
1329
- function Mt(e) {
1330
- const t = e.facet, a = e.optionality;
1331
- let i;
1329
+ function _t(e) {
1330
+ const t = e.facet, i = e.optionality;
1331
+ let a;
1332
1332
  switch(t.type){
1333
1333
  case "entity":
1334
- i = `Must be ${p(t.name)}`, t.predefinedType && (i += ` with predefinedType ${p(t.predefinedType)}`);
1334
+ a = `Must be ${p(t.name)}`, t.predefinedType && (a += ` with predefinedType ${p(t.predefinedType)}`);
1335
1335
  break;
1336
1336
  case "attribute":
1337
- t.value ? i = `Attribute "${p(t.name)}" must equal ${p(t.value)}` : i = `Attribute "${p(t.name)}" must exist`;
1337
+ t.value ? a = `Attribute "${p(t.name)}" must equal ${p(t.value)}` : a = `Attribute "${p(t.name)}" must exist`;
1338
1338
  break;
1339
1339
  case "property":
1340
- t.value ? i = `Property "${p(t.propertySet)}.${p(t.baseName)}" must equal ${p(t.value)}` : i = `Property "${p(t.propertySet)}.${p(t.baseName)}" must exist`;
1340
+ t.value ? a = `Property "${p(t.propertySet)}.${p(t.baseName)}" must equal ${p(t.value)}` : a = `Property "${p(t.propertySet)}.${p(t.baseName)}" must exist`;
1341
1341
  break;
1342
1342
  case "classification":
1343
- t.system && t.value ? i = `Must have classification ${p(t.value)} in ${p(t.system)}` : t.system ? i = `Must be classified in ${p(t.system)}` : t.value ? i = `Must have classification ${p(t.value)}` : i = "Must have a classification";
1343
+ t.system && t.value ? a = `Must have classification ${p(t.value)} in ${p(t.system)}` : t.system ? a = `Must be classified in ${p(t.system)}` : t.value ? a = `Must have classification ${p(t.value)}` : a = "Must have a classification";
1344
1344
  break;
1345
1345
  case "material":
1346
- t.value ? i = `Must have material ${p(t.value)}` : i = "Must have a material assigned";
1346
+ t.value ? a = `Must have material ${p(t.value)}` : a = "Must have a material assigned";
1347
1347
  break;
1348
1348
  case "partOf":
1349
1349
  {
1350
1350
  const n = t.relation.replace("IfcRel", "").toLowerCase();
1351
- t.entity ? i = `Must be ${n} ${p(t.entity.name)}` : i = `Must be ${n} some entity`;
1351
+ t.entity ? a = `Must be ${n} ${p(t.entity.name)}` : a = `Must be ${n} some entity`;
1352
1352
  break;
1353
1353
  }
1354
1354
  default:
1355
- i = "Unknown requirement";
1355
+ a = "Unknown requirement";
1356
1356
  }
1357
- return a === "prohibited" ? i = i.replace("Must", "Must NOT").replace("must", "must NOT") : a === "optional" && (i = i.replace("Must", "Should").replace("must", "should")), i;
1357
+ return i === "prohibited" ? a = a.replace("Must", "Must NOT").replace("must", "must NOT") : i === "optional" && (a = a.replace("Must", "Should").replace("must", "should")), a;
1358
1358
  }
1359
- function Nt(e) {
1359
+ function Pt(e) {
1360
1360
  if (/\[[^\]]*-\[/.test(e)) return {
1361
1361
  pattern: e,
1362
1362
  supported: !1,
1363
1363
  reason: "XSD character-class subtraction is not supported in JS regex"
1364
1364
  };
1365
- let t = "", a = 0;
1366
- for(; a < e.length;){
1367
- const i = e.charAt(a);
1368
- if (i === "\\" && a + 1 < e.length) {
1369
- const n = e.charAt(a + 1), r = _t(n);
1365
+ let t = "", i = 0;
1366
+ for(; i < e.length;){
1367
+ const a = e.charAt(i);
1368
+ if (a === "\\" && i + 1 < e.length) {
1369
+ const n = e.charAt(i + 1), r = $t(n);
1370
1370
  if (r) {
1371
- t += r, a += 2;
1371
+ t += r, i += 2;
1372
1372
  continue;
1373
1373
  }
1374
- t += i + n, a += 2;
1374
+ t += a + n, i += 2;
1375
1375
  continue;
1376
1376
  }
1377
- t += i, a++;
1377
+ t += a, i++;
1378
1378
  }
1379
1379
  return {
1380
1380
  pattern: t,
@@ -1382,7 +1382,7 @@ let __tla = Promise.all([
1382
1382
  reason: ""
1383
1383
  };
1384
1384
  }
1385
- function _t(e) {
1385
+ function $t(e) {
1386
1386
  switch(e){
1387
1387
  case "i":
1388
1388
  return "[\\p{L}_:]";
@@ -1404,13 +1404,13 @@ let __tla = Promise.all([
1404
1404
  return;
1405
1405
  }
1406
1406
  }
1407
- function Pt(e) {
1407
+ function wt(e) {
1408
1408
  if (e === "") return {
1409
1409
  ok: !1,
1410
1410
  severity: "error",
1411
1411
  reason: "pattern is empty"
1412
1412
  };
1413
- const t = Nt(e);
1413
+ const t = Pt(e);
1414
1414
  if (!t.supported) return {
1415
1415
  ok: !1,
1416
1416
  severity: "warning",
@@ -1421,31 +1421,31 @@ let __tla = Promise.all([
1421
1421
  ok: !0,
1422
1422
  jsPattern: t.pattern
1423
1423
  };
1424
- } catch (a) {
1424
+ } catch (i) {
1425
1425
  return {
1426
1426
  ok: !1,
1427
1427
  severity: "error",
1428
- reason: a instanceof Error ? a.message : String(a)
1428
+ reason: i instanceof Error ? i.message : String(i)
1429
1429
  };
1430
1430
  }
1431
1431
  }
1432
- function $t(e) {
1432
+ function Ft(e) {
1433
1433
  const t = [];
1434
- return e.specifications.forEach((a, i)=>{
1435
- wt(a, `specifications[${i}]`, t);
1434
+ return e.specifications.forEach((i, a)=>{
1435
+ Ot(i, `specifications[${a}]`, t);
1436
1436
  }), t;
1437
1437
  }
1438
- function wt(e, t, a) {
1439
- const i = e.minOccurs, n = e.maxOccurs;
1440
- i !== void 0 && (!Number.isInteger(i) || i < 0) && a.push({
1438
+ function Ot(e, t, i) {
1439
+ const a = e.minOccurs, n = e.maxOccurs;
1440
+ a !== void 0 && (!Number.isInteger(a) || a < 0) && i.push({
1441
1441
  severity: "error",
1442
1442
  code: "E_CARDINALITY_INVALID",
1443
- message: `minOccurs must be a non-negative integer; got ${i}`,
1443
+ message: `minOccurs must be a non-negative integer; got ${a}`,
1444
1444
  path: `${t}.minOccurs`,
1445
1445
  detail: {
1446
- value: String(i)
1446
+ value: String(a)
1447
1447
  }
1448
- }), n !== void 0 && n !== "unbounded" && (!Number.isInteger(n) || n < 0) && a.push({
1448
+ }), n !== void 0 && n !== "unbounded" && (!Number.isInteger(n) || n < 0) && i.push({
1449
1449
  severity: "error",
1450
1450
  code: "E_CARDINALITY_INVALID",
1451
1451
  message: `maxOccurs must be a non-negative integer or "unbounded"; got ${n}`,
@@ -1453,28 +1453,28 @@ let __tla = Promise.all([
1453
1453
  detail: {
1454
1454
  value: String(n)
1455
1455
  }
1456
- }), typeof i == "number" && typeof n == "number" && i > n && a.push({
1456
+ }), typeof a == "number" && typeof n == "number" && a > n && i.push({
1457
1457
  severity: "error",
1458
1458
  code: "E_CARDINALITY_INVALID",
1459
- message: `minOccurs (${i}) is greater than maxOccurs (${n})`,
1459
+ message: `minOccurs (${a}) is greater than maxOccurs (${n})`,
1460
1460
  path: `${t}.minOccurs`,
1461
1461
  detail: {
1462
- min: i,
1462
+ min: a,
1463
1463
  max: n
1464
1464
  }
1465
- }), e.applicability.cardinality && a.push({
1465
+ }), e.applicability.cardinality && i.push({
1466
1466
  severity: "warning",
1467
1467
  code: "W_CARDINALITY_PROHIBITED_APPLICABILITY",
1468
1468
  message: `cardinality="${e.applicability.cardinality}" has no effect on <applicability>`,
1469
1469
  path: `${t}.applicability.cardinality`
1470
1470
  }), e.applicability.facets.forEach((r, s)=>{
1471
- k(r, `${t}.applicability.facets[${s}]`, a);
1471
+ k(r, `${t}.applicability.facets[${s}]`, i);
1472
1472
  }), e.requirements.forEach((r, s)=>{
1473
- k(r.facet, `${t}.requirements[${s}]`, a), Ft(r, `${t}.requirements[${s}]`, a);
1473
+ k(r.facet, `${t}.requirements[${s}]`, i), Lt(r, `${t}.requirements[${s}]`, i);
1474
1474
  });
1475
1475
  }
1476
- function Ft(e, t, a) {
1477
- switch(e.cardinalityRaw !== void 0 && a.push({
1476
+ function Lt(e, t, i) {
1477
+ switch(e.cardinalityRaw !== void 0 && i.push({
1478
1478
  severity: "error",
1479
1479
  code: "E_CARDINALITY_INVALID",
1480
1480
  message: `@cardinality="${e.cardinalityRaw}" is not a valid value; expected one of {required, optional, prohibited}`,
@@ -1486,14 +1486,14 @@ let __tla = Promise.all([
1486
1486
  }), e.facet.type){
1487
1487
  case "property":
1488
1488
  {
1489
- const i = e.facet.dataType !== void 0;
1490
- e.optionality === "optional" && !i && a.push({
1489
+ const a = e.facet.dataType !== void 0;
1490
+ e.optionality === "optional" && !a && i.push({
1491
1491
  severity: "error",
1492
1492
  code: "E_CARDINALITY_INVALID",
1493
1493
  message: "optional <property> requirement requires @dataType to be specified",
1494
1494
  path: `${t}.cardinality`,
1495
1495
  facetType: "property"
1496
- }), e.optionality === "prohibited" && i && a.push({
1496
+ }), e.optionality === "prohibited" && a && i.push({
1497
1497
  severity: "error",
1498
1498
  code: "E_CARDINALITY_INVALID",
1499
1499
  message: "prohibited <property> requirement is incompatible with @dataType",
@@ -1504,7 +1504,7 @@ let __tla = Promise.all([
1504
1504
  }
1505
1505
  case "material":
1506
1506
  {
1507
- e.optionality === "optional" && (e.facet.value !== void 0 && !D(e.facet.value) || a.push({
1507
+ e.optionality === "optional" && (e.facet.value !== void 0 && !D(e.facet.value) || i.push({
1508
1508
  severity: "error",
1509
1509
  code: "E_CARDINALITY_INVALID",
1510
1510
  message: "optional <material> requirement must specify a non-empty <value> constraint",
@@ -1516,8 +1516,8 @@ let __tla = Promise.all([
1516
1516
  case "classification":
1517
1517
  {
1518
1518
  if (e.optionality === "optional") {
1519
- const i = e.facet.system !== void 0 && !D(e.facet.system), n = e.facet.value !== void 0 && !D(e.facet.value);
1520
- !i && !n && a.push({
1519
+ const a = e.facet.system !== void 0 && !D(e.facet.system), n = e.facet.value !== void 0 && !D(e.facet.value);
1520
+ !a && !n && i.push({
1521
1521
  severity: "error",
1522
1522
  code: "E_CARDINALITY_INVALID",
1523
1523
  message: "optional <classification> requirement must specify <system> or <value>",
@@ -1541,49 +1541,49 @@ let __tla = Promise.all([
1541
1541
  return e.minInclusive === void 0 && e.maxInclusive === void 0 && e.minExclusive === void 0 && e.maxExclusive === void 0 && e.length === void 0 && e.minLength === void 0 && e.maxLength === void 0;
1542
1542
  }
1543
1543
  }
1544
- function k(e, t, a) {
1544
+ function k(e, t, i) {
1545
1545
  switch(e.type){
1546
1546
  case "entity":
1547
- E(e.name, `${t}.name`, a, e.type), e.predefinedType && E(e.predefinedType, `${t}.predefinedType`, a, e.type);
1547
+ E(e.name, `${t}.name`, i, e.type), e.predefinedType && E(e.predefinedType, `${t}.predefinedType`, i, e.type);
1548
1548
  break;
1549
1549
  case "attribute":
1550
- E(e.name, `${t}.name`, a, e.type), e.value && E(e.value, `${t}.value`, a, e.type);
1550
+ E(e.name, `${t}.name`, i, e.type), e.value && E(e.value, `${t}.value`, i, e.type);
1551
1551
  break;
1552
1552
  case "property":
1553
- E(e.propertySet, `${t}.propertySet`, a, e.type), E(e.baseName, `${t}.baseName`, a, e.type), e.dataType && E(e.dataType, `${t}.dataType`, a, e.type), e.value && E(e.value, `${t}.value`, a, e.type);
1553
+ E(e.propertySet, `${t}.propertySet`, i, e.type), E(e.baseName, `${t}.baseName`, i, e.type), e.dataType && E(e.dataType, `${t}.dataType`, i, e.type), e.value && E(e.value, `${t}.value`, i, e.type);
1554
1554
  break;
1555
1555
  case "classification":
1556
- e.system && E(e.system, `${t}.system`, a, e.type), e.value && E(e.value, `${t}.value`, a, e.type);
1556
+ e.system && E(e.system, `${t}.system`, i, e.type), e.value && E(e.value, `${t}.value`, i, e.type);
1557
1557
  break;
1558
1558
  case "material":
1559
- e.value && E(e.value, `${t}.value`, a, e.type);
1559
+ e.value && E(e.value, `${t}.value`, i, e.type);
1560
1560
  break;
1561
1561
  case "partOf":
1562
- e.entity && k(e.entity, `${t}.entity`, a);
1562
+ e.entity && k(e.entity, `${t}.entity`, i);
1563
1563
  break;
1564
1564
  }
1565
1565
  }
1566
- function E(e, t, a, i) {
1566
+ function E(e, t, i, a) {
1567
1567
  switch(e.type){
1568
1568
  case "enumeration":
1569
- if (e.values.length === 0 ? a.push({
1569
+ if (e.values.length === 0 ? i.push({
1570
1570
  severity: "error",
1571
1571
  code: "E_RESTRICTION_EMPTY",
1572
1572
  message: "xs:enumeration must have at least one value",
1573
1573
  path: t,
1574
- facetType: i
1575
- }) : e.values.some((n)=>n === "" || n == null) && a.push({
1574
+ facetType: a
1575
+ }) : e.values.some((n)=>n === "" || n == null) && i.push({
1576
1576
  severity: "warning",
1577
1577
  code: "E_RESTRICTION_EMPTY",
1578
1578
  message: "xs:enumeration has an empty entry",
1579
1579
  path: t,
1580
- facetType: i
1581
- }), e.base) for (const n of e.values)n == null || n === "" || Dt(n, e.base) || a.push({
1580
+ facetType: a
1581
+ }), e.base) for (const n of e.values)n == null || n === "" || kt(n, e.base) || i.push({
1582
1582
  severity: "error",
1583
1583
  code: "E_RESTRICTION_VALUE_MISMATCH",
1584
1584
  message: `xs:enumeration value "${n}" is not valid for xs:restriction @base="${e.base}"`,
1585
1585
  path: t,
1586
- facetType: i,
1586
+ facetType: a,
1587
1587
  detail: {
1588
1588
  value: n,
1589
1589
  base: e.base
@@ -1591,78 +1591,78 @@ let __tla = Promise.all([
1591
1591
  });
1592
1592
  break;
1593
1593
  case "bounds":
1594
- Ot(e, t, a, i);
1594
+ Vt(e, t, i, a);
1595
1595
  break;
1596
1596
  case "pattern":
1597
- Lt(e.pattern, t, a, i);
1597
+ Dt(e.pattern, t, i, a);
1598
1598
  break;
1599
1599
  }
1600
1600
  }
1601
- function Ot(e, t, a, i) {
1601
+ function Vt(e, t, i, a) {
1602
1602
  const n = e.minInclusive ?? e.minExclusive, r = e.maxInclusive ?? e.maxExclusive;
1603
- typeof n == "number" && typeof r == "number" && n > r && a.push({
1603
+ typeof n == "number" && typeof r == "number" && n > r && i.push({
1604
1604
  severity: "error",
1605
1605
  code: "E_RESTRICTION_RANGE",
1606
1606
  message: `xs:restriction bounds inverted: lower (${n}) > upper (${r})`,
1607
1607
  path: t,
1608
- facetType: i,
1608
+ facetType: a,
1609
1609
  detail: {
1610
1610
  min: n,
1611
1611
  max: r
1612
1612
  }
1613
- }), typeof e.minLength == "number" && typeof e.maxLength == "number" && e.minLength > e.maxLength && a.push({
1613
+ }), typeof e.minLength == "number" && typeof e.maxLength == "number" && e.minLength > e.maxLength && i.push({
1614
1614
  severity: "error",
1615
1615
  code: "E_RESTRICTION_RANGE",
1616
1616
  message: `xs:restriction lengths inverted: minLength (${e.minLength}) > maxLength (${e.maxLength})`,
1617
1617
  path: t,
1618
- facetType: i,
1618
+ facetType: a,
1619
1619
  detail: {
1620
1620
  min: e.minLength,
1621
1621
  max: e.maxLength
1622
1622
  }
1623
- }), typeof e.length == "number" && (typeof e.minLength == "number" || typeof e.maxLength == "number") && a.push({
1623
+ }), typeof e.length == "number" && (typeof e.minLength == "number" || typeof e.maxLength == "number") && i.push({
1624
1624
  severity: "warning",
1625
1625
  code: "E_RESTRICTION_RANGE",
1626
1626
  message: "xs:length is mutually exclusive with xs:minLength/xs:maxLength",
1627
1627
  path: t,
1628
- facetType: i
1629
- }), e.minInclusive === void 0 && e.minExclusive === void 0 && e.maxInclusive === void 0 && e.maxExclusive === void 0 && e.length === void 0 && e.minLength === void 0 && e.maxLength === void 0 && a.push({
1628
+ facetType: a
1629
+ }), e.minInclusive === void 0 && e.minExclusive === void 0 && e.maxInclusive === void 0 && e.maxExclusive === void 0 && e.length === void 0 && e.minLength === void 0 && e.maxLength === void 0 && i.push({
1630
1630
  severity: "error",
1631
1631
  code: "E_RESTRICTION_EMPTY",
1632
1632
  message: "xs:restriction has no min/max bounds or length facets",
1633
1633
  path: t,
1634
- facetType: i
1634
+ facetType: a
1635
1635
  });
1636
1636
  }
1637
- function Lt(e, t, a, i) {
1638
- const n = Pt(e);
1637
+ function Dt(e, t, i, a) {
1638
+ const n = wt(e);
1639
1639
  if (!n.ok) {
1640
1640
  if (n.severity === "error") {
1641
- a.push({
1641
+ i.push({
1642
1642
  severity: "error",
1643
1643
  code: "E_RESTRICTION_EMPTY",
1644
1644
  message: e === "" ? "xs:pattern @value is empty" : `xs:pattern is not a valid regular expression: ${n.reason}`,
1645
1645
  path: t,
1646
- facetType: i,
1646
+ facetType: a,
1647
1647
  detail: e === "" ? void 0 : {
1648
1648
  pattern: e
1649
1649
  }
1650
1650
  });
1651
1651
  return;
1652
1652
  }
1653
- a.push({
1653
+ i.push({
1654
1654
  severity: "warning",
1655
1655
  code: "W_REGEX_UNVERIFIED",
1656
1656
  message: `xs:pattern uses XSD-specific syntax not verifiable in JS: ${n.reason}`,
1657
1657
  path: t,
1658
- facetType: i,
1658
+ facetType: a,
1659
1659
  detail: {
1660
1660
  pattern: e
1661
1661
  }
1662
1662
  });
1663
1663
  }
1664
1664
  }
1665
- const Vt = {
1665
+ const Ut = {
1666
1666
  "xs:integer": /^[+-]?(\d+)$/,
1667
1667
  "xs:double": /^([-+]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?|NaN|\+INF|-INF)$/,
1668
1668
  "xs:float": /^([-+]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?|NaN|\+INF|-INF)$/,
@@ -1673,42 +1673,42 @@ let __tla = Promise.all([
1673
1673
  "xs:time": /^\d{2}:\d{2}:\d{2}(\.\d+)?(Z|([+-]\d{2}:\d{2}))?$/,
1674
1674
  "xs:duration": /^[-+]?P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$/
1675
1675
  };
1676
- function Dt(e, t) {
1677
- const a = Vt[t];
1678
- return a ? (t === "xs:double" || t === "xs:float" || t === "xs:decimal") && !/[0-9]/.test(e) ? !1 : a.test(e) : !0;
1676
+ function kt(e, t) {
1677
+ const i = Ut[t];
1678
+ return i ? (t === "xs:double" || t === "xs:float" || t === "xs:decimal") && !/[0-9]/.test(e) ? !1 : i.test(e) : !0;
1679
1679
  }
1680
- async function Ut(e, t) {
1681
- const a = [];
1682
- for(let i = 0; i < e.specifications.length; i++){
1683
- const n = e.specifications[i], r = kt(n, t.ifcVersion);
1680
+ async function Bt(e, t) {
1681
+ const i = [];
1682
+ for(let a = 0; a < e.specifications.length; a++){
1683
+ const n = e.specifications[a], r = qt(n, t.ifcVersion);
1684
1684
  if (r.length === 0) continue;
1685
1685
  const s = new Set;
1686
1686
  for (const l of r){
1687
1687
  const o = [];
1688
- await Bt(n, l, `specifications[${i}]`, o);
1688
+ await Yt(n, l, `specifications[${a}]`, o);
1689
1689
  for (const u of o){
1690
1690
  const c = `${u.code}|${u.path}|${u.message}`;
1691
- s.has(c) || (s.add(c), a.push(u));
1691
+ s.has(c) || (s.add(c), i.push(u));
1692
1692
  }
1693
1693
  }
1694
1694
  }
1695
- return a;
1695
+ return i;
1696
1696
  }
1697
- function kt(e, t) {
1697
+ function qt(e, t) {
1698
1698
  if (t) {
1699
- const n = G(t);
1699
+ const n = X(t);
1700
1700
  return n ? [
1701
1701
  n
1702
1702
  ] : [];
1703
1703
  }
1704
- const a = [], i = new Set;
1704
+ const i = [], a = new Set;
1705
1705
  for (const n of e.ifcVersions){
1706
- const r = G(n);
1707
- r && !i.has(r) && (i.add(r), a.push(r));
1706
+ const r = X(n);
1707
+ r && !a.has(r) && (a.add(r), i.push(r));
1708
1708
  }
1709
- return a;
1709
+ return i;
1710
1710
  }
1711
- function G(e) {
1711
+ function X(e) {
1712
1712
  switch(e){
1713
1713
  case "IFC2X3":
1714
1714
  case "IFC4":
@@ -1719,49 +1719,49 @@ let __tla = Promise.all([
1719
1719
  return;
1720
1720
  }
1721
1721
  }
1722
- async function Bt(e, t, a, i) {
1722
+ async function Yt(e, t, i, a) {
1723
1723
  const n = e.applicability.facets.find((r)=>r.type === "entity");
1724
1724
  for(let r = 0; r < e.applicability.facets.length; r++){
1725
1725
  const s = e.applicability.facets[r];
1726
- await j(s, t, `${a}.applicability.facets[${r}]`, n, i);
1726
+ await j(s, t, `${i}.applicability.facets[${r}]`, n, a);
1727
1727
  }
1728
1728
  for(let r = 0; r < e.requirements.length; r++){
1729
1729
  const s = e.requirements[r];
1730
- await j(s.facet, t, `${a}.requirements[${r}]`, n, i);
1730
+ await j(s.facet, t, `${i}.requirements[${r}]`, n, a);
1731
1731
  }
1732
1732
  }
1733
- async function j(e, t, a, i, n) {
1733
+ async function j(e, t, i, a, n) {
1734
1734
  switch(e.type){
1735
1735
  case "entity":
1736
- await Ht(e, t, a, n);
1736
+ await Xt(e, t, i, n);
1737
1737
  break;
1738
1738
  case "property":
1739
- await Gt(e, t, a, i, n);
1739
+ await Wt(e, t, i, a, n);
1740
1740
  break;
1741
1741
  case "attribute":
1742
- await Zt(e, t, a, i, n);
1742
+ await ti(e, t, i, a, n);
1743
1743
  break;
1744
1744
  case "partOf":
1745
- await ti(e, t, a, i, n);
1745
+ await ai(e, t, i, a, n);
1746
1746
  break;
1747
1747
  case "classification":
1748
- await qt(t, i, a, n);
1748
+ await Ht(t, a, i, n);
1749
1749
  break;
1750
1750
  case "material":
1751
- await Yt(t, i, a, n);
1751
+ await Gt(t, a, i, n);
1752
1752
  break;
1753
1753
  }
1754
1754
  }
1755
- async function qt(e, t, a, i) {
1755
+ async function Ht(e, t, i, a) {
1756
1756
  if (!t || t.name.type !== "simpleValue") return;
1757
1757
  const n = t.name.value;
1758
1758
  if (!n) return;
1759
1759
  const r = e === "IFC2X3" ? "IfcRoot" : "IfcObjectDefinition";
1760
- await $(e, n, r) || i.push({
1760
+ await $(e, n, r) || a.push({
1761
1761
  severity: "error",
1762
1762
  code: "E_IFC_PARTOF_ENTITY",
1763
1763
  message: `applicability entity "${n}" cannot be classified in ${e} (must be a subtype of ${r})`,
1764
- path: a,
1764
+ path: i,
1765
1765
  facetType: "classification",
1766
1766
  detail: {
1767
1767
  value: n,
@@ -1770,16 +1770,16 @@ let __tla = Promise.all([
1770
1770
  }
1771
1771
  });
1772
1772
  }
1773
- async function Yt(e, t, a, i) {
1773
+ async function Gt(e, t, i, a) {
1774
1774
  if (!t || t.name.type !== "simpleValue") return;
1775
1775
  const n = t.name.value;
1776
1776
  if (!n) return;
1777
1777
  const r = e === "IFC2X3" ? "IfcRoot" : "IfcObjectDefinition";
1778
- await $(e, n, r) || i.push({
1778
+ await $(e, n, r) || a.push({
1779
1779
  severity: "error",
1780
1780
  code: "E_IFC_PARTOF_ENTITY",
1781
1781
  message: `applicability entity "${n}" cannot have a material in ${e} (must be a subtype of ${r})`,
1782
- path: a,
1782
+ path: i,
1783
1783
  facetType: "material",
1784
1784
  detail: {
1785
1785
  value: n,
@@ -1788,17 +1788,17 @@ let __tla = Promise.all([
1788
1788
  }
1789
1789
  });
1790
1790
  }
1791
- async function Ht(e, t, a, i) {
1791
+ async function Xt(e, t, i, a) {
1792
1792
  if (e.name.type !== "simpleValue") return;
1793
1793
  const n = e.name.value;
1794
1794
  if (!n) return;
1795
- const r = await J(t, n);
1795
+ const r = await Z(t, n);
1796
1796
  if (!r) {
1797
- i.push({
1797
+ a.push({
1798
1798
  severity: "error",
1799
1799
  code: "E_IFC_ENTITY_UNKNOWN",
1800
1800
  message: `entity name "${n}" is not a known IFC entity for ${t}`,
1801
- path: `${a}.name`,
1801
+ path: `${i}.name`,
1802
1802
  facetType: "entity",
1803
1803
  detail: {
1804
1804
  value: n,
@@ -1807,9 +1807,9 @@ let __tla = Promise.all([
1807
1807
  });
1808
1808
  return;
1809
1809
  }
1810
- e.predefinedType && r.predefinedTypes.length > 0 && Xt(e.predefinedType, r, t, `${a}.predefinedType`, i);
1810
+ e.predefinedType && r.predefinedTypes.length > 0 && jt(e.predefinedType, r, t, `${i}.predefinedType`, a);
1811
1811
  }
1812
- function Xt(e, t, a, i, n) {
1812
+ function jt(e, t, i, a, n) {
1813
1813
  const r = (s)=>t.predefinedTypes.includes(s.toUpperCase());
1814
1814
  switch(e.type){
1815
1815
  case "simpleValue":
@@ -1818,13 +1818,13 @@ let __tla = Promise.all([
1818
1818
  s && !r(s) && n.push({
1819
1819
  severity: "error",
1820
1820
  code: "E_IFC_PREDEF_TYPE_INVALID",
1821
- message: `predefined type "${s}" is not valid for ${t.name} (${a})`,
1822
- path: i,
1821
+ message: `predefined type "${s}" is not valid for ${t.name} (${i})`,
1822
+ path: a,
1823
1823
  facetType: "entity",
1824
1824
  detail: {
1825
1825
  value: s,
1826
1826
  entity: t.name,
1827
- version: a
1827
+ version: i
1828
1828
  }
1829
1829
  });
1830
1830
  break;
@@ -1834,13 +1834,13 @@ let __tla = Promise.all([
1834
1834
  for (const s of e.values)s && !r(s) && n.push({
1835
1835
  severity: "error",
1836
1836
  code: "E_IFC_PREDEF_TYPE_INVALID",
1837
- message: `predefined type enumeration value "${s}" is not valid for ${t.name} (${a})`,
1838
- path: i,
1837
+ message: `predefined type enumeration value "${s}" is not valid for ${t.name} (${i})`,
1838
+ path: a,
1839
1839
  facetType: "entity",
1840
1840
  detail: {
1841
1841
  value: s,
1842
1842
  entity: t.name,
1843
- version: a
1843
+ version: i
1844
1844
  }
1845
1845
  });
1846
1846
  break;
@@ -1852,13 +1852,13 @@ let __tla = Promise.all([
1852
1852
  t.predefinedTypes.some((o)=>s.test(o)) || n.push({
1853
1853
  severity: "error",
1854
1854
  code: "E_IFC_PREDEF_TYPE_INVALID",
1855
- message: `predefined type pattern "${e.pattern}" matches no value for ${t.name} (${a})`,
1856
- path: i,
1855
+ message: `predefined type pattern "${e.pattern}" matches no value for ${t.name} (${i})`,
1856
+ path: a,
1857
1857
  facetType: "entity",
1858
1858
  detail: {
1859
1859
  pattern: e.pattern,
1860
1860
  entity: t.name,
1861
- version: a
1861
+ version: i
1862
1862
  }
1863
1863
  });
1864
1864
  } catch {}
@@ -1866,16 +1866,16 @@ let __tla = Promise.all([
1866
1866
  }
1867
1867
  }
1868
1868
  }
1869
- async function Gt(e, t, a, i, n) {
1869
+ async function Wt(e, t, i, a, n) {
1870
1870
  if (e.dataType && e.dataType.type === "simpleValue") {
1871
1871
  const o = e.dataType.value;
1872
1872
  if (o) {
1873
- const u = await ve(t, o);
1874
- u ? e.value && Wt(e.value, u.backingType, o, `${a}.value`, n) : n.push({
1873
+ const u = await Te(t, o);
1874
+ u ? e.value && Kt(e.value, u.backingType, o, `${i}.value`, n) : n.push({
1875
1875
  severity: "error",
1876
1876
  code: "E_IFC_DATATYPE_UNKNOWN",
1877
1877
  message: `dataType "${o}" is not a known IFC measure/type for ${t}`,
1878
- path: `${a}.dataType`,
1878
+ path: `${i}.dataType`,
1879
1879
  facetType: "property",
1880
1880
  detail: {
1881
1881
  value: o,
@@ -1887,13 +1887,13 @@ let __tla = Promise.all([
1887
1887
  if (e.propertySet.type !== "simpleValue") return;
1888
1888
  const r = e.propertySet.value;
1889
1889
  if (!r) return;
1890
- const s = await Ee(t, r), l = Te.some((o)=>r.startsWith(o));
1890
+ const s = await Ie(t, r), l = be.some((o)=>r.startsWith(o));
1891
1891
  if (!s) {
1892
1892
  l && n.push({
1893
1893
  severity: "warning",
1894
1894
  code: "W_IFC_PSET_RESERVED_PREFIX",
1895
1895
  message: `property set "${r}" uses a reserved buildingSMART prefix but is not a known standard ${r.startsWith("Qto_") ? "quantity set" : "pset"} for ${t}`,
1896
- path: `${a}.propertySet`,
1896
+ path: `${i}.propertySet`,
1897
1897
  facetType: "property",
1898
1898
  detail: {
1899
1899
  value: r,
@@ -1902,15 +1902,15 @@ let __tla = Promise.all([
1902
1902
  });
1903
1903
  return;
1904
1904
  }
1905
- if (i && s.applicableEntities.length > 0) {
1906
- const o = await Jt(i, t);
1907
- if (o.length > 0 && !(await Promise.all(o.map((c)=>Qt(t, c, s.applicableEntities)))).some(Boolean)) {
1905
+ if (a && s.applicableEntities.length > 0) {
1906
+ const o = await ei(a, t);
1907
+ if (o.length > 0 && !(await Promise.all(o.map((c)=>Zt(t, c, s.applicableEntities)))).some(Boolean)) {
1908
1908
  const c = o.length === 1 ? o[0] : `{${o.join(", ")}}`;
1909
1909
  n.push({
1910
1910
  severity: "error",
1911
1911
  code: "E_IFC_PROP_NOT_IN_PSET",
1912
1912
  message: `${s.name} is not applicable to ${c} in ${t}`,
1913
- path: `${a}.propertySet`,
1913
+ path: `${i}.propertySet`,
1914
1914
  facetType: "property",
1915
1915
  detail: {
1916
1916
  pset: s.name,
@@ -1924,11 +1924,11 @@ let __tla = Promise.all([
1924
1924
  const o = e.baseName.value;
1925
1925
  if (o) {
1926
1926
  const u = s.properties.find((c)=>c.name === o);
1927
- u ? e.dataType && e.dataType.type === "simpleValue" && e.dataType.value && jt(u, e.dataType.value, a, s.name, o, n) : n.push({
1927
+ u ? e.dataType && e.dataType.type === "simpleValue" && e.dataType.value && zt(u, e.dataType.value, i, s.name, o, n) : n.push({
1928
1928
  severity: "error",
1929
1929
  code: "E_IFC_PROP_NOT_IN_PSET",
1930
1930
  message: `property "${o}" is not part of ${s.name} (${t})`,
1931
- path: `${a}.baseName`,
1931
+ path: `${i}.baseName`,
1932
1932
  facetType: "property",
1933
1933
  detail: {
1934
1934
  property: o,
@@ -1939,15 +1939,15 @@ let __tla = Promise.all([
1939
1939
  }
1940
1940
  }
1941
1941
  }
1942
- function jt(e, t, a, i, n, r) {
1942
+ function zt(e, t, i, a, n, r) {
1943
1943
  const s = t.toUpperCase();
1944
1944
  if (e.dataType && e.dataType.toUpperCase() === s) return;
1945
- const l = Kt(e.kind);
1945
+ const l = Jt(e.kind);
1946
1946
  l && s === l || r.push({
1947
1947
  severity: "error",
1948
1948
  code: "W_IFC_DATATYPE_MISMATCH",
1949
- message: `${i}.${n} is typed ${e.dataType ?? e.kind} in the standard, not ${t}`,
1950
- path: `${a}.dataType`,
1949
+ message: `${a}.${n} is typed ${e.dataType ?? e.kind} in the standard, not ${t}`,
1950
+ path: `${i}.dataType`,
1951
1951
  facetType: "property",
1952
1952
  detail: {
1953
1953
  expected: e.dataType ?? e.kind,
@@ -1956,7 +1956,7 @@ let __tla = Promise.all([
1956
1956
  }
1957
1957
  });
1958
1958
  }
1959
- function Wt(e, t, a, i, n) {
1959
+ function Kt(e, t, i, a, n) {
1960
1960
  if (e.type === "simpleValue") return;
1961
1961
  const r = e.type === "pattern" || e.type === "enumeration" || e.type === "bounds" ? e.base : void 0;
1962
1962
  let s;
@@ -1970,29 +1970,29 @@ let __tla = Promise.all([
1970
1970
  typeof e.length == "number" || typeof e.minLength == "number" || typeof e.maxLength == "number" ? s = "xs:string" : s = "xs:double";
1971
1971
  break;
1972
1972
  }
1973
- s && (zt(s, t) || n.push({
1973
+ s && (Qt(s, t) || n.push({
1974
1974
  severity: "error",
1975
1975
  code: "E_RESTRICTION_BASE_MISMATCH",
1976
- message: `xs:restriction base (${s}) is not compatible with dataType "${a}" (backing ${t})`,
1977
- path: i,
1976
+ message: `xs:restriction base (${s}) is not compatible with dataType "${i}" (backing ${t})`,
1977
+ path: a,
1978
1978
  facetType: "property",
1979
1979
  detail: {
1980
1980
  inferred: s,
1981
1981
  expected: t,
1982
- dataType: a
1982
+ dataType: i
1983
1983
  }
1984
1984
  }));
1985
1985
  }
1986
- function zt(e, t) {
1986
+ function Qt(e, t) {
1987
1987
  if (e === t) return !0;
1988
- const a = new Set([
1988
+ const i = new Set([
1989
1989
  "xs:double",
1990
1990
  "xs:decimal",
1991
1991
  "xs:float"
1992
1992
  ]);
1993
- return !!(a.has(e) && a.has(t));
1993
+ return !!(i.has(e) && i.has(t));
1994
1994
  }
1995
- function Kt(e) {
1995
+ function Jt(e) {
1996
1996
  switch(e){
1997
1997
  case "single":
1998
1998
  return "IFCPROPERTYSINGLEVALUE";
@@ -2008,30 +2008,30 @@ let __tla = Promise.all([
2008
2008
  return;
2009
2009
  }
2010
2010
  }
2011
- async function Qt(e, t, a) {
2012
- for (const i of a)if (await $(e, t, i)) return !0;
2011
+ async function Zt(e, t, i) {
2012
+ for (const a of i)if (await $(e, t, a)) return !0;
2013
2013
  return !1;
2014
2014
  }
2015
- async function Jt(e, t) {
2015
+ async function ei(e, t) {
2016
2016
  switch(e.name.type){
2017
2017
  case "simpleValue":
2018
2018
  return e.name.value ? [
2019
2019
  e.name.value
2020
2020
  ] : [];
2021
2021
  case "enumeration":
2022
- return e.name.values.filter((a)=>!!a);
2022
+ return e.name.values.filter((i)=>!!i);
2023
2023
  case "pattern":
2024
2024
  try {
2025
- const a = new RegExp(`^${e.name.pattern}$`), { getEntities: i } = await Ie(async ()=>{
2026
- const { getEntities: r } = await import("./sandbox-CsRXlgCO.js").then(async (m)=>{
2025
+ const i = new RegExp(`^${e.name.pattern}$`), { getEntities: a } = await ge(async ()=>{
2026
+ const { getEntities: r } = await import("./sandbox-0sDo3g3m.js").then(async (m)=>{
2027
2027
  await m.__tla;
2028
2028
  return m;
2029
- }).then((s)=>s.ar);
2029
+ }).then((s)=>s.az);
2030
2030
  return {
2031
2031
  getEntities: r
2032
2032
  };
2033
2033
  }, __vite__mapDeps([0,1]));
2034
- return (await i(t)).filter((r)=>a.test(r.name.toUpperCase()) || a.test(r.name)).map((r)=>r.name);
2034
+ return (await a(t)).filter((r)=>i.test(r.name.toUpperCase()) || i.test(r.name)).map((r)=>r.name);
2035
2035
  } catch {
2036
2036
  return [];
2037
2037
  }
@@ -2039,18 +2039,18 @@ let __tla = Promise.all([
2039
2039
  return [];
2040
2040
  }
2041
2041
  }
2042
- async function Zt(e, t, a, i, n) {
2043
- if (!i || i.name.type !== "simpleValue" || e.name.type !== "simpleValue") return;
2044
- const r = i.name.value, s = e.name.value;
2042
+ async function ti(e, t, i, a, n) {
2043
+ if (!a || a.name.type !== "simpleValue" || e.name.type !== "simpleValue") return;
2044
+ const r = a.name.value, s = e.name.value;
2045
2045
  if (!r || !s) return;
2046
- const l = await ye(t, r);
2046
+ const l = await ve(t, r);
2047
2047
  if (l.length === 0) return;
2048
- if (!ei(l, s)) {
2048
+ if (!ii(l, s)) {
2049
2049
  n.push({
2050
2050
  severity: "error",
2051
2051
  code: "E_IFC_ATTR_UNKNOWN_FOR_ENTITY",
2052
2052
  message: `attribute "${s}" is not defined on ${l[0].name} (${t})`,
2053
- path: `${a}.name`,
2053
+ path: `${i}.name`,
2054
2054
  facetType: "attribute",
2055
2055
  detail: {
2056
2056
  attribute: s,
@@ -2061,14 +2061,14 @@ let __tla = Promise.all([
2061
2061
  return;
2062
2062
  }
2063
2063
  if (e.value === void 0) return;
2064
- const o = await he(t, s);
2064
+ const o = await Ee(t, s);
2065
2065
  if (!o) return;
2066
- const u = l[0].name.toUpperCase(), c = l.map((m)=>m.name.toUpperCase()), f = c.some((m)=>o.simpleValueEntities.includes(m)), d = c.some((m)=>o.complexEntities.includes(m));
2067
- !f && d && n.push({
2066
+ const u = l[0].name.toUpperCase(), c = l.map((f)=>f.name.toUpperCase()), m = c.some((f)=>o.simpleValueEntities.includes(f)), d = c.some((f)=>o.complexEntities.includes(f));
2067
+ !m && d && n.push({
2068
2068
  severity: "error",
2069
2069
  code: "E_IFC_ATTR_UNKNOWN_FOR_ENTITY",
2070
2070
  message: `attribute "${s}" on ${u} is a complex/entity-typed attribute and cannot carry a simple <value> constraint (${t})`,
2071
- path: `${a}.value`,
2071
+ path: `${i}.value`,
2072
2072
  facetType: "attribute",
2073
2073
  detail: {
2074
2074
  attribute: s,
@@ -2077,19 +2077,19 @@ let __tla = Promise.all([
2077
2077
  }
2078
2078
  });
2079
2079
  }
2080
- function ei(e, t) {
2081
- const a = t.toLowerCase();
2082
- for (const i of e)for (const n of i.attributes)if (n.toLowerCase() === a) return !0;
2080
+ function ii(e, t) {
2081
+ const i = t.toLowerCase();
2082
+ for (const a of e)for (const n of a.attributes)if (n.toLowerCase() === i) return !0;
2083
2083
  return !1;
2084
2084
  }
2085
- async function ti(e, t, a, i, n) {
2086
- const r = await fe(t), s = e.rawRelation ?? e.relation, l = s.toUpperCase(), o = r.find((u)=>u.relation === l);
2085
+ async function ai(e, t, i, a, n) {
2086
+ const r = await he(t), s = e.rawRelation ?? e.relation, l = s.toUpperCase(), o = r.find((u)=>u.relation === l);
2087
2087
  if (!o) {
2088
2088
  n.push({
2089
2089
  severity: "error",
2090
2090
  code: "E_IFC_PARTOF_RELATION",
2091
2091
  message: `partOf relation "${s}" is not valid for ${t}`,
2092
- path: `${a}.relation`,
2092
+ path: `${i}.relation`,
2093
2093
  facetType: "partOf",
2094
2094
  detail: {
2095
2095
  value: s,
@@ -2099,13 +2099,13 @@ let __tla = Promise.all([
2099
2099
  return;
2100
2100
  }
2101
2101
  if (e.entity && e.entity.name.type === "simpleValue" && e.entity.name.value) {
2102
- const u = e.entity.name.value, c = await J(t, u);
2102
+ const u = e.entity.name.value, c = await Z(t, u);
2103
2103
  if (!c) {
2104
2104
  n.push({
2105
2105
  severity: "error",
2106
2106
  code: "E_IFC_PARTOF_ENTITY",
2107
2107
  message: `partOf entity "${u}" is not a known IFC entity for ${t}`,
2108
- path: `${a}.entity.name`,
2108
+ path: `${i}.entity.name`,
2109
2109
  facetType: "partOf",
2110
2110
  detail: {
2111
2111
  value: u,
@@ -2114,28 +2114,28 @@ let __tla = Promise.all([
2114
2114
  });
2115
2115
  return;
2116
2116
  }
2117
- const f = o.owner;
2118
- await $(t, c.name, f) || n.push({
2117
+ const m = o.owner;
2118
+ await $(t, c.name, m) || n.push({
2119
2119
  severity: "error",
2120
2120
  code: "E_IFC_PARTOF_ENTITY",
2121
- message: `partOf @entity "${c.name}" is not a subtype of "${f}" required by ${e.relation} (${t})`,
2122
- path: `${a}.entity.name`,
2121
+ message: `partOf @entity "${c.name}" is not a subtype of "${m}" required by ${e.relation} (${t})`,
2122
+ path: `${i}.entity.name`,
2123
2123
  facetType: "partOf",
2124
2124
  detail: {
2125
2125
  value: c.name,
2126
- required: f,
2126
+ required: m,
2127
2127
  relation: e.relation,
2128
2128
  version: t
2129
2129
  }
2130
2130
  });
2131
2131
  }
2132
- if (i && i.name.type === "simpleValue" && i.name.value) {
2133
- const u = i.name.value;
2132
+ if (a && a.name.type === "simpleValue" && a.name.value) {
2133
+ const u = a.name.value;
2134
2134
  await $(t, u, o.member) || n.push({
2135
2135
  severity: "error",
2136
2136
  code: "E_IFC_PARTOF_ENTITY",
2137
2137
  message: `applicability entity "${u}" cannot be the member of ${e.relation}; ${e.relation} requires the member to be a subtype of "${o.member}" (${t})`,
2138
- path: `${a}.relation`,
2138
+ path: `${i}.relation`,
2139
2139
  facetType: "partOf",
2140
2140
  detail: {
2141
2141
  applicability: u,
@@ -2146,27 +2146,27 @@ let __tla = Promise.all([
2146
2146
  });
2147
2147
  }
2148
2148
  }
2149
- function ii(e) {
2149
+ function ni(e) {
2150
2150
  try {
2151
2151
  return {
2152
- document: Ne(e),
2152
+ document: Pe(e),
2153
2153
  issues: []
2154
2154
  };
2155
2155
  } catch (t) {
2156
2156
  return {
2157
2157
  issues: [
2158
- ai(t)
2158
+ ri(t)
2159
2159
  ]
2160
2160
  };
2161
2161
  }
2162
2162
  }
2163
- function ai(e) {
2163
+ function ri(e) {
2164
2164
  if (e instanceof g) {
2165
2165
  const t = e.details ? `${e.message}: ${e.details}` : e.message;
2166
- let a = "E_PARSE_UNKNOWN";
2167
- return e.message.includes("Failed to parse IDS XML") || e.message.includes("Invalid XML format") || e.message.includes("No DOMParser") ? a = "E_PARSE_XML" : e.message.includes("Invalid root element") ? a = "E_PARSE_ROOT" : e.message.includes("facet") && (a = "E_PARSE_FACET"), {
2166
+ let i = "E_PARSE_UNKNOWN";
2167
+ return e.message.includes("Failed to parse IDS XML") || e.message.includes("Invalid XML format") || e.message.includes("No DOMParser") ? i = "E_PARSE_XML" : e.message.includes("Invalid root element") ? i = "E_PARSE_ROOT" : e.message.includes("facet") && (i = "E_PARSE_FACET"), {
2168
2168
  severity: "error",
2169
- code: a,
2169
+ code: i,
2170
2170
  message: t,
2171
2171
  path: ""
2172
2172
  };
@@ -2178,17 +2178,17 @@ let __tla = Promise.all([
2178
2178
  path: ""
2179
2179
  };
2180
2180
  }
2181
- const le = "http://www.w3.org/2001/XMLSchema", oe = new Set([
2181
+ const oe = "http://www.w3.org/2001/XMLSchema", ue = new Set([
2182
2182
  "xmlns",
2183
2183
  "xsi",
2184
2184
  "xml"
2185
- ]), ni = {
2185
+ ]), si = {
2186
2186
  attrs: [],
2187
2187
  children: [
2188
2188
  "info",
2189
2189
  "specifications"
2190
2190
  ]
2191
- }, ri = {
2191
+ }, li = {
2192
2192
  attrs: [],
2193
2193
  children: [
2194
2194
  "title",
@@ -2200,12 +2200,12 @@ let __tla = Promise.all([
2200
2200
  "purpose",
2201
2201
  "milestone"
2202
2202
  ]
2203
- }, si = {
2203
+ }, oi = {
2204
2204
  attrs: [],
2205
2205
  children: [
2206
2206
  "specification"
2207
2207
  ]
2208
- }, li = {
2208
+ }, ui = {
2209
2209
  attrs: [
2210
2210
  "name",
2211
2211
  "ifcVersion",
@@ -2221,7 +2221,7 @@ let __tla = Promise.all([
2221
2221
  "applicability",
2222
2222
  "requirements"
2223
2223
  ]
2224
- }, oi = {
2224
+ }, ci = {
2225
2225
  attrs: [
2226
2226
  "minOccurs",
2227
2227
  "maxOccurs"
@@ -2234,7 +2234,7 @@ let __tla = Promise.all([
2234
2234
  "property",
2235
2235
  "material"
2236
2236
  ]
2237
- }, ui = {
2237
+ }, pi = {
2238
2238
  attrs: [
2239
2239
  "description"
2240
2240
  ],
@@ -2246,32 +2246,32 @@ let __tla = Promise.all([
2246
2246
  "property",
2247
2247
  "material"
2248
2248
  ]
2249
- }, ci = {
2249
+ }, di = {
2250
2250
  attrs: [],
2251
2251
  children: [
2252
2252
  "name",
2253
2253
  "predefinedType"
2254
2254
  ]
2255
- }, pi = {
2255
+ }, mi = {
2256
2256
  attrs: [],
2257
2257
  children: [
2258
2258
  "name",
2259
2259
  "value"
2260
2260
  ]
2261
- }, di = {
2261
+ }, fi = {
2262
2262
  attrs: [],
2263
2263
  children: [
2264
2264
  "value",
2265
2265
  "system"
2266
2266
  ]
2267
- }, mi = {
2267
+ }, yi = {
2268
2268
  attrs: [
2269
2269
  "relation"
2270
2270
  ],
2271
2271
  children: [
2272
2272
  "entity"
2273
2273
  ]
2274
- }, fi = {
2274
+ }, hi = {
2275
2275
  attrs: [
2276
2276
  "dataType"
2277
2277
  ],
@@ -2280,14 +2280,14 @@ let __tla = Promise.all([
2280
2280
  "baseName",
2281
2281
  "value"
2282
2282
  ]
2283
- }, yi = {
2283
+ }, vi = {
2284
2284
  attrs: [],
2285
2285
  children: [
2286
2286
  "value"
2287
2287
  ]
2288
2288
  };
2289
- function hi(e) {
2290
- const t = ue(e);
2289
+ function Ei(e) {
2290
+ const t = ce(e);
2291
2291
  switch(e.toLowerCase()){
2292
2292
  case "entity":
2293
2293
  return {
@@ -2331,20 +2331,20 @@ let __tla = Promise.all([
2331
2331
  return t;
2332
2332
  }
2333
2333
  }
2334
- function ue(e) {
2334
+ function ce(e) {
2335
2335
  switch(e.toLowerCase()){
2336
2336
  case "entity":
2337
- return ci;
2337
+ return di;
2338
2338
  case "attribute":
2339
- return pi;
2339
+ return mi;
2340
2340
  case "classification":
2341
- return di;
2341
+ return fi;
2342
2342
  case "partof":
2343
- return mi;
2343
+ return yi;
2344
2344
  case "property":
2345
- return fi;
2345
+ return hi;
2346
2346
  case "material":
2347
- return yi;
2347
+ return vi;
2348
2348
  default:
2349
2349
  return {
2350
2350
  attrs: [],
@@ -2352,7 +2352,7 @@ let __tla = Promise.all([
2352
2352
  };
2353
2353
  }
2354
2354
  }
2355
- const vi = {
2355
+ const Ti = {
2356
2356
  attrs: [],
2357
2357
  children: [
2358
2358
  "simpleValue"
@@ -2360,11 +2360,11 @@ let __tla = Promise.all([
2360
2360
  xsChildren: [
2361
2361
  "restriction"
2362
2362
  ]
2363
- }, Ei = {
2363
+ }, Ii = {
2364
2364
  attrs: [],
2365
2365
  children: [],
2366
2366
  textOnly: !0
2367
- }, ce = [
2367
+ }, pe = [
2368
2368
  "enumeration",
2369
2369
  "pattern",
2370
2370
  "minInclusive",
@@ -2377,84 +2377,84 @@ let __tla = Promise.all([
2377
2377
  "totalDigits",
2378
2378
  "fractionDigits",
2379
2379
  "whiteSpace"
2380
- ], Ti = {
2380
+ ], bi = {
2381
2381
  attrs: [
2382
2382
  "base"
2383
2383
  ],
2384
2384
  children: [],
2385
- xsChildren: ce
2386
- }, Ii = {
2385
+ xsChildren: pe
2386
+ }, gi = {
2387
2387
  attrs: [
2388
2388
  "value"
2389
2389
  ],
2390
2390
  children: [],
2391
2391
  textOnly: !0
2392
2392
  };
2393
- async function bi(e) {
2394
- const t = [], a = typeof e == "string" ? e : new TextDecoder().decode(e), i = a.charCodeAt(0) === 65279 ? a.slice(1) : a, n = await gi();
2393
+ async function Si(e) {
2394
+ const t = [], i = typeof e == "string" ? e : new TextDecoder().decode(e), a = i.charCodeAt(0) === 65279 ? i.slice(1) : i, n = await Ai();
2395
2395
  let r;
2396
2396
  try {
2397
- r = n.parseFromString(i, "text/xml");
2397
+ r = n.parseFromString(a, "text/xml");
2398
2398
  } catch {
2399
2399
  return t;
2400
2400
  }
2401
2401
  const s = r.documentElement;
2402
- return !s || (s.localName ?? "").toLowerCase() !== "ids" || Si(s, t), t;
2402
+ return !s || (s.localName ?? "").toLowerCase() !== "ids" || xi(s, t), t;
2403
2403
  }
2404
2404
  let w;
2405
- function gi() {
2405
+ function Ai() {
2406
2406
  return w || (w = (async ()=>{
2407
2407
  const e = globalThis.DOMParser;
2408
2408
  if (typeof e == "function") return new e;
2409
- const a = await import("@xmldom/xmldom").then(async (m)=>{
2409
+ const i = await import("@xmldom/xmldom").then(async (m)=>{
2410
2410
  await m.__tla;
2411
2411
  return m;
2412
2412
  });
2413
- return new a.DOMParser;
2413
+ return new i.DOMParser;
2414
2414
  })(), w);
2415
2415
  }
2416
- function Si(e, t) {
2417
- S(e, ni, "ids", t);
2418
- for (const a of R(e)){
2419
- const i = (a.localName ?? "").toLowerCase();
2420
- i === "info" ? Ai(a, "ids.info", t) : i === "specifications" && xi(a, "ids.specifications", t);
2416
+ function xi(e, t) {
2417
+ S(e, si, "ids", t);
2418
+ for (const i of R(e)){
2419
+ const a = (i.localName ?? "").toLowerCase();
2420
+ a === "info" ? Ci(i, "ids.info", t) : a === "specifications" && Ri(i, "ids.specifications", t);
2421
2421
  }
2422
2422
  }
2423
- function Ai(e, t, a) {
2424
- S(e, ri, t, a);
2423
+ function Ci(e, t, i) {
2424
+ S(e, li, t, i);
2425
2425
  }
2426
- function xi(e, t, a) {
2427
- S(e, si, t, a);
2428
- let i = 0;
2429
- for (const n of R(e))(n.localName ?? "").toLowerCase() === "specification" && Ci(n, `${t}.specification[${i++}]`, a);
2426
+ function Ri(e, t, i) {
2427
+ S(e, oi, t, i);
2428
+ let a = 0;
2429
+ for (const n of R(e))(n.localName ?? "").toLowerCase() === "specification" && Mi(n, `${t}.specification[${a++}]`, i);
2430
2430
  }
2431
- function Ci(e, t, a) {
2432
- S(e, li, t, a);
2433
- for (const i of R(e)){
2434
- const n = (i.localName ?? "").toLowerCase();
2435
- n === "applicability" ? W(i, `${t}.applicability`, !1, a) : n === "requirements" && W(i, `${t}.requirements`, !0, a);
2431
+ function Mi(e, t, i) {
2432
+ S(e, ui, t, i);
2433
+ for (const a of R(e)){
2434
+ const n = (a.localName ?? "").toLowerCase();
2435
+ n === "applicability" ? W(a, `${t}.applicability`, !1, i) : n === "requirements" && W(a, `${t}.requirements`, !0, i);
2436
2436
  }
2437
2437
  }
2438
- function W(e, t, a, i) {
2439
- S(e, a ? ui : oi, t, i);
2438
+ function W(e, t, i, a) {
2439
+ S(e, i ? pi : ci, t, a);
2440
2440
  let n = 0;
2441
2441
  for (const r of R(e)){
2442
2442
  const s = (r.localName ?? "").toLowerCase();
2443
- pe(r, s, `${t}.facets[${n++}]`, a, i);
2443
+ de(r, s, `${t}.facets[${n++}]`, i, a);
2444
2444
  }
2445
2445
  }
2446
- function pe(e, t, a, i, n) {
2447
- const r = i ? hi(t) : ue(t);
2448
- S(e, r, a, n);
2446
+ function de(e, t, i, a, n) {
2447
+ const r = a ? Ei(t) : ce(t);
2448
+ S(e, r, i, n);
2449
2449
  for (const s of R(e)){
2450
2450
  const l = (s.localName ?? "").toLowerCase();
2451
- Ri(s, l, `${a}.${l}`, i, n);
2451
+ Ni(s, l, `${i}.${l}`, a, n);
2452
2452
  }
2453
2453
  }
2454
- function Ri(e, t, a, i, n) {
2454
+ function Ni(e, t, i, a, n) {
2455
2455
  switch(t){
2456
2456
  case "entity":
2457
- pe(e, "entity", a, !1, n);
2457
+ de(e, "entity", i, !1, n);
2458
2458
  return;
2459
2459
  case "name":
2460
2460
  case "value":
@@ -2462,49 +2462,49 @@ let __tla = Promise.all([
2462
2462
  case "propertySet":
2463
2463
  case "system":
2464
2464
  case "predefinedType":
2465
- Mi(e, a, n);
2465
+ _i(e, i, n);
2466
2466
  return;
2467
2467
  default:
2468
2468
  return;
2469
2469
  }
2470
2470
  }
2471
- function Mi(e, t, a) {
2472
- S(e, vi, t, a);
2473
- for (const i of R(e)){
2474
- const n = (i.localName ?? "").toLowerCase();
2475
- n === "simpleValue" ? S(i, Ei, `${t}.simpleValue`, a) : n === "restriction" && (i.namespaceURI === le || i.namespaceURI === null) && Ni(i, `${t}.restriction`, a);
2471
+ function _i(e, t, i) {
2472
+ S(e, Ti, t, i);
2473
+ for (const a of R(e)){
2474
+ const n = (a.localName ?? "").toLowerCase();
2475
+ n === "simpleValue" ? S(a, Ii, `${t}.simpleValue`, i) : n === "restriction" && (a.namespaceURI === oe || a.namespaceURI === null) && Pi(a, `${t}.restriction`, i);
2476
2476
  }
2477
2477
  }
2478
- function Ni(e, t, a) {
2479
- S(e, Ti, t, a);
2480
- for (const i of R(e)){
2481
- const n = (i.localName ?? "").toLowerCase();
2482
- ce.includes(n) && S(i, Ii, `${t}.${n}`, a);
2478
+ function Pi(e, t, i) {
2479
+ S(e, bi, t, i);
2480
+ for (const a of R(e)){
2481
+ const n = (a.localName ?? "").toLowerCase();
2482
+ pe.includes(n) && S(a, gi, `${t}.${n}`, i);
2483
2483
  }
2484
2484
  }
2485
- function S(e, t, a, i) {
2485
+ function S(e, t, i, a) {
2486
2486
  const n = new Set(t.attrs.map((l)=>l.toLowerCase()));
2487
2487
  for (const l of Array.from(e.attributes ?? [])){
2488
- if (wi(l)) continue;
2488
+ if (Oi(l)) continue;
2489
2489
  const o = l.nodeName ?? "";
2490
- if (Pi(o)) continue;
2491
- const u = l.localName ?? l.nodeName ?? "", c = u.indexOf(":"), f = c === -1 ? u.toLowerCase() : u.slice(c + 1).toLowerCase(), d = c === -1 ? "" : u.slice(0, c).toLowerCase();
2492
- !f || f === "xmlns" || d === "xmlns" || oe.has(d) || n.has(f) || i.push({
2490
+ if (wi(o)) continue;
2491
+ const u = l.localName ?? l.nodeName ?? "", c = u.indexOf(":"), m = c === -1 ? u.toLowerCase() : u.slice(c + 1).toLowerCase(), d = c === -1 ? "" : u.slice(0, c).toLowerCase();
2492
+ !m || m === "xmlns" || d === "xmlns" || ue.has(d) || n.has(m) || a.push({
2493
2493
  severity: "error",
2494
2494
  code: "E_XSD_STRUCTURE",
2495
2495
  message: `unexpected attribute "${u}" on <${e.localName}>`,
2496
- path: a,
2496
+ path: i,
2497
2497
  detail: {
2498
2498
  attribute: u,
2499
2499
  element: e.localName ?? ""
2500
2500
  }
2501
2501
  });
2502
2502
  }
2503
- if (t.requiredAttrs) for (const l of t.requiredAttrs)_i(e, l) || i.push({
2503
+ if (t.requiredAttrs) for (const l of t.requiredAttrs)$i(e, l) || a.push({
2504
2504
  severity: "error",
2505
2505
  code: "E_XSD_REQUIRED_ATTR",
2506
2506
  message: `<${e.localName}> is missing required @${l}`,
2507
- path: a,
2507
+ path: i,
2508
2508
  detail: {
2509
2509
  attribute: l,
2510
2510
  element: e.localName ?? ""
@@ -2513,12 +2513,12 @@ let __tla = Promise.all([
2513
2513
  const r = new Set(t.children.map((l)=>l.toLowerCase())), s = new Set((t.xsChildren ?? []).map((l)=>l.toLowerCase()));
2514
2514
  for (const l of R(e)){
2515
2515
  const o = (l.localName ?? "").toLowerCase();
2516
- if (l.namespaceURI === le) {
2517
- s.has(o) || i.push({
2516
+ if (l.namespaceURI === oe) {
2517
+ s.has(o) || a.push({
2518
2518
  severity: "error",
2519
2519
  code: "E_XSD_STRUCTURE",
2520
2520
  message: `unexpected XSD child <xs:${o}> in <${e.localName}>`,
2521
- path: a,
2521
+ path: i,
2522
2522
  detail: {
2523
2523
  child: `xs:${o}`,
2524
2524
  parent: e.localName ?? ""
@@ -2526,11 +2526,11 @@ let __tla = Promise.all([
2526
2526
  });
2527
2527
  continue;
2528
2528
  }
2529
- r.has(o) || i.push({
2529
+ r.has(o) || a.push({
2530
2530
  severity: "error",
2531
2531
  code: "E_XSD_STRUCTURE",
2532
2532
  message: `unexpected child <${l.localName}> in <${e.localName}>`,
2533
- path: a,
2533
+ path: i,
2534
2534
  detail: {
2535
2535
  child: l.localName ?? "",
2536
2536
  parent: e.localName ?? ""
@@ -2539,68 +2539,70 @@ let __tla = Promise.all([
2539
2539
  }
2540
2540
  t.textOnly;
2541
2541
  }
2542
- function _i(e, t) {
2542
+ function $i(e, t) {
2543
2543
  if (typeof e.hasAttribute == "function" && e.hasAttribute(t)) return !0;
2544
- for (const a of Array.from(e.attributes ?? []))if ((a.localName ?? a.nodeName ?? "").toLowerCase() === t.toLowerCase()) return !0;
2544
+ for (const i of Array.from(e.attributes ?? []))if ((i.localName ?? i.nodeName ?? "").toLowerCase() === t.toLowerCase()) return !0;
2545
2545
  return !1;
2546
2546
  }
2547
- function Pi(e) {
2547
+ function wi(e) {
2548
2548
  if (!e) return !1;
2549
2549
  if (e === "xmlns") return !0;
2550
2550
  const t = e.indexOf(":");
2551
- return t === -1 ? !1 : oe.has(e.slice(0, t));
2551
+ return t === -1 ? !1 : ue.has(e.slice(0, t));
2552
2552
  }
2553
- const $i = new Set([
2553
+ const Fi = new Set([
2554
2554
  "http://www.w3.org/2000/xmlns/",
2555
2555
  "http://www.w3.org/XML/1998/namespace",
2556
2556
  "http://www.w3.org/2001/XMLSchema-instance"
2557
2557
  ]);
2558
- function wi(e) {
2559
- return e.namespaceURI !== null && $i.has(e.namespaceURI);
2558
+ function Oi(e) {
2559
+ return e.namespaceURI !== null && Fi.has(e.namespaceURI);
2560
2560
  }
2561
2561
  function R(e) {
2562
2562
  if (e.children && e.children.length !== void 0) return Array.from(e.children);
2563
- const t = [], a = e.childNodes ?? [];
2564
- for(let i = 0; i < a.length; i++){
2565
- const n = a[i];
2563
+ const t = [], i = e.childNodes ?? [];
2564
+ for(let a = 0; a < i.length; a++){
2565
+ const n = i[a];
2566
2566
  n && n.nodeType === 1 && t.push(n);
2567
2567
  }
2568
2568
  return t;
2569
2569
  }
2570
- const Fi = [
2570
+ const Li = [
2571
2571
  "IFC2X3",
2572
2572
  "IFC4",
2573
2573
  "IFC4X3_ADD2",
2574
2574
  "IFC4X3"
2575
- ], Oi = new Set([
2575
+ ], me = new Set([
2576
2576
  "IFC2X3",
2577
2577
  "IFC4",
2578
2578
  "IFC4X3",
2579
2579
  "IFC4X3_ADD2"
2580
- ]);
2581
- function Li(e) {
2582
- return Oi.has(e.toUpperCase().replace(/[^A-Z0-9_]/g, ""));
2580
+ ]), z = [
2581
+ ...me
2582
+ ].join(", ");
2583
+ function Vi(e) {
2584
+ return me.has(e.toUpperCase().replace(/[^A-Z0-9_]/g, ""));
2583
2585
  }
2584
- const Vi = new Set([
2586
+ const Di = new Set([
2585
2587
  "entity",
2586
2588
  "attribute",
2587
2589
  "classification",
2588
2590
  "material",
2589
2591
  "partOf",
2590
2592
  "property"
2591
- ]), Di = [
2593
+ ]), Ui = [
2592
2594
  "http://standards.buildingsmart.org/IDS/1.0/ids.xsd",
2593
2595
  "http://standards.buildingsmart.org/IDS/0.9.7/ids.xsd",
2594
2596
  "http://standards.buildingsmart.org/IDS/0.9.6/ids.xsd",
2595
2597
  "http://standards.buildingsmart.org/IDS/ids.xsd"
2596
2598
  ];
2597
- function Ui(e) {
2599
+ function ki(e) {
2598
2600
  const t = [];
2599
2601
  if (e.schemaLocation) {
2600
- const a = e.schemaLocation.split(/\s+/).filter((i)=>i.length > 0);
2601
- for(let i = 0; i + 1 < a.length; i += 2){
2602
- const n = a[i], r = a[i + 1];
2603
- n === "http://standards.buildingsmart.org/IDS" && (Di.includes(r) || t.push({
2602
+ const i = e.schemaLocation.split(/\s+/).filter((a)=>a.length > 0);
2603
+ for(let a = 0; a + 1 < i.length; a += 2){
2604
+ const n = i[a], r = i[a + 1];
2605
+ n === "http://standards.buildingsmart.org/IDS" && (Ui.includes(r) || t.push({
2604
2606
  severity: "error",
2605
2607
  code: "E_XSD_SCHEMA_LOCATION",
2606
2608
  message: `xsi:schemaLocation references "${r}", not a recognised IDS XSD`,
@@ -2616,61 +2618,61 @@ let __tla = Promise.all([
2616
2618
  code: "E_XSD_REQUIRED_ATTR",
2617
2619
  message: "IDS document is missing a non-empty <info><title> element",
2618
2620
  path: "info.title"
2619
- }), e.specifications.forEach((a, i)=>ki(a, i, t)), t;
2621
+ }), e.specifications.forEach((i, a)=>Bi(i, a, t)), t;
2620
2622
  }
2621
- function ki(e, t, a) {
2622
- const i = `specifications[${t}]`;
2623
- if ((!e.name || e.name.trim() === "" || /^Specification \d+$/.test(e.name)) && a.push({
2623
+ function Bi(e, t, i) {
2624
+ const a = `specifications[${t}]`;
2625
+ if ((!e.name || e.name.trim() === "" || /^Specification \d+$/.test(e.name)) && i.push({
2624
2626
  severity: "error",
2625
2627
  code: "E_XSD_REQUIRED_ATTR",
2626
2628
  message: "specification is missing a non-empty @name attribute",
2627
- path: `${i}.name`
2628
- }), !e.ifcVersions || e.ifcVersions.length === 0) a.push({
2629
+ path: `${a}.name`
2630
+ }), !e.ifcVersions || e.ifcVersions.length === 0) i.push({
2629
2631
  severity: "error",
2630
2632
  code: "E_XSD_REQUIRED_ATTR",
2631
2633
  message: "specification is missing the @ifcVersion attribute",
2632
- path: `${i}.ifcVersion`
2634
+ path: `${a}.ifcVersion`
2633
2635
  });
2634
- else for (const n of e.ifcVersions)Fi.includes(n) || a.push({
2636
+ else for (const n of e.ifcVersions)Li.includes(n) || i.push({
2635
2637
  severity: "error",
2636
2638
  code: "E_XSD_ENUM",
2637
- message: `@ifcVersion "${n}" is not in {IFC2X3, IFC4, IFC4X3_ADD2}`,
2638
- path: `${i}.ifcVersion`,
2639
+ message: `@ifcVersion "${n}" is not in {${z}}`,
2640
+ path: `${a}.ifcVersion`,
2639
2641
  detail: {
2640
2642
  value: n
2641
2643
  }
2642
2644
  });
2643
2645
  if (e.ifcVersionRaw) {
2644
2646
  const n = e.ifcVersionRaw.split(/\s+/).filter((r)=>r.length > 0);
2645
- for (const r of n)Li(r) || a.push({
2647
+ for (const r of n)Vi(r) || i.push({
2646
2648
  severity: "error",
2647
2649
  code: "E_XSD_ENUM",
2648
- message: `@ifcVersion token "${r}" is not in {IFC2X3, IFC4, IFC4X3_ADD2}`,
2649
- path: `${i}.ifcVersion`,
2650
+ message: `@ifcVersion token "${r}" is not in {${z}}`,
2651
+ path: `${a}.ifcVersion`,
2650
2652
  detail: {
2651
2653
  value: r
2652
2654
  }
2653
2655
  });
2654
2656
  }
2655
- e.applicability.facets.length === 0 && a.push({
2657
+ e.applicability.facets.length === 0 && i.push({
2656
2658
  severity: "error",
2657
2659
  code: "E_XSD_STRUCTURE",
2658
2660
  message: "specification has an empty <applicability> — at least one facet is required",
2659
- path: `${i}.applicability`
2661
+ path: `${a}.applicability`
2660
2662
  }), e.applicability.facets.forEach((n, r)=>{
2661
- z(n, `${i}.applicability.facets[${r}]`, a);
2662
- }), e.requirements.length === 0 && a.push({
2663
+ K(n, `${a}.applicability.facets[${r}]`, i);
2664
+ }), e.requirements.length === 0 && i.push({
2663
2665
  severity: "warning",
2664
2666
  code: "E_XSD_STRUCTURE",
2665
2667
  message: "specification has no <requirements>; matched entities will not be checked",
2666
- path: `${i}.requirements`
2668
+ path: `${a}.requirements`
2667
2669
  }), e.requirements.forEach((n, r)=>{
2668
- z(n.facet, `${i}.requirements[${r}]`, a);
2670
+ K(n.facet, `${a}.requirements[${r}]`, i);
2669
2671
  });
2670
2672
  }
2671
- function z(e, t, a) {
2672
- if (!Vi.has(e.type)) {
2673
- a.push({
2673
+ function K(e, t, i) {
2674
+ if (!Di.has(e.type)) {
2675
+ i.push({
2674
2676
  severity: "error",
2675
2677
  code: "E_XSD_STRUCTURE",
2676
2678
  message: `unknown facet type "${e.type}"`,
@@ -2681,67 +2683,67 @@ let __tla = Promise.all([
2681
2683
  }
2682
2684
  switch(e.type){
2683
2685
  case "entity":
2684
- F(e.name, `${t}.name`, "entity.name", a, e.type);
2686
+ F(e.name, `${t}.name`, "entity.name", i, e.type);
2685
2687
  break;
2686
2688
  case "attribute":
2687
- F(e.name, `${t}.name`, "attribute.name", a, e.type);
2689
+ F(e.name, `${t}.name`, "attribute.name", i, e.type);
2688
2690
  break;
2689
2691
  case "property":
2690
- F(e.propertySet, `${t}.propertySet`, "property.propertySet", a, e.type), F(e.baseName, `${t}.baseName`, "property.baseName", a, e.type);
2692
+ F(e.propertySet, `${t}.propertySet`, "property.propertySet", i, e.type), F(e.baseName, `${t}.baseName`, "property.baseName", i, e.type);
2691
2693
  break;
2692
2694
  }
2693
2695
  }
2694
- function F(e, t, a, i, n) {
2696
+ function F(e, t, i, a, n) {
2695
2697
  if (!e) {
2696
- i.push({
2698
+ a.push({
2697
2699
  severity: "error",
2698
2700
  code: "E_XSD_REQUIRED_ATTR",
2699
- message: `${a} is required`,
2701
+ message: `${i} is required`,
2700
2702
  path: t,
2701
2703
  facetType: n
2702
2704
  });
2703
2705
  return;
2704
2706
  }
2705
- e.type === "simpleValue" && (!e.value || e.value.trim() === "") && i.push({
2707
+ e.type === "simpleValue" && (!e.value || e.value.trim() === "") && a.push({
2706
2708
  severity: "error",
2707
2709
  code: "E_XSD_REQUIRED_ATTR",
2708
- message: `${a} must have a non-empty value`,
2710
+ message: `${i} must have a non-empty value`,
2709
2711
  path: t,
2710
2712
  facetType: n
2711
2713
  });
2712
2714
  }
2713
- oa = async function(e, t = {}) {
2714
- const { document: a, issues: i } = ii(e);
2715
- if (!a) return B(i);
2716
- const n = t.xsdValidation === !1 ? [] : await bi(e), r = await Bi(a, t);
2715
+ ua = async function(e, t = {}) {
2716
+ const { document: i, issues: a } = ni(e);
2717
+ if (!i) return B(a);
2718
+ const n = t.xsdValidation === !1 ? [] : await Si(e), r = await qi(i, t);
2717
2719
  return B([
2718
- ...i,
2720
+ ...a,
2719
2721
  ...n,
2720
2722
  ...r.issues
2721
- ], a);
2723
+ ], i);
2722
2724
  };
2723
- async function Bi(e, t = {}) {
2724
- const a = t.xsdValidation !== !1, i = t.ifcSchemaChecks !== !1, n = t.coherenceChecks !== !1, r = [];
2725
- return a && r.push(...Ui(e)), n && r.push(...$t(e)), i && r.push(...await Ut(e, {
2725
+ async function qi(e, t = {}) {
2726
+ const i = t.xsdValidation !== !1, a = t.ifcSchemaChecks !== !1, n = t.coherenceChecks !== !1, r = [];
2727
+ return i && r.push(...ki(e)), n && r.push(...Ft(e)), a && r.push(...await Bt(e, {
2726
2728
  ifcVersion: t.ifcVersion
2727
2729
  })), B(r, e);
2728
2730
  }
2729
2731
  function B(e, t) {
2730
- let a = "valid";
2731
- for (const i of e){
2732
- if (i.severity === "error") {
2733
- a = "error";
2732
+ let i = "valid";
2733
+ for (const a of e){
2734
+ if (a.severity === "error") {
2735
+ i = "error";
2734
2736
  break;
2735
2737
  }
2736
- (i.severity === "warning" || i.severity === "info") && (a = "warning");
2738
+ (a.severity === "warning" || a.severity === "info") && (i = "warning");
2737
2739
  }
2738
2740
  return {
2739
- status: a,
2741
+ status: i,
2740
2742
  issues: e,
2741
2743
  parsedDocument: t
2742
2744
  };
2743
2745
  }
2744
- const qi = {
2746
+ const Yi = {
2745
2747
  status: {
2746
2748
  pass: "PASS",
2747
2749
  fail: "FAIL",
@@ -2926,7 +2928,7 @@ let __tla = Promise.all([
2926
2928
  runValidation: "Run validation",
2927
2929
  clearResults: "Clear results"
2928
2930
  }
2929
- }, Yi = {
2931
+ }, Hi = {
2930
2932
  status: {
2931
2933
  pass: "BESTANDEN",
2932
2934
  fail: "FEHLGESCHLAGEN",
@@ -3111,7 +3113,7 @@ let __tla = Promise.all([
3111
3113
  runValidation: "Validierung starten",
3112
3114
  clearResults: "Ergebnisse löschen"
3113
3115
  }
3114
- }, Hi = {
3116
+ }, Gi = {
3115
3117
  status: {
3116
3118
  pass: "CONFORME",
3117
3119
  fail: "NON CONFORME",
@@ -3296,180 +3298,180 @@ let __tla = Promise.all([
3296
3298
  runValidation: "Lancer la validation",
3297
3299
  clearResults: "Effacer les résultats"
3298
3300
  }
3299
- }, K = {
3300
- en: qi,
3301
- de: Yi,
3302
- fr: Hi
3301
+ }, Q = {
3302
+ en: Yi,
3303
+ de: Hi,
3304
+ fr: Gi
3303
3305
  };
3304
- ua = function(e = "en") {
3306
+ ca = function(e = "en") {
3305
3307
  return new Xi(e);
3306
3308
  };
3307
3309
  class Xi {
3308
3310
  locale;
3309
3311
  translations;
3310
3312
  constructor(t){
3311
- this.locale = t, this.translations = K[t] || K.en;
3313
+ this.locale = t, this.translations = Q[t] || Q.en;
3312
3314
  }
3313
- t(t, a) {
3314
- const i = t.split(".");
3315
+ t(t, i) {
3316
+ const a = t.split(".");
3315
3317
  let n = this.translations;
3316
- for (const r of i)if (n && typeof n == "object" && r in n) n = n[r];
3318
+ for (const r of a)if (n && typeof n == "object" && r in n) n = n[r];
3317
3319
  else return t;
3318
- return typeof n != "string" ? t : a ? this.interpolate(n, a) : n;
3320
+ return typeof n != "string" ? t : i ? this.interpolate(n, i) : n;
3319
3321
  }
3320
- interpolate(t, a) {
3321
- return t.replace(/\{(\w+)\}/g, (i, n)=>n in a ? String(a[n]) : i);
3322
+ interpolate(t, i) {
3323
+ return t.replace(/\{(\w+)\}/g, (a, n)=>n in i ? String(i[n]) : a);
3322
3324
  }
3323
- describeFacet(t, a) {
3325
+ describeFacet(t, i) {
3324
3326
  switch(this.translations, t.type){
3325
3327
  case "entity":
3326
- return this.describeEntityFacet(t, a);
3328
+ return this.describeEntityFacet(t, i);
3327
3329
  case "attribute":
3328
- return this.describeAttributeFacet(t, a);
3330
+ return this.describeAttributeFacet(t, i);
3329
3331
  case "property":
3330
- return this.describePropertyFacet(t, a);
3332
+ return this.describePropertyFacet(t, i);
3331
3333
  case "classification":
3332
- return this.describeClassificationFacet(t, a);
3334
+ return this.describeClassificationFacet(t, i);
3333
3335
  case "material":
3334
- return this.describeMaterialFacet(t, a);
3336
+ return this.describeMaterialFacet(t, i);
3335
3337
  case "partOf":
3336
- return this.describePartOfFacet(t, a);
3338
+ return this.describePartOfFacet(t, i);
3337
3339
  default:
3338
3340
  return "Unknown facet";
3339
3341
  }
3340
3342
  }
3341
- describeEntityFacet(t, a) {
3342
- const i = this.translations, n = this.describeConstraint(t.name);
3343
- return a === "applicability" ? t.predefinedType ? this.interpolate(i.applicability.entity.withPredefined, {
3343
+ describeEntityFacet(t, i) {
3344
+ const a = this.translations, n = this.describeConstraint(t.name);
3345
+ return i === "applicability" ? t.predefinedType ? this.interpolate(a.applicability.entity.withPredefined, {
3344
3346
  entityType: n,
3345
3347
  predefinedType: this.describeConstraint(t.predefinedType)
3346
- }) : this.interpolate(i.applicability.entity.simple, {
3348
+ }) : this.interpolate(a.applicability.entity.simple, {
3347
3349
  entityType: n
3348
- }) : t.predefinedType ? this.interpolate(i.requirements.entity.mustBeWithPredefined, {
3350
+ }) : t.predefinedType ? this.interpolate(a.requirements.entity.mustBeWithPredefined, {
3349
3351
  entityType: n,
3350
3352
  predefinedType: this.describeConstraint(t.predefinedType)
3351
- }) : this.interpolate(i.requirements.entity.mustBe, {
3353
+ }) : this.interpolate(a.requirements.entity.mustBe, {
3352
3354
  entityType: n
3353
3355
  });
3354
3356
  }
3355
- describeAttributeFacet(t, a) {
3356
- const i = this.translations, n = this.describeConstraint(t.name);
3357
- return a === "applicability" ? t.value ? t.value.type === "pattern" ? this.interpolate(i.applicability.attribute.pattern, {
3357
+ describeAttributeFacet(t, i) {
3358
+ const a = this.translations, n = this.describeConstraint(t.name);
3359
+ return i === "applicability" ? t.value ? t.value.type === "pattern" ? this.interpolate(a.applicability.attribute.pattern, {
3358
3360
  name: n,
3359
3361
  pattern: this.describeConstraint(t.value)
3360
- }) : this.interpolate(i.applicability.attribute.equals, {
3362
+ }) : this.interpolate(a.applicability.attribute.equals, {
3361
3363
  name: n,
3362
3364
  value: this.describeConstraint(t.value)
3363
- }) : this.interpolate(i.applicability.attribute.exists, {
3365
+ }) : this.interpolate(a.applicability.attribute.exists, {
3364
3366
  name: n
3365
- }) : t.value ? t.value.type === "pattern" ? this.interpolate(i.requirements.attribute.mustMatch, {
3367
+ }) : t.value ? t.value.type === "pattern" ? this.interpolate(a.requirements.attribute.mustMatch, {
3366
3368
  name: n,
3367
3369
  pattern: this.describeConstraint(t.value)
3368
- }) : this.interpolate(i.requirements.attribute.mustEqual, {
3370
+ }) : this.interpolate(a.requirements.attribute.mustEqual, {
3369
3371
  name: n,
3370
3372
  value: this.describeConstraint(t.value)
3371
- }) : this.interpolate(i.requirements.attribute.mustExist, {
3373
+ }) : this.interpolate(a.requirements.attribute.mustExist, {
3372
3374
  name: n
3373
3375
  });
3374
3376
  }
3375
- describePropertyFacet(t, a) {
3376
- const i = this.translations, n = this.describeConstraint(t.propertySet), r = this.describeConstraint(t.baseName);
3377
- return a === "applicability" ? t.value ? t.value.type === "pattern" ? this.interpolate(i.applicability.property.pattern, {
3377
+ describePropertyFacet(t, i) {
3378
+ const a = this.translations, n = this.describeConstraint(t.propertySet), r = this.describeConstraint(t.baseName);
3379
+ return i === "applicability" ? t.value ? t.value.type === "pattern" ? this.interpolate(a.applicability.property.pattern, {
3378
3380
  pset: n,
3379
3381
  property: r,
3380
3382
  pattern: this.describeConstraint(t.value)
3381
- }) : t.value.type === "bounds" ? this.interpolate(i.applicability.property.bounded, {
3383
+ }) : t.value.type === "bounds" ? this.interpolate(a.applicability.property.bounded, {
3382
3384
  pset: n,
3383
3385
  property: r,
3384
3386
  bounds: this.describeConstraint(t.value)
3385
- }) : this.interpolate(i.applicability.property.equals, {
3387
+ }) : this.interpolate(a.applicability.property.equals, {
3386
3388
  pset: n,
3387
3389
  property: r,
3388
3390
  value: this.describeConstraint(t.value)
3389
- }) : this.interpolate(i.applicability.property.exists, {
3391
+ }) : this.interpolate(a.applicability.property.exists, {
3390
3392
  pset: n,
3391
3393
  property: r
3392
- }) : t.value ? t.value.type === "pattern" ? this.interpolate(i.requirements.property.mustMatch, {
3394
+ }) : t.value ? t.value.type === "pattern" ? this.interpolate(a.requirements.property.mustMatch, {
3393
3395
  pset: n,
3394
3396
  property: r,
3395
3397
  pattern: this.describeConstraint(t.value)
3396
- }) : t.value.type === "bounds" ? this.interpolate(i.requirements.property.mustBeBounded, {
3398
+ }) : t.value.type === "bounds" ? this.interpolate(a.requirements.property.mustBeBounded, {
3397
3399
  pset: n,
3398
3400
  property: r,
3399
3401
  bounds: this.describeConstraint(t.value)
3400
- }) : this.interpolate(i.requirements.property.mustEqual, {
3402
+ }) : this.interpolate(a.requirements.property.mustEqual, {
3401
3403
  pset: n,
3402
3404
  property: r,
3403
3405
  value: this.describeConstraint(t.value)
3404
- }) : this.interpolate(i.requirements.property.mustExist, {
3406
+ }) : this.interpolate(a.requirements.property.mustExist, {
3405
3407
  pset: n,
3406
3408
  property: r
3407
3409
  });
3408
3410
  }
3409
- describeClassificationFacet(t, a) {
3410
- const i = this.translations;
3411
- return a === "applicability" ? t.system && t.value ? this.interpolate(i.applicability.classification.systemAndValue, {
3411
+ describeClassificationFacet(t, i) {
3412
+ const a = this.translations;
3413
+ return i === "applicability" ? t.system && t.value ? this.interpolate(a.applicability.classification.systemAndValue, {
3412
3414
  system: this.describeConstraint(t.system),
3413
3415
  value: this.describeConstraint(t.value)
3414
- }) : t.system ? this.interpolate(i.applicability.classification.system, {
3416
+ }) : t.system ? this.interpolate(a.applicability.classification.system, {
3415
3417
  system: this.describeConstraint(t.system)
3416
- }) : t.value ? this.interpolate(i.applicability.classification.value, {
3418
+ }) : t.value ? this.interpolate(a.applicability.classification.value, {
3417
3419
  value: this.describeConstraint(t.value)
3418
- }) : i.applicability.classification.any : t.system && t.value ? this.interpolate(i.requirements.classification.mustBeInSystemWithValue, {
3420
+ }) : a.applicability.classification.any : t.system && t.value ? this.interpolate(a.requirements.classification.mustBeInSystemWithValue, {
3419
3421
  system: this.describeConstraint(t.system),
3420
3422
  value: this.describeConstraint(t.value)
3421
- }) : t.system ? this.interpolate(i.requirements.classification.mustBeInSystem, {
3423
+ }) : t.system ? this.interpolate(a.requirements.classification.mustBeInSystem, {
3422
3424
  system: this.describeConstraint(t.system)
3423
- }) : t.value ? this.interpolate(i.requirements.classification.mustHaveValue, {
3425
+ }) : t.value ? this.interpolate(a.requirements.classification.mustHaveValue, {
3424
3426
  value: this.describeConstraint(t.value)
3425
- }) : i.requirements.classification.mustHave;
3427
+ }) : a.requirements.classification.mustHave;
3426
3428
  }
3427
- describeMaterialFacet(t, a) {
3428
- const i = this.translations;
3429
- return a === "applicability" ? t.value ? t.value.type === "pattern" ? this.interpolate(i.applicability.material.pattern, {
3429
+ describeMaterialFacet(t, i) {
3430
+ const a = this.translations;
3431
+ return i === "applicability" ? t.value ? t.value.type === "pattern" ? this.interpolate(a.applicability.material.pattern, {
3430
3432
  pattern: this.describeConstraint(t.value)
3431
- }) : this.interpolate(i.applicability.material.value, {
3433
+ }) : this.interpolate(a.applicability.material.value, {
3432
3434
  value: this.describeConstraint(t.value)
3433
- }) : i.applicability.material.any : t.value ? t.value.type === "pattern" ? this.interpolate(i.requirements.material.mustMatch, {
3435
+ }) : a.applicability.material.any : t.value ? t.value.type === "pattern" ? this.interpolate(a.requirements.material.mustMatch, {
3434
3436
  pattern: this.describeConstraint(t.value)
3435
- }) : this.interpolate(i.requirements.material.mustBe, {
3437
+ }) : this.interpolate(a.requirements.material.mustBe, {
3436
3438
  value: this.describeConstraint(t.value)
3437
- }) : i.requirements.material.mustHave;
3439
+ }) : a.requirements.material.mustHave;
3438
3440
  }
3439
- describePartOfFacet(t, a) {
3440
- const i = this.translations, n = this.getRelationDescription(t.relation);
3441
- return a === "applicability" ? t.entity ? t.entity.predefinedType ? this.interpolate(i.applicability.partOf.withEntityAndType, {
3441
+ describePartOfFacet(t, i) {
3442
+ const a = this.translations, n = this.getRelationDescription(t.relation);
3443
+ return i === "applicability" ? t.entity ? t.entity.predefinedType ? this.interpolate(a.applicability.partOf.withEntityAndType, {
3442
3444
  relation: n,
3443
3445
  entity: this.describeConstraint(t.entity.name),
3444
3446
  predefinedType: this.describeConstraint(t.entity.predefinedType)
3445
- }) : this.interpolate(i.applicability.partOf.withEntity, {
3447
+ }) : this.interpolate(a.applicability.partOf.withEntity, {
3446
3448
  relation: n,
3447
3449
  entity: this.describeConstraint(t.entity.name)
3448
- }) : this.interpolate(i.applicability.partOf.simple, {
3450
+ }) : this.interpolate(a.applicability.partOf.simple, {
3449
3451
  relation: n
3450
- }) : t.entity ? this.interpolate(i.requirements.partOf.mustBe, {
3452
+ }) : t.entity ? this.interpolate(a.requirements.partOf.mustBe, {
3451
3453
  relation: n,
3452
3454
  entity: this.describeConstraint(t.entity.name)
3453
- }) : this.interpolate(i.requirements.partOf.mustBeSimple, {
3455
+ }) : this.interpolate(a.requirements.partOf.mustBeSimple, {
3454
3456
  relation: n
3455
3457
  });
3456
3458
  }
3457
3459
  describeConstraint(t) {
3458
- const a = this.translations;
3460
+ const i = this.translations;
3459
3461
  switch(t.type){
3460
3462
  case "simpleValue":
3461
- return this.interpolate(a.constraints.simpleValue, {
3463
+ return this.interpolate(i.constraints.simpleValue, {
3462
3464
  value: t.value
3463
3465
  });
3464
3466
  case "pattern":
3465
- return this.interpolate(a.constraints.pattern, {
3467
+ return this.interpolate(i.constraints.pattern, {
3466
3468
  pattern: t.pattern
3467
3469
  });
3468
3470
  case "enumeration":
3469
- return t.values.length === 1 ? this.interpolate(a.constraints.enumeration.single, {
3471
+ return t.values.length === 1 ? this.interpolate(i.constraints.enumeration.single, {
3470
3472
  value: t.values[0]
3471
- }) : this.interpolate(a.constraints.enumeration.multiple, {
3472
- values: t.values.map((i)=>`"${i}"`).join(", ")
3473
+ }) : this.interpolate(i.constraints.enumeration.multiple, {
3474
+ values: t.values.map((a)=>`"${a}"`).join(", ")
3473
3475
  });
3474
3476
  case "bounds":
3475
3477
  return this.describeBounds(t);
@@ -3478,129 +3480,129 @@ let __tla = Promise.all([
3478
3480
  }
3479
3481
  }
3480
3482
  describeBounds(t) {
3481
- const a = this.translations.constraints.bounds;
3482
- return t.minInclusive !== void 0 && t.maxInclusive !== void 0 ? this.interpolate(a.between, {
3483
+ const i = this.translations.constraints.bounds;
3484
+ return t.minInclusive !== void 0 && t.maxInclusive !== void 0 ? this.interpolate(i.between, {
3483
3485
  min: t.minInclusive,
3484
3486
  max: t.maxInclusive
3485
- }) : t.minInclusive !== void 0 ? this.interpolate(a.atLeast, {
3487
+ }) : t.minInclusive !== void 0 ? this.interpolate(i.atLeast, {
3486
3488
  min: t.minInclusive
3487
- }) : t.maxInclusive !== void 0 ? this.interpolate(a.atMost, {
3489
+ }) : t.maxInclusive !== void 0 ? this.interpolate(i.atMost, {
3488
3490
  max: t.maxInclusive
3489
- }) : t.minExclusive !== void 0 ? this.interpolate(a.greaterThan, {
3491
+ }) : t.minExclusive !== void 0 ? this.interpolate(i.greaterThan, {
3490
3492
  min: t.minExclusive
3491
- }) : t.maxExclusive !== void 0 ? this.interpolate(a.lessThan, {
3493
+ }) : t.maxExclusive !== void 0 ? this.interpolate(i.lessThan, {
3492
3494
  max: t.maxExclusive
3493
3495
  }) : "any value";
3494
3496
  }
3495
3497
  describeFailure(t) {
3496
- const a = this.translations.failures;
3497
- if (!t.failure) return t.actualValue && t.expectedValue ? `${t.actualValue} ≠ ${t.expectedValue}` : a.unknown.replace("{reason}", "no details");
3498
- const { type: i, field: n, actual: r, expected: s, context: l } = t.failure;
3499
- switch(i){
3498
+ const i = this.translations.failures;
3499
+ if (!t.failure) return t.actualValue && t.expectedValue ? `${t.actualValue} ≠ ${t.expectedValue}` : i.unknown.replace("{reason}", "no details");
3500
+ const { type: a, field: n, actual: r, expected: s, context: l } = t.failure;
3501
+ switch(a){
3500
3502
  case "ENTITY_TYPE_MISMATCH":
3501
- return this.interpolate(a.entityTypeMismatch, {
3503
+ return this.interpolate(i.entityTypeMismatch, {
3502
3504
  actual: r || "?",
3503
3505
  expected: s || "?"
3504
3506
  });
3505
3507
  case "PREDEFINED_TYPE_MISMATCH":
3506
- return this.interpolate(a.predefinedTypeMismatch, {
3508
+ return this.interpolate(i.predefinedTypeMismatch, {
3507
3509
  actual: r || "?",
3508
3510
  expected: s || "?"
3509
3511
  });
3510
3512
  case "PREDEFINED_TYPE_MISSING":
3511
- return this.interpolate(a.predefinedTypeMissing, {
3513
+ return this.interpolate(i.predefinedTypeMissing, {
3512
3514
  expected: s || "?"
3513
3515
  });
3514
3516
  case "ATTRIBUTE_MISSING":
3515
- return this.interpolate(a.attributeMissing, {
3517
+ return this.interpolate(i.attributeMissing, {
3516
3518
  name: n || "?"
3517
3519
  });
3518
3520
  case "ATTRIBUTE_VALUE_MISMATCH":
3519
- return this.interpolate(a.attributeValueMismatch, {
3521
+ return this.interpolate(i.attributeValueMismatch, {
3520
3522
  name: n || "?",
3521
3523
  actual: r || "?",
3522
3524
  expected: s || "?"
3523
3525
  });
3524
3526
  case "ATTRIBUTE_PATTERN_MISMATCH":
3525
- return this.interpolate(a.attributePatternMismatch, {
3527
+ return this.interpolate(i.attributePatternMismatch, {
3526
3528
  name: n || "?",
3527
3529
  actual: r || "?",
3528
3530
  expected: s || "?"
3529
3531
  });
3530
3532
  case "PSET_MISSING":
3531
- return l?.availablePsets ? this.interpolate(a.psetMissingAvailable, {
3533
+ return l?.availablePsets ? this.interpolate(i.psetMissingAvailable, {
3532
3534
  pset: n || s || "?",
3533
3535
  available: l.availablePsets
3534
- }) : this.interpolate(a.psetMissing, {
3536
+ }) : this.interpolate(i.psetMissing, {
3535
3537
  pset: n || s || "?"
3536
3538
  });
3537
3539
  case "PROPERTY_MISSING":
3538
- return l?.availableProperties ? this.interpolate(a.propertyMissingAvailable, {
3540
+ return l?.availableProperties ? this.interpolate(i.propertyMissingAvailable, {
3539
3541
  property: n || "?",
3540
3542
  pset: l.propertySet || "?",
3541
3543
  available: l.availableProperties
3542
- }) : this.interpolate(a.propertyMissing, {
3544
+ }) : this.interpolate(i.propertyMissing, {
3543
3545
  property: n || "?",
3544
3546
  pset: l?.propertySet || "?"
3545
3547
  });
3546
3548
  case "PROPERTY_VALUE_MISMATCH":
3547
- return this.interpolate(a.propertyValueMismatch, {
3549
+ return this.interpolate(i.propertyValueMismatch, {
3548
3550
  pset: this.extractPsetFromField(n),
3549
3551
  property: this.extractPropertyFromField(n),
3550
3552
  actual: r || "?",
3551
3553
  expected: s || "?"
3552
3554
  });
3553
3555
  case "PROPERTY_DATATYPE_MISMATCH":
3554
- return this.interpolate(a.propertyDatatypeMismatch, {
3556
+ return this.interpolate(i.propertyDatatypeMismatch, {
3555
3557
  pset: this.extractPsetFromField(n),
3556
3558
  property: this.extractPropertyFromField(n),
3557
3559
  actual: r || "?",
3558
3560
  expected: s || "?"
3559
3561
  });
3560
3562
  case "PROPERTY_OUT_OF_BOUNDS":
3561
- return this.interpolate(a.propertyOutOfBounds, {
3563
+ return this.interpolate(i.propertyOutOfBounds, {
3562
3564
  pset: this.extractPsetFromField(n),
3563
3565
  property: this.extractPropertyFromField(n),
3564
3566
  actual: r || "?",
3565
3567
  expected: s || "?"
3566
3568
  });
3567
3569
  case "CLASSIFICATION_MISSING":
3568
- return a.classificationMissing;
3570
+ return i.classificationMissing;
3569
3571
  case "CLASSIFICATION_SYSTEM_MISMATCH":
3570
- return l?.availableSystems ? this.interpolate(a.classificationSystemMissingAvailable, {
3572
+ return l?.availableSystems ? this.interpolate(i.classificationSystemMissingAvailable, {
3571
3573
  expected: s || "?",
3572
3574
  available: l.availableSystems
3573
- }) : this.interpolate(a.classificationSystemMismatch, {
3575
+ }) : this.interpolate(i.classificationSystemMismatch, {
3574
3576
  actual: r || "?",
3575
3577
  expected: s || "?"
3576
3578
  });
3577
3579
  case "CLASSIFICATION_VALUE_MISMATCH":
3578
- return l?.availableValues ? this.interpolate(a.classificationValueMissingAvailable, {
3580
+ return l?.availableValues ? this.interpolate(i.classificationValueMissingAvailable, {
3579
3581
  expected: s || "?",
3580
3582
  available: l.availableValues
3581
- }) : this.interpolate(a.classificationValueMismatch, {
3583
+ }) : this.interpolate(i.classificationValueMismatch, {
3582
3584
  actual: r || "?",
3583
3585
  expected: s || "?"
3584
3586
  });
3585
3587
  case "MATERIAL_MISSING":
3586
- return a.materialMissing;
3588
+ return i.materialMissing;
3587
3589
  case "MATERIAL_VALUE_MISMATCH":
3588
- return l?.availableMaterials ? this.interpolate(a.materialValueMissingAvailable, {
3590
+ return l?.availableMaterials ? this.interpolate(i.materialValueMissingAvailable, {
3589
3591
  expected: s || "?",
3590
3592
  available: l.availableMaterials
3591
- }) : this.interpolate(a.materialValueMismatch, {
3593
+ }) : this.interpolate(i.materialValueMismatch, {
3592
3594
  actual: r || "?",
3593
3595
  expected: s || "?"
3594
3596
  });
3595
3597
  case "PARTOF_RELATION_MISSING":
3596
- return l?.entity ? this.interpolate(a.partOfMissing, {
3598
+ return l?.entity ? this.interpolate(i.partOfMissing, {
3597
3599
  relation: this.getRelationDescription(n || "IfcRelContainedInSpatialStructure"),
3598
3600
  entity: l.entity
3599
- }) : this.interpolate(a.partOfMissingSimple, {
3601
+ }) : this.interpolate(i.partOfMissingSimple, {
3600
3602
  relation: this.getRelationDescription(n || "IfcRelContainedInSpatialStructure")
3601
3603
  });
3602
3604
  case "PARTOF_ENTITY_MISMATCH":
3603
- return this.interpolate(a.partOfEntityMismatch, {
3605
+ return this.interpolate(i.partOfEntityMismatch, {
3604
3606
  actual: r || "?",
3605
3607
  expected: s || "?"
3606
3608
  });
@@ -3608,29 +3610,29 @@ let __tla = Promise.all([
3608
3610
  case "PROHIBITED_PROPERTY_EXISTS":
3609
3611
  case "PROHIBITED_CLASSIFICATION_EXISTS":
3610
3612
  case "PROHIBITED_MATERIAL_EXISTS":
3611
- return this.interpolate(a.prohibited, {
3613
+ return this.interpolate(i.prohibited, {
3612
3614
  field: n || "value",
3613
3615
  actual: r || "?"
3614
3616
  });
3615
3617
  default:
3616
- return this.interpolate(a.unknown, {
3617
- reason: i
3618
+ return this.interpolate(i.unknown, {
3619
+ reason: a
3618
3620
  });
3619
3621
  }
3620
3622
  }
3621
3623
  extractPsetFromField(t) {
3622
3624
  if (!t) return "?";
3623
- const a = t.split(".");
3624
- return a.length > 1 ? a[0] : "?";
3625
+ const i = t.split(".");
3626
+ return i.length > 1 ? i[0] : "?";
3625
3627
  }
3626
3628
  extractPropertyFromField(t) {
3627
3629
  if (!t) return "?";
3628
- const a = t.split(".");
3629
- return a.length > 1 ? a.slice(1).join(".") : t;
3630
+ const i = t.split(".");
3631
+ return i.length > 1 ? i.slice(1).join(".") : t;
3630
3632
  }
3631
3633
  describeRequirement(t) {
3632
- let a = this.describeFacet(t.facet, "requirement");
3633
- return t.optionality === "prohibited" ? a = this.applyProhibited(a) : t.optionality === "optional" && (a = this.applyOptional(a)), a;
3634
+ let i = this.describeFacet(t.facet, "requirement");
3635
+ return t.optionality === "prohibited" ? i = this.applyProhibited(i) : t.optionality === "optional" && (i = this.applyOptional(i)), i;
3634
3636
  }
3635
3637
  applyProhibited(t) {
3636
3638
  return t.replace(/^Must be/i, "Must NOT be").replace(/^Must have/i, "Must NOT have").replace(/^Muss/i, "Darf nicht").replace(/^Doit être/i, "Ne doit pas être").replace(/^Doit avoir/i, "Ne doit pas avoir");
@@ -3648,61 +3650,61 @@ let __tla = Promise.all([
3648
3650
  return this.translations.relations[t] || t.replace("IfcRel", "").toLowerCase();
3649
3651
  }
3650
3652
  }
3651
- function Gi(e) {
3653
+ function ji(e) {
3652
3654
  if (!e) return [];
3653
- const t = [], a = (i, n)=>{
3654
- i && t.push({
3655
- name: i,
3655
+ const t = [], i = (a, n)=>{
3656
+ a && t.push({
3657
+ name: a,
3656
3658
  category: n
3657
3659
  });
3658
3660
  };
3659
3661
  switch(e.type){
3660
3662
  case "Material":
3661
- a(e.name, e.category), e.category && a(e.category, e.category);
3663
+ i(e.name, e.category), e.category && i(e.category, e.category);
3662
3664
  break;
3663
3665
  case "MaterialList":
3664
- for (const i of e.materials || [])typeof i == "string" ? a(i) : i && typeof i == "object" && (a(i.name, i.category), i.category && a(i.category, i.category));
3666
+ for (const a of e.materials || [])typeof a == "string" ? i(a) : a && typeof a == "object" && (i(a.name, a.category), a.category && i(a.category, a.category));
3665
3667
  break;
3666
3668
  case "MaterialLayerSet":
3667
- a(e.name);
3668
- for (const i of e.layers || [])a(i.materialName, i.category), a(i.name, i.category), i.materialCategory && a(i.materialCategory, i.materialCategory);
3669
+ i(e.name);
3670
+ for (const a of e.layers || [])i(a.materialName, a.category), i(a.name, a.category), a.materialCategory && i(a.materialCategory, a.materialCategory);
3669
3671
  break;
3670
3672
  case "MaterialConstituentSet":
3671
- a(e.name);
3672
- for (const i of e.constituents || [])a(i.materialName, i.category), a(i.name, i.category), i.materialCategory && a(i.materialCategory, i.materialCategory);
3673
+ i(e.name);
3674
+ for (const a of e.constituents || [])i(a.materialName, a.category), i(a.name, a.category), a.materialCategory && i(a.materialCategory, a.materialCategory);
3673
3675
  break;
3674
3676
  case "MaterialProfileSet":
3675
- a(e.name);
3676
- for (const i of e.profiles || [])a(i.materialName, i.category), a(i.name, i.category), i.materialCategory && a(i.materialCategory, i.materialCategory);
3677
+ i(e.name);
3678
+ for (const a of e.profiles || [])i(a.materialName, a.category), i(a.name, a.category), a.materialCategory && i(a.materialCategory, a.materialCategory);
3677
3679
  break;
3678
3680
  }
3679
3681
  return t;
3680
3682
  }
3681
- function ji(e, t) {
3682
- const a = [
3683
- ...be(e, t) || []
3683
+ function Wi(e, t) {
3684
+ const i = [
3685
+ ...Se(e, t) || []
3684
3686
  ];
3685
- Wi(e, t, a);
3686
- const i = [];
3687
- for (const n of a){
3687
+ zi(e, t, i);
3688
+ const a = [];
3689
+ for (const n of i){
3688
3690
  const r = n.system || "", s = n.identification || n.name || "";
3689
- if (i.push({
3691
+ if (a.push({
3690
3692
  system: r,
3691
3693
  value: s,
3692
3694
  name: n.name
3693
- }), Array.isArray(n.path)) for (const l of n.path)l && l !== s && i.push({
3695
+ }), Array.isArray(n.path)) for (const l of n.path)l && l !== s && a.push({
3694
3696
  system: r,
3695
3697
  value: l,
3696
3698
  name: n.name
3697
3699
  });
3698
3700
  }
3699
- return i;
3701
+ return a;
3700
3702
  }
3701
- function Wi(e, t, a) {
3702
- const i = e.entityIndex?.byType?.get?.("IFCEXTERNALREFERENCERELATIONSHIP") || [];
3703
- if (i.length === 0 || !e.source?.length) return;
3704
- const n = new ge(e.source);
3705
- for (const r of i){
3703
+ function zi(e, t, i) {
3704
+ const a = e.entityIndex?.byType?.get?.("IFCEXTERNALREFERENCERELATIONSHIP") || [];
3705
+ if (a.length === 0 || !e.source?.length) return;
3706
+ const n = new Ae(e.source);
3707
+ for (const r of a){
3706
3708
  const s = e.entityIndex.byId.get(r);
3707
3709
  if (!s) continue;
3708
3710
  const l = n.extractEntity(s);
@@ -3711,9 +3713,9 @@ let __tla = Promise.all([
3711
3713
  if (typeof o != "number" || !Array.isArray(u) || !u.includes(t)) continue;
3712
3714
  const c = e.entityIndex.byId.get(o);
3713
3715
  if (!c) continue;
3714
- const f = n.extractEntity(c);
3715
- if (!f || f.type.toUpperCase() !== "IFCCLASSIFICATIONREFERENCE") continue;
3716
- const d = f.attributes || [], m = {
3716
+ const m = n.extractEntity(c);
3717
+ if (!m || m.type.toUpperCase() !== "IFCCLASSIFICATIONREFERENCE") continue;
3718
+ const d = m.attributes || [], f = {
3717
3719
  identification: typeof d[1] == "string" ? d[1] : void 0,
3718
3720
  name: typeof d[2] == "string" ? d[2] : void 0,
3719
3721
  path: []
@@ -3728,20 +3730,20 @@ let __tla = Promise.all([
3728
3730
  if (!_) break;
3729
3731
  const I = _.type.toUpperCase(), b = _.attributes || [];
3730
3732
  if (I === "IFCCLASSIFICATION") {
3731
- m.system = typeof b[3] == "string" ? b[3] : void 0;
3733
+ f.system = typeof b[3] == "string" ? b[3] : void 0;
3732
3734
  break;
3733
3735
  }
3734
3736
  if (I === "IFCCLASSIFICATIONREFERENCE") {
3735
3737
  const P = typeof b[1] == "string" ? b[1] : typeof b[2] == "string" ? b[2] : void 0;
3736
- P && m.path.unshift(P), y = typeof b[3] == "number" ? b[3] : void 0;
3738
+ P && f.path.unshift(P), y = typeof b[3] == "number" ? b[3] : void 0;
3737
3739
  continue;
3738
3740
  }
3739
3741
  break;
3740
3742
  }
3741
- a.push(m);
3743
+ i.push(f);
3742
3744
  }
3743
3745
  }
3744
- function de(e) {
3746
+ function fe(e) {
3745
3747
  if (typeof e == "string") return e.startsWith("IFC") || e.startsWith("Ifc") ? e.toUpperCase() : "IFCLABEL";
3746
3748
  switch(e){
3747
3749
  case 0:
@@ -3770,7 +3772,7 @@ let __tla = Promise.all([
3770
3772
  return "IFCLABEL";
3771
3773
  }
3772
3774
  }
3773
- function zi(e) {
3775
+ function Ki(e) {
3774
3776
  switch(e){
3775
3777
  case 0:
3776
3778
  return "IFCLENGTHMEASURE";
@@ -3788,27 +3790,27 @@ let __tla = Promise.all([
3788
3790
  return "IFCLABEL";
3789
3791
  }
3790
3792
  }
3791
- function Ki(e, t, a, i) {
3792
- if (!i || i === 1) return {
3793
+ function Qi(e, t, i, a) {
3794
+ if (!a || a === 1) return {
3793
3795
  value: e,
3794
3796
  values: t
3795
3797
  };
3796
- const n = a ? a.toUpperCase() : "", r = n === "IFCLENGTHMEASURE" || n === "IFCPOSITIVELENGTHMEASURE", s = !a && Array.isArray(t) && t.length > 0;
3798
+ const n = i ? i.toUpperCase() : "", r = n === "IFCLENGTHMEASURE" || n === "IFCPOSITIVELENGTHMEASURE", s = !i && Array.isArray(t) && t.length > 0;
3797
3799
  if (!r && !s) return {
3798
3800
  value: e,
3799
3801
  values: t
3800
3802
  };
3801
3803
  const l = (u)=>{
3802
3804
  const c = typeof u == "number" ? u : parseFloat(String(u));
3803
- return Number.isFinite(c) ? c * i : null;
3805
+ return Number.isFinite(c) ? c * a : null;
3804
3806
  };
3805
3807
  if (r) {
3806
3808
  const u = (()=>{
3807
- const f = l(e);
3808
- return f ?? e;
3809
- })(), c = Array.isArray(t) ? t.map((f)=>{
3810
- const d = l(f);
3811
- return d == null ? String(f) : String(d);
3809
+ const m = l(e);
3810
+ return m ?? e;
3811
+ })(), c = Array.isArray(t) ? t.map((m)=>{
3812
+ const d = l(m);
3813
+ return d == null ? String(m) : String(d);
3812
3814
  }) : t;
3813
3815
  return {
3814
3816
  value: u,
@@ -3826,84 +3828,84 @@ let __tla = Promise.all([
3826
3828
  values: o
3827
3829
  };
3828
3830
  }
3829
- function Q(e, t) {
3830
- const a = [], i = e.lengthUnitScale;
3831
- return Qi(e, t, i, a), Ji(e, t, a), Zi(e, t, a), ea(e, t, i, a), a.length === 0 && ta(e, t, a), a;
3831
+ function J(e, t) {
3832
+ const i = [], a = e.lengthUnitScale;
3833
+ return Ji(e, t, a, i), Zi(e, t, i), ea(e, t, i), ta(e, t, a, i), i.length === 0 && ia(e, t, i), i;
3832
3834
  }
3833
- function Qi(e, t, a, i) {
3835
+ function Ji(e, t, i, a) {
3834
3836
  let n = e.properties?.getForEntity?.(t);
3835
- if ((!n || n.length === 0) && (n = Se(e, t)), !(!n || n.length === 0)) for (const r of n)i.push({
3837
+ if ((!n || n.length === 0) && (n = xe(e, t)), !(!n || n.length === 0)) for (const r of n)a.push({
3836
3838
  name: r.name,
3837
- properties: (r.properties || []).map((s)=>me(s, a))
3839
+ properties: (r.properties || []).map((s)=>ye(s, i))
3838
3840
  });
3839
3841
  }
3840
- function Ji(e, t, a) {
3841
- let i = e.quantities?.getForEntity?.(t);
3842
- if ((!i || i.length === 0) && (i = Ae(e, t)), !(!i || i.length === 0)) for (const n of i)a.push({
3842
+ function Zi(e, t, i) {
3843
+ let a = e.quantities?.getForEntity?.(t);
3844
+ if ((!a || a.length === 0) && (a = Ce(e, t)), !(!a || a.length === 0)) for (const n of a)i.push({
3843
3845
  name: n.name,
3844
3846
  properties: (n.quantities || []).map((r)=>({
3845
3847
  name: r.name,
3846
3848
  value: r.value,
3847
- dataType: zi(r.type)
3849
+ dataType: Ki(r.type)
3848
3850
  }))
3849
3851
  });
3850
3852
  }
3851
- function Zi(e, t, a) {
3852
- const i = e.relationships?.getRelated?.(t, A.DefinesByProperties, "inverse") || [];
3853
- for (const n of i){
3853
+ function ea(e, t, i) {
3854
+ const a = e.relationships?.getRelated?.(t, A.DefinesByProperties, "inverse") || [];
3855
+ for (const n of a){
3854
3856
  const r = e.entityIndex?.byId?.get?.(n);
3855
3857
  if (!r) continue;
3856
3858
  const s = String(r.type).toUpperCase();
3857
3859
  if (s === "IFCPROPERTYSET" || s === "IFCELEMENTQUANTITY" || !s.endsWith("PROPERTIES")) continue;
3858
3860
  const l = N(e, n), o = l.find((c)=>c.name === "Name")?.value;
3859
- if (typeof o != "string" || !o || a.some((c)=>c.name === o)) continue;
3861
+ if (typeof o != "string" || !o || i.some((c)=>c.name === o)) continue;
3860
3862
  const u = l.filter((c)=>c.name !== "GlobalId" && c.name !== "Name" && c.name !== "Description" && c.value !== void 0 && c.value !== "").map((c)=>({
3861
3863
  name: c.name,
3862
3864
  value: c.value,
3863
3865
  dataType: ""
3864
3866
  }));
3865
- u.length > 0 && a.push({
3867
+ u.length > 0 && i.push({
3866
3868
  name: o,
3867
3869
  properties: u
3868
3870
  });
3869
3871
  }
3870
3872
  }
3871
- function ea(e, t, a, i) {
3872
- const n = xe(e, t);
3873
+ function ta(e, t, i, a) {
3874
+ const n = Re(e, t);
3873
3875
  if (!n || !n.properties || n.properties.length === 0) return;
3874
- const r = new Set(i.map((s)=>s.name));
3875
- for (const s of n.properties)r.has(s.name) || i.push({
3876
+ const r = new Set(a.map((s)=>s.name));
3877
+ for (const s of n.properties)r.has(s.name) || a.push({
3876
3878
  name: s.name,
3877
- properties: (s.properties || []).map((l)=>me(l, a))
3879
+ properties: (s.properties || []).map((l)=>ye(l, i))
3878
3880
  });
3879
3881
  }
3880
- function ta(e, t, a) {
3881
- const i = Ce(e, t);
3882
- if (i.length !== 0) for (const n of i)a.push({
3882
+ function ia(e, t, i) {
3883
+ const a = Me(e, t);
3884
+ if (a.length !== 0) for (const n of a)i.push({
3883
3885
  name: n.name,
3884
3886
  properties: (n.properties || []).map((r)=>({
3885
3887
  name: r.name,
3886
3888
  value: Array.isArray(r.value) ? JSON.stringify(r.value) : r.value,
3887
- dataType: de(r.type),
3889
+ dataType: fe(r.type),
3888
3890
  ...Array.isArray(r.values) && r.values.length > 0 ? {
3889
3891
  values: r.values
3890
3892
  } : {}
3891
3893
  }))
3892
3894
  });
3893
3895
  }
3894
- function me(e, t) {
3895
- const a = Array.isArray(e.values) && e.values.length > 0, i = e.dataType ?? (a ? void 0 : de(e.type)), n = Array.isArray(e.value) ? JSON.stringify(e.value) : e.value, r = a ? e.values : void 0, s = Ki(n, r, i, t);
3896
+ function ye(e, t) {
3897
+ const i = Array.isArray(e.values) && e.values.length > 0, a = e.dataType ?? (i ? void 0 : fe(e.type)), n = Array.isArray(e.value) ? JSON.stringify(e.value) : e.value, r = i ? e.values : void 0, s = Qi(n, r, a, t);
3896
3898
  return {
3897
3899
  name: e.name,
3898
3900
  value: s.value,
3899
- dataType: i ?? "",
3901
+ dataType: a ?? "",
3900
3902
  ...s.values ? {
3901
3903
  values: s.values
3902
3904
  } : {}
3903
3905
  };
3904
3906
  }
3905
- function ia(e, t) {
3906
- const i = N(e, t).find((s)=>s.name === "PredefinedType"), n = typeof i?.value == "string" && i.value ? i.value : void 0;
3907
+ function aa(e, t) {
3908
+ const a = N(e, t).find((s)=>s.name === "PredefinedType"), n = typeof a?.value == "string" && a.value ? a.value : void 0;
3907
3909
  if (n && n !== "NOTDEFINED") return n;
3908
3910
  const r = e.relationships?.getRelated?.(t, A.DefinesByType, "inverse") || [];
3909
3911
  for (const s of r){
@@ -3912,22 +3914,22 @@ let __tla = Promise.all([
3912
3914
  }
3913
3915
  return n;
3914
3916
  }
3915
- function aa(e, t, a) {
3916
- const i = N(e, t), r = i.find((u)=>u.name === "PredefinedType")?.value;
3917
+ function na(e, t, i) {
3918
+ const a = N(e, t), r = a.find((u)=>u.name === "PredefinedType")?.value;
3917
3919
  if (typeof r == "string" && r && r !== "NOTDEFINED" && r !== "USERDEFINED") return r;
3918
- const s = i.find((u)=>u.name === "ElementType") || i.find((u)=>u.name === "ObjectType") || i.find((u)=>u.name === "ProcessType") || i.find((u)=>u.name === "ResourceType");
3920
+ const s = a.find((u)=>u.name === "ElementType") || a.find((u)=>u.name === "ObjectType") || a.find((u)=>u.name === "ProcessType") || a.find((u)=>u.name === "ResourceType");
3919
3921
  if (s && typeof s.value == "string" && s.value) return s.value;
3920
3922
  const l = e.relationships?.getRelated?.(t, A.DefinesByType, "inverse") || [];
3921
3923
  for (const u of l){
3922
3924
  const c = N(e, u), d = c.find((y)=>y.name === "PredefinedType")?.value;
3923
3925
  if (typeof d == "string" && d && d !== "NOTDEFINED" && d !== "USERDEFINED") return d;
3924
- const m = c.find((y)=>y.name === "ElementType") || c.find((y)=>y.name === "ObjectType") || c.find((y)=>y.name === "ProcessType") || c.find((y)=>y.name === "ResourceType");
3925
- if (m && typeof m.value == "string" && m.value) return m.value;
3926
+ const f = c.find((y)=>y.name === "ElementType") || c.find((y)=>y.name === "ObjectType") || c.find((y)=>y.name === "ProcessType") || c.find((y)=>y.name === "ResourceType");
3927
+ if (f && typeof f.value == "string" && f.value) return f.value;
3926
3928
  }
3927
- const o = a();
3929
+ const o = i();
3928
3930
  return o || (typeof r == "string" && r ? r : void 0);
3929
3931
  }
3930
- function na(e) {
3932
+ function ra(e) {
3931
3933
  switch((e || "").toUpperCase()){
3932
3934
  case "IFC2X3":
3933
3935
  return "IFC2X3";
@@ -3941,7 +3943,7 @@ let __tla = Promise.all([
3941
3943
  return "IFC4";
3942
3944
  }
3943
3945
  }
3944
- const ra = {
3946
+ const sa = {
3945
3947
  IfcRelAggregates: A.Aggregates,
3946
3948
  IfcRelAssignsToGroup: A.AssignsToGroup,
3947
3949
  IfcRelContainedInSpatialStructure: A.ContainsElements,
@@ -3949,119 +3951,124 @@ let __tla = Promise.all([
3949
3951
  IfcRelVoidsElement: A.VoidsElement,
3950
3952
  IfcRelFillsElement: A.FillsElement
3951
3953
  };
3952
- ca = function(e) {
3953
- function t(i, n) {
3954
- const r = n.toLowerCase(), s = N(e, i);
3955
- for (const l of s)if (l.name.toLowerCase() === r) return l.value;
3956
- }
3957
- const a = {
3958
- getEntityType (i) {
3959
- const n = e.entities?.getTypeName?.(i);
3960
- if (n && n !== "Unknown") return n;
3961
- const r = e.entityIndex?.byId;
3962
- if (!r) return;
3963
- const s = r.get(i);
3964
- if (s) return typeof s == "object" && "type" in s ? String(s.type) : void 0;
3954
+ pa = function(e) {
3955
+ const t = new Map;
3956
+ function i(r) {
3957
+ let s = t.get(r);
3958
+ return s || (s = N(e, r), t.set(r, s)), s;
3959
+ }
3960
+ function a(r, s) {
3961
+ const l = s.toLowerCase(), o = i(r);
3962
+ for (const u of o)if (u.name.toLowerCase() === l) return u.value;
3963
+ }
3964
+ const n = {
3965
+ getEntityType (r) {
3966
+ const s = e.entities?.getTypeName?.(r);
3967
+ if (s && s !== "Unknown") return s;
3968
+ const l = e.entityIndex?.byId;
3969
+ if (!l) return;
3970
+ const o = l.get(r);
3971
+ if (o) return typeof o == "object" && "type" in o ? String(o.type) : void 0;
3965
3972
  },
3966
- getEntityName (i) {
3967
- const n = t(i, "Name");
3968
- return n !== void 0 && typeof n == "string" ? n : e.entities?.getName?.(i) || void 0;
3973
+ getEntityName (r) {
3974
+ const s = a(r, "Name");
3975
+ return s !== void 0 && typeof s == "string" ? s : e.entities?.getName?.(r) || void 0;
3969
3976
  },
3970
- getGlobalId (i) {
3971
- const n = t(i, "GlobalId");
3972
- return n !== void 0 && typeof n == "string" ? n : e.entities?.getGlobalId?.(i) || void 0;
3977
+ getGlobalId (r) {
3978
+ const s = a(r, "GlobalId");
3979
+ return s !== void 0 && typeof s == "string" ? s : e.entities?.getGlobalId?.(r) || void 0;
3973
3980
  },
3974
- getDescription (i) {
3975
- const n = t(i, "Description");
3976
- return n !== void 0 && typeof n == "string" ? n : e.entities?.getDescription?.(i) || void 0;
3981
+ getDescription (r) {
3982
+ const s = a(r, "Description");
3983
+ return s !== void 0 && typeof s == "string" ? s : e.entities?.getDescription?.(r) || void 0;
3977
3984
  },
3978
- getAttributeNames (i) {
3979
- return N(e, i).map((n)=>n.name);
3985
+ getAttributeNames (r) {
3986
+ return i(r).map((s)=>s.name);
3980
3987
  },
3981
- getAttributeXsdTypes (i, n) {
3982
- const r = a.getEntityType(i);
3983
- if (r) return Me(na(e.schemaVersion), r, n);
3988
+ getAttributeXsdTypes (r, s) {
3989
+ const l = n.getEntityType(r);
3990
+ if (l) return _e(ra(e.schemaVersion), l, s);
3984
3991
  },
3985
- getPredefinedTypeRaw (i) {
3986
- return ia(e, i);
3992
+ getPredefinedTypeRaw (r) {
3993
+ return aa(e, r);
3987
3994
  },
3988
- getObjectType (i) {
3989
- return aa(e, i, ()=>e.entities?.getObjectType?.(i));
3995
+ getObjectType (r) {
3996
+ return na(e, r, ()=>e.entities?.getObjectType?.(r));
3990
3997
  },
3991
- getEntitiesByType (i) {
3992
- const n = e.entityIndex?.byType?.get(i.toUpperCase());
3993
- return n ? Array.from(n) : [];
3998
+ getEntitiesByType (r) {
3999
+ const s = e.entityIndex?.byType?.get(r.toUpperCase());
4000
+ return s ? Array.from(s) : [];
3994
4001
  },
3995
4002
  getAllEntityIds () {
3996
- const i = e.entityIndex?.byId;
3997
- return i ? Array.from(i.keys()) : [];
4003
+ const r = e.entityIndex?.byId;
4004
+ return r ? Array.from(r.keys()) : [];
3998
4005
  },
3999
- getPropertyValue (i, n, r) {
4000
- const s = n.toLowerCase(), l = r.toLowerCase(), o = Q(e, i);
4001
- for (const u of o)if (u.name.toLowerCase() === s) {
4002
- for (const c of u.properties || [])if (c.name.toLowerCase() === l) return {
4003
- value: c.value,
4004
- dataType: c.dataType,
4005
- propertySetName: u.name,
4006
- propertyName: c.name
4006
+ getPropertyValue (r, s, l) {
4007
+ const o = s.toLowerCase(), u = l.toLowerCase(), c = J(e, r);
4008
+ for (const m of c)if (m.name.toLowerCase() === o) {
4009
+ for (const d of m.properties || [])if (d.name.toLowerCase() === u) return {
4010
+ value: d.value,
4011
+ dataType: d.dataType,
4012
+ propertySetName: m.name,
4013
+ propertyName: d.name
4007
4014
  };
4008
4015
  }
4009
4016
  },
4010
- getPropertySets (i) {
4011
- return Q(e, i);
4017
+ getPropertySets (r) {
4018
+ return J(e, r);
4012
4019
  },
4013
- getClassifications (i) {
4014
- return ji(e, i);
4020
+ getClassifications (r) {
4021
+ return Wi(e, r);
4015
4022
  },
4016
- getMaterials (i) {
4017
- return Gi(Re(e, i));
4023
+ getMaterials (r) {
4024
+ return ji(Ne(e, r));
4018
4025
  },
4019
- getParent (i, n) {
4020
- const r = a.getAncestors(i, n);
4021
- return r.length > 0 ? r[0] : void 0;
4026
+ getParent (r, s) {
4027
+ const l = n.getAncestors(r, s);
4028
+ return l.length > 0 ? l[0] : void 0;
4022
4029
  },
4023
- getAncestors (i, n) {
4024
- const r = e.relationships;
4025
- if (!r?.getRelated) return [];
4026
- const s = ra[n];
4027
- if (s === void 0) return [];
4028
- const l = [], o = new Set([
4029
- i
4030
- ]), u = [
4031
- i
4030
+ getAncestors (r, s) {
4031
+ const l = e.relationships;
4032
+ if (!l?.getRelated) return [];
4033
+ const o = sa[s];
4034
+ if (o === void 0) return [];
4035
+ const u = [], c = new Set([
4036
+ r
4037
+ ]), m = [
4038
+ r
4032
4039
  ];
4033
- for(; u.length > 0;){
4034
- const c = u.shift(), f = r.getRelated(c, s, "inverse");
4035
- for (const d of f || [])o.has(d) || (o.add(d), l.push({
4036
- expressId: d,
4037
- entityType: a.getEntityType(d) || "Unknown",
4038
- predefinedType: a.getObjectType(d)
4039
- }), u.push(d));
4040
+ for(; m.length > 0;){
4041
+ const d = m.shift(), f = l.getRelated(d, o, "inverse");
4042
+ for (const y of f || [])c.has(y) || (c.add(y), u.push({
4043
+ expressId: y,
4044
+ entityType: n.getEntityType(y) || "Unknown",
4045
+ predefinedType: n.getObjectType(y)
4046
+ }), m.push(y));
4040
4047
  }
4041
- return l;
4048
+ return u;
4042
4049
  },
4043
- getAttribute (i, n) {
4044
- switch(n.toLowerCase()){
4050
+ getAttribute (r, s) {
4051
+ switch(s.toLowerCase()){
4045
4052
  case "name":
4046
- return a.getEntityName(i);
4053
+ return n.getEntityName(r);
4047
4054
  case "description":
4048
- return a.getDescription(i);
4055
+ return n.getDescription(r);
4049
4056
  case "globalid":
4050
- return a.getGlobalId(i);
4057
+ return n.getGlobalId(r);
4051
4058
  case "objecttype":
4052
4059
  case "predefinedtype":
4053
- return a.getObjectType(i);
4060
+ return n.getObjectType(r);
4054
4061
  default:
4055
4062
  {
4056
- const s = t(i, n);
4057
- if (s !== void 0) return s;
4058
- const l = e.entities;
4059
- return l?.getAttribute ? l.getAttribute(i, n) : void 0;
4063
+ const o = a(r, s);
4064
+ if (o !== void 0) return o;
4065
+ const u = e.entities;
4066
+ return u?.getAttribute ? u.getAttribute(r, s) : void 0;
4060
4067
  }
4061
4068
  }
4062
4069
  }
4063
4070
  };
4064
- return a;
4071
+ return n;
4065
4072
  };
4066
4073
  });
4067
- export { g as I, oa as a, ua as b, ca as c, Ne as p, la as v, __tla };
4074
+ export { g as I, ua as a, ca as b, pa as c, Pe as p, oa as v, __tla };