@xtctwins/tctwins-bimx-engine 0.3.17 → 0.3.19

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