ss-component-new 1.3.699 → 1.3.700

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 (88) hide show
  1. package/dist/JSEncrypt-B36c1iN5.js +1983 -0
  2. package/dist/MTLLoader-DzQM5Czw.js +657 -0
  3. package/dist/URDFLoader-CPXooEPU.js +2299 -0
  4. package/dist/animationData-DOIhMG9C.js +83 -0
  5. package/dist/array-lig-X3M9.js +1045 -0
  6. package/dist/clone-Dp_gc9ll.js +8 -0
  7. package/dist/config.js +1 -1
  8. package/dist/eleIcon-qStmsM1q.js +29 -0
  9. package/dist/fileUtil-UOt_otFo.js +20 -0
  10. package/dist/iconfont-DwCBmDct.js +1026 -0
  11. package/dist/icons/svg/functionList.svg +1 -0
  12. package/dist/icons/svg/method.svg +1 -0
  13. package/dist/index-11kpzK0A.js +209 -0
  14. package/dist/index-B-AFi1eL.js +873 -0
  15. package/dist/index-B0H3C7WG.js +103 -0
  16. package/dist/index-BDRDpsgF.js +25297 -0
  17. package/dist/{index-BKK_dL6t.js → index-BHtNKL1L.js} +1 -1
  18. package/dist/index-BJ3RS3n_.js +63004 -0
  19. package/dist/index-BJLCuYEK.js +84 -0
  20. package/dist/index-BbyrFzEO.js +93 -0
  21. package/dist/index-Bn1_Pbpm.js +98 -0
  22. package/dist/index-BniHrGik.js +107 -0
  23. package/dist/index-BooO2Bml.js +78 -0
  24. package/dist/index-Bw3sTXPI.js +8993 -0
  25. package/dist/index-C7sOKXGv.js +48 -0
  26. package/dist/index-CGUz8yrZ.js +20503 -0
  27. package/dist/index-CGi0g-VN.js +627 -0
  28. package/dist/index-CV_jQDcg.js +9 -0
  29. package/dist/index-CWOXvFfD.js +44 -0
  30. package/dist/{index-BKoAuSBh.js → index-ChNfRlIP.js} +18 -223
  31. package/dist/index-CjlKFGAF.js +470 -0
  32. package/dist/index-CydXQbtX.js +622 -0
  33. package/dist/index-D9XVxZlg.js +411 -0
  34. package/dist/index-DAJxL40d.js +55 -0
  35. package/dist/index-DBsEVMiM.js +201 -0
  36. package/dist/index-DG4hoOWt.js +665 -0
  37. package/dist/index-DUbk5m5P.js +99 -0
  38. package/dist/index-Ds6m_4JJ.js +28500 -0
  39. package/dist/index-DupTchhl.js +1000 -0
  40. package/dist/index-DxduRnLV.js +93 -0
  41. package/dist/index-DyCq_odP.js +331 -0
  42. package/dist/index-TDMzk3L7.js +83 -0
  43. package/dist/index-UB_oCdlo.js +62 -0
  44. package/dist/index-VV2Ao7jZ.js +119 -0
  45. package/dist/index-YjBTGOkO.js +61 -0
  46. package/dist/index-erE4kNF5.js +30 -0
  47. package/dist/index-iY5h1bpA.js +572 -0
  48. package/dist/index-jbOjjV0j.js +447 -0
  49. package/dist/index-rlStojTL.js +52 -0
  50. package/dist/index-uF-ibwG0.js +9 -0
  51. package/dist/{index-DzkvwqGK.js → index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-Mr9QL-WU.js} +113317 -105434
  52. package/dist/isString-0ZglyOfu.js +8 -0
  53. package/dist/localIcon-D5UoFBU5.js +76 -0
  54. package/dist/main-Cepry4zn.js +502 -0
  55. package/dist/menuIndex-BB0uVPRX.js +159 -0
  56. package/dist/obj/model.mtl +42 -0
  57. package/dist/obj/model.obj +26110 -0
  58. package/dist/request-1RPa2bBn.js +9048 -0
  59. package/dist/ss-component.css +8 -2
  60. package/dist/ss-component.js +64 -28
  61. package/dist/ss-component2.js +75 -15
  62. package/dist/ss-component3.js +1 -1
  63. package/dist/threeModel-DcUyC6Vh.js +1109 -0
  64. package/dist/threePreview-CbGqCMch.js +2810 -0
  65. package/dist/threeSceneView-BDyFpkq-.js +1290 -0
  66. package/dist/threeSceneViewForCPMPIP-DUSufDRq.js +539 -0
  67. package/dist/threeTrackPathView-yLEUuGXc.js +620 -0
  68. package/dist/threeViewerHost-BXdZ6Wgi.js +233 -0
  69. package/dist/urdfTree-C6mx4T9t.js +254 -0
  70. package/dist/workpieceTreePanel-DjR9f2D1.js +559 -0
  71. package/package.json +6 -8
  72. package/public/config.js +1 -1
  73. package/public/icons/svg/functionList.svg +1 -0
  74. package/public/icons/svg/method.svg +1 -0
  75. package/public/obj/model.mtl +42 -0
  76. package/public/obj/model.obj +26110 -0
  77. package/dist/index-BqyJXXmI.js +0 -213
  78. package/dist/index-CTEz1Xq6.js +0 -182
  79. package/dist/index-CrIVk8ml.js +0 -1044
  80. package/dist/index-D1ebCzlM.js +0 -50
  81. package/dist/menu-ZnhLgjWw.js +0 -5218
  82. package/dist/origin-Bs605dr-.js +0 -11468
  83. /package/dist/icons/svg/{update.svg → Update.svg} +0 -0
  84. /package/dist/icons/svg/{table-close.svg → tableClose.svg} +0 -0
  85. /package/dist/icons/svg/{table-expand.svg → tableExpand.svg} +0 -0
  86. /package/public/icons/svg/{update.svg → Update.svg} +0 -0
  87. /package/public/icons/svg/{table-close.svg → tableClose.svg} +0 -0
  88. /package/public/icons/svg/{table-expand.svg → tableExpand.svg} +0 -0
