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