next-flow-interface 0.23.11 → 0.23.13
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/dist/index.js +572 -509
- package/dist/service/sync/attribute/attribute-service-api.d.ts +9 -9
- package/dist/service/sync/attribute/attribute-service-api.d.ts.map +1 -1
- package/dist/service/sync/attribute/dto/instance/attribute.interface.d.ts +1 -1
- package/dist/service/sync/attribute/dto/instance/attribute.interface.d.ts.map +1 -1
- package/dist/service/sync/attribute/dto/instance/base-attribute.interface.d.ts +1 -1
- package/dist/service/sync/attribute/dto/instance/base-attribute.interface.d.ts.map +1 -1
- package/dist/service/sync/attribute/dto/instance/global-attribute.interface.d.ts +1 -1
- package/dist/service/sync/attribute/dto/instance/global-attribute.interface.d.ts.map +1 -1
- package/dist/service/sync/attribute/dto/instance/node-attribute.interface.d.ts +1 -1
- package/dist/service/sync/attribute/dto/instance/node-attribute.interface.d.ts.map +1 -1
- package/dist/service/sync/attribute/dto/instance/step-attribute.interface.d.ts +1 -1
- package/dist/service/sync/attribute/dto/instance/step-attribute.interface.d.ts.map +1 -1
- package/dist/service/sync/step/node/rv-node-service-api.d.ts +1 -1
- package/dist/service/sync/step/node/rv-node-service-api.d.ts.map +1 -1
- package/dist/utils/rv-utils.d.ts +89 -22
- package/dist/utils/rv-utils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { BaseTexture as
|
|
2
|
-
import { fileTypeFromBlob as
|
|
3
|
-
var
|
|
4
|
-
class
|
|
5
|
-
constructor(
|
|
6
|
-
super(
|
|
1
|
+
import { BaseTexture as Qt, Material as qt, AbstractMesh as Zt, Quaternion as k, Vector3 as pt } from "@babylonjs/core";
|
|
2
|
+
import { fileTypeFromBlob as vt, fileTypeFromStream as Y, fileTypeFromBuffer as tr } from "file-type";
|
|
3
|
+
var rr = /* @__PURE__ */ ((t) => (t.OPAQUE = "OPAQUE", t.ALPHA_TEST = "ALPHA_TEST", t.ALPHA_BLEND = "ALPHA_BLEND", t.ALPHA_TEST_AND_BLEND = "ALPHA_TEST_AND_BLEND", t))(rr || {}), nr = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.PBR = "PBR", t.STANDARD = "STANDARD", t.NODE = "NODE", t.OTHER = "OTHER", t.TERRAIN = "TERRAIN", t.FUR = "FUR", t.WATER = "WATER", t.LAVA = "LAVA", t.SKY = "SKY", t.BACKGROUND = "BACKGROUND", t.MULTI = "MULTI", t.SHADER = "SHADER", t))(nr || {});
|
|
4
|
+
class er extends Error {
|
|
5
|
+
constructor(r) {
|
|
6
|
+
super(r), this.name = "NotFoundError";
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
class
|
|
10
|
-
constructor(
|
|
11
|
-
super(
|
|
9
|
+
class de extends er {
|
|
10
|
+
constructor(r) {
|
|
11
|
+
super(r), this.name = "DomNotFoundError";
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
class
|
|
15
|
-
constructor(
|
|
16
|
-
super(`${
|
|
14
|
+
class me extends Error {
|
|
15
|
+
constructor(r) {
|
|
16
|
+
super(`${r} is a static class and cannot be instantiated.`), this.name = "StaticClassInstantiationError";
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
var
|
|
20
|
-
class
|
|
21
|
-
constructor(
|
|
22
|
-
this.nid =
|
|
19
|
+
var or = /* @__PURE__ */ ((t) => (t[t.TOP = 0] = "TOP", t[t.RIGHT = 1] = "RIGHT", t[t.BOTTOM = 2] = "BOTTOM", t[t.LEFT = 3] = "LEFT", t[t.TOP_LEFT = 4] = "TOP_LEFT", t[t.BOTTOM_LEFT = 5] = "BOTTOM_LEFT", t[t.TOP_RIGHT = 6] = "TOP_RIGHT", t[t.BOTTOM_RIGHT = 7] = "BOTTOM_RIGHT", t[t.UNKNOWN = 8] = "UNKNOWN", t))(or || {}), ur = /* @__PURE__ */ ((t) => (t.BUTTON = "BUTTON", t.SWITCH = "SWITCH", t.DRAWER = "DRAWER", t.DIALOG = "DIALOG", t.CONTENT = "CONTENT", t.WINDOW = "WINDOW", t.SERVICE = "SERVICE", t))(ur || {}), j = /* @__PURE__ */ ((t) => (t.Default = "Default", t))(j || {});
|
|
20
|
+
class we {
|
|
21
|
+
constructor(r, n = null, e = "", o = j.Default, s = 0, i = 0) {
|
|
22
|
+
this.nid = r, this.node = n, this.text = e, this.theme = o, this.x = s, this.y = i;
|
|
23
23
|
}
|
|
24
24
|
parentElement = null;
|
|
25
25
|
pointElement = null;
|
|
@@ -32,150 +32,150 @@ class _e {
|
|
|
32
32
|
lastClickTime = 0;
|
|
33
33
|
lastSp = null;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var sr = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t.START = "START", t.PROGRESS = "PROGRESS", t.PAUSE = "PAUSE", t.RESUME = "RESUME", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(sr || {}), ir = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(ir || {}), cr = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(cr || {}), ar = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(ar || {});
|
|
36
36
|
class K {
|
|
37
|
-
constructor(
|
|
38
|
-
this.options =
|
|
37
|
+
constructor(r, n, e = [], o = !1, s = 0, i = 0, f = !1, h, E = null, A = /* @__PURE__ */ new Date()) {
|
|
38
|
+
this.options = r, this.id = n, this.lines = e, this.showIcon = o, this.x = s, this.y = i, this.closeOnOutsideClick = f, this.theme = h, this.controller = E, this.createTime = A;
|
|
39
39
|
}
|
|
40
|
-
static fromOptions(
|
|
41
|
-
let { showIcon: o } =
|
|
42
|
-
return o === void 0 &&
|
|
40
|
+
static fromOptions(r, n, e) {
|
|
41
|
+
let { showIcon: o } = n;
|
|
42
|
+
return o === void 0 && n.lines?.forEach((s) => {
|
|
43
43
|
s.icon && (o = !0);
|
|
44
44
|
}), new K(
|
|
45
|
-
r,
|
|
46
45
|
n,
|
|
46
|
+
r,
|
|
47
47
|
e,
|
|
48
48
|
o,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
n.x,
|
|
50
|
+
n.y,
|
|
51
|
+
n.closeOnOutsideClick,
|
|
52
|
+
n.theme
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
var V = /* @__PURE__ */ ((t) => (t.BUTTON = "BUTTON", t.DIVIDER = "DIVIDER", t.CHECKBOX = "CHECKBOX", t.SUB = "SUB", t.VIEW = "VIEW", t))(V || {});
|
|
57
57
|
class $ {
|
|
58
|
-
constructor(
|
|
58
|
+
constructor(r, n, e = V.BUTTON, o = "", s = "", i = void 0, f = void 0, h = "", E = !1, A = "", T = () => {
|
|
59
59
|
}, L = () => {
|
|
60
60
|
}, S = () => {
|
|
61
|
-
}, B = e === V.BUTTON, b = !1,
|
|
62
|
-
},
|
|
63
|
-
this.options =
|
|
61
|
+
}, B = e === V.BUTTON, b = !1, m = () => {
|
|
62
|
+
}, w = void 0, G = /* @__PURE__ */ new Date()) {
|
|
63
|
+
this.options = r, this.id = n, this.type = e, this.text = o, this.tip = s, this.icon = i, this.view = f, this.color = h, this.disabled = E, this.shortcut = A, this.onClick = T, this.onMouseOver = L, this.onMouseOut = S, this.closeAllOnClick = B, this.checkboxDefaultValue = b, this.onCheckboxChange = m, this.sub = w, this.createTime = G;
|
|
64
64
|
}
|
|
65
|
-
static fromOptions(
|
|
65
|
+
static fromOptions(r, n) {
|
|
66
66
|
return new $(
|
|
67
|
-
r,
|
|
68
67
|
n,
|
|
69
|
-
r
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
r,
|
|
69
|
+
n.type,
|
|
70
|
+
n.text,
|
|
71
|
+
n.tip,
|
|
72
|
+
n.icon,
|
|
73
|
+
n.view,
|
|
74
|
+
n.color,
|
|
75
|
+
n.disabled,
|
|
76
|
+
n.shortcut,
|
|
77
|
+
n.onClick,
|
|
78
|
+
n.onMouseOver,
|
|
79
|
+
n.onMouseOut,
|
|
80
|
+
n.closeAllOnClick,
|
|
81
|
+
n.checkboxDefaultValue,
|
|
82
|
+
n.onCheckboxChange,
|
|
83
|
+
n.sub
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
var J = /* @__PURE__ */ ((t) => (t.GREEN = "GREEN", t.PURPLE = "PURPLE", t.BLUE = "BLUE", t.PINK = "PINK", t))(J || {}),
|
|
87
|
+
var J = /* @__PURE__ */ ((t) => (t.GREEN = "GREEN", t.PURPLE = "PURPLE", t.BLUE = "BLUE", t.PINK = "PINK", t))(J || {}), fr = /* @__PURE__ */ ((t) => (t.LEFT = "LEFT", t.CENTER = "CENTER", t.RIGHT = "RIGHT", t))(fr || {});
|
|
88
88
|
class Q {
|
|
89
|
-
constructor(
|
|
90
|
-
},
|
|
91
|
-
},
|
|
89
|
+
constructor(r, n, e = "", o = void 0, s = "", i = "LEFT", f = void 0, h = void 0, E = void 0, A = J.BLUE, T = !1, L = "", S = {}, B = "", b = "", m = !1, w = "", G = "", mt = m, wt = !1, gt = () => {
|
|
90
|
+
}, Ut = () => !0, xt = !0, Bt = () => {
|
|
91
|
+
}, bt = () => {
|
|
92
|
+
}, Gt = () => {
|
|
93
|
+
}, Ht = () => {
|
|
94
|
+
}, Vt = () => {
|
|
92
95
|
}, Mt = () => {
|
|
93
|
-
}, Ft = () => {
|
|
94
|
-
}, Wt = () => {
|
|
95
|
-
}, yt = () => {
|
|
96
96
|
}, kt = () => {
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
this.options =
|
|
97
|
+
}, yt = () => {
|
|
98
|
+
}, Ft = () => () => {
|
|
99
|
+
}, Wt = !0, _t = !0, zt = !1, Xt = !0, Yt = !1, jt = w, Kt = /* @__PURE__ */ new Date(), $t = () => {
|
|
100
|
+
}, Jt = /* @__PURE__ */ new Map()) {
|
|
101
|
+
this.options = r, this.id = n, this.title = e, this.titleIcon = o, this.content = s, this.contentAlign = i, this.contentView = f, this.icon = h, this.view = E, this.theme = A, this.leftMode = T, this.className = L, this.style = S, this.confirmText = B, this.cancelText = b, this.enableInput = m, this.defaultValue = w, this.inputPlaceholder = G, this.autoFocus = mt, this.allowEmpty = wt, this.onChange = gt, this.onCheck = Ut, this.enableCloseButton = xt, this.onConfirm = Bt, this.onCancel = bt, this.onClose = Gt, this.onConfirmButtonClick = Ht, this.onCancelButtonClick = Vt, this.onOutsideClick = Mt, this.onCloseButtonClick = kt, this.onRender = yt, this.onEffect = Ft, this.closeOnConfirm = Wt, this.closeOnCancel = _t, this.closeOnOutsideClick = zt, this.closeOnCloseButtonClick = Xt, this.alignButton = Yt, this.inputValue = jt, this.createTime = Kt, this.focusInput = $t, this.elements = Jt;
|
|
102
102
|
}
|
|
103
|
-
static fromOptions(
|
|
103
|
+
static fromOptions(r, n) {
|
|
104
104
|
return new Q(
|
|
105
|
-
r,
|
|
106
105
|
n,
|
|
107
|
-
r
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
106
|
+
r,
|
|
107
|
+
n.title,
|
|
108
|
+
n.titleIcon,
|
|
109
|
+
n.content,
|
|
110
|
+
n.contentAlign,
|
|
111
|
+
n.contentView,
|
|
112
|
+
n.icon,
|
|
113
|
+
n.view,
|
|
114
|
+
n.theme,
|
|
115
|
+
n.leftMode,
|
|
116
|
+
n.className,
|
|
117
|
+
n.style,
|
|
118
|
+
n.confirmText,
|
|
119
|
+
n.cancelText,
|
|
120
|
+
n.enableInput,
|
|
121
|
+
n.defaultValue,
|
|
122
|
+
n.inputPlaceholder,
|
|
123
|
+
n.autoFocus,
|
|
124
|
+
n.allowEmpty,
|
|
125
|
+
n.onChange,
|
|
126
|
+
n.onCheck,
|
|
127
|
+
n.enableCloseButton,
|
|
128
|
+
n.onConfirm,
|
|
129
|
+
n.onCancel,
|
|
130
|
+
n.onClose,
|
|
131
|
+
n.onConfirmButtonClick,
|
|
132
|
+
n.onCancelButtonClick,
|
|
133
|
+
n.onOutsideClick,
|
|
134
|
+
n.onCloseButtonClick,
|
|
135
|
+
n.onRender,
|
|
136
|
+
n.onEffect,
|
|
137
|
+
n.closeOnConfirm,
|
|
138
|
+
n.closeOnCancel,
|
|
139
|
+
n.closeOnOutsideClick,
|
|
140
|
+
n.closeOnCloseButtonClick,
|
|
141
|
+
n.alignButton
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
144
|
setHide = () => {
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
var
|
|
148
|
-
const
|
|
147
|
+
var Er = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(Er || {}), lr = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(lr || {});
|
|
148
|
+
const a = "*/*", u = "unknown/unknown", O = "babylonjs/scene", y = "babylonjs/mesh", q = "babylonjs/light", Z = "babylonjs/camera", D = "babylonjs/texture", C = "babylonjs/material", g = "babylonjs/uv", p = "babylonjs/animation", v = "model/gltf-binary", tt = "model/gltf+json", F = "model/stl", rt = "model/obj", nt = "audio/mpeg", et = "audio/wav", hr = "audio/aac", Ar = "audio/ogg", Or = "audio/flac", Dr = "audio/opus", ot = "image/jpeg", ut = "image/png", Rr = "image/gif", Nr = "image/bmp", Tr = "image/webp", Lr = "image/svg+xml", Sr = "image/tiff", Ir = "image/x-icon", Cr = "image/heif", Pr = "image/avif", st = "video/mp4", dr = "video/webm", mr = "video/x-msvideo", wr = "video/mpeg", gr = "video/quicktime", Ur = "video/x-ms-wmv", xr = "video/x-flv", Br = "video/ogg", br = "video/3gpp", Gr = "video/x-matroska", it = "application/json", ct = "nextflow/sync", at = "text/plain", Hr = "text/markdown", R = [ot, ut], P = [O, v, tt, F, rt], N = [st], W = [O, y, q, Z, D, C, g, p], U = [nt, et], d = [at], x = [it], Vr = [ct], ft = [
|
|
149
149
|
...R,
|
|
150
|
-
...d,
|
|
151
|
-
...N,
|
|
152
|
-
...y,
|
|
153
|
-
...g,
|
|
154
150
|
...P,
|
|
151
|
+
...N,
|
|
152
|
+
...W,
|
|
153
|
+
...U,
|
|
154
|
+
...d,
|
|
155
155
|
...x
|
|
156
156
|
], Et = [
|
|
157
157
|
...R,
|
|
158
|
-
...d,
|
|
159
|
-
...N,
|
|
160
|
-
...g,
|
|
161
158
|
...P,
|
|
159
|
+
...N,
|
|
160
|
+
...U,
|
|
161
|
+
...d,
|
|
162
162
|
...x
|
|
163
163
|
], lt = [
|
|
164
164
|
...R,
|
|
165
|
-
...
|
|
165
|
+
...P,
|
|
166
166
|
...N,
|
|
167
|
-
...
|
|
168
|
-
], ht = [...R, ...N, D], At = [D, C,
|
|
167
|
+
...d
|
|
168
|
+
], ht = [...R, ...N, D], At = [D, C, g];
|
|
169
169
|
async function Ot(t) {
|
|
170
170
|
if (t && t instanceof Blob) {
|
|
171
171
|
if (t instanceof File && t.name.endsWith(".babylon"))
|
|
172
172
|
return O;
|
|
173
|
-
const
|
|
174
|
-
return !
|
|
173
|
+
const r = await vt(t);
|
|
174
|
+
return !r && t instanceof File && t.name.endsWith(".stl") ? F : r?.mime ?? u;
|
|
175
175
|
}
|
|
176
176
|
return u;
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
178
|
+
async function _(t) {
|
|
179
179
|
return t ? t.endsWith(".babylon") ? O : (await import("mime")).default.getType(t) ?? u : u;
|
|
180
180
|
}
|
|
181
181
|
async function Dt(t) {
|
|
@@ -184,152 +184,152 @@ async function Dt(t) {
|
|
|
184
184
|
if (t.endsWith(".babylon"))
|
|
185
185
|
return O;
|
|
186
186
|
try {
|
|
187
|
-
const
|
|
188
|
-
if (!
|
|
187
|
+
const r = await fetch(t);
|
|
188
|
+
if (!r.body)
|
|
189
189
|
return u;
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
190
|
+
const n = await Y(r.body);
|
|
191
|
+
if (n?.mime) return n.mime;
|
|
192
192
|
const o = new URL(t).pathname;
|
|
193
193
|
if (o.includes("."))
|
|
194
|
-
return await
|
|
195
|
-
} catch (
|
|
196
|
-
console.error("getMimeByUrl",
|
|
194
|
+
return await _(o);
|
|
195
|
+
} catch (r) {
|
|
196
|
+
console.error("getMimeByUrl", r);
|
|
197
197
|
}
|
|
198
198
|
return u;
|
|
199
199
|
}
|
|
200
200
|
async function Rt(t) {
|
|
201
|
-
return t ? (await
|
|
201
|
+
return t ? (await tr(t))?.mime ?? u : u;
|
|
202
202
|
}
|
|
203
203
|
async function Nt(t) {
|
|
204
204
|
return (await Y(t))?.mime ?? u;
|
|
205
205
|
}
|
|
206
|
-
async function
|
|
206
|
+
async function Mr(t) {
|
|
207
207
|
if (t) {
|
|
208
208
|
if (typeof ReadableStream < "u" && t instanceof ReadableStream)
|
|
209
209
|
return Nt(t);
|
|
210
210
|
if (t instanceof Blob)
|
|
211
211
|
return Ot(t);
|
|
212
212
|
if (typeof t == "string")
|
|
213
|
-
return t.startsWith("http://") || t.startsWith("https://") ? Dt(t) :
|
|
213
|
+
return t.startsWith("http://") || t.startsWith("https://") ? Dt(t) : _(t);
|
|
214
214
|
if (t instanceof ArrayBuffer || t instanceof Uint8Array)
|
|
215
215
|
return Rt(t);
|
|
216
|
-
if (t instanceof
|
|
216
|
+
if (t instanceof Qt)
|
|
217
217
|
return D;
|
|
218
|
-
if (t instanceof
|
|
218
|
+
if (t instanceof qt)
|
|
219
219
|
return C;
|
|
220
|
-
if (t instanceof
|
|
221
|
-
return
|
|
220
|
+
if (t instanceof Zt)
|
|
221
|
+
return y;
|
|
222
222
|
} else return u;
|
|
223
223
|
return u;
|
|
224
224
|
}
|
|
225
225
|
async function kr(t = u) {
|
|
226
|
-
return t === O ? "babylon" : Tt(t) || Lt(t) ? t : t ===
|
|
226
|
+
return t === O ? "babylon" : Tt(t) || Lt(t) ? t : t === a || t === u ? "" : (await import("mime")).default.getExtension(t) ?? "";
|
|
227
|
+
}
|
|
228
|
+
function yr(t = u) {
|
|
229
|
+
return t == a ? !0 : t == u ? !1 : ft.includes(t);
|
|
230
|
+
}
|
|
231
|
+
function Fr(t = u) {
|
|
232
|
+
return t == a ? !0 : t == u ? !1 : Et.includes(t);
|
|
233
|
+
}
|
|
234
|
+
function Wr(t = u) {
|
|
235
|
+
return t == a ? !0 : t == u ? !1 : R.includes(t);
|
|
236
|
+
}
|
|
237
|
+
function _r(t = u) {
|
|
238
|
+
return t == a ? !0 : t == u ? !1 : P.includes(t);
|
|
227
239
|
}
|
|
228
240
|
function zr(t = u) {
|
|
229
|
-
return t ==
|
|
241
|
+
return t == a ? !0 : t == u ? !1 : N.includes(t);
|
|
230
242
|
}
|
|
231
243
|
function Xr(t = u) {
|
|
232
|
-
return t ==
|
|
244
|
+
return t == a ? !0 : t == u ? !1 : d.includes(t);
|
|
233
245
|
}
|
|
234
246
|
function Yr(t = u) {
|
|
235
|
-
return t ==
|
|
247
|
+
return t == a ? !0 : t == u ? !1 : x.includes(t);
|
|
248
|
+
}
|
|
249
|
+
function Tt(t = u) {
|
|
250
|
+
return t == a ? !0 : t == u ? !1 : W.includes(t);
|
|
236
251
|
}
|
|
237
252
|
function jr(t = u) {
|
|
238
|
-
return t ==
|
|
253
|
+
return t == a ? !0 : t == u ? !1 : U.includes(t);
|
|
239
254
|
}
|
|
240
255
|
function Kr(t = u) {
|
|
241
|
-
return t ==
|
|
256
|
+
return t == a ? !0 : t == u ? !1 : lt.includes(t);
|
|
242
257
|
}
|
|
243
258
|
function $r(t = u) {
|
|
244
|
-
return t ==
|
|
259
|
+
return t == a ? !0 : t == u ? !1 : ht.includes(t);
|
|
245
260
|
}
|
|
246
261
|
function Jr(t = u) {
|
|
247
|
-
return t ==
|
|
248
|
-
}
|
|
249
|
-
function Tt(t = u) {
|
|
250
|
-
return t == f ? !0 : t == u ? !1 : y.includes(t);
|
|
262
|
+
return t == a ? !0 : t == u ? !1 : t == D;
|
|
251
263
|
}
|
|
252
264
|
function Qr(t = u) {
|
|
253
|
-
return t ==
|
|
265
|
+
return t == a ? !0 : t == u ? !1 : t == C;
|
|
254
266
|
}
|
|
255
267
|
function qr(t = u) {
|
|
256
|
-
return t ==
|
|
257
|
-
}
|
|
258
|
-
function Zr(t = u) {
|
|
259
|
-
return t == f ? !0 : t == u ? !1 : ht.includes(t);
|
|
260
|
-
}
|
|
261
|
-
function pr(t = u) {
|
|
262
|
-
return t == f ? !0 : t == u ? !1 : t == D;
|
|
263
|
-
}
|
|
264
|
-
function vr(t = u) {
|
|
265
|
-
return t == f ? !0 : t == u ? !1 : t == C;
|
|
266
|
-
}
|
|
267
|
-
function tn(t = u) {
|
|
268
|
-
return t == f ? !0 : t == u ? !1 : t == w;
|
|
268
|
+
return t == a ? !0 : t == u ? !1 : t == g;
|
|
269
269
|
}
|
|
270
270
|
function Lt(t = u) {
|
|
271
|
-
return t ==
|
|
271
|
+
return t == a ? !0 : t == u ? !1 : At.includes(t);
|
|
272
272
|
}
|
|
273
|
-
const
|
|
274
|
-
var
|
|
275
|
-
class
|
|
276
|
-
constructor(
|
|
277
|
-
this.text =
|
|
273
|
+
const ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, AAC: hr, ANIMATION: p, ANY: a, ATTACH_LIST: At, AVI: mr, AVIF: Pr, BMP: Nr, CAMERA: Z, FLAC: Or, FLV: xr, GIF: Rr, GLB: v, GLTF: tt, GP3: br, HEIF: Cr, ICO: Ir, JPG: ot, JSON: it, LIGHT: q, MARKDOWN: Hr, MATERIAL: C, MESH: y, MKV: Gr, MOV: gr, MP3: nt, MP4: st, MPEG: wr, NF: ct, OBJ: rt, OGG: Ar, OGV: Br, OPUS: Dr, PNG: ut, SCENE: O, STL: F, SUPPORT_ALL_LIST: ft, SUPPORT_AUDIO_LIST: U, SUPPORT_BABYLON_LIST: W, SUPPORT_FILE_LIST: Et, SUPPORT_IMAGE_LIST: R, SUPPORT_JSON_LIST: x, SUPPORT_MODEL_LIST: P, SUPPORT_NEXTFLOW_LIST: Vr, SUPPORT_RENDER_LIST: lt, SUPPORT_TEXTURE_LIST: ht, SUPPORT_TEXT_LIST: d, SUPPORT_VIDEO_LIST: N, SVG: Lr, TEXTURE: D, TIFF: Sr, TXT: at, UNKNOWN: u, UV: g, WAV: et, WMV: Ur, WebM: dr, WebP: Tr, getExtension: kr, getMime: Mr, getMimeByBlob: Ot, getMimeByBuffer: Rt, getMimeByPath: _, getMimeByStream: Nt, getMimeByUrl: Dt, isAttach: Lt, isBabylon: Tt, isMaterial: Qr, isSupport: yr, isSupportAudio: jr, isSupportFile: Fr, isSupportImage: Wr, isSupportJson: Yr, isSupportModel: _r, isSupportRender: Kr, isSupportText: Xr, isSupportTexture: $r, isSupportVideo: zr, isTexture: Jr, isUV: qr }, Symbol.toStringTag, { value: "Module" }));
|
|
274
|
+
var Zr = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t.START = "START", t.PROGRESS = "PROGRESS", t.PAUSE = "PAUSE", t.RESUME = "RESUME", t.LOADED = "LOADED", t.ERROR = "ERROR", t.CANCELED = "CANCELED", t))(Zr || {}), pr = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.LOADING = "LOADING", t.PAUSED = "PAUSED", t.LOADED = "LOADED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(pr || {}), vr = /* @__PURE__ */ ((t) => (t.BLOB = "BLOB", t.OBJECT = "OBJECT", t))(vr || {}), tn = /* @__PURE__ */ ((t) => (t.WAITING = "WAITING", t.UPLOADING = "UPLOADING", t.PAUSED = "PAUSED", t.COMPLETED = "COMPLETED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(tn || {}), rn = /* @__PURE__ */ ((t) => (t.START = "START", t.PROGRESS = "PROGRESS", t.PAUSE = "PAUSE", t.RESUME = "RESUME", t.UPLOADED = "UPLOADED", t.FAILED = "FAILED", t.CANCELED = "CANCELED", t))(rn || {}), nn = /* @__PURE__ */ ((t) => (t.ZH = "zh", t.EN = "en", t))(nn || {}), en = /* @__PURE__ */ ((t) => (t.PENDING = "PENDING", t.PROGRESSING = "PROGRESSING", t.ENDED = "ENDED", t.CANCELED = "CANCELED", t.BANNED = "BANNED", t))(en || {}), on = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.SELF = "SELF", t.ALL = "ALL", t))(on || {});
|
|
275
|
+
class Ue {
|
|
276
|
+
constructor(r, n, e, o) {
|
|
277
|
+
this.text = r, this.type = n, this.duration = e, this.id = o;
|
|
278
278
|
}
|
|
279
279
|
show = !0;
|
|
280
280
|
height = 20;
|
|
281
281
|
opacity = 0;
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
async function
|
|
285
|
-
const
|
|
286
|
-
return Array.from(new Uint8Array(
|
|
283
|
+
var un = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.INSTALL = "INSTALL", t.ENABLE = "ENABLE", t.OPEN = "OPEN", t.CLOSE = "CLOSE", t.DISABLE = "DISABLE", t.UNINSTALL = "UNINSTALL", t.DEBUG = "DEBUG", t))(un || {}), sn = /* @__PURE__ */ ((t) => (t.DISPLAY = "DISPLAY", t.FULL = "FULL", t.HP_BOX = "HP_BOX", t.VR = "VR", t.MR = "MR", t))(sn || {}), I = /* @__PURE__ */ ((t) => (t.EDITOR = "EDITOR", t.VIEWER = "VIEWER", t.VISITOR = "VISITOR", t))(I || {}), cn = /* @__PURE__ */ ((t) => (t.DEFAULT = "DEFAULT", t.DESCRIPTION = "DESCRIPTION", t))(cn || {}), an = /* @__PURE__ */ ((t) => (t.XS = "XS", t.SM = "SM", t.MD = "MD", t.LG = "LG", t.XL = "XL", t))(an || {}), fn = /* @__PURE__ */ ((t) => (t.DEFAULT = "DEFAULT", t.BACKGROUND = "BACKGROUND", t.LIGHT = "LIGHT", t.DARK = "DARK", t))(fn || {}), En = /* @__PURE__ */ ((t) => (t.GENERAL = "GENERAL", t.RHINE = "RHINE", t))(En || {}), ln = /* @__PURE__ */ ((t) => (t.Global = "GLOBAL", t.Step = "STEP", t.Node = "NODE", t))(ln || {}), hn = /* @__PURE__ */ ((t) => (t.UNDO = "UNDO", t.REDO = "REDO", t))(hn || {}), An = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t))(An || {}), On = /* @__PURE__ */ ((t) => (t.OSS = "OSS", t.URL = "URL", t))(On || {}), Dn = /* @__PURE__ */ ((t) => (t.TEXT = "TEXT", t.CUBE = "CUBE", t.SPHERE = "SPHERE", t.CONE = "CONE", t.PRISM = "PRISM", t.POLYHEDRON = "POLYHEDRON", t.TORUS = "TORUS", t.CYLINDER = "CYLINDER", t.ICO_SPHERE = "ICO_SPHERE", t.CAPSULE = "CAPSULE", t.PLANE = "PLANE", t))(Dn || {}), Rn = /* @__PURE__ */ ((t) => (t.BASIC = "BASIC", t.PROVIDE = "PROVIDE", t.UPLOAD = "UPLOAD", t))(Rn || {}), Nn = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.INSTALL = "INSTALL", t.ENABLE = "ENABLE", t.OPEN = "OPEN", t))(Nn || {}), Tn = /* @__PURE__ */ ((t) => (t.LATEST_STABLE = "LATEST_STABLE", t.LATEST_NIGHTLY = "LATEST_NIGHTLY", t.LATEST_CANARY = "LATEST_CANARY", t))(Tn || {}), Ln = /* @__PURE__ */ ((t) => (t.TEXTURE = "TEXTURE", t.MATERIAL = "MATERIAL", t.UV = "UV", t))(Ln || {}), Sn = /* @__PURE__ */ ((t) => (t.FILE = "FILE", t.ATTACH = "ATTACH", t))(Sn || {}), In = /* @__PURE__ */ ((t) => (t.NONE = "NONE", t.METAL = "METAL", t.PLASTIC = "PLASTIC", t.GLASS = "GLASS", t.WOOD = "WOOD", t.MIRROR = "MIRROR", t.CRYSTAL = "CRYSTAL", t.PAINT = "PAINT", t.CLOTH = "CLOTH", t))(In || {}), Cn = /* @__PURE__ */ ((t) => (t.ADD = "ADD", t.REMOVE = "REMOVE", t))(Cn || {}), Pn = /* @__PURE__ */ ((t) => (t.SYNC = "SYNC", t.STEP = "STEP", t.SELECT = "SELECT", t.ADD = "ADD", t.UPDATE = "UPDATE", t.DELETE = "DELETE", t))(Pn || {});
|
|
284
|
+
async function dn(t) {
|
|
285
|
+
const r = await crypto.subtle.digest("SHA-256", t);
|
|
286
|
+
return Array.from(new Uint8Array(r)).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
287
287
|
}
|
|
288
288
|
const H = {
|
|
289
|
-
computeSHA256:
|
|
289
|
+
computeSHA256: dn
|
|
290
290
|
};
|
|
291
|
-
function
|
|
292
|
-
const
|
|
293
|
-
return
|
|
291
|
+
function mn(t, r) {
|
|
292
|
+
const n = [];
|
|
293
|
+
return n.push({ path: t, value: r }), n;
|
|
294
294
|
}
|
|
295
|
-
const
|
|
296
|
-
recursPathValue:
|
|
295
|
+
const xe = {
|
|
296
|
+
recursPathValue: mn
|
|
297
297
|
};
|
|
298
298
|
function St(t) {
|
|
299
|
-
const
|
|
300
|
-
return t.toFixed(
|
|
301
|
-
}
|
|
302
|
-
function
|
|
303
|
-
const
|
|
304
|
-
let
|
|
305
|
-
for (; t >= 1024 &&
|
|
306
|
-
t /= 1024,
|
|
299
|
+
const r = Math.floor(t).toString().length, n = r <= 1 ? 2 : 1;
|
|
300
|
+
return t.toFixed(n);
|
|
301
|
+
}
|
|
302
|
+
function wn(t) {
|
|
303
|
+
const r = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
304
|
+
let n = 0;
|
|
305
|
+
for (; t >= 1024 && n < r.length - 1; )
|
|
306
|
+
t /= 1024, n++;
|
|
307
307
|
let e = St(t);
|
|
308
|
-
return e.endsWith(".0") && (e = e.slice(0, -2)), e.endsWith(".00") && (e = e.slice(0, -3)), `${e} ${n
|
|
308
|
+
return e.endsWith(".0") && (e = e.slice(0, -2)), e.endsWith(".00") && (e = e.slice(0, -3)), `${e} ${r[n]}`;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
const
|
|
312
|
-
return
|
|
310
|
+
function gn(t) {
|
|
311
|
+
const r = t.lastIndexOf(".");
|
|
312
|
+
return r === -1 ? [t, ""] : [t.substring(0, r), t.substring(r + 1)];
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Un(t) {
|
|
315
315
|
return t ? t instanceof File ? [t] : t instanceof FileList ? Array.from(t) : t : [];
|
|
316
316
|
}
|
|
317
317
|
async function It(t) {
|
|
318
|
-
const
|
|
318
|
+
const r = [0.25, 0.5, 0.75], n = 64 * 1024, e = 1024 * 1024;
|
|
319
319
|
if (t.size <= e) {
|
|
320
320
|
const E = await t.arrayBuffer();
|
|
321
321
|
return H.computeSHA256(E);
|
|
322
322
|
}
|
|
323
|
-
const o =
|
|
323
|
+
const o = r.map((E) => Math.floor(t.size * E)), s = await Promise.all(
|
|
324
324
|
o.map(async (E) => {
|
|
325
|
-
const
|
|
325
|
+
const A = E, T = Math.min(A + n, t.size), L = t.slice(A, T), S = await L.arrayBuffer();
|
|
326
326
|
return H.computeSHA256(S);
|
|
327
327
|
})
|
|
328
|
-
), i = new TextEncoder(),
|
|
329
|
-
return H.computeSHA256(
|
|
328
|
+
), i = new TextEncoder(), f = s.join(""), h = i.encode(f);
|
|
329
|
+
return H.computeSHA256(h);
|
|
330
330
|
}
|
|
331
|
-
async function
|
|
332
|
-
if (
|
|
331
|
+
async function xn(t, r, n, e) {
|
|
332
|
+
if (r === t.name && n === t.size)
|
|
333
333
|
if (e) {
|
|
334
334
|
if (e === await It(t))
|
|
335
335
|
return !0;
|
|
@@ -337,14 +337,14 @@ async function Hn(t, n, r, e) {
|
|
|
337
337
|
return !0;
|
|
338
338
|
return !1;
|
|
339
339
|
}
|
|
340
|
-
async function
|
|
341
|
-
const
|
|
342
|
-
if (!
|
|
343
|
-
throw new Error(`HEAD request failed with status: ${String(
|
|
344
|
-
const
|
|
340
|
+
async function Bn(t) {
|
|
341
|
+
const r = await fetch(t, { method: "HEAD" });
|
|
342
|
+
if (!r.ok)
|
|
343
|
+
throw new Error(`HEAD request failed with status: ${String(r.status)}`);
|
|
344
|
+
const n = r.headers.get("Content-Length");
|
|
345
345
|
let e;
|
|
346
|
-
if (
|
|
347
|
-
if (e = parseInt(
|
|
346
|
+
if (n) {
|
|
347
|
+
if (e = parseInt(n, 10), isNaN(e))
|
|
348
348
|
throw new Error("Invalid file size from header");
|
|
349
349
|
} else {
|
|
350
350
|
const i = await fetch(t);
|
|
@@ -354,475 +354,538 @@ async function Vn(t) {
|
|
|
354
354
|
}
|
|
355
355
|
return { name: new URL(t).pathname.split("/").pop() ?? "unknown", size: e };
|
|
356
356
|
}
|
|
357
|
-
const
|
|
357
|
+
const Be = {
|
|
358
358
|
to3n: St,
|
|
359
|
-
convertBytesToHigherUnit:
|
|
360
|
-
splitName:
|
|
361
|
-
ensureFileArray:
|
|
359
|
+
convertBytesToHigherUnit: wn,
|
|
360
|
+
splitName: gn,
|
|
361
|
+
ensureFileArray: Un,
|
|
362
362
|
chunkHash: It,
|
|
363
|
-
isSameFile:
|
|
364
|
-
getFileInfo:
|
|
363
|
+
isSameFile: xn,
|
|
364
|
+
getFileInfo: Bn
|
|
365
365
|
};
|
|
366
|
-
function
|
|
366
|
+
function bn(t) {
|
|
367
367
|
return t * (180 / Math.PI);
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Gn(t) {
|
|
370
370
|
return t * (Math.PI / 180);
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
return Math.abs(t -
|
|
372
|
+
function Hn(t, r, n = 1e-6) {
|
|
373
|
+
return Math.abs(t - r) < n;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
return Math.sqrt((
|
|
375
|
+
function Vn(t, r, n, e) {
|
|
376
|
+
return Math.sqrt((n - t) ** 2 + (e - r) ** 2);
|
|
377
377
|
}
|
|
378
|
-
function
|
|
379
|
-
return Math.sqrt((e - t) ** 2 + (o -
|
|
378
|
+
function Mn(t, r, n, e, o, s) {
|
|
379
|
+
return Math.sqrt((e - t) ** 2 + (o - r) ** 2 + (s - n) ** 2);
|
|
380
380
|
}
|
|
381
|
-
function kn(t,
|
|
382
|
-
let
|
|
383
|
-
for (let o = 0; o <
|
|
384
|
-
const s = Math.abs(t -
|
|
385
|
-
s <
|
|
381
|
+
function kn(t, r) {
|
|
382
|
+
let n = 1 / 0, e = -1;
|
|
383
|
+
for (let o = 0; o < r.length; o++) {
|
|
384
|
+
const s = Math.abs(t - r[o]);
|
|
385
|
+
s < n && (n = s, e = o);
|
|
386
386
|
}
|
|
387
387
|
return e;
|
|
388
388
|
}
|
|
389
|
-
const
|
|
390
|
-
toDegrees:
|
|
391
|
-
toRadians:
|
|
392
|
-
approximatelyEqual:
|
|
393
|
-
getDistance:
|
|
394
|
-
getDistance3d:
|
|
389
|
+
const yn = {
|
|
390
|
+
toDegrees: bn,
|
|
391
|
+
toRadians: Gn,
|
|
392
|
+
approximatelyEqual: Hn,
|
|
393
|
+
getDistance: Vn,
|
|
394
|
+
getDistance3d: Mn,
|
|
395
395
|
getNearestNumberIndex: kn
|
|
396
396
|
};
|
|
397
|
-
function
|
|
397
|
+
function M(t) {
|
|
398
398
|
if (t.type.includes("touch")) {
|
|
399
|
-
const
|
|
400
|
-
if (
|
|
401
|
-
const i =
|
|
402
|
-
return [
|
|
399
|
+
const n = t;
|
|
400
|
+
if (n.touches.length) {
|
|
401
|
+
const i = n.touches[0], f = i.clientX, h = i.clientY;
|
|
402
|
+
return [f, h];
|
|
403
403
|
}
|
|
404
|
-
const e =
|
|
404
|
+
const e = n.changedTouches[0], o = e.clientX, s = e.clientY;
|
|
405
405
|
return [o, s];
|
|
406
406
|
}
|
|
407
|
-
const
|
|
408
|
-
return [
|
|
407
|
+
const r = t;
|
|
408
|
+
return [r.clientX, r.clientY];
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
const [
|
|
412
|
-
return
|
|
410
|
+
function Fn(t, r) {
|
|
411
|
+
const [n, e] = M(t), [o, s] = M(r);
|
|
412
|
+
return yn.getDistance(n, e, o, s);
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function Wn(t) {
|
|
415
415
|
t.preventDefault();
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function _n(t) {
|
|
418
418
|
t.stopPropagation();
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function zn(t) {
|
|
421
421
|
t.preventDefault(), t.stopPropagation();
|
|
422
422
|
}
|
|
423
|
-
const
|
|
424
|
-
getEventPosition:
|
|
425
|
-
getDistanceBetweenEvents:
|
|
426
|
-
preventDefaultListener:
|
|
427
|
-
stopPropagationListener:
|
|
428
|
-
preventDefaultStopPropagationListener:
|
|
423
|
+
const be = {
|
|
424
|
+
getEventPosition: M,
|
|
425
|
+
getDistanceBetweenEvents: Fn,
|
|
426
|
+
preventDefaultListener: Wn,
|
|
427
|
+
stopPropagationListener: _n,
|
|
428
|
+
preventDefaultStopPropagationListener: zn
|
|
429
429
|
};
|
|
430
|
-
async function
|
|
431
|
-
let
|
|
432
|
-
for (let e = 0; e <
|
|
430
|
+
async function Xn(t, r = 3) {
|
|
431
|
+
let n;
|
|
432
|
+
for (let e = 0; e < r; e++)
|
|
433
433
|
try {
|
|
434
434
|
const o = await fetch(t);
|
|
435
435
|
if (!o.ok)
|
|
436
436
|
throw new Error(`HTTP Error: Status ${o.status.toString()}`);
|
|
437
437
|
return await o.json();
|
|
438
438
|
} catch (o) {
|
|
439
|
-
|
|
439
|
+
n = o, console.log(`Attempt ${(e + 1).toString()} Failed: Retrying...
|
|
440
440
|
${t}`);
|
|
441
441
|
}
|
|
442
|
-
throw
|
|
442
|
+
throw n;
|
|
443
443
|
}
|
|
444
|
-
async function
|
|
445
|
-
let
|
|
446
|
-
for (let e = 0; e <
|
|
444
|
+
async function Yn(t, r = 3) {
|
|
445
|
+
let n;
|
|
446
|
+
for (let e = 0; e < r; e++)
|
|
447
447
|
try {
|
|
448
448
|
const o = await fetch(t);
|
|
449
449
|
if (!o.ok)
|
|
450
450
|
throw new Error(`HTTP Error: Status ${o.status.toString()}`);
|
|
451
451
|
return await o.blob();
|
|
452
452
|
} catch (o) {
|
|
453
|
-
|
|
453
|
+
n = o, console.log(`Attempt ${(e + 1).toString()} Failed: Retrying...
|
|
454
454
|
${t}`);
|
|
455
455
|
}
|
|
456
|
-
throw
|
|
456
|
+
throw n;
|
|
457
457
|
}
|
|
458
|
-
const
|
|
459
|
-
fetchJsonWithRetry:
|
|
460
|
-
fetchBlobWithRetry:
|
|
458
|
+
const Ge = {
|
|
459
|
+
fetchJsonWithRetry: Xn,
|
|
460
|
+
fetchBlobWithRetry: Yn
|
|
461
461
|
};
|
|
462
|
-
function z(t,
|
|
463
|
-
const
|
|
464
|
-
return Math.round(t *
|
|
462
|
+
function z(t, r) {
|
|
463
|
+
const n = 10 ** r;
|
|
464
|
+
return Math.round(t * n) / n;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function jn(t) {
|
|
467
467
|
return z(t, 2);
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function Kn(t) {
|
|
470
470
|
return z(t, 3);
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function $n(t) {
|
|
473
473
|
return typeof t == "number" && !isNaN(t) && isFinite(t);
|
|
474
474
|
}
|
|
475
475
|
const c = {
|
|
476
476
|
roundToX: z,
|
|
477
|
-
r2:
|
|
478
|
-
r3:
|
|
479
|
-
isValidNumber:
|
|
477
|
+
r2: jn,
|
|
478
|
+
r3: Kn,
|
|
479
|
+
isValidNumber: $n
|
|
480
480
|
};
|
|
481
|
-
function
|
|
481
|
+
function Jn(t) {
|
|
482
482
|
return t === "space" ? I.EDITOR : t === "m" ? I.VISITOR : I.VIEWER;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Qn(t) {
|
|
485
485
|
return new URLSearchParams(window.location.search).get(t) ?? void 0;
|
|
486
486
|
}
|
|
487
|
-
const
|
|
488
|
-
getPageTypeBySpaceText:
|
|
489
|
-
getSearchParams:
|
|
487
|
+
const He = {
|
|
488
|
+
getPageTypeBySpaceText: Jn,
|
|
489
|
+
getSearchParams: Qn
|
|
490
490
|
};
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
491
|
+
class l {
|
|
492
|
+
/**
|
|
493
|
+
* 将字符串路径转换为 RvPath 数组
|
|
494
|
+
* @param path - 以点分隔的路径字符串,如 "a.0.b"
|
|
495
|
+
* @returns RvPath 数组,数字字符串会被转换为数字类型
|
|
496
|
+
* @example
|
|
497
|
+
* RvUtils.makeRvPath("a.0.b") // ['a', 0, 'b']
|
|
498
|
+
*/
|
|
499
|
+
static makeRvPath(r) {
|
|
500
|
+
const n = [];
|
|
501
|
+
for (const e of r.split(".")) {
|
|
502
|
+
const o = parseInt(e, 10);
|
|
503
|
+
!isNaN(o) && e === o.toString() ? n.push(o) : n.push(e);
|
|
504
|
+
}
|
|
505
|
+
return n;
|
|
496
506
|
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
return typeof t != "string" ? dt(t) : t;
|
|
507
|
-
}
|
|
508
|
-
function re(t, n) {
|
|
509
|
-
const r = A(n);
|
|
510
|
-
let e = t;
|
|
511
|
-
for (const o of r) {
|
|
512
|
-
if (e == null)
|
|
513
|
-
return;
|
|
514
|
-
e = e[o];
|
|
507
|
+
/**
|
|
508
|
+
* 将 RvPath 数组转换为字符串路径
|
|
509
|
+
* @param path - RvPath 数组
|
|
510
|
+
* @returns 以点分隔的路径字符串
|
|
511
|
+
* @example
|
|
512
|
+
* RvUtils.makeRvPathString(['a', 0, 'b']) // "a.0.b"
|
|
513
|
+
*/
|
|
514
|
+
static makeRvPathString(r) {
|
|
515
|
+
return r.join(".");
|
|
515
516
|
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
517
|
+
/**
|
|
518
|
+
* 确保路径为 RvPath 数组格式
|
|
519
|
+
* @param path - 字符串路径或 RvPath 数组
|
|
520
|
+
* @returns RvPath 数组
|
|
521
|
+
*/
|
|
522
|
+
static ensureRvPath(r) {
|
|
523
|
+
return typeof r == "string" ? l.makeRvPath(r) : r;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* 确保路径为字符串格式
|
|
527
|
+
* @param path - 字符串路径或 RvPath 数组
|
|
528
|
+
* @returns 字符串路径
|
|
529
|
+
*/
|
|
530
|
+
static ensureRvPathString(r) {
|
|
531
|
+
return typeof r != "string" ? l.makeRvPathString(r) : r;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* 根据路径从对象中获取值
|
|
535
|
+
* @typeParam T - 返回值的类型
|
|
536
|
+
* @param source - 源对象
|
|
537
|
+
* @param path - 访问路径
|
|
538
|
+
* @returns 路径对应的值,如果路径不存在则返回 undefined
|
|
539
|
+
* @example
|
|
540
|
+
* RvUtils.getByRvPath({ a: { b: 1 } }, "a.b") // 1
|
|
541
|
+
*/
|
|
542
|
+
static getByRvPath(r, n) {
|
|
543
|
+
const e = l.ensureRvPath(n);
|
|
544
|
+
let o = r;
|
|
545
|
+
for (const s of e) {
|
|
546
|
+
if (o == null)
|
|
547
|
+
return;
|
|
548
|
+
o = o[s];
|
|
549
|
+
}
|
|
550
|
+
return o;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* 根据路径设置对象中的值
|
|
554
|
+
* @param source - 源对象
|
|
555
|
+
* @param path - 设置路径
|
|
556
|
+
* @param value - 要设置的值
|
|
557
|
+
* @example
|
|
558
|
+
* const obj = { a: { b: 1 } }
|
|
559
|
+
* RvUtils.setByRvPath(obj, "a.b", 2) // obj.a.b === 2
|
|
560
|
+
*/
|
|
561
|
+
static setByRvPath(r, n, e) {
|
|
562
|
+
const o = l.ensureRvPath(n);
|
|
563
|
+
let s = r;
|
|
564
|
+
for (let i = 0; i < o.length - 1; i++)
|
|
565
|
+
s = s[o[i]];
|
|
566
|
+
s[o[o.length - 1]] = e;
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* 检查两段路径是否完全重叠
|
|
570
|
+
* 长度可不同,从开头开始每一项比较,直到有一方结束,是否全部相同
|
|
571
|
+
* @param from - 第一个路径
|
|
572
|
+
* @param target - 第二个路径
|
|
573
|
+
* @returns 如果路径重叠则返回 true
|
|
574
|
+
* @example
|
|
575
|
+
* RvUtils.checkRvPathOverlay("a.b", "a.b.c") // true
|
|
576
|
+
* RvUtils.checkRvPathOverlay("a.b", "a.c") // false
|
|
577
|
+
*/
|
|
578
|
+
static checkRvPathOverlay(r, n) {
|
|
579
|
+
const e = l.ensureRvPath(r), o = l.ensureRvPath(n), s = e.length > o.length ? o.length : e.length;
|
|
580
|
+
for (let i = 0; i < s; i++)
|
|
581
|
+
if (e[i] != o[i])
|
|
582
|
+
return !1;
|
|
583
|
+
return !0;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* 检查路径是否与目标列表中的任意路径重叠
|
|
587
|
+
* @param from - 要检查的路径
|
|
588
|
+
* @param targetList - 目标路径列表
|
|
589
|
+
* @returns 如果与任意目标路径重叠则返回 true
|
|
590
|
+
*/
|
|
591
|
+
static checkAnyRvPathOverlay(r, n) {
|
|
592
|
+
const e = l.ensureRvPath(r);
|
|
593
|
+
return n.some((o) => l.checkRvPathOverlay(e, o));
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* 检查两段路径是否完全相同
|
|
597
|
+
* @param from - 第一个路径
|
|
598
|
+
* @param target - 第二个路径
|
|
599
|
+
* @returns 如果路径完全相同则返回 true
|
|
600
|
+
* @example
|
|
601
|
+
* RvUtils.checkRvPathSame("a.b", "a.b") // true
|
|
602
|
+
* RvUtils.checkRvPathSame("a.b", "a.b.c") // false
|
|
603
|
+
*/
|
|
604
|
+
static checkRvPathSame(r, n) {
|
|
605
|
+
const e = l.ensureRvPath(r), o = l.ensureRvPath(n);
|
|
606
|
+
if (e.length !== o.length)
|
|
529
607
|
return !1;
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
608
|
+
for (let s = 0; s < e.length; s++)
|
|
609
|
+
if (e[s] !== o[s])
|
|
610
|
+
return !1;
|
|
611
|
+
return !0;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* 检查路径是否与目标列表中的任意路径完全相同
|
|
615
|
+
* @param from - 要检查的路径
|
|
616
|
+
* @param targetList - 目标路径列表
|
|
617
|
+
* @returns 如果与任意目标路径相同则返回 true
|
|
618
|
+
*/
|
|
619
|
+
static checkAnyRvPathSame(r, n) {
|
|
620
|
+
const e = l.ensureRvPath(r);
|
|
621
|
+
return n.some((o) => l.checkRvPathSame(e, o));
|
|
622
|
+
}
|
|
535
623
|
}
|
|
536
|
-
function
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
return !1;
|
|
540
|
-
for (let o = 0; o < r.length; o++)
|
|
541
|
-
if (r[o] !== e[o])
|
|
542
|
-
return !1;
|
|
543
|
-
return !0;
|
|
544
|
-
}
|
|
545
|
-
function oe(t, n) {
|
|
546
|
-
const r = A(t);
|
|
547
|
-
return n.some((e) => Ut(r, e));
|
|
548
|
-
}
|
|
549
|
-
const Ye = {
|
|
550
|
-
makeRvPath: Ct,
|
|
551
|
-
makeRvPathString: dt,
|
|
552
|
-
ensureRvPath: A,
|
|
553
|
-
ensureRvPathString: te,
|
|
554
|
-
getByRvPath: re,
|
|
555
|
-
setByRvPath: ne,
|
|
556
|
-
checkRvPathSame: Ut,
|
|
557
|
-
checkAnyRvPathSame: oe,
|
|
558
|
-
checkRvPathOverlay: Pt,
|
|
559
|
-
checkAnyRvPathOverlay: ee
|
|
560
|
-
};
|
|
561
|
-
function je(t) {
|
|
562
|
-
return new Promise((n) => {
|
|
563
|
-
setTimeout(n, t);
|
|
624
|
+
function Ve(t) {
|
|
625
|
+
return new Promise((r) => {
|
|
626
|
+
setTimeout(r, t);
|
|
564
627
|
});
|
|
565
628
|
}
|
|
566
|
-
function
|
|
567
|
-
if (
|
|
629
|
+
function Me(t, r) {
|
|
630
|
+
if (r === 0)
|
|
568
631
|
return t;
|
|
569
|
-
let
|
|
632
|
+
let n, e = 0, o, s = null;
|
|
570
633
|
function i() {
|
|
571
|
-
e = Date.now(),
|
|
634
|
+
e = Date.now(), n && t.apply(o, n);
|
|
572
635
|
}
|
|
573
|
-
return function(...
|
|
574
|
-
const E = Date.now(),
|
|
575
|
-
if (
|
|
636
|
+
return function(...h) {
|
|
637
|
+
const E = Date.now(), A = E - e;
|
|
638
|
+
if (n = h, o = this, e === 0) {
|
|
576
639
|
setTimeout(i, 1);
|
|
577
640
|
return;
|
|
578
641
|
}
|
|
579
|
-
s && (clearTimeout(s), s = null),
|
|
642
|
+
s && (clearTimeout(s), s = null), A < r ? s = setTimeout(() => {
|
|
580
643
|
i(), s = null;
|
|
581
|
-
},
|
|
644
|
+
}, r - A) : i();
|
|
582
645
|
};
|
|
583
646
|
}
|
|
584
|
-
function
|
|
585
|
-
const
|
|
647
|
+
function qn(t) {
|
|
648
|
+
const r = Math.floor(t / 3600), n = Math.floor(t % 3600 / 60), e = Math.floor(t % 60);
|
|
586
649
|
return [
|
|
587
|
-
|
|
588
|
-
String(
|
|
650
|
+
r > 0 ? String(r).padStart(2, "0") : null,
|
|
651
|
+
String(n).padStart(2, "0"),
|
|
589
652
|
String(e).padStart(2, "0")
|
|
590
653
|
].filter(Boolean).join(":");
|
|
591
654
|
}
|
|
592
|
-
function
|
|
593
|
-
const
|
|
594
|
-
return
|
|
655
|
+
function Zn(t = /* @__PURE__ */ new Date()) {
|
|
656
|
+
const r = t.getFullYear().toString(), n = (t.getMonth() + 1).toString().padStart(2, "0"), e = t.getDate().toString().padStart(2, "0"), o = t.getHours().toString().padStart(2, "0"), s = t.getMinutes().toString().padStart(2, "0"), i = t.getSeconds().toString().padStart(2, "0"), f = t.getMilliseconds().toString().padStart(3, "0");
|
|
657
|
+
return r + n + e + o + s + i + f;
|
|
595
658
|
}
|
|
596
|
-
function
|
|
597
|
-
const
|
|
659
|
+
function pn(t, r) {
|
|
660
|
+
const n = r - t, e = Math.floor(n / 1e3), o = Math.floor(e / 3600), s = Math.floor(e % 3600 / 60), i = e % 60;
|
|
598
661
|
return `${o > 0 ? `${o.toString().padStart(2, "0")}:` : ""}${s.toString().padStart(2, "0")}:${i.toString().padStart(2, "0")}`;
|
|
599
662
|
}
|
|
600
|
-
const
|
|
601
|
-
convertTimeText:
|
|
602
|
-
formatDateTo17Digits:
|
|
603
|
-
formatDuration:
|
|
663
|
+
const ke = {
|
|
664
|
+
convertTimeText: qn,
|
|
665
|
+
formatDateTo17Digits: Zn,
|
|
666
|
+
formatDuration: pn
|
|
604
667
|
};
|
|
605
|
-
function
|
|
606
|
-
const
|
|
607
|
-
return
|
|
668
|
+
function vn(t) {
|
|
669
|
+
const r = new RegExp(`(^|&)${t}=([^&]*)(&|$)`, "i"), n = window.location.search.substring(1).match(r);
|
|
670
|
+
return n != null ? decodeURIComponent(n[2]) : "";
|
|
608
671
|
}
|
|
609
|
-
function
|
|
610
|
-
const
|
|
611
|
-
return
|
|
672
|
+
function te(t) {
|
|
673
|
+
const r = new RegExp(`(^|&)${t}=([^&]*)(&|$)`, "i"), n = window.location.hash.substring(1).match(r);
|
|
674
|
+
return n != null ? decodeURIComponent(n[2]) : "";
|
|
612
675
|
}
|
|
613
|
-
function
|
|
676
|
+
function re(t) {
|
|
614
677
|
return new RegExp(
|
|
615
678
|
"^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?:\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
|
|
616
679
|
"i"
|
|
617
680
|
).test(t);
|
|
618
681
|
}
|
|
619
|
-
async function
|
|
682
|
+
async function ne() {
|
|
620
683
|
const t = window.location.href;
|
|
621
|
-
return
|
|
684
|
+
return Ct(t);
|
|
622
685
|
}
|
|
623
|
-
async function
|
|
686
|
+
async function ee(t) {
|
|
624
687
|
try {
|
|
625
688
|
return await navigator.clipboard.writeText(t), !0;
|
|
626
689
|
} catch {
|
|
627
690
|
return !1;
|
|
628
691
|
}
|
|
629
692
|
}
|
|
630
|
-
async function
|
|
693
|
+
async function Ct(t) {
|
|
631
694
|
try {
|
|
632
695
|
return await navigator.clipboard.writeText(t), !0;
|
|
633
696
|
} catch {
|
|
634
697
|
return !1;
|
|
635
698
|
}
|
|
636
699
|
}
|
|
637
|
-
function
|
|
700
|
+
function oe(t, r = !0) {
|
|
638
701
|
try {
|
|
639
702
|
const o = new URL(t).pathname.split("/").pop() ?? "";
|
|
640
|
-
return !
|
|
703
|
+
return !r && o.includes(".") ? o.substring(0, o.lastIndexOf(".")) : o;
|
|
641
704
|
} catch {
|
|
642
705
|
return "";
|
|
643
706
|
}
|
|
644
707
|
}
|
|
645
|
-
const
|
|
646
|
-
getParam:
|
|
647
|
-
getHashParam:
|
|
648
|
-
check:
|
|
649
|
-
copyCurrentUrlToClipboard:
|
|
650
|
-
copyText:
|
|
651
|
-
trySetClipboard:
|
|
652
|
-
extractFilenameFromUrl:
|
|
708
|
+
const ye = {
|
|
709
|
+
getParam: vn,
|
|
710
|
+
getHashParam: te,
|
|
711
|
+
check: re,
|
|
712
|
+
copyCurrentUrlToClipboard: ne,
|
|
713
|
+
copyText: ee,
|
|
714
|
+
trySetClipboard: Ct,
|
|
715
|
+
extractFilenameFromUrl: oe
|
|
653
716
|
};
|
|
654
|
-
function
|
|
655
|
-
return t ?
|
|
656
|
-
}
|
|
657
|
-
function
|
|
658
|
-
return t ?
|
|
659
|
-
c.roundToX(t.x,
|
|
660
|
-
c.roundToX(t.y,
|
|
661
|
-
c.roundToX(t.z,
|
|
662
|
-
] :
|
|
663
|
-
}
|
|
664
|
-
function
|
|
665
|
-
return t ?
|
|
666
|
-
c.roundToX(t.x,
|
|
667
|
-
c.roundToX(t.y,
|
|
668
|
-
c.roundToX(t.z,
|
|
669
|
-
c.roundToX(t.w,
|
|
670
|
-
] :
|
|
671
|
-
}
|
|
672
|
-
function
|
|
673
|
-
return { x:
|
|
674
|
-
}
|
|
675
|
-
function
|
|
717
|
+
function ue(t, r = -1, n = [0, 0]) {
|
|
718
|
+
return t ? r === -1 ? [t.x, t.y] : [c.roundToX(t.x, r), c.roundToX(t.y, r)] : n;
|
|
719
|
+
}
|
|
720
|
+
function se(t, r = -1, n = [0, 0, 0]) {
|
|
721
|
+
return t ? r === -1 ? [t.x, t.y, t.z] : [
|
|
722
|
+
c.roundToX(t.x, r),
|
|
723
|
+
c.roundToX(t.y, r),
|
|
724
|
+
c.roundToX(t.z, r)
|
|
725
|
+
] : n;
|
|
726
|
+
}
|
|
727
|
+
function ie(t, r = -1, n = [0, 0, 0, 0]) {
|
|
728
|
+
return t ? r === -1 ? [t.x, t.y, t.z, t.w] : [
|
|
729
|
+
c.roundToX(t.x, r),
|
|
730
|
+
c.roundToX(t.y, r),
|
|
731
|
+
c.roundToX(t.z, r),
|
|
732
|
+
c.roundToX(t.w, r)
|
|
733
|
+
] : n;
|
|
734
|
+
}
|
|
735
|
+
function ce(t, r) {
|
|
736
|
+
return { x: r.x * t, y: r.y * t, z: r.z * t };
|
|
737
|
+
}
|
|
738
|
+
function Pt(t) {
|
|
676
739
|
return { x: t.x * 180 / Math.PI, y: t.y * 180 / Math.PI, z: t.z * 180 / Math.PI };
|
|
677
740
|
}
|
|
678
|
-
function
|
|
741
|
+
function ae(t) {
|
|
679
742
|
return { x: t.x * Math.PI / 180, y: t.y * Math.PI / 180, z: t.z * Math.PI / 180 };
|
|
680
743
|
}
|
|
681
|
-
function
|
|
682
|
-
return
|
|
744
|
+
function fe(t) {
|
|
745
|
+
return k.RotationYawPitchRoll(t.y, t.x, t.z);
|
|
683
746
|
}
|
|
684
|
-
function
|
|
685
|
-
return
|
|
747
|
+
function Ee(t) {
|
|
748
|
+
return k.RotationYawPitchRoll(
|
|
686
749
|
t.y * Math.PI / 180,
|
|
687
750
|
t.x * Math.PI / 180,
|
|
688
751
|
t.z * Math.PI / 180
|
|
689
752
|
);
|
|
690
753
|
}
|
|
691
|
-
function
|
|
692
|
-
return new
|
|
754
|
+
function le(t) {
|
|
755
|
+
return new pt(t.x, t.y, t.z);
|
|
693
756
|
}
|
|
694
|
-
function
|
|
757
|
+
function he(t) {
|
|
695
758
|
return { x: t.x, y: t.y, z: t.z };
|
|
696
759
|
}
|
|
697
|
-
function
|
|
760
|
+
function Ae(t, r = 0) {
|
|
698
761
|
return {
|
|
699
|
-
x: c.roundToX(t.x,
|
|
700
|
-
y: c.roundToX(t.y,
|
|
701
|
-
z: c.roundToX(t.z,
|
|
762
|
+
x: c.roundToX(t.x, r),
|
|
763
|
+
y: c.roundToX(t.y, r),
|
|
764
|
+
z: c.roundToX(t.z, r)
|
|
702
765
|
};
|
|
703
766
|
}
|
|
704
|
-
function
|
|
767
|
+
function Oe(t) {
|
|
705
768
|
return isFinite(t.x) && isFinite(t.y) && isFinite(t.z);
|
|
706
769
|
}
|
|
707
|
-
function
|
|
770
|
+
function De(t) {
|
|
708
771
|
return t.x !== 0 && t.y !== 0 && t.z !== 0;
|
|
709
772
|
}
|
|
710
|
-
function
|
|
711
|
-
return { x:
|
|
773
|
+
function Re(t, r) {
|
|
774
|
+
return { x: r.x * t, y: r.y * t, z: r.z * t, w: r.w * t };
|
|
712
775
|
}
|
|
713
776
|
function X(t) {
|
|
714
|
-
return new
|
|
777
|
+
return new k(t.x, t.y, t.z, t.w);
|
|
715
778
|
}
|
|
716
|
-
function
|
|
779
|
+
function Ne(t) {
|
|
717
780
|
return X(t).toEulerAngles();
|
|
718
781
|
}
|
|
719
|
-
function
|
|
720
|
-
const
|
|
721
|
-
return
|
|
782
|
+
function Te(t) {
|
|
783
|
+
const r = X(t);
|
|
784
|
+
return Pt(r.toEulerAngles());
|
|
722
785
|
}
|
|
723
|
-
function
|
|
786
|
+
function dt(t) {
|
|
724
787
|
return "w" in t;
|
|
725
788
|
}
|
|
726
|
-
function
|
|
727
|
-
return
|
|
789
|
+
function Le(t) {
|
|
790
|
+
return dt(t) ? [t.x, t.y, t.z, t.w] : [t.x, t.y, t.z];
|
|
728
791
|
}
|
|
729
|
-
function
|
|
792
|
+
function Se(t) {
|
|
730
793
|
return { x: t.x, y: t.y, z: t.z, w: t.w };
|
|
731
794
|
}
|
|
732
|
-
function
|
|
733
|
-
return
|
|
734
|
-
c.roundToX(t.x,
|
|
735
|
-
c.roundToX(t.y,
|
|
736
|
-
c.roundToX(t.z,
|
|
737
|
-
c.roundToX(t.w,
|
|
738
|
-
] : [c.roundToX(t.x,
|
|
739
|
-
}
|
|
740
|
-
const
|
|
741
|
-
xyToArray:
|
|
742
|
-
xyzToArray:
|
|
743
|
-
xyzwToArray:
|
|
744
|
-
scaleV3:
|
|
745
|
-
radiansToDegrees:
|
|
746
|
-
degreeToRadians:
|
|
747
|
-
radiansToQuaternion:
|
|
748
|
-
degreesToQuaternion:
|
|
749
|
-
toVector3:
|
|
750
|
-
fromVector3:
|
|
751
|
-
withRound:
|
|
752
|
-
isFiniteVector:
|
|
753
|
-
noZero:
|
|
754
|
-
scaleV4:
|
|
795
|
+
function Ie(t, r = 0) {
|
|
796
|
+
return dt(t) ? [
|
|
797
|
+
c.roundToX(t.x, r),
|
|
798
|
+
c.roundToX(t.y, r),
|
|
799
|
+
c.roundToX(t.z, r),
|
|
800
|
+
c.roundToX(t.w, r)
|
|
801
|
+
] : [c.roundToX(t.x, r), c.roundToX(t.y, r), c.roundToX(t.z, r)];
|
|
802
|
+
}
|
|
803
|
+
const Fe = {
|
|
804
|
+
xyToArray: ue,
|
|
805
|
+
xyzToArray: se,
|
|
806
|
+
xyzwToArray: ie,
|
|
807
|
+
scaleV3: ce,
|
|
808
|
+
radiansToDegrees: Pt,
|
|
809
|
+
degreeToRadians: ae,
|
|
810
|
+
radiansToQuaternion: fe,
|
|
811
|
+
degreesToQuaternion: Ee,
|
|
812
|
+
toVector3: le,
|
|
813
|
+
fromVector3: he,
|
|
814
|
+
withRound: Ae,
|
|
815
|
+
isFiniteVector: Oe,
|
|
816
|
+
noZero: De,
|
|
817
|
+
scaleV4: Re,
|
|
755
818
|
toQuaternionVector: X,
|
|
756
|
-
toEulerRadians:
|
|
757
|
-
toEulerDegrees:
|
|
758
|
-
toArray:
|
|
759
|
-
fromQuaternion:
|
|
760
|
-
toArrayWithRound4:
|
|
819
|
+
toEulerRadians: Ne,
|
|
820
|
+
toEulerDegrees: Te,
|
|
821
|
+
toArray: Le,
|
|
822
|
+
fromQuaternion: Se,
|
|
823
|
+
toArrayWithRound4: Ie
|
|
761
824
|
};
|
|
762
825
|
export {
|
|
763
|
-
|
|
764
|
-
|
|
826
|
+
ge as AcceptMime,
|
|
827
|
+
ln as AttributeType,
|
|
765
828
|
K as ContextMenu,
|
|
766
829
|
H as CryptoUtils,
|
|
767
|
-
|
|
830
|
+
xe as DataUtils,
|
|
768
831
|
Q as Dialog,
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
832
|
+
fr as DialogContentAlign,
|
|
833
|
+
de as DomNotFoundError,
|
|
834
|
+
Nn as EnableLevel,
|
|
835
|
+
Be as FileUtils,
|
|
836
|
+
ar as FirstLoadModelServiceEventType,
|
|
837
|
+
cr as FirstLoadModelServiceStatus,
|
|
838
|
+
lr as FirstLoadServiceEventType,
|
|
839
|
+
Er as FirstLoadServiceStatus,
|
|
840
|
+
cn as FocusMode,
|
|
841
|
+
hn as HistoryServiceEventType,
|
|
842
|
+
or as IconPluginPosition,
|
|
843
|
+
we as LabelInfo,
|
|
781
844
|
j as LabelTheme,
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
845
|
+
Zr as LocalDataServiceEventType,
|
|
846
|
+
pr as LocalDataStatus,
|
|
847
|
+
vr as LocalDataType,
|
|
848
|
+
nn as Locale,
|
|
849
|
+
yn as MathUtils,
|
|
850
|
+
en as MeetingStatus,
|
|
788
851
|
$ as MenuLine,
|
|
789
852
|
V as MenuLineType,
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
853
|
+
Ue as Message,
|
|
854
|
+
be as NativeEventUtils,
|
|
855
|
+
Ge as NetworkUtils,
|
|
856
|
+
er as NotFoundError,
|
|
794
857
|
c as NumberUtils,
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
858
|
+
tn as OssUploadInstanceStatus,
|
|
859
|
+
rn as OssUploadServiceEventType,
|
|
860
|
+
sn as PageMode,
|
|
798
861
|
I as PageType,
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
862
|
+
He as PageUtils,
|
|
863
|
+
un as PluginEventType,
|
|
864
|
+
ur as PluginType,
|
|
865
|
+
sr as RsModelServiceEventType,
|
|
866
|
+
ir as RsModelStatus,
|
|
867
|
+
Ln as RvAttachType,
|
|
868
|
+
Dn as RvBasicType,
|
|
869
|
+
An as RvFileServiceEventType,
|
|
870
|
+
On as RvFileType,
|
|
871
|
+
nr as RvMaterialType,
|
|
872
|
+
Rn as RvModelOrigin,
|
|
873
|
+
In as RvPresetType,
|
|
874
|
+
Cn as RvResourceServiceEventType,
|
|
875
|
+
Sn as RvResourceType,
|
|
876
|
+
l as RvUtils,
|
|
877
|
+
an as ScreenSize,
|
|
878
|
+
on as ShareMode,
|
|
879
|
+
me as StaticClassInstantiationError,
|
|
880
|
+
Pn as TChangeType,
|
|
881
|
+
fn as ThemeBackground,
|
|
819
882
|
J as ThemeColor,
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
883
|
+
En as ThemeShape,
|
|
884
|
+
ke as TimeUtils,
|
|
885
|
+
rr as TransparencyMode,
|
|
886
|
+
ye as UrlUtils,
|
|
887
|
+
Fe as VectorUtils,
|
|
888
|
+
Tn as VersionPoint,
|
|
889
|
+
Ve as sleep,
|
|
890
|
+
Me as throttle
|
|
828
891
|
};
|