@@ -0,0 +1,233 @@
1
+ import { defineComponent as U, defineAsyncComponent as b, computed as I, ref as R, watch as H, createElementBlock as N, openBlock as T, createElementVNode as K, createBlock as B, createCommentVNode as V, renderSlot as u, unref as m, withCtx as d } from "vue";
2
+ import { a0 as W, u as A, p as D, s as $ } from "./index-Bw3sTXPI.js";
3
+ import { g as j, q as M, r as L } from "./index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-Mr9QL-WU.js";
4
+ import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const re = {
6
+ SINGLE: "单机",
7
+ DOUBLE: "双机"
8
+ }, se = {
9
+ ROBOT: 1,
10
+ PIPECOMPARSION: 2
11
+ }, a = {
12
+ ROBOT_SCENE: "robot",
13
+ // 机器人场景
14
+ TRACK_PATH: "trackPath",
15
+ // 轨迹路径场景
16
+ CPMPIP_SCENE: "cpmpip",
17
+ // 重大专项场景
18
+ PREVIEW: "preview"
19
+ // 预览模式
20
+ }, q = W("threeState", {
21
+ state: () => ({
22
+ data: {
23
+ files: [],
24
+ data: {}
25
+ }
26
+ }),
27
+ actions: {
28
+ setData(E) {
29
+ this.data = E;
30
+ },
31
+ getData() {
32
+ return this.data;
33
+ }
34
+ }
35
+ });
36
+ function z() {
37
+ const E = A(D), { platform: O } = $(E), y = q(D), i = ["uv", "cyd", "nc"], p = ["urdf"], n = ["obj", "stl"], P = [...i, ...p, ...n], f = (e) => {
38
+ if (!g())
39
+ throw new Error("不是三维系统");
40
+ y.setData(e);
41
+ }, _ = () => y.getData(), g = () => O.value === "three", c = (e) => j(e), h = (e) => {
42
+ if (!e)
43
+ return !1;
44
+ const r = c(e);
45
+ return P == null ? void 0 : P.includes(r);
46
+ }, S = (e) => {
47
+ if (!e)
48
+ return !1;
49
+ const r = c(e);
50
+ return n == null ? void 0 : n.includes(r);
51
+ }, v = (e) => {
52
+ if (!e)
53
+ return !1;
54
+ const r = c(e);
55
+ return i == null ? void 0 : i.includes(r);
56
+ }, l = (e) => {
57
+ if (!e)
58
+ return {
59
+ isCpt: !1,
60
+ isCyd: !1,
61
+ isUv: !1,
62
+ isNc: !1
63
+ };
64
+ const r = c(e), o = i == null ? void 0 : i.find((w) => w === r);
65
+ return {
66
+ isCpt: o === "cpt",
67
+ isCyd: o === "cyd",
68
+ isUv: o === "uv",
69
+ isNc: o === "nc"
70
+ };
71
+ }, C = (e) => {
72
+ if (!e)
73
+ return !1;
74
+ const r = c(e);
75
+ return p == null ? void 0 : p.includes(r);
76
+ }, k = (e) => g() && h(e), t = (e) => ({
77
+ url: e,
78
+ extension: c(e)
79
+ });
80
+ return {
81
+ getData: _,
82
+ setData: f,
83
+ isThreeSystem: g,
84
+ isUrdf: C,
85
+ isGeneralFile: S,
86
+ isTrackPathFile: v,
87
+ isThreeFile: h,
88
+ isUseBackdrop: k,
89
+ initTrackFileType: l,
90
+ getFileExtension: c,
91
+ getFileInfo: t,
92
+ getFilesInfo: (e) => {
93
+ const r = [];
94
+ for (let o = 0; o < e.length; o++) {
95
+ const F = e[o], w = t(F);
96
+ r.push(w);
97
+ }
98
+ return r;
99
+ }
100
+ };
101
+ }
102
+ const Y = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q = {
103
+ key: 4,
104
+ class: "loading"
105
+ }, X = /* @__PURE__ */ U({
106
+ __name: "threeViewerHost",
107
+ props: {
108
+ files: { default: () => [] },
109
+ threeData: {},
110
+ componentType: {},
111
+ width: { default: "100%" },
112
+ height: { default: "100%" }
113
+ },
114
+ setup(E) {
115
+ const O = b(() => import("./threeSceneView-BDyFpkq-.js")), y = b(() => import("./threePreview-CbGqCMch.js")), i = b(() => import("./threeTrackPathView-yLEUuGXc.js")), p = b(() => import("./threeSceneViewForCPMPIP-DUSufDRq.js")), n = E, P = A(D), { platName: f } = $(P), { isUrdf: _, isTrackPathFile: g } = z(), c = I(() => {
116
+ var t;
117
+ return (t = n == null ? void 0 : n.files) == null ? void 0 : t.map((s) => {
118
+ const { url: e, name: r } = s;
119
+ return {
120
+ url: e,
121
+ name: r
122
+ };
123
+ });
124
+ }), h = I(() => {
125
+ var e;
126
+ const t = (e = n == null ? void 0 : n.files) == null ? void 0 : e[0];
127
+ return (t == null ? void 0 : t.extension) || "";
128
+ }), S = I(() => {
129
+ var t, s;
130
+ return (s = (t = n == null ? void 0 : n.threeData) == null ? void 0 : t.data) == null ? void 0 : s.trackFileType;
131
+ }), v = I(() => {
132
+ if (n.componentType)
133
+ switch (n.componentType) {
134
+ case "robot":
135
+ return a.ROBOT_SCENE;
136
+ case "track":
137
+ return a.TRACK_PATH;
138
+ case "cpmpip":
139
+ return a.CPMPIP_SCENE;
140
+ case "preview":
141
+ return a.PREVIEW;
142
+ }
143
+ return (f == null ? void 0 : f.value) === M.CPMPIP && _(h.value) ? a.CPMPIP_SCENE : (f == null ? void 0 : f.value) === M.ROBOT && _(h.value) ? a.ROBOT_SCENE : g(h.value) && S.value ? a.TRACK_PATH : a.PREVIEW;
144
+ }), l = R([]), C = R(!1);
145
+ async function k(t) {
146
+ if (!t || !t.length) {
147
+ l.value = [];
148
+ return;
149
+ }
150
+ C.value = !0;
151
+ try {
152
+ const s = await Promise.all(t.map((e) => L(e == null ? void 0 : e.url, e == null ? void 0 : e.name)));
153
+ l.value = s;
154
+ } catch (s) {
155
+ console.error("文件下载时发生错误:", s), l.value = [];
156
+ } finally {
157
+ C.value = !1;
158
+ }
159
+ }
160
+ return H(
161
+ () => c.value,
162
+ async (t) => {
163
+ await k(t || []);
164
+ },
165
+ { immediate: !0, deep: !0 }
166
+ ), (t, s) => (T(), N("div", Y, [
167
+ K("div", J, [
168
+ u(t.$slots, "top-menu", {}, void 0, !0)
169
+ ]),
170
+ v.value === m(a).ROBOT_SCENE ? (T(), B(m(O), {
171
+ key: 0,
172
+ fileBlobs: l.value,
173
+ threeData: n.threeData
174
+ }, {
175
+ "button-left": d(() => [
176
+ u(t.$slots, "management-menu", {}, void 0, !0)
177
+ ]),
178
+ "button-right": d(() => [
179
+ u(t.$slots, "management-page", {}, void 0, !0)
180
+ ]),
181
+ _: 3
182
+ }, 8, ["fileBlobs", "threeData"])) : v.value === m(a).TRACK_PATH ? (T(), B(m(i), {
183
+ key: 1,
184
+ fileBlobs: l.value,
185
+ threeData: n.threeData,
186
+ trackFileType: S.value
187
+ }, {
188
+ "button-left": d(() => [
189
+ u(t.$slots, "management-menu", {}, void 0, !0)
190
+ ]),
191
+ "button-right": d(() => [
192
+ u(t.$slots, "management-page", {}, void 0, !0)
193
+ ]),
194
+ _: 3
195
+ }, 8, ["fileBlobs", "threeData", "trackFileType"])) : v.value === m(a).CPMPIP_SCENE ? (T(), B(m(p), {
196
+ key: 2,
197
+ fileBlobs: l.value,
198
+ threeData: n.threeData
199
+ }, {
200
+ "button-left": d(() => [
201
+ u(t.$slots, "management-menu", {}, void 0, !0)
202
+ ]),
203
+ "button-right": d(() => [
204
+ u(t.$slots, "management-page", {}, void 0, !0)
205
+ ]),
206
+ _: 3
207
+ }, 8, ["fileBlobs", "threeData"])) : v.value === m(a).PREVIEW ? (T(), B(m(y), {
208
+ key: 3,
209
+ fileBlobs: l.value
210
+ }, {
211
+ "button-left": d(() => [
212
+ u(t.$slots, "management-menu", {}, void 0, !0)
213
+ ]),
214
+ "button-right": d(() => [
215
+ u(t.$slots, "management-page", {}, void 0, !0)
216
+ ]),
217
+ _: 3
218
+ }, 8, ["fileBlobs"])) : V("", !0),
219
+ C.value ? (T(), N("div", Q, " 文件下载中,请稍候... ")) : V("", !0)
220
+ ]));
221
+ }
222
+ }), Z = /* @__PURE__ */ G(X, [["__scopeId", "data-v-44d6514b"]]), oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
223
+ __proto__: null,
224
+ default: Z
225
+ }, Symbol.toStringTag, { value: "Module" }));
226
+ export {
227
+ Z as T,
228
+ z as a,
229
+ re as r,
230
+ se as s,
231
+ oe as t,
232
+ q as u
233
+ };
@@ -0,0 +1,254 @@
1
+ import { defineComponent as I, ref as F, watch as M, onMounted as C, onUnmounted as E, createElementBlock as m, openBlock as f, Fragment as P, renderList as T, createElementVNode as d, createCommentVNode as U, toDisplayString as h, computed as L, resolveComponent as S, createVNode as A } from "vue";
2
+ import { h as V } from "./index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-Mr9QL-WU.js";
3
+ import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const D = (i, a) => {
5
+ if (!a)
6
+ return null;
7
+ const l = i.joints[a];
8
+ return l || null;
9
+ }, ae = (i, a) => {
10
+ if (!a)
11
+ return null;
12
+ const l = D(i, a);
13
+ if (!l)
14
+ return null;
15
+ let o = null;
16
+ return l.traverse((u) => {
17
+ u instanceof V && !o && (o = u);
18
+ }), o;
19
+ }, N = (i, a) => {
20
+ if (!a)
21
+ return null;
22
+ const l = i.links[a];
23
+ return l || null;
24
+ }, ie = (i, a) => {
25
+ if (!a)
26
+ return null;
27
+ const l = N(i, a);
28
+ if (!l)
29
+ return null;
30
+ let o = null;
31
+ return l.traverse((u) => {
32
+ u instanceof V && !o && (o = u);
33
+ }), o;
34
+ }, w = (i) => {
35
+ const a = i.joints;
36
+ return Object.values(a);
37
+ }, oe = (i) => w(i).filter((o) => o.jointType !== "fixed"), ue = (i) => {
38
+ const a = i.links;
39
+ return Object.keys(a);
40
+ }, R = { class: "panel-content" }, O = {
41
+ key: 0,
42
+ class: "joints-list"
43
+ }, K = { class: "joint-info-row" }, B = { class: "joint-left" }, q = { class: "joint-name" }, $ = { class: "joint-range" }, z = { class: "joint-type" }, G = {
44
+ key: 0,
45
+ class: "joint-control-row"
46
+ }, H = { class: "slider-container" }, Q = ["min", "max", "value", "onInput"], W = { class: "value-display" }, X = { class: "joint-value" }, Y = { class: "unit" }, Z = {
47
+ key: 1,
48
+ class: "empty-state"
49
+ }, j = /* @__PURE__ */ I({
50
+ __name: "urdfJointPanel",
51
+ props: {
52
+ model: {}
53
+ },
54
+ setup(i, { expose: a }) {
55
+ const l = i, o = F([]), u = F(null), _ = (n, e = !1) => n === "revolute" ? e ? Math.PI : -Math.PI : n === "prismatic" ? e ? 1 : -1 : 0, y = (n) => {
56
+ if (!n || !n.joints)
57
+ return console.warn("URDF模型无效或不包含关节信息"), [];
58
+ const e = [];
59
+ return w(n).forEach((r) => {
60
+ var c, p;
61
+ if (r.jointType === "fixed")
62
+ return;
63
+ let t = {
64
+ lower: ((c = r.limit) == null ? void 0 : c.lower) ?? _(r.jointType, !1),
65
+ upper: ((p = r.limit) == null ? void 0 : p.upper) ?? _(r.jointType, !0)
66
+ };
67
+ r.jointType === "continuous" && (t = {
68
+ lower: -10 * Math.PI,
69
+ upper: 10 * Math.PI
70
+ }), e.push({
71
+ name: r.name,
72
+ type: r.jointType || "unknown",
73
+ limit: t,
74
+ currentValue: r.angle || 0,
75
+ urdfJoint: r
76
+ });
77
+ }), e;
78
+ }, v = (n, e) => {
79
+ var c;
80
+ const s = o.value.find((p) => p.name === n);
81
+ if (!s) return;
82
+ const r = parseFloat(e), t = Math.max(s.limit.lower, Math.min(s.limit.upper, r));
83
+ s.currentValue = t, (c = l.model) != null && c.setJointValue ? l.model.setJointValue(n, t) : s.urdfJoint.setJointValue(t);
84
+ }, g = () => {
85
+ o.value.forEach((n) => {
86
+ (n.type === "revolute" || n.type === "continuous" || n.type === "prismatic") && v(n.name, 0);
87
+ });
88
+ }, J = () => {
89
+ l.model && o.value.forEach((n) => {
90
+ n.urdfJoint.angle !== void 0 && n.currentValue !== n.urdfJoint.angle && (n.currentValue = n.urdfJoint.angle);
91
+ });
92
+ }, x = () => {
93
+ const n = () => {
94
+ J(), u.value = requestAnimationFrame(n);
95
+ };
96
+ n();
97
+ }, k = () => {
98
+ u.value && (cancelAnimationFrame(u.value), u.value = null);
99
+ };
100
+ return M(
101
+ () => l.model,
102
+ (n) => {
103
+ n ? o.value = y(n) : o.value = [];
104
+ },
105
+ { immediate: !0 }
106
+ ), C(() => {
107
+ x();
108
+ }), E(() => {
109
+ k();
110
+ }), a({
111
+ resetAllJoints: g
112
+ }), (n, e) => (f(), m("div", R, [
113
+ o.value.length > 0 ? (f(), m("div", O, [
114
+ (f(!0), m(P, null, T(o.value, (s) => (f(), m("div", {
115
+ key: s.name,
116
+ class: "joint-item"
117
+ }, [
118
+ d("div", K, [
119
+ d("div", B, [
120
+ d("span", q, h(s.name), 1),
121
+ d("span", $, " [" + h(s.limit.lower.toFixed(2)) + ", " + h(s.limit.upper.toFixed(2)) + "] ", 1)
122
+ ]),
123
+ d("span", z, h(s.type), 1)
124
+ ]),
125
+ s.type === "revolute" || s.type === "prismatic" || s.type === "continuous" ? (f(), m("div", G, [
126
+ d("div", H, [
127
+ d("input", {
128
+ type: "range",
129
+ min: s.limit.lower,
130
+ max: s.limit.upper,
131
+ step: "0.001",
132
+ value: s.currentValue,
133
+ onInput: (r) => v(s.name, r.target.value),
134
+ class: "joint-slider"
135
+ }, null, 40, Q)
136
+ ]),
137
+ d("div", W, [
138
+ d("span", X, h(s.currentValue ? Number(s.currentValue).toFixed(3) : "0.000"), 1),
139
+ d("span", Y, h(s.type === "prismatic" ? "m" : "rad"), 1)
140
+ ])
141
+ ])) : U("", !0)
142
+ ]))), 128))
143
+ ])) : (f(), m("div", Z, e[0] || (e[0] = [
144
+ d("p", null, "未检测到可控制的关节", -1)
145
+ ])))
146
+ ]));
147
+ }
148
+ }), ce = /* @__PURE__ */ b(j, [["__scopeId", "data-v-b1467983"]]), ee = { class: "panel-content" }, te = "id", se = {
149
+ __name: "urdfTree",
150
+ props: {
151
+ model: Object,
152
+ maxExpandCount: {
153
+ type: Number,
154
+ default: 10
155
+ },
156
+ expandStrategy: {
157
+ type: String,
158
+ default: "breadth",
159
+ validator: (i) => ["breadth", "firstLevel"].includes(i)
160
+ }
161
+ },
162
+ emits: ["nodeClick"],
163
+ setup(i, { emit: a }) {
164
+ const l = i, o = a, u = F([]), _ = {
165
+ children: "children",
166
+ label: "label"
167
+ }, y = (e) => {
168
+ o("nodeClick", e);
169
+ }, v = (e, s = 0) => {
170
+ const r = [];
171
+ return Array.isArray(e) && (e == null ? void 0 : e.length) > 0 && e.forEach((t) => {
172
+ if (!(t != null && t.isMesh) && ((t == null ? void 0 : t.type) === "URDFJoint" || (t == null ? void 0 : t.type) === "URDFLink")) {
173
+ const c = {
174
+ name: t == null ? void 0 : t.name,
175
+ label: t == null ? void 0 : t.name,
176
+ show: !0,
177
+ level: s + 1,
178
+ isPenultimate: !1,
179
+ type: t == null ? void 0 : t.type,
180
+ id: t == null ? void 0 : t.id,
181
+ limit: (t == null ? void 0 : t.limit) ?? "",
182
+ children: v(t == null ? void 0 : t.children, s + 1),
183
+ path: t == null ? void 0 : t.name
184
+ };
185
+ r.push(c);
186
+ }
187
+ }), r;
188
+ }, g = (e) => e ? [{
189
+ name: e == null ? void 0 : e.name,
190
+ label: e == null ? void 0 : e.name,
191
+ show: !0,
192
+ level: 1,
193
+ isPenultimate: !1,
194
+ type: e == null ? void 0 : e.type,
195
+ id: e == null ? void 0 : e.id,
196
+ limit: (e == null ? void 0 : e.limit) ?? "",
197
+ children: v(e == null ? void 0 : e.children, 1) || [],
198
+ path: e == null ? void 0 : e.name
199
+ }] : [], J = (e, s) => {
200
+ const r = [], t = [...e];
201
+ for (; t.length > 0 && r.length < s; ) {
202
+ const c = t.shift();
203
+ c.children && c.children.length > 0 && (r.push(c.id), t.push(...c.children));
204
+ }
205
+ return r;
206
+ }, x = (e, s) => {
207
+ const r = [];
208
+ return e.forEach((t) => {
209
+ if (t.children && t.children.length > 0) {
210
+ r.push(t.id);
211
+ const c = t.children.filter((p) => p.children && p.children.length > 0).slice(0, s).map((p) => p.id);
212
+ r.push(...c);
213
+ }
214
+ }), r.slice(0, s + 1);
215
+ }, k = L(() => !u.value || u.value.length === 0 ? [] : l.expandStrategy === "firstLevel" ? x(u.value, l.maxExpandCount) : J(u.value, l.maxExpandCount)), n = L(() => [{
216
+ name: "场景",
217
+ label: "场景",
218
+ show: !0,
219
+ level: 1,
220
+ isPenultimate: !1,
221
+ type: "场景",
222
+ id: "场景",
223
+ children: l != null && l.model ? g(l.model) : [],
224
+ path: "场景"
225
+ }]);
226
+ return M(
227
+ n,
228
+ (e) => {
229
+ u.value = JSON.parse(JSON.stringify(e));
230
+ },
231
+ { immediate: !0 }
232
+ ), (e, s) => {
233
+ const r = S("el-tree");
234
+ return f(), m("div", ee, [
235
+ A(r, {
236
+ data: u.value,
237
+ props: _,
238
+ "default-expanded-keys": k.value,
239
+ "node-key": te,
240
+ onNodeClick: y
241
+ }, null, 8, ["data", "default-expanded-keys"])
242
+ ]);
243
+ };
244
+ }
245
+ }, de = /* @__PURE__ */ b(se, [["__scopeId", "data-v-cfde50c3"]]);
246
+ export {
247
+ ce as J,
248
+ de as U,
249
+ ae as a,
250
+ ue as b,
251
+ D as c,
252
+ ie as d,
253
+ oe as g
254
+ };