@xtctwins/tctwins-bimx-engine 0.2.49 → 0.2.50

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 (85) hide show
  1. package/README.md +193 -193
  2. package/dist/{AnnotationTool-BIQYccLV.mjs → AnnotationTool-ClUqfSZp.mjs} +35 -35
  3. package/dist/BIMX_Viewer_Lib.es.js +3 -3
  4. package/dist/BIMX_Viewer_Lib.umd.js +130 -138
  5. package/dist/{CommentTool-CTH0u76a.mjs → CommentTool-DcAcusOm.mjs} +168 -168
  6. package/dist/{HiddenTool-B1o4e4Mi.mjs → HiddenTool-D0kbPBtX.mjs} +13 -13
  7. package/dist/{InspectorTool-BnKwoEV6.mjs → InspectorTool-BMXg86Ow.mjs} +64 -64
  8. package/dist/{MeasureTool-DD0MQlVK.mjs → MeasureTool-CN4zNj6w.mjs} +22 -22
  9. package/dist/{MouseTool-B99s92wL.mjs → MouseTool-Dcp3UTRv.mjs} +15 -15
  10. package/dist/{NavigateTool-Bzni_edr.mjs → NavigateTool-TVHCkKRU.mjs} +13 -13
  11. package/dist/{RoamTool-BnF-1cl2.mjs → RoamTool-CkYHH7aP.mjs} +17 -17
  12. package/dist/ScreenShotTool-DC4RyElm.mjs +500 -0
  13. package/dist/{SectionTool-DJjxjkhi.mjs → SectionTool-Vn7purnG.mjs} +43 -43
  14. package/dist/SettingTool-DWoeF-dC.mjs +815 -0
  15. package/dist/StructureTree-DZ0gUacM.mjs +1846 -0
  16. package/dist/{alert-BMV9n7SQ.mjs → alert-BkyuKyki.mjs} +9 -9
  17. package/dist/el-input-number-CUWk0tiM.mjs +1169 -0
  18. package/dist/{index-BaDPCrAt.mjs → index-CBXvm6RA.mjs} +51711 -47848
  19. package/dist/index.html +17 -17
  20. package/dist/{panel.vue_vue_type_style_index_0_lang-oT_Sff-F.mjs → panel.vue_vue_type_style_index_0_lang-IOvVcvu7.mjs} +3 -3
  21. package/dist/style.css +1 -1
  22. package/dist/{tallPanel-DojXnxix.mjs → tallPanel-HBoW6JCm.mjs} +15 -15
  23. package/package.json +2 -2
  24. package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +38 -10
  25. package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +37 -9
  26. package/types/components/BCFComponents/BCFDisplayList.vue.d.ts +5 -7
  27. package/types/components/BCFComponents/BCFFilter.vue.d.ts +5 -7
  28. package/types/components/BCFComponents/BCFTool.vue.d.ts +4 -7
  29. package/types/components/BCFComponents/addObjectOrAnno.vue.d.ts +5 -7
  30. package/types/components/BCFComponents/checkObjectPanel.vue.d.ts +5 -6
  31. package/types/components/BCFComponents/commentInput.vue.d.ts +36 -10
  32. package/types/components/BCFComponents/commentsView.vue.d.ts +36 -7
  33. package/types/components/BCFComponents/dialogPanel.vue.d.ts +5 -8
  34. package/types/components/BCFComponents/imageView.vue.d.ts +5 -7
  35. package/types/components/BCFComponents/imageZoomIn.vue.d.ts +5 -6
  36. package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +1 -1
  37. package/types/components/BimViewerComponents/AppToolbar.vue.d.ts +18 -1
  38. package/types/components/BimViewerComponents/ClickEvent.vue.d.ts +1 -1
  39. package/types/components/BimViewerComponents/CommentTool.vue.d.ts +32 -1
  40. package/types/components/BimViewerComponents/HiddenTool.vue.d.ts +1 -1
  41. package/types/components/BimViewerComponents/MobileCommentsTool/add.vue.d.ts +6 -8
  42. package/types/components/BimViewerComponents/MobileCommentsTool/detail.vue.d.ts +4 -5
  43. package/types/components/BimViewerComponents/MobileCommentsTool/draw.vue.d.ts +2 -2
  44. package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +478 -1
  45. package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +499 -7
  46. package/types/components/BimViewerComponents/MobileCommentsTool/zoomIn.vue.d.ts +5 -6
  47. package/types/components/BimViewerComponents/MouseTool.vue.d.ts +1 -1
  48. package/types/components/BimViewerComponents/NavigateTool.vue.d.ts +1 -1
  49. package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +1 -1
  50. package/types/components/BimViewerComponents/RoamTool.vue.d.ts +1 -1
  51. package/types/components/BimViewerComponents/SettingTool.vue.d.ts +4 -6
  52. package/types/components/BimViewerComponents/StructureTree.vue.d.ts +4026 -1
  53. package/types/components/BimViewerComponents/Toolbar.vue.d.ts +1 -1
  54. package/types/components/BimViewerComponents/mobileToolbar.vue.d.ts +18 -1
  55. package/types/components/BimxViewerComp.vue.d.ts +7 -14
  56. package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +37 -10
  57. package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +37 -9
  58. package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +499 -7
  59. package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +478 -1
  60. package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +5 -8
  61. package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +38 -12
  62. package/types/components/MobileBCFComponents/MobileCommentsView.vue.d.ts +7 -9
  63. package/types/components/MobileBCFComponents/selectPanel.vue.d.ts +5 -7
  64. package/types/components/bimxViewer.vue.d.ts +7 -14
  65. package/types/components/utilsComponents/alert.vue.d.ts +1 -1
  66. package/types/components/utilsComponents/closeButton.vue.d.ts +1 -1
  67. package/types/components/utilsComponents/closeButton_dark.vue.d.ts +1 -1
  68. package/types/components/utilsComponents/emptyPage.vue.d.ts +1 -1
  69. package/types/components/utilsComponents/loading.vue.d.ts +1 -1
  70. package/types/components/utilsComponents/panel.vue.d.ts +8 -2
  71. package/types/components/utilsComponents/prompt.vue.d.ts +1 -1
  72. package/types/components/utilsComponents/rectangleButton.vue.d.ts +3 -1
  73. package/types/components/utilsComponents/tallPanel.vue.d.ts +13 -3
  74. package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +13 -3
  75. package/types/pages/BimxViewerEntry.vue.d.ts +5 -57
  76. package/types/pages/viewerEntry.vue.d.ts +7 -57
  77. package/types/store/initConfigs.d.ts +1 -1
  78. package/types/store/toolbars.d.ts +46 -46
  79. package/dist/ScreenShotTool-CSBJzyDd.mjs +0 -357
  80. package/dist/SettingTool-D2qksFZK.mjs +0 -657
  81. package/dist/StructureTree-DrLo9Bch.mjs +0 -1583
  82. package/dist/el-input-number-BOQOKzK0.mjs +0 -818
  83. package/types/components/BCFComponents/BCFCommentNew.vue.d.ts +0 -22
  84. package/types/components/BimViewerComponents/emptyPage.vue.d.ts +0 -8
  85. package/types/tests/cmt.d.ts +0 -1
@@ -0,0 +1,1846 @@
1
+ import { u as ie, w as Pe, b as Re, c as tt, a as nt, i as ae, h as Ke, d as Te, e as Ne, f as Ie, g as _e, j as qe, N as ot, k as st, l as Me, r as we, m as dt, E as at, n as rt, o as it, _ as Ue, p as lt, q as ct, s as te, t as ut, v as Ce, x as ht, y as ft, z as pt, A as vt, B as yt, C as se, D as me, T as je, F as gt, G as kt, H as Nt, I as Ct } from "./index-CBXvm6RA.mjs";
2
+ import { _ as mt } from "./tallPanel-HBoW6JCm.mjs";
3
+ import { _ as bt } from "./panel.vue_vue_type_style_index_0_lang-IOvVcvu7.mjs";
4
+ import { defineComponent as ce, createBlock as J, openBlock as I, Transition as Et, mergeProps as _t, unref as T, toHandlers as xt, withCtx as L, renderSlot as xe, ref as w, computed as Se, onMounted as Le, onUpdated as Ve, resolveDynamicComponent as Ye, normalizeStyle as We, normalizeClass as q, useAttrs as Dt, reactive as wt, nextTick as ye, inject as ge, h as He, onBeforeUnmount as Je, provide as ke, getCurrentInstance as Ge, watch as V, resolveComponent as de, withDirectives as X, createElementBlock as H, withModifiers as ne, createElementVNode as D, createVNode as P, createCommentVNode as he, Fragment as pe, renderList as ve, vShow as Z, toDisplayString as U } from "vue";
5
+ import { S as be } from "./const-DOnRsYpZ.mjs";
6
+ import { Loading as Kt, CaretRight as Tt } from "@element-plus/icons-vue";
7
+ var It = /* @__PURE__ */ ce({
8
+ name: "ElCollapseTransition",
9
+ __name: "collapse-transition",
10
+ setup(t) {
11
+ const e = ie("collapse-transition"), o = (n) => {
12
+ n.style.maxHeight = "", n.style.overflow = n.dataset.oldOverflow, n.style.paddingTop = n.dataset.oldPaddingTop, n.style.paddingBottom = n.dataset.oldPaddingBottom;
13
+ }, s = {
14
+ beforeEnter(n) {
15
+ n.dataset || (n.dataset = {}), n.dataset.oldPaddingTop = n.style.paddingTop, n.dataset.oldPaddingBottom = n.style.paddingBottom, n.style.height && (n.dataset.elExistsHeight = n.style.height), n.style.maxHeight = 0, n.style.paddingTop = 0, n.style.paddingBottom = 0;
16
+ },
17
+ enter(n) {
18
+ requestAnimationFrame(() => {
19
+ n.dataset.oldOverflow = n.style.overflow, n.dataset.elExistsHeight ? n.style.maxHeight = n.dataset.elExistsHeight : n.scrollHeight !== 0 ? n.style.maxHeight = `${n.scrollHeight}px` : n.style.maxHeight = 0, n.style.paddingTop = n.dataset.oldPaddingTop, n.style.paddingBottom = n.dataset.oldPaddingBottom, n.style.overflow = "hidden";
20
+ });
21
+ },
22
+ afterEnter(n) {
23
+ n.style.maxHeight = "", n.style.overflow = n.dataset.oldOverflow;
24
+ },
25
+ enterCancelled(n) {
26
+ o(n);
27
+ },
28
+ beforeLeave(n) {
29
+ n.dataset || (n.dataset = {}), n.dataset.oldPaddingTop = n.style.paddingTop, n.dataset.oldPaddingBottom = n.style.paddingBottom, n.dataset.oldOverflow = n.style.overflow, n.style.maxHeight = `${n.scrollHeight}px`, n.style.overflow = "hidden";
30
+ },
31
+ leave(n) {
32
+ n.scrollHeight !== 0 && (n.style.maxHeight = 0, n.style.paddingTop = 0, n.style.paddingBottom = 0);
33
+ },
34
+ afterLeave(n) {
35
+ o(n);
36
+ },
37
+ leaveCancelled(n) {
38
+ o(n);
39
+ }
40
+ };
41
+ return (n, d) => (I(), J(Et, _t({
42
+ name: T(e).b()
43
+ }, xt(s)), {
44
+ default: L(() => [
45
+ xe(n.$slots, "default")
46
+ ]),
47
+ _: 3
48
+ /* FORWARDED */
49
+ }, 16, ["name"]));
50
+ }
51
+ });
52
+ const St = Pe(It), Bt = Re({
53
+ /**
54
+ * @description text type
55
+ */
56
+ type: {
57
+ type: String,
58
+ values: ["primary", "success", "info", "warning", "danger", ""],
59
+ default: ""
60
+ },
61
+ /**
62
+ * @description text size
63
+ */
64
+ size: {
65
+ type: String,
66
+ values: tt,
67
+ default: ""
68
+ },
69
+ /**
70
+ * @description render ellipsis
71
+ */
72
+ truncated: Boolean,
73
+ /**
74
+ * @description maximum lines
75
+ */
76
+ lineClamp: {
77
+ type: [String, Number]
78
+ },
79
+ /**
80
+ * @description custom element tag
81
+ */
82
+ tag: {
83
+ type: String,
84
+ default: "span"
85
+ }
86
+ });
87
+ var At = /* @__PURE__ */ ce({
88
+ name: "ElText",
89
+ __name: "text",
90
+ props: Bt,
91
+ setup(t) {
92
+ const e = t, o = w(), s = nt(), n = ie("text"), d = Se(() => [
93
+ n.b(),
94
+ n.m(e.type),
95
+ n.m(s.value),
96
+ n.is("truncated", e.truncated),
97
+ n.is("line-clamp", !ae(e.lineClamp))
98
+ ]), a = () => {
99
+ var l, u, p, c, i, h, v;
100
+ if (Dt().title) return;
101
+ let N = !1;
102
+ const k = ((l = o.value) == null ? void 0 : l.textContent) || "";
103
+ if (e.truncated) {
104
+ const C = (u = o.value) == null ? void 0 : u.offsetWidth, S = (p = o.value) == null ? void 0 : p.scrollWidth;
105
+ C && S && S > C && (N = !0);
106
+ } else if (!ae(e.lineClamp)) {
107
+ const C = (c = o.value) == null ? void 0 : c.offsetHeight, S = (i = o.value) == null ? void 0 : i.scrollHeight;
108
+ C && S && S > C && (N = !0);
109
+ }
110
+ N ? (h = o.value) == null || h.setAttribute("title", k) : (v = o.value) == null || v.removeAttribute("title");
111
+ };
112
+ return Le(a), Ve(a), (l, u) => (I(), J(Ye(t.tag), {
113
+ ref_key: "textRef",
114
+ ref: o,
115
+ class: q(d.value),
116
+ style: We({ "-webkit-line-clamp": t.lineClamp })
117
+ }, {
118
+ default: L(() => [
119
+ xe(l.$slots, "default")
120
+ ]),
121
+ _: 3
122
+ /* FORWARDED */
123
+ }, 8, ["class", "style"]));
124
+ }
125
+ });
126
+ const Pt = Pe(At), le = "$treeNodeId", ze = function(t, e) {
127
+ !e || e[le] || Object.defineProperty(e, le, {
128
+ value: t.id,
129
+ enumerable: !1,
130
+ configurable: !1,
131
+ writable: !1
132
+ });
133
+ }, Oe = (t, e) => e == null ? void 0 : e[t || le], Be = (t, e, o) => {
134
+ const s = t.value.currentNode;
135
+ o();
136
+ const n = t.value.currentNode;
137
+ s !== n && e("current-change", n ? n.data : null, n);
138
+ };
139
+ var Lt = Object.defineProperty, Ot = (t, e, o) => e in t ? Lt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, O = (t, e, o) => Ot(t, typeof e != "symbol" ? e + "" : e, o);
140
+ const Qe = (t) => {
141
+ let e = !0, o = !0, s = !0, n = !0;
142
+ for (let d = 0, a = t.length; d < a; d++) {
143
+ const l = t[d];
144
+ (l.checked !== !0 || l.indeterminate) && (e = !1, l.disabled || (s = !1)), (l.checked !== !1 || l.indeterminate) && (o = !1), l.isEffectivelyChecked || (n = !1);
145
+ }
146
+ return {
147
+ all: e,
148
+ none: o,
149
+ allWithoutDisable: s,
150
+ half: !e && !o,
151
+ isEffectivelyChecked: n
152
+ };
153
+ }, fe = function(t) {
154
+ if (t.childNodes.length === 0 || t.loading) {
155
+ t.isEffectivelyChecked = t.disabled || t.checked;
156
+ return;
157
+ }
158
+ const { all: e, none: o, half: s, isEffectivelyChecked: n } = Qe(
159
+ t.childNodes
160
+ );
161
+ t.isEffectivelyChecked = n, e ? (t.checked = !0, t.indeterminate = !1) : s ? (t.checked = !1, t.indeterminate = !0) : o && (t.checked = !1, t.indeterminate = !1);
162
+ const d = t.parent;
163
+ !d || d.level === 0 || t.store.checkStrictly || fe(d);
164
+ }, Ee = function(t, e) {
165
+ const o = t.store.props, s = t.data || {}, n = o[e];
166
+ if (_e(n))
167
+ return n(s, t);
168
+ if (qe(n))
169
+ return s[n];
170
+ if (ae(n)) {
171
+ const d = s[e];
172
+ return ae(d) ? "" : d;
173
+ }
174
+ }, Ae = function(t, e) {
175
+ t.forEach((o) => {
176
+ o.canFocus = e, Ae(o.childNodes, e);
177
+ });
178
+ };
179
+ let $t = 0;
180
+ class re {
181
+ constructor(e) {
182
+ O(this, "id"), O(this, "text"), O(this, "checked"), O(this, "indeterminate"), O(this, "data"), O(this, "expanded"), O(this, "parent"), O(this, "visible"), O(this, "isCurrent"), O(this, "store"), O(this, "isLeafByUser"), O(this, "isLeaf"), O(this, "canFocus"), O(this, "level"), O(this, "loaded"), O(this, "childNodes"), O(this, "loading"), O(this, "isEffectivelyChecked", !1), this.id = $t++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1;
183
+ for (const o in e)
184
+ Ke(e, o) && (this[o] = e[o]);
185
+ this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1);
186
+ }
187
+ initialize() {
188
+ var e;
189
+ const o = this.store;
190
+ if (!o)
191
+ throw new Error("[Node]store is required!");
192
+ o.registerNode(this);
193
+ const s = o.props;
194
+ if (s && typeof s.isLeaf < "u") {
195
+ const a = Ee(this, "isLeaf");
196
+ Te(a) && (this.isLeafByUser = a);
197
+ }
198
+ if (o.lazy !== !0 && this.data ? (this.setData(this.data), o.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && o.lazy && o.defaultExpandAll && !this.isLeafByUser && this.expand(), Ne(this.data) || ze(this, this.data), !this.data) return;
199
+ const n = o.defaultExpandedKeys, d = o.key;
200
+ d && !Ie(this.key) && n && n.includes(this.key) && this.expand(null, o.autoExpandParent), d && o.currentNodeKey !== void 0 && this.key === o.currentNodeKey && (o.currentNode && (o.currentNode.isCurrent = !1), o.currentNode = this, o.currentNode.isCurrent = !0), o.lazy && o._initDefaultCheckedNode(this), this.updateLeafState(), (this.level === 1 || ((e = this.parent) == null ? void 0 : e.expanded) === !0) && (this.canFocus = !0);
201
+ }
202
+ setData(e) {
203
+ Ne(e) || ze(this, e), this.data = e, this.childNodes = [];
204
+ let o;
205
+ this.level === 0 && Ne(this.data) ? o = this.data : o = Ee(this, "children") || [];
206
+ for (let s = 0, n = o.length; s < n; s++)
207
+ this.insertChild({ data: o[s] });
208
+ }
209
+ get label() {
210
+ return Ee(this, "label");
211
+ }
212
+ get key() {
213
+ const e = this.store.key;
214
+ return this.data ? this.data[e] : null;
215
+ }
216
+ get disabled() {
217
+ return Ee(this, "disabled");
218
+ }
219
+ get nextSibling() {
220
+ const e = this.parent;
221
+ if (e) {
222
+ const o = e.childNodes.indexOf(this);
223
+ if (o > -1)
224
+ return e.childNodes[o + 1];
225
+ }
226
+ return null;
227
+ }
228
+ get previousSibling() {
229
+ const e = this.parent;
230
+ if (e) {
231
+ const o = e.childNodes.indexOf(this);
232
+ if (o > -1)
233
+ return o > 0 ? e.childNodes[o - 1] : null;
234
+ }
235
+ return null;
236
+ }
237
+ contains(e, o = !0) {
238
+ return (this.childNodes || []).some(
239
+ (s) => s === e || o && s.contains(e)
240
+ );
241
+ }
242
+ remove() {
243
+ const e = this.parent;
244
+ e && e.removeChild(this);
245
+ }
246
+ insertChild(e, o, s) {
247
+ if (!e) throw new Error("InsertChild error: child is required.");
248
+ if (!(e instanceof re)) {
249
+ if (!s) {
250
+ const n = this.getChildren(!0);
251
+ n != null && n.includes(e.data) || (ae(o) || o < 0 ? n == null || n.push(e.data) : n == null || n.splice(o, 0, e.data));
252
+ }
253
+ Object.assign(e, {
254
+ parent: this,
255
+ store: this.store
256
+ }), e = wt(new re(e)), e instanceof re && e.initialize();
257
+ }
258
+ e.level = this.level + 1, ae(o) || o < 0 ? this.childNodes.push(e) : this.childNodes.splice(o, 0, e), this.updateLeafState();
259
+ }
260
+ insertBefore(e, o) {
261
+ let s;
262
+ o && (s = this.childNodes.indexOf(o)), this.insertChild(e, s);
263
+ }
264
+ insertAfter(e, o) {
265
+ let s;
266
+ o && (s = this.childNodes.indexOf(o), s !== -1 && (s += 1)), this.insertChild(e, s);
267
+ }
268
+ removeChild(e) {
269
+ const o = this.getChildren() || [], s = o.indexOf(e.data);
270
+ s > -1 && o.splice(s, 1);
271
+ const n = this.childNodes.indexOf(e);
272
+ n > -1 && (this.store && this.store.deregisterNode(e), e.parent = null, this.childNodes.splice(n, 1)), this.updateLeafState();
273
+ }
274
+ removeChildByData(e) {
275
+ const o = this.childNodes.find((s) => s.data === e);
276
+ o && this.removeChild(o);
277
+ }
278
+ expand(e, o) {
279
+ const s = () => {
280
+ if (o) {
281
+ let n = this.parent;
282
+ for (; n && n.level > 0; )
283
+ n.expanded = !0, n = n.parent;
284
+ }
285
+ this.expanded = !0, e && e(), Ae(this.childNodes, !0);
286
+ };
287
+ this.shouldLoadData() ? this.loadData((n) => {
288
+ Ne(n) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || fe(this), s());
289
+ }) : s();
290
+ }
291
+ doCreateChildren(e, o = {}) {
292
+ e.forEach((s) => {
293
+ this.insertChild(
294
+ Object.assign({ data: s }, o),
295
+ void 0,
296
+ !0
297
+ );
298
+ });
299
+ }
300
+ collapse() {
301
+ this.expanded = !1, Ae(this.childNodes, !1);
302
+ }
303
+ shouldLoadData() {
304
+ return !!(this.store.lazy === !0 && this.store.load && !this.loaded);
305
+ }
306
+ updateLeafState() {
307
+ if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") {
308
+ this.isLeaf = this.isLeafByUser, this.isEffectivelyChecked = this.isLeaf && this.disabled;
309
+ return;
310
+ }
311
+ const e = this.childNodes;
312
+ if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) {
313
+ this.isLeaf = !e || e.length === 0, this.isEffectivelyChecked = this.isLeaf && this.disabled;
314
+ return;
315
+ }
316
+ this.isLeaf = !1;
317
+ }
318
+ setChecked(e, o, s, n) {
319
+ if (this.indeterminate = e === "half", this.checked = e === !0, this.isEffectivelyChecked = !this.childNodes.length && (this.disabled || this.checked), this.store.checkStrictly) return;
320
+ if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
321
+ const a = () => {
322
+ if (o) {
323
+ const l = this.childNodes;
324
+ for (let i = 0, h = l.length; i < h; i++) {
325
+ const v = l[i];
326
+ n = n || e !== !1;
327
+ const m = v.disabled && v.isLeaf ? v.checked : n;
328
+ v.setChecked(m, o, !0, n);
329
+ }
330
+ const { half: u, all: p, isEffectivelyChecked: c } = Qe(l);
331
+ p || (this.checked = p, this.indeterminate = u), this.isEffectivelyChecked = this.childNodes.length ? c : this.disabled || this.checked;
332
+ }
333
+ };
334
+ if (this.shouldLoadData()) {
335
+ this.loadData(
336
+ () => {
337
+ a(), fe(this);
338
+ },
339
+ {
340
+ checked: e !== !1
341
+ }
342
+ );
343
+ return;
344
+ } else
345
+ a();
346
+ }
347
+ const d = this.parent;
348
+ !d || d.level === 0 || s || fe(d);
349
+ }
350
+ getChildren(e = !1) {
351
+ if (this.level === 0) return this.data;
352
+ const o = this.data;
353
+ if (!o) return null;
354
+ const s = this.store.props;
355
+ let n = "children";
356
+ return s && (n = s.children || "children"), ae(o[n]) && (o[n] = null), e && !o[n] && (o[n] = []), o[n];
357
+ }
358
+ updateChildren() {
359
+ const e = this.getChildren() || [], o = this.childNodes.map((d) => d.data), s = {}, n = [];
360
+ e.forEach((d, a) => {
361
+ const l = d[le];
362
+ !!l && o.some((p) => (p == null ? void 0 : p[le]) === l) ? s[l] = { index: a, data: d } : n.push({ index: a, data: d });
363
+ }), this.store.lazy || o.forEach((d) => {
364
+ s[d == null ? void 0 : d[le]] || this.removeChildByData(d);
365
+ }), n.forEach(({ index: d, data: a }) => {
366
+ this.insertChild({ data: a }, d);
367
+ }), this.updateLeafState();
368
+ }
369
+ loadData(e, o = {}) {
370
+ if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(o).length)) {
371
+ this.loading = !0;
372
+ const s = (d) => {
373
+ this.childNodes = [], this.doCreateChildren(d, o), this.loaded = !0, this.loading = !1, this.updateLeafState(), e && e.call(this, d);
374
+ }, n = () => {
375
+ this.loading = !1;
376
+ };
377
+ this.store.load(this, s, n);
378
+ } else
379
+ e && e.call(this);
380
+ }
381
+ eachNode(e) {
382
+ const o = [this];
383
+ for (; o.length; ) {
384
+ const s = o.shift();
385
+ o.unshift(...s.childNodes), e(s);
386
+ }
387
+ }
388
+ reInitChecked() {
389
+ this.store.checkStrictly || fe(this);
390
+ }
391
+ }
392
+ var Mt = Object.defineProperty, jt = (t, e, o) => e in t ? Mt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, M = (t, e, o) => jt(t, typeof e != "symbol" ? e + "" : e, o);
393
+ class Ht {
394
+ constructor(e) {
395
+ M(this, "currentNode"), M(this, "currentNodeKey"), M(this, "nodesMap"), M(this, "root"), M(this, "data"), M(this, "lazy", !1), M(this, "load"), M(this, "filterNodeMethod"), M(this, "key"), M(this, "defaultCheckedKeys"), M(this, "checkStrictly", !1), M(this, "defaultExpandedKeys"), M(this, "autoExpandParent", !1), M(this, "defaultExpandAll", !1), M(this, "checkDescendants", !1), M(this, "props"), this.currentNode = null, this.currentNodeKey = null;
396
+ for (const o in e)
397
+ Ke(e, o) && (this[o] = e[o]);
398
+ this.nodesMap = {};
399
+ }
400
+ initialize() {
401
+ if (this.root = new re({
402
+ data: this.data,
403
+ store: this
404
+ }), this.root.initialize(), this.lazy && this.load) {
405
+ const e = this.load;
406
+ e(
407
+ this.root,
408
+ (o) => {
409
+ this.root.doCreateChildren(o), this._initDefaultCheckedNodes();
410
+ },
411
+ ot
412
+ );
413
+ } else
414
+ this._initDefaultCheckedNodes();
415
+ }
416
+ filter(e) {
417
+ const o = this.filterNodeMethod, s = this.lazy, n = async function(d) {
418
+ const a = d.root ? d.root.childNodes : d.childNodes;
419
+ for (const [l, u] of a.entries())
420
+ u.visible = !!(o != null && o.call(
421
+ u,
422
+ e,
423
+ u.data,
424
+ u
425
+ )), l % 80 === 0 && l > 0 && await ye(), await n(u);
426
+ if (!d.visible && a.length) {
427
+ let l = !0;
428
+ l = !a.some((u) => u.visible), d.root ? d.root.visible = l === !1 : d.visible = l === !1;
429
+ }
430
+ e && d.visible && !d.isLeaf && (!s || d.loaded) && d.expand();
431
+ };
432
+ n(this);
433
+ }
434
+ setData(e) {
435
+ e !== this.root.data ? (this.nodesMap = {}, this.root.setData(e), this._initDefaultCheckedNodes(), this.setCurrentNodeKey(this.currentNodeKey)) : this.root.updateChildren();
436
+ }
437
+ getNode(e) {
438
+ if (e instanceof re) return e;
439
+ const o = st(e) ? Oe(this.key, e) : e;
440
+ return this.nodesMap[o] || null;
441
+ }
442
+ insertBefore(e, o) {
443
+ var s;
444
+ const n = this.getNode(o);
445
+ (s = n.parent) == null || s.insertBefore({ data: e }, n);
446
+ }
447
+ insertAfter(e, o) {
448
+ var s;
449
+ const n = this.getNode(o);
450
+ (s = n.parent) == null || s.insertAfter({ data: e }, n);
451
+ }
452
+ remove(e) {
453
+ const o = this.getNode(e);
454
+ o && o.parent && (o === this.currentNode && (this.currentNode = null), o.parent.removeChild(o));
455
+ }
456
+ append(e, o) {
457
+ const s = Me(o) ? this.root : this.getNode(o);
458
+ s && s.insertChild({ data: e });
459
+ }
460
+ _initDefaultCheckedNodes() {
461
+ const e = this.defaultCheckedKeys || [], o = this.nodesMap;
462
+ e.forEach((s) => {
463
+ const n = o[s];
464
+ n && n.setChecked(!0, !this.checkStrictly);
465
+ });
466
+ }
467
+ _initDefaultCheckedNode(e) {
468
+ const o = this.defaultCheckedKeys || [];
469
+ !Ie(e.key) && o.includes(e.key) && e.setChecked(!0, !this.checkStrictly);
470
+ }
471
+ setDefaultCheckedKey(e) {
472
+ e !== this.defaultCheckedKeys && (this.defaultCheckedKeys = e, this._initDefaultCheckedNodes());
473
+ }
474
+ registerNode(e) {
475
+ const o = this.key;
476
+ if (!(!e || !e.data))
477
+ if (!o)
478
+ this.nodesMap[e.id] = e;
479
+ else {
480
+ const s = e.key;
481
+ Ie(s) || (this.nodesMap[s] = e);
482
+ }
483
+ }
484
+ deregisterNode(e) {
485
+ !this.key || !e || !e.data || (e.childNodes.forEach((s) => {
486
+ this.deregisterNode(s);
487
+ }), delete this.nodesMap[e.key]);
488
+ }
489
+ getCheckedNodes(e = !1, o = !1) {
490
+ const s = [], n = function(d) {
491
+ (d.root ? d.root.childNodes : d.childNodes).forEach((l) => {
492
+ (l.checked || o && l.indeterminate) && (!e || e && l.isLeaf) && s.push(l.data), n(l);
493
+ });
494
+ };
495
+ return n(this), s;
496
+ }
497
+ getCheckedKeys(e = !1) {
498
+ return this.getCheckedNodes(e).map((o) => (o || {})[this.key]);
499
+ }
500
+ getHalfCheckedNodes() {
501
+ const e = [], o = function(s) {
502
+ (s.root ? s.root.childNodes : s.childNodes).forEach((d) => {
503
+ d.indeterminate && e.push(d.data), o(d);
504
+ });
505
+ };
506
+ return o(this), e;
507
+ }
508
+ getHalfCheckedKeys() {
509
+ return this.getHalfCheckedNodes().map((e) => (e || {})[this.key]);
510
+ }
511
+ _getAllNodes() {
512
+ const e = [], o = this.nodesMap;
513
+ for (const s in o)
514
+ Ke(o, s) && e.push(o[s]);
515
+ return e;
516
+ }
517
+ updateChildren(e, o) {
518
+ const s = this.nodesMap[e];
519
+ if (!s) return;
520
+ const n = s.childNodes;
521
+ for (let d = n.length - 1; d >= 0; d--) {
522
+ const a = n[d];
523
+ this.remove(a.data);
524
+ }
525
+ for (let d = 0, a = o.length; d < a; d++) {
526
+ const l = o[d];
527
+ this.append(l, s.data);
528
+ }
529
+ }
530
+ _setCheckedKeys(e, o = !1, s) {
531
+ const n = this._getAllNodes().sort((u, p) => u.level - p.level), d = /* @__PURE__ */ Object.create(null), a = Object.keys(s);
532
+ n.forEach((u) => u.setChecked(!1, !1));
533
+ const l = (u) => {
534
+ u.childNodes.forEach((p) => {
535
+ var c;
536
+ d[p.data[e]] = !0, (c = p.childNodes) != null && c.length && l(p);
537
+ });
538
+ };
539
+ for (let u = 0, p = n.length; u < p; u++) {
540
+ const c = n[u], i = c.data[e].toString();
541
+ if (!a.includes(i)) {
542
+ c.checked && !d[i] && c.setChecked(!1, !1);
543
+ continue;
544
+ }
545
+ if (c.childNodes.length && l(c), c.isLeaf || this.checkStrictly) {
546
+ c.setChecked(!0, !1);
547
+ continue;
548
+ }
549
+ if (c.setChecked(!0, !0), o) {
550
+ c.setChecked(!1, !1);
551
+ const v = function(m) {
552
+ m.childNodes.forEach((k) => {
553
+ k.isLeaf || k.setChecked(!1, !1), v(k);
554
+ });
555
+ };
556
+ v(c);
557
+ }
558
+ }
559
+ }
560
+ setCheckedNodes(e, o = !1) {
561
+ const s = this.key, n = {};
562
+ e.forEach((d) => {
563
+ n[(d || {})[s]] = !0;
564
+ }), this._setCheckedKeys(s, o, n);
565
+ }
566
+ setCheckedKeys(e, o = !1) {
567
+ this.defaultCheckedKeys = e;
568
+ const s = this.key, n = {};
569
+ e.forEach((d) => {
570
+ n[d] = !0;
571
+ }), this._setCheckedKeys(s, o, n);
572
+ }
573
+ setDefaultExpandedKeys(e) {
574
+ e = e || [], this.defaultExpandedKeys = e, e.forEach((o) => {
575
+ const s = this.getNode(o);
576
+ s && s.expand(null, this.autoExpandParent);
577
+ });
578
+ }
579
+ setChecked(e, o, s) {
580
+ const n = this.getNode(e);
581
+ n && n.setChecked(!!o, s);
582
+ }
583
+ getCurrentNode() {
584
+ return this.currentNode;
585
+ }
586
+ setCurrentNode(e) {
587
+ const o = this.currentNode;
588
+ o && (o.isCurrent = !1), this.currentNode = e, this.currentNode.isCurrent = !0;
589
+ }
590
+ setUserCurrentNode(e, o = !0) {
591
+ var s;
592
+ const n = e[this.key], d = this.nodesMap[n];
593
+ this.setCurrentNode(d), o && this.currentNode && this.currentNode.level > 1 && ((s = this.currentNode.parent) == null || s.expand(null, !0));
594
+ }
595
+ setCurrentNodeKey(e, o = !0) {
596
+ var s;
597
+ if (this.currentNodeKey = e, Me(e)) {
598
+ this.currentNode && (this.currentNode.isCurrent = !1), this.currentNode = null;
599
+ return;
600
+ }
601
+ const n = this.getNode(e);
602
+ n && (this.setCurrentNode(n), o && this.currentNode && this.currentNode.level > 1 && ((s = this.currentNode.parent) == null || s.expand(null, !0)));
603
+ }
604
+ }
605
+ const $e = "RootTree", Xe = "NodeInstance", Fe = "TreeNodeMap";
606
+ var zt = ce({
607
+ name: "ElTreeNodeContent",
608
+ props: {
609
+ node: {
610
+ type: Object,
611
+ required: !0
612
+ },
613
+ renderContent: Function
614
+ },
615
+ setup(t) {
616
+ const e = ie("tree"), o = ge(
617
+ Xe
618
+ ), s = ge($e);
619
+ return () => {
620
+ const n = t.node, { data: d, store: a } = n;
621
+ return t.renderContent ? t.renderContent(He, { _self: o, node: n, data: d, store: a }) : xe(s.ctx.slots, "default", { node: n, data: d }, () => [
622
+ He(
623
+ Pt,
624
+ { tag: "span", truncated: !0, class: e.be("node", "label") },
625
+ () => [n.label]
626
+ )
627
+ ]);
628
+ };
629
+ }
630
+ });
631
+ function Ze(t) {
632
+ const e = ge(
633
+ Fe,
634
+ null
635
+ );
636
+ let o = {
637
+ treeNodeExpand: (s) => {
638
+ var n;
639
+ t.node !== s && ((n = t.node) == null || n.collapse());
640
+ },
641
+ children: /* @__PURE__ */ new Set()
642
+ };
643
+ return e && e.children.add(o), Je(() => {
644
+ e && e.children.delete(o), o = null;
645
+ }), ke(Fe, o), {
646
+ broadcastExpanded: (s) => {
647
+ if (t.accordion)
648
+ for (const n of o.children)
649
+ n.treeNodeExpand(s);
650
+ }
651
+ };
652
+ }
653
+ const et = /* @__PURE__ */ Symbol("dragEvents");
654
+ function Ft({
655
+ props: t,
656
+ ctx: e,
657
+ el$: o,
658
+ dropIndicator$: s,
659
+ store: n
660
+ }) {
661
+ const d = ie("tree"), a = w({
662
+ showDropIndicator: !1,
663
+ draggingNode: null,
664
+ dropNode: null,
665
+ allowDrop: !0,
666
+ dropType: null
667
+ });
668
+ return ke(et, {
669
+ treeNodeDragStart: ({ event: c, treeNode: i }) => {
670
+ if (c.dataTransfer) {
671
+ if (_e(t.allowDrag) && !t.allowDrag(i.node))
672
+ return c.preventDefault(), !1;
673
+ c.dataTransfer.effectAllowed = "move";
674
+ try {
675
+ c.dataTransfer.setData("text/plain", "");
676
+ } catch {
677
+ }
678
+ a.value.draggingNode = i, e.emit("node-drag-start", i.node, c);
679
+ }
680
+ },
681
+ treeNodeDragOver: ({ event: c, treeNode: i }) => {
682
+ if (!c.dataTransfer) return;
683
+ const h = i, v = a.value.dropNode;
684
+ v && v.node.id !== h.node.id && we(v.$el, d.is("drop-inner"));
685
+ const m = a.value.draggingNode;
686
+ if (!m || !h) return;
687
+ let N = !0, k = !0, C = !0, S = !0;
688
+ _e(t.allowDrop) && (N = t.allowDrop(m.node, h.node, "prev"), S = k = t.allowDrop(
689
+ m.node,
690
+ h.node,
691
+ "inner"
692
+ ), C = t.allowDrop(m.node, h.node, "next")), c.dataTransfer.dropEffect = k || N || C ? "move" : "none", (N || k || C) && (v == null ? void 0 : v.node.id) !== h.node.id && (v && e.emit("node-drag-leave", m.node, v.node, c), e.emit("node-drag-enter", m.node, h.node, c)), N || k || C ? a.value.dropNode = h : a.value.dropNode = null, h.node.nextSibling === m.node && (C = !1), h.node.previousSibling === m.node && (N = !1), h.node.contains(m.node, !1) && (k = !1), (m.node === h.node || m.node.contains(h.node)) && (N = !1, k = !1, C = !1);
693
+ const j = h.$el, Y = j.querySelector(`.${d.be("node", "content")}`).getBoundingClientRect(), z = o.value.getBoundingClientRect(), F = o.value.scrollTop;
694
+ let $;
695
+ const W = N ? k ? 0.25 : C ? 0.45 : 1 : Number.NEGATIVE_INFINITY, y = C ? k ? 0.75 : N ? 0.55 : 0 : Number.POSITIVE_INFINITY;
696
+ let _ = -9999;
697
+ const A = c.clientY - Y.top;
698
+ A < Y.height * W ? $ = "before" : A > Y.height * y ? $ = "after" : k ? $ = "inner" : $ = "none";
699
+ const B = j.querySelector(`.${d.be("node", "expand-icon")}`).getBoundingClientRect(), oe = s.value;
700
+ $ === "before" ? _ = B.top - z.top + F : $ === "after" && (_ = B.bottom - z.top + F), oe.style.top = `${_}px`, oe.style.left = `${B.right - z.left}px`, $ === "inner" ? dt(j, d.is("drop-inner")) : we(j, d.is("drop-inner")), a.value.showDropIndicator = $ === "before" || $ === "after", a.value.allowDrop = a.value.showDropIndicator || S, a.value.dropType = $, e.emit("node-drag-over", m.node, h.node, c);
701
+ },
702
+ treeNodeDragEnd: (c) => {
703
+ var i, h;
704
+ const { draggingNode: v, dropType: m, dropNode: N } = a.value;
705
+ if (c.preventDefault(), c.dataTransfer && (c.dataTransfer.dropEffect = "move"), v != null && v.node.data && N) {
706
+ const k = { data: v.node.data };
707
+ m !== "none" && v.node.remove(), m === "before" ? (i = N.node.parent) == null || i.insertBefore(k, N.node) : m === "after" ? (h = N.node.parent) == null || h.insertAfter(k, N.node) : m === "inner" && N.node.insertChild(k), m !== "none" && (n.value.registerNode(k), n.value.key && v.node.eachNode((C) => {
708
+ var S;
709
+ (S = n.value.nodesMap[C.data[n.value.key]]) == null || S.setChecked(
710
+ C.checked,
711
+ !n.value.checkStrictly
712
+ );
713
+ })), we(N.$el, d.is("drop-inner")), e.emit(
714
+ "node-drag-end",
715
+ v.node,
716
+ N.node,
717
+ m,
718
+ c
719
+ ), m !== "none" && e.emit(
720
+ "node-drop",
721
+ v.node,
722
+ N.node,
723
+ m,
724
+ c
725
+ );
726
+ }
727
+ v && !N && e.emit("node-drag-end", v.node, null, m, c), a.value.showDropIndicator = !1, a.value.draggingNode = null, a.value.dropNode = null, a.value.allowDrop = !0;
728
+ }
729
+ }), {
730
+ dragState: a
731
+ };
732
+ }
733
+ var Rt = ce({
734
+ name: "ElTreeNode",
735
+ components: {
736
+ ElCollapseTransition: St,
737
+ ElCheckbox: rt,
738
+ NodeContent: zt,
739
+ ElIcon: at,
740
+ Loading: Kt
741
+ },
742
+ props: {
743
+ node: {
744
+ type: re,
745
+ default: () => ({})
746
+ },
747
+ props: {
748
+ type: Object,
749
+ default: () => ({})
750
+ },
751
+ accordion: Boolean,
752
+ renderContent: Function,
753
+ renderAfterExpand: Boolean,
754
+ showCheckbox: Boolean
755
+ },
756
+ emits: ["node-expand"],
757
+ setup(t, e) {
758
+ const o = ie("tree"), { broadcastExpanded: s } = Ze(t), n = ge($e), d = w(!1), a = w(!1), l = w(), u = w(), p = w(), c = ge(et), i = Ge();
759
+ ke(Xe, i), n || it("Tree", "Can not find node's tree."), t.node.expanded && (d.value = !0, a.value = !0);
760
+ const h = n.props.props.children || "children";
761
+ V(
762
+ () => {
763
+ var y;
764
+ const _ = (y = t.node.data) == null ? void 0 : y[h];
765
+ return _ && [..._];
766
+ },
767
+ () => {
768
+ t.node.updateChildren();
769
+ }
770
+ ), V(
771
+ () => t.node.indeterminate,
772
+ (y) => {
773
+ N(t.node.checked, y);
774
+ }
775
+ ), V(
776
+ () => t.node.checked,
777
+ (y) => {
778
+ N(y, t.node.indeterminate);
779
+ }
780
+ ), V(
781
+ () => t.node.childNodes.length,
782
+ () => t.node.reInitChecked()
783
+ ), V(
784
+ () => t.node.expanded,
785
+ (y) => {
786
+ ye(() => d.value = y), y && (a.value = !0);
787
+ }
788
+ );
789
+ const v = (y) => Oe(n.props.nodeKey, y.data), m = (y) => {
790
+ const _ = t.props.class;
791
+ if (!_)
792
+ return {};
793
+ let A;
794
+ if (_e(_)) {
795
+ const { data: B } = y;
796
+ A = _(B, y);
797
+ } else
798
+ A = _;
799
+ return qe(A) ? { [A]: !0 } : A;
800
+ }, N = (y, _) => {
801
+ (l.value !== y || u.value !== _) && n.ctx.emit("check-change", t.node.data, y, _), l.value = y, u.value = _;
802
+ }, k = (y) => {
803
+ Be(n.store, n.ctx.emit, () => {
804
+ var _;
805
+ if ((_ = n == null ? void 0 : n.props) == null ? void 0 : _.nodeKey) {
806
+ const B = v(t.node);
807
+ n.store.value.setCurrentNodeKey(B);
808
+ } else
809
+ n.store.value.setCurrentNode(t.node);
810
+ }), n.currentNode.value = t.node, n.props.expandOnClickNode && S(), (n.props.checkOnClickNode || t.node.isLeaf && n.props.checkOnClickLeaf && t.showCheckbox) && !t.node.disabled && j(!t.node.checked), n.ctx.emit("node-click", t.node.data, t.node, i, y);
811
+ }, C = (y) => {
812
+ var _;
813
+ (_ = n.instance.vnode.props) != null && _.onNodeContextmenu && (y.stopPropagation(), y.preventDefault()), n.ctx.emit(
814
+ "node-contextmenu",
815
+ y,
816
+ t.node.data,
817
+ t.node,
818
+ i
819
+ );
820
+ }, S = () => {
821
+ t.node.isLeaf || (d.value ? (n.ctx.emit("node-collapse", t.node.data, t.node, i), t.node.collapse()) : t.node.expand(() => {
822
+ e.emit("node-expand", t.node.data, t.node, i);
823
+ }));
824
+ }, j = (y) => {
825
+ const _ = n == null ? void 0 : n.props.checkStrictly, A = t.node.childNodes;
826
+ !_ && A.length && (y = A.some((B) => !B.isEffectivelyChecked)), t.node.setChecked(y, !_), ye(() => {
827
+ const B = n.store.value;
828
+ n.ctx.emit("check", t.node.data, {
829
+ checkedNodes: B.getCheckedNodes(),
830
+ checkedKeys: B.getCheckedKeys(),
831
+ halfCheckedNodes: B.getHalfCheckedNodes(),
832
+ halfCheckedKeys: B.getHalfCheckedKeys()
833
+ });
834
+ });
835
+ };
836
+ return {
837
+ ns: o,
838
+ node$: p,
839
+ tree: n,
840
+ expanded: d,
841
+ childNodeRendered: a,
842
+ oldChecked: l,
843
+ oldIndeterminate: u,
844
+ getNodeKey: v,
845
+ getNodeClass: m,
846
+ handleSelectChange: N,
847
+ handleClick: k,
848
+ handleContextMenu: C,
849
+ handleExpandIconClick: S,
850
+ handleCheckChange: j,
851
+ handleChildNodeExpand: (y, _, A) => {
852
+ s(_), n.ctx.emit("node-expand", y, _, A);
853
+ },
854
+ handleDragStart: (y) => {
855
+ n.props.draggable && c.treeNodeDragStart({ event: y, treeNode: t });
856
+ },
857
+ handleDragOver: (y) => {
858
+ y.preventDefault(), n.props.draggable && c.treeNodeDragOver({
859
+ event: y,
860
+ treeNode: { $el: p.value, node: t.node }
861
+ });
862
+ },
863
+ handleDrop: (y) => {
864
+ y.preventDefault();
865
+ },
866
+ handleDragEnd: (y) => {
867
+ n.props.draggable && c.treeNodeDragEnd(y);
868
+ },
869
+ CaretRight: Tt
870
+ };
871
+ }
872
+ });
873
+ const qt = ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key"], Ut = ["aria-expanded"];
874
+ function Vt(t, e, o, s, n, d) {
875
+ const a = de("el-icon"), l = de("el-checkbox"), u = de("loading"), p = de("node-content"), c = de("el-tree-node"), i = de("el-collapse-transition");
876
+ return X((I(), H("div", {
877
+ ref: "node$",
878
+ class: q([
879
+ t.ns.b("node"),
880
+ t.ns.is("expanded", t.expanded),
881
+ t.ns.is("current", t.node.isCurrent),
882
+ t.ns.is("hidden", !t.node.visible),
883
+ t.ns.is("focusable", !t.node.disabled),
884
+ t.ns.is("checked", !t.node.disabled && t.node.checked),
885
+ t.getNodeClass(t.node)
886
+ ]),
887
+ role: "treeitem",
888
+ tabindex: "-1",
889
+ "aria-expanded": t.expanded,
890
+ "aria-disabled": t.node.disabled,
891
+ "aria-checked": t.node.checked,
892
+ draggable: t.tree.props.draggable,
893
+ "data-key": t.getNodeKey(t.node),
894
+ onClick: e[2] || (e[2] = ne((...h) => t.handleClick && t.handleClick(...h), ["stop"])),
895
+ onContextmenu: e[3] || (e[3] = (...h) => t.handleContextMenu && t.handleContextMenu(...h)),
896
+ onDragstart: e[4] || (e[4] = ne((...h) => t.handleDragStart && t.handleDragStart(...h), ["stop"])),
897
+ onDragover: e[5] || (e[5] = ne((...h) => t.handleDragOver && t.handleDragOver(...h), ["stop"])),
898
+ onDragend: e[6] || (e[6] = ne((...h) => t.handleDragEnd && t.handleDragEnd(...h), ["stop"])),
899
+ onDrop: e[7] || (e[7] = ne((...h) => t.handleDrop && t.handleDrop(...h), ["stop"]))
900
+ }, [
901
+ D(
902
+ "div",
903
+ {
904
+ class: q(t.ns.be("node", "content")),
905
+ style: We({ paddingLeft: (t.node.level - 1) * t.tree.props.indent + "px" })
906
+ },
907
+ [
908
+ t.tree.props.icon || t.CaretRight ? (I(), J(a, {
909
+ key: 0,
910
+ class: q([
911
+ t.ns.be("node", "expand-icon"),
912
+ t.ns.is("leaf", t.node.isLeaf),
913
+ {
914
+ expanded: !t.node.isLeaf && t.expanded
915
+ }
916
+ ]),
917
+ onClick: ne(t.handleExpandIconClick, ["stop"])
918
+ }, {
919
+ default: L(() => [
920
+ (I(), J(Ye(t.tree.props.icon || t.CaretRight)))
921
+ ]),
922
+ _: 1
923
+ /* STABLE */
924
+ }, 8, ["class", "onClick"])) : he("v-if", !0),
925
+ t.showCheckbox ? (I(), J(l, {
926
+ key: 1,
927
+ "model-value": t.node.checked,
928
+ indeterminate: t.node.indeterminate,
929
+ disabled: !!t.node.disabled,
930
+ onClick: e[0] || (e[0] = ne(() => {
931
+ }, ["stop"])),
932
+ onChange: t.handleCheckChange
933
+ }, null, 8, ["model-value", "indeterminate", "disabled", "onChange"])) : he("v-if", !0),
934
+ t.node.loading ? (I(), J(a, {
935
+ key: 2,
936
+ class: q([t.ns.be("node", "loading-icon"), t.ns.is("loading")])
937
+ }, {
938
+ default: L(() => [
939
+ P(u)
940
+ ]),
941
+ _: 1
942
+ /* STABLE */
943
+ }, 8, ["class"])) : he("v-if", !0),
944
+ P(p, {
945
+ node: t.node,
946
+ "render-content": t.renderContent
947
+ }, null, 8, ["node", "render-content"])
948
+ ],
949
+ 6
950
+ /* CLASS, STYLE */
951
+ ),
952
+ P(i, null, {
953
+ default: L(() => [
954
+ !t.renderAfterExpand || t.childNodeRendered ? X((I(), H("div", {
955
+ key: 0,
956
+ class: q(t.ns.be("node", "children")),
957
+ role: "group",
958
+ "aria-expanded": t.expanded,
959
+ onClick: e[1] || (e[1] = ne(() => {
960
+ }, ["stop"]))
961
+ }, [
962
+ (I(!0), H(
963
+ pe,
964
+ null,
965
+ ve(t.node.childNodes, (h) => (I(), J(c, {
966
+ key: t.getNodeKey(h),
967
+ "render-content": t.renderContent,
968
+ "render-after-expand": t.renderAfterExpand,
969
+ "show-checkbox": t.showCheckbox,
970
+ node: h,
971
+ accordion: t.accordion,
972
+ props: t.props,
973
+ onNodeExpand: t.handleChildNodeExpand
974
+ }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]))),
975
+ 128
976
+ /* KEYED_FRAGMENT */
977
+ ))
978
+ ], 10, Ut)), [
979
+ [Z, t.expanded]
980
+ ]) : he("v-if", !0)
981
+ ]),
982
+ _: 1
983
+ /* STABLE */
984
+ })
985
+ ], 42, qt)), [
986
+ [Z, t.node.visible]
987
+ ]);
988
+ }
989
+ var Yt = /* @__PURE__ */ Ue(Rt, [["render", Vt]]);
990
+ function Wt({ el$: t }, e) {
991
+ const o = ie("tree");
992
+ Le(() => {
993
+ d();
994
+ }), Ve(() => {
995
+ var a;
996
+ (a = t.value) == null || a.querySelectorAll("input[type=checkbox]").forEach((l) => {
997
+ l.setAttribute("tabindex", "-1");
998
+ });
999
+ });
1000
+ function s(a, l) {
1001
+ var u, p;
1002
+ const c = e.value.getNode(a[l].dataset.key);
1003
+ return c.canFocus && c.visible && (((u = c.parent) == null ? void 0 : u.expanded) || ((p = c.parent) == null ? void 0 : p.level) === 0);
1004
+ }
1005
+ lt(t, "keydown", (a) => {
1006
+ const l = a.target;
1007
+ if (!l.className.includes(o.b("node"))) return;
1008
+ const u = ct(a), p = Array.from(
1009
+ t.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`)
1010
+ ), c = p.indexOf(l);
1011
+ let i;
1012
+ if ([te.up, te.down].includes(u)) {
1013
+ if (a.preventDefault(), u === te.up) {
1014
+ i = c === -1 ? 0 : c !== 0 ? c - 1 : p.length - 1;
1015
+ const v = i;
1016
+ for (; !s(p, i); ) {
1017
+ if (i--, i === v) {
1018
+ i = -1;
1019
+ break;
1020
+ }
1021
+ i < 0 && (i = p.length - 1);
1022
+ }
1023
+ } else {
1024
+ i = c === -1 ? 0 : c < p.length - 1 ? c + 1 : 0;
1025
+ const v = i;
1026
+ for (; !s(p, i); ) {
1027
+ if (i++, i === v) {
1028
+ i = -1;
1029
+ break;
1030
+ }
1031
+ i >= p.length && (i = 0);
1032
+ }
1033
+ }
1034
+ i !== -1 && p[i].focus();
1035
+ }
1036
+ [te.left, te.right].includes(u) && (a.preventDefault(), l.click());
1037
+ const h = l.querySelector(
1038
+ '[type="checkbox"]'
1039
+ );
1040
+ [te.enter, te.numpadEnter, te.space].includes(
1041
+ u
1042
+ ) && h && (a.preventDefault(), h.click());
1043
+ });
1044
+ const d = () => {
1045
+ var a;
1046
+ if (!t.value) return;
1047
+ const l = Array.from(
1048
+ t.value.querySelectorAll(`.${o.is("focusable")}[role=treeitem]`)
1049
+ );
1050
+ Array.from(
1051
+ t.value.querySelectorAll("input[type=checkbox]")
1052
+ ).forEach((c) => {
1053
+ c.setAttribute("tabindex", "-1");
1054
+ });
1055
+ const p = t.value.querySelectorAll(
1056
+ `.${o.is("checked")}[role=treeitem]`
1057
+ );
1058
+ if (p.length) {
1059
+ p[0].setAttribute("tabindex", "0");
1060
+ return;
1061
+ }
1062
+ (a = l[0]) == null || a.setAttribute("tabindex", "0");
1063
+ };
1064
+ }
1065
+ const Jt = Re({
1066
+ data: {
1067
+ type: Ce(Array),
1068
+ default: () => []
1069
+ },
1070
+ emptyText: {
1071
+ type: String
1072
+ },
1073
+ renderAfterExpand: {
1074
+ type: Boolean,
1075
+ default: !0
1076
+ },
1077
+ nodeKey: String,
1078
+ checkStrictly: Boolean,
1079
+ defaultExpandAll: Boolean,
1080
+ expandOnClickNode: {
1081
+ type: Boolean,
1082
+ default: !0
1083
+ },
1084
+ checkOnClickNode: Boolean,
1085
+ checkOnClickLeaf: {
1086
+ type: Boolean,
1087
+ default: !0
1088
+ },
1089
+ checkDescendants: Boolean,
1090
+ autoExpandParent: {
1091
+ type: Boolean,
1092
+ default: !0
1093
+ },
1094
+ defaultCheckedKeys: {
1095
+ type: Array
1096
+ },
1097
+ defaultExpandedKeys: {
1098
+ type: Array
1099
+ },
1100
+ currentNodeKey: {
1101
+ type: [String, Number]
1102
+ },
1103
+ renderContent: {
1104
+ type: Ce(Function)
1105
+ },
1106
+ showCheckbox: Boolean,
1107
+ draggable: Boolean,
1108
+ allowDrag: {
1109
+ type: Ce(Function)
1110
+ },
1111
+ allowDrop: {
1112
+ type: Ce(Function)
1113
+ },
1114
+ props: {
1115
+ type: Object,
1116
+ default: () => ({
1117
+ children: "children",
1118
+ label: "label",
1119
+ disabled: "disabled"
1120
+ })
1121
+ },
1122
+ lazy: Boolean,
1123
+ highlightCurrent: Boolean,
1124
+ load: {
1125
+ type: Function
1126
+ },
1127
+ filterNodeMethod: {
1128
+ type: Function
1129
+ },
1130
+ accordion: Boolean,
1131
+ indent: {
1132
+ type: Number,
1133
+ default: 18
1134
+ },
1135
+ icon: {
1136
+ type: ut
1137
+ }
1138
+ }), Gt = {
1139
+ "check-change": (t, e, o) => t && Te(e) && Te(o),
1140
+ "current-change": (t, e) => !0,
1141
+ "node-click": (t, e, o, s) => t && e && s instanceof Event,
1142
+ "node-contextmenu": (t, e, o, s) => t instanceof Event && e && o,
1143
+ "node-collapse": (t, e, o) => t && e,
1144
+ "node-expand": (t, e, o) => t && e,
1145
+ check: (t, e) => t && e,
1146
+ "node-drag-start": (t, e) => t && e,
1147
+ "node-drag-end": (t, e, o, s) => t && s,
1148
+ "node-drop": (t, e, o, s) => t && e && s,
1149
+ "node-drag-leave": (t, e, o) => t && e && o,
1150
+ "node-drag-enter": (t, e, o) => t && e && o,
1151
+ "node-drag-over": (t, e, o) => t && e && o
1152
+ };
1153
+ var Qt = ce({
1154
+ name: "ElTree",
1155
+ components: { ElTreeNode: Yt },
1156
+ props: Jt,
1157
+ emits: Gt,
1158
+ setup(t, e) {
1159
+ const { t: o } = ht(), s = ie("tree"), n = w(
1160
+ new Ht({
1161
+ key: t.nodeKey,
1162
+ data: t.data,
1163
+ lazy: t.lazy,
1164
+ props: t.props,
1165
+ load: t.load,
1166
+ currentNodeKey: t.currentNodeKey,
1167
+ checkStrictly: t.checkStrictly,
1168
+ checkDescendants: t.checkDescendants,
1169
+ defaultCheckedKeys: t.defaultCheckedKeys,
1170
+ defaultExpandedKeys: t.defaultExpandedKeys,
1171
+ autoExpandParent: t.autoExpandParent,
1172
+ defaultExpandAll: t.defaultExpandAll,
1173
+ filterNodeMethod: t.filterNodeMethod
1174
+ })
1175
+ );
1176
+ n.value.initialize();
1177
+ const d = w(n.value.root), a = w(null), l = w(null), u = w(null), { broadcastExpanded: p } = Ze(t), { dragState: c } = Ft({
1178
+ props: t,
1179
+ ctx: e,
1180
+ el$: l,
1181
+ dropIndicator$: u,
1182
+ store: n
1183
+ });
1184
+ Wt({ el$: l }, n);
1185
+ const i = Ge(), h = Se(() => {
1186
+ let r = i == null ? void 0 : i.parent;
1187
+ for (; r; ) {
1188
+ if (r.type.name === "ElTreeSelect")
1189
+ return !0;
1190
+ r = r.parent;
1191
+ }
1192
+ return !1;
1193
+ }), v = Se(() => {
1194
+ const { childNodes: r } = d.value;
1195
+ return (!r || r.length === 0 || r.every(({ visible: b }) => !b)) && !h.value;
1196
+ });
1197
+ V(
1198
+ () => t.currentNodeKey,
1199
+ (r) => {
1200
+ n.value.setCurrentNodeKey(r ?? null);
1201
+ }
1202
+ ), V(
1203
+ () => t.defaultCheckedKeys,
1204
+ (r, b) => {
1205
+ ft(r, b) || n.value.setDefaultCheckedKey(r ?? []);
1206
+ }
1207
+ ), V(
1208
+ () => t.defaultExpandedKeys,
1209
+ (r) => {
1210
+ n.value.setDefaultExpandedKeys(r ?? []);
1211
+ }
1212
+ ), V(
1213
+ () => t.data,
1214
+ (r) => {
1215
+ n.value.setData(r);
1216
+ },
1217
+ { deep: !0 }
1218
+ ), V(
1219
+ () => t.checkStrictly,
1220
+ (r) => {
1221
+ n.value.checkStrictly = r;
1222
+ }
1223
+ );
1224
+ const m = (r) => {
1225
+ if (!t.filterNodeMethod)
1226
+ throw new Error("[Tree] filterNodeMethod is required when filter");
1227
+ n.value.filter(r);
1228
+ }, N = (r) => Oe(t.nodeKey, r.data), k = (r) => {
1229
+ if (!t.nodeKey)
1230
+ throw new Error(`[Tree] nodeKey is required in ${r}`);
1231
+ }, C = (r) => {
1232
+ k("getNodePath");
1233
+ const b = n.value.getNode(r);
1234
+ if (!b) return [];
1235
+ const K = [b.data];
1236
+ let R = b.parent;
1237
+ for (; R && R !== d.value; )
1238
+ K.push(R.data), R = R.parent;
1239
+ return K.reverse();
1240
+ }, S = (r, b) => n.value.getCheckedNodes(r, b), j = (r) => n.value.getCheckedKeys(r), Y = () => {
1241
+ const r = n.value.getCurrentNode();
1242
+ return r ? r.data : null;
1243
+ }, z = () => {
1244
+ k("getCurrentKey");
1245
+ const r = Y();
1246
+ return r ? r[t.nodeKey] : null;
1247
+ }, F = (r, b) => {
1248
+ k("setCheckedNodes"), n.value.setCheckedNodes(r, b);
1249
+ }, $ = (r, b) => {
1250
+ k("setCheckedKeys"), n.value.setCheckedKeys(r, b);
1251
+ }, W = (r, b, K) => {
1252
+ n.value.setChecked(r, b, K);
1253
+ }, y = () => n.value.getHalfCheckedNodes(), _ = () => n.value.getHalfCheckedKeys(), A = (r, b = !0) => {
1254
+ k("setCurrentNode"), Be(n, e.emit, () => {
1255
+ p(r), n.value.setUserCurrentNode(r, b);
1256
+ });
1257
+ }, B = (r = null, b = !0) => {
1258
+ k("setCurrentKey"), Be(n, e.emit, () => {
1259
+ p(), n.value.setCurrentNodeKey(r, b);
1260
+ });
1261
+ }, oe = (r) => n.value.getNode(r), G = (r) => {
1262
+ n.value.remove(r);
1263
+ }, Q = (r, b) => {
1264
+ n.value.append(r, b);
1265
+ }, ue = (r, b) => {
1266
+ n.value.insertBefore(r, b);
1267
+ }, f = (r, b) => {
1268
+ n.value.insertAfter(r, b);
1269
+ }, g = (r, b, K) => {
1270
+ p(b), e.emit("node-expand", r, b, K);
1271
+ }, x = (r, b) => {
1272
+ k("updateKeyChild"), n.value.updateChildren(r, b);
1273
+ };
1274
+ return ke($e, {
1275
+ ctx: e,
1276
+ props: t,
1277
+ store: n,
1278
+ root: d,
1279
+ currentNode: a,
1280
+ instance: i
1281
+ }), ke(pt, void 0), {
1282
+ ns: s,
1283
+ // ref
1284
+ store: n,
1285
+ root: d,
1286
+ currentNode: a,
1287
+ dragState: c,
1288
+ el$: l,
1289
+ dropIndicator$: u,
1290
+ // computed
1291
+ isEmpty: v,
1292
+ // methods
1293
+ filter: m,
1294
+ getNodeKey: N,
1295
+ getNodePath: C,
1296
+ getCheckedNodes: S,
1297
+ getCheckedKeys: j,
1298
+ getCurrentNode: Y,
1299
+ getCurrentKey: z,
1300
+ setCheckedNodes: F,
1301
+ setCheckedKeys: $,
1302
+ setChecked: W,
1303
+ getHalfCheckedNodes: y,
1304
+ getHalfCheckedKeys: _,
1305
+ setCurrentNode: A,
1306
+ setCurrentKey: B,
1307
+ t: o,
1308
+ getNode: oe,
1309
+ remove: G,
1310
+ append: Q,
1311
+ insertBefore: ue,
1312
+ insertAfter: f,
1313
+ handleNodeExpand: g,
1314
+ updateKeyChildren: x
1315
+ };
1316
+ }
1317
+ });
1318
+ function Xt(t, e, o, s, n, d) {
1319
+ const a = de("el-tree-node");
1320
+ return I(), H(
1321
+ "div",
1322
+ {
1323
+ ref: "el$",
1324
+ class: q([
1325
+ t.ns.b(),
1326
+ t.ns.is("dragging", !!t.dragState.draggingNode),
1327
+ t.ns.is("drop-not-allow", !t.dragState.allowDrop),
1328
+ t.ns.is("drop-inner", t.dragState.dropType === "inner"),
1329
+ { [t.ns.m("highlight-current")]: t.highlightCurrent }
1330
+ ]),
1331
+ role: "tree"
1332
+ },
1333
+ [
1334
+ (I(!0), H(
1335
+ pe,
1336
+ null,
1337
+ ve(t.root.childNodes, (l) => (I(), J(a, {
1338
+ key: t.getNodeKey(l),
1339
+ node: l,
1340
+ props: t.props,
1341
+ accordion: t.accordion,
1342
+ "render-after-expand": t.renderAfterExpand,
1343
+ "show-checkbox": t.showCheckbox,
1344
+ "render-content": t.renderContent,
1345
+ onNodeExpand: t.handleNodeExpand
1346
+ }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]))),
1347
+ 128
1348
+ /* KEYED_FRAGMENT */
1349
+ )),
1350
+ t.isEmpty ? (I(), H(
1351
+ "div",
1352
+ {
1353
+ key: 0,
1354
+ class: q(t.ns.e("empty-block"))
1355
+ },
1356
+ [
1357
+ xe(t.$slots, "empty", {}, () => {
1358
+ var l;
1359
+ return [
1360
+ D(
1361
+ "span",
1362
+ {
1363
+ class: q(t.ns.e("empty-text"))
1364
+ },
1365
+ U((l = t.emptyText) != null ? l : t.t("el.tree.emptyText")),
1366
+ 3
1367
+ /* TEXT, CLASS */
1368
+ )
1369
+ ];
1370
+ })
1371
+ ],
1372
+ 2
1373
+ /* CLASS */
1374
+ )) : he("v-if", !0),
1375
+ X(D(
1376
+ "div",
1377
+ {
1378
+ ref: "dropIndicator$",
1379
+ class: q(t.ns.e("drop-indicator"))
1380
+ },
1381
+ null,
1382
+ 2
1383
+ /* CLASS */
1384
+ ), [
1385
+ [Z, t.dragState.showDropIndicator]
1386
+ ])
1387
+ ],
1388
+ 2
1389
+ /* CLASS */
1390
+ );
1391
+ }
1392
+ var Zt = /* @__PURE__ */ Ue(Qt, [["render", Xt]]);
1393
+ const en = Pe(Zt), tn = {
1394
+ key: 0,
1395
+ class: "panel_content"
1396
+ }, nn = { class: "types" }, on = ["onClick"], sn = { class: "tree" }, dn = {
1397
+ key: 1,
1398
+ class: "panel_content_null"
1399
+ }, an = { class: "pc_tree_type_button" }, rn = ["onClick"], ln = { class: "pc_tree_content" }, cn = { class: "tree-search-box" }, un = { class: "tree-wrapper" }, hn = ["id"], fn = { class: "tree-wrapper" }, pn = ["id"], vn = { class: "tree-wrapper" }, yn = ["id"], gn = {
1400
+ key: 2,
1401
+ class: "operate-tree-box"
1402
+ }, kn = { class: "operate-tree" }, Nn = { class: "tree-title-box" }, Cn = { class: "tree-title" }, mn = { class: "tree-title-icon" }, bn = { class: "tree-category-box" }, En = { class: "tree-category-list" }, _n = ["onClick"], xn = { class: "tree-search-box" }, Dn = { class: "tree-content" }, wn = { class: "tree-wrapper" }, Kn = ["id"], Tn = { class: "tree-wrapper" }, In = ["id"], Sn = { class: "tree-wrapper" }, Bn = ["id"], An = /* @__PURE__ */ ce({
1403
+ __name: "StructureTree",
1404
+ props: ["componentId"],
1405
+ emits: ["closePanel", "emitHandler"],
1406
+ setup(t, { emit: e }) {
1407
+ const o = vt(), s = yt(), n = t, d = w(!1), a = w(!1), l = w(), u = w(), p = w(), c = w(), i = w(0), h = w(), v = w(), m = w(), N = w(), k = w();
1408
+ let C;
1409
+ const S = w(""), j = w(""), Y = w("");
1410
+ V(
1411
+ () => s.isToolActive(n.componentId),
1412
+ (f) => {
1413
+ if (d.value && f) {
1414
+ if (a.value || B(be[0]), j.value == Y.value || j.value == "")
1415
+ return;
1416
+ A(j.value);
1417
+ }
1418
+ }
1419
+ ), V(S, (f) => {
1420
+ var g, x, r;
1421
+ i.value === 0 ? (g = l.value) == null || g.filter(f) : i.value === 1 ? (x = u.value) == null || x.filter(f) : i.value === 2 && ((r = p.value) == null || r.filter(f));
1422
+ });
1423
+ const z = (f, g) => f ? g.title.includes(S.value) : !0, F = {
1424
+ children: "children",
1425
+ label: "title",
1426
+ value: "nodeId"
1427
+ }, $ = e, W = (f) => {
1428
+ $("emitHandler", f);
1429
+ }, y = w(!1);
1430
+ Le(() => {
1431
+ se("userInfo").isInShare && se("userInfo").isShareClient && (y.value = !0), s.setReadyById(n.componentId);
1432
+ });
1433
+ const _ = () => {
1434
+ a.value = !1, C = window.bimViewer;
1435
+ const { eventTrigger: f } = C;
1436
+ f.on("treeAllReady", (g) => {
1437
+ d.value = !0, c.value = g, console.log("初始化结构树数据", c.value), C.SetShowSpaceModeActive(!1);
1438
+ }), se("isMobile") || f.on("pickedEntity", (g) => {
1439
+ a.value && (j.value = g.id, s.isToolActive(n.componentId) && A(g.id));
1440
+ }), se("isMobile") && (f.on("touchEntity", (g) => {
1441
+ a.value !== !1 && (j.value = g.id, s.isToolActive(n.componentId) && A(g.id));
1442
+ }), f.on("touchNothing", () => {
1443
+ ye(() => {
1444
+ k.value = "";
1445
+ }), W({
1446
+ isTool: !0,
1447
+ event_target: "StructureTree",
1448
+ event_name: "touchNothing",
1449
+ content: {
1450
+ msg: "pickedNothing"
1451
+ }
1452
+ });
1453
+ }));
1454
+ };
1455
+ me.on("BimViewer", _), Je(() => {
1456
+ me.off("BimViewer", _);
1457
+ });
1458
+ const A = (f) => {
1459
+ let g, x;
1460
+ i.value === 0 ? g = C.objectsExplorer.objectList[f] ? C.objectsExplorer.objectList[f] : null : i.value === 1 ? g = C.classesExplorer.objectList[f] ? C.classesExplorer.objectList[f] : null : i.value === 2 && (g = C.storeysExplorer.objectList[f] ? C.storeysExplorer.objectList[f] : null), g && (k.value = g.nodeId, i.value === 0 ? (l.value.setCurrentKey(g.nodeId, !0), x = document.getElementById(g.nodeId + "0")) : i.value === 1 ? (u.value.setCurrentKey(g.nodeId, !0), x = document.getElementById(g.nodeId + "1")) : i.value === 2 && (p.value.setCurrentKey(g.nodeId, !0), x = document.getElementById(g.nodeId + "2")), setTimeout(() => {
1461
+ x && ye(() => {
1462
+ x.scrollIntoView({ block: "center" });
1463
+ });
1464
+ }, 200), Y.value = f, W({
1465
+ isTool: !0,
1466
+ event_target: "StructureTree",
1467
+ event_name: "pickedEntity",
1468
+ content: {
1469
+ entityId: f,
1470
+ viewer_nodeId: g.nodeId
1471
+ }
1472
+ }));
1473
+ }, B = (f) => {
1474
+ if (c.value) {
1475
+ if (f.id == 0) {
1476
+ if (!v.value) {
1477
+ if (v.value = c.value.objectsData ? c.value.objectsData : [], v.value[0]) {
1478
+ v.value[0].title = o("structure.all");
1479
+ const g = v.value.map((x) => x.nodeId);
1480
+ l.value.setCheckedKeys(g);
1481
+ }
1482
+ a.value = !0;
1483
+ }
1484
+ } else if (f.id == 1) {
1485
+ if (!N.value && (m.value = c.value.classesData ? c.value.classesData : [], m.value[0])) {
1486
+ m.value[0].title = o("structure.all");
1487
+ const g = m.value.map((x) => x.nodeId);
1488
+ u.value.setCheckedKeys(g);
1489
+ }
1490
+ } else if (f.id == 2 && !N.value && (N.value = c.value.storeysData ? c.value.storeysData : [], N.value[0])) {
1491
+ N.value[0].title = o("structure.all");
1492
+ const g = N.value.map((x) => x.nodeId);
1493
+ p.value.setCheckedKeys(g);
1494
+ }
1495
+ W({
1496
+ isTool: !0,
1497
+ event_target: "StructureTree",
1498
+ event_name: "changeTreeStructure",
1499
+ content: {
1500
+ item: f
1501
+ }
1502
+ }), i.value !== f.id && (i.value = f.id);
1503
+ }
1504
+ };
1505
+ let oe = [];
1506
+ const G = (f, g) => {
1507
+ oe.includes(f.nodeId) ? f.checked = !0 : f.checked = !f.checked;
1508
+ const x = C.viewer.scene.objects[f.objectId];
1509
+ x ? C.setEntityVisible(x, f.checked) : r(f, f.checked), b(f, f.checked), W({
1510
+ isTool: !0,
1511
+ event_target: "StructureTree",
1512
+ event_name: "clickTreeBox",
1513
+ content: {
1514
+ active_tree: i.value,
1515
+ nodeId: f.nodeId,
1516
+ status: f.checked
1517
+ }
1518
+ });
1519
+ function r(K, R) {
1520
+ if (K.checked = R, K.children.length == 0) {
1521
+ const ee = C.viewer.scene.objects[K.objectId];
1522
+ ee && C.setEntityVisible(ee, K.checked);
1523
+ } else
1524
+ for (let ee = 0; ee < K.children.length; ee++)
1525
+ r(K.children[ee], R);
1526
+ }
1527
+ function b(K, R) {
1528
+ K.checked = R, K.parent && b(K.parent, R);
1529
+ }
1530
+ oe = g.halfCheckedKeys;
1531
+ }, Q = (f, g) => {
1532
+ const x = C.viewer.scene.objects[f.objectId];
1533
+ x && (C.setAllObjectsSelected(!1), C.setEntitySelected(x), C.viewFitEntity(x)), me.emit("tree_clickNode", x), W({
1534
+ isTool: !0,
1535
+ event_target: "StructureTree",
1536
+ event_name: "clickTreeNode",
1537
+ content: {
1538
+ active_tree: i.value,
1539
+ objectId: f.objectId
1540
+ }
1541
+ });
1542
+ }, ue = () => {
1543
+ me.emit("hideToolbar", !1), $("closePanel");
1544
+ };
1545
+ return (f, g) => {
1546
+ const x = en, r = bt, b = gt, K = kt, R = mt, ee = Nt;
1547
+ return !T(se)("isMobile") && T(je).currentTheme == "blue" ? (I(), J(r, {
1548
+ key: 0,
1549
+ class: "web_tree_container",
1550
+ width: 268,
1551
+ panelTitle: T(o)("structure.title"),
1552
+ "click-handle": ue
1553
+ }, {
1554
+ default: L(() => [
1555
+ a.value ? (I(), H("div", tn, [
1556
+ D("div", nn, [
1557
+ (I(!0), H(pe, null, ve(T(be), (E) => (I(), H("div", {
1558
+ key: E.id,
1559
+ class: q(["types-item", { "types-item-active": i.value === E.id }]),
1560
+ onClick: (De) => B(E)
1561
+ }, U(T(o)(E.name)), 11, on))), 128))
1562
+ ]),
1563
+ D("div", sn, [
1564
+ P(x, {
1565
+ ref: "tree",
1566
+ height: 700,
1567
+ "node-key": "nodeId",
1568
+ data: h.value,
1569
+ "current-node-key": k.value,
1570
+ "highlight-current": !0,
1571
+ props: F,
1572
+ "show-checkbox": "",
1573
+ onCheck: G,
1574
+ onNodeClick: Q,
1575
+ "empty-text": T(o)("common.noData")
1576
+ }, null, 8, ["data", "current-node-key", "empty-text"])
1577
+ ])
1578
+ ])) : (I(), H("div", dn, [
1579
+ D("span", null, U(T(o)("common.loading")), 1)
1580
+ ]))
1581
+ ]),
1582
+ _: 1
1583
+ }, 8, ["panelTitle"])) : !T(se)("isMobile") && T(je).currentTheme == "light-gray" ? (I(), J(R, {
1584
+ key: 1,
1585
+ class: "pc_structure_container",
1586
+ width: 286,
1587
+ panelTitle: T(o)("structure.title"),
1588
+ "click-handle": ue,
1589
+ pos: T(se)("treePos"),
1590
+ setWidth: ""
1591
+ }, {
1592
+ default: L(() => [
1593
+ D("div", an, [
1594
+ (I(!0), H(pe, null, ve(T(be), (E) => (I(), H("div", {
1595
+ key: E.id,
1596
+ class: q(["type_button", { type_button_active: i.value === E.id }]),
1597
+ onClick: (De) => B(E)
1598
+ }, U(T(o)(E.name)), 11, rn))), 128))
1599
+ ]),
1600
+ D("div", ln, [
1601
+ D("div", cn, [
1602
+ P(b, {
1603
+ modelValue: S.value,
1604
+ "onUpdate:modelValue": g[0] || (g[0] = (E) => S.value = E),
1605
+ placeholder: T(o)("structure.search"),
1606
+ "prefix-icon": "Search",
1607
+ clearable: ""
1608
+ }, null, 8, ["modelValue", "placeholder"])
1609
+ ]),
1610
+ X(D("div", un, [
1611
+ P(K, null, {
1612
+ default: L(() => [
1613
+ P(x, {
1614
+ ref_key: "tree0",
1615
+ ref: l,
1616
+ "node-key": "nodeId",
1617
+ data: v.value,
1618
+ "current-node-key": k.value,
1619
+ "highlight-current": !0,
1620
+ props: F,
1621
+ "filter-node-method": z,
1622
+ "show-checkbox": "",
1623
+ onCheck: G,
1624
+ onNodeClick: Q,
1625
+ "empty-text": T(o)("common.noData")
1626
+ }, {
1627
+ default: L(({ node: E }) => [
1628
+ D("span", {
1629
+ id: E.key + "0",
1630
+ class: "tree_node_text"
1631
+ }, U(E.data.title), 9, hn)
1632
+ ]),
1633
+ _: 1
1634
+ }, 8, ["data", "current-node-key", "empty-text"])
1635
+ ]),
1636
+ _: 1
1637
+ })
1638
+ ], 512), [
1639
+ [Z, i.value == 0]
1640
+ ]),
1641
+ X(D("div", fn, [
1642
+ P(K, null, {
1643
+ default: L(() => [
1644
+ P(x, {
1645
+ ref_key: "tree1",
1646
+ ref: u,
1647
+ "node-key": "nodeId",
1648
+ data: m.value,
1649
+ "current-node-key": k.value,
1650
+ "highlight-current": !0,
1651
+ props: F,
1652
+ "filter-node-method": z,
1653
+ "show-checkbox": "",
1654
+ onCheck: G,
1655
+ onNodeClick: Q,
1656
+ "empty-text": T(o)("common.noData")
1657
+ }, {
1658
+ default: L(({ node: E }) => [
1659
+ D("span", {
1660
+ id: E.key + "1",
1661
+ class: "tree_node_text"
1662
+ }, U(E.data.title), 9, pn)
1663
+ ]),
1664
+ _: 1
1665
+ }, 8, ["data", "current-node-key", "empty-text"])
1666
+ ]),
1667
+ _: 1
1668
+ })
1669
+ ], 512), [
1670
+ [Z, i.value == 1]
1671
+ ]),
1672
+ X(D("div", vn, [
1673
+ P(K, null, {
1674
+ default: L(() => [
1675
+ P(x, {
1676
+ ref_key: "tree2",
1677
+ ref: p,
1678
+ "node-key": "nodeId",
1679
+ data: N.value,
1680
+ "current-node-key": k.value,
1681
+ "highlight-current": !0,
1682
+ props: F,
1683
+ "filter-node-method": z,
1684
+ "show-checkbox": "",
1685
+ onCheck: G,
1686
+ onNodeClick: Q,
1687
+ "empty-text": T(o)("common.noData")
1688
+ }, {
1689
+ default: L(({ node: E }) => [
1690
+ D("span", {
1691
+ id: E.key + "2",
1692
+ class: "tree_node_text"
1693
+ }, U(E.data.title), 9, yn)
1694
+ ]),
1695
+ _: 1
1696
+ }, 8, ["data", "current-node-key", "empty-text"])
1697
+ ]),
1698
+ _: 1
1699
+ })
1700
+ ], 512), [
1701
+ [Z, i.value == 2]
1702
+ ])
1703
+ ])
1704
+ ]),
1705
+ _: 1
1706
+ }, 8, ["panelTitle", "pos"])) : (I(), H("div", gn, [
1707
+ D("div", kn, [
1708
+ D("div", Nn, [
1709
+ D("div", Cn, U(T(o)("structure.title")), 1),
1710
+ D("div", mn, [
1711
+ P(ee, {
1712
+ class: "close",
1713
+ width: 0.4,
1714
+ "size-type": "rem",
1715
+ "click-handle": ue
1716
+ })
1717
+ ])
1718
+ ]),
1719
+ D("div", bn, [
1720
+ P(K, null, {
1721
+ default: L(() => [
1722
+ D("div", En, [
1723
+ (I(!0), H(pe, null, ve(T(be), (E, De) => (I(), H("div", {
1724
+ key: De,
1725
+ class: q(["tree-category-item", {
1726
+ "tree-category-item-active": E.id === i.value
1727
+ }]),
1728
+ onClick: (Pn) => B(E)
1729
+ }, U(T(o)(E.name)), 11, _n))), 128))
1730
+ ])
1731
+ ]),
1732
+ _: 1
1733
+ })
1734
+ ]),
1735
+ D("div", xn, [
1736
+ P(b, {
1737
+ modelValue: S.value,
1738
+ "onUpdate:modelValue": g[1] || (g[1] = (E) => S.value = E),
1739
+ placeholder: T(o)("structure.search"),
1740
+ "prefix-icon": "Search",
1741
+ clearable: ""
1742
+ }, null, 8, ["modelValue", "placeholder"])
1743
+ ]),
1744
+ D("div", Dn, [
1745
+ X(D("div", wn, [
1746
+ P(K, null, {
1747
+ default: L(() => [
1748
+ P(x, {
1749
+ ref_key: "tree0",
1750
+ ref: l,
1751
+ "node-key": "nodeId",
1752
+ data: v.value,
1753
+ "current-node-key": k.value,
1754
+ "highlight-current": !0,
1755
+ props: F,
1756
+ "filter-node-method": z,
1757
+ "show-checkbox": "",
1758
+ onCheck: G,
1759
+ onNodeClick: Q,
1760
+ "empty-text": T(o)("common.noData")
1761
+ }, {
1762
+ default: L(({ node: E }) => [
1763
+ D("span", {
1764
+ id: E.key + "0",
1765
+ class: "tree_node_text"
1766
+ }, U(E.data.title), 9, Kn)
1767
+ ]),
1768
+ _: 1
1769
+ }, 8, ["data", "current-node-key", "empty-text"])
1770
+ ]),
1771
+ _: 1
1772
+ })
1773
+ ], 512), [
1774
+ [Z, i.value == 0]
1775
+ ]),
1776
+ X(D("div", Tn, [
1777
+ P(K, null, {
1778
+ default: L(() => [
1779
+ P(x, {
1780
+ ref_key: "tree1",
1781
+ ref: u,
1782
+ "node-key": "nodeId",
1783
+ data: m.value,
1784
+ "current-node-key": k.value,
1785
+ "highlight-current": !0,
1786
+ props: F,
1787
+ "filter-node-method": z,
1788
+ "show-checkbox": "",
1789
+ onCheck: G,
1790
+ onNodeClick: Q,
1791
+ "empty-text": T(o)("common.noData")
1792
+ }, {
1793
+ default: L(({ node: E }) => [
1794
+ D("span", {
1795
+ id: E.key + "1",
1796
+ class: "tree_node_text"
1797
+ }, U(E.data.title), 9, In)
1798
+ ]),
1799
+ _: 1
1800
+ }, 8, ["data", "current-node-key", "empty-text"])
1801
+ ]),
1802
+ _: 1
1803
+ })
1804
+ ], 512), [
1805
+ [Z, i.value == 1]
1806
+ ]),
1807
+ X(D("div", Sn, [
1808
+ P(K, null, {
1809
+ default: L(() => [
1810
+ P(x, {
1811
+ ref_key: "tree2",
1812
+ ref: p,
1813
+ "node-key": "nodeId",
1814
+ data: N.value,
1815
+ "current-node-key": k.value,
1816
+ "highlight-current": !0,
1817
+ props: F,
1818
+ "filter-node-method": z,
1819
+ "show-checkbox": "",
1820
+ onCheck: G,
1821
+ onNodeClick: Q,
1822
+ "empty-text": T(o)("common.noData")
1823
+ }, {
1824
+ default: L(({ node: E }) => [
1825
+ D("span", {
1826
+ id: E.key + "2",
1827
+ class: "tree_node_text"
1828
+ }, U(E.data.title), 9, Bn)
1829
+ ]),
1830
+ _: 1
1831
+ }, 8, ["data", "current-node-key", "empty-text"])
1832
+ ]),
1833
+ _: 1
1834
+ })
1835
+ ], 512), [
1836
+ [Z, i.value == 2]
1837
+ ])
1838
+ ])
1839
+ ])
1840
+ ]));
1841
+ };
1842
+ }
1843
+ }), zn = /* @__PURE__ */ Ct(An, [["__scopeId", "data-v-6683aea8"]]);
1844
+ export {
1845
+ zn as default
1846
+ };