build-dxf 0.0.32 → 0.0.34

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.
package/src/index3.js CHANGED
@@ -1,71 +1,71 @@
1
1
  import * as m from "three";
2
- import { i as ht, n as ut, r as Ue, t as qe, c as Pe, d as pt, e as gt, f as De, g as Q, _ as Ze, u as vt, h as fe, j as Be, w as ft, k as yt, l as wt, p as bt, m as xt, o as Ct, T as Ne, q as Oe, s as Et, v as Mt, x as Re, y as Ie, z as Le, A as Lt, B as kt, L as ye, D as It, b as Fe, E as de, S as Pt } from "./selectLocalFile.js";
3
- import { C as Ae, P as _, L as B, B as Ye, E as Xe, b as Ke, Q as ze, u as Dt, c as At, W as St, T as _t } from "./build.js";
2
+ import { i as ht, n as ut, r as Je, t as Ue, c as De, d as pt, e as gt, f as Ae, g as Q, _ as qe, u as vt, h as fe, j as Be, w as ft, k as wt, l as yt, p as bt, m as xt, o as Ct, T as Ne, q as Re, s as Et, v as Mt, x as Oe, y as Ie, z as Le, A as Lt, B as kt, L as we, D as It, b as Fe, E as re, S as Pt } from "./selectLocalFile.js";
3
+ import { C as Se, P as A, L as B, B as Ze, E as Ye, b as Pe, Q as ze, u as Dt, c as At, W as St, T as _t } from "./build.js";
4
4
  import "clipper-lib";
5
5
  import "dxf-writer";
6
6
  import "three/addons/controls/OrbitControls.js";
7
- import { watch as J, ref as S, defineComponent as me, computed as D, createElementBlock as O, openBlock as P, normalizeClass as V, unref as f, renderSlot as be, createVNode as K, Transition as xe, withCtx as j, withDirectives as $e, createElementVNode as I, normalizeStyle as Se, createTextVNode as X, toDisplayString as le, vShow as et, shallowReactive as Bt, onMounted as tt, createBlock as ge, createCommentVNode as q, resolveDynamicComponent as Nt, Fragment as ve, withModifiers as Ot, nextTick as we, isVNode as nt, render as Te, toRaw as Rt, onUnmounted as Ft, renderList as ke, createStaticVNode as Kt, TransitionGroup as zt, createApp as Tt } from "vue";
8
- function st(l) {
7
+ import { watch as J, ref as _, defineComponent as me, computed as D, createElementBlock as R, openBlock as P, normalizeClass as V, unref as w, renderSlot as be, createVNode as z, Transition as xe, withCtx as j, withDirectives as Xe, createElementVNode as I, normalizeStyle as _e, createTextVNode as X, toDisplayString as de, vShow as $e, shallowReactive as Bt, onMounted as et, createBlock as ge, createCommentVNode as q, resolveDynamicComponent as Nt, Fragment as ve, withModifiers as Rt, nextTick as ye, isVNode as tt, render as Ke, toRaw as Ot, onUnmounted as Ft, renderList as ke, createStaticVNode as zt, TransitionGroup as Kt, createApp as Tt } from "vue";
8
+ function nt(c) {
9
9
  var e;
10
- const t = Ue(l);
10
+ const t = Je(c);
11
11
  return (e = t?.$el) != null ? e : t;
12
12
  }
13
- const ot = Pe ? window : void 0;
14
- function jt(...l) {
15
- let e, t, n, s;
16
- if (ht(l[0]) || Array.isArray(l[0]) ? ([t, n, s] = l, e = ot) : [e, t, n, s] = l, !e)
13
+ const ot = De ? window : void 0;
14
+ function jt(...c) {
15
+ let e, t, n, o;
16
+ if (ht(c[0]) || Array.isArray(c[0]) ? ([t, n, o] = c, e = ot) : [e, t, n, o] = c, !e)
17
17
  return ut;
18
18
  Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
19
- const o = [], a = () => {
20
- o.forEach((r) => r()), o.length = 0;
21
- }, c = (r, h, y, p) => (r.addEventListener(h, y, p), () => r.removeEventListener(h, y, p)), d = J(() => [st(e), Ue(s)], ([r, h]) => {
22
- a(), r && o.push(...t.flatMap((y) => n.map((p) => c(r, y, p, h))));
19
+ const s = [], a = () => {
20
+ s.forEach((r) => r()), s.length = 0;
21
+ }, d = (r, h, v, f) => (r.addEventListener(h, v, f), () => r.removeEventListener(h, v, f)), l = J(() => [nt(e), Je(o)], ([r, h]) => {
22
+ a(), r && s.push(...t.flatMap((v) => n.map((f) => d(r, v, f, h))));
23
23
  }, { immediate: !0, flush: "post" }), i = () => {
24
- d(), a();
24
+ l(), a();
25
25
  };
26
- return qe(i), i;
26
+ return Ue(i), i;
27
27
  }
28
- function Vt(l, e = !1) {
29
- const t = S(), n = () => t.value = !!l();
28
+ function Vt(c, e = !1) {
29
+ const t = _(), n = () => t.value = !!c();
30
30
  return n(), pt(n, e), t;
31
31
  }
32
- const je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ve = "__vueuse_ssr_handlers__";
33
- je[Ve] = je[Ve] || {};
34
- var Ge = Object.getOwnPropertySymbols, Gt = Object.prototype.hasOwnProperty, Qt = Object.prototype.propertyIsEnumerable, Ht = (l, e) => {
32
+ const Te = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, je = "__vueuse_ssr_handlers__";
33
+ Te[je] = Te[je] || {};
34
+ var Ve = Object.getOwnPropertySymbols, Gt = Object.prototype.hasOwnProperty, Qt = Object.prototype.propertyIsEnumerable, Ht = (c, e) => {
35
35
  var t = {};
36
- for (var n in l)
37
- Gt.call(l, n) && e.indexOf(n) < 0 && (t[n] = l[n]);
38
- if (l != null && Ge)
39
- for (var n of Ge(l))
40
- e.indexOf(n) < 0 && Qt.call(l, n) && (t[n] = l[n]);
36
+ for (var n in c)
37
+ Gt.call(c, n) && e.indexOf(n) < 0 && (t[n] = c[n]);
38
+ if (c != null && Ve)
39
+ for (var n of Ve(c))
40
+ e.indexOf(n) < 0 && Qt.call(c, n) && (t[n] = c[n]);
41
41
  return t;
42
42
  };
43
- function Wt(l, e, t = {}) {
44
- const n = t, { window: s = ot } = n, o = Ht(n, ["window"]);
43
+ function Wt(c, e, t = {}) {
44
+ const n = t, { window: o = ot } = n, s = Ht(n, ["window"]);
45
45
  let a;
46
- const c = Vt(() => s && "ResizeObserver" in s), d = () => {
46
+ const d = Vt(() => o && "ResizeObserver" in o), l = () => {
47
47
  a && (a.disconnect(), a = void 0);
48
- }, i = J(() => st(l), (h) => {
49
- d(), c.value && s && h && (a = new ResizeObserver(e), a.observe(h, o));
48
+ }, i = J(() => nt(c), (h) => {
49
+ l(), d.value && o && h && (a = new ResizeObserver(e), a.observe(h, s));
50
50
  }, { immediate: !0, flush: "post" }), r = () => {
51
- d(), i();
51
+ l(), i();
52
52
  };
53
- return qe(r), {
54
- isSupported: c,
53
+ return Ue(r), {
54
+ isSupported: d,
55
55
  stop: r
56
56
  };
57
57
  }
58
- var Qe;
59
- (function(l) {
60
- l.UP = "UP", l.RIGHT = "RIGHT", l.DOWN = "DOWN", l.LEFT = "LEFT", l.NONE = "NONE";
61
- })(Qe || (Qe = {}));
62
- var Jt = Object.defineProperty, He = Object.getOwnPropertySymbols, Ut = Object.prototype.hasOwnProperty, qt = Object.prototype.propertyIsEnumerable, We = (l, e, t) => e in l ? Jt(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, Zt = (l, e) => {
58
+ var Ge;
59
+ (function(c) {
60
+ c.UP = "UP", c.RIGHT = "RIGHT", c.DOWN = "DOWN", c.LEFT = "LEFT", c.NONE = "NONE";
61
+ })(Ge || (Ge = {}));
62
+ var Jt = Object.defineProperty, Qe = Object.getOwnPropertySymbols, Ut = Object.prototype.hasOwnProperty, qt = Object.prototype.propertyIsEnumerable, He = (c, e, t) => e in c ? Jt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t, Zt = (c, e) => {
63
63
  for (var t in e || (e = {}))
64
- Ut.call(e, t) && We(l, t, e[t]);
65
- if (He)
66
- for (var t of He(e))
67
- qt.call(e, t) && We(l, t, e[t]);
68
- return l;
64
+ Ut.call(e, t) && He(c, t, e[t]);
65
+ if (Qe)
66
+ for (var t of Qe(e))
67
+ qt.call(e, t) && He(c, t, e[t]);
68
+ return c;
69
69
  };
70
70
  const Yt = {
71
71
  easeInSine: [0.12, 0, 0.39, 0],
@@ -96,9 +96,9 @@ const Yt = {
96
96
  Zt({
97
97
  linear: gt
98
98
  }, Yt);
99
- const Xt = (l) => l, $t = {
99
+ const Xt = (c) => c, $t = {
100
100
  esc: "Escape"
101
- }, en = De({
101
+ }, en = Ae({
102
102
  value: {
103
103
  type: [String, Number],
104
104
  default: ""
@@ -134,45 +134,45 @@ const Xt = (l) => l, $t = {
134
134
  }), nn = /* @__PURE__ */ me({
135
135
  ...tn,
136
136
  props: en,
137
- setup(l, { expose: e }) {
138
- const t = l, n = vt("badge"), s = D(() => t.isDot ? "" : fe(t.value) && fe(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), o = D(() => {
139
- var a, c, d, i, r;
137
+ setup(c, { expose: e }) {
138
+ const t = c, n = vt("badge"), o = D(() => t.isDot ? "" : fe(t.value) && fe(t.max) ? t.max < t.value ? `${t.max}+` : `${t.value}` : `${t.value}`), s = D(() => {
139
+ var a, d, l, i, r;
140
140
  return [
141
141
  {
142
142
  backgroundColor: t.color,
143
- marginRight: Be(-((c = (a = t.offset) == null ? void 0 : a[0]) != null ? c : 0)),
144
- marginTop: Be((i = (d = t.offset) == null ? void 0 : d[1]) != null ? i : 0)
143
+ marginRight: Be(-((d = (a = t.offset) == null ? void 0 : a[0]) != null ? d : 0)),
144
+ marginTop: Be((i = (l = t.offset) == null ? void 0 : l[1]) != null ? i : 0)
145
145
  },
146
146
  (r = t.badgeStyle) != null ? r : {}
147
147
  ];
148
148
  });
149
149
  return e({
150
- content: s
151
- }), (a, c) => (P(), O("div", {
152
- class: V(f(n).b())
150
+ content: o
151
+ }), (a, d) => (P(), R("div", {
152
+ class: V(w(n).b())
153
153
  }, [
154
154
  be(a.$slots, "default"),
155
- K(xe, {
156
- name: `${f(n).namespace.value}-zoom-in-center`,
155
+ z(xe, {
156
+ name: `${w(n).namespace.value}-zoom-in-center`,
157
157
  persisted: ""
158
158
  }, {
159
159
  default: j(() => [
160
- $e(I("sup", {
160
+ Xe(I("sup", {
161
161
  class: V([
162
- f(n).e("content"),
163
- f(n).em("content", a.type),
164
- f(n).is("fixed", !!a.$slots.default),
165
- f(n).is("dot", a.isDot),
166
- f(n).is("hide-zero", !a.showZero && t.value === 0),
162
+ w(n).e("content"),
163
+ w(n).em("content", a.type),
164
+ w(n).is("fixed", !!a.$slots.default),
165
+ w(n).is("dot", a.isDot),
166
+ w(n).is("hide-zero", !a.showZero && t.value === 0),
167
167
  a.badgeClass
168
168
  ]),
169
- style: Se(f(o))
169
+ style: _e(w(s))
170
170
  }, [
171
- be(a.$slots, "content", { value: f(s) }, () => [
172
- X(le(f(s)), 1)
171
+ be(a.$slots, "content", { value: w(o) }, () => [
172
+ X(de(w(o)), 1)
173
173
  ])
174
174
  ], 6), [
175
- [et, !a.hidden && (f(s) || a.isDot || a.$slots.content)]
175
+ [$e, !a.hidden && (w(o) || a.isDot || a.$slots.content)]
176
176
  ])
177
177
  ]),
178
178
  _: 3
@@ -180,8 +180,8 @@ const Xt = (l) => l, $t = {
180
180
  ], 2));
181
181
  }
182
182
  });
183
- var sn = /* @__PURE__ */ Ze(nn, [["__file", "badge.vue"]]);
184
- const on = ft(sn), an = De({
183
+ var on = /* @__PURE__ */ qe(nn, [["__file", "badge.vue"]]);
184
+ const sn = ft(on), an = Ae({
185
185
  a11y: {
186
186
  type: Boolean,
187
187
  default: !0
@@ -189,7 +189,7 @@ const on = ft(sn), an = De({
189
189
  locale: {
190
190
  type: Q(Object)
191
191
  },
192
- size: wt,
192
+ size: yt,
193
193
  button: {
194
194
  type: Q(Object)
195
195
  },
@@ -217,20 +217,20 @@ const on = ft(sn), an = De({
217
217
  type: String,
218
218
  default: "el"
219
219
  },
220
- ...yt
220
+ ...wt
221
221
  }), T = {};
222
222
  me({
223
223
  name: "ElConfigProvider",
224
224
  props: an,
225
- setup(l, { slots: e }) {
226
- const t = bt(l);
227
- return J(() => l.message, (n) => {
228
- var s, o;
229
- Object.assign(T, (o = (s = t?.value) == null ? void 0 : s.message) != null ? o : {}, n ?? {});
225
+ setup(c, { slots: e }) {
226
+ const t = bt(c);
227
+ return J(() => c.message, (n) => {
228
+ var o, s;
229
+ Object.assign(T, (s = (o = t?.value) == null ? void 0 : o.message) != null ? s : {}, n ?? {});
230
230
  }, { immediate: !0, deep: !0 }), () => be(e, "default", { config: t?.value });
231
231
  }
232
232
  });
233
- const at = [
233
+ const st = [
234
234
  "primary",
235
235
  "success",
236
236
  "info",
@@ -251,8 +251,8 @@ const at = [
251
251
  zIndex: 0,
252
252
  grouping: !1,
253
253
  repeatNum: 1,
254
- appendTo: Pe ? document.body : void 0
255
- }), rn = De({
254
+ appendTo: De ? document.body : void 0
255
+ }), rn = Ae({
256
256
  customClass: {
257
257
  type: String,
258
258
  default: N.customClass
@@ -291,7 +291,7 @@ const at = [
291
291
  },
292
292
  type: {
293
293
  type: String,
294
- values: at,
294
+ values: st,
295
295
  default: N.type
296
296
  },
297
297
  plain: {
@@ -316,184 +316,184 @@ const at = [
316
316
  }
317
317
  }), dn = {
318
318
  destroy: () => !0
319
- }, H = Bt([]), ln = (l) => {
320
- const e = H.findIndex((s) => s.id === l), t = H[e];
319
+ }, H = Bt([]), ln = (c) => {
320
+ const e = H.findIndex((o) => o.id === c), t = H[e];
321
321
  let n;
322
322
  return e > 0 && (n = H[e - 1]), { current: t, prev: n };
323
- }, cn = (l) => {
324
- const { prev: e } = ln(l);
323
+ }, cn = (c) => {
324
+ const { prev: e } = ln(c);
325
325
  return e ? e.vm.exposed.bottom.value : 0;
326
- }, mn = (l, e) => H.findIndex((n) => n.id === l) > 0 ? 16 : e, hn = me({
326
+ }, mn = (c, e) => H.findIndex((n) => n.id === c) > 0 ? 16 : e, hn = me({
327
327
  name: "ElMessage"
328
328
  }), un = /* @__PURE__ */ me({
329
329
  ...hn,
330
330
  props: rn,
331
331
  emits: dn,
332
- setup(l, { expose: e, emit: t }) {
333
- const n = l, { Close: s } = Et, o = S(!1), { ns: a, zIndex: c } = Ct("message"), { currentZIndex: d, nextZIndex: i } = c, r = S(), h = S(!1), y = S(0);
334
- let p;
335
- const v = D(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), g = D(() => {
332
+ setup(c, { expose: e, emit: t }) {
333
+ const n = c, { Close: o } = Et, s = _(!1), { ns: a, zIndex: d } = Ct("message"), { currentZIndex: l, nextZIndex: i } = d, r = _(), h = _(!1), v = _(0);
334
+ let f;
335
+ const p = D(() => n.type ? n.type === "error" ? "danger" : n.type : "info"), u = D(() => {
336
336
  const b = n.type;
337
337
  return { [a.bm("icon", b)]: b && Ne[b] };
338
- }), E = D(() => n.icon || Ne[n.type] || ""), x = D(() => cn(n.id)), k = D(() => mn(n.id, n.offset) + x.value), z = D(() => y.value + k.value), Y = D(() => ({
338
+ }), E = D(() => n.icon || Ne[n.type] || ""), x = D(() => cn(n.id)), k = D(() => mn(n.id, n.offset) + x.value), K = D(() => v.value + k.value), Y = D(() => ({
339
339
  top: `${k.value}px`,
340
- zIndex: d.value
340
+ zIndex: l.value
341
341
  }));
342
342
  function Z() {
343
- n.duration !== 0 && ({ stop: p } = Mt(() => {
344
- A();
343
+ n.duration !== 0 && ({ stop: f } = Mt(() => {
344
+ S();
345
345
  }, n.duration));
346
346
  }
347
347
  function G() {
348
- p?.();
348
+ f?.();
349
349
  }
350
- function A() {
351
- h.value = !1, we(() => {
350
+ function S() {
351
+ h.value = !1, ye(() => {
352
352
  var b;
353
- o.value || ((b = n.onClose) == null || b.call(n), t("destroy"));
353
+ s.value || ((b = n.onClose) == null || b.call(n), t("destroy"));
354
354
  });
355
355
  }
356
356
  function M({ code: b }) {
357
- b === $t.esc && A();
357
+ b === $t.esc && S();
358
358
  }
359
- return tt(() => {
359
+ return et(() => {
360
360
  Z(), i(), h.value = !0;
361
361
  }), J(() => n.repeatNum, () => {
362
362
  G(), Z();
363
363
  }), jt(document, "keydown", M), Wt(r, () => {
364
- y.value = r.value.getBoundingClientRect().height;
364
+ v.value = r.value.getBoundingClientRect().height;
365
365
  }), e({
366
366
  visible: h,
367
- bottom: z,
368
- close: A
367
+ bottom: K,
368
+ close: S
369
369
  }), (b, F) => (P(), ge(xe, {
370
- name: f(a).b("fade"),
371
- onBeforeEnter: (W) => o.value = !0,
370
+ name: w(a).b("fade"),
371
+ onBeforeEnter: (W) => s.value = !0,
372
372
  onBeforeLeave: b.onClose,
373
373
  onAfterLeave: (W) => b.$emit("destroy"),
374
374
  persisted: ""
375
375
  }, {
376
376
  default: j(() => [
377
- $e(I("div", {
377
+ Xe(I("div", {
378
378
  id: b.id,
379
379
  ref_key: "messageRef",
380
380
  ref: r,
381
381
  class: V([
382
- f(a).b(),
383
- { [f(a).m(b.type)]: b.type },
384
- f(a).is("closable", b.showClose),
385
- f(a).is("plain", b.plain),
382
+ w(a).b(),
383
+ { [w(a).m(b.type)]: b.type },
384
+ w(a).is("closable", b.showClose),
385
+ w(a).is("plain", b.plain),
386
386
  b.customClass
387
387
  ]),
388
- style: Se(f(Y)),
388
+ style: _e(w(Y)),
389
389
  role: "alert",
390
390
  onMouseenter: G,
391
391
  onMouseleave: Z
392
392
  }, [
393
- b.repeatNum > 1 ? (P(), ge(f(on), {
393
+ b.repeatNum > 1 ? (P(), ge(w(sn), {
394
394
  key: 0,
395
395
  value: b.repeatNum,
396
- type: f(v),
397
- class: V(f(a).e("badge"))
396
+ type: w(p),
397
+ class: V(w(a).e("badge"))
398
398
  }, null, 8, ["value", "type", "class"])) : q("v-if", !0),
399
- f(E) ? (P(), ge(f(Oe), {
399
+ w(E) ? (P(), ge(w(Re), {
400
400
  key: 1,
401
- class: V([f(a).e("icon"), f(g)])
401
+ class: V([w(a).e("icon"), w(u)])
402
402
  }, {
403
403
  default: j(() => [
404
- (P(), ge(Nt(f(E))))
404
+ (P(), ge(Nt(w(E))))
405
405
  ]),
406
406
  _: 1
407
407
  }, 8, ["class"])) : q("v-if", !0),
408
408
  be(b.$slots, "default", {}, () => [
409
- b.dangerouslyUseHTMLString ? (P(), O(ve, { key: 1 }, [
409
+ b.dangerouslyUseHTMLString ? (P(), R(ve, { key: 1 }, [
410
410
  q(" Caution here, message could've been compromised, never use user's input as message "),
411
411
  I("p", {
412
- class: V(f(a).e("content")),
412
+ class: V(w(a).e("content")),
413
413
  innerHTML: b.message
414
414
  }, null, 10, ["innerHTML"])
415
- ], 2112)) : (P(), O("p", {
415
+ ], 2112)) : (P(), R("p", {
416
416
  key: 0,
417
- class: V(f(a).e("content"))
418
- }, le(b.message), 3))
417
+ class: V(w(a).e("content"))
418
+ }, de(b.message), 3))
419
419
  ]),
420
- b.showClose ? (P(), ge(f(Oe), {
420
+ b.showClose ? (P(), ge(w(Re), {
421
421
  key: 2,
422
- class: V(f(a).e("closeBtn")),
423
- onClick: Ot(A, ["stop"])
422
+ class: V(w(a).e("closeBtn")),
423
+ onClick: Rt(S, ["stop"])
424
424
  }, {
425
425
  default: j(() => [
426
- K(f(s))
426
+ z(w(o))
427
427
  ]),
428
428
  _: 1
429
429
  }, 8, ["class", "onClick"])) : q("v-if", !0)
430
430
  ], 46, ["id"]), [
431
- [et, h.value]
431
+ [$e, h.value]
432
432
  ])
433
433
  ]),
434
434
  _: 3
435
435
  }, 8, ["name", "onBeforeEnter", "onBeforeLeave", "onAfterLeave"]));
436
436
  }
437
437
  });
438
- var pn = /* @__PURE__ */ Ze(un, [["__file", "message.vue"]]);
438
+ var pn = /* @__PURE__ */ qe(un, [["__file", "message.vue"]]);
439
439
  let gn = 1;
440
- const it = (l) => {
441
- const e = !l || Re(l) || nt(l) || Ie(l) ? { message: l } : l, t = {
440
+ const at = (c) => {
441
+ const e = !c || Oe(c) || tt(c) || Ie(c) ? { message: c } : c, t = {
442
442
  ...N,
443
443
  ...e
444
444
  };
445
445
  if (!t.appendTo)
446
446
  t.appendTo = document.body;
447
- else if (Re(t.appendTo)) {
447
+ else if (Oe(t.appendTo)) {
448
448
  let n = document.querySelector(t.appendTo);
449
449
  Lt(n) || (n = document.body), t.appendTo = n;
450
450
  }
451
451
  return Le(T.grouping) && !t.grouping && (t.grouping = T.grouping), fe(T.duration) && t.duration === 3e3 && (t.duration = T.duration), fe(T.offset) && t.offset === 16 && (t.offset = T.offset), Le(T.showClose) && !t.showClose && (t.showClose = T.showClose), Le(T.plain) && !t.plain && (t.plain = T.plain), t;
452
- }, vn = (l) => {
453
- const e = H.indexOf(l);
452
+ }, vn = (c) => {
453
+ const e = H.indexOf(c);
454
454
  if (e === -1)
455
455
  return;
456
456
  H.splice(e, 1);
457
- const { handler: t } = l;
457
+ const { handler: t } = c;
458
458
  t.close();
459
- }, fn = ({ appendTo: l, ...e }, t) => {
460
- const n = `message_${gn++}`, s = e.onClose, o = document.createElement("div"), a = {
459
+ }, fn = ({ appendTo: c, ...e }, t) => {
460
+ const n = `message_${gn++}`, o = e.onClose, s = document.createElement("div"), a = {
461
461
  ...e,
462
462
  id: n,
463
463
  onClose: () => {
464
- s?.(), vn(r);
464
+ o?.(), vn(r);
465
465
  },
466
466
  onDestroy: () => {
467
- Te(null, o);
467
+ Ke(null, s);
468
468
  }
469
- }, c = K(pn, a, Ie(a.message) || nt(a.message) ? {
469
+ }, d = z(pn, a, Ie(a.message) || tt(a.message) ? {
470
470
  default: Ie(a.message) ? a.message : () => a.message
471
471
  } : null);
472
- c.appContext = t || ce._context, Te(c, o), l.appendChild(o.firstElementChild);
473
- const d = c.component, r = {
472
+ d.appContext = t || ce._context, Ke(d, s), c.appendChild(s.firstElementChild);
473
+ const l = d.component, r = {
474
474
  id: n,
475
- vnode: c,
476
- vm: d,
475
+ vnode: d,
476
+ vm: l,
477
477
  handler: {
478
478
  close: () => {
479
- d.exposed.close();
479
+ l.exposed.close();
480
480
  }
481
481
  },
482
- props: c.component.props
482
+ props: d.component.props
483
483
  };
484
484
  return r;
485
- }, ce = (l = {}, e) => {
486
- if (!Pe)
485
+ }, ce = (c = {}, e) => {
486
+ if (!De)
487
487
  return { close: () => {
488
488
  } };
489
- const t = it(l);
489
+ const t = at(c);
490
490
  if (t.grouping && H.length) {
491
- const s = H.find(({ vnode: o }) => {
491
+ const o = H.find(({ vnode: s }) => {
492
492
  var a;
493
- return ((a = o.props) == null ? void 0 : a.message) === t.message;
493
+ return ((a = s.props) == null ? void 0 : a.message) === t.message;
494
494
  });
495
- if (s)
496
- return s.props.repeatNum += 1, s.props.type = t.type, s.handler;
495
+ if (o)
496
+ return o.props.repeatNum += 1, o.props.type = t.type, o.handler;
497
497
  }
498
498
  if (fe(T.max) && H.length >= T.max)
499
499
  return { close: () => {
@@ -501,21 +501,21 @@ const it = (l) => {
501
501
  const n = fn(t, e);
502
502
  return H.push(n), n.handler;
503
503
  };
504
- at.forEach((l) => {
505
- ce[l] = (e = {}, t) => {
506
- const n = it(e);
507
- return ce({ ...n, type: l }, t);
504
+ st.forEach((c) => {
505
+ ce[c] = (e = {}, t) => {
506
+ const n = at(e);
507
+ return ce({ ...n, type: c }, t);
508
508
  };
509
509
  });
510
- function yn(l) {
510
+ function wn(c) {
511
511
  const e = [...H];
512
512
  for (const t of e)
513
- (!l || l === t.props.type) && t.handler.close();
513
+ (!c || c === t.props.type) && t.handler.close();
514
514
  }
515
- ce.closeAll = yn;
515
+ ce.closeAll = wn;
516
516
  ce._context = null;
517
517
  const L = kt(ce, "$message");
518
- class R extends Ae {
518
+ class O extends Se {
519
519
  _renderer;
520
520
  get renderer() {
521
521
  return this._renderer || (this._renderer = this.parent?.findComponentByName("Renderer")), this._renderer;
@@ -582,9 +582,9 @@ class R extends Ae {
582
582
  */
583
583
  createCursor(e) {
584
584
  return (t, n) => {
585
- const s = this.domElement.style.cursor;
585
+ const o = this.domElement.style.cursor;
586
586
  this.domElement.style.cursor = e, this.addEventRecord("clear", () => {
587
- this.domElement.style.cursor = s ?? "default";
587
+ this.domElement.style.cursor = o ?? "default";
588
588
  }), t(n);
589
589
  };
590
590
  }
@@ -603,28 +603,28 @@ class R extends Ae {
603
603
  * @returns
604
604
  */
605
605
  createPointerMove(e) {
606
- const t = this.editor, n = new _();
607
- let s = null, o = null, a = null;
608
- const c = t.addEventListener("pointerPositionChange", () => {
609
- const d = _.from(t.pointerPosition);
610
- if (s && t.eventInput.isKeyDown("shift")) {
611
- const i = Math.abs(d.x - s.x), r = Math.abs(d.y - s.y);
612
- i > r ? n.set(d.x, s.y) : n.set(s.x, d.y), e(n, !1);
613
- } else if (o && a && t.eventInput.isKeyDown("alt")) {
614
- const i = o.projectPoint(d, !1), r = a.projectPoint(d, !1);
615
- i && r ? d.distance(i) < d.distance(r) ? n.copy(i) : n.copy(r) : i ? n.copy(i) : r && n.copy(r), e(n, !1);
606
+ const t = this.editor, n = new A();
607
+ let o = null, s = null, a = null;
608
+ const d = t.addEventListener("pointerPositionChange", () => {
609
+ const l = A.from(t.pointerPosition);
610
+ if (o && t.eventInput.isKeyDown("shift")) {
611
+ const i = Math.abs(l.x - o.x), r = Math.abs(l.y - o.y);
612
+ i > r ? n.set(l.x, o.y) : n.set(o.x, l.y), e(n, !1);
613
+ } else if (s && a && t.eventInput.isKeyDown("alt")) {
614
+ const i = s.projectPoint(l, !1), r = a.projectPoint(l, !1);
615
+ i && r ? l.distance(i) < l.distance(r) ? n.copy(i) : n.copy(r) : i ? n.copy(i) : r && n.copy(r), e(n, !1);
616
616
  } else {
617
- const { point: i, find: r } = t.renderManager.adsorption();
618
- n.copy(i), e(n, r);
617
+ const { point: i, find: r, line: h } = t.renderManager.adsorption();
618
+ n.copy(i), e(n, r, h);
619
619
  }
620
620
  });
621
621
  return {
622
622
  destroy() {
623
- c();
623
+ d();
624
624
  },
625
- setBaseLine(d, i) {
626
- if (o = d, s = i, d && i) {
627
- const r = d.normal();
625
+ setBaseLine(l, i) {
626
+ if (s = l, o = i, l && i) {
627
+ const r = l.normal();
628
628
  a = new B(
629
629
  i.clone().add(r.clone().multiplyScalar(10)),
630
630
  i.clone().add(r.multiplyScalar(-10))
@@ -634,7 +634,7 @@ class R extends Ae {
634
634
  };
635
635
  }
636
636
  }
637
- class wn extends R {
637
+ class yn extends O {
638
638
  static name = "DrawLine";
639
639
  container = new m.Group();
640
640
  interruptKeys = ["escape"];
@@ -651,7 +651,7 @@ class wn extends R {
651
651
  * @param next
652
652
  */
653
653
  selectPoint(e) {
654
- let t = this.parent?.findComponentByName("Editor"), n = null, s = null, o = [], a = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 65280 })), c = t.domContainer.domElement, d = new ye([], 16711935), i = new ye([
654
+ let t = this.parent?.findComponentByName("Editor"), n = null, o = null, s = [], a = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 65280 })), d = t.domContainer.domElement, l = new we([], 16711935), i = new we([
655
655
  new m.Vector3(-1e4, 0, 0),
656
656
  new m.Vector3(1e4, 0, 0),
657
657
  new m.Vector3(0, -1e4, 0),
@@ -662,36 +662,38 @@ class wn extends R {
662
662
  dashSize: 0.1,
663
663
  gapSize: 0.1,
664
664
  linewidth: 0.1
665
- }), this.container.add(d);
665
+ }), this.container.add(l);
666
666
  const r = () => {
667
- d.setPoint(...o, n, s), i.position.copy(s), this.container.add(i), i.computeLineDistances();
668
- }, h = new m.Vector3(), y = this.createPointerMove((p, v) => {
669
- h.set(p.x, p.y, 0), this.dispatchEvent({ type: "pointerMove", point: h }), v ? (a.position.set(p.x, p.y, 0), this.container.add(a), c.style.cursor = "none") : (a.removeFromParent(), c.style.cursor = "crosshair"), n && s && (r(), s.copy(h));
667
+ l.setPoint(...s, n, o), i.position.copy(o), this.container.add(i), i.computeLineDistances();
668
+ }, h = new m.Vector3();
669
+ let v;
670
+ const f = this.createPointerMove((p, u, E) => {
671
+ h.set(p.x, p.y, 0), this.dispatchEvent({ type: "pointerMove", point: h }), v = E, u ? (a.position.set(p.x, p.y, 0), this.container.add(a), d.style.cursor = "none") : (a.removeFromParent(), d.style.cursor = "crosshair"), n && o && (r(), o.copy(h));
670
672
  });
671
673
  this.addEventRecord(
672
674
  "clear",
673
- () => y.destroy(),
675
+ () => f.destroy(),
674
676
  t.eventInput.addEventListener("codeChange", async () => {
675
677
  if (t.eventInput.isKeyDown("mouse_0")) {
676
678
  if (!n) {
677
- n = h.clone(), s = h.clone(), r(), y.setBaseLine(null, _.from(n));
679
+ n = h.clone(), o = h.clone(), r(), f.setBaseLine(v ?? null, A.from(n));
678
680
  return;
679
681
  }
680
- s = h.clone(), o.push(n.clone(), s.clone());
681
- const p = new B(_.from(n), _.from(s));
682
- y.setBaseLine(p, p.end), n.copy(s), r();
682
+ o = h.clone(), s.push(n.clone(), o.clone());
683
+ const p = new B(A.from(n), A.from(o));
684
+ f.setBaseLine(p, p.end), n.copy(o), r();
683
685
  } else if (t.eventInput.isOnlyKeyDowns(this.withdrawalKeys)) {
684
- if (o.length) {
686
+ if (s.length) {
685
687
  const { point: p } = t.renderManager.adsorption();
686
- if (o.pop(), s?.copy(p), n?.copy(o.pop()), r(), o.length >= 2) {
687
- const v = new B(_.from(o[o.length - 2]), _.from(o[o.length - 1]));
688
- y.setBaseLine(v, v.end);
688
+ if (s.pop(), o?.copy(p), n?.copy(s.pop()), r(), s.length >= 2) {
689
+ const u = new B(A.from(s[s.length - 2]), A.from(s[s.length - 1]));
690
+ f.setBaseLine(u, u.end);
689
691
  }
690
692
  }
691
- } else t.eventInput.isKeyDowns(this.confirmKeys) && e(o);
693
+ } else t.eventInput.isKeyDowns(this.confirmKeys) && e(s);
692
694
  }),
693
695
  function() {
694
- d.removeFromParent(), a.removeFromParent(), i.removeFromParent();
696
+ l.removeFromParent(), a.removeFromParent(), i.removeFromParent();
695
697
  }
696
698
  );
697
699
  }
@@ -700,8 +702,8 @@ class wn extends R {
700
702
  */
701
703
  end(e, t) {
702
704
  const n = [];
703
- for (let s = 0; s < t.length; s += 2)
704
- n.push(new B(_.from(t[s]), _.from(t[s + 1])));
705
+ for (let o = 0; o < t.length; o += 2)
706
+ n.push(new B(A.from(t[o]), A.from(t[o + 1])));
705
707
  e(n);
706
708
  }
707
709
  /** 执行完成
@@ -723,7 +725,7 @@ class wn extends R {
723
725
  return this.completed(e), e;
724
726
  }
725
727
  }
726
- class _e extends R {
728
+ class it extends O {
727
729
  static name = "Default";
728
730
  container = new m.Group();
729
731
  onAddFromParent() {
@@ -776,80 +778,80 @@ class _e extends R {
776
778
  * @param next
777
779
  */
778
780
  start() {
779
- const e = this.editor, t = e.eventInput, n = new m.Mesh(), s = e.domContainer.domElement;
780
- let o = null;
781
+ const e = this.editor, t = e.eventInput, n = new m.Mesh(), o = e.domContainer.domElement;
782
+ let s = null;
781
783
  n.position.z = 1e-3, this.selectLineObject3D.position.z = n.position.z + 1e-3, n.material = new m.MeshBasicMaterial({ color: 55561 });
782
784
  const a = () => {
783
- const d = e.pointerPosition.clone(), i = e.pointerPosition.clone(), r = new m.Mesh();
785
+ const l = e.pointerPosition.clone(), i = e.pointerPosition.clone(), r = new m.Mesh();
784
786
  this.container.add(r), r.position.z = 0.05, r.material = new m.MeshBasicMaterial({
785
787
  color: 16777215,
786
788
  transparent: !0,
787
789
  opacity: 0.5
788
790
  });
789
791
  const h = () => {
790
- const v = Math.min(d.x, i.x), g = Math.max(d.x, i.x), E = Math.min(d.y, i.y), x = Math.max(d.y, i.y), k = [
791
- v,
792
+ const p = Math.min(l.x, i.x), u = Math.max(l.x, i.x), E = Math.min(l.y, i.y), x = Math.max(l.y, i.y), k = [
793
+ p,
792
794
  x,
793
795
  0,
794
- g,
796
+ u,
795
797
  E,
796
798
  0,
797
- g,
799
+ u,
798
800
  x,
799
801
  0,
800
- v,
802
+ p,
801
803
  x,
802
804
  0,
803
- v,
805
+ p,
804
806
  E,
805
807
  0,
806
- g,
808
+ u,
807
809
  E,
808
810
  0
809
811
  ];
810
812
  r.geometry = e.renderManager.createGeometry({ position: k }, k.length / 3);
811
- }, y = () => {
813
+ }, v = () => {
812
814
  i.copy(e.pointerPosition), h();
813
- }, p = () => {
814
- document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", p), r.removeFromParent();
815
- const v = Math.min(d.x, i.x), g = Math.max(d.x, i.x), E = Math.min(d.y, i.y), x = Math.max(d.y, i.y), k = new Ye(v, g, E, x), z = e.renderManager.quadtree.queryBox(k);
816
- this.removeSelectLineAll(), z.forEach((Y) => this.addSelectLine(Y.line)), this.updateSelectLinesGeometry();
815
+ }, f = () => {
816
+ document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", f), r.removeFromParent();
817
+ const p = Math.min(l.x, i.x), u = Math.max(l.x, i.x), E = Math.min(l.y, i.y), x = Math.max(l.y, i.y), k = new Ze(p, u, E, x), K = e.renderManager.quadtree.queryBox(k);
818
+ this.removeSelectLineAll(), K.forEach((Y) => this.addSelectLine(Y.line)), this.updateSelectLinesGeometry();
817
819
  };
818
- document.addEventListener("mousemove", y), document.addEventListener("mouseup", p);
819
- }, c = this.renderer.createText("", new m.Vector3(0, 0, 0), {
820
+ document.addEventListener("mousemove", v), document.addEventListener("mouseup", f);
821
+ }, d = this.renderer.createText("", new m.Vector3(0, 0, 0), {
820
822
  background: "rgba(0,0,0,0.5)",
821
823
  padding: "2px",
822
824
  borderRadius: "2px"
823
825
  }, this.container);
824
- c.visible = !1, this.addEventRecord(
826
+ d.visible = !1, this.addEventRecord(
825
827
  "clear",
826
828
  // 注册鼠标指针位置变化事件
827
829
  e.addEventListener("pointerPositionChange", () => {
828
- const { line: d } = e.renderManager.adsorption();
829
- if (d) {
830
- const i = d.expandToRectangle(0.025, "bothSides");
831
- n.geometry = e.renderManager.createGeometry({ position: i.createGeometry() }, 6), this.container.add(n), s.style.cursor = "pointer", o = d;
832
- const r = d.center;
833
- c.element.innerText = d.length().toFixed(3) + "m", c.position.set(r.x, r.y, 0), c.visible = !0;
830
+ const { line: l } = e.renderManager.adsorption();
831
+ if (l) {
832
+ const i = l.expandToRectangle(0.025, "bothSides");
833
+ n.geometry = e.renderManager.createGeometry({ position: i.createGeometry() }, 6), this.container.add(n), o.style.cursor = "pointer", s = l;
834
+ const r = l.center;
835
+ d.element.innerText = l.length().toFixed(3) + "m", d.position.set(r.x, r.y, 0), d.visible = !0;
834
836
  } else
835
- n.removeFromParent(), s.style.cursor = "default", o = null, c.visible = !1;
837
+ n.removeFromParent(), o.style.cursor = "default", s = null, d.visible = !1;
836
838
  }),
837
839
  t.addEventListener("codeChange", () => {
838
840
  if (t.isKeyDown("mouse_0")) {
839
- if (!o) return a();
841
+ if (!s) return a();
840
842
  if (t.isKeyDown("alt"))
841
- return this.removeSelectLine(o);
842
- t.isKeyDown("control") || this.removeSelectLineAll(), this.addSelectLine(o);
843
+ return this.removeSelectLine(s);
844
+ t.isKeyDown("control") || this.removeSelectLineAll(), this.addSelectLine(s);
843
845
  } else if (t.isKeyDown("mouse_1")) {
844
- if (!o) return;
845
- this.removeSelectLine(o);
846
+ if (!s) return;
847
+ this.removeSelectLine(s);
846
848
  } else if (t.isKeyDown("mouse_2")) {
847
- if (!o) return;
848
- this.addSelectLine(o);
849
+ if (!s) return;
850
+ this.addSelectLine(s);
849
851
  } else t.isKeyDowns(["control", "z"]) ? e.commandManager.rollback() : t.isKeyDowns(["control", "y"]) && e.commandManager.revokeRollback();
850
852
  }),
851
853
  function() {
852
- n.removeFromParent(), c.removeFromParent();
854
+ n.removeFromParent(), d.removeFromParent();
853
855
  }
854
856
  );
855
857
  }
@@ -860,7 +862,7 @@ class _e extends R {
860
862
  this.canceEventRecord("clear"), this.removeSelectLineAll(), this.updateSelectLinesGeometry();
861
863
  }
862
864
  }
863
- class bn extends Xe {
865
+ class bn extends Ye {
864
866
  list = [];
865
867
  rollbacklist = [];
866
868
  revokeRollbacklist = [];
@@ -888,7 +890,7 @@ class bn extends Xe {
888
890
  return this.revokeRollbacklist.push(e), this;
889
891
  }
890
892
  }
891
- class xn extends Xe {
893
+ class xn extends Ye {
892
894
  commandFlowMap = /* @__PURE__ */ new Map();
893
895
  lock = !1;
894
896
  abortController = null;
@@ -932,25 +934,25 @@ class xn extends Xe {
932
934
  currentName: this.currentName
933
935
  }), this.executionPromise && await this.executionPromise, this.executionPromise = null, this.lock)
934
936
  throw new Error("命令管理器已被 " + this.currentName + " 命令锁定,无法启动新的命令流,请退出或等待命令执行结束");
935
- const s = this.commandFlowMap.get(e);
936
- if (!s)
937
+ const o = this.commandFlowMap.get(e);
938
+ if (!o)
937
939
  throw new Error(`命令流 ${e} 不存在`);
938
- this.lock = !0, this.abortController = new AbortController(), this.currentName = e, s.dispatchEvent({ type: "started" }), this.dispatchEvent({ type: "started", name: e });
940
+ this.lock = !0, this.abortController = new AbortController(), this.currentName = e, o.dispatchEvent({ type: "started" }), this.dispatchEvent({ type: "started", name: e });
939
941
  try {
940
- for (let o = n; o < s.list.length; o++) {
941
- const a = s.list[o];
942
- if (s.dispatchEvent({ type: "executing", index: o }), this.dispatchEvent({ type: "executing", name: e, index: o }), t = await new Promise((c) => {
943
- this.resolve = c, a(c, t);
942
+ for (let s = n; s < o.list.length; s++) {
943
+ const a = o.list[s];
944
+ if (o.dispatchEvent({ type: "executing", index: s }), this.dispatchEvent({ type: "executing", name: e, index: s }), t = await new Promise((d) => {
945
+ this.resolve = d, a(d, t);
944
946
  }), this.abortController.signal.aborted) {
945
- s.dispatchEvent({ type: "executionInterrupt", index: o }), this.dispatchEvent({ type: "executionInterrupt", name: e, index: o }), this.dispatchEvent({ type: "cancel", name: e });
947
+ o.dispatchEvent({ type: "executionInterrupt", index: s }), this.dispatchEvent({ type: "executionInterrupt", name: e, index: s }), this.dispatchEvent({ type: "cancel", name: e });
946
948
  break;
947
949
  } else
948
- s.dispatchEvent({ type: "executionCompleted", index: o, data: t }), this.dispatchEvent({ type: "executionCompleted", name: e, index: o, data: t });
950
+ o.dispatchEvent({ type: "executionCompleted", index: s, data: t }), this.dispatchEvent({ type: "executionCompleted", name: e, index: s, data: t });
949
951
  }
950
- } catch (o) {
951
- console.error(o);
952
+ } catch (s) {
953
+ console.error(s);
952
954
  } finally {
953
- this.abortController && !this.abortController.signal.aborted && (s.dispatchEvent({ type: "completed", data: t }), this.dispatchEvent({ type: "completed", name: e, data: t }), s.writeOperationList && (this.operationList.push({ name: e, data: t }), this.rollbackList.length = 0)), this.lock = !1, this.abortController = null, this.currentName = null, s.dispatchEvent({ type: "finally" }), this.dispatchEvent({ type: "finally", name: e }), this.executionResolve && (this.executionResolve(null), this.executionResolve = null);
955
+ this.abortController && !this.abortController.signal.aborted && (o.dispatchEvent({ type: "completed", data: t }), this.dispatchEvent({ type: "completed", name: e, data: t }), o.writeOperationList && (this.operationList.push({ name: e, data: t }), this.rollbackList.length = 0)), this.lock = !1, this.abortController = null, this.currentName = null, o.dispatchEvent({ type: "finally" }), this.dispatchEvent({ type: "finally", name: e }), this.executionResolve && (this.executionResolve(null), this.executionResolve = null);
954
956
  }
955
957
  return t;
956
958
  }
@@ -968,7 +970,7 @@ class xn extends Xe {
968
970
  if (!e) return !1;
969
971
  const t = this.commandFlowMap.get(e.name);
970
972
  if (!t) return !1;
971
- const n = t.rollbacklist.reduce((s, o) => o(s), e.data);
973
+ const n = t.rollbacklist.reduce((o, s) => s(o), e.data);
972
974
  return this.dispatchEvent({ type: "rollback", name: e.name }), this.rollbackList.push({
973
975
  data: n,
974
976
  name: e.name
@@ -986,7 +988,7 @@ class xn extends Xe {
986
988
  if (!e) return !1;
987
989
  const t = this.commandFlowMap.get(e.name);
988
990
  if (!t) return !1;
989
- const n = t.revokeRollbacklist.reduce((s, o) => o(s), e.data);
991
+ const n = t.revokeRollbacklist.reduce((o, s) => s(o), e.data);
990
992
  return this.dispatchEvent({ type: "revokeRollback", name: e.name }), this.operationList.push({ name: e.name, data: n }), !0;
991
993
  } catch (e) {
992
994
  throw new Error(`撤回回滚失败:${e}`);
@@ -1011,15 +1013,15 @@ const Cn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
1011
1013
  }, Symbol.toStringTag, { value: "Module" })), _n = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902601497'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='9801'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M761.344%20119.296H226.816c-18.944%200-39.424%2011.776-39.424%2030.72V921.6h614.4V148.48c0.512-18.944-22.016-29.184-40.448-29.184z%20m-537.6%20768c-2.048%200-2.048%200%200%200L221.696%20163.84c0-5.12%205.12-10.24%2010.24-10.24h522.24c8.704%200%2013.824%205.12%2013.824%2013.824v720.384s0%201.536-1.536%201.536h-15.36V194.56c0-16.896-8.704-24.064-29.184-24.064H266.24c-18.944%200-27.136%208.704-27.136%2024.064v692.736h-15.36z%20m49.152%200V204.8H716.8v682.496H272.896z'%20p-id='9802'%3e%3c/path%3e%3cpath%20d='M648.704%20508.416c-16.896%200-32.256%2013.824-32.256%2032.256%200%2016.896%2013.824%2032.256%2032.256%2032.256s32.256-13.824%2032.256-32.256c0-16.896-13.824-32.256-32.256-32.256z'%20p-id='9803'%3e%3c/path%3e%3c/svg%3e", Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1012
1014
  __proto__: null,
1013
1015
  default: _n
1014
- }, Symbol.toStringTag, { value: "Module" })), Nn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M491.80027198%20557.44938977c-10.0998647-15.14979706-20.19972802-25.24966037-35.34952507-35.34952507-15.14979706-10.0998647-30.29959271-15.14979706-50.49932211-15.14979704-55.54925309%200-100.99864286%2045.44938977-100.99864287%20100.99864285%200%2015.14979706%205.04993234%2035.34952507%2015.14979568%2050.49932212%2010.0998647%2015.14979706%2020.19972802%2030.29959271%2035.34952506%2035.34952508%2015.14979706%2010.0998647%2035.34952507%2015.14979706%2050.49932213%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864287%200-15.14979706-5.04993234-35.34952507-15.14979568-50.49932074z%20m-85.84884718%20100.99864286h-15.14979706c-20.19972802-5.04993234-30.29959271-20.19972802-35.34952507-35.34952507V612.99864286c0-30.29959271%2025.24966037-50.49932212%2050.49932213-50.49932074h10.09986469c15.14979706%205.04993234%2030.29959271%2015.14979706%2035.34952507%2035.34952507v15.14979567c5.04993234%2025.24966037-20.19972802%2045.44938977-45.44938976%2045.44938977z'%3e%3c/path%3e%3cpath%20d='M390.80162774%20658.44803263l-40.39945604%2040.39945743-227.24694747%20222.19701373-35.34952506-35.34952508%20227.24694745-227.24694608%2040.39945605-40.39945743c5.04993234%2020.19972802%2020.19972802%2035.34952507%2035.34952507%2040.39945743zM648.34816793%20405.9514248l-40.39945742%2040.3994574-116.14843853%20116.14843992-40.39945742%2035.34952507c-5.04993234-20.19972802-20.19972802-30.29959271-35.34952507-35.34952507l40.39945742-40.39945742%20116.14843853-111.09850756%2035.34952507-35.34952507c10.0998647%2015.14979706%2020.19972802%2025.24966037%2040.39945742%2030.29959273zM926.09443614%20133.25508894L749.34681078%20310.00271428l-40.3994574%2040.39945742c-5.04993234-20.19972802-15.14979706-35.34952507-30.29959272-40.39945742l35.34952506-40.39945742%20176.74762534-176.74762535%2035.34952508%2040.39945743z'%20%3e%3c/path%3e%3cpath%20d='M749.34681078%20310.00271428c-10.0998647-15.14979706-20.19972802-30.29959271-35.34952506-35.34952506-15.14979706-10.0998647-35.34952507-15.14979706-55.54925309-15.14979706-55.54925309%200-100.99864286%2045.44938977-100.99864286%20100.99864286%200%2020.19972802%205.04993234%2040.39945743%2015.14979567%2055.54925447%2010.0998647%2015.14979706%2020.19972802%2025.24966037%2035.34952507%2035.34952507%2015.14979706%2010.0998647%2030.29959271%2015.14979706%2050.49932212%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864286%200-25.24966037-5.04993234-40.39945743-10.09986471-55.54925309z%20m-90.89877815%2095.94871052h-10.0998647c-20.19972802-5.04993234-35.34952507-15.14979706-40.39945742-35.34952509%200-5.04993234-5.04993234-10.0998647-5.04993234-15.14979704%200-30.29959271%2025.24966037-50.49932212%2050.49932212-50.49932074%205.04993234%200%2010.0998647%200%2015.14979704%205.04993235%2015.14979706%205.04993234%2030.29959271%2020.19972802%2030.29959273%2040.39945742v10.09986332c10.0998647%2025.24966037-15.14979706%2045.44938977-40.39945743%2045.44938978z'%20%3e%3c/path%3e%3c/svg%3e", On = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1016
+ }, Symbol.toStringTag, { value: "Module" })), Nn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M491.80027198%20557.44938977c-10.0998647-15.14979706-20.19972802-25.24966037-35.34952507-35.34952507-15.14979706-10.0998647-30.29959271-15.14979706-50.49932211-15.14979704-55.54925309%200-100.99864286%2045.44938977-100.99864287%20100.99864285%200%2015.14979706%205.04993234%2035.34952507%2015.14979568%2050.49932212%2010.0998647%2015.14979706%2020.19972802%2030.29959271%2035.34952506%2035.34952508%2015.14979706%2010.0998647%2035.34952507%2015.14979706%2050.49932213%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864287%200-15.14979706-5.04993234-35.34952507-15.14979568-50.49932074z%20m-85.84884718%20100.99864286h-15.14979706c-20.19972802-5.04993234-30.29959271-20.19972802-35.34952507-35.34952507V612.99864286c0-30.29959271%2025.24966037-50.49932212%2050.49932213-50.49932074h10.09986469c15.14979706%205.04993234%2030.29959271%2015.14979706%2035.34952507%2035.34952507v15.14979567c5.04993234%2025.24966037-20.19972802%2045.44938977-45.44938976%2045.44938977z'%3e%3c/path%3e%3cpath%20d='M390.80162774%20658.44803263l-40.39945604%2040.39945743-227.24694747%20222.19701373-35.34952506-35.34952508%20227.24694745-227.24694608%2040.39945605-40.39945743c5.04993234%2020.19972802%2020.19972802%2035.34952507%2035.34952507%2040.39945743zM648.34816793%20405.9514248l-40.39945742%2040.3994574-116.14843853%20116.14843992-40.39945742%2035.34952507c-5.04993234-20.19972802-20.19972802-30.29959271-35.34952507-35.34952507l40.39945742-40.39945742%20116.14843853-111.09850756%2035.34952507-35.34952507c10.0998647%2015.14979706%2020.19972802%2025.24966037%2040.39945742%2030.29959273zM926.09443614%20133.25508894L749.34681078%20310.00271428l-40.3994574%2040.39945742c-5.04993234-20.19972802-15.14979706-35.34952507-30.29959272-40.39945742l35.34952506-40.39945742%20176.74762534-176.74762535%2035.34952508%2040.39945743z'%20%3e%3c/path%3e%3cpath%20d='M749.34681078%20310.00271428c-10.0998647-15.14979706-20.19972802-30.29959271-35.34952506-35.34952506-15.14979706-10.0998647-35.34952507-15.14979706-55.54925309-15.14979706-55.54925309%200-100.99864286%2045.44938977-100.99864286%20100.99864286%200%2020.19972802%205.04993234%2040.39945743%2015.14979567%2055.54925447%2010.0998647%2015.14979706%2020.19972802%2025.24966037%2035.34952507%2035.34952507%2015.14979706%2010.0998647%2030.29959271%2015.14979706%2050.49932212%2015.14979567%2055.54925309%200%20100.99864286-45.44938977%20100.99864286-100.99864286%200-25.24966037-5.04993234-40.39945743-10.09986471-55.54925309z%20m-90.89877815%2095.94871052h-10.0998647c-20.19972802-5.04993234-35.34952507-15.14979706-40.39945742-35.34952509%200-5.04993234-5.04993234-10.0998647-5.04993234-15.14979704%200-30.29959271%2025.24966037-50.49932212%2050.49932212-50.49932074%205.04993234%200%2010.0998647%200%2015.14979704%205.04993235%2015.14979706%205.04993234%2030.29959271%2020.19972802%2030.29959273%2040.39945742v10.09986332c10.0998647%2025.24966037-15.14979706%2045.44938977-40.39945743%2045.44938978z'%20%3e%3c/path%3e%3c/svg%3e", Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1015
1017
  __proto__: null,
1016
1018
  default: Nn
1017
- }, Symbol.toStringTag, { value: "Module" })), Rn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902422799'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1735'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M843.2%20726.4c-20.2%200-39.2%205.2-55.8%2014.3L283.8%20237.2c9-16.5%2014.1-35.4%2014.1-55.5%200-64.2-52.3-116.5-116.5-116.5S65%20117.4%2065%20181.6s52.3%20116.5%20116.5%20116.5c20.2%200%2039.2-5.2%2055.8-14.2l503.5%20503.5c-9%2016.5-14.1%2035.4-14.1%2055.5%200%2064.2%2052.3%20116.5%20116.5%20116.5s116.5-52.3%20116.5-116.5-52.3-116.5-116.5-116.5zM181.4%20232.1c-27.8%200-50.5-22.6-50.5-50.5s22.6-50.5%2050.5-50.5%2050.5%2022.6%2050.5%2050.5-22.6%2050.5-50.5%2050.5z%20m661.8%20661.3c-27.8%200-50.5-22.6-50.5-50.5%200-27.8%2022.6-50.5%2050.5-50.5s50.5%2022.6%2050.5%2050.5c0%2027.8-22.7%2050.5-50.5%2050.5z'%20fill='%23231815'%20p-id='1736'%3e%3c/path%3e%3c/svg%3e", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1019
+ }, Symbol.toStringTag, { value: "Module" })), On = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902422799'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1735'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M843.2%20726.4c-20.2%200-39.2%205.2-55.8%2014.3L283.8%20237.2c9-16.5%2014.1-35.4%2014.1-55.5%200-64.2-52.3-116.5-116.5-116.5S65%20117.4%2065%20181.6s52.3%20116.5%20116.5%20116.5c20.2%200%2039.2-5.2%2055.8-14.2l503.5%20503.5c-9%2016.5-14.1%2035.4-14.1%2055.5%200%2064.2%2052.3%20116.5%20116.5%20116.5s116.5-52.3%20116.5-116.5-52.3-116.5-116.5-116.5zM181.4%20232.1c-27.8%200-50.5-22.6-50.5-50.5s22.6-50.5%2050.5-50.5%2050.5%2022.6%2050.5%2050.5-22.6%2050.5-50.5%2050.5z%20m661.8%20661.3c-27.8%200-50.5-22.6-50.5-50.5%200-27.8%2022.6-50.5%2050.5-50.5s50.5%2022.6%2050.5%2050.5c0%2027.8-22.7%2050.5-50.5%2050.5z'%20fill='%23231815'%20p-id='1736'%3e%3c/path%3e%3c/svg%3e", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1018
1020
  __proto__: null,
1019
- default: Rn
1020
- }, Symbol.toStringTag, { value: "Module" })), Kn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M114.176%2046.528h618.496c37.312%200.064%2067.584%2030.336%2067.648%2067.648v618.56c0%2037.248-30.336%2067.584-67.648%2067.584H114.176A67.776%2067.776%200%200%201%2046.528%20732.8V114.176c0-37.312%2030.336-67.648%2067.648-67.648z%20m2.176%20686.208l616.32-2.24-2.176-616.32-614.144%202.176v616.32zM907.648%20291.2l2.176%20616.32H291.264a34.88%2034.88%200%201%200%200%2069.888h618.56c37.312%200%2067.648-30.336%2067.648-67.648V291.264a34.88%2034.88%200%201%200-69.824%200z'%20%3e%3c/path%3e%3c/svg%3e", zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1021
+ default: On
1022
+ }, Symbol.toStringTag, { value: "Module" })), zn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M114.176%2046.528h618.496c37.312%200.064%2067.584%2030.336%2067.648%2067.648v618.56c0%2037.248-30.336%2067.584-67.648%2067.584H114.176A67.776%2067.776%200%200%201%2046.528%20732.8V114.176c0-37.312%2030.336-67.648%2067.648-67.648z%20m2.176%20686.208l616.32-2.24-2.176-616.32-614.144%202.176v616.32zM907.648%20291.2l2.176%20616.32H291.264a34.88%2034.88%200%201%200%200%2069.888h618.56c37.312%200%2067.648-30.336%2067.648-67.648V291.264a34.88%2034.88%200%201%200-69.824%200z'%20%3e%3c/path%3e%3c/svg%3e", Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1021
1023
  __proto__: null,
1022
- default: Kn
1024
+ default: zn
1023
1025
  }, Symbol.toStringTag, { value: "Module" })), Tn = "data:image/svg+xml,%3csvg%20viewBox='0%200%201029%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23555'%20width='16'%20height='16'%3e%3cpath%20d='M788.17984%2016l-55.424%2060.672%20116.48%20106.56H418.13184a410.816%20410.816%200%201%200%200%20821.632h547.712v-82.176H418.13184a328.64%20328.64%200%200%201%200-657.28l441.792-0.128-124.8%2098.368%2050.752%2064.512%20243.328-191.488L788.17984%2016z'%3e%3c/path%3e%3c/svg%3e", jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1024
1026
  __proto__: null,
1025
1027
  default: Tn
@@ -1041,14 +1043,14 @@ const Cn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
1041
1043
  }, Symbol.toStringTag, { value: "Module" })), Xn = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1757902547951'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5129'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M59.355%2091.776v867.881h867.881V91.776H59.356zM897.31%20929.73H89.282V121.703h808.027V929.73z'%20fill=''%20p-id='5130'%3e%3c/path%3e%3cpath%20d='M833.964%20185.048H152.627v681.337h681.337V185.048z%20m-355.632%20651.41H182.554V532.2h295.778v304.257z%20m0-334.184H182.554V214.975h295.778v287.299z%20m325.705%20334.184H508.259V532.2h295.778v304.257z%20m0-334.184H508.259V214.975h295.778v287.299z'%20fill=''%20p-id='5131'%3e%3c/path%3e%3c/svg%3e", $n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1042
1044
  __proto__: null,
1043
1045
  default: Xn
1044
- }, Symbol.toStringTag, { value: "Module" })), es = "data:image/png;base64,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", ts = new m.TextureLoader(), ns = ts.load(es);
1045
- class ss extends Ae {
1046
+ }, Symbol.toStringTag, { value: "Module" })), eo = "data:image/png;base64,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", to = new m.TextureLoader(), no = to.load(eo);
1047
+ class oo extends Se {
1046
1048
  static name = "RenderManager";
1047
1049
  container = new m.Group();
1048
1050
  lines = [];
1049
- pointVirtualGrid = new Ke();
1050
- quadtree = new ze(new Ye());
1051
- verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map: ns, color: 58111, transparent: !0 }));
1051
+ pointVirtualGrid = new Pe();
1052
+ quadtree = new ze(new Ze());
1053
+ verticalReferenceLineFlag = new m.Mesh(new m.PlaneGeometry(0.3, 0.3), new m.MeshBasicMaterial({ map: no, color: 58111, transparent: !0 }));
1052
1054
  onAddFromParent() {
1053
1055
  const e = this.dxfLineModel;
1054
1056
  this.editor.container.add(this.container), this.editor.container.add(e.dxfModelGroup), e.dxfLineModel.material = new m.LineBasicMaterial({
@@ -1068,7 +1070,7 @@ class ss extends Ae {
1068
1070
  return;
1069
1071
  } else
1070
1072
  this.updatedMode = "dxf";
1071
- this.pointVirtualGrid = new Ke();
1073
+ this.pointVirtualGrid = new Pe();
1072
1074
  const e = this.dxf.box.clone().expansion(Math.max(this.dxf.box.width, this.dxf.box.height) * 2);
1073
1075
  (e.width === 0 || e.height === 0) && e.set(-200, -200, 200, 200), this.quadtree = new ze(e), this.lines.length = 0, this.dxf.lineSegments.forEach((t) => {
1074
1076
  t.userData.isDoor || this.addLine(t.clone());
@@ -1099,11 +1101,11 @@ class ss extends Ae {
1099
1101
  for (let t = 0; t < e.length; t++) {
1100
1102
  const n = e[t];
1101
1103
  this.lines.push(n), this.pointVirtualGrid.insert(n.start, n), this.pointVirtualGrid.insert(n.end, n);
1102
- const s = {
1104
+ const o = {
1103
1105
  line: n,
1104
1106
  userData: void 0
1105
1107
  };
1106
- n.userData.quadtreeNode = s, this.quadtree.insert(s);
1108
+ n.userData.quadtreeNode = o, this.quadtree.insert(o);
1107
1109
  }
1108
1110
  }
1109
1111
  /** 移除线段
@@ -1122,8 +1124,8 @@ class ss extends Ae {
1122
1124
  for (let t = 0; t < e.length; t++) {
1123
1125
  const n = e[t];
1124
1126
  n.userData.quadtreeNode && this.quadtree.remove(n.userData.quadtreeNode), this.pointVirtualGrid.remove(n.start), this.pointVirtualGrid.remove(n.end);
1125
- const s = this.lines.indexOf(n);
1126
- this.lines.splice(s, 1);
1127
+ const o = this.lines.indexOf(n);
1128
+ this.lines.splice(o, 1);
1127
1129
  }
1128
1130
  this.draw();
1129
1131
  }
@@ -1132,15 +1134,15 @@ class ss extends Ae {
1132
1134
  */
1133
1135
  draw(e = !0) {
1134
1136
  this.container.clear();
1135
- const t = [], n = [], s = [];
1136
- this.lines.forEach((o) => {
1137
- if (o.points.forEach((a) => {
1138
- o.userData.isDoor ? n.push(a.x, a.y, 0) : t.push(a.x, a.y, 0);
1139
- }), o.userData.isWindow && o.userData.drawWindow && o.userData.drawWindow.forEach(({ width: a, p: c }) => {
1140
- const d = _.from(c), i = o.direction(), r = d.clone().add(i.clone().multiplyScalar(a * 0.5)), h = d.clone().add(i.clone().multiplyScalar(-a * 0.5));
1141
- s.push(r.x, r.y, 1e-3), s.push(h.x, h.y, 1e-3);
1142
- }), o.userData.isVerticalReferenceLine) {
1143
- const a = o.center;
1137
+ const t = [], n = [], o = [];
1138
+ this.lines.forEach((s) => {
1139
+ if (s.points.forEach((a) => {
1140
+ s.userData.isDoor ? n.push(a.x, a.y, 0) : t.push(a.x, a.y, 0);
1141
+ }), s.userData.isWindow && s.userData.drawWindow && s.userData.drawWindow.forEach(({ width: a, p: d }) => {
1142
+ const l = A.from(d), i = s.direction(), r = l.clone().add(i.clone().multiplyScalar(a * 0.5)), h = l.clone().add(i.clone().multiplyScalar(-a * 0.5));
1143
+ o.push(r.x, r.y, 1e-3), o.push(h.x, h.y, 1e-3);
1144
+ }), s.userData.isVerticalReferenceLine) {
1145
+ const a = s.center;
1144
1146
  this.verticalReferenceLineFlag.position.set(a.x, a.y, 0), this.container.add(this.verticalReferenceLineFlag);
1145
1147
  }
1146
1148
  }), t.length && this.renderer.createLineSegments({
@@ -1151,9 +1153,9 @@ class ss extends Ae {
1151
1153
  position: n
1152
1154
  }, n.length / 3, {
1153
1155
  color: 16776960
1154
- }, this.container), s.length && this.renderer.createLineSegments({
1155
- position: s
1156
- }, s.length / 3, {
1156
+ }, this.container), o.length && this.renderer.createLineSegments({
1157
+ position: o
1158
+ }, o.length / 3, {
1157
1159
  color: 16711935
1158
1160
  }, this.container), e && this.synchronizeDxf();
1159
1161
  }
@@ -1162,25 +1164,25 @@ class ss extends Ae {
1162
1164
  * @returns
1163
1165
  */
1164
1166
  adsorption(e = 0.04, t = this.pointVirtualGrid, n = this.quadtree) {
1165
- const s = this.parent?.findComponentByName("Editor"), o = _.from(s.pointerPosition), a = t.queryCircle(o, e).sort((d, i) => d.point.distance(o) - i.point.distance(o));
1167
+ const o = this.parent?.findComponentByName("Editor"), s = A.from(o.pointerPosition), a = t.queryCircle(s, e).sort((l, i) => l.point.distance(s) - i.point.distance(s));
1166
1168
  if (a.length) return {
1167
1169
  point: new m.Vector3(a[0].point.x, a[0].point.y, 0),
1168
1170
  find: !0,
1169
1171
  mode: "point",
1170
1172
  line: a[0].userData
1171
1173
  };
1172
- let c = n.queryCircle(o, e);
1173
- if (c.length) {
1174
- let d = c.map((i) => i.line.projectPoint(o));
1175
- return d.sort((i, r) => i && r ? i.distance(o) - r.distance(o) : 0), c = c.filter((i, r) => !!d[r]), d = d.filter((i, r) => !!d[r]), {
1176
- point: new m.Vector3(d[0].x, d[0].y, 0),
1174
+ let d = n.queryCircle(s, e);
1175
+ if (d.length) {
1176
+ let l = d.map((i) => i.line.projectPoint(s));
1177
+ return l.sort((i, r) => i && r ? i.distance(s) - r.distance(s) : 0), d = d.filter((i, r) => !!l[r]), l = l.filter((i, r) => !!l[r]), {
1178
+ point: new m.Vector3(l[0].x, l[0].y, 0),
1177
1179
  find: !0,
1178
1180
  mode: "line",
1179
- line: c[0].line
1181
+ line: d[0].line
1180
1182
  };
1181
1183
  }
1182
1184
  return {
1183
- point: new m.Vector3(s.pointerPosition.x, s.pointerPosition.y, 0),
1185
+ point: new m.Vector3(o.pointerPosition.x, o.pointerPosition.y, 0),
1184
1186
  find: !1
1185
1187
  };
1186
1188
  }
@@ -1189,8 +1191,8 @@ class ss extends Ae {
1189
1191
  */
1190
1192
  createGeometry(e, t) {
1191
1193
  const n = new m.BufferGeometry();
1192
- return Object.keys(e).forEach((s) => {
1193
- n.setAttribute("position", new m.BufferAttribute(new Float32Array(e[s]), e[s].length / t));
1194
+ return Object.keys(e).forEach((o) => {
1195
+ n.setAttribute("position", new m.BufferAttribute(new Float32Array(e[o]), e[o].length / t));
1194
1196
  }), n;
1195
1197
  }
1196
1198
  /**
@@ -1198,21 +1200,21 @@ class ss extends Ae {
1198
1200
  */
1199
1201
  toJson() {
1200
1202
  return this.lines.map((e) => {
1201
- const t = e.userData, n = t.drawWindow, s = this.quadtree.queryLineSegment(e).filter((o) => o.line !== e && !o.userData?.isDoor).map((o) => ({ index: this.lines.indexOf(o.line) }));
1203
+ const t = e.userData, n = t.drawWindow, o = this.quadtree.queryLineSegment(e).filter((s) => s.line !== e && !s.userData?.isDoor).map((s) => ({ index: this.lines.indexOf(s.line) }));
1202
1204
  return {
1203
1205
  start: e.start.toJson(this.dxf.originalZAverage),
1204
1206
  end: e.end.toJson(this.dxf.originalZAverage),
1205
- insetionArr: s,
1207
+ insetionArr: o,
1206
1208
  isDoor: t.isDoor,
1207
1209
  doorDirectConnection: t.isDoor,
1208
1210
  length: e.length(),
1209
1211
  isWindow: t.isWindow,
1210
1212
  isVerticalReferenceLine: t.isVerticalReferenceLine,
1211
1213
  wallWidth: e.userData.wallWidth,
1212
- drawWindow: n && n.map((o) => ({
1213
- p: { x: o.p.x, y: o.p.y, z: o.p.z },
1214
- width: o.width,
1215
- full: o.full
1214
+ drawWindow: n && n.map((s) => ({
1215
+ p: { x: s.p.x, y: s.p.y, z: s.p.z },
1216
+ width: s.width,
1217
+ full: s.full
1216
1218
  }))
1217
1219
  };
1218
1220
  });
@@ -1253,7 +1255,7 @@ class ss extends Ae {
1253
1255
  return this.parent?.findComponentByName("DxfLineModel");
1254
1256
  }
1255
1257
  }
1256
- class os extends R {
1258
+ class so extends O {
1257
1259
  static name = "DrawDoorLine";
1258
1260
  container = new m.Group();
1259
1261
  interruptKeys = ["escape"];
@@ -1261,18 +1263,18 @@ class os extends R {
1261
1263
  commandName = "draw-door-line";
1262
1264
  onAddFromParent(e) {
1263
1265
  super.onAddFromParent(e);
1264
- const t = e.findComponentByName("Editor"), n = t.eventInput, s = t.commandManager;
1266
+ const t = e.findComponentByName("Editor"), n = t.eventInput, o = t.commandManager;
1265
1267
  this.editor.container.add(this.container);
1266
- const o = this.commandManager.addCommandFlow("draw-door-line").add(this.createInterrupt()).add(this.createCursor("no-drop")).add(this.selectPoint.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1267
- n.addKeyCombination(this.commandName, this.shortcutKeys), o.addEventListener("finally", this.createFinally()), o.addEventListener("completed", (a) => this.completed(a.data)), n.addCancelDefaultBehavior(() => n.isOnlyKeyDowns(this.shortcutKeys)), n.addEventListener("codeChange", async () => {
1268
- n.isKeyCombination(this.commandName) && await s.start(this.commandName);
1268
+ const s = this.commandManager.addCommandFlow("draw-door-line").add(this.createInterrupt()).add(this.createCursor("no-drop")).add(this.selectPoint.bind(this)).add(this.end.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1269
+ n.addKeyCombination(this.commandName, this.shortcutKeys), s.addEventListener("finally", this.createFinally()), s.addEventListener("completed", (a) => this.completed(a.data)), n.addCancelDefaultBehavior(() => n.isOnlyKeyDowns(this.shortcutKeys)), n.addEventListener("codeChange", async () => {
1270
+ n.isKeyCombination(this.commandName) && await o.start(this.commandName);
1269
1271
  });
1270
1272
  }
1271
1273
  /** 选择点
1272
1274
  * @param next
1273
1275
  */
1274
1276
  selectPoint(e) {
1275
- let t = this.parent?.findComponentByName("Editor"), n = null, s = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 65280 })), o = new ye([], 16711935), a = new ye([
1277
+ let t = this.parent?.findComponentByName("Editor"), n = null, o = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 65280 })), s = new we([], 16711935), a = new we([
1276
1278
  new m.Vector3(-1e4, 0, 0),
1277
1279
  new m.Vector3(1e4, 0, 0),
1278
1280
  new m.Vector3(0, -1e4, 0),
@@ -1283,25 +1285,25 @@ class os extends R {
1283
1285
  dashSize: 0.1,
1284
1286
  gapSize: 0.1,
1285
1287
  linewidth: 0.1
1286
- }), this.container.add(o);
1287
- let c = null;
1288
+ }), this.container.add(s);
1289
+ let d = null;
1288
1290
  this.addEventRecord(
1289
1291
  "clear",
1290
1292
  t.addEventListener("pointerPositionChange", () => {
1291
- const { point: d, find: i } = t.renderManager.adsorption();
1292
- n && o.setPoint(n, d), this.dispatchEvent({ type: "pointerMove", point: d }), i ? (s.position.set(d.x, d.y, 0), this.container.add(s), this.domElement.style.cursor = "none", c = d.clone()) : (c = null, s.removeFromParent(), this.domElement.style.cursor = "no-drop");
1293
+ const { point: l, find: i } = t.renderManager.adsorption();
1294
+ n && s.setPoint(n, l), this.dispatchEvent({ type: "pointerMove", point: l }), i ? (o.position.set(l.x, l.y, 0), this.container.add(o), this.domElement.style.cursor = "none", d = l.clone()) : (d = null, o.removeFromParent(), this.domElement.style.cursor = "no-drop");
1293
1295
  }),
1294
1296
  t.eventInput.addEventListener("codeChange", async () => {
1295
- if (t.eventInput.isKeyDown("mouse_0") && c) {
1297
+ if (t.eventInput.isKeyDown("mouse_0") && d) {
1296
1298
  if (!n) {
1297
- n = c.clone();
1299
+ n = d.clone();
1298
1300
  return;
1299
1301
  }
1300
- e([n.clone(), c.clone()]);
1302
+ e([n.clone(), d.clone()]);
1301
1303
  }
1302
1304
  }),
1303
1305
  function() {
1304
- o.removeFromParent(), s.removeFromParent(), a.removeFromParent();
1306
+ s.removeFromParent(), o.removeFromParent(), a.removeFromParent();
1305
1307
  }
1306
1308
  );
1307
1309
  }
@@ -1312,21 +1314,21 @@ class os extends R {
1312
1314
  */
1313
1315
  end(e, t) {
1314
1316
  const n = [];
1315
- for (let s = 0; s < t.length; s += 2) {
1316
- const o = _.from(t[s]), a = _.from(t[s + 1]), c = this.renderManager.quadtree.queryCircle(o, 1e-3)[0].line, d = this.renderManager.quadtree.queryCircle(a, 1e-3)[0].line;
1317
+ for (let o = 0; o < t.length; o += 2) {
1318
+ const s = A.from(t[o]), a = A.from(t[o + 1]), d = this.renderManager.quadtree.queryCircle(s, 1e-3)[0].line, l = this.renderManager.quadtree.queryCircle(a, 1e-3)[0].line;
1317
1319
  let i = null;
1318
- c === d && (i = {
1319
- oldLine: c,
1320
+ d === l && (i = {
1321
+ oldLine: d,
1320
1322
  newLine1: new B(
1321
- c.start,
1322
- c.start.distance(o) < c.start.distance(a) ? o.clone() : a.clone()
1323
+ d.start,
1324
+ d.start.distance(s) < d.start.distance(a) ? s.clone() : a.clone()
1323
1325
  ),
1324
1326
  newLine2: new B(
1325
- c.end,
1326
- c.end.distance(o) < c.end.distance(a) ? o.clone() : a.clone()
1327
+ d.end,
1328
+ d.end.distance(s) < d.end.distance(a) ? s.clone() : a.clone()
1327
1329
  )
1328
1330
  });
1329
- const r = new B(o, a);
1331
+ const r = new B(s, a);
1330
1332
  r.userData.isDoor = !0, r.userData.doorDirectConnection = !0, n.push({
1331
1333
  line: r,
1332
1334
  option: i
@@ -1357,7 +1359,7 @@ class os extends R {
1357
1359
  return this.completed(e), e;
1358
1360
  }
1359
1361
  }
1360
- class as extends R {
1362
+ class ao extends O {
1361
1363
  static name = "DrawWindow";
1362
1364
  container = new m.Group();
1363
1365
  interruptKeys = ["escape"];
@@ -1372,24 +1374,24 @@ class as extends R {
1372
1374
  * @param next
1373
1375
  */
1374
1376
  selectPointStart(e) {
1375
- let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), s = null;
1377
+ let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), o = null;
1376
1378
  this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
1377
- const { point: o, line: a, find: c } = this.editor.renderManager.adsorption();
1378
- this.dispatchEvent({ type: "pointerMove", point: o }), c ? (this.domElement.style.cursor = "none", n.position.copy(o), s = a, t = o.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
1379
+ const { point: s, line: a, find: d } = this.editor.renderManager.adsorption();
1380
+ this.dispatchEvent({ type: "pointerMove", point: s }), d ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
1379
1381
  })).add(this.eventInput.addEventListener("codeChange", () => {
1380
- this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: s }));
1382
+ this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: o }));
1381
1383
  })), this.addEventRecord("clear").add(() => n.removeFromParent());
1382
1384
  }
1383
1385
  /** 选择结束点
1384
1386
  * @param next
1385
1387
  */
1386
1388
  selectPointEnd(e, { point: t, line: n }) {
1387
- let s = null, o = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 }));
1388
- this.addEventRecord("clear").add(() => o.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
1389
- const { point: a, find: c, line: d } = this.editor.renderManager.adsorption();
1390
- this.dispatchEvent({ type: "pointerMove", point: a }), c && d === n ? (this.domElement.style.cursor = "none", o.position.copy(a), s = a.clone(), this.container.add(o)) : (this.domElement.style.cursor = "no-drop", s = null, o.removeFromParent());
1389
+ let o = null, s = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 }));
1390
+ this.addEventRecord("clear").add(() => s.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
1391
+ const { point: a, find: d, line: l } = this.editor.renderManager.adsorption();
1392
+ this.dispatchEvent({ type: "pointerMove", point: a }), d && l === n ? (this.domElement.style.cursor = "none", s.position.copy(a), o = a.clone(), this.container.add(s)) : (this.domElement.style.cursor = "no-drop", o = null, s.removeFromParent());
1391
1393
  })).add(this.eventInput.addEventListener("codeChange", () => {
1392
- this.eventInput.isKeyDown("mouse_0") && s && e({ line: n, start: t, end: s });
1394
+ this.eventInput.isKeyDown("mouse_0") && o && e({ line: n, start: t, end: o });
1393
1395
  }));
1394
1396
  }
1395
1397
  /**
@@ -1397,13 +1399,13 @@ class as extends R {
1397
1399
  * @param next
1398
1400
  * @param points
1399
1401
  */
1400
- end(e, { start: t, end: n, line: s }) {
1401
- const o = new B(_.from(t), _.from(n)), a = o.center, c = o.length(), d = {
1402
+ end(e, { start: t, end: n, line: o }) {
1403
+ const s = new B(A.from(t), A.from(n)), a = s.center, d = s.length(), l = {
1402
1404
  p: new m.Vector3(a.x, a.y, 0),
1403
- width: c,
1404
- full: Math.abs(c - s.length()) < 0.01
1405
+ width: d,
1406
+ full: Math.abs(d - o.length()) < 0.01
1405
1407
  };
1406
- e({ line: s, doorDataItem: d });
1408
+ e({ line: o, doorDataItem: l });
1407
1409
  }
1408
1410
  /** 执行完成
1409
1411
  */
@@ -1416,8 +1418,8 @@ class as extends R {
1416
1418
  rollback(e) {
1417
1419
  const { doorDataItem: t, line: n } = e;
1418
1420
  if (n.userData.drawWindow) {
1419
- const s = n.userData.drawWindow.indexOf(t);
1420
- s !== -1 && (n.userData.drawWindow.splice(s, 1), n.userData.drawWindow.length === 0 && (delete n.userData.drawWindow, delete n.userData.isWindow), this.renderManager.draw());
1421
+ const o = n.userData.drawWindow.indexOf(t);
1422
+ o !== -1 && (n.userData.drawWindow.splice(o, 1), n.userData.drawWindow.length === 0 && (delete n.userData.drawWindow, delete n.userData.isWindow), this.renderManager.draw());
1421
1423
  }
1422
1424
  return e;
1423
1425
  }
@@ -1429,23 +1431,19 @@ class as extends R {
1429
1431
  return this.completed(e), e;
1430
1432
  }
1431
1433
  }
1432
- class $ extends R {
1434
+ class le extends O {
1433
1435
  static name = "VerticalCorrection";
1434
1436
  container = new m.Group();
1435
1437
  shortcutKeys = ["control", "c"];
1436
- shortcutKeys2 = ["control", "shift", "c"];
1437
1438
  shortcutKeys3 = ["shift", "c"];
1438
1439
  static commandName = "verticalCorrection";
1439
- recursion = !1;
1440
1440
  axisAlignment = !1;
1441
1441
  onAddFromParent(e) {
1442
1442
  super.onAddFromParent(e), this.editor.container.add(this.container), this.container.position.z = 1e-3;
1443
- const t = this.commandManager.addCommandFlow($.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalCorrection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1444
- t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), t.addEventListener("started", () => {
1445
- !this.eventInput.isOnlyKeyDowns(this.shortcutKeys) && !this.eventInput.isOnlyKeyDowns(this.shortcutKeys2) && (this.recursion = !1);
1446
- }), this.eventInput.addEventListener("codeChange", async () => {
1447
- this.eventInput.isOnlyKeyDowns(this.shortcutKeys) ? (this.recursion = !1, this.axisAlignment = !1, this.commandManager.start($.commandName, [...this.default.selectLines])) : this.eventInput.isOnlyKeyDowns(this.shortcutKeys2) ? (this.recursion = !0, this.axisAlignment = !1, this.commandManager.start($.commandName, [...this.default.selectLines])) : this.eventInput.isOnlyKeyDowns(this.shortcutKeys3) && (this.axisAlignment = !0, this.commandManager.start($.commandName, [...this.default.selectLines]));
1448
- }), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys) || this.eventInput.isOnlyKeyDowns(this.shortcutKeys2));
1443
+ const t = this.commandManager.addCommandFlow(le.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalCorrection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1444
+ t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addEventListener("codeChange", async () => {
1445
+ this.eventInput.isOnlyKeyDowns(this.shortcutKeys) ? (this.axisAlignment = !1, this.commandManager.start(le.commandName, [...this.default.selectLines])) : this.eventInput.isOnlyKeyDowns(this.shortcutKeys3) && (this.axisAlignment = !0, this.commandManager.start(le.commandName, [...this.default.selectLines]));
1446
+ }), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
1449
1447
  }
1450
1448
  /**
1451
1449
  * 进入命令约束
@@ -1469,46 +1467,46 @@ class $ extends R {
1469
1467
  * @param id
1470
1468
  * @returns
1471
1469
  */
1472
- setLinePoint(e, t, n, s = "all", o = [], a = Dt()) {
1470
+ setLinePoint(e, t, n, o = "all", s = [], a = Dt()) {
1473
1471
  if (e.userData.setLinePointUUid === a) return [];
1474
1472
  e.userData.setLinePointUUid = a;
1475
- let c = [], d = [];
1476
- (s === "start" || s === "all") && (c = this.renderManager.pointVirtualGrid.queryPoint(e.start).filter((y) => y.userData !== e)), (s === "end" || s === "all") && (d = this.renderManager.pointVirtualGrid.queryPoint(e.end).filter((y) => y.userData !== e));
1473
+ let d = [], l = [];
1474
+ (o === "start" || o === "all") && (d = this.renderManager.pointVirtualGrid.queryPoint(e.start).filter((v) => v.userData !== e)), (o === "end" || o === "all") && (l = this.renderManager.pointVirtualGrid.queryPoint(e.end).filter((v) => v.userData !== e));
1477
1475
  const i = e.clone();
1478
1476
  let r = "";
1479
- t && (e.start.equal(t) || (r = "start"), o.push({
1477
+ t && (e.start.equal(t) || (r = "start"), s.push({
1480
1478
  point: e.start,
1481
1479
  oldPoint: e.start.clone(),
1482
1480
  newPoint: t,
1483
1481
  line: e
1484
- }), e.start.copy(t)), n && (e.end.equal(n) || (r = r === "start" ? "all" : "end"), o.push({
1482
+ }), e.start.copy(t)), n && (e.end.equal(n) || (r = r === "start" ? "all" : "end"), s.push({
1485
1483
  point: e.end,
1486
1484
  oldPoint: e.end.clone(),
1487
1485
  newPoint: n,
1488
1486
  line: e
1489
1487
  }), e.end.copy(n));
1490
- const h = (y, p, v) => {
1491
- y.forEach((g) => {
1492
- const { point: E, userData: x } = g, k = x.start === E ? "start" : "end";
1488
+ const h = (v, f, p) => {
1489
+ v.forEach((u) => {
1490
+ const { point: E, userData: x } = u, k = x.start === E ? "start" : "end";
1493
1491
  if (x.directionEqual(i))
1494
1492
  if (k === "start") {
1495
- const z = e.projectPoint(x.end, !1);
1496
- if (z) return this.setLinePoint(x, p, z, "end", o, a);
1493
+ const K = e.projectPoint(x.end, !1);
1494
+ if (K) return this.setLinePoint(x, f, K, "end", s, a);
1497
1495
  } else {
1498
- const z = e.projectPoint(x.start, !1);
1499
- if (z) return this.setLinePoint(x, z, p, "start", o, a);
1496
+ const K = e.projectPoint(x.start, !1);
1497
+ if (K) return this.setLinePoint(x, K, f, "start", s, a);
1500
1498
  }
1501
- (r === "all" || v === r) && this.setLinePoint(
1499
+ (r === "all" || p === r) && this.setLinePoint(
1502
1500
  x,
1503
- x.start === E ? p : x.start,
1504
- x.end === E ? p : x.end,
1501
+ x.start === E ? f : x.start,
1502
+ x.end === E ? f : x.end,
1505
1503
  x.start === E ? "end" : "start",
1506
- o,
1504
+ s,
1507
1505
  a
1508
1506
  );
1509
1507
  });
1510
1508
  };
1511
- return h(c, e.start, "start"), h(d, e.end, "end"), [...c, ...d];
1509
+ return h(d, e.start, "start"), h(l, e.end, "end"), [...d, ...l];
1512
1510
  }
1513
1511
  /** 修正2
1514
1512
  * 第一步:确定需要修复的线段
@@ -1522,76 +1520,76 @@ class $ extends R {
1522
1520
  */
1523
1521
  correction(e, t = [], n = /* @__PURE__ */ new Set()) {
1524
1522
  n.add(e);
1525
- const s = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: i }) => !(i === e || i.userData.isDoor || n.has(i))).map((i) => i.line), o = e.direction(), [a, c] = s.reduce((i, r) => {
1526
- const [h, y] = i;
1527
- return r.sameEndpoint(e) ? h.push(r) : y.push(r), i;
1523
+ const o = this.renderManager.quadtree.queryLineSegment(e).filter(({ line: i }) => !(i === e || i.userData.isDoor || n.has(i))).map((i) => i.line), s = e.direction(), [a, d] = o.reduce((i, r) => {
1524
+ const [h, v] = i;
1525
+ return r.sameEndpoint(e) ? h.push(r) : v.push(r), i;
1528
1526
  }, [[], []]);
1529
1527
  a.forEach((i) => {
1530
- const r = i.direction(), h = o.angleBetween(r, "angle");
1528
+ const r = i.direction(), h = s.angleBetween(r, "angle");
1531
1529
  if (Math.abs(90 - h) > 45) return !1;
1532
- const p = e.sameEndpointAsStart(i) ? e.start : e.end, v = i.sameEndpointAsStart(e) ? i.end : i.start, g = new B(
1533
- v.clone().add(o.clone().multiplyScalar(1)),
1534
- v.clone().add(o.clone().multiplyScalar(-1))
1535
- ), E = g.projectPoint(p, !1);
1530
+ const f = e.sameEndpointAsStart(i) ? e.start : e.end, p = i.sameEndpointAsStart(e) ? i.end : i.start, u = new B(
1531
+ p.clone().add(s.clone().multiplyScalar(1)),
1532
+ p.clone().add(s.clone().multiplyScalar(-1))
1533
+ ), E = u.projectPoint(f, !1);
1536
1534
  if (E) {
1537
1535
  const x = [];
1538
1536
  this.setLinePoint(
1539
1537
  i,
1540
- i.start === v ? E : i.start,
1541
- i.end === v ? E : i.end,
1542
- i.start === v ? "start" : "end",
1538
+ i.start === p ? E : i.start,
1539
+ i.end === p ? E : i.end,
1540
+ i.start === p ? "start" : "end",
1543
1541
  x
1544
1542
  ), t.push(x);
1545
1543
  }
1546
1544
  return n.add(i), !1;
1547
- }), o.copy(e.direction());
1548
- const d = (i, r, h) => {
1549
- const y = e.projectPoint(r);
1550
- if (y) i.copy(y);
1545
+ }), s.copy(e.direction());
1546
+ const l = (i, r, h) => {
1547
+ const v = e.projectPoint(r);
1548
+ if (v) i.copy(v);
1551
1549
  else {
1552
- const p = new B(
1553
- r.clone().add(o.clone().multiplyScalar(1)),
1554
- r.clone().add(o.clone().multiplyScalar(-1))
1555
- ), v = p.projectPoint(i, !1);
1556
- if (v) {
1557
- const g = [];
1550
+ const f = new B(
1551
+ r.clone().add(s.clone().multiplyScalar(1)),
1552
+ r.clone().add(s.clone().multiplyScalar(-1))
1553
+ ), p = f.projectPoint(i, !1);
1554
+ if (p) {
1555
+ const u = [];
1558
1556
  this.setLinePoint(
1559
1557
  h,
1560
- h.start === r ? v : h.start,
1561
- h.end === r ? v : h.end,
1558
+ h.start === r ? p : h.start,
1559
+ h.end === r ? p : h.end,
1562
1560
  h.start === r ? "start" : "end",
1563
- g
1564
- ), t.push(g);
1561
+ u
1562
+ ), t.push(u);
1565
1563
  }
1566
1564
  }
1567
1565
  };
1568
- return c.forEach((i) => {
1566
+ return d.forEach((i) => {
1569
1567
  if (e.containsPoint(i.start))
1570
- d(i.start, i.end, i);
1568
+ l(i.start, i.end, i);
1571
1569
  else if (e.containsPoint(i.end))
1572
- d(i.end, i.start, i);
1570
+ l(i.end, i.start, i);
1573
1571
  else {
1574
1572
  const r = e.getIntersection(i);
1575
1573
  if (r) {
1576
1574
  const h = new B(
1577
- i.start.clone().add(o.clone().multiplyScalar(1)),
1578
- i.start.clone().add(o.clone().multiplyScalar(-1))
1579
- ), y = h.projectPoint(r, !1);
1580
- if (y) {
1581
- const g = [];
1582
- this.setLinePoint(i, y, i.end, "start", g), t.push(g);
1583
- }
1584
- const p = new B(
1585
- i.end.clone().add(o.clone().multiplyScalar(1)),
1586
- i.end.clone().add(o.clone().multiplyScalar(-1))
1587
- ), v = p.projectPoint(r, !1);
1575
+ i.start.clone().add(s.clone().multiplyScalar(1)),
1576
+ i.start.clone().add(s.clone().multiplyScalar(-1))
1577
+ ), v = h.projectPoint(r, !1);
1588
1578
  if (v) {
1589
- const g = [];
1590
- this.setLinePoint(i, i.start, v, "end", g), t.push(g);
1579
+ const u = [];
1580
+ this.setLinePoint(i, v, i.end, "start", u), t.push(u);
1581
+ }
1582
+ const f = new B(
1583
+ i.end.clone().add(s.clone().multiplyScalar(1)),
1584
+ i.end.clone().add(s.clone().multiplyScalar(-1))
1585
+ ), p = f.projectPoint(r, !1);
1586
+ if (p) {
1587
+ const u = [];
1588
+ this.setLinePoint(i, i.start, p, "end", u), t.push(u);
1591
1589
  }
1592
1590
  }
1593
1591
  }
1594
- }), this.recursion && s.forEach((i) => this.correction(i, t, n)), t;
1592
+ }), t;
1595
1593
  }
1596
1594
  /** 轴对齐垂直修正
1597
1595
  * @param targettLine
@@ -1599,7 +1597,7 @@ class $ extends R {
1599
1597
  */
1600
1598
  axisAlignmentCorrection(e) {
1601
1599
  const t = [...this.renderManager.lines];
1602
- return { newLines: At.axisAlignmentCorrection(t, e), oldLines: t };
1600
+ return { newLines: At.axisAlignmentCorrection.call(this, t, e), oldLines: t };
1603
1601
  }
1604
1602
  /** 开始
1605
1603
  * @param next
@@ -1608,30 +1606,54 @@ class $ extends R {
1608
1606
  const n = performance.now();
1609
1607
  e(this.axisAlignment ? this.axisAlignmentCorrection(t[0]) : this.correction(t[0])), console.log("处理时间:", performance.now() - n, "ms");
1610
1608
  }
1609
+ /**
1610
+ * 窗户恢复
1611
+ * @param doorLines
1612
+ */
1613
+ windowRecover(e) {
1614
+ e.forEach((t) => {
1615
+ const n = t.direction();
1616
+ t.userData.drawWindow?.forEach((o) => {
1617
+ const s = A.from(o.p), a = t.projectPoint(
1618
+ s.clone().add(n.clone().multiplyScalar(o.width * 0.5))
1619
+ ), d = t.projectPoint(
1620
+ s.clone().add(n.clone().multiplyScalar(o.width * -0.5))
1621
+ ), l = new B(a, d), i = l.center;
1622
+ o.p = new m.Vector3(i?.x ?? 0, i?.y ?? 0, o.p.z);
1623
+ });
1624
+ });
1625
+ }
1611
1626
  /** 执行完成
1612
1627
  * @param data
1613
1628
  */
1614
1629
  completed(e) {
1615
- Array.isArray(e) ? e.forEach((t) => {
1616
- t.forEach((n) => {
1617
- const { line: s, newPoint: o, point: a } = n;
1618
- a.copy(o), this.renderManager.removeLine(s), this.renderManager.addLine(s);
1619
- });
1620
- }) : (this.renderManager.removeLines(e.oldLines), this.renderManager.addLines(e.newLines)), this.renderManager.draw();
1630
+ if (Array.isArray(e)) {
1631
+ const t = [];
1632
+ e.forEach((n) => {
1633
+ n.forEach((o) => {
1634
+ const { line: s, newPoint: a, point: d } = o;
1635
+ d.copy(a), this.renderManager.removeLine(s), this.renderManager.addLine(s), s.userData.isWindow && t.push(s);
1636
+ });
1637
+ }), this.windowRecover(t);
1638
+ } else
1639
+ this.renderManager.removeLines(e.oldLines), this.renderManager.addLines(e.newLines);
1640
+ this.renderManager.draw();
1621
1641
  }
1622
1642
  /** 回滚操作
1623
1643
  * @param data
1624
1644
  */
1625
1645
  rollback(e) {
1626
- if (Array.isArray(e))
1627
- for (let t = e.length - 1; t >= 0; t--) {
1628
- const n = e[t];
1629
- for (let s = n.length - 1; s >= 0; s--) {
1630
- const o = n[s], { line: a, oldPoint: c, point: d } = o;
1631
- d.copy(c), this.renderManager.removeLine(a), this.renderManager.addLine(a);
1646
+ if (Array.isArray(e)) {
1647
+ const t = [];
1648
+ for (let n = e.length - 1; n >= 0; n--) {
1649
+ const o = e[n];
1650
+ for (let s = o.length - 1; s >= 0; s--) {
1651
+ const a = o[s], { line: d, oldPoint: l, point: i } = a;
1652
+ i.copy(l), this.renderManager.removeLine(d), this.renderManager.addLine(d), d.userData.isWindow && t.push(d);
1632
1653
  }
1633
1654
  }
1634
- else
1655
+ this.windowRecover(t);
1656
+ } else
1635
1657
  this.renderManager.removeLines(e.newLines), this.renderManager.addLines(e.oldLines);
1636
1658
  return this.renderManager.draw(), e;
1637
1659
  }
@@ -1643,52 +1665,68 @@ class $ extends R {
1643
1665
  return this.completed(e), e;
1644
1666
  }
1645
1667
  }
1646
- class ee extends R {
1668
+ class $ extends O {
1647
1669
  static name = "MergeLine";
1648
1670
  shortcutKeys = ["control", "g"];
1649
1671
  static commandName = "merge-line";
1650
1672
  onAddFromParent(e) {
1651
1673
  super.onAddFromParent(e);
1652
- const t = e.findComponentByType(_e), n = this.commandManager.addCommandFlow(ee.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.mergeLine.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1653
- n.addEventListener("finally", this.createFinally()), n.addEventListener("completed", (s) => this.completed(s.data)), this.eventInput.addKeyCombination(ee.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1654
- t?.selectLines.length === 2 && this.eventInput.isKeyCombination(ee.commandName) && await this.commandManager.start(ee.commandName, [...this.default.selectLines]);
1674
+ const t = this.commandManager.addCommandFlow($.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.mergeLines.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1675
+ t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination($.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1676
+ this.eventInput.isKeyCombination($.commandName) && await this.commandManager.start($.commandName, [...this.default.selectLines]);
1655
1677
  }), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
1656
1678
  }
1657
1679
  /**
1658
1680
  * 进入命令约束
1659
1681
  */
1660
1682
  constraint(e, t) {
1661
- Array.isArray(t) ? t.length !== 2 ? (L({ message: "未执行线段合并,请选择两条线段", type: "warning" }), this.cancel()) : e(t) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
1683
+ Array.isArray(t) ? t.length < 2 ? (L({ message: "未执行线段合并,请选择至少两条线段", type: "warning" }), this.cancel()) : e(t) : (L({ message: "进入命令失败", type: "warning" }), this.cancel());
1684
+ }
1685
+ mergeLine(e, t) {
1686
+ for (let n = 0; n < e.points.length; n++) {
1687
+ const o = e.points[n];
1688
+ for (let s = 0; s < t.points.length; s++) {
1689
+ const a = t.points[s];
1690
+ if (o.equal(a)) {
1691
+ const d = e.points[(n + 1) % 2].clone(), l = t.points[(s + 1) % 2].clone();
1692
+ return new B(d, l);
1693
+ }
1694
+ }
1695
+ }
1696
+ return !1;
1662
1697
  }
1663
1698
  /** 开始
1664
1699
  * @param next
1665
1700
  * @todo 合并所有
1666
1701
  */
1667
- mergeLine(e, t) {
1668
- const n = t[0], s = t[1];
1669
- for (let o = 0; o < n.points.length; o++) {
1670
- const a = n.points[o];
1671
- for (let c = 0; c < s.points.length; c++) {
1672
- const d = s.points[c];
1673
- if (a.equal(d)) {
1674
- const i = n.points[(o + 1) % 2], r = s.points[(c + 1) % 2], h = new B(i, r);
1675
- return e({ line1: n, line2: s, newLine: h }), L({ message: "已合并", type: "success" });
1676
- }
1702
+ mergeLines(e, t) {
1703
+ t = t.filter((a) => !a.userData.isDoor);
1704
+ const n = new Pe();
1705
+ t.forEach((a) => a.points.forEach((d) => n.insert(d, a)));
1706
+ const o = [], s = [];
1707
+ for (let a = 0; a < t.length; a++) {
1708
+ if (s.indexOf(t[a]) > -1) continue;
1709
+ const d = t[a], l = n.queryPoint(d.start).filter((h) => h.userData !== d && d.isParallel(h.userData, 0.1)), i = n.queryPoint(d.end).filter((h) => h.userData !== d && d.isParallel(h.userData, 0.1)), r = [d];
1710
+ if (l.length && r.push(l[0].userData), i.length && r.push(i[0].userData), r.length > 1) {
1711
+ s.push(...r), s.forEach((v) => v.points.forEach((f) => n.remove(f)));
1712
+ const h = r.reduce((v, f) => this.mergeLine(v, f), r.pop().clone());
1713
+ h.points.forEach((v) => n.insert(v, h)), o.push(h);
1677
1714
  }
1678
1715
  }
1679
- L({ message: "合并失败,两条线未找到共用点", type: "warning" }), this.commandManager.cancel();
1716
+ o.length ? (e({ newLines: o, deleteLines: s }), L({ message: "已合并", type: "success" })) : (L({ message: "合并失败,未找到共用点", type: "warning" }), this.commandManager.cancel());
1680
1717
  }
1681
1718
  /** 执行完成
1682
1719
  * @param data
1683
1720
  */
1684
- completed(e) {
1685
- this.renderManager.removeLine(e.line1), this.renderManager.removeLine(e.line2), this.renderManager.addLine(e.newLine), this.renderManager.draw();
1721
+ completed({ newLines: e, deleteLines: t }) {
1722
+ this.renderManager.addLines(e), this.renderManager.removeLines(t), this.renderManager.draw();
1686
1723
  }
1687
1724
  /** 回滚操作
1688
1725
  * @param data
1689
1726
  */
1690
1727
  rollback(e) {
1691
- return this.renderManager.addLines([e.line1, e.line2]), this.renderManager.removeLine(e.newLine), this.renderManager.draw(), e;
1728
+ const { newLines: t, deleteLines: n } = e;
1729
+ return this.renderManager.addLines(n), this.renderManager.removeLines(t), this.renderManager.draw(), e;
1692
1730
  }
1693
1731
  /** 撤回回滚
1694
1732
  * @param lines
@@ -1698,13 +1736,13 @@ class ee extends R {
1698
1736
  return this.completed(e), e;
1699
1737
  }
1700
1738
  }
1701
- class te extends R {
1739
+ class ee extends O {
1702
1740
  static name = "DeleteSelectLine";
1703
1741
  shortcutKeys = ["Delete"];
1704
1742
  static commandName = "deleteSelectLine";
1705
1743
  onAddFromParent(e) {
1706
- super.onAddFromParent(e), this.commandManager.addCommandFlow(te.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.delete.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this)).addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(te.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1707
- this.eventInput.isKeyCombination(te.commandName) && await this.commandManager.start(te.commandName, [...this.default.selectLines]);
1744
+ super.onAddFromParent(e), this.commandManager.addCommandFlow(ee.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.delete.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this)).addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ee.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1745
+ this.eventInput.isKeyCombination(ee.commandName) && await this.commandManager.start(ee.commandName, [...this.default.selectLines]);
1708
1746
  }), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
1709
1747
  }
1710
1748
  /**
@@ -1733,15 +1771,15 @@ class te extends R {
1733
1771
  return e.forEach((t) => this.renderManager.removeLine(t)), e;
1734
1772
  }
1735
1773
  }
1736
- class ne extends R {
1774
+ class te extends O {
1737
1775
  static name = "ConnectionLine";
1738
1776
  shortcutKeys = ["Shift", "L"];
1739
1777
  static commandName = "connectionLine";
1740
1778
  onAddFromParent(e) {
1741
1779
  super.onAddFromParent(e);
1742
- const t = this.commandManager.addCommandFlow(ne.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1743
- t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(ne.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1744
- this.eventInput.isKeyCombination(ne.commandName) && await this.commandManager.start(ne.commandName, [...this.default.selectLines]);
1780
+ const t = this.commandManager.addCommandFlow(te.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1781
+ t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(te.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1782
+ this.eventInput.isKeyCombination(te.commandName) && await this.commandManager.start(te.commandName, [...this.default.selectLines]);
1745
1783
  }), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
1746
1784
  }
1747
1785
  /**
@@ -1754,14 +1792,14 @@ class ne extends R {
1754
1792
  * @param next
1755
1793
  */
1756
1794
  connection(e, t) {
1757
- let n, s, o = 1 / 0;
1795
+ let n, o, s = 1 / 0;
1758
1796
  for (let a = 0; a < 2; a++)
1759
- for (let c = 0; c < 2; c++) {
1760
- const d = t[0].points[a], i = t[1].points[c], r = d.distance(i);
1761
- r < o && (n = d, s = i, o = r);
1797
+ for (let d = 0; d < 2; d++) {
1798
+ const l = t[0].points[a], i = t[1].points[d], r = l.distance(i);
1799
+ r < s && (n = l, o = i, s = r);
1762
1800
  }
1763
- if (n && s) {
1764
- const a = new B(n.clone(), s.clone());
1801
+ if (n && o) {
1802
+ const a = new B(n.clone(), o.clone());
1765
1803
  e(a), L({ message: "连接成功", type: "success" });
1766
1804
  } else this.cancel();
1767
1805
  }
@@ -1786,15 +1824,15 @@ class ne extends R {
1786
1824
  return this.completed(e), e;
1787
1825
  }
1788
1826
  }
1789
- class se extends R {
1827
+ class ne extends O {
1790
1828
  static name = "IntersectionConnectionLine";
1791
1829
  shortcutKeys = ["control", "Shift", "L"];
1792
1830
  static commandName = "intersectionConnectionLine";
1793
1831
  onAddFromParent(e) {
1794
1832
  super.onAddFromParent(e);
1795
- const t = this.commandManager.addCommandFlow(se.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1796
- t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(se.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1797
- this.eventInput.isKeyCombination(se.commandName) && await this.commandManager.start(se.commandName, [...this.default.selectLines]);
1833
+ const t = this.commandManager.addCommandFlow(ne.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.connection.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1834
+ t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(ne.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1835
+ this.eventInput.isKeyCombination(ne.commandName) && await this.commandManager.start(ne.commandName, [...this.default.selectLines]);
1798
1836
  }), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
1799
1837
  }
1800
1838
  /**
@@ -1807,26 +1845,26 @@ class se extends R {
1807
1845
  * @param next
1808
1846
  */
1809
1847
  connection(e, t) {
1810
- const n = t[0], s = t[1], o = t[0].getIntersection(t[1]);
1811
- if (!o) return;
1812
- const a = n.points.map((r) => r.clone()), c = s.points.map((r) => r.clone());
1813
- n.start.distance(o) < n.end.distance(o) ? n.start.copy(o) : n.end.copy(o), s.start.distance(o) < s.end.distance(o) ? s.start.copy(o) : s.end.copy(o);
1814
- const d = n.points.map((r) => r.clone()), i = s.points.map((r) => r.clone());
1815
- e({ line1: n, line2: s, oldLine1: a, oldLine2: c, newLine1: d, newLine2: i }), L({ message: "连接成功", type: "success" });
1848
+ const n = t[0], o = t[1], s = t[0].getIntersection(t[1]);
1849
+ if (!s) return;
1850
+ const a = n.points.map((r) => r.clone()), d = o.points.map((r) => r.clone());
1851
+ n.start.distance(s) < n.end.distance(s) ? n.start.copy(s) : n.end.copy(s), o.start.distance(s) < o.end.distance(s) ? o.start.copy(s) : o.end.copy(s);
1852
+ const l = n.points.map((r) => r.clone()), i = o.points.map((r) => r.clone());
1853
+ e({ line1: n, line2: o, oldLine1: a, oldLine2: d, newLine1: l, newLine2: i }), L({ message: "连接成功", type: "success" });
1816
1854
  }
1817
1855
  /** 执行完成
1818
1856
  * @param next
1819
1857
  * @param selectLines
1820
1858
  */
1821
- completed({ line1: e, line2: t, newLine1: n, newLine2: s }) {
1822
- this.renderManager.removeLine(e), this.renderManager.removeLine(t), e.set(...n), t.set(...s), this.renderManager.addLines([e, t]), this.renderManager.draw();
1859
+ completed({ line1: e, line2: t, newLine1: n, newLine2: o }) {
1860
+ this.renderManager.removeLine(e), this.renderManager.removeLine(t), e.set(...n), t.set(...o), this.renderManager.addLines([e, t]), this.renderManager.draw();
1823
1861
  }
1824
1862
  /** 回滚操作
1825
1863
  * @param data
1826
1864
  */
1827
1865
  rollback(e) {
1828
- const { line1: t, line2: n, oldLine1: s, oldLine2: o } = e;
1829
- return this.renderManager.removeLine(t), this.renderManager.removeLine(n), t.set(...s), n.set(...o), this.renderManager.addLines([t, n]), this.renderManager.draw(), e;
1866
+ const { line1: t, line2: n, oldLine1: o, oldLine2: s } = e;
1867
+ return this.renderManager.removeLine(t), this.renderManager.removeLine(n), t.set(...o), n.set(...s), this.renderManager.addLines([t, n]), this.renderManager.draw(), e;
1830
1868
  }
1831
1869
  /** 撤回回滚
1832
1870
  * @param lines
@@ -1836,7 +1874,7 @@ class se extends R {
1836
1874
  return this.completed(e), e;
1837
1875
  }
1838
1876
  }
1839
- class oe extends R {
1877
+ class oe extends O {
1840
1878
  static name = "DeleteSelectWindow";
1841
1879
  shortcutKeys = ["Q", "Delete"];
1842
1880
  static commandName = "deleteSelectWindow";
@@ -1857,13 +1895,13 @@ class oe extends R {
1857
1895
  * @param next
1858
1896
  */
1859
1897
  end(e, t) {
1860
- let n = !1, s = [];
1861
- t.forEach((o) => {
1862
- o.userData.isWindow && (s.push({
1863
- line: o,
1864
- drawDoorData: o.userData.drawDoorData
1898
+ let n = !1, o = [];
1899
+ t.forEach((s) => {
1900
+ s.userData.isWindow && (o.push({
1901
+ line: s,
1902
+ drawDoorData: s.userData.drawDoorData
1865
1903
  }), n = !0);
1866
- }), n && L({ message: "删除窗户成功", type: "success" }), e(s);
1904
+ }), n && L({ message: "删除窗户成功", type: "success" }), e(o);
1867
1905
  }
1868
1906
  /**
1869
1907
  * 完成
@@ -1893,16 +1931,16 @@ class oe extends R {
1893
1931
  return this.completed(e), e;
1894
1932
  }
1895
1933
  }
1896
- class ae extends R {
1934
+ class se extends O {
1897
1935
  static name = "SelectAll";
1898
1936
  container = new m.Group();
1899
1937
  shortcutKeys = ["control", "a"];
1900
1938
  static commandName = "selectAll";
1901
1939
  onAddFromParent(e) {
1902
1940
  super.onAddFromParent(e), this.editor.container.add(this.container), this.container.position.z = 1e-3;
1903
- const t = this.commandManager.addCommandFlow(ae.commandName).add(this.createInterrupt()).add(this.selectAll.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1904
- t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(ae.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1905
- this.eventInput.isKeyCombination(ae.commandName) && await this.commandManager.start(ae.commandName);
1941
+ const t = this.commandManager.addCommandFlow(se.commandName).add(this.createInterrupt()).add(this.selectAll.bind(this)).addRollback(this.rollback.bind(this)).addRevokeRollback(this.revokeRollback.bind(this));
1942
+ t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), t.addEventListener("completed", (n) => this.completed(n.data)), this.eventInput.addKeyCombination(se.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1943
+ this.eventInput.isKeyCombination(se.commandName) && await this.commandManager.start(se.commandName);
1906
1944
  }), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
1907
1945
  }
1908
1946
  /** 开始
@@ -1930,15 +1968,15 @@ class ae extends R {
1930
1968
  return this.completed(e), e;
1931
1969
  }
1932
1970
  }
1933
- class ie extends R {
1971
+ class ae extends O {
1934
1972
  static name = "ViewAngle";
1935
1973
  shortcutKeys = ["r"];
1936
1974
  static commandName = "viewAngle";
1937
1975
  onAddFromParent(e) {
1938
1976
  super.onAddFromParent(e);
1939
- const t = this.commandManager.addCommandFlow(ie.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.viewAngle.bind(this));
1940
- t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ie.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1941
- this.eventInput.isKeyCombination(ie.commandName) && await this.commandManager.start(ie.commandName, [...this.default.selectLines]);
1977
+ const t = this.commandManager.addCommandFlow(ae.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.viewAngle.bind(this));
1978
+ t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ae.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
1979
+ this.eventInput.isKeyCombination(ae.commandName) && await this.commandManager.start(ae.commandName, [...this.default.selectLines]);
1942
1980
  }), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
1943
1981
  }
1944
1982
  /**
@@ -1953,27 +1991,27 @@ class ie extends R {
1953
1991
  * @param selectLines
1954
1992
  */
1955
1993
  viewAngle(e, t) {
1956
- const [n, s] = t, o = Math.min(0.5, n.length(), s.length());
1957
- let a, c, d, i = 0, r = 0;
1958
- n.sameEndpointAsStart(s) ? (a = n.start, c = n.end) : (a = n.end, c = n.start), s.sameEndpointAsStart(n) ? d = s.end : d = s.start;
1959
- function h(A, M) {
1960
- const b = M.x - A.x, F = M.y - A.y;
1994
+ const [n, o] = t, s = Math.min(0.5, n.length(), o.length());
1995
+ let a, d, l, i = 0, r = 0;
1996
+ n.sameEndpointAsStart(o) ? (a = n.start, d = n.end) : (a = n.end, d = n.start), o.sameEndpointAsStart(n) ? l = o.end : l = o.start;
1997
+ function h(S, M) {
1998
+ const b = M.x - S.x, F = M.y - S.y;
1961
1999
  let W = Math.atan2(F, b) * (180 / Math.PI);
1962
2000
  return W < 0 && (W += 360), W;
1963
2001
  }
1964
- const y = h(a, c), p = h(a, d), v = Math.min(y, p), g = Math.max(y, p), E = [];
1965
- function x(A, M) {
1966
- for (let b = A; b <= M; b++) {
1967
- const F = Math.cos(b * Math.PI / 180) * o + a.x, W = Math.sin(b * Math.PI / 180) * o + a.y, he = Math.cos((b + 1) * Math.PI / 180) * o + a.x, Ce = Math.sin((b + 1) * Math.PI / 180) * o + a.y;
2002
+ const v = h(a, d), f = h(a, l), p = Math.min(v, f), u = Math.max(v, f), E = [];
2003
+ function x(S, M) {
2004
+ for (let b = S; b <= M; b++) {
2005
+ const F = Math.cos(b * Math.PI / 180) * s + a.x, W = Math.sin(b * Math.PI / 180) * s + a.y, he = Math.cos((b + 1) * Math.PI / 180) * s + a.x, Ce = Math.sin((b + 1) * Math.PI / 180) * s + a.y;
1968
2006
  E.push(F, W, 0, he, Ce, 0);
1969
2007
  }
1970
2008
  }
1971
- g - v > 180 ? (x(0, v), x(g, 360), i = 360 - (g - v), r = (g + i / 2) % 360) : (x(v, g), i = g - v, r = v + i / 2);
2009
+ u - p > 180 ? (x(0, p), x(u, 360), i = 360 - (u - p), r = (u + i / 2) % 360) : (x(p, u), i = u - p, r = p + i / 2);
1972
2010
  const k = new m.LineSegments();
1973
2011
  k.geometry = this.renderManager.createGeometry({
1974
2012
  position: E
1975
2013
  }, E.length / 3), k.material = new m.LineBasicMaterial({ color: 16711935 }), this.renderManager.container.add(k);
1976
- const z = Math.cos(r * Math.PI / 180) * o + a.x, Y = Math.sin(r * Math.PI / 180) * o + a.y, Z = this.renderer.createText(Number(i.toFixed(2)), new m.Vector3(z, Y, 0), {
2014
+ const K = Math.cos(r * Math.PI / 180) * s + a.x, Y = Math.sin(r * Math.PI / 180) * s + a.y, Z = this.renderer.createText(Number(i.toFixed(2)), new m.Vector3(K, Y, 0), {
1977
2015
  textShadow: "0px 0px 2px #000"
1978
2016
  }, this.renderManager.container);
1979
2017
  let G = 0;
@@ -1982,7 +2020,7 @@ class ie extends R {
1982
2020
  }));
1983
2021
  }
1984
2022
  }
1985
- class rt extends R {
2023
+ class rt extends O {
1986
2024
  static name = "ClippingLine";
1987
2025
  container = new m.Group();
1988
2026
  shortcutKeys = ["control", "x"];
@@ -1997,24 +2035,24 @@ class rt extends R {
1997
2035
  * @param next
1998
2036
  */
1999
2037
  selectPointStart(e) {
2000
- let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), s = null;
2038
+ let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), o = null;
2001
2039
  this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
2002
- const { point: o, line: a, find: c } = this.editor.renderManager.adsorption();
2003
- this.dispatchEvent({ type: "pointerMove", point: o }), c ? (this.domElement.style.cursor = "none", n.position.copy(o), s = a, t = o.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2040
+ const { point: s, line: a, find: d } = this.editor.renderManager.adsorption();
2041
+ this.dispatchEvent({ type: "pointerMove", point: s }), d ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2004
2042
  })).add(this.eventInput.addEventListener("codeChange", () => {
2005
- this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: s }));
2043
+ this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), e({ point: t, line: o }));
2006
2044
  })), this.addEventRecord("clear").add(() => n.removeFromParent());
2007
2045
  }
2008
2046
  /** 选择结束点
2009
2047
  * @param next
2010
2048
  */
2011
2049
  selectPointEnd(e, { point: t, line: n }) {
2012
- let s = null, o = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 }));
2013
- this.addEventRecord("clear").add(() => o.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
2014
- const { point: a, find: c, line: d } = this.editor.renderManager.adsorption();
2015
- this.dispatchEvent({ type: "pointerMove", point: a }), c && d === n ? (this.domElement.style.cursor = "none", o.position.copy(a), s = a.clone(), this.container.add(o)) : (this.domElement.style.cursor = "no-drop", s = null, o.removeFromParent());
2050
+ let o = null, s = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 }));
2051
+ this.addEventRecord("clear").add(() => s.removeFromParent()).add(this.editor.addEventListener("pointerPositionChange", () => {
2052
+ const { point: a, find: d, line: l } = this.editor.renderManager.adsorption();
2053
+ this.dispatchEvent({ type: "pointerMove", point: a }), d && l === n ? (this.domElement.style.cursor = "none", s.position.copy(a), o = a.clone(), this.container.add(s)) : (this.domElement.style.cursor = "no-drop", o = null, s.removeFromParent());
2016
2054
  })).add(this.eventInput.addEventListener("codeChange", () => {
2017
- this.eventInput.isKeyDown("mouse_0") && s && e({ line: n, start: t, end: s });
2055
+ this.eventInput.isKeyDown("mouse_0") && o && e({ line: n, start: t, end: o });
2018
2056
  }));
2019
2057
  }
2020
2058
  /**
@@ -2022,17 +2060,17 @@ class rt extends R {
2022
2060
  * @param next
2023
2061
  * @param points
2024
2062
  */
2025
- end(e, { start: t, end: n, line: s }) {
2026
- const o = _.from(t), a = _.from(n);
2063
+ end(e, { start: t, end: n, line: o }) {
2064
+ const s = A.from(t), a = A.from(n);
2027
2065
  e({
2028
- oldLine: s,
2066
+ oldLine: o,
2029
2067
  newLine1: new B(
2030
- s.start,
2031
- s.start.distance(o) < s.start.distance(a) ? o.clone() : a.clone()
2068
+ o.start,
2069
+ o.start.distance(s) < o.start.distance(a) ? s.clone() : a.clone()
2032
2070
  ),
2033
2071
  newLine2: new B(
2034
- s.end,
2035
- s.end.distance(o) < s.end.distance(a) ? o.clone() : a.clone()
2072
+ o.end,
2073
+ o.end.distance(s) < o.end.distance(a) ? s.clone() : a.clone()
2036
2074
  )
2037
2075
  });
2038
2076
  }
@@ -2055,15 +2093,15 @@ class rt extends R {
2055
2093
  return this.completed(e), e;
2056
2094
  }
2057
2095
  }
2058
- class re extends R {
2096
+ class ie extends O {
2059
2097
  static name = "VerticalReferenceLine";
2060
2098
  shortcutKeys = ["v"];
2061
2099
  static commandName = "VerticalReferenceLine";
2062
2100
  onAddFromParent(e) {
2063
2101
  super.onAddFromParent(e);
2064
- const t = this.commandManager.addCommandFlow(re.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalReferenceLine.bind(this));
2065
- t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(re.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
2066
- this.eventInput.isKeyCombination(re.commandName) && await this.commandManager.start(re.commandName, [...this.default.selectLines]);
2102
+ const t = this.commandManager.addCommandFlow(ie.commandName).add(this.createInterrupt()).add(this.constraint.bind(this)).add(this.verticalReferenceLine.bind(this));
2103
+ t.writeOperationList = !1, t.addEventListener("finally", this.createFinally()), this.eventInput.addKeyCombination(ie.commandName, this.shortcutKeys), this.eventInput.addEventListener("codeChange", async () => {
2104
+ this.eventInput.isKeyCombination(ie.commandName) && await this.commandManager.start(ie.commandName, [...this.default.selectLines]);
2067
2105
  }), this.eventInput.addCancelDefaultBehavior(() => this.eventInput.isOnlyKeyDowns(this.shortcutKeys));
2068
2106
  }
2069
2107
  /**
@@ -2083,67 +2121,67 @@ class re extends R {
2083
2121
  }), t[0].userData.isVerticalReferenceLine = !0, e(), this.renderManager.draw();
2084
2122
  }
2085
2123
  }
2086
- const is = {
2124
+ const io = {
2087
2125
  key: 0,
2088
2126
  class: "mt-[5px] text-[#ccc] text-[11px] absolute left-[10px] bottom-[10px] rounded-[8px] min-w-[150px] bg-black/15 p-[10px]"
2089
- }, rs = { class: "text-start max-w-[150px]" }, ds = { class: "inline-block ml-[10px] text-[var(--color-primary)]" }, ls = {
2127
+ }, ro = { class: "text-start max-w-[150px]" }, lo = { class: "inline-block ml-[10px] text-[var(--color-primary)]" }, co = {
2090
2128
  key: 0,
2091
2129
  class: "p-[5px] max-w-[200px]"
2092
- }, cs = { class: "text-[14px] flex flex-col" }, ms = ["onClick"], hs = { class: "flex flex-row items-center" }, us = { class: "flex justify-center items-center size-[20px] bg-[#f0f0f0] rounded-[2px] mr-[10px]" }, ps = ["src"], gs = { class: "text-wrap" }, vs = {
2130
+ }, mo = { class: "text-[14px] flex flex-col" }, ho = ["onClick"], uo = { class: "flex flex-row items-center" }, po = { class: "flex justify-center items-center size-[20px] bg-[#f0f0f0] rounded-[2px] mr-[10px]" }, go = ["src"], vo = { class: "text-wrap" }, fo = {
2093
2131
  key: 1,
2094
2132
  class: "text-[#999]"
2095
- }, fs = {
2133
+ }, wo = {
2096
2134
  style: { "--el-color-primary": "var(--primary-color)" },
2097
2135
  class: "flex flex-row items-center justify-between gap-[10px] mt-[10px] text-[10px]"
2098
- }, ys = {
2136
+ }, yo = {
2099
2137
  key: 0,
2100
2138
  class: "flex flex-row items-center flex-wrap justify-between gap-[10px] mt-[10px] text-[10px]"
2101
- }, ws = { class: "flex-wrap border-t-1 border-t-[#eee] mt-[5px] pt-[5px] flex items-center gap-[10px]" }, bs = ["onClick", "title"], xs = ["src"], Cs = /* @__PURE__ */ me({
2139
+ }, bo = { class: "flex-wrap border-t-1 border-t-[#eee] mt-[5px] pt-[5px] flex items-center gap-[10px]" }, xo = ["onClick", "title"], Co = ["src"], Eo = /* @__PURE__ */ me({
2102
2140
  __name: "EditorTool",
2103
2141
  props: {
2104
2142
  dxfSystem: {},
2105
2143
  permission: {}
2106
2144
  },
2107
- setup(l) {
2108
- function e(C, u, w = h.value.getBoundingClientRect(), U = y.value.getBoundingClientRect()) {
2109
- const ue = w.width - U.width, pe = 0, Me = w.height - U.height;
2110
- C = Math.max(0, Math.min(C, ue)), u = Math.max(pe, Math.min(u, Me)), A.value = { left: C, top: u };
2145
+ setup(c) {
2146
+ function e(C, g, y = h.value.getBoundingClientRect(), U = v.value.getBoundingClientRect()) {
2147
+ const ue = y.width - U.width, pe = 0, Me = y.height - U.height;
2148
+ C = Math.max(0, Math.min(C, ue)), g = Math.max(pe, Math.min(g, Me)), S.value = { left: C, top: g };
2111
2149
  }
2112
2150
  function t(C) {
2113
- v.value === C.command || v.value !== "default" || x.commandManager.start(C.command);
2151
+ p.value === C.command || p.value !== "default" || x.commandManager.start(C.command);
2114
2152
  }
2115
2153
  function n(C) {
2116
2154
  if (C) {
2117
2155
  localStorage.setItem("lines", JSON.stringify(C));
2118
2156
  try {
2119
- g.Dxf.set(C), g.Dxf.lineOffset();
2120
- } catch (u) {
2121
- console.log(u);
2157
+ u.Dxf.set(C), u.Dxf.lineOffset();
2158
+ } catch (g) {
2159
+ console.log(g);
2122
2160
  }
2123
2161
  }
2124
2162
  }
2125
- async function s() {
2163
+ async function o() {
2126
2164
  const C = await Pt.json();
2127
2165
  Array.isArray(C) && (localStorage.removeItem("orbitControls"), n(C));
2128
2166
  }
2129
- function o({ offsetX: C, offsetY: u }) {
2167
+ function s({ offsetX: C, offsetY: g }) {
2130
2168
  E.mouseMoveEventProxylock = !0;
2131
- const w = document.body.style.cursor;
2169
+ const y = document.body.style.cursor;
2132
2170
  document.body.style.cursor = "move";
2133
2171
  const U = (ue) => {
2134
- const pe = h.value.getBoundingClientRect(), Me = y.value.getBoundingClientRect();
2172
+ const pe = h.value.getBoundingClientRect(), Me = v.value.getBoundingClientRect();
2135
2173
  e(
2136
2174
  ue.pageX - pe.left - C,
2137
- ue.pageY - pe.top - u,
2175
+ ue.pageY - pe.top - g,
2138
2176
  pe,
2139
2177
  Me
2140
2178
  ), ue.stopPropagation(), document.body.style.cursor = "move";
2141
2179
  }, Ee = () => {
2142
- document.body.removeEventListener("mousemove", U), document.removeEventListener("mouseup", Ee), document.body.style.cursor = w, E.mouseMoveEventProxylock = !1;
2180
+ document.body.removeEventListener("mousemove", U), document.removeEventListener("mouseup", Ee), document.body.style.cursor = y, E.mouseMoveEventProxylock = !1;
2143
2181
  };
2144
2182
  document.body.addEventListener("mousemove", U), document.addEventListener("mouseup", Ee);
2145
2183
  }
2146
- const a = l, c = S(!0), d = S(!0), i = S(!0), r = S(!1), h = S(), y = S(), p = S(!0), v = S(""), g = Rt(a.dxfSystem), E = g.findComponentByType(It), x = g.findComponentByType(dt), k = g.findComponentByType(_e), z = g.findComponentByType(St), Y = g.findComponentByType(_t), Z = S(0), G = S(0), A = S({ left: 10, top: 100 }), M = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": En, "./assets/images/connection.svg": Ln, "./assets/images/cutLine.svg": In, "./assets/images/deleteSelectLine.svg": Dn, "./assets/images/deleteSelectWindow.svg": Sn, "./assets/images/door.svg": Bn, "./assets/images/intersectionConnection.svg": On, "./assets/images/line.svg": Fn, "./assets/images/mergeLine.svg": zn, "./assets/images/revokeRollback.svg": jn, "./assets/images/rollback.svg": Gn, "./assets/images/selectAll.svg": Hn, "./assets/images/selectPoint.svg": Jn, "./assets/images/verticalCorrection.svg": qn, "./assets/images/verticalLine.svg": Yn, "./assets/images/window.svg": $n }), b = S(!1), F = S(0), W = S(!1), he = new ResizeObserver(() => e(A.value.left, A.value.top)), Ce = [
2184
+ const a = c, d = _(!0), l = _(!0), i = _(!0), r = _(!1), h = _(), v = _(), f = _(!0), p = _(""), u = Ot(a.dxfSystem), E = u.findComponentByType(It), x = u.findComponentByType(dt), k = u.findComponentByType(it), K = u.findComponentByType(St), Y = u.findComponentByType(_t), Z = _(0), G = _(0), S = _({ left: 10, top: 100 }), M = /* @__PURE__ */ Object.assign({ "./assets/images/angle.svg": En, "./assets/images/connection.svg": Ln, "./assets/images/cutLine.svg": In, "./assets/images/deleteSelectLine.svg": Dn, "./assets/images/deleteSelectWindow.svg": Sn, "./assets/images/door.svg": Bn, "./assets/images/intersectionConnection.svg": Rn, "./assets/images/line.svg": Fn, "./assets/images/mergeLine.svg": Kn, "./assets/images/revokeRollback.svg": jn, "./assets/images/rollback.svg": Gn, "./assets/images/selectAll.svg": Hn, "./assets/images/selectPoint.svg": Jn, "./assets/images/verticalCorrection.svg": qn, "./assets/images/verticalLine.svg": Yn, "./assets/images/window.svg": $n }), b = _(!1), F = _(0), W = _(!1), he = new ResizeObserver(() => e(S.value.left, S.value.top)), Ce = [
2147
2185
  { name: "开启绘制线段命令", shortcut: "Ctrl + L" },
2148
2186
  { name: "开启绘制门线命令", shortcut: "Ctrl + M" },
2149
2187
  { name: "开启绘制窗户线命令", shortcut: "Ctrl + Q" },
@@ -2158,7 +2196,7 @@ const is = {
2158
2196
  { name: "线段同方向合并", shortcut: "Ctrl + G" },
2159
2197
  { name: "线段连接", shortcut: "选中 + Shift + L" },
2160
2198
  { name: "线段交点连接", shortcut: "选中 + Ctrl + Shift + L" },
2161
- { name: "垂直修正", shortcut: "Ctrl + C 或 Ctrl + Shift + C" },
2199
+ { name: "垂直修正", shortcut: "Ctrl + C 或 Shift + C" },
2162
2200
  { name: "命令确认", shortcut: "Enter" },
2163
2201
  { name: "取消命令", shortcut: "Esc" },
2164
2202
  { name: "回滚操作", shortcut: "Ctrl + Z" },
@@ -2228,39 +2266,38 @@ const is = {
2228
2266
  }
2229
2267
  },
2230
2268
  {
2231
- command: ee.commandName,
2269
+ command: $.commandName,
2232
2270
  name: "合并",
2233
2271
  src: M["./assets/images/mergeLine.svg"].default,
2234
2272
  show: D(() => F.value === 2),
2235
2273
  shortcut: "Ctrl + G"
2236
2274
  },
2237
2275
  {
2238
- command: ne.commandName,
2276
+ command: te.commandName,
2239
2277
  name: "两点连接",
2240
2278
  show: D(() => F.value === 2),
2241
2279
  src: M["./assets/images/connection.svg"].default,
2242
2280
  shortcut: "Shift + L"
2243
2281
  },
2244
2282
  {
2245
- command: se.commandName,
2283
+ command: ne.commandName,
2246
2284
  name: "延长线交点连接",
2247
2285
  show: D(() => F.value === 2),
2248
2286
  src: M["./assets/images/intersectionConnection.svg"].default,
2249
2287
  shortcut: "Ctrl + Shift + L"
2250
2288
  },
2251
2289
  {
2252
- command: $.commandName,
2290
+ command: le.commandName,
2253
2291
  name: "线段垂直纠正",
2254
2292
  show: D(() => F.value === 1),
2255
2293
  src: M["./assets/images/verticalCorrection.svg"].default,
2256
2294
  shortcut: `
2257
2295
  Ctrl + C 垂直纠正
2258
- Ctrl + Shift + C 全部垂直纠正
2259
2296
  Shift + C 轴对齐垂直纠正
2260
2297
  `
2261
2298
  },
2262
2299
  {
2263
- command: re.commandName,
2300
+ command: ie.commandName,
2264
2301
  name: "y轴垂直基准线",
2265
2302
  show: D(
2266
2303
  () => F.value === 1 && !k.selectLines[0].userData.isDoor
@@ -2269,14 +2306,14 @@ const is = {
2269
2306
  shortcut: "V"
2270
2307
  },
2271
2308
  {
2272
- command: ie.commandName,
2309
+ command: ae.commandName,
2273
2310
  name: "角度显示",
2274
2311
  show: D(() => F.value === 2 && k.selectLines[0].sameEndpoint(k.selectLines[1])),
2275
2312
  src: M["./assets/images/angle.svg"].default,
2276
2313
  shortcut: "r"
2277
2314
  },
2278
2315
  {
2279
- command: ae.commandName,
2316
+ command: se.commandName,
2280
2317
  name: "全选",
2281
2318
  show: D(() => F.value !== x.renderManager.lines.length),
2282
2319
  src: M["./assets/images/selectAll.svg"].default,
@@ -2290,26 +2327,26 @@ const is = {
2290
2327
  shortcut: "Q + Delete"
2291
2328
  },
2292
2329
  {
2293
- command: te.commandName,
2330
+ command: ee.commandName,
2294
2331
  name: "删除",
2295
2332
  show: D(() => F.value > 0),
2296
2333
  src: M["./assets/images/deleteSelectLine.svg"].default,
2297
2334
  shortcut: "Delete"
2298
2335
  }
2299
2336
  ];
2300
- J(A, () => localStorage.setItem("editorToolPosition", JSON.stringify(A.value))), J(b, () => localStorage.setItem("showShortcutKey", b.value + "")), J(p, () => {
2301
- localStorage.setItem("toolBarExpand", p.value + ""), p.value && we(() => e(A.value.left, A.value.top));
2302
- }), J(c, () => g.Variable.set("originalLineVisible", c.value)), J(d, () => g.Variable.set("dxfVisible", d.value)), J(i, () => g.Variable.set("whiteModelVisible", i.value)), g.Variable.addEventListener("isLook", (C) => r.value = C.value), g.Variable.addEventListener("originalLineVisible", (C) => c.value = C.value), g.Variable.addEventListener("dxfVisible", (C) => d.value = C.value), g.Variable.addEventListener("whiteModelVisible", (C) => i.value = C.value);
2337
+ J(S, () => localStorage.setItem("editorToolPosition", JSON.stringify(S.value))), J(b, () => localStorage.setItem("showShortcutKey", b.value + "")), J(f, () => {
2338
+ localStorage.setItem("toolBarExpand", f.value + ""), f.value && ye(() => e(S.value.left, S.value.top));
2339
+ }), J(d, () => u.Variable.set("originalLineVisible", d.value)), J(l, () => u.Variable.set("dxfVisible", l.value)), J(i, () => u.Variable.set("whiteModelVisible", i.value)), u.Variable.addEventListener("isLook", (C) => r.value = C.value), u.Variable.addEventListener("originalLineVisible", (C) => d.value = C.value), u.Variable.addEventListener("dxfVisible", (C) => l.value = C.value), u.Variable.addEventListener("whiteModelVisible", (C) => i.value = C.value);
2303
2340
  const mt = x.commandManager.addEventListener("started", (C) => {
2304
- v.value = C.name;
2341
+ p.value = C.name;
2305
2342
  });
2306
- return localStorage.getItem("showShortcutKey") && (b.value = localStorage.getItem("showShortcutKey") === "true"), localStorage.getItem("toolBarExpand") && (p.value = localStorage.getItem("toolBarExpand") === "true"), tt(() => {
2307
- y.value.style.display = "none", setTimeout(() => {
2308
- if (y.value.style.display = "block", localStorage.getItem("editorToolPosition")) {
2309
- const { left: C, top: u } = JSON.parse(localStorage.getItem("editorToolPosition") ?? "{}");
2310
- e(C, u), we(() => he.observe(h.value));
2343
+ return localStorage.getItem("showShortcutKey") && (b.value = localStorage.getItem("showShortcutKey") === "true"), localStorage.getItem("toolBarExpand") && (f.value = localStorage.getItem("toolBarExpand") === "true"), et(() => {
2344
+ v.value.style.display = "none", setTimeout(() => {
2345
+ if (v.value.style.display = "block", localStorage.getItem("editorToolPosition")) {
2346
+ const { left: C, top: g } = JSON.parse(localStorage.getItem("editorToolPosition") ?? "{}");
2347
+ e(C, g), ye(() => he.observe(h.value));
2311
2348
  } else
2312
- we(() => he.observe(h.value));
2349
+ ye(() => he.observe(h.value));
2313
2350
  }, 100), k.addEventListener("selectLineChange", () => {
2314
2351
  F.value = k.selectLines.length, W.value = k.selectLines.some((C) => C.userData.isWindow);
2315
2352
  }), ["rollback", "completed", "revokeRollback"].forEach((C) => {
@@ -2321,20 +2358,20 @@ const is = {
2321
2358
  });
2322
2359
  }), Ft(() => {
2323
2360
  E.mouseMoveEventProxylock = !1, mt(), he.disconnect();
2324
- }), (C, u) => (P(), O("div", {
2361
+ }), (C, g) => (P(), R("div", {
2325
2362
  ref_key: "elRef",
2326
2363
  ref: h,
2327
2364
  class: "editorTool pointer-events-none overflow-hidden absolute left-0 top-0 w-full h-full z-[20] flex flex-row justify-between p-[5px] box-border select-none pointer-events-[all]"
2328
2365
  }, [
2329
- K(xe, null, {
2366
+ z(xe, null, {
2330
2367
  default: j(() => [
2331
- b.value ? (P(), O("div", is, [
2332
- (P(), O(ve, null, ke(Ce, (w) => I("div", {
2368
+ b.value ? (P(), R("div", io, [
2369
+ (P(), R(ve, null, ke(Ce, (y) => I("div", {
2333
2370
  class: "p-[4px_0px] flex justify-between text-right border-b-1 border-b-[rgba(255,255,255,0.1)] last-of-type:border-b-0",
2334
- key: w.name
2371
+ key: y.name
2335
2372
  }, [
2336
- I("p", rs, le(w.name), 1),
2337
- I("span", ds, le(w.shortcut), 1)
2373
+ I("p", ro, de(y.name), 1),
2374
+ I("span", lo, de(y.shortcut), 1)
2338
2375
  ])), 64))
2339
2376
  ])) : q("", !0)
2340
2377
  ]),
@@ -2342,64 +2379,64 @@ const is = {
2342
2379
  }),
2343
2380
  I("div", {
2344
2381
  ref_key: "toolBarRef",
2345
- ref: y,
2346
- style: Se({ left: A.value.left + "px", top: A.value.top + "px" }),
2347
- class: V(["overflow-hidden pointer-events-auto w-fit max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ": p.value }]),
2348
- onMousedown: u[10] || (u[10] = (w) => w.stopPropagation())
2382
+ ref: v,
2383
+ style: _e({ left: S.value.left + "px", top: S.value.top + "px" }),
2384
+ class: V(["overflow-hidden pointer-events-auto w-fit max-w-[260px] transition-[border-radius] text-[#333] absolute z-[11] bg-white select-none", { "rounded-[8px] ": f.value }]),
2385
+ onMousedown: g[10] || (g[10] = (y) => y.stopPropagation())
2349
2386
  }, [
2350
2387
  I("div", {
2351
- onMousedown: o,
2352
- class: V([{ "border-b-[#eee] border-b-1": p.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px]"])
2388
+ onMousedown: s,
2389
+ class: V([{ "border-b-[#eee] border-b-1": f.value }, "flex flex-row justify-between header text-[14px] font-bold p-[10px 0px]"])
2353
2390
  }, [
2354
- u[12] || (u[12] = Kt('<div class="flex flex-row" data-v-d038f1d5><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-d038f1d5><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-d038f1d5><path d="M341.333333 298.666667a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m0 298.666666a85.333333 85.333333 0 1 0 0-170.666666 85.333333 85.333333 0 0 0 0 170.666666z m85.333334 213.333334a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m256-512a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m85.333333 213.333333a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m-85.333333 384a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z" data-v-d038f1d5></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-d038f1d5>绘制工具</h5></div>', 1)),
2391
+ g[12] || (g[12] = zt('<div class="flex flex-row" data-v-39e8b14c><div class="p-[2px_5px] flex items-center pointer-events-none" data-v-39e8b14c><svg fill="#aaa" width="20" height="20" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" data-v-39e8b14c><path d="M341.333333 298.666667a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m0 298.666666a85.333333 85.333333 0 1 0 0-170.666666 85.333333 85.333333 0 0 0 0 170.666666z m85.333334 213.333334a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m256-512a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z m85.333333 213.333333a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z m-85.333333 384a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z" data-v-39e8b14c></path></svg></div><h5 class="flex text-nowrap text-[12px] items-center pointer-events-none" data-v-39e8b14c>绘制工具</h5></div>', 1)),
2355
2392
  I("div", {
2356
- onMousedown: u[0] || (u[0] = (w) => w.stopPropagation()),
2357
- onClick: u[1] || (u[1] = (w) => p.value = !p.value),
2393
+ onMousedown: g[0] || (g[0] = (y) => y.stopPropagation()),
2394
+ onClick: g[1] || (g[1] = (y) => f.value = !f.value),
2358
2395
  class: "cursor-pointer flex items-center p-[0px_5px]"
2359
2396
  }, [
2360
- (P(), O("svg", {
2397
+ (P(), R("svg", {
2361
2398
  fill: "#666",
2362
- class: V([{ "rotate-90": p.value }, "transition-all"]),
2399
+ class: V([{ "rotate-90": f.value }, "transition-all"]),
2363
2400
  viewBox: "0 0 1024 1024",
2364
2401
  version: "1.1",
2365
2402
  xmlns: "http://www.w3.org/2000/svg",
2366
2403
  width: "12",
2367
2404
  height: "12"
2368
- }, u[11] || (u[11] = [
2405
+ }, g[11] || (g[11] = [
2369
2406
  I("path", { d: "M315.050667 938.666667a60.757333 60.757333 0 0 0 41.813333-16.298667L750.933333 551.338667a53.418667 53.418667 0 0 0 0-78.677334L356.864 101.632a61.696 61.696 0 0 0-83.541333 0 53.418667 53.418667 0 0 0-0.256 78.677333L625.408 512 273.066667 843.690667a53.418667 53.418667 0 0 0 0 78.677333 60.757333 60.757333 0 0 0 41.984 16.298667z" }, null, -1)
2370
2407
  ]), 2))
2371
2408
  ], 32)
2372
2409
  ], 34),
2373
- p.value ? (P(), O("div", ls, [
2374
- I("ul", cs, [
2375
- (P(), O(ve, null, ke(lt, (w) => (P(), O(ve, {
2376
- key: w.command
2410
+ f.value ? (P(), R("div", co, [
2411
+ I("ul", mo, [
2412
+ (P(), R(ve, null, ke(lt, (y) => (P(), R(ve, {
2413
+ key: y.command
2377
2414
  }, [
2378
- w.show ? (P(), O("li", {
2415
+ y.show ? (P(), R("li", {
2379
2416
  key: 0,
2380
- onClick: (U) => t(w),
2417
+ onClick: (U) => t(y),
2381
2418
  class: V([{
2382
- "!bg-[var(--primary-color)] text-[#fff]": v.value === w.command,
2383
- "!cursor-no-drop": v.value !== w.command && v.value !== "default"
2419
+ "!bg-[var(--primary-color)] text-[#fff]": p.value === y.command,
2420
+ "!cursor-no-drop": p.value !== y.command && p.value !== "default"
2384
2421
  }, "gap-[10px] text-[12px] hover:bg-[#ddd] transition-all rounded-[6px] p-[5px] flex flex-row items-center justify-between cursor-pointer"])
2385
2422
  }, [
2386
- I("div", hs, [
2387
- I("div", us, [
2423
+ I("div", uo, [
2424
+ I("div", po, [
2388
2425
  I("img", {
2389
2426
  class: "size-[14px]",
2390
- src: w.src,
2427
+ src: y.src,
2391
2428
  alt: "",
2392
2429
  srcset: ""
2393
- }, null, 8, ps)
2430
+ }, null, 8, go)
2394
2431
  ]),
2395
- I("span", gs, le(w.name), 1)
2432
+ I("span", vo, de(y.name), 1)
2396
2433
  ]),
2397
- v.value === w.command ? (P(), O("div", {
2434
+ p.value === y.command ? (P(), R("div", {
2398
2435
  key: 0,
2399
2436
  title: "取消命令(Esc)",
2400
2437
  class: "active:scale-[0.7] transition-all",
2401
- onClick: u[2] || (u[2] = (U) => (f(x).cancelCommand(), U.stopPropagation()))
2402
- }, u[13] || (u[13] = [
2438
+ onClick: g[2] || (g[2] = (U) => (w(x).cancelCommand(), U.stopPropagation()))
2439
+ }, g[13] || (g[13] = [
2403
2440
  I("svg", {
2404
2441
  fill: "#fff",
2405
2442
  width: "16",
@@ -2411,117 +2448,117 @@ const is = {
2411
2448
  I("path", { d: "M511.104 0C228.821333 0 0 228.821333 0 511.104c0 282.282667 228.821333 511.104 511.104 511.104 282.282667 0 511.104-228.842667 511.104-511.104C1022.208 228.821333 793.386667 0 511.104 0zM511.104 898.496c-213.973333 0-387.434667-173.44-387.434667-387.413333 0-213.952 173.44-387.413333 387.434667-387.413333 213.952 0 387.392 173.44 387.392 387.413333C898.496 725.056 725.056 898.496 511.104 898.496z" }),
2412
2449
  I("path", { d: "M236.437333 463.914667l549.333333 0 0 96.874667-549.333333 0 0-96.874667Z" })
2413
2450
  ], -1)
2414
- ]))) : w.shortcut ? (P(), O("div", vs, le(w.shortcut), 1)) : q("", !0)
2415
- ], 10, ms)) : q("", !0)
2451
+ ]))) : y.shortcut ? (P(), R("div", fo, de(y.shortcut), 1)) : q("", !0)
2452
+ ], 10, ho)) : q("", !0)
2416
2453
  ], 64))), 64))
2417
2454
  ]),
2418
- I("div", fs, [
2419
- K(f(Fe), {
2455
+ I("div", wo, [
2456
+ z(w(Fe), {
2420
2457
  size: "small",
2421
2458
  modelValue: b.value,
2422
- "onUpdate:modelValue": u[3] || (u[3] = (w) => b.value = w),
2459
+ "onUpdate:modelValue": g[3] || (g[3] = (y) => b.value = y),
2423
2460
  label: "快捷键提示"
2424
2461
  }, null, 8, ["modelValue"]),
2425
- K(f(Fe), {
2462
+ z(w(Fe), {
2426
2463
  size: "small",
2427
- modelValue: d.value,
2428
- "onUpdate:modelValue": u[4] || (u[4] = (w) => d.value = w),
2464
+ modelValue: l.value,
2465
+ "onUpdate:modelValue": g[4] || (g[4] = (y) => l.value = y),
2429
2466
  label: "dxf"
2430
2467
  }, null, 8, ["modelValue"])
2431
2468
  ]),
2432
- C.permission === "admin" ? (P(), O("div", ys, [
2433
- K(f(de), {
2469
+ C.permission === "admin" ? (P(), R("div", yo, [
2470
+ z(w(re), {
2434
2471
  style: { padding: "5px", "font-size": "10px" },
2435
2472
  size: "small",
2436
2473
  type: "success",
2437
- onClick: s
2474
+ onClick: o
2438
2475
  }, {
2439
- default: j(() => u[14] || (u[14] = [
2476
+ default: j(() => g[14] || (g[14] = [
2440
2477
  X(" 选择文件 ", -1)
2441
2478
  ])),
2442
2479
  _: 1,
2443
2480
  __: [14]
2444
2481
  }),
2445
- K(f(de), {
2482
+ z(w(re), {
2446
2483
  style: { padding: "5px", "font-size": "10px" },
2447
2484
  size: "small",
2448
2485
  type: "primary",
2449
- onClick: u[5] || (u[5] = (w) => f(g).Dxf.downloadOriginalData("json.json"))
2486
+ onClick: g[5] || (g[5] = (y) => w(u).Dxf.downloadOriginalData("json.json"))
2450
2487
  }, {
2451
- default: j(() => u[15] || (u[15] = [
2488
+ default: j(() => g[15] || (g[15] = [
2452
2489
  X(" 下载Json ", -1)
2453
2490
  ])),
2454
2491
  _: 1,
2455
2492
  __: [15]
2456
2493
  }),
2457
- K(f(de), {
2494
+ z(w(re), {
2458
2495
  style: { padding: "5px", "font-size": "10px" },
2459
2496
  size: "small",
2460
2497
  type: "primary",
2461
- onClick: u[6] || (u[6] = (w) => f(g).AngleCorrectionDxf.download("test.dxf"))
2498
+ onClick: g[6] || (g[6] = (y) => w(u).AngleCorrectionDxf.download("test.dxf"))
2462
2499
  }, {
2463
- default: j(() => u[16] || (u[16] = [
2500
+ default: j(() => g[16] || (g[16] = [
2464
2501
  X(" 下载DXF ", -1)
2465
2502
  ])),
2466
2503
  _: 1,
2467
2504
  __: [16]
2468
2505
  }),
2469
- K(f(de), {
2506
+ z(w(re), {
2470
2507
  style: { padding: "5px", "font-size": "10px" },
2471
2508
  size: "small",
2472
2509
  type: "primary",
2473
- onClick: u[7] || (u[7] = (w) => f(g).AngleCorrectionDxf.downloadImage("dxf.jpg"))
2510
+ onClick: g[7] || (g[7] = (y) => w(u).AngleCorrectionDxf.downloadImage("dxf.jpg"))
2474
2511
  }, {
2475
- default: j(() => u[17] || (u[17] = [
2512
+ default: j(() => g[17] || (g[17] = [
2476
2513
  X(" 下载JPG ", -1)
2477
2514
  ])),
2478
2515
  _: 1,
2479
2516
  __: [17]
2480
2517
  }),
2481
- K(f(de), {
2518
+ z(w(re), {
2482
2519
  style: { padding: "5px", "font-size": "10px" },
2483
2520
  size: "small",
2484
2521
  type: "primary",
2485
- onClick: u[8] || (u[8] = (w) => f(z).downloadGltf("test.glb", !0))
2522
+ onClick: g[8] || (g[8] = (y) => w(K).downloadGltf("test.glb", !0))
2486
2523
  }, {
2487
- default: j(() => u[18] || (u[18] = [
2524
+ default: j(() => g[18] || (g[18] = [
2488
2525
  X(" 下载白膜 ", -1)
2489
2526
  ])),
2490
2527
  _: 1,
2491
2528
  __: [18]
2492
2529
  }),
2493
- K(f(de), {
2530
+ z(w(re), {
2494
2531
  style: { padding: "5px", "font-size": "10px" },
2495
2532
  size: "small",
2496
2533
  type: "primary",
2497
- onClick: u[9] || (u[9] = (w) => f(Y).download())
2534
+ onClick: g[9] || (g[9] = (y) => w(Y).download())
2498
2535
  }, {
2499
- default: j(() => u[19] || (u[19] = [
2536
+ default: j(() => g[19] || (g[19] = [
2500
2537
  X(" 下载三维家JSON ", -1)
2501
2538
  ])),
2502
2539
  _: 1,
2503
2540
  __: [19]
2504
2541
  })
2505
2542
  ])) : q("", !0),
2506
- K(xe, null, {
2543
+ z(xe, null, {
2507
2544
  default: j(() => [
2508
- I("div", ws, [
2509
- K(zt, null, {
2545
+ I("div", bo, [
2546
+ z(Kt, null, {
2510
2547
  default: j(() => [
2511
- (P(), O(ve, null, ke(ct, (w) => I("div", {
2512
- onClick: (U) => w.show.value && v.value === "default" && (w.action ? w.action() : f(x).commandManager.start(w.command, [...f(k).selectLines])),
2513
- title: `${w.name}(${w.shortcut})`,
2548
+ (P(), R(ve, null, ke(ct, (y) => I("div", {
2549
+ onClick: (U) => y.show.value && p.value === "default" && (y.action ? y.action() : w(x).commandManager.start(y.command, [...w(k).selectLines])),
2550
+ title: `${y.name}(${y.shortcut})`,
2514
2551
  class: V(["size-[20px] flex justify-center items-center relative overflow-hidden active:scale-[0.8] border-1 border-[#ccc] rounded-[4px] transition-all cursor-pointer", {
2515
- "opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !w.show.value || v.value !== "default",
2516
- [w.class ?? ""]: !0
2552
+ "opacity-30 bg-[#ccc] !cursor-no-drop active:!scale-[1]": !y.show.value || p.value !== "default",
2553
+ [y.class ?? ""]: !0
2517
2554
  }]),
2518
- key: w.command
2555
+ key: y.command
2519
2556
  }, [
2520
2557
  I("img", {
2521
2558
  class: "size-[14px]",
2522
- src: w.src
2523
- }, null, 8, xs)
2524
- ], 10, bs)), 64))
2559
+ src: y.src
2560
+ }, null, 8, Co)
2561
+ ], 10, xo)), 64))
2525
2562
  ]),
2526
2563
  _: 1
2527
2564
  })
@@ -2533,13 +2570,13 @@ const is = {
2533
2570
  ], 38)
2534
2571
  ], 512));
2535
2572
  }
2536
- }), Es = (l, e) => {
2537
- const t = l.__vccOpts || l;
2538
- for (const [n, s] of e)
2539
- t[n] = s;
2573
+ }), Mo = (c, e) => {
2574
+ const t = c.__vccOpts || c;
2575
+ for (const [n, o] of e)
2576
+ t[n] = o;
2540
2577
  return t;
2541
- }, Ms = /* @__PURE__ */ Es(Cs, [["__scopeId", "data-v-d038f1d5"]]);
2542
- let dt = class extends Ae {
2578
+ }, Lo = /* @__PURE__ */ Mo(Eo, [["__scopeId", "data-v-39e8b14c"]]);
2579
+ let dt = class extends Se {
2543
2580
  static name = "Editor";
2544
2581
  container = new m.Group();
2545
2582
  get renderer() {
@@ -2593,20 +2630,20 @@ let dt = class extends Ae {
2593
2630
  this.domContainer.domElement.parentElement && (this.domContainer.domElement.parentElement.appendChild(this.domElement), this.domContainer.domElement.parentElement.appendChild(this.imgEl), n());
2594
2631
  });
2595
2632
  setTimeout(() => {
2596
- this.app = Tt(Ms, { dxfSystem: this.parent, permission: this.viewPermission }), this.app.mount(this.domElement);
2633
+ this.app = Tt(Lo, { dxfSystem: this.parent, permission: this.viewPermission }), this.app.mount(this.domElement);
2597
2634
  }), e.AngleCorrectionDxf.addEventListener("lineOffset", async () => {
2598
2635
  this.imgEl.src && URL.revokeObjectURL(this.imgEl.src), setTimeout(async () => {
2599
2636
  this.imgEl.src = URL.createObjectURL(await e.AngleCorrectionDxf.toDxfImageBlob("Centimeters", "image/png", "transparent"));
2600
2637
  });
2601
- }), this.domEventRegister.addEventListener("mousedown", (s) => {
2602
- s.x < this.imgWidth + 10 && s.x > 10 && s.y < this.imgWidth && s.y > 10 && Object.assign(this.imgEl.style, {
2638
+ }), this.domEventRegister.addEventListener("mousedown", (o) => {
2639
+ o.x < this.imgWidth + 10 && o.x > 10 && o.y < this.imgWidth && o.y > 10 && Object.assign(this.imgEl.style, {
2603
2640
  width: `${Math.min(this.imgWidth * 10, this.renderer.width * 0.9)}px`,
2604
2641
  height: `${Math.min(this.imgWidth * 10, this.renderer.height * 0.9)}px`,
2605
2642
  background: "rgba(0,0,0,1)",
2606
2643
  zIndex: 100
2607
2644
  });
2608
- }), this.domEventRegister.addEventListener("mousemove", (s) => {
2609
- s.x < this.imgWidth + 10 && s.x > 10 && s.y < this.imgWidth && s.y > 10 || Object.assign(this.imgEl.style, {
2645
+ }), this.domEventRegister.addEventListener("mousemove", (o) => {
2646
+ o.x < this.imgWidth + 10 && o.x > 10 && o.y < this.imgWidth && o.y > 10 || Object.assign(this.imgEl.style, {
2610
2647
  width: `${this.imgWidth}px`,
2611
2648
  height: `${this.imgWidth}px`,
2612
2649
  background: "rgba(255,255,255,0.2)",
@@ -2629,20 +2666,20 @@ let dt = class extends Ae {
2629
2666
  * 打开编辑器
2630
2667
  */
2631
2668
  openEdit() {
2632
- const e = this.renderer, t = this.domEventRegister, n = this.dxf, s = e.orbitControls, o = e.camera, a = n.box.center, c = e.camera.position.clone(), d = s?.target?.clone(), i = new m.Vector2(), r = new m.Raycaster(), h = this.coords, y = this.pointerPosition;
2633
- this.container.position.z = n.originalZAverage, e.scene.add(this.container), s && (o.position.set(a.x, a.y, 15), s.target.set(a.x, a.y, 0), s.enableRotate = !1);
2634
- const p = () => {
2669
+ const e = this.renderer, t = this.domEventRegister, n = this.dxf, o = e.orbitControls, s = e.camera, a = n.box.center, d = e.camera.position.clone(), l = o?.target?.clone(), i = new m.Vector2(), r = new m.Raycaster(), h = this.coords, v = this.pointerPosition;
2670
+ this.container.position.z = n.originalZAverage, e.scene.add(this.container), o && (s.position.set(a.x, a.y, 15), o.target.set(a.x, a.y, 0), o.enableRotate = !1);
2671
+ const f = () => {
2635
2672
  e.renderer.getSize(i);
2636
- const v = t.pointer.x / i.x * 2 - 1, g = -(t.pointer.y / i.y * 2 - 1);
2637
- h.set(v, g), r.setFromCamera(h, e.camera.children.length ? e.camera.children[0] : e.camera);
2673
+ const p = t.pointer.x / i.x * 2 - 1, u = -(t.pointer.y / i.y * 2 - 1);
2674
+ h.set(p, u), r.setFromCamera(h, e.camera.children.length ? e.camera.children[0] : e.camera);
2638
2675
  const E = r.intersectObject(this.plane);
2639
- E.length && (y.copy(E[0].point), this.dispatchEvent({
2676
+ E.length && (v.copy(E[0].point), this.dispatchEvent({
2640
2677
  type: "pointerPositionChange",
2641
- position: y
2678
+ position: v
2642
2679
  }));
2643
2680
  };
2644
- t.addEventListener("mousemove", p), this.commandManager.disabled = !1, this.commandManager.start("default"), this._exitEditCallBack = () => {
2645
- t.removeEventListener("mousemove", p), s && (o.position.copy(c), s.enableRotate = !0, s.target.copy(d));
2681
+ t.addEventListener("mousemove", f), this.commandManager.disabled = !1, this.commandManager.start("default"), this._exitEditCallBack = () => {
2682
+ t.removeEventListener("mousemove", f), o && (s.position.copy(d), o.enableRotate = !0, o.target.copy(l));
2646
2683
  };
2647
2684
  }
2648
2685
  /**
@@ -2655,7 +2692,7 @@ let dt = class extends Ae {
2655
2692
  super.destroy(), this.exitEdit(), this.renderer.scene.remove(this.container), this.domElement.remove(), this.app?.unmount();
2656
2693
  }
2657
2694
  };
2658
- class Ls extends R {
2695
+ class ko extends O {
2659
2696
  static name = "PointDrag";
2660
2697
  container = new m.Group();
2661
2698
  interruptKeys = ["escape"];
@@ -2670,12 +2707,12 @@ class Ls extends R {
2670
2707
  * @param next
2671
2708
  */
2672
2709
  selectPoint(e) {
2673
- let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), s = null;
2710
+ let t = null, n = new m.Mesh(new m.SphereGeometry(0.04), new m.MeshBasicMaterial({ color: 16711935 })), o = null;
2674
2711
  this.addEventRecord("selectPointStart").add(this.editor.addEventListener("pointerPositionChange", () => {
2675
- const { point: o, line: a, find: c, mode: d } = this.editor.renderManager.adsorption();
2676
- this.dispatchEvent({ type: "pointerMove", point: o }), c && d === "point" ? (this.domElement.style.cursor = "none", n.position.copy(o), s = a, t = o.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2712
+ const { point: s, line: a, find: d, mode: l } = this.editor.renderManager.adsorption();
2713
+ this.dispatchEvent({ type: "pointerMove", point: s }), d && l === "point" ? (this.domElement.style.cursor = "none", n.position.copy(s), o = a, t = s.clone(), this.container.add(n)) : (this.domElement.style.cursor = "no-drop", t = null, n.removeFromParent());
2677
2714
  })).add(this.eventInput.addEventListener("codeChange", () => {
2678
- this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), n.material.color.set(65280), e({ point: t, line: s }));
2715
+ this.eventInput.isKeyDown("mouse_0") && t && (this.canceEventRecord("selectPointStart"), n.material.color.set(65280), e({ point: t, line: o }));
2679
2716
  })), this.addEventRecord("clear").add(() => n.removeFromParent());
2680
2717
  }
2681
2718
  /** 拖拽点
@@ -2685,32 +2722,32 @@ class Ls extends R {
2685
2722
  */
2686
2723
  drag(e, { point: t, line: n }) {
2687
2724
  this.domElement.style.cursor = "crosshair";
2688
- const s = n.start.equal(_.from(t)) ? "start" : "end", o = s == "start" ? new m.Vector3(n.end.x, n.end.y, 0) : new m.Vector3(n.start.x, n.start.y, 0), a = t.clone(), c = new ye([o, a], 16711935), d = new m.Mesh(new m.SphereGeometry(0.03), new m.MeshBasicMaterial({ color: 16711935 }));
2689
- this.container.add(c), this.addEventRecord("clear").add(this.editor.addEventListener("pointerPositionChange", () => {
2725
+ const o = n.start.equal(A.from(t)) ? "start" : "end", s = o == "start" ? new m.Vector3(n.end.x, n.end.y, 0) : new m.Vector3(n.start.x, n.start.y, 0), a = t.clone(), d = new we([s, a], 16711935), l = new m.Mesh(new m.SphereGeometry(0.03), new m.MeshBasicMaterial({ color: 16711935 }));
2726
+ this.container.add(d), this.addEventRecord("clear").add(this.editor.addEventListener("pointerPositionChange", () => {
2690
2727
  let { point: i, find: r } = this.editor.renderManager.adsorption(), h = "none";
2691
2728
  if (i) {
2692
2729
  if (this.dispatchEvent({ type: "pointerMove", point: i }), this.eventInput.isKeyDown("shift")) {
2693
- const y = n.projectPoint(_.from(i), !1);
2694
- i.set(y?.x ?? i.x, y?.y ?? i.y, 0), r = !0, h = "crosshair";
2730
+ const v = n.projectPoint(A.from(i), !1);
2731
+ i.set(v?.x ?? i.x, v?.y ?? i.y, 0), r = !0, h = "crosshair";
2695
2732
  }
2696
- r ? (d.position.copy(i), this.container.add(d)) : (d.removeFromParent(), h = "crosshair"), a.copy(i), c.setPoint(o, a), this.domElement.style.cursor = h;
2733
+ r ? (l.position.copy(i), this.container.add(l)) : (l.removeFromParent(), h = "crosshair"), a.copy(i), d.setPoint(s, a), this.domElement.style.cursor = h;
2697
2734
  }
2698
2735
  })).add(this.eventInput.addEventListener("codeChange", () => {
2699
- this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point: a, oldPoint: s === "end" ? n.end.clone() : n.start.clone(), line: n, mode: s }));
2700
- })).add(() => d.removeFromParent()).add(() => c.removeFromParent());
2736
+ this.eventInput.isKeyDown("mouse_0") && (this.canceEventRecord("selectPointStart"), e({ point: a, oldPoint: o === "end" ? n.end.clone() : n.start.clone(), line: n, mode: o }));
2737
+ })).add(() => l.removeFromParent()).add(() => d.removeFromParent());
2701
2738
  }
2702
2739
  /** 执行完成
2703
2740
  */
2704
2741
  completed(e) {
2705
- const { line: t, point: n, mode: s } = e;
2706
- this.renderManager.removeLine(t), s === "end" ? t.end.set(n.x, n.y) : s === "start" && t.start.set(n.x, n.y), this.renderManager.addLine(t), this.renderManager.draw();
2742
+ const { line: t, point: n, mode: o } = e;
2743
+ this.renderManager.removeLine(t), o === "end" ? t.end.set(n.x, n.y) : o === "start" && t.start.set(n.x, n.y), this.renderManager.addLine(t), this.renderManager.draw();
2707
2744
  }
2708
2745
  /** 回滚操作
2709
2746
  * @param data
2710
2747
  */
2711
2748
  rollback(e) {
2712
- const { line: t, oldPoint: n, mode: s } = e;
2713
- return s === "end" ? t.end.set(n.x, n.y) : s === "start" && t.start.set(n.x, n.y), this.renderManager.addLine(t), this.renderManager.draw(), e;
2749
+ const { line: t, oldPoint: n, mode: o } = e;
2750
+ return o === "end" ? t.end.set(n.x, n.y) : o === "start" && t.start.set(n.x, n.y), this.renderManager.addLine(t), this.renderManager.draw(), e;
2714
2751
  }
2715
2752
  /** 撤回回滚
2716
2753
  * @param lines
@@ -2720,15 +2757,15 @@ class Ls extends R {
2720
2757
  return this.completed(e), e;
2721
2758
  }
2722
2759
  }
2723
- function Je(l, e = {}) {
2724
- l.addComponent(new dt(e.viewPermission)), l.addComponent(new ss()), l.addComponent(new _e()), l.addComponent(new wn()), l.addComponent(new os()), l.addComponent(new as()), l.addComponent(new Ls()), l.addComponent(new te()), l.addComponent(new ee()), l.addComponent(new $()), l.addComponent(new ne()), l.addComponent(new se()), l.addComponent(new oe()), l.addComponent(new ae()), l.addComponent(new ie()), l.addComponent(new re()), l.addComponent(new rt());
2760
+ function We(c, e = {}) {
2761
+ c.addComponent(new dt(e.viewPermission)), c.addComponent(new oo()), c.addComponent(new it()), c.addComponent(new yn()), c.addComponent(new so()), c.addComponent(new ao()), c.addComponent(new ko()), c.addComponent(new ee()), c.addComponent(new $()), c.addComponent(new le()), c.addComponent(new te()), c.addComponent(new ne()), c.addComponent(new oe()), c.addComponent(new se()), c.addComponent(new ae()), c.addComponent(new ie()), c.addComponent(new rt());
2725
2762
  }
2726
- const Bs = Object.assign(Je, {
2727
- create(l = {}) {
2728
- return (e) => Je(e, l);
2763
+ const No = Object.assign(We, {
2764
+ create(c = {}) {
2765
+ return (e) => We(e, c);
2729
2766
  }
2730
2767
  });
2731
2768
  export {
2732
- Bs as Editor,
2733
- Je as Editor_
2769
+ No as Editor,
2770
+ We as Editor_
2734
2771
  };