@xtctwins/tctwins-industry-engine 0.0.9 → 0.0.11

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