mxcad 1.0.4 → 1.0.5
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/mxcad.d.ts +0 -3
- package/dist/mxcad.es.js +558 -578
- package/dist/mxcad.umd.js +49 -49
- package/dist/mxdrawassembly_min.wasm.wasm +0 -0
- package/package.json +1 -1
package/dist/mxcad.es.js
CHANGED
|
@@ -1,45 +1,28 @@
|
|
|
1
|
-
import { MxFun as I, MrxDbgUiPrPoint as oe, store as Ve, MxPaintBrush as
|
|
2
|
-
async function qt(
|
|
3
|
-
const f = await (await fetch(
|
|
1
|
+
import { MxFun as I, MrxDbgUiPrPoint as oe, store as Ve, MxPaintBrush as q, MrxDbgUiPrBaseReturn as b, MxDbCircleShape as mt, MxDbLine as Re, MxDbPolyline as Kt, MxDbRegularPolygon as jt, MxDbCircleArc as De, Mx3PointArc as Ot, MxDbEllipseShape as kt } from "mxdraw";
|
|
2
|
+
async function qt(i, o) {
|
|
3
|
+
const f = await (await fetch(i)).arrayBuffer();
|
|
4
4
|
return await WebAssembly.instantiate(f, o);
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
f.onload = () => {
|
|
9
|
-
o(f.result);
|
|
10
|
-
}, f.onerror = ({ target: { error: { code: a } } }) => {
|
|
11
|
-
n(Error(`File could not be read! Code=${a}`));
|
|
12
|
-
}, f.readAsArrayBuffer(r);
|
|
13
|
-
}), en = async (r) => {
|
|
14
|
-
let o = r;
|
|
15
|
-
return typeof r > "u" ? new Uint8Array() : (typeof r == "string" ? /data:_data\/([a-zA-Z]*);base64,([^"]*)/.test(r) ? o = atob(r.split(",")[1]).split("").map((n) => n.charCodeAt(0)) : o = await (await fetch(new URL(r, import.meta.url).href)).arrayBuffer() : (r instanceof File || r instanceof Blob) && (o = await Vt(r)), new Uint8Array(o));
|
|
16
|
-
}, tn = async (r, o) => {
|
|
17
|
-
console.log("info", `fetch ${r}`);
|
|
18
|
-
const n = await (await fetch(r)).arrayBuffer();
|
|
19
|
-
console.log("info", `${r} file size = ${n.byteLength} bytes`);
|
|
20
|
-
const f = new Blob([n], { type: o }), a = URL.createObjectURL(f);
|
|
21
|
-
return console.log("info", `${r} blob URL = ${a}`), a;
|
|
22
|
-
};
|
|
23
|
-
function Ht(r) {
|
|
24
|
-
return btoa(unescape(encodeURIComponent(r)));
|
|
6
|
+
function Vt(i) {
|
|
7
|
+
return btoa(unescape(encodeURIComponent(i)));
|
|
25
8
|
}
|
|
26
|
-
function
|
|
27
|
-
return decodeURIComponent(escape(atob(
|
|
9
|
+
function Ht(i) {
|
|
10
|
+
return decodeURIComponent(escape(atob(i)));
|
|
28
11
|
}
|
|
29
|
-
function Nt(
|
|
30
|
-
let o = JSON.stringify(
|
|
12
|
+
function Nt(i) {
|
|
13
|
+
let o = JSON.stringify(i);
|
|
31
14
|
I.callCommand("MxCAD_SetEntityData", o);
|
|
32
15
|
}
|
|
33
16
|
const _t = {
|
|
34
|
-
b64Encode:
|
|
35
|
-
b64Decode:
|
|
17
|
+
b64Encode: Vt,
|
|
18
|
+
b64Decode: Ht,
|
|
36
19
|
setMcDbEntity: Nt
|
|
37
20
|
};
|
|
38
|
-
async function
|
|
39
|
-
const
|
|
40
|
-
|
|
21
|
+
async function Ut() {
|
|
22
|
+
const i = new oe();
|
|
23
|
+
i.setMessage(`
|
|
41
24
|
\u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
|
|
42
|
-
let o = await
|
|
25
|
+
let o = await i.go();
|
|
43
26
|
if (o == null)
|
|
44
27
|
return;
|
|
45
28
|
let n = "\u6D4B\u8BD5";
|
|
@@ -47,71 +30,71 @@ async function nn() {
|
|
|
47
30
|
return;
|
|
48
31
|
let f = I.screenCoordLong2Doc(50);
|
|
49
32
|
n = _t.b64Encode(n);
|
|
50
|
-
const
|
|
33
|
+
const l = {
|
|
51
34
|
postx: o.x,
|
|
52
35
|
posty: o.y,
|
|
53
36
|
text: n,
|
|
54
37
|
height: f
|
|
55
38
|
};
|
|
56
|
-
I.call("Mx_Text",
|
|
39
|
+
I.call("Mx_Text", l);
|
|
57
40
|
}
|
|
58
|
-
class
|
|
41
|
+
class zt extends mt {
|
|
59
42
|
getGripPoints() {
|
|
60
43
|
const { x: o, y: n, z: f } = this.center;
|
|
61
|
-
let
|
|
62
|
-
return [this.center,
|
|
44
|
+
let l = new THREE.Vector3(o, n + this.radius, f), g = new THREE.Vector3(o, n - this.radius, f), d = new THREE.Vector3(o - this.radius, n, f), h = new THREE.Vector3(o + this.radius, n, f);
|
|
45
|
+
return [this.center, l, g, d, h];
|
|
63
46
|
}
|
|
64
47
|
moveGripPointsAt(o, n) {
|
|
65
|
-
const [f,
|
|
66
|
-
return o === 0 && (this.center = f.add(n)), o === 1 && (this.radius =
|
|
48
|
+
const [f, l, g, d, h] = this.getGripPoints();
|
|
49
|
+
return o === 0 && (this.center = f.add(n)), o === 1 && (this.radius = l.add(n).distanceTo(this.center)), o === 2 && (this.radius = g.add(n).distanceTo(this.center)), o === 3 && (this.radius = d.add(n).distanceTo(this.center)), o === 4 && (this.radius = h.add(n).distanceTo(this.center)), !0;
|
|
67
50
|
}
|
|
68
51
|
}
|
|
69
|
-
const At = (
|
|
70
|
-
const [o, n, f] =
|
|
52
|
+
const At = (i) => {
|
|
53
|
+
const [o, n, f] = i, { x: l, y: g, z: d } = o, { x: h, y: w, z: E } = n, { x, y: D, z: W } = f, m = g * E - w * d - g * W + D * d + w * W - D * E, M = -(l * E - h * d - l * W + x * d + h * W - x * E), T = l * w - h * g - l * D + x * g + h * D - x * w, v = -(l * w * W - l * D * E - h * g * W + h * D * d + x * g * E - x * w * d), P = 2 * (h - l), K = 2 * (w - g), O = 2 * (E - d), U = l * l + g * g + d * d - h * h - w * w - E * E, H = 2 * (x - l), N = 2 * (D - g), z = 2 * (W - d), Y = l * l + g * g + d * d - x * x - D * D - W * W, de = -(M * O * Y - M * z * U - K * T * Y + K * z * v + N * T * U - N * O * v) / (m * K * z - m * N * O - P * M * z + P * N * T + H * M * O - H * K * T), pe = (m * O * Y - m * z * U - P * T * Y + P * z * v + H * T * U - H * O * v) / (m * K * z - m * N * O - P * M * z + P * N * T + H * M * O - H * K * T), j = -(m * K * Y - m * N * U - P * M * Y + P * N * v + H * M * U - H * K * v) / (m * K * z - m * N * O - P * M * z + P * N * T + H * M * O - H * K * T);
|
|
71
54
|
return new THREE.Vector3(de, pe, j);
|
|
72
55
|
};
|
|
73
|
-
function
|
|
74
|
-
const
|
|
75
|
-
let o = new
|
|
76
|
-
|
|
77
|
-
let n = 0, f = "default",
|
|
56
|
+
function Gt() {
|
|
57
|
+
const i = new oe();
|
|
58
|
+
let o = new zt();
|
|
59
|
+
q.use(o), o.closed = !1;
|
|
60
|
+
let n = 0, f = "default", l = !0;
|
|
78
61
|
const g = () => {
|
|
79
|
-
|
|
62
|
+
i.setUserDraw(
|
|
80
63
|
(m, M) => {
|
|
81
|
-
o.radius =
|
|
64
|
+
o.radius = l ? o.center.distanceTo(m) : o.center.distanceTo(m) / 2, M.drawCustomEntity(o), M.drawLine(o.center, m);
|
|
82
65
|
}
|
|
83
66
|
);
|
|
84
67
|
}, d = (m) => {
|
|
85
68
|
if (f === "default") {
|
|
86
|
-
if (m ===
|
|
69
|
+
if (m === b.kOk) {
|
|
87
70
|
if (n === 0)
|
|
88
|
-
|
|
89
|
-
\u6307\u5B9A\u5706\u7684\u534A\u5F84:`),
|
|
71
|
+
i.setMessage(`
|
|
72
|
+
\u6307\u5B9A\u5706\u7684\u534A\u5F84:`), i.setKeyWords("[\u76F4\u5F84(D)]"), o.center = i.value(), g();
|
|
90
73
|
else if (n === 1)
|
|
91
74
|
return I.getCurrentDraw().addMxEntity(o), !0;
|
|
92
75
|
n++;
|
|
93
76
|
}
|
|
94
|
-
m ===
|
|
95
|
-
\u6307\u5B9A\u5706\u7684\u76F4\u5F84:`),
|
|
77
|
+
m === b.kKeyWord && i.isKeyWordPicked("D") && (l = !1, g(), i.setMessage(`
|
|
78
|
+
\u6307\u5B9A\u5706\u7684\u76F4\u5F84:`), i.setKeyWords(""));
|
|
96
79
|
}
|
|
97
80
|
};
|
|
98
81
|
let h = [];
|
|
99
82
|
const w = (m) => {
|
|
100
|
-
if (f === "3P" && (
|
|
101
|
-
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), m ===
|
|
102
|
-
if (n === 0 && (h.push(
|
|
103
|
-
|
|
104
|
-
}),
|
|
105
|
-
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), n === 1 && (h.push(
|
|
106
|
-
const [
|
|
83
|
+
if (f === "3P" && (i.setMessage(`
|
|
84
|
+
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), m === b.kOk)) {
|
|
85
|
+
if (n === 0 && (h.push(i.value()), i.setUserDraw((M, T) => {
|
|
86
|
+
T.drawLine(h[0], M);
|
|
87
|
+
}), i.setMessage(`
|
|
88
|
+
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), n === 1 && (h.push(i.value()), i.setUserDraw((M, T) => {
|
|
89
|
+
const [v, P] = h, K = M;
|
|
107
90
|
o.center = At([
|
|
108
|
-
P,
|
|
109
91
|
v,
|
|
92
|
+
P,
|
|
110
93
|
K
|
|
111
|
-
]), o.radius = o.center.distanceTo(
|
|
112
|
-
}),
|
|
94
|
+
]), o.radius = o.center.distanceTo(v), T.drawCustomEntity(o);
|
|
95
|
+
}), i.setMessage(`
|
|
113
96
|
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E09\u4E2A\u70B9:`)), n === 2)
|
|
114
|
-
return h.push(
|
|
97
|
+
return h.push(i.value()), o.center = At(h), o.radius = o.center.distanceTo(h[0]), I.getCurrentDraw().addMxEntity(o), !0;
|
|
115
98
|
n++;
|
|
116
99
|
}
|
|
117
100
|
};
|
|
@@ -119,21 +102,21 @@ function $t() {
|
|
|
119
102
|
const x = (m, M) => {
|
|
120
103
|
new THREE.Line3(m, M).getCenter(o.center), o.radius = M.distanceTo(m) / 2;
|
|
121
104
|
}, D = (m) => {
|
|
122
|
-
if (f === "2P" && (
|
|
123
|
-
\u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), m ===
|
|
124
|
-
if (n === 0 && (E =
|
|
125
|
-
x(E, M),
|
|
126
|
-
}),
|
|
105
|
+
if (f === "2P" && (i.setMessage(`
|
|
106
|
+
\u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), m === b.kOk)) {
|
|
107
|
+
if (n === 0 && (E = i.value(), i.setUserDraw((M, T) => {
|
|
108
|
+
x(E, M), T.drawCustomEntity(o), T.drawLine(E, M);
|
|
109
|
+
}), i.setMessage(`
|
|
127
110
|
\u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`)), n === 1)
|
|
128
|
-
return x(E,
|
|
111
|
+
return x(E, i.value()), I.getCurrentDraw().addMxEntity(o), !0;
|
|
129
112
|
n++;
|
|
130
113
|
}
|
|
131
|
-
},
|
|
114
|
+
}, W = (m) => {
|
|
132
115
|
if (f === "T") {
|
|
133
|
-
if (
|
|
134
|
-
\u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), m ===
|
|
116
|
+
if (i.setMessage(`
|
|
117
|
+
\u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), m === b.kOk) {
|
|
135
118
|
if (n === 0) {
|
|
136
|
-
const M =
|
|
119
|
+
const M = i.value();
|
|
137
120
|
console.log(M), I.getCurrentDraw();
|
|
138
121
|
}
|
|
139
122
|
n++;
|
|
@@ -141,62 +124,62 @@ function $t() {
|
|
|
141
124
|
return !0;
|
|
142
125
|
}
|
|
143
126
|
};
|
|
144
|
-
|
|
127
|
+
i.setMessage(
|
|
145
128
|
`
|
|
146
129
|
\u6307\u5B9A\u5706\u7684\u5706\u5FC3\u6216[\u4E09\u70B9(3P)/\u4E24\u70B9(2P)/\u5207\u70B9\u3001\u5207\u70B9\u3001\u534A\u5F84(T)]:`
|
|
147
|
-
),
|
|
130
|
+
), i.setKeyWords("3P 2P T"), i.goWhile(
|
|
148
131
|
(m) => {
|
|
149
|
-
if (m ===
|
|
132
|
+
if (m === b.kKeyWord && (i.isKeyWordPicked("3P") ? f = "3P" : i.isKeyWordPicked("2P") ? f = "2P" : i.isKeyWordPicked("T") && (f = "T")), d(m))
|
|
150
133
|
return { exit: !0 };
|
|
151
134
|
if (w(m))
|
|
152
135
|
return { exit: !0 };
|
|
153
136
|
if (D(m))
|
|
154
137
|
return { exit: !0 };
|
|
155
|
-
if (
|
|
138
|
+
if (W(m))
|
|
156
139
|
return { exit: !0 };
|
|
157
140
|
},
|
|
158
141
|
(m) => {
|
|
159
|
-
m ===
|
|
142
|
+
m === b.kCancel && I.getCurrentDraw().addMxEntity(o);
|
|
160
143
|
}
|
|
161
144
|
);
|
|
162
145
|
}
|
|
163
146
|
Ve.events.on("MxDbEntityRegister", () => {
|
|
164
|
-
I.addCommand("Mx_Circle",
|
|
147
|
+
I.addCommand("Mx_Circle", Gt);
|
|
165
148
|
});
|
|
166
149
|
const wt = () => Ve.state.MxFun.stopRunCommand();
|
|
167
|
-
function je(
|
|
168
|
-
const
|
|
150
|
+
function je(i, o, n, f) {
|
|
151
|
+
const l = i - n, g = o - f;
|
|
169
152
|
let d = 0;
|
|
170
|
-
return
|
|
153
|
+
return l == 0 ? d = Math.PI / 2 : d = Math.atan(Math.abs(g / l)), l < 0 && g >= 0 ? d = Math.PI - d : l < 0 && g < 0 ? d = Math.PI + d : l >= 0 && g < 0 && (d = Math.PI * 2 - d), d;
|
|
171
154
|
}
|
|
172
155
|
async function Xt() {
|
|
173
|
-
const
|
|
156
|
+
const i = new oe();
|
|
174
157
|
let o = new Re(), n = [];
|
|
175
|
-
|
|
158
|
+
i.setMessage(`
|
|
176
159
|
\u6307\u5B9A\u7B2C\u4E00\u70B9:`);
|
|
177
|
-
let f = await
|
|
178
|
-
|
|
160
|
+
let f = await i.go();
|
|
161
|
+
i.setUserDraw((g, d) => {
|
|
179
162
|
n.forEach((h) => {
|
|
180
163
|
d.drawCustomEntity(h);
|
|
181
164
|
}), d.drawLine(f, g);
|
|
182
165
|
});
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9:`), n.length > 1 ?
|
|
166
|
+
const l = () => {
|
|
167
|
+
i.setMessage(`
|
|
168
|
+
\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9:`), n.length > 1 ? i.setKeyWords("[\u9000\u51FA(E)/\u95ED\u5408(C)/\u653E\u5F03(U)]") : i.setKeyWords("[\u9000\u51FA(E)/\u653E\u5F03(U)]");
|
|
186
169
|
};
|
|
187
|
-
|
|
170
|
+
l(), i.goWhile(
|
|
188
171
|
(g) => {
|
|
189
|
-
if (g ===
|
|
190
|
-
if (
|
|
172
|
+
if (g === b.kOk && (o = new Re(), q.use(o), o.pt1 = f, o.pt2 = i.value(), f = o.pt2.clone(), n.push(o), l()), g === b.kKeyWord) {
|
|
173
|
+
if (i.isKeyWordPicked("E"))
|
|
191
174
|
wt();
|
|
192
|
-
else if (
|
|
175
|
+
else if (i.isKeyWordPicked("C")) {
|
|
193
176
|
const d = new Re();
|
|
194
|
-
return d.pt1 = f.clone(), d.pt2 = n[0].pt1.clone(),
|
|
177
|
+
return d.pt1 = f.clone(), d.pt2 = n[0].pt1.clone(), q.use(d), n.push(d), f = d.pt2.clone(), wt(), { exit: !0 };
|
|
195
178
|
}
|
|
196
179
|
}
|
|
197
180
|
},
|
|
198
181
|
(g) => {
|
|
199
|
-
if (g ===
|
|
182
|
+
if (g === b.kCancel)
|
|
200
183
|
return n.forEach((d) => {
|
|
201
184
|
I.getCurrentDraw().addMxEntity(d);
|
|
202
185
|
}), { exit: !0 };
|
|
@@ -206,11 +189,11 @@ async function Xt() {
|
|
|
206
189
|
Ve.events.on("MxDbEntityRegister", () => {
|
|
207
190
|
I.addCommand("Mx_Line", Xt);
|
|
208
191
|
});
|
|
209
|
-
async function
|
|
210
|
-
const
|
|
211
|
-
|
|
192
|
+
async function en() {
|
|
193
|
+
const i = new oe();
|
|
194
|
+
i.setMessage(`
|
|
212
195
|
\u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
|
|
213
|
-
let o = await
|
|
196
|
+
let o = await i.go();
|
|
214
197
|
if (o == null)
|
|
215
198
|
return;
|
|
216
199
|
let n = `\u6D4B\u8BD5
|
|
@@ -219,101 +202,101 @@ async function rn() {
|
|
|
219
202
|
return;
|
|
220
203
|
let f = I.screenCoordLong2Doc(50);
|
|
221
204
|
n = _t.b64Encode(n);
|
|
222
|
-
const
|
|
205
|
+
const l = {
|
|
223
206
|
postx: o.x,
|
|
224
207
|
posty: o.y,
|
|
225
208
|
text: n,
|
|
226
209
|
height: f
|
|
227
210
|
};
|
|
228
|
-
I.call("Mx_MText",
|
|
211
|
+
I.call("Mx_MText", l);
|
|
229
212
|
}
|
|
230
|
-
async function
|
|
231
|
-
const
|
|
232
|
-
|
|
213
|
+
async function tn() {
|
|
214
|
+
const i = new oe(), o = new Kt();
|
|
215
|
+
q.use(o), i.setMessage(`
|
|
233
216
|
\u6307\u5B9A\u8D77\u70B9:`);
|
|
234
217
|
let n;
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}),
|
|
218
|
+
i.setUserDraw((f, l) => {
|
|
219
|
+
l.drawCustomEntity(o), n && l.drawLine(n, f);
|
|
220
|
+
}), i.goWhile(
|
|
238
221
|
(f) => {
|
|
239
|
-
if (f ===
|
|
240
|
-
const
|
|
241
|
-
o.points.push(
|
|
242
|
-
\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9:`),
|
|
222
|
+
if (f === b.kOk) {
|
|
223
|
+
const l = i.value();
|
|
224
|
+
o.points.push(i.value()), n = l, i.setMessage(`
|
|
225
|
+
\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9:`), i.setKeyWords("[\u5706\u5F27(A)/\u5BBD\u5EA6(W)]");
|
|
243
226
|
} else
|
|
244
|
-
f ===
|
|
227
|
+
f === b.kKeyWord && (i.isKeyWordPicked("A"), i.isKeyWordPicked("W"));
|
|
245
228
|
},
|
|
246
229
|
(f) => {
|
|
247
|
-
f ===
|
|
230
|
+
f === b.kCancel && I.getCurrentDraw().addMxEntity(o);
|
|
248
231
|
}
|
|
249
232
|
);
|
|
250
233
|
}
|
|
251
|
-
async function
|
|
252
|
-
const
|
|
234
|
+
async function nn() {
|
|
235
|
+
const i = new oe();
|
|
253
236
|
let o = new jt();
|
|
254
|
-
|
|
237
|
+
q.use(o), i.setMessage(`
|
|
255
238
|
\u8F93\u5165\u8FB9\u7684\u6570\u76EE<5>:`);
|
|
256
239
|
let n = 3, f = [n];
|
|
257
240
|
for (; n < 25; )
|
|
258
241
|
f.push(n++);
|
|
259
|
-
|
|
260
|
-
let
|
|
261
|
-
|
|
262
|
-
if (g ===
|
|
263
|
-
if (
|
|
264
|
-
o.centerPoint =
|
|
265
|
-
[\u5185\u63A5\u4E8E\u5706(I)/\u5916\u5207\u4E8E\u5706(C)]<\u5916\u5207>:`),
|
|
266
|
-
else if (
|
|
267
|
-
|
|
268
|
-
\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`),
|
|
242
|
+
i.setKeyWords(f.join(" "));
|
|
243
|
+
let l = 0;
|
|
244
|
+
i.goWhile((g) => {
|
|
245
|
+
if (g === b.kOk)
|
|
246
|
+
if (l === 1)
|
|
247
|
+
o.centerPoint = i.value(), i.setMessage(`
|
|
248
|
+
[\u5185\u63A5\u4E8E\u5706(I)/\u5916\u5207\u4E8E\u5706(C)]<\u5916\u5207>:`), i.setKeyWords("I C");
|
|
249
|
+
else if (l === 2)
|
|
250
|
+
i.setMessage(`
|
|
251
|
+
\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`), l++;
|
|
269
252
|
else {
|
|
270
|
-
if (
|
|
271
|
-
return
|
|
253
|
+
if (l === 3)
|
|
254
|
+
return i.setMessage(`
|
|
272
255
|
\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`), { exit: !0 };
|
|
273
|
-
if (
|
|
274
|
-
return o.otherPoint =
|
|
275
|
-
|
|
256
|
+
if (l === 4)
|
|
257
|
+
return o.otherPoint = i.value(), I.getCurrentDraw().addMxEntity(o), { exit: !0 };
|
|
258
|
+
l === 5 && i.setMessage(`
|
|
276
259
|
\u5916\u5207\u4E8E\u5706(C)\u65E0\u6CD5\u7ED8\u5236:`);
|
|
277
260
|
}
|
|
278
|
-
if (g ===
|
|
279
|
-
const d =
|
|
280
|
-
!Number.isNaN(h) &&
|
|
281
|
-
\u6307\u5B9A\u6B63\u591A\u8FB9\u5F62\u7684\u4E2D\u5FC3\u70B9\u6216 [\u8FB9(E)]:`),
|
|
282
|
-
\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`),
|
|
261
|
+
if (g === b.kKeyWord) {
|
|
262
|
+
const d = i.keyWordPicked(), h = Number(d);
|
|
263
|
+
!Number.isNaN(h) && l === 0 && (o.sidesNumber = h, i.setMessage(`
|
|
264
|
+
\u6307\u5B9A\u6B63\u591A\u8FB9\u5F62\u7684\u4E2D\u5FC3\u70B9\u6216 [\u8FB9(E)]:`), i.setKeyWords("E"), l++), l === 1 && (i.isKeyWordPicked("E") && (i.setMessage(`
|
|
265
|
+
\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), l++), i.isKeyWordPicked("I") ? (i.setUserDraw((w, E) => {
|
|
283
266
|
o.otherPoint = w, E.drawCustomEntity(o);
|
|
284
|
-
}),
|
|
285
|
-
\u6307\u5B9A\u5706\u7684\u534A\u5F84:`),
|
|
286
|
-
\u5916\u5207\u4E8E\u5706(C)\u65E0\u6CD5\u7ED8\u5236:`),
|
|
267
|
+
}), i.setMessage(`
|
|
268
|
+
\u6307\u5B9A\u5706\u7684\u534A\u5F84:`), l++, l++, l++) : i.isKeyWordPicked("C") && (i.setMessage(`
|
|
269
|
+
\u5916\u5207\u4E8E\u5706(C)\u65E0\u6CD5\u7ED8\u5236:`), l++, l++, l++, l++));
|
|
287
270
|
}
|
|
288
271
|
});
|
|
289
272
|
}
|
|
290
|
-
function
|
|
291
|
-
const f =
|
|
292
|
-
return new THREE.Vector3(
|
|
273
|
+
function $t(i, o, n) {
|
|
274
|
+
const f = i.x, l = o.x, g = n.x, d = i.y, h = o.y, w = n.y, E = f - l, x = d - h, D = f - g, W = d - w, m = (f * f - l * l + (d * d - h * h)) / 2, M = (f * f - g * g + (d * d - w * w)) / 2, T = x * D - E * W, v = -(W * m - x * M) / T, P = -(E * M - D * m) / T;
|
|
275
|
+
return new THREE.Vector3(v, P, 0);
|
|
293
276
|
}
|
|
294
|
-
function
|
|
295
|
-
const n =
|
|
296
|
-
return Math.sqrt((n -
|
|
277
|
+
function Yt(i, o) {
|
|
278
|
+
const n = i.x, f = i.y, l = o.x, g = o.y;
|
|
279
|
+
return Math.sqrt((n - l) * (n - l) + (f - g) * (f - g));
|
|
297
280
|
}
|
|
298
|
-
function
|
|
281
|
+
function Zt(i, o, n) {
|
|
299
282
|
let f;
|
|
300
|
-
|
|
301
|
-
let
|
|
302
|
-
return
|
|
283
|
+
i < n ? f = n - i : f = n - i + 360;
|
|
284
|
+
let l;
|
|
285
|
+
return i < o ? l = o - i : l = o - i + 360, l > f;
|
|
303
286
|
}
|
|
304
|
-
function Oe(
|
|
305
|
-
const f =
|
|
287
|
+
function Oe(i, o, n) {
|
|
288
|
+
const f = i.x, l = o.x, g = i.y, d = o.y;
|
|
306
289
|
let h, w, E;
|
|
307
|
-
return h = (g - d) / n, w = (f -
|
|
290
|
+
return h = (g - d) / n, w = (f - l) / n, w >= 0.99999 && (w = 0.99999), w <= -0.99999 && (w = -0.99999), E = Math.acos(w), E = E / Math.PI * 180, h < -0.05 && (E = 360 - E), {
|
|
308
291
|
sin: h,
|
|
309
292
|
cos: w,
|
|
310
293
|
angle: E
|
|
311
294
|
};
|
|
312
295
|
}
|
|
313
|
-
const
|
|
296
|
+
const J = (i, o, n) => {
|
|
314
297
|
const f = () => {
|
|
315
|
-
|
|
316
|
-
if (
|
|
298
|
+
i.go((l) => {
|
|
299
|
+
if (l === b.kKeyWord && n() && f(), l === b.kOk && o() && f(), l === b.kNone && f(), l === b.kCancel)
|
|
317
300
|
return { exit: !0 };
|
|
318
301
|
});
|
|
319
302
|
};
|
|
@@ -330,21 +313,21 @@ class He extends mt {
|
|
|
330
313
|
return new He();
|
|
331
314
|
}
|
|
332
315
|
getArcBulge(o, n, f) {
|
|
333
|
-
const
|
|
316
|
+
const l = o.distanceTo(n);
|
|
334
317
|
let h = 2 * new THREE.Line3(o, n).getCenter(
|
|
335
318
|
new THREE.Vector3()
|
|
336
|
-
).distanceTo(f) /
|
|
319
|
+
).distanceTo(f) / l;
|
|
337
320
|
return h > 0.9999 && h < 1.0001 ? h = 1 : h < -0.9999 && h > -1.0001 ? h = -1 : Math.abs(h) < 1e-10 && (h = 0), h;
|
|
338
321
|
}
|
|
339
|
-
getArcMidPoint(o, n, f,
|
|
322
|
+
getArcMidPoint(o, n, f, l, g) {
|
|
340
323
|
const d = o, h = f * Math.PI / 180;
|
|
341
|
-
let w =
|
|
324
|
+
let w = l * Math.PI / 180;
|
|
342
325
|
const E = new THREE.Vector3(), x = new THREE.Vector3();
|
|
343
326
|
E.x = d.x + n * Math.cos(h), E.y = d.y + n * Math.sin(h), x.x = d.x + n * Math.cos(w), x.y = d.y + n * Math.sin(w);
|
|
344
327
|
const D = n;
|
|
345
|
-
(g ? f <
|
|
346
|
-
const
|
|
347
|
-
return
|
|
328
|
+
(g ? f < l : f > l) && (w += Math.PI * 2);
|
|
329
|
+
const W = new THREE.Vector3();
|
|
330
|
+
return W.x = d.x + D * Math.cos((h + w) / 2), W.y = d.y + D * Math.sin((h + w) / 2), [E, W, x, this.center];
|
|
348
331
|
}
|
|
349
332
|
getGripPoints() {
|
|
350
333
|
return this.getArcMidPoint(
|
|
@@ -363,130 +346,130 @@ class He extends mt {
|
|
|
363
346
|
}
|
|
364
347
|
upDatePoints(o, n, f) {
|
|
365
348
|
o[n].add(f);
|
|
366
|
-
const [
|
|
367
|
-
this.center =
|
|
368
|
-
const h = Oe(
|
|
369
|
-
this.clockwise =
|
|
349
|
+
const [l, g, d] = o;
|
|
350
|
+
this.center = $t(l, d, g), this.radius = Yt(g, this.center);
|
|
351
|
+
const h = Oe(l, this.center, this.radius), w = Oe(d, this.center, this.radius), E = Oe(g, this.center, this.radius);
|
|
352
|
+
this.clockwise = Zt(
|
|
370
353
|
w.angle,
|
|
371
354
|
h.angle,
|
|
372
355
|
E.angle
|
|
373
356
|
), this.startAngle = THREE.MathUtils.degToRad(h.angle), this.endAngle = THREE.MathUtils.degToRad(w.angle);
|
|
374
357
|
}
|
|
375
358
|
}
|
|
376
|
-
async function
|
|
377
|
-
const
|
|
378
|
-
|
|
379
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`),
|
|
359
|
+
async function rn() {
|
|
360
|
+
const i = new oe();
|
|
361
|
+
i.setMessage(`
|
|
362
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), i.setKeyWords("[\u5706\u5FC3(C)]");
|
|
380
363
|
let o = new He();
|
|
381
|
-
o.closed = !1,
|
|
382
|
-
let n, f,
|
|
383
|
-
const g =
|
|
384
|
-
|
|
364
|
+
o.closed = !1, q.use(o);
|
|
365
|
+
let n, f, l;
|
|
366
|
+
const g = J(
|
|
367
|
+
i,
|
|
385
368
|
() => {
|
|
386
|
-
n =
|
|
387
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u7B2C\u4E8C\u4E2A\u70B9:`),
|
|
388
|
-
|
|
369
|
+
n = i.value(), i.setMessage(`
|
|
370
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u7B2C\u4E8C\u4E2A\u70B9:`), i.setKeyWords("[\u5706\u5FC3(C)/\u7AEF\u70B9(E)]"), i.setUserDraw((v, P) => {
|
|
371
|
+
P.drawLine(n, v);
|
|
389
372
|
}), M();
|
|
390
373
|
},
|
|
391
374
|
() => {
|
|
392
|
-
if (
|
|
393
|
-
const
|
|
394
|
-
o.center =
|
|
395
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3:`),
|
|
375
|
+
if (i.isKeyWordPicked("C")) {
|
|
376
|
+
const v = new De();
|
|
377
|
+
o.center = i.value(), v.center = i.value(), i.setMessage(`
|
|
378
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3:`), i.setKeyWords(""), h();
|
|
396
379
|
} else
|
|
397
380
|
return !0;
|
|
398
381
|
}
|
|
399
382
|
);
|
|
400
383
|
let d;
|
|
401
|
-
const h =
|
|
402
|
-
|
|
384
|
+
const h = J(
|
|
385
|
+
i,
|
|
403
386
|
() => {
|
|
404
|
-
d =
|
|
405
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`),
|
|
406
|
-
|
|
387
|
+
d = i.value(), l = new De(), l.closed = !1, q.use(l), l.center = d, o.center = d, i.setMessage(`
|
|
388
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), i.setUserDraw((v, P) => {
|
|
389
|
+
P.drawCustomEntity(l), P.drawLine(d, v);
|
|
407
390
|
}), x();
|
|
408
391
|
},
|
|
409
392
|
() => {
|
|
410
393
|
}
|
|
411
394
|
);
|
|
412
395
|
let w, E;
|
|
413
|
-
const x =
|
|
414
|
-
|
|
396
|
+
const x = J(
|
|
397
|
+
i,
|
|
415
398
|
() => {
|
|
416
|
-
w =
|
|
399
|
+
w = i.value(), l.endPoint = w, i.setMessage(
|
|
417
400
|
`
|
|
418
401
|
\u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u89D2\u5EA6(A)/\u5F26\u957F(L)/\u4FEE\u6539\u534A\u5F84(R)]:`
|
|
419
|
-
),
|
|
420
|
-
|
|
421
|
-
}),
|
|
402
|
+
), i.setKeyWords("A L R"), E = new Re(), E.setDashLineDisplay(!0), E.setDashArray(0.05), E.setLineWidth(2), E.setColor("#ffd30d"), E.pt1 = l.center, i.setUserDraw((v, P) => {
|
|
403
|
+
l.startPoint = v, E.pt2 = v, P.drawCustomEntity(l), P.drawCustomEntity(E);
|
|
404
|
+
}), W();
|
|
422
405
|
},
|
|
423
406
|
() => {
|
|
424
407
|
}
|
|
425
408
|
);
|
|
426
409
|
let D;
|
|
427
|
-
const
|
|
428
|
-
|
|
410
|
+
const W = J(
|
|
411
|
+
i,
|
|
429
412
|
() => {
|
|
430
|
-
D =
|
|
413
|
+
D = i.value(), l.startPoint = D, l.endPoint = w, I.getCurrentDraw().addMxEntity(l);
|
|
431
414
|
},
|
|
432
415
|
() => {
|
|
433
|
-
if (
|
|
434
|
-
return
|
|
416
|
+
if (i.isKeyWordPicked("A"))
|
|
417
|
+
return i.setMessage(
|
|
435
418
|
`
|
|
436
419
|
\u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
|
|
437
|
-
),
|
|
438
|
-
|
|
420
|
+
), i.setKeyWords("R"), i.setUserDraw((v, P) => {
|
|
421
|
+
l.startPoint = v, P.drawCustomEntity(l), P.drawCustomEntity(E);
|
|
439
422
|
}), !0;
|
|
440
|
-
if (
|
|
441
|
-
return
|
|
423
|
+
if (i.isKeyWordPicked("L"))
|
|
424
|
+
return i.setMessage(
|
|
442
425
|
`
|
|
443
426
|
\u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
|
|
444
|
-
),
|
|
445
|
-
|
|
427
|
+
), i.setKeyWords("R"), i.setUserDraw((v, P) => {
|
|
428
|
+
l.startPoint = v, P.drawCustomEntity(l), P.drawCustomEntity(E);
|
|
446
429
|
}), !0;
|
|
447
|
-
if (
|
|
448
|
-
|
|
430
|
+
if (i.isKeyWordPicked("R"))
|
|
431
|
+
i.setMessage(
|
|
449
432
|
`
|
|
450
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u534A\u5F84${
|
|
451
|
-
),
|
|
452
|
-
|
|
433
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u534A\u5F84${l.radius ? "<" + l.radius + ">" : ""}:`
|
|
434
|
+
), i.setKeyWords(""), i.setUserDraw((v, P) => {
|
|
435
|
+
P.drawLine(v, l.center), l.startPoint = v, P.drawCustomEntity(l);
|
|
453
436
|
}), x();
|
|
454
437
|
else
|
|
455
438
|
return !0;
|
|
456
439
|
}
|
|
457
440
|
);
|
|
458
441
|
let m;
|
|
459
|
-
const M =
|
|
460
|
-
|
|
442
|
+
const M = J(
|
|
443
|
+
i,
|
|
461
444
|
() => {
|
|
462
|
-
m =
|
|
463
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), f = new Ot(), f.autoClockwise = !0, f.closed = !1,
|
|
464
|
-
f.point2 =
|
|
465
|
-
}),
|
|
445
|
+
m = i.value(), i.setMessage(`
|
|
446
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), f = new Ot(), f.autoClockwise = !0, f.closed = !1, q.use(f), f.point1 = n, f.point3 = m, o.center, i.setUserDraw((v, P) => {
|
|
447
|
+
f.point2 = v, P.drawCustomEntity(o);
|
|
448
|
+
}), T();
|
|
466
449
|
},
|
|
467
450
|
() => {
|
|
468
|
-
if (
|
|
469
|
-
|
|
470
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`),
|
|
471
|
-
|
|
451
|
+
if (i.isKeyWordPicked("C"))
|
|
452
|
+
l = new De(), l.closed = !1, q.use(l), i.setMessage(`
|
|
453
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), i.setKeyWords(""), i.setUserDraw((v, P) => {
|
|
454
|
+
l.startPoint = n, P.drawLine(v, l.startPoint);
|
|
472
455
|
}), h();
|
|
473
|
-
else if (
|
|
474
|
-
|
|
475
|
-
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`),
|
|
476
|
-
|
|
456
|
+
else if (i.isKeyWordPicked("E"))
|
|
457
|
+
l = new De(), l.closed = !1, q.use(l), i.setMessage(`
|
|
458
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), i.setKeyWords(""), i.setUserDraw((v, P) => {
|
|
459
|
+
l.startPoint = n, P.drawLine(v, l.startPoint);
|
|
477
460
|
}), h();
|
|
478
461
|
else
|
|
479
462
|
return !0;
|
|
480
463
|
}
|
|
481
|
-
),
|
|
482
|
-
|
|
464
|
+
), T = J(
|
|
465
|
+
i,
|
|
483
466
|
() => {
|
|
484
|
-
f.point1 = n, f.point2 =
|
|
467
|
+
f.point1 = n, f.point2 = i.value(), f.point3 = m, I.getCurrentDraw().addMxEntity(f);
|
|
485
468
|
},
|
|
486
469
|
() => {
|
|
487
|
-
if (
|
|
470
|
+
if (i.isKeyWordPicked("C"))
|
|
488
471
|
console.log("C");
|
|
489
|
-
else if (
|
|
472
|
+
else if (i.isKeyWordPicked("E"))
|
|
490
473
|
console.log("E");
|
|
491
474
|
else
|
|
492
475
|
return !0;
|
|
@@ -494,55 +477,55 @@ async function un() {
|
|
|
494
477
|
);
|
|
495
478
|
g();
|
|
496
479
|
}
|
|
497
|
-
function
|
|
498
|
-
const
|
|
499
|
-
o.closed = !1,
|
|
500
|
-
\u6307\u5B9A\u692D\u5706\u7684\u8F74\u7AEF\u70B9`),
|
|
480
|
+
function sn() {
|
|
481
|
+
const i = new oe(), o = new kt();
|
|
482
|
+
o.closed = !1, q.use(o), i.setMessage(`
|
|
483
|
+
\u6307\u5B9A\u692D\u5706\u7684\u8F74\u7AEF\u70B9`), i.setKeyWords("[\u4E2D\u5FC3\u70B9(C)]");
|
|
501
484
|
let n, f = new THREE.Vector3();
|
|
502
|
-
|
|
503
|
-
|
|
485
|
+
J(
|
|
486
|
+
i,
|
|
504
487
|
() => {
|
|
505
|
-
n =
|
|
488
|
+
n = i.value(), i.setUserDraw((E, x) => {
|
|
506
489
|
const D = new THREE.Line3(n, E);
|
|
507
490
|
D.getCenter(f), o.center = f, o.xRadius = D.distance() / 2, o.yRadius = o.xRadius, o.rotation = je(E.x, E.y, f.x, f.y), x.drawLine(E, n);
|
|
508
|
-
}),
|
|
509
|
-
\u6307\u5B9A\u692D\u5706\u5F27\u8F74\u7684\u53E6\u4E00\u4E2A\u7AEF\u70B9:`),
|
|
491
|
+
}), i.setMessage(`
|
|
492
|
+
\u6307\u5B9A\u692D\u5706\u5F27\u8F74\u7684\u53E6\u4E00\u4E2A\u7AEF\u70B9:`), i.setKeyWords(""), g();
|
|
510
493
|
},
|
|
511
494
|
() => {
|
|
512
495
|
}
|
|
513
496
|
)();
|
|
514
|
-
const g =
|
|
515
|
-
|
|
497
|
+
const g = J(
|
|
498
|
+
i,
|
|
516
499
|
() => {
|
|
517
|
-
|
|
500
|
+
i.setUserDraw((E, x) => {
|
|
518
501
|
o.yRadius = f.distanceTo(E), x.drawLine(f, E), x.drawCustomEntity(o);
|
|
519
|
-
}),
|
|
520
|
-
\u6307\u5B9A\u53E6\u4E00\u6761\u534A\u8F74\u957F\u5EA6`),
|
|
502
|
+
}), i.setMessage(`
|
|
503
|
+
\u6307\u5B9A\u53E6\u4E00\u6761\u534A\u8F74\u957F\u5EA6`), i.setKeyWords(""), d();
|
|
521
504
|
},
|
|
522
505
|
() => {
|
|
523
506
|
}
|
|
524
|
-
), d =
|
|
525
|
-
|
|
507
|
+
), d = J(
|
|
508
|
+
i,
|
|
526
509
|
() => {
|
|
527
|
-
|
|
528
|
-
\u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`),
|
|
510
|
+
i.setMessage(`
|
|
511
|
+
\u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`), i.setKeyWords(""), i.setUserDraw((E, x) => {
|
|
529
512
|
o.startAngle = je(E.x, E.y, f.x, f.y) - o.rotation, x.drawLine(f, E), x.drawCustomEntity(o);
|
|
530
513
|
}), h();
|
|
531
514
|
},
|
|
532
515
|
() => {
|
|
533
516
|
}
|
|
534
|
-
), h =
|
|
535
|
-
|
|
517
|
+
), h = J(
|
|
518
|
+
i,
|
|
536
519
|
() => {
|
|
537
|
-
|
|
520
|
+
i.setUserDraw((E, x) => {
|
|
538
521
|
o.endAngle = je(E.x, E.y, f.x, f.y) - o.rotation, x.drawLine(f, E), x.drawCustomEntity(o);
|
|
539
|
-
}),
|
|
540
|
-
\u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`),
|
|
522
|
+
}), i.setMessage(`
|
|
523
|
+
\u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`), i.setKeyWords(""), w();
|
|
541
524
|
},
|
|
542
525
|
() => {
|
|
543
526
|
}
|
|
544
|
-
), w =
|
|
545
|
-
|
|
527
|
+
), w = J(
|
|
528
|
+
i,
|
|
546
529
|
() => {
|
|
547
530
|
I.getCurrentDraw().addMxEntity(o);
|
|
548
531
|
},
|
|
@@ -551,23 +534,23 @@ function an() {
|
|
|
551
534
|
);
|
|
552
535
|
}
|
|
553
536
|
var Fe = (() => {
|
|
554
|
-
var
|
|
555
|
-
return typeof __filename < "u" && (
|
|
537
|
+
var i = typeof document < "u" && document.currentScript ? document.currentScript.src : void 0;
|
|
538
|
+
return typeof __filename < "u" && (i = i || __filename), function(o) {
|
|
556
539
|
o = o || {};
|
|
557
540
|
var n;
|
|
558
541
|
n || (n = typeof o < "u" ? o : {});
|
|
559
|
-
var f,
|
|
542
|
+
var f, l;
|
|
560
543
|
n.ready = new Promise(function(e, t) {
|
|
561
|
-
f = e,
|
|
544
|
+
f = e, l = t;
|
|
562
545
|
});
|
|
563
|
-
var g = Object.assign({}, n), d = typeof window == "object", h = typeof importScripts == "function", w = "", E, x, D,
|
|
546
|
+
var g = Object.assign({}, n), d = typeof window == "object", h = typeof importScripts == "function", w = "", E, x, D, W, m, M;
|
|
564
547
|
typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" ? (w = h ? require("path").dirname(w) + "/" : __dirname + "/", M = () => {
|
|
565
|
-
m || (
|
|
548
|
+
m || (W = require("fs"), m = require("path"));
|
|
566
549
|
}, E = function(e, t) {
|
|
567
|
-
return M(), e = m.normalize(e),
|
|
568
|
-
}, D = (e) => (e = E(e, !0), e.buffer || (e = new Uint8Array(e)), e), x = (e, t,
|
|
569
|
-
M(), e = m.normalize(e),
|
|
570
|
-
s ?
|
|
550
|
+
return M(), e = m.normalize(e), W.readFileSync(e, t ? void 0 : "utf8");
|
|
551
|
+
}, D = (e) => (e = E(e, !0), e.buffer || (e = new Uint8Array(e)), e), x = (e, t, r) => {
|
|
552
|
+
M(), e = m.normalize(e), W.readFile(e, function(s, c) {
|
|
553
|
+
s ? r(s) : t(c.buffer);
|
|
571
554
|
});
|
|
572
555
|
}, 1 < process.argv.length && process.argv[1].replace(/\\/g, "/"), process.argv.slice(2), process.on("uncaughtException", function(e) {
|
|
573
556
|
throw e;
|
|
@@ -575,114 +558,114 @@ var Fe = (() => {
|
|
|
575
558
|
throw e;
|
|
576
559
|
}), n.inspect = function() {
|
|
577
560
|
return "[Emscripten Module object]";
|
|
578
|
-
}) : (d || h) && (h ? w = self.location.href : typeof document < "u" && document.currentScript && (w = document.currentScript.src),
|
|
561
|
+
}) : (d || h) && (h ? w = self.location.href : typeof document < "u" && document.currentScript && (w = document.currentScript.src), i && (w = i), w = w.indexOf("blob:") !== 0 ? w.substr(0, w.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", E = (e) => {
|
|
579
562
|
var t = new XMLHttpRequest();
|
|
580
563
|
return t.open("GET", e, !1), t.send(null), t.responseText;
|
|
581
564
|
}, h && (D = (e) => {
|
|
582
565
|
var t = new XMLHttpRequest();
|
|
583
566
|
return t.open("GET", e, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response);
|
|
584
|
-
}), x = (e, t,
|
|
567
|
+
}), x = (e, t, r) => {
|
|
585
568
|
var s = new XMLHttpRequest();
|
|
586
569
|
s.open("GET", e, !0), s.responseType = "arraybuffer", s.onload = () => {
|
|
587
|
-
s.status == 200 || s.status == 0 && s.response ? t(s.response) :
|
|
588
|
-
}, s.onerror =
|
|
570
|
+
s.status == 200 || s.status == 0 && s.response ? t(s.response) : r();
|
|
571
|
+
}, s.onerror = r, s.send(null);
|
|
589
572
|
});
|
|
590
|
-
var
|
|
573
|
+
var T = n.print || console.log.bind(console), v = n.printErr || console.warn.bind(console);
|
|
591
574
|
Object.assign(n, g), g = null;
|
|
592
|
-
function
|
|
593
|
-
K || (K = {}), K[e] || (K[e] = 1,
|
|
575
|
+
function P(e) {
|
|
576
|
+
K || (K = {}), K[e] || (K[e] = 1, v(e));
|
|
594
577
|
}
|
|
595
578
|
var K, O;
|
|
596
579
|
n.wasmBinary && (O = n.wasmBinary), n.noExitRuntime, typeof WebAssembly != "object" && ae("no native wasm support detected");
|
|
597
|
-
var
|
|
598
|
-
function
|
|
599
|
-
var s = t +
|
|
600
|
-
for (
|
|
601
|
-
++
|
|
602
|
-
if (16 <
|
|
603
|
-
return
|
|
604
|
-
for (s = ""; t <
|
|
605
|
-
var
|
|
606
|
-
if (
|
|
580
|
+
var U, H = !1, N = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
|
|
581
|
+
function z(e, t, r) {
|
|
582
|
+
var s = t + r;
|
|
583
|
+
for (r = t; e[r] && !(r >= s); )
|
|
584
|
+
++r;
|
|
585
|
+
if (16 < r - t && e.buffer && N)
|
|
586
|
+
return N.decode(e.subarray(t, r));
|
|
587
|
+
for (s = ""; t < r; ) {
|
|
588
|
+
var c = e[t++];
|
|
589
|
+
if (c & 128) {
|
|
607
590
|
var u = e[t++] & 63;
|
|
608
|
-
if ((
|
|
609
|
-
s += String.fromCharCode((
|
|
591
|
+
if ((c & 224) == 192)
|
|
592
|
+
s += String.fromCharCode((c & 31) << 6 | u);
|
|
610
593
|
else {
|
|
611
|
-
var
|
|
612
|
-
|
|
594
|
+
var a = e[t++] & 63;
|
|
595
|
+
c = (c & 240) == 224 ? (c & 15) << 12 | u << 6 | a : (c & 7) << 18 | u << 12 | a << 6 | e[t++] & 63, 65536 > c ? s += String.fromCharCode(c) : (c -= 65536, s += String.fromCharCode(55296 | c >> 10, 56320 | c & 1023));
|
|
613
596
|
}
|
|
614
597
|
} else
|
|
615
|
-
s += String.fromCharCode(
|
|
598
|
+
s += String.fromCharCode(c);
|
|
616
599
|
}
|
|
617
600
|
return s;
|
|
618
601
|
}
|
|
619
602
|
function Y(e, t) {
|
|
620
|
-
return e ?
|
|
603
|
+
return e ? z(ee, e, t) : "";
|
|
621
604
|
}
|
|
622
|
-
function de(e, t,
|
|
605
|
+
function de(e, t, r, s) {
|
|
623
606
|
if (!(0 < s))
|
|
624
607
|
return 0;
|
|
625
|
-
var
|
|
626
|
-
s =
|
|
608
|
+
var c = r;
|
|
609
|
+
s = r + s - 1;
|
|
627
610
|
for (var u = 0; u < e.length; ++u) {
|
|
628
|
-
var
|
|
629
|
-
if (55296 <=
|
|
611
|
+
var a = e.charCodeAt(u);
|
|
612
|
+
if (55296 <= a && 57343 >= a) {
|
|
630
613
|
var p = e.charCodeAt(++u);
|
|
631
|
-
|
|
614
|
+
a = 65536 + ((a & 1023) << 10) | p & 1023;
|
|
632
615
|
}
|
|
633
|
-
if (127 >=
|
|
634
|
-
if (
|
|
616
|
+
if (127 >= a) {
|
|
617
|
+
if (r >= s)
|
|
635
618
|
break;
|
|
636
|
-
t[
|
|
619
|
+
t[r++] = a;
|
|
637
620
|
} else {
|
|
638
|
-
if (2047 >=
|
|
639
|
-
if (
|
|
621
|
+
if (2047 >= a) {
|
|
622
|
+
if (r + 1 >= s)
|
|
640
623
|
break;
|
|
641
|
-
t[
|
|
624
|
+
t[r++] = 192 | a >> 6;
|
|
642
625
|
} else {
|
|
643
|
-
if (65535 >=
|
|
644
|
-
if (
|
|
626
|
+
if (65535 >= a) {
|
|
627
|
+
if (r + 2 >= s)
|
|
645
628
|
break;
|
|
646
|
-
t[
|
|
629
|
+
t[r++] = 224 | a >> 12;
|
|
647
630
|
} else {
|
|
648
|
-
if (
|
|
631
|
+
if (r + 3 >= s)
|
|
649
632
|
break;
|
|
650
|
-
t[
|
|
633
|
+
t[r++] = 240 | a >> 18, t[r++] = 128 | a >> 12 & 63;
|
|
651
634
|
}
|
|
652
|
-
t[
|
|
635
|
+
t[r++] = 128 | a >> 6 & 63;
|
|
653
636
|
}
|
|
654
|
-
t[
|
|
637
|
+
t[r++] = 128 | a & 63;
|
|
655
638
|
}
|
|
656
639
|
}
|
|
657
|
-
return t[
|
|
640
|
+
return t[r] = 0, r - c;
|
|
658
641
|
}
|
|
659
642
|
var pe, j, ee, C, ye, he;
|
|
660
|
-
function
|
|
661
|
-
var e =
|
|
643
|
+
function Ne() {
|
|
644
|
+
var e = U.buffer;
|
|
662
645
|
pe = e, n.HEAP8 = j = new Int8Array(e), n.HEAP16 = new Int16Array(e), n.HEAP32 = C = new Int32Array(e), n.HEAPU8 = ee = new Uint8Array(e), n.HEAPU16 = new Uint16Array(e), n.HEAPU32 = new Uint32Array(e), n.HEAPF32 = ye = new Float32Array(e), n.HEAPF64 = he = new Float64Array(e);
|
|
663
646
|
}
|
|
664
|
-
var
|
|
665
|
-
function
|
|
647
|
+
var ze, Ge = [], Xe = [], $e = [];
|
|
648
|
+
function Pt() {
|
|
666
649
|
var e = n.preRun.shift();
|
|
667
650
|
Ge.unshift(e);
|
|
668
651
|
}
|
|
669
652
|
var ue = 0, fe = null;
|
|
670
653
|
n.preloadedImages = {}, n.preloadedAudios = {};
|
|
671
654
|
function ae(e) {
|
|
672
|
-
throw n.onAbort && n.onAbort(e), e = "Aborted(" + e + ")",
|
|
655
|
+
throw n.onAbort && n.onAbort(e), e = "Aborted(" + e + ")", v(e), H = !0, e = new WebAssembly.RuntimeError(e + ". Build with -s ASSERTIONS=1 for more info."), l(e), e;
|
|
673
656
|
}
|
|
674
657
|
function Ye() {
|
|
675
|
-
return
|
|
658
|
+
return X.startsWith("data:application/octet-stream;base64,");
|
|
676
659
|
}
|
|
677
|
-
var
|
|
678
|
-
if (
|
|
679
|
-
var Ze =
|
|
680
|
-
|
|
660
|
+
var X;
|
|
661
|
+
if (X = "mxdrawassembly_min.wasm.wasm", !Ye()) {
|
|
662
|
+
var Ze = X;
|
|
663
|
+
X = n.locateFile ? n.locateFile(Ze, w) : w + Ze;
|
|
681
664
|
}
|
|
682
665
|
function Qe() {
|
|
683
|
-
var e =
|
|
666
|
+
var e = X;
|
|
684
667
|
try {
|
|
685
|
-
if (e ==
|
|
668
|
+
if (e == X && O)
|
|
686
669
|
return new Uint8Array(O);
|
|
687
670
|
if (D)
|
|
688
671
|
return D(e);
|
|
@@ -693,18 +676,18 @@ var Fe = (() => {
|
|
|
693
676
|
}
|
|
694
677
|
function xt() {
|
|
695
678
|
if (!O && (d || h)) {
|
|
696
|
-
if (typeof fetch == "function" &&
|
|
697
|
-
return fetch(
|
|
679
|
+
if (typeof fetch == "function" && !X.startsWith("file://"))
|
|
680
|
+
return fetch(X, { credentials: "same-origin" }).then(function(e) {
|
|
698
681
|
if (!e.ok)
|
|
699
|
-
throw "failed to load wasm binary file at '" +
|
|
682
|
+
throw "failed to load wasm binary file at '" + X + "'";
|
|
700
683
|
return e.arrayBuffer();
|
|
701
684
|
}).catch(function() {
|
|
702
685
|
return Qe();
|
|
703
686
|
});
|
|
704
687
|
if (x)
|
|
705
688
|
return new Promise(function(e, t) {
|
|
706
|
-
x(
|
|
707
|
-
e(new Uint8Array(
|
|
689
|
+
x(X, function(r) {
|
|
690
|
+
e(new Uint8Array(r));
|
|
708
691
|
}, t);
|
|
709
692
|
});
|
|
710
693
|
}
|
|
@@ -712,45 +695,45 @@ var Fe = (() => {
|
|
|
712
695
|
return Qe();
|
|
713
696
|
});
|
|
714
697
|
}
|
|
715
|
-
function
|
|
698
|
+
function We(e) {
|
|
716
699
|
for (; 0 < e.length; ) {
|
|
717
700
|
var t = e.shift();
|
|
718
701
|
if (typeof t == "function")
|
|
719
702
|
t(n);
|
|
720
703
|
else {
|
|
721
|
-
var
|
|
722
|
-
typeof
|
|
704
|
+
var r = t.Da;
|
|
705
|
+
typeof r == "number" ? t.da === void 0 ? Je(r)() : Je(r)(t.da) : r(t.da === void 0 ? null : t.da);
|
|
723
706
|
}
|
|
724
707
|
}
|
|
725
708
|
}
|
|
726
709
|
var Ee = [];
|
|
727
|
-
function
|
|
710
|
+
function Je(e) {
|
|
728
711
|
var t = Ee[e];
|
|
729
|
-
return t || (e >= Ee.length && (Ee.length = e + 1), Ee[e] = t =
|
|
712
|
+
return t || (e >= Ee.length && (Ee.length = e + 1), Ee[e] = t = ze.get(e)), t;
|
|
730
713
|
}
|
|
731
|
-
function
|
|
714
|
+
function qe(e, t) {
|
|
732
715
|
if (0 >= e)
|
|
733
716
|
return e;
|
|
734
|
-
var
|
|
735
|
-
return e >=
|
|
717
|
+
var r = 32 >= t ? Math.abs(1 << t - 1) : Math.pow(2, t - 1);
|
|
718
|
+
return e >= r && (32 >= t || e > r) && (e = -2 * r + e), e;
|
|
736
719
|
}
|
|
737
|
-
function
|
|
720
|
+
function Ue(e, t) {
|
|
738
721
|
return 0 <= e ? e : 32 >= t ? 2 * Math.abs(1 << t - 1) + e : Math.pow(2, t) + e;
|
|
739
722
|
}
|
|
740
723
|
function Mt(e, t) {
|
|
741
|
-
function
|
|
724
|
+
function r($) {
|
|
742
725
|
var Ke = s;
|
|
743
|
-
return (
|
|
726
|
+
return ($ === "double" || $ === "i64") && Ke & 7 && (Ke += 4), s = Ke, $ === "double" ? ($ = Number(he[s >> 3]), s += 8) : $ == "i64" ? ($ = [C[s >> 2], C[s + 4 >> 2]], s += 8) : ($ = C[s >> 2], s += 4), $;
|
|
744
727
|
}
|
|
745
|
-
for (var s = t,
|
|
728
|
+
for (var s = t, c = [], u, a; ; ) {
|
|
746
729
|
var p = e;
|
|
747
730
|
if (u = j[e >> 0], u === 0)
|
|
748
731
|
break;
|
|
749
|
-
if (
|
|
732
|
+
if (a = j[e + 1 >> 0], u == 37) {
|
|
750
733
|
var B = !1, _ = t = !1, R = !1, re = !1;
|
|
751
734
|
e:
|
|
752
735
|
for (; ; ) {
|
|
753
|
-
switch (
|
|
736
|
+
switch (a) {
|
|
754
737
|
case 43:
|
|
755
738
|
B = !0;
|
|
756
739
|
break;
|
|
@@ -771,33 +754,33 @@ var Fe = (() => {
|
|
|
771
754
|
default:
|
|
772
755
|
break e;
|
|
773
756
|
}
|
|
774
|
-
e++,
|
|
757
|
+
e++, a = j[e + 1 >> 0];
|
|
775
758
|
}
|
|
776
759
|
var V = 0;
|
|
777
|
-
if (
|
|
778
|
-
V =
|
|
760
|
+
if (a == 42)
|
|
761
|
+
V = r("i32"), e++, a = j[e + 1 >> 0];
|
|
779
762
|
else
|
|
780
|
-
for (; 48 <=
|
|
781
|
-
V = 10 * V + (
|
|
782
|
-
var k = !1,
|
|
783
|
-
if (
|
|
784
|
-
if (
|
|
785
|
-
|
|
763
|
+
for (; 48 <= a && 57 >= a; )
|
|
764
|
+
V = 10 * V + (a - 48), e++, a = j[e + 1 >> 0];
|
|
765
|
+
var k = !1, L = -1;
|
|
766
|
+
if (a == 46) {
|
|
767
|
+
if (L = 0, k = !0, e++, a = j[e + 1 >> 0], a == 42)
|
|
768
|
+
L = r("i32"), e++;
|
|
786
769
|
else
|
|
787
|
-
for (;
|
|
788
|
-
|
|
789
|
-
|
|
770
|
+
for (; a = j[e + 1 >> 0], !(48 > a || 57 < a); )
|
|
771
|
+
L = 10 * L + (a - 48), e++;
|
|
772
|
+
a = j[e + 1 >> 0];
|
|
790
773
|
}
|
|
791
|
-
switch (0 >
|
|
774
|
+
switch (0 > L && (L = 6, k = !1), String.fromCharCode(a)) {
|
|
792
775
|
case "h":
|
|
793
|
-
if (
|
|
776
|
+
if (a = j[e + 2 >> 0], a == 104) {
|
|
794
777
|
e++;
|
|
795
778
|
var F = 1;
|
|
796
779
|
} else
|
|
797
780
|
F = 2;
|
|
798
781
|
break;
|
|
799
782
|
case "l":
|
|
800
|
-
|
|
783
|
+
a = j[e + 2 >> 0], a == 108 ? (e++, F = 8) : F = 4;
|
|
801
784
|
break;
|
|
802
785
|
case "L":
|
|
803
786
|
case "q":
|
|
@@ -812,7 +795,7 @@ var Fe = (() => {
|
|
|
812
795
|
default:
|
|
813
796
|
F = null;
|
|
814
797
|
}
|
|
815
|
-
switch (F && e++,
|
|
798
|
+
switch (F && e++, a = j[e + 1 >> 0], String.fromCharCode(a)) {
|
|
816
799
|
case "d":
|
|
817
800
|
case "i":
|
|
818
801
|
case "u":
|
|
@@ -820,15 +803,15 @@ var Fe = (() => {
|
|
|
820
803
|
case "x":
|
|
821
804
|
case "X":
|
|
822
805
|
case "p":
|
|
823
|
-
p =
|
|
806
|
+
p = a == 100 || a == 105, F = F || 4, u = r("i" + 8 * F), F == 8 && (u = a == 117 ? (u[0] >>> 0) + 4294967296 * (u[1] >>> 0) : (u[0] >>> 0) + 4294967296 * u[1]), 4 >= F && (u = (p ? qe : Ue)(u & Math.pow(256, F) - 1, 8 * F));
|
|
824
807
|
var se = Math.abs(u);
|
|
825
|
-
if (p = "",
|
|
826
|
-
var A =
|
|
827
|
-
else if (
|
|
828
|
-
A =
|
|
829
|
-
else if (
|
|
808
|
+
if (p = "", a == 100 || a == 105)
|
|
809
|
+
var A = qe(u, 8 * F).toString(10);
|
|
810
|
+
else if (a == 117)
|
|
811
|
+
A = Ue(u, 8 * F).toString(10), u = Math.abs(u);
|
|
812
|
+
else if (a == 111)
|
|
830
813
|
A = (_ ? "0" : "") + se.toString(8);
|
|
831
|
-
else if (
|
|
814
|
+
else if (a == 120 || a == 88) {
|
|
832
815
|
if (p = _ && u != 0 ? "0x" : "", 0 > u) {
|
|
833
816
|
for (u = -u, A = (se - 1).toString(16), se = [], _ = 0; _ < A.length; _++)
|
|
834
817
|
se.push((15 - parseInt(A[_], 16)).toString(16));
|
|
@@ -836,16 +819,16 @@ var Fe = (() => {
|
|
|
836
819
|
A = "f" + A;
|
|
837
820
|
} else
|
|
838
821
|
A = se.toString(16);
|
|
839
|
-
|
|
822
|
+
a == 88 && (p = p.toUpperCase(), A = A.toUpperCase());
|
|
840
823
|
} else
|
|
841
|
-
|
|
824
|
+
a == 112 && (se === 0 ? A = "(nil)" : (p = "0x", A = se.toString(16)));
|
|
842
825
|
if (k)
|
|
843
|
-
for (; A.length <
|
|
826
|
+
for (; A.length < L; )
|
|
844
827
|
A = "0" + A;
|
|
845
828
|
for (0 <= u && (B ? p = "+" + p : re && (p = " " + p)), A.charAt(0) == "-" && (p = "-" + p, A = A.substr(1)); p.length + A.length < V; )
|
|
846
829
|
t ? A += " " : R ? A = "0" + A : p = " " + p;
|
|
847
|
-
A = p + A, A.split("").forEach(function(
|
|
848
|
-
|
|
830
|
+
A = p + A, A.split("").forEach(function($) {
|
|
831
|
+
c.push($.charCodeAt(0));
|
|
849
832
|
});
|
|
850
833
|
break;
|
|
851
834
|
case "f":
|
|
@@ -854,70 +837,70 @@ var Fe = (() => {
|
|
|
854
837
|
case "E":
|
|
855
838
|
case "g":
|
|
856
839
|
case "G":
|
|
857
|
-
if (u =
|
|
840
|
+
if (u = r("double"), isNaN(u))
|
|
858
841
|
A = "nan", R = !1;
|
|
859
842
|
else if (isFinite(u)) {
|
|
860
|
-
if (k = !1, F = Math.min(
|
|
843
|
+
if (k = !1, F = Math.min(L, 20), (a == 103 || a == 71) && (k = !0, L = L || 1, F = parseInt(u.toExponential(F).split("e")[1], 10), L > F && -4 <= F ? (a = (a == 103 ? "f" : "F").charCodeAt(0), L -= F + 1) : (a = (a == 103 ? "e" : "E").charCodeAt(0), L--), F = Math.min(L, 20)), a == 101 || a == 69 ? (A = u.toExponential(F), /[eE][-+]\d$/.test(A) && (A = A.slice(0, -1) + "0" + A.slice(-1))) : (a == 102 || a == 70) && (A = u.toFixed(F), u === 0 && (0 > u || u === 0 && 1 / u === -1 / 0) && (A = "-" + A)), p = A.split("e"), k && !_)
|
|
861
844
|
for (; 1 < p[0].length && p[0].includes(".") && (p[0].slice(-1) == "0" || p[0].slice(-1) == "."); )
|
|
862
845
|
p[0] = p[0].slice(0, -1);
|
|
863
846
|
else
|
|
864
|
-
for (_ && A.indexOf(".") == -1 && (p[0] += ".");
|
|
847
|
+
for (_ && A.indexOf(".") == -1 && (p[0] += "."); L > F++; )
|
|
865
848
|
p[0] += "0";
|
|
866
|
-
A = p[0] + (1 < p.length ? "e" + p[1] : ""),
|
|
849
|
+
A = p[0] + (1 < p.length ? "e" + p[1] : ""), a == 69 && (A = A.toUpperCase()), 0 <= u && (B ? A = "+" + A : re && (A = " " + A));
|
|
867
850
|
} else
|
|
868
851
|
A = (0 > u ? "-" : "") + "inf", R = !1;
|
|
869
852
|
for (; A.length < V; )
|
|
870
853
|
A = t ? A + " " : !R || A[0] != "-" && A[0] != "+" ? (R ? "0" : " ") + A : A[0] + "0" + A.slice(1);
|
|
871
|
-
97 >
|
|
872
|
-
|
|
854
|
+
97 > a && (A = A.toUpperCase()), A.split("").forEach(function($) {
|
|
855
|
+
c.push($.charCodeAt(0));
|
|
873
856
|
});
|
|
874
857
|
break;
|
|
875
858
|
case "s":
|
|
876
|
-
if (R = (B =
|
|
859
|
+
if (R = (B = r("i8*")) ? pt(B) : 6, k && (R = Math.min(R, L)), !t)
|
|
877
860
|
for (; R < V--; )
|
|
878
|
-
|
|
861
|
+
c.push(32);
|
|
879
862
|
if (B)
|
|
880
863
|
for (_ = 0; _ < R; _++)
|
|
881
|
-
|
|
864
|
+
c.push(ee[B++ >> 0]);
|
|
882
865
|
else
|
|
883
|
-
|
|
866
|
+
c = c.concat(st(
|
|
884
867
|
"(null)".substr(0, R),
|
|
885
868
|
!0
|
|
886
869
|
));
|
|
887
870
|
if (t)
|
|
888
871
|
for (; R < V--; )
|
|
889
|
-
|
|
872
|
+
c.push(32);
|
|
890
873
|
break;
|
|
891
874
|
case "c":
|
|
892
|
-
for (t &&
|
|
893
|
-
|
|
894
|
-
t ||
|
|
875
|
+
for (t && c.push(r("i8")); 0 < --V; )
|
|
876
|
+
c.push(32);
|
|
877
|
+
t || c.push(r("i8"));
|
|
895
878
|
break;
|
|
896
879
|
case "n":
|
|
897
|
-
t =
|
|
880
|
+
t = r("i32*"), C[t >> 2] = c.length;
|
|
898
881
|
break;
|
|
899
882
|
case "%":
|
|
900
|
-
|
|
883
|
+
c.push(u);
|
|
901
884
|
break;
|
|
902
885
|
default:
|
|
903
886
|
for (_ = p; _ < e + 2; _++)
|
|
904
|
-
|
|
887
|
+
c.push(j[_ >> 0]);
|
|
905
888
|
}
|
|
906
889
|
e += 2;
|
|
907
890
|
} else
|
|
908
|
-
|
|
891
|
+
c.push(u), e += 1;
|
|
909
892
|
}
|
|
910
|
-
return
|
|
893
|
+
return c;
|
|
911
894
|
}
|
|
912
|
-
function
|
|
895
|
+
function Te(e) {
|
|
913
896
|
if (!e || !e.callee || !e.callee.name)
|
|
914
897
|
return [null, "", ""];
|
|
915
|
-
var t = e.callee.name,
|
|
916
|
-
for (
|
|
917
|
-
var u = e[
|
|
918
|
-
s || (
|
|
898
|
+
var t = e.callee.name, r = "(", s = !0, c;
|
|
899
|
+
for (c in e) {
|
|
900
|
+
var u = e[c];
|
|
901
|
+
s || (r += ", "), s = !1, r = typeof u == "number" || typeof u == "string" ? r + u : r + ("(" + typeof u + ")");
|
|
919
902
|
}
|
|
920
|
-
return
|
|
903
|
+
return r += ")", e = (e = e.callee.caller) ? e.arguments : [], s && (r = ""), [e, t, r];
|
|
921
904
|
}
|
|
922
905
|
function Ct(e) {
|
|
923
906
|
e: {
|
|
@@ -925,8 +908,8 @@ var Fe = (() => {
|
|
|
925
908
|
if (!t.stack) {
|
|
926
909
|
try {
|
|
927
910
|
throw Error();
|
|
928
|
-
} catch (
|
|
929
|
-
t =
|
|
911
|
+
} catch (L) {
|
|
912
|
+
t = L;
|
|
930
913
|
}
|
|
931
914
|
if (!t.stack) {
|
|
932
915
|
t = "(no stack trace available)";
|
|
@@ -936,22 +919,22 @@ var Fe = (() => {
|
|
|
936
919
|
t = t.stack.toString();
|
|
937
920
|
}
|
|
938
921
|
t = t.slice(t.indexOf(`
|
|
939
|
-
`, Math.max(t.lastIndexOf("_emscripten_log"), t.lastIndexOf("_emscripten_get_callstack"))) + 1), e & 32 &&
|
|
940
|
-
var
|
|
922
|
+
`, Math.max(t.lastIndexOf("_emscripten_log"), t.lastIndexOf("_emscripten_get_callstack"))) + 1), e & 32 && P("EM_LOG_DEMANGLE is deprecated; ignoring"), e & 8 && typeof emscripten_source_map > "u" && (P('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'), e = e ^ 8 | 16);
|
|
923
|
+
var r = null;
|
|
941
924
|
if (e & 128)
|
|
942
|
-
for (
|
|
943
|
-
|
|
925
|
+
for (r = Te(arguments); r[1].includes("_emscripten_"); )
|
|
926
|
+
r = Te(r[0]);
|
|
944
927
|
var s = t.split(`
|
|
945
928
|
`);
|
|
946
929
|
t = "";
|
|
947
|
-
var
|
|
930
|
+
var c = RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"), u = RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"), a = RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)"), p;
|
|
948
931
|
for (p in s) {
|
|
949
932
|
var B = s[p], _;
|
|
950
|
-
if ((_ =
|
|
933
|
+
if ((_ = a.exec(B)) && _.length == 5) {
|
|
951
934
|
B = _[1];
|
|
952
935
|
var R = _[2], re = _[3];
|
|
953
936
|
_ = _[4];
|
|
954
|
-
} else if ((_ =
|
|
937
|
+
} else if ((_ = c.exec(B)) || (_ = u.exec(B)), _ && 4 <= _.length)
|
|
955
938
|
B = _[1], R = _[2], re = _[3], _ = _[4] | 0;
|
|
956
939
|
else {
|
|
957
940
|
t += B + `
|
|
@@ -968,120 +951,120 @@ var Fe = (() => {
|
|
|
968
951
|
`);
|
|
969
952
|
}
|
|
970
953
|
(e & 16 || !V) && (e & 64 && (R = R.substring(R.replace(/\\/g, "/").lastIndexOf("/") + 1)), t += (V ? " = " + B : " at " + B) + " (" + R + ":" + re + ":" + _ + `)
|
|
971
|
-
`), e & 128 &&
|
|
972
|
-
`),
|
|
954
|
+
`), e & 128 && r[0] && (r[1] == B && 0 < r[2].length && (t = t.replace(/\s+$/, ""), t += " with values: " + r[1] + r[2] + `
|
|
955
|
+
`), r = Te(r[0]));
|
|
973
956
|
}
|
|
974
957
|
return t = t.replace(/\s+$/, "");
|
|
975
958
|
}
|
|
976
959
|
function Bt(e) {
|
|
977
960
|
var t = e.getExtension("ANGLE_instanced_arrays");
|
|
978
|
-
t && (e.vertexAttribDivisor = function(
|
|
979
|
-
t.vertexAttribDivisorANGLE(
|
|
980
|
-
}, e.drawArraysInstanced = function(
|
|
981
|
-
t.drawArraysInstancedANGLE(
|
|
982
|
-
}, e.drawElementsInstanced = function(
|
|
983
|
-
t.drawElementsInstancedANGLE(
|
|
961
|
+
t && (e.vertexAttribDivisor = function(r, s) {
|
|
962
|
+
t.vertexAttribDivisorANGLE(r, s);
|
|
963
|
+
}, e.drawArraysInstanced = function(r, s, c, u) {
|
|
964
|
+
t.drawArraysInstancedANGLE(r, s, c, u);
|
|
965
|
+
}, e.drawElementsInstanced = function(r, s, c, u, a) {
|
|
966
|
+
t.drawElementsInstancedANGLE(r, s, c, u, a);
|
|
984
967
|
});
|
|
985
968
|
}
|
|
986
969
|
function Dt(e) {
|
|
987
970
|
var t = e.getExtension("OES_vertex_array_object");
|
|
988
971
|
t && (e.createVertexArray = function() {
|
|
989
972
|
return t.createVertexArrayOES();
|
|
990
|
-
}, e.deleteVertexArray = function(
|
|
991
|
-
t.deleteVertexArrayOES(
|
|
992
|
-
}, e.bindVertexArray = function(
|
|
993
|
-
t.bindVertexArrayOES(
|
|
994
|
-
}, e.isVertexArray = function(
|
|
995
|
-
return t.isVertexArrayOES(
|
|
973
|
+
}, e.deleteVertexArray = function(r) {
|
|
974
|
+
t.deleteVertexArrayOES(r);
|
|
975
|
+
}, e.bindVertexArray = function(r) {
|
|
976
|
+
t.bindVertexArrayOES(r);
|
|
977
|
+
}, e.isVertexArray = function(r) {
|
|
978
|
+
return t.isVertexArrayOES(r);
|
|
996
979
|
});
|
|
997
980
|
}
|
|
998
981
|
function Rt(e) {
|
|
999
982
|
var t = e.getExtension("WEBGL_draw_buffers");
|
|
1000
|
-
t && (e.drawBuffers = function(
|
|
1001
|
-
t.drawBuffersWEBGL(
|
|
983
|
+
t && (e.drawBuffers = function(r, s) {
|
|
984
|
+
t.drawBuffersWEBGL(r, s);
|
|
1002
985
|
});
|
|
1003
986
|
}
|
|
1004
|
-
var et = 1, ge = [], te = [], ne = [],
|
|
987
|
+
var et = 1, ge = [], te = [], ne = [], be = [], tt = [1, 1, 2, 2, 4, 4, 4, 2, 3, 4, 8];
|
|
1005
988
|
function ce(e) {
|
|
1006
989
|
we || (we = e);
|
|
1007
990
|
}
|
|
1008
991
|
function Ae(e) {
|
|
1009
|
-
for (var t = et++,
|
|
1010
|
-
e[
|
|
992
|
+
for (var t = et++, r = e.length; r < t; r++)
|
|
993
|
+
e[r] = null;
|
|
1011
994
|
return t;
|
|
1012
995
|
}
|
|
1013
|
-
function
|
|
996
|
+
function Se(e) {
|
|
1014
997
|
return 32 - Math.clz32(e === 0 ? 0 : e - 1);
|
|
1015
998
|
}
|
|
1016
999
|
function Ft(e, t) {
|
|
1017
|
-
e.fa || (e.fa = e.getContext, e.getContext = function(s,
|
|
1018
|
-
return (
|
|
1000
|
+
e.fa || (e.fa = e.getContext, e.getContext = function(s, c) {
|
|
1001
|
+
return (c = e.fa(s, c)) || (c = e.fa(s)), s == "webgl" == c instanceof WebGLRenderingContext ? c : null;
|
|
1019
1002
|
});
|
|
1020
|
-
var
|
|
1021
|
-
return
|
|
1003
|
+
var r = 1 < t.na ? e.getContext("webgl2", t) : e.getContext("webgl", t);
|
|
1004
|
+
return r ? Wt(r, t) : 0;
|
|
1022
1005
|
}
|
|
1023
|
-
function
|
|
1024
|
-
var
|
|
1025
|
-
for (e.canvas && (e.canvas.ya = s),
|
|
1006
|
+
function Wt(e, t) {
|
|
1007
|
+
var r = Ae(be), s = { Ea: r, attributes: t, version: t.na, ba: e };
|
|
1008
|
+
for (e.canvas && (e.canvas.ya = s), be[r] = s, (typeof t.ma > "u" || t.ma) && Tt(s), s.oa = s.ba.getParameter(34921), s.X = [], e = 0; e < s.oa; e++)
|
|
1026
1009
|
s.X[e] = { enabled: !1, ea: !1, size: 0, type: 0, pa: 0, ga: 0, R: 0, ta: null };
|
|
1027
|
-
for (e =
|
|
1010
|
+
for (e = Se(2097152), s.U = [], s.qa = [], s.U.length = s.qa.length = e + 1, s.aa = [], s.ha = [], s.aa.length = s.ha.length = e + 1, s.S = [], s.S.length = e + 1, t = 0; t <= e; ++t) {
|
|
1028
1011
|
s.S[t] = null, s.U[t] = s.qa[t] = 0, s.aa[t] = [], s.ha[t] = [];
|
|
1029
|
-
var
|
|
1030
|
-
|
|
1031
|
-
for (var
|
|
1032
|
-
|
|
1012
|
+
var c = s.aa[t], u = s.ha[t];
|
|
1013
|
+
c.length = u.length = 64;
|
|
1014
|
+
for (var a = 0; 64 > a; ++a)
|
|
1015
|
+
c[a] = u[a] = null;
|
|
1033
1016
|
}
|
|
1034
|
-
return
|
|
1017
|
+
return r;
|
|
1035
1018
|
}
|
|
1036
|
-
function
|
|
1037
|
-
if (e || (e =
|
|
1019
|
+
function Tt(e) {
|
|
1020
|
+
if (e || (e = S), !e.xa) {
|
|
1038
1021
|
e.xa = !0;
|
|
1039
1022
|
var t = e.ba;
|
|
1040
|
-
Bt(t), Dt(t), Rt(t), t.Ca = t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"), t.Fa = t.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"), 2 <= e.version && (t.la = t.getExtension("EXT_disjoint_timer_query_webgl2")), (2 > e.version || !t.la) && (t.la = t.getExtension("EXT_disjoint_timer_query")), t.Ha = t.getExtension("WEBGL_multi_draw"), (t.getSupportedExtensions() || []).forEach(function(
|
|
1041
|
-
|
|
1023
|
+
Bt(t), Dt(t), Rt(t), t.Ca = t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"), t.Fa = t.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"), 2 <= e.version && (t.la = t.getExtension("EXT_disjoint_timer_query_webgl2")), (2 > e.version || !t.la) && (t.la = t.getExtension("EXT_disjoint_timer_query")), t.Ha = t.getExtension("WEBGL_multi_draw"), (t.getSupportedExtensions() || []).forEach(function(r) {
|
|
1024
|
+
r.includes("lose_context") || r.includes("debug") || t.getExtension(r);
|
|
1042
1025
|
});
|
|
1043
1026
|
}
|
|
1044
1027
|
}
|
|
1045
|
-
var we,
|
|
1028
|
+
var we, S, Le, bt = ["default", "low-power", "high-performance"], St = [0, typeof document < "u" ? document : 0, typeof window < "u" ? window : 0];
|
|
1046
1029
|
function nt(e) {
|
|
1047
1030
|
return e.slice(-1) == "]" && e.lastIndexOf("[");
|
|
1048
1031
|
}
|
|
1049
1032
|
function rt(e) {
|
|
1050
1033
|
var t = y.va;
|
|
1051
1034
|
if (t) {
|
|
1052
|
-
var
|
|
1053
|
-
return typeof
|
|
1035
|
+
var r = t.V[e];
|
|
1036
|
+
return typeof r == "number" && (t.V[e] = r = y.getUniformLocation(t, t.ra[e] + (0 < r ? "[" + r + "]" : ""))), r;
|
|
1054
1037
|
}
|
|
1055
1038
|
ce(1282);
|
|
1056
1039
|
}
|
|
1057
|
-
for (var it = [], y,
|
|
1058
|
-
it[me] =
|
|
1040
|
+
for (var it = [], y, Lt = new Float32Array(288), me = 0; 288 > me; ++me)
|
|
1041
|
+
it[me] = Lt.subarray(0, me + 1);
|
|
1059
1042
|
function st(e, t) {
|
|
1060
|
-
for (var
|
|
1061
|
-
var
|
|
1062
|
-
55296 <=
|
|
1043
|
+
for (var r = 0, s = 0; s < e.length; ++s) {
|
|
1044
|
+
var c = e.charCodeAt(s);
|
|
1045
|
+
55296 <= c && 57343 >= c && (c = 65536 + ((c & 1023) << 10) | e.charCodeAt(++s) & 1023), 127 >= c ? ++r : r = 2047 >= c ? r + 2 : 65535 >= c ? r + 3 : r + 4;
|
|
1063
1046
|
}
|
|
1064
|
-
return
|
|
1047
|
+
return r = Array(r + 1), e = de(e, r, 0, r.length), t && (r.length = e), r;
|
|
1065
1048
|
}
|
|
1066
1049
|
var It = { c: function() {
|
|
1067
1050
|
ae("");
|
|
1068
|
-
}, a: function(e, t,
|
|
1069
|
-
t = Mt(t,
|
|
1070
|
-
` : "") + Ct(e)), e & 1 ? e & 4 ? console.error(t) : e & 2 ? console.warn(t) : e & 512 ? console.info(t) : e & 256 ? console.debug(t) : console.log(t) : e & 6 ?
|
|
1071
|
-
}, o: function(e, t,
|
|
1072
|
-
ee.copyWithin(e, t, t +
|
|
1051
|
+
}, a: function(e, t, r) {
|
|
1052
|
+
t = Mt(t, r), t = z(t, 0), e & 24 && (t = t.replace(/\s+$/, ""), t += (0 < t.length ? `
|
|
1053
|
+
` : "") + Ct(e)), e & 1 ? e & 4 ? console.error(t) : e & 2 ? console.warn(t) : e & 512 ? console.info(t) : e & 256 ? console.debug(t) : console.log(t) : e & 6 ? v(t) : T(t);
|
|
1054
|
+
}, o: function(e, t, r) {
|
|
1055
|
+
ee.copyWithin(e, t, t + r);
|
|
1073
1056
|
}, n: function(e) {
|
|
1074
1057
|
var t = ee.length;
|
|
1075
1058
|
if (e >>>= 0, 2147483648 < e)
|
|
1076
1059
|
return !1;
|
|
1077
|
-
for (var
|
|
1078
|
-
var s = t * (1 + 0.2 /
|
|
1060
|
+
for (var r = 1; 4 >= r; r *= 2) {
|
|
1061
|
+
var s = t * (1 + 0.2 / r);
|
|
1079
1062
|
s = Math.min(s, e + 100663296);
|
|
1080
|
-
var
|
|
1081
|
-
s = Math.max(e, s),
|
|
1063
|
+
var c = Math;
|
|
1064
|
+
s = Math.max(e, s), c = c.min.call(c, 2147483648, s + (65536 - s % 65536) % 65536);
|
|
1082
1065
|
e: {
|
|
1083
1066
|
try {
|
|
1084
|
-
|
|
1067
|
+
U.grow(c - pe.byteLength + 65535 >>> 16), Ne();
|
|
1085
1068
|
var u = 1;
|
|
1086
1069
|
break e;
|
|
1087
1070
|
} catch {
|
|
@@ -1093,21 +1076,21 @@ var Fe = (() => {
|
|
|
1093
1076
|
}
|
|
1094
1077
|
return !1;
|
|
1095
1078
|
}, k: function(e, t) {
|
|
1096
|
-
return t >>= 2, t = { alpha: !!C[t + 0], depth: !!C[t + 1], stencil: !!C[t + 2], antialias: !!C[t + 3], premultipliedAlpha: !!C[t + 4], preserveDrawingBuffer: !!C[t + 5], powerPreference:
|
|
1079
|
+
return t >>= 2, t = { alpha: !!C[t + 0], depth: !!C[t + 1], stencil: !!C[t + 2], antialias: !!C[t + 3], premultipliedAlpha: !!C[t + 4], preserveDrawingBuffer: !!C[t + 5], powerPreference: bt[C[t + 6]], failIfMajorPerformanceCaveat: !!C[t + 7], na: C[t + 8], Ga: C[t + 9], ma: C[t + 10], wa: C[t + 11], Ja: C[t + 12], Ka: C[t + 13] }, e = 2 < e ? Y(e) : e, e = St[e] || (typeof document < "u" ? document.querySelector(e) : void 0), !e || t.wa ? 0 : Ft(e, t);
|
|
1097
1080
|
}, e: function(e) {
|
|
1098
|
-
return
|
|
1081
|
+
return S = be[e], n.za = y = S && S.ba, !e || y ? 0 : -5;
|
|
1099
1082
|
}, d: function(e, t) {
|
|
1100
1083
|
y.attachShader(te[e], ne[t]);
|
|
1101
|
-
}, A: function(e, t,
|
|
1102
|
-
y.bindAttribLocation(te[e], t, Y(
|
|
1084
|
+
}, A: function(e, t, r) {
|
|
1085
|
+
y.bindAttribLocation(te[e], t, Y(r));
|
|
1103
1086
|
}, b: function(e, t) {
|
|
1104
1087
|
e == 34962 ? y.ja = t : e == 34963 && (y.ka = t), e == 35051 ? y.Aa = t : e == 35052 && (y.Ba = t), y.bindBuffer(e, ge[t]);
|
|
1105
|
-
}, f: function(e, t,
|
|
1106
|
-
2 <=
|
|
1088
|
+
}, f: function(e, t, r, s) {
|
|
1089
|
+
2 <= S.version ? r ? y.bufferData(e, ee, s, r, t) : y.bufferData(e, t, s) : y.bufferData(e, r ? ee.subarray(r, r + t) : t, s);
|
|
1107
1090
|
}, v: function(e) {
|
|
1108
1091
|
y.clear(e);
|
|
1109
|
-
}, w: function(e, t,
|
|
1110
|
-
y.clearColor(e, t,
|
|
1092
|
+
}, w: function(e, t, r, s) {
|
|
1093
|
+
y.clearColor(e, t, r, s);
|
|
1111
1094
|
}, t: function(e) {
|
|
1112
1095
|
y.compileShader(ne[e]);
|
|
1113
1096
|
}, j: function() {
|
|
@@ -1116,41 +1099,41 @@ var Fe = (() => {
|
|
|
1116
1099
|
}, C: function(e) {
|
|
1117
1100
|
var t = Ae(ne);
|
|
1118
1101
|
return ne[t] = y.createShader(e), t;
|
|
1119
|
-
}, q: function(e, t,
|
|
1102
|
+
}, q: function(e, t, r, s) {
|
|
1120
1103
|
if (!y.ka) {
|
|
1121
|
-
var
|
|
1122
|
-
|
|
1104
|
+
var c = 1 * tt[r - 5120] * t, u = Se(c), a = S.S[u];
|
|
1105
|
+
a ? u = a : (a = y.getParameter(34965), S.S[u] = y.createBuffer(), y.bindBuffer(34963, S.S[u]), y.bufferData(34963, 1 << u, 35048), y.bindBuffer(34963, a), u = S.S[u]), y.bindBuffer(34963, u), y.bufferSubData(34963, 0, ee.subarray(s, s + c)), s = 0;
|
|
1123
1106
|
}
|
|
1124
|
-
for (
|
|
1125
|
-
if (u =
|
|
1126
|
-
|
|
1127
|
-
var p =
|
|
1128
|
-
|
|
1107
|
+
for (Le = !1, c = 0; c < S.oa; ++c)
|
|
1108
|
+
if (u = S.X[c], u.ea && u.enabled) {
|
|
1109
|
+
Le = !0, a = u.ga, a = 0 < a ? t * a : u.size * tt[u.type - 5120] * t;
|
|
1110
|
+
var p = Se(a), B = S.aa[p], _ = S.U[p];
|
|
1111
|
+
S.U[p] = S.U[p] + 1 & 63;
|
|
1129
1112
|
var R = B[_];
|
|
1130
|
-
R ? p = R : (R = y.getParameter(34964), B[_] = y.createBuffer(), y.bindBuffer(34962, B[_]), y.bufferData(34962, 1 << p, 35048), y.bindBuffer(34962, R), p = B[_]), y.bindBuffer(34962, p), y.bufferSubData(34962, 0, ee.subarray(u.R, u.R +
|
|
1113
|
+
R ? p = R : (R = y.getParameter(34964), B[_] = y.createBuffer(), y.bindBuffer(34962, B[_]), y.bufferData(34962, 1 << p, 35048), y.bindBuffer(34962, R), p = B[_]), y.bindBuffer(34962, p), y.bufferSubData(34962, 0, ee.subarray(u.R, u.R + a)), u.ta.call(y, c, u.size, u.type, u.pa, u.ga, 0);
|
|
1131
1114
|
}
|
|
1132
|
-
y.drawElements(e, t,
|
|
1115
|
+
y.drawElements(e, t, r, s), Le && y.bindBuffer(34962, ge[y.ja]), y.ka || y.bindBuffer(34963, null);
|
|
1133
1116
|
}, s: function(e) {
|
|
1134
|
-
|
|
1117
|
+
S.X[e].enabled = !0, y.enableVertexAttribArray(e);
|
|
1135
1118
|
}, g: function(e, t) {
|
|
1136
|
-
for (var
|
|
1137
|
-
var s = y.createBuffer(),
|
|
1138
|
-
s ? (s.name =
|
|
1119
|
+
for (var r = 0; r < e; r++) {
|
|
1120
|
+
var s = y.createBuffer(), c = s && Ae(ge);
|
|
1121
|
+
s ? (s.name = c, ge[c] = s) : ce(1282), C[t + 4 * r >> 2] = c;
|
|
1139
1122
|
}
|
|
1140
1123
|
}, p: function() {
|
|
1141
1124
|
var e = y.getError() || we;
|
|
1142
1125
|
return we = 0, e;
|
|
1143
|
-
}, x: function(e, t,
|
|
1144
|
-
if (
|
|
1126
|
+
}, x: function(e, t, r) {
|
|
1127
|
+
if (r)
|
|
1145
1128
|
if (e >= et)
|
|
1146
1129
|
ce(1281);
|
|
1147
1130
|
else if (e = te[e], t == 35716)
|
|
1148
|
-
e = y.getProgramInfoLog(e), e === null && (e = "(unknown error)"), C[
|
|
1131
|
+
e = y.getProgramInfoLog(e), e === null && (e = "(unknown error)"), C[r >> 2] = e.length + 1;
|
|
1149
1132
|
else if (t == 35719) {
|
|
1150
1133
|
if (!e.$)
|
|
1151
1134
|
for (t = 0; t < y.getProgramParameter(e, 35718); ++t)
|
|
1152
1135
|
e.$ = Math.max(e.$, y.getActiveUniform(e, t).name.length + 1);
|
|
1153
|
-
C[
|
|
1136
|
+
C[r >> 2] = e.$;
|
|
1154
1137
|
} else if (t == 35722) {
|
|
1155
1138
|
if (!e.Y)
|
|
1156
1139
|
for (t = 0; t < y.getProgramParameter(e, 35721); ++t)
|
|
@@ -1158,85 +1141,85 @@ var Fe = (() => {
|
|
|
1158
1141
|
e,
|
|
1159
1142
|
t
|
|
1160
1143
|
).name.length + 1);
|
|
1161
|
-
C[
|
|
1144
|
+
C[r >> 2] = e.Y;
|
|
1162
1145
|
} else if (t == 35381) {
|
|
1163
1146
|
if (!e.Z)
|
|
1164
1147
|
for (t = 0; t < y.getProgramParameter(e, 35382); ++t)
|
|
1165
1148
|
e.Z = Math.max(e.Z, y.getActiveUniformBlockName(e, t).length + 1);
|
|
1166
|
-
C[
|
|
1149
|
+
C[r >> 2] = e.Z;
|
|
1167
1150
|
} else
|
|
1168
|
-
C[
|
|
1151
|
+
C[r >> 2] = y.getProgramParameter(e, t);
|
|
1169
1152
|
else
|
|
1170
1153
|
ce(1281);
|
|
1171
|
-
}, l: function(e, t,
|
|
1172
|
-
e = y.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), t = 0 < t && s ? de(e, ee, s, t) : 0,
|
|
1173
|
-
}, m: function(e, t,
|
|
1174
|
-
|
|
1154
|
+
}, l: function(e, t, r, s) {
|
|
1155
|
+
e = y.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), t = 0 < t && s ? de(e, ee, s, t) : 0, r && (C[r >> 2] = t);
|
|
1156
|
+
}, m: function(e, t, r) {
|
|
1157
|
+
r ? t == 35716 ? (e = y.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), C[r >> 2] = e ? e.length + 1 : 0) : t == 35720 ? (e = y.getShaderSource(ne[e]), C[r >> 2] = e ? e.length + 1 : 0) : C[r >> 2] = y.getShaderParameter(ne[e], t) : ce(1281);
|
|
1175
1158
|
}, i: function(e, t) {
|
|
1176
1159
|
if (t = Y(t), e = te[e]) {
|
|
1177
|
-
var
|
|
1160
|
+
var r = e, s = r.V, c = r.sa, u;
|
|
1178
1161
|
if (!s)
|
|
1179
|
-
for (
|
|
1180
|
-
var
|
|
1181
|
-
|
|
1162
|
+
for (r.V = s = {}, r.ra = {}, u = 0; u < y.getProgramParameter(r, 35718); ++u) {
|
|
1163
|
+
var a = y.getActiveUniform(r, u), p = a.name;
|
|
1164
|
+
a = a.size;
|
|
1182
1165
|
var B = nt(p);
|
|
1183
1166
|
B = 0 < B ? p.slice(0, B) : p;
|
|
1184
|
-
var _ =
|
|
1185
|
-
for (
|
|
1186
|
-
s[_] = p,
|
|
1167
|
+
var _ = r.ia;
|
|
1168
|
+
for (r.ia += a, c[B] = [a, _], p = 0; p < a; ++p)
|
|
1169
|
+
s[_] = p, r.ra[_++] = B;
|
|
1187
1170
|
}
|
|
1188
|
-
if (
|
|
1171
|
+
if (r = e.V, s = 0, c = t, u = nt(t), 0 < u && (s = parseInt(t.slice(u + 1)) >>> 0, c = t.slice(0, u)), (c = e.sa[c]) && s < c[0] && (s += c[1], r[s] = r[s] || y.getUniformLocation(e, t)))
|
|
1189
1172
|
return s;
|
|
1190
1173
|
} else
|
|
1191
1174
|
ce(1281);
|
|
1192
1175
|
return -1;
|
|
1193
1176
|
}, z: function(e) {
|
|
1194
1177
|
e = te[e], y.linkProgram(e), e.V = 0, e.sa = {};
|
|
1195
|
-
}, B: function(e, t,
|
|
1196
|
-
for (var
|
|
1197
|
-
var
|
|
1198
|
-
|
|
1178
|
+
}, B: function(e, t, r, s) {
|
|
1179
|
+
for (var c = "", u = 0; u < t; ++u) {
|
|
1180
|
+
var a = s ? C[s + 4 * u >> 2] : -1;
|
|
1181
|
+
c += Y(C[r + 4 * u >> 2], 0 > a ? void 0 : a);
|
|
1199
1182
|
}
|
|
1200
|
-
y.shaderSource(ne[e],
|
|
1201
|
-
}, h: function(e, t,
|
|
1202
|
-
if (2 <=
|
|
1203
|
-
y.uniformMatrix4fv(rt(e), !!
|
|
1183
|
+
y.shaderSource(ne[e], c);
|
|
1184
|
+
}, h: function(e, t, r, s) {
|
|
1185
|
+
if (2 <= S.version)
|
|
1186
|
+
y.uniformMatrix4fv(rt(e), !!r, ye, s >> 2, 16 * t);
|
|
1204
1187
|
else {
|
|
1205
1188
|
if (18 >= t) {
|
|
1206
|
-
var
|
|
1189
|
+
var c = it[16 * t - 1], u = ye;
|
|
1207
1190
|
s >>= 2;
|
|
1208
|
-
for (var
|
|
1209
|
-
var p = s +
|
|
1210
|
-
|
|
1191
|
+
for (var a = 0; a < 16 * t; a += 16) {
|
|
1192
|
+
var p = s + a;
|
|
1193
|
+
c[a] = u[p], c[a + 1] = u[p + 1], c[a + 2] = u[p + 2], c[a + 3] = u[p + 3], c[a + 4] = u[p + 4], c[a + 5] = u[p + 5], c[a + 6] = u[p + 6], c[a + 7] = u[p + 7], c[a + 8] = u[p + 8], c[a + 9] = u[p + 9], c[a + 10] = u[p + 10], c[a + 11] = u[p + 11], c[a + 12] = u[p + 12], c[a + 13] = u[p + 13], c[a + 14] = u[p + 14], c[a + 15] = u[p + 15];
|
|
1211
1194
|
}
|
|
1212
1195
|
} else
|
|
1213
|
-
|
|
1214
|
-
y.uniformMatrix4fv(rt(e), !!
|
|
1196
|
+
c = ye.subarray(s >> 2, s + 64 * t >> 2);
|
|
1197
|
+
y.uniformMatrix4fv(rt(e), !!r, c);
|
|
1215
1198
|
}
|
|
1216
1199
|
}, u: function(e) {
|
|
1217
1200
|
e = te[e], y.useProgram(e), y.va = e;
|
|
1218
1201
|
}, y: function(e) {
|
|
1219
1202
|
y.validateProgram(te[e]);
|
|
1220
|
-
}, r: function(e, t,
|
|
1221
|
-
var
|
|
1222
|
-
y.ja ? (
|
|
1203
|
+
}, r: function(e, t, r, s, c, u) {
|
|
1204
|
+
var a = S.X[e];
|
|
1205
|
+
y.ja ? (a.ea = !1, y.vertexAttribPointer(e, t, r, !!s, c, u)) : (a.size = t, a.type = r, a.pa = s, a.ga = c, a.R = u, a.ea = !0, a.ta = function(p, B, _, R, re, V) {
|
|
1223
1206
|
this.vertexAttribPointer(p, B, _, R, re, V);
|
|
1224
1207
|
});
|
|
1225
1208
|
} };
|
|
1226
1209
|
(function() {
|
|
1227
|
-
function e(
|
|
1228
|
-
n.asm =
|
|
1210
|
+
function e(c) {
|
|
1211
|
+
n.asm = c.exports, U = n.asm.D, Ne(), ze = n.asm.M, Xe.unshift(n.asm.E), ue--, n.monitorRunDependencies && n.monitorRunDependencies(ue), ue == 0 && fe && (c = fe, fe = null, c());
|
|
1229
1212
|
}
|
|
1230
|
-
function t(
|
|
1231
|
-
e(
|
|
1213
|
+
function t(c) {
|
|
1214
|
+
e(c.instance);
|
|
1232
1215
|
}
|
|
1233
|
-
function
|
|
1216
|
+
function r(c) {
|
|
1234
1217
|
return xt().then(function(u) {
|
|
1235
1218
|
return WebAssembly.instantiate(u, s);
|
|
1236
1219
|
}).then(function(u) {
|
|
1237
1220
|
return u;
|
|
1238
|
-
}).then(
|
|
1239
|
-
|
|
1221
|
+
}).then(c, function(u) {
|
|
1222
|
+
v("failed to asynchronously prepare wasm: " + u), ae(u);
|
|
1240
1223
|
});
|
|
1241
1224
|
}
|
|
1242
1225
|
var s = { a: It };
|
|
@@ -1246,16 +1229,16 @@ var Fe = (() => {
|
|
|
1246
1229
|
s,
|
|
1247
1230
|
e
|
|
1248
1231
|
);
|
|
1249
|
-
} catch (
|
|
1250
|
-
return
|
|
1232
|
+
} catch (c) {
|
|
1233
|
+
return v("Module.instantiateWasm callback failed with error: " + c), !1;
|
|
1251
1234
|
}
|
|
1252
1235
|
return function() {
|
|
1253
|
-
return O || typeof WebAssembly.instantiateStreaming != "function" || Ye() ||
|
|
1254
|
-
return WebAssembly.instantiateStreaming(
|
|
1255
|
-
return
|
|
1236
|
+
return O || typeof WebAssembly.instantiateStreaming != "function" || Ye() || X.startsWith("file://") || typeof fetch != "function" ? r(t) : fetch(X, { credentials: "same-origin" }).then(function(c) {
|
|
1237
|
+
return WebAssembly.instantiateStreaming(c, s).then(t, function(u) {
|
|
1238
|
+
return v("wasm streaming compile failed: " + u), v("falling back to ArrayBuffer instantiation"), r(t);
|
|
1256
1239
|
});
|
|
1257
1240
|
});
|
|
1258
|
-
}().catch(
|
|
1241
|
+
}().catch(l), {};
|
|
1259
1242
|
})(), n.___wasm_call_ctors = function() {
|
|
1260
1243
|
return (n.___wasm_call_ctors = n.asm.E).apply(null, arguments);
|
|
1261
1244
|
};
|
|
@@ -1288,19 +1271,19 @@ var Fe = (() => {
|
|
|
1288
1271
|
function Ie() {
|
|
1289
1272
|
function e() {
|
|
1290
1273
|
if (!_e && (_e = !0, n.calledRun = !0, !H)) {
|
|
1291
|
-
if (
|
|
1274
|
+
if (We(Xe), f(n), n.onRuntimeInitialized && n.onRuntimeInitialized(), n.postRun)
|
|
1292
1275
|
for (typeof n.postRun == "function" && (n.postRun = [n.postRun]); n.postRun.length; ) {
|
|
1293
1276
|
var t = n.postRun.shift();
|
|
1294
|
-
|
|
1277
|
+
$e.unshift(t);
|
|
1295
1278
|
}
|
|
1296
|
-
|
|
1279
|
+
We($e);
|
|
1297
1280
|
}
|
|
1298
1281
|
}
|
|
1299
1282
|
if (!(0 < ue)) {
|
|
1300
1283
|
if (n.preRun)
|
|
1301
1284
|
for (typeof n.preRun == "function" && (n.preRun = [n.preRun]); n.preRun.length; )
|
|
1302
|
-
|
|
1303
|
-
|
|
1285
|
+
Pt();
|
|
1286
|
+
We(Ge), 0 < ue || (n.setStatus ? (n.setStatus("Running..."), setTimeout(function() {
|
|
1304
1287
|
setTimeout(function() {
|
|
1305
1288
|
n.setStatus("");
|
|
1306
1289
|
}, 1), e();
|
|
@@ -1314,20 +1297,20 @@ var Fe = (() => {
|
|
|
1314
1297
|
function G() {
|
|
1315
1298
|
}
|
|
1316
1299
|
G.prototype = Object.create(G.prototype), G.prototype.constructor = G, G.prototype.T = G, G.W = {}, n.WrapperObject = G;
|
|
1317
|
-
function
|
|
1300
|
+
function ve(e) {
|
|
1318
1301
|
return (e || G).W;
|
|
1319
1302
|
}
|
|
1320
|
-
n.getCache =
|
|
1321
|
-
function
|
|
1322
|
-
var
|
|
1323
|
-
return s || (s = Object.create((t || G).prototype), s.R = e,
|
|
1303
|
+
n.getCache = ve;
|
|
1304
|
+
function Pe(e, t) {
|
|
1305
|
+
var r = ve(t), s = r[e];
|
|
1306
|
+
return s || (s = Object.create((t || G).prototype), s.R = e, r[e] = s);
|
|
1324
1307
|
}
|
|
1325
|
-
n.wrapPointer =
|
|
1326
|
-
return
|
|
1327
|
-
}, n.NULL =
|
|
1308
|
+
n.wrapPointer = Pe, n.castObject = function(e, t) {
|
|
1309
|
+
return Pe(e.R, t);
|
|
1310
|
+
}, n.NULL = Pe(0), n.destroy = function(e) {
|
|
1328
1311
|
if (!e.__destroy__)
|
|
1329
1312
|
throw "Error: Cannot destroy object. (Did you create it yourself?)";
|
|
1330
|
-
e.__destroy__(), delete
|
|
1313
|
+
e.__destroy__(), delete ve(e.T)[e.R];
|
|
1331
1314
|
}, n.compare = function(e, t) {
|
|
1332
1315
|
return e.R === t.R;
|
|
1333
1316
|
}, n.getPointer = function(e) {
|
|
@@ -1347,19 +1330,19 @@ var Fe = (() => {
|
|
|
1347
1330
|
function ht(e, t) {
|
|
1348
1331
|
return le || ae(void 0), e = e.length * t.BYTES_PER_ELEMENT, e = e + 7 & -8, Me + e >= xe ? (0 < e || ae(void 0), Be += e, t = n._malloc(e), Ce.push(t)) : (t = le + Me, Me += e), t;
|
|
1349
1332
|
}
|
|
1350
|
-
function Et(e, t,
|
|
1351
|
-
switch (
|
|
1333
|
+
function Et(e, t, r) {
|
|
1334
|
+
switch (r >>>= 0, t.BYTES_PER_ELEMENT) {
|
|
1352
1335
|
case 2:
|
|
1353
|
-
|
|
1336
|
+
r >>>= 1;
|
|
1354
1337
|
break;
|
|
1355
1338
|
case 4:
|
|
1356
|
-
|
|
1339
|
+
r >>>= 2;
|
|
1357
1340
|
break;
|
|
1358
1341
|
case 8:
|
|
1359
|
-
|
|
1342
|
+
r >>>= 3;
|
|
1360
1343
|
}
|
|
1361
1344
|
for (var s = 0; s < e.length; s++)
|
|
1362
|
-
t[
|
|
1345
|
+
t[r + s] = e[s];
|
|
1363
1346
|
}
|
|
1364
1347
|
function gt(e) {
|
|
1365
1348
|
if (typeof e == "object") {
|
|
@@ -1378,26 +1361,26 @@ var Fe = (() => {
|
|
|
1378
1361
|
throw "cannot construct a McObject, no constructor in IDL";
|
|
1379
1362
|
}
|
|
1380
1363
|
Z.prototype = Object.create(G.prototype), Z.prototype.constructor = Z, Z.prototype.T = Z, Z.W = {}, n.McObject = Z, Z.prototype.updateDisplay = function(e, t) {
|
|
1381
|
-
var
|
|
1382
|
-
return yt(), typeof e == "object" && (e = gt(e)), typeof t == "object" && (t = gt(t)), !!ut(
|
|
1364
|
+
var r = this.R;
|
|
1365
|
+
return yt(), typeof e == "object" && (e = gt(e)), typeof t == "object" && (t = gt(t)), !!ut(r, e, t);
|
|
1383
1366
|
}, Z.prototype.test = Z.prototype.test = function() {
|
|
1384
1367
|
at(this.R);
|
|
1385
1368
|
};
|
|
1386
1369
|
function Q() {
|
|
1387
|
-
this.R = ct(),
|
|
1370
|
+
this.R = ct(), ve(Q)[this.R] = this;
|
|
1388
1371
|
}
|
|
1389
1372
|
return Q.prototype = Object.create(G.prototype), Q.prototype.constructor = Q, Q.prototype.T = Q, Q.W = {}, n.McApp = Q, Q.prototype.Init = function() {
|
|
1390
1373
|
lt(this.R);
|
|
1391
|
-
}, Q.prototype.CreateMxDraw = function(e, t,
|
|
1374
|
+
}, Q.prototype.CreateMxDraw = function(e, t, r) {
|
|
1392
1375
|
var s = this.R;
|
|
1393
|
-
if (yt(), e && typeof e == "object" && (e = e.R), t && typeof t == "object" && (t = t.R),
|
|
1394
|
-
|
|
1395
|
-
else if (typeof
|
|
1396
|
-
|
|
1397
|
-
var
|
|
1398
|
-
Et(
|
|
1376
|
+
if (yt(), e && typeof e == "object" && (e = e.R), t && typeof t == "object" && (t = t.R), r && typeof r == "object")
|
|
1377
|
+
r = r.R;
|
|
1378
|
+
else if (typeof r == "string") {
|
|
1379
|
+
r = st(r);
|
|
1380
|
+
var c = ht(r, j);
|
|
1381
|
+
Et(r, j, c), r = c;
|
|
1399
1382
|
}
|
|
1400
|
-
return
|
|
1383
|
+
return Pe(ft(s, e, t, r), Z);
|
|
1401
1384
|
}, Q.prototype.__destroy__ = function() {
|
|
1402
1385
|
dt(this.R);
|
|
1403
1386
|
}, o.ready;
|
|
@@ -1406,38 +1389,35 @@ var Fe = (() => {
|
|
|
1406
1389
|
typeof exports == "object" && typeof module == "object" ? module.exports = Fe : typeof define == "function" && define.amd ? define([], function() {
|
|
1407
1390
|
return Fe;
|
|
1408
1391
|
}) : typeof exports == "object" && (exports.mxdrawassembly = Fe);
|
|
1409
|
-
const
|
|
1392
|
+
const vt = (i, o) => new URL(i, o || self.location.href).toString();
|
|
1410
1393
|
let ke;
|
|
1411
|
-
function
|
|
1394
|
+
function Qt(i, o = vt) {
|
|
1412
1395
|
Fe({
|
|
1413
1396
|
locateFile: o
|
|
1414
1397
|
}).then((n) => {
|
|
1415
1398
|
let f = new n.McApp();
|
|
1416
|
-
f.Init(), ke = n, ke.McApp = f,
|
|
1399
|
+
f.Init(), ke = n, ke.McApp = f, i(ke);
|
|
1417
1400
|
});
|
|
1418
1401
|
}
|
|
1419
|
-
const
|
|
1420
|
-
loadMxdrawassembly:
|
|
1421
|
-
getWasmURL:
|
|
1402
|
+
const on = {
|
|
1403
|
+
loadMxdrawassembly: Qt,
|
|
1404
|
+
getWasmURL: vt
|
|
1422
1405
|
};
|
|
1423
1406
|
export {
|
|
1424
1407
|
ke as MxCpp,
|
|
1425
1408
|
_t as MxTools,
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1409
|
+
Ht as b64Decode,
|
|
1410
|
+
Vt as b64Encode,
|
|
1411
|
+
on as default,
|
|
1412
|
+
rn as drawArc,
|
|
1413
|
+
Gt as drawCircle,
|
|
1414
|
+
sn as drawEllipticalArc,
|
|
1432
1415
|
Xt as drawLine,
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1416
|
+
en as drawMText,
|
|
1417
|
+
tn as drawPolyLine,
|
|
1418
|
+
nn as drawPolygon,
|
|
1419
|
+
Ut as drawText,
|
|
1437
1420
|
qt as fetchAndInstantiate,
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
Vt as readFromBlobOrFile,
|
|
1441
|
-
Nt as setMcDbEntity,
|
|
1442
|
-
tn as toBlobURL
|
|
1421
|
+
Qt as loadMxdrawassembly,
|
|
1422
|
+
Nt as setMcDbEntity
|
|
1443
1423
|
};
|