@quick-threejs/reactive 0.1.22 → 0.1.24
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/app.module-Da11YIUG.js +29 -0
- package/dist/app.module-Dg_0i25D.mjs +2640 -0
- package/dist/main.js +7 -7017
- package/dist/main.mjs +2834 -0
- package/dist/worker.js +3 -0
- package/dist/worker.mjs +318 -0
- package/package.json +12 -17
- package/dist/main.umd.cjs +0 -68
|
@@ -0,0 +1,2640 @@
|
|
|
1
|
+
var pn = Object.defineProperty;
|
|
2
|
+
var fn = (t, e, n) => e in t ? pn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var l = (t, e, n) => fn(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { Subject as U, filter as me } from "rxjs";
|
|
5
|
+
import { ProxyReceiver as dn } from "@quick-threejs/utils";
|
|
6
|
+
import { Clock as mn, Scene as St, PerspectiveCamera as K, OrthographicCamera as pe, Camera as ne, Ray as _n, Plane as yn, MathUtils as vn, Vector3 as L, Controls as bn, MOUSE as B, TOUCH as q, Quaternion as ft, Spherical as dt, Vector2 as N, CameraHelper as wn, AxesHelper as gn, GridHelper as Pn, WebGLRenderer as mt, PCFSoftShadowMap as Cn, SRGBColorSpace as On, CineonToneMapping as $n } from "three";
|
|
7
|
+
var _t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
8
|
+
function $r(t) {
|
|
9
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
10
|
+
}
|
|
11
|
+
var yt = {};
|
|
12
|
+
/*! *****************************************************************************
|
|
13
|
+
Copyright (C) Microsoft. All rights reserved.
|
|
14
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
15
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
16
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
|
|
18
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
19
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
20
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
21
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
22
|
+
|
|
23
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
24
|
+
and limitations under the License.
|
|
25
|
+
***************************************************************************** */
|
|
26
|
+
var vt;
|
|
27
|
+
function En() {
|
|
28
|
+
if (vt) return yt;
|
|
29
|
+
vt = 1;
|
|
30
|
+
var t;
|
|
31
|
+
return function(e) {
|
|
32
|
+
(function(n) {
|
|
33
|
+
var r = typeof globalThis == "object" ? globalThis : typeof _t == "object" ? _t : typeof self == "object" ? self : typeof this == "object" ? this : g(), i = s(e);
|
|
34
|
+
typeof r.Reflect < "u" && (i = s(r.Reflect, i)), n(i, r), typeof r.Reflect > "u" && (r.Reflect = e);
|
|
35
|
+
function s(_, E) {
|
|
36
|
+
return function(I, J) {
|
|
37
|
+
Object.defineProperty(_, I, { configurable: !0, writable: !0, value: J }), E && E(I, J);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function a() {
|
|
41
|
+
try {
|
|
42
|
+
return Function("return this;")();
|
|
43
|
+
} catch {
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function y() {
|
|
47
|
+
try {
|
|
48
|
+
return (0, eval)("(function() { return this; })()");
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function g() {
|
|
53
|
+
return a() || y();
|
|
54
|
+
}
|
|
55
|
+
})(function(n, r) {
|
|
56
|
+
var i = Object.prototype.hasOwnProperty, s = typeof Symbol == "function", a = s && typeof Symbol.toPrimitive < "u" ? Symbol.toPrimitive : "@@toPrimitive", y = s && typeof Symbol.iterator < "u" ? Symbol.iterator : "@@iterator", g = typeof Object.create == "function", _ = { __proto__: [] } instanceof Array, E = !g && !_, I = {
|
|
57
|
+
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
58
|
+
create: g ? function() {
|
|
59
|
+
return $e(/* @__PURE__ */ Object.create(null));
|
|
60
|
+
} : _ ? function() {
|
|
61
|
+
return $e({ __proto__: null });
|
|
62
|
+
} : function() {
|
|
63
|
+
return $e({});
|
|
64
|
+
},
|
|
65
|
+
has: E ? function(o, h) {
|
|
66
|
+
return i.call(o, h);
|
|
67
|
+
} : function(o, h) {
|
|
68
|
+
return h in o;
|
|
69
|
+
},
|
|
70
|
+
get: E ? function(o, h) {
|
|
71
|
+
return i.call(o, h) ? o[h] : void 0;
|
|
72
|
+
} : function(o, h) {
|
|
73
|
+
return o[h];
|
|
74
|
+
}
|
|
75
|
+
}, J = Object.getPrototypeOf(Function), ee = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : an(), we = typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : hn(), ge = typeof WeakMap == "function" ? WeakMap : ln(), W = s ? Symbol.for("@reflect-metadata:registry") : void 0, ae = rn(), Be = sn(ae);
|
|
76
|
+
function Lt(o, h, c, u) {
|
|
77
|
+
if (b(c)) {
|
|
78
|
+
if (!st(o))
|
|
79
|
+
throw new TypeError();
|
|
80
|
+
if (!ot(h))
|
|
81
|
+
throw new TypeError();
|
|
82
|
+
return qt(o, h);
|
|
83
|
+
} else {
|
|
84
|
+
if (!st(o))
|
|
85
|
+
throw new TypeError();
|
|
86
|
+
if (!T(h))
|
|
87
|
+
throw new TypeError();
|
|
88
|
+
if (!T(u) && !b(u) && !V(u))
|
|
89
|
+
throw new TypeError();
|
|
90
|
+
return V(u) && (u = void 0), c = H(c), Bt(o, h, c, u);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
n("decorate", Lt);
|
|
94
|
+
function Ut(o, h) {
|
|
95
|
+
function c(u, v) {
|
|
96
|
+
if (!T(u))
|
|
97
|
+
throw new TypeError();
|
|
98
|
+
if (!b(v) && !tn(v))
|
|
99
|
+
throw new TypeError();
|
|
100
|
+
et(o, h, u, v);
|
|
101
|
+
}
|
|
102
|
+
return c;
|
|
103
|
+
}
|
|
104
|
+
n("metadata", Ut);
|
|
105
|
+
function Yt(o, h, c, u) {
|
|
106
|
+
if (!T(c))
|
|
107
|
+
throw new TypeError();
|
|
108
|
+
return b(u) || (u = H(u)), et(o, h, c, u);
|
|
109
|
+
}
|
|
110
|
+
n("defineMetadata", Yt);
|
|
111
|
+
function Zt(o, h, c) {
|
|
112
|
+
if (!T(h))
|
|
113
|
+
throw new TypeError();
|
|
114
|
+
return b(c) || (c = H(c)), ke(o, h, c);
|
|
115
|
+
}
|
|
116
|
+
n("hasMetadata", Zt);
|
|
117
|
+
function Ft(o, h, c) {
|
|
118
|
+
if (!T(h))
|
|
119
|
+
throw new TypeError();
|
|
120
|
+
return b(c) || (c = H(c)), Pe(o, h, c);
|
|
121
|
+
}
|
|
122
|
+
n("hasOwnMetadata", Ft);
|
|
123
|
+
function Gt(o, h, c) {
|
|
124
|
+
if (!T(h))
|
|
125
|
+
throw new TypeError();
|
|
126
|
+
return b(c) || (c = H(c)), Qe(o, h, c);
|
|
127
|
+
}
|
|
128
|
+
n("getMetadata", Gt);
|
|
129
|
+
function Wt(o, h, c) {
|
|
130
|
+
if (!T(h))
|
|
131
|
+
throw new TypeError();
|
|
132
|
+
return b(c) || (c = H(c)), Je(o, h, c);
|
|
133
|
+
}
|
|
134
|
+
n("getOwnMetadata", Wt);
|
|
135
|
+
function Vt(o, h) {
|
|
136
|
+
if (!T(o))
|
|
137
|
+
throw new TypeError();
|
|
138
|
+
return b(h) || (h = H(h)), tt(o, h);
|
|
139
|
+
}
|
|
140
|
+
n("getMetadataKeys", Vt);
|
|
141
|
+
function Xt(o, h) {
|
|
142
|
+
if (!T(o))
|
|
143
|
+
throw new TypeError();
|
|
144
|
+
return b(h) || (h = H(h)), nt(o, h);
|
|
145
|
+
}
|
|
146
|
+
n("getOwnMetadataKeys", Xt);
|
|
147
|
+
function Kt(o, h, c) {
|
|
148
|
+
if (!T(h))
|
|
149
|
+
throw new TypeError();
|
|
150
|
+
if (b(c) || (c = H(c)), !T(h))
|
|
151
|
+
throw new TypeError();
|
|
152
|
+
b(c) || (c = H(c));
|
|
153
|
+
var u = te(
|
|
154
|
+
h,
|
|
155
|
+
c,
|
|
156
|
+
/*Create*/
|
|
157
|
+
!1
|
|
158
|
+
);
|
|
159
|
+
return b(u) ? !1 : u.OrdinaryDeleteMetadata(o, h, c);
|
|
160
|
+
}
|
|
161
|
+
n("deleteMetadata", Kt);
|
|
162
|
+
function qt(o, h) {
|
|
163
|
+
for (var c = o.length - 1; c >= 0; --c) {
|
|
164
|
+
var u = o[c], v = u(h);
|
|
165
|
+
if (!b(v) && !V(v)) {
|
|
166
|
+
if (!ot(v))
|
|
167
|
+
throw new TypeError();
|
|
168
|
+
h = v;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return h;
|
|
172
|
+
}
|
|
173
|
+
function Bt(o, h, c, u) {
|
|
174
|
+
for (var v = o.length - 1; v >= 0; --v) {
|
|
175
|
+
var j = o[v], R = j(h, c, u);
|
|
176
|
+
if (!b(R) && !V(R)) {
|
|
177
|
+
if (!T(R))
|
|
178
|
+
throw new TypeError();
|
|
179
|
+
u = R;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return u;
|
|
183
|
+
}
|
|
184
|
+
function ke(o, h, c) {
|
|
185
|
+
var u = Pe(o, h, c);
|
|
186
|
+
if (u)
|
|
187
|
+
return !0;
|
|
188
|
+
var v = Oe(h);
|
|
189
|
+
return V(v) ? !1 : ke(o, v, c);
|
|
190
|
+
}
|
|
191
|
+
function Pe(o, h, c) {
|
|
192
|
+
var u = te(
|
|
193
|
+
h,
|
|
194
|
+
c,
|
|
195
|
+
/*Create*/
|
|
196
|
+
!1
|
|
197
|
+
);
|
|
198
|
+
return b(u) ? !1 : rt(u.OrdinaryHasOwnMetadata(o, h, c));
|
|
199
|
+
}
|
|
200
|
+
function Qe(o, h, c) {
|
|
201
|
+
var u = Pe(o, h, c);
|
|
202
|
+
if (u)
|
|
203
|
+
return Je(o, h, c);
|
|
204
|
+
var v = Oe(h);
|
|
205
|
+
if (!V(v))
|
|
206
|
+
return Qe(o, v, c);
|
|
207
|
+
}
|
|
208
|
+
function Je(o, h, c) {
|
|
209
|
+
var u = te(
|
|
210
|
+
h,
|
|
211
|
+
c,
|
|
212
|
+
/*Create*/
|
|
213
|
+
!1
|
|
214
|
+
);
|
|
215
|
+
if (!b(u))
|
|
216
|
+
return u.OrdinaryGetOwnMetadata(o, h, c);
|
|
217
|
+
}
|
|
218
|
+
function et(o, h, c, u) {
|
|
219
|
+
var v = te(
|
|
220
|
+
c,
|
|
221
|
+
u,
|
|
222
|
+
/*Create*/
|
|
223
|
+
!0
|
|
224
|
+
);
|
|
225
|
+
v.OrdinaryDefineOwnMetadata(o, h, c, u);
|
|
226
|
+
}
|
|
227
|
+
function tt(o, h) {
|
|
228
|
+
var c = nt(o, h), u = Oe(o);
|
|
229
|
+
if (u === null)
|
|
230
|
+
return c;
|
|
231
|
+
var v = tt(u, h);
|
|
232
|
+
if (v.length <= 0)
|
|
233
|
+
return c;
|
|
234
|
+
if (c.length <= 0)
|
|
235
|
+
return v;
|
|
236
|
+
for (var j = new we(), R = [], P = 0, p = c; P < p.length; P++) {
|
|
237
|
+
var f = p[P], d = j.has(f);
|
|
238
|
+
d || (j.add(f), R.push(f));
|
|
239
|
+
}
|
|
240
|
+
for (var m = 0, C = v; m < C.length; m++) {
|
|
241
|
+
var f = C[m], d = j.has(f);
|
|
242
|
+
d || (j.add(f), R.push(f));
|
|
243
|
+
}
|
|
244
|
+
return R;
|
|
245
|
+
}
|
|
246
|
+
function nt(o, h) {
|
|
247
|
+
var c = te(
|
|
248
|
+
o,
|
|
249
|
+
h,
|
|
250
|
+
/*create*/
|
|
251
|
+
!1
|
|
252
|
+
);
|
|
253
|
+
return c ? c.OrdinaryOwnMetadataKeys(o, h) : [];
|
|
254
|
+
}
|
|
255
|
+
function it(o) {
|
|
256
|
+
if (o === null)
|
|
257
|
+
return 1;
|
|
258
|
+
switch (typeof o) {
|
|
259
|
+
case "undefined":
|
|
260
|
+
return 0;
|
|
261
|
+
case "boolean":
|
|
262
|
+
return 2;
|
|
263
|
+
case "string":
|
|
264
|
+
return 3;
|
|
265
|
+
case "symbol":
|
|
266
|
+
return 4;
|
|
267
|
+
case "number":
|
|
268
|
+
return 5;
|
|
269
|
+
case "object":
|
|
270
|
+
return o === null ? 1 : 6;
|
|
271
|
+
default:
|
|
272
|
+
return 6;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
function b(o) {
|
|
276
|
+
return o === void 0;
|
|
277
|
+
}
|
|
278
|
+
function V(o) {
|
|
279
|
+
return o === null;
|
|
280
|
+
}
|
|
281
|
+
function kt(o) {
|
|
282
|
+
return typeof o == "symbol";
|
|
283
|
+
}
|
|
284
|
+
function T(o) {
|
|
285
|
+
return typeof o == "object" ? o !== null : typeof o == "function";
|
|
286
|
+
}
|
|
287
|
+
function Qt(o, h) {
|
|
288
|
+
switch (it(o)) {
|
|
289
|
+
case 0:
|
|
290
|
+
return o;
|
|
291
|
+
case 1:
|
|
292
|
+
return o;
|
|
293
|
+
case 2:
|
|
294
|
+
return o;
|
|
295
|
+
case 3:
|
|
296
|
+
return o;
|
|
297
|
+
case 4:
|
|
298
|
+
return o;
|
|
299
|
+
case 5:
|
|
300
|
+
return o;
|
|
301
|
+
}
|
|
302
|
+
var c = "string", u = at(o, a);
|
|
303
|
+
if (u !== void 0) {
|
|
304
|
+
var v = u.call(o, c);
|
|
305
|
+
if (T(v))
|
|
306
|
+
throw new TypeError();
|
|
307
|
+
return v;
|
|
308
|
+
}
|
|
309
|
+
return Jt(o);
|
|
310
|
+
}
|
|
311
|
+
function Jt(o, h) {
|
|
312
|
+
var c, u;
|
|
313
|
+
{
|
|
314
|
+
var v = o.toString;
|
|
315
|
+
if (he(v)) {
|
|
316
|
+
var u = v.call(o);
|
|
317
|
+
if (!T(u))
|
|
318
|
+
return u;
|
|
319
|
+
}
|
|
320
|
+
var c = o.valueOf;
|
|
321
|
+
if (he(c)) {
|
|
322
|
+
var u = c.call(o);
|
|
323
|
+
if (!T(u))
|
|
324
|
+
return u;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
throw new TypeError();
|
|
328
|
+
}
|
|
329
|
+
function rt(o) {
|
|
330
|
+
return !!o;
|
|
331
|
+
}
|
|
332
|
+
function en(o) {
|
|
333
|
+
return "" + o;
|
|
334
|
+
}
|
|
335
|
+
function H(o) {
|
|
336
|
+
var h = Qt(o);
|
|
337
|
+
return kt(h) ? h : en(h);
|
|
338
|
+
}
|
|
339
|
+
function st(o) {
|
|
340
|
+
return Array.isArray ? Array.isArray(o) : o instanceof Object ? o instanceof Array : Object.prototype.toString.call(o) === "[object Array]";
|
|
341
|
+
}
|
|
342
|
+
function he(o) {
|
|
343
|
+
return typeof o == "function";
|
|
344
|
+
}
|
|
345
|
+
function ot(o) {
|
|
346
|
+
return typeof o == "function";
|
|
347
|
+
}
|
|
348
|
+
function tn(o) {
|
|
349
|
+
switch (it(o)) {
|
|
350
|
+
case 3:
|
|
351
|
+
return !0;
|
|
352
|
+
case 4:
|
|
353
|
+
return !0;
|
|
354
|
+
default:
|
|
355
|
+
return !1;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
function Ce(o, h) {
|
|
359
|
+
return o === h || o !== o && h !== h;
|
|
360
|
+
}
|
|
361
|
+
function at(o, h) {
|
|
362
|
+
var c = o[h];
|
|
363
|
+
if (c != null) {
|
|
364
|
+
if (!he(c))
|
|
365
|
+
throw new TypeError();
|
|
366
|
+
return c;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
function ht(o) {
|
|
370
|
+
var h = at(o, y);
|
|
371
|
+
if (!he(h))
|
|
372
|
+
throw new TypeError();
|
|
373
|
+
var c = h.call(o);
|
|
374
|
+
if (!T(c))
|
|
375
|
+
throw new TypeError();
|
|
376
|
+
return c;
|
|
377
|
+
}
|
|
378
|
+
function lt(o) {
|
|
379
|
+
return o.value;
|
|
380
|
+
}
|
|
381
|
+
function ct(o) {
|
|
382
|
+
var h = o.next();
|
|
383
|
+
return h.done ? !1 : h;
|
|
384
|
+
}
|
|
385
|
+
function ut(o) {
|
|
386
|
+
var h = o.return;
|
|
387
|
+
h && h.call(o);
|
|
388
|
+
}
|
|
389
|
+
function Oe(o) {
|
|
390
|
+
var h = Object.getPrototypeOf(o);
|
|
391
|
+
if (typeof o != "function" || o === J || h !== J)
|
|
392
|
+
return h;
|
|
393
|
+
var c = o.prototype, u = c && Object.getPrototypeOf(c);
|
|
394
|
+
if (u == null || u === Object.prototype)
|
|
395
|
+
return h;
|
|
396
|
+
var v = u.constructor;
|
|
397
|
+
return typeof v != "function" || v === o ? h : v;
|
|
398
|
+
}
|
|
399
|
+
function nn() {
|
|
400
|
+
var o;
|
|
401
|
+
!b(W) && typeof r.Reflect < "u" && !(W in r.Reflect) && typeof r.Reflect.defineMetadata == "function" && (o = on(r.Reflect));
|
|
402
|
+
var h, c, u, v = new ge(), j = {
|
|
403
|
+
registerProvider: R,
|
|
404
|
+
getProvider: p,
|
|
405
|
+
setProvider: d
|
|
406
|
+
};
|
|
407
|
+
return j;
|
|
408
|
+
function R(m) {
|
|
409
|
+
if (!Object.isExtensible(j))
|
|
410
|
+
throw new Error("Cannot add provider to a frozen registry.");
|
|
411
|
+
switch (!0) {
|
|
412
|
+
case o === m:
|
|
413
|
+
break;
|
|
414
|
+
case b(h):
|
|
415
|
+
h = m;
|
|
416
|
+
break;
|
|
417
|
+
case h === m:
|
|
418
|
+
break;
|
|
419
|
+
case b(c):
|
|
420
|
+
c = m;
|
|
421
|
+
break;
|
|
422
|
+
case c === m:
|
|
423
|
+
break;
|
|
424
|
+
default:
|
|
425
|
+
u === void 0 && (u = new we()), u.add(m);
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function P(m, C) {
|
|
430
|
+
if (!b(h)) {
|
|
431
|
+
if (h.isProviderFor(m, C))
|
|
432
|
+
return h;
|
|
433
|
+
if (!b(c)) {
|
|
434
|
+
if (c.isProviderFor(m, C))
|
|
435
|
+
return h;
|
|
436
|
+
if (!b(u))
|
|
437
|
+
for (var $ = ht(u); ; ) {
|
|
438
|
+
var M = ct($);
|
|
439
|
+
if (!M)
|
|
440
|
+
return;
|
|
441
|
+
var z = lt(M);
|
|
442
|
+
if (z.isProviderFor(m, C))
|
|
443
|
+
return ut($), z;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
if (!b(o) && o.isProviderFor(m, C))
|
|
448
|
+
return o;
|
|
449
|
+
}
|
|
450
|
+
function p(m, C) {
|
|
451
|
+
var $ = v.get(m), M;
|
|
452
|
+
return b($) || (M = $.get(C)), b(M) && (M = P(m, C), b(M) || (b($) && ($ = new ee(), v.set(m, $)), $.set(C, M))), M;
|
|
453
|
+
}
|
|
454
|
+
function f(m) {
|
|
455
|
+
if (b(m))
|
|
456
|
+
throw new TypeError();
|
|
457
|
+
return h === m || c === m || !b(u) && u.has(m);
|
|
458
|
+
}
|
|
459
|
+
function d(m, C, $) {
|
|
460
|
+
if (!f($))
|
|
461
|
+
throw new Error("Metadata provider not registered.");
|
|
462
|
+
var M = p(m, C);
|
|
463
|
+
if (M !== $) {
|
|
464
|
+
if (!b(M))
|
|
465
|
+
return !1;
|
|
466
|
+
var z = v.get(m);
|
|
467
|
+
b(z) && (z = new ee(), v.set(m, z)), z.set(C, $);
|
|
468
|
+
}
|
|
469
|
+
return !0;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
function rn() {
|
|
473
|
+
var o;
|
|
474
|
+
return !b(W) && T(r.Reflect) && Object.isExtensible(r.Reflect) && (o = r.Reflect[W]), b(o) && (o = nn()), !b(W) && T(r.Reflect) && Object.isExtensible(r.Reflect) && Object.defineProperty(r.Reflect, W, {
|
|
475
|
+
enumerable: !1,
|
|
476
|
+
configurable: !1,
|
|
477
|
+
writable: !1,
|
|
478
|
+
value: o
|
|
479
|
+
}), o;
|
|
480
|
+
}
|
|
481
|
+
function sn(o) {
|
|
482
|
+
var h = new ge(), c = {
|
|
483
|
+
isProviderFor: function(f, d) {
|
|
484
|
+
var m = h.get(f);
|
|
485
|
+
return b(m) ? !1 : m.has(d);
|
|
486
|
+
},
|
|
487
|
+
OrdinaryDefineOwnMetadata: R,
|
|
488
|
+
OrdinaryHasOwnMetadata: v,
|
|
489
|
+
OrdinaryGetOwnMetadata: j,
|
|
490
|
+
OrdinaryOwnMetadataKeys: P,
|
|
491
|
+
OrdinaryDeleteMetadata: p
|
|
492
|
+
};
|
|
493
|
+
return ae.registerProvider(c), c;
|
|
494
|
+
function u(f, d, m) {
|
|
495
|
+
var C = h.get(f), $ = !1;
|
|
496
|
+
if (b(C)) {
|
|
497
|
+
if (!m)
|
|
498
|
+
return;
|
|
499
|
+
C = new ee(), h.set(f, C), $ = !0;
|
|
500
|
+
}
|
|
501
|
+
var M = C.get(d);
|
|
502
|
+
if (b(M)) {
|
|
503
|
+
if (!m)
|
|
504
|
+
return;
|
|
505
|
+
if (M = new ee(), C.set(d, M), !o.setProvider(f, d, c))
|
|
506
|
+
throw C.delete(d), $ && h.delete(f), new Error("Wrong provider for target.");
|
|
507
|
+
}
|
|
508
|
+
return M;
|
|
509
|
+
}
|
|
510
|
+
function v(f, d, m) {
|
|
511
|
+
var C = u(
|
|
512
|
+
d,
|
|
513
|
+
m,
|
|
514
|
+
/*Create*/
|
|
515
|
+
!1
|
|
516
|
+
);
|
|
517
|
+
return b(C) ? !1 : rt(C.has(f));
|
|
518
|
+
}
|
|
519
|
+
function j(f, d, m) {
|
|
520
|
+
var C = u(
|
|
521
|
+
d,
|
|
522
|
+
m,
|
|
523
|
+
/*Create*/
|
|
524
|
+
!1
|
|
525
|
+
);
|
|
526
|
+
if (!b(C))
|
|
527
|
+
return C.get(f);
|
|
528
|
+
}
|
|
529
|
+
function R(f, d, m, C) {
|
|
530
|
+
var $ = u(
|
|
531
|
+
m,
|
|
532
|
+
C,
|
|
533
|
+
/*Create*/
|
|
534
|
+
!0
|
|
535
|
+
);
|
|
536
|
+
$.set(f, d);
|
|
537
|
+
}
|
|
538
|
+
function P(f, d) {
|
|
539
|
+
var m = [], C = u(
|
|
540
|
+
f,
|
|
541
|
+
d,
|
|
542
|
+
/*Create*/
|
|
543
|
+
!1
|
|
544
|
+
);
|
|
545
|
+
if (b(C))
|
|
546
|
+
return m;
|
|
547
|
+
for (var $ = C.keys(), M = ht($), z = 0; ; ) {
|
|
548
|
+
var pt = ct(M);
|
|
549
|
+
if (!pt)
|
|
550
|
+
return m.length = z, m;
|
|
551
|
+
var cn = lt(pt);
|
|
552
|
+
try {
|
|
553
|
+
m[z] = cn;
|
|
554
|
+
} catch (un) {
|
|
555
|
+
try {
|
|
556
|
+
ut(M);
|
|
557
|
+
} finally {
|
|
558
|
+
throw un;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
z++;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
function p(f, d, m) {
|
|
565
|
+
var C = u(
|
|
566
|
+
d,
|
|
567
|
+
m,
|
|
568
|
+
/*Create*/
|
|
569
|
+
!1
|
|
570
|
+
);
|
|
571
|
+
if (b(C) || !C.delete(f))
|
|
572
|
+
return !1;
|
|
573
|
+
if (C.size === 0) {
|
|
574
|
+
var $ = h.get(d);
|
|
575
|
+
b($) || ($.delete(m), $.size === 0 && h.delete($));
|
|
576
|
+
}
|
|
577
|
+
return !0;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
function on(o) {
|
|
581
|
+
var h = o.defineMetadata, c = o.hasOwnMetadata, u = o.getOwnMetadata, v = o.getOwnMetadataKeys, j = o.deleteMetadata, R = new ge(), P = {
|
|
582
|
+
isProviderFor: function(p, f) {
|
|
583
|
+
var d = R.get(p);
|
|
584
|
+
return !b(d) && d.has(f) ? !0 : v(p, f).length ? (b(d) && (d = new we(), R.set(p, d)), d.add(f), !0) : !1;
|
|
585
|
+
},
|
|
586
|
+
OrdinaryDefineOwnMetadata: h,
|
|
587
|
+
OrdinaryHasOwnMetadata: c,
|
|
588
|
+
OrdinaryGetOwnMetadata: u,
|
|
589
|
+
OrdinaryOwnMetadataKeys: v,
|
|
590
|
+
OrdinaryDeleteMetadata: j
|
|
591
|
+
};
|
|
592
|
+
return P;
|
|
593
|
+
}
|
|
594
|
+
function te(o, h, c) {
|
|
595
|
+
var u = ae.getProvider(o, h);
|
|
596
|
+
if (!b(u))
|
|
597
|
+
return u;
|
|
598
|
+
if (c) {
|
|
599
|
+
if (ae.setProvider(o, h, Be))
|
|
600
|
+
return Be;
|
|
601
|
+
throw new Error("Illegal state.");
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
function an() {
|
|
605
|
+
var o = {}, h = [], c = (
|
|
606
|
+
/** @class */
|
|
607
|
+
function() {
|
|
608
|
+
function P(p, f, d) {
|
|
609
|
+
this._index = 0, this._keys = p, this._values = f, this._selector = d;
|
|
610
|
+
}
|
|
611
|
+
return P.prototype["@@iterator"] = function() {
|
|
612
|
+
return this;
|
|
613
|
+
}, P.prototype[y] = function() {
|
|
614
|
+
return this;
|
|
615
|
+
}, P.prototype.next = function() {
|
|
616
|
+
var p = this._index;
|
|
617
|
+
if (p >= 0 && p < this._keys.length) {
|
|
618
|
+
var f = this._selector(this._keys[p], this._values[p]);
|
|
619
|
+
return p + 1 >= this._keys.length ? (this._index = -1, this._keys = h, this._values = h) : this._index++, { value: f, done: !1 };
|
|
620
|
+
}
|
|
621
|
+
return { value: void 0, done: !0 };
|
|
622
|
+
}, P.prototype.throw = function(p) {
|
|
623
|
+
throw this._index >= 0 && (this._index = -1, this._keys = h, this._values = h), p;
|
|
624
|
+
}, P.prototype.return = function(p) {
|
|
625
|
+
return this._index >= 0 && (this._index = -1, this._keys = h, this._values = h), { value: p, done: !0 };
|
|
626
|
+
}, P;
|
|
627
|
+
}()
|
|
628
|
+
), u = (
|
|
629
|
+
/** @class */
|
|
630
|
+
function() {
|
|
631
|
+
function P() {
|
|
632
|
+
this._keys = [], this._values = [], this._cacheKey = o, this._cacheIndex = -2;
|
|
633
|
+
}
|
|
634
|
+
return Object.defineProperty(P.prototype, "size", {
|
|
635
|
+
get: function() {
|
|
636
|
+
return this._keys.length;
|
|
637
|
+
},
|
|
638
|
+
enumerable: !0,
|
|
639
|
+
configurable: !0
|
|
640
|
+
}), P.prototype.has = function(p) {
|
|
641
|
+
return this._find(
|
|
642
|
+
p,
|
|
643
|
+
/*insert*/
|
|
644
|
+
!1
|
|
645
|
+
) >= 0;
|
|
646
|
+
}, P.prototype.get = function(p) {
|
|
647
|
+
var f = this._find(
|
|
648
|
+
p,
|
|
649
|
+
/*insert*/
|
|
650
|
+
!1
|
|
651
|
+
);
|
|
652
|
+
return f >= 0 ? this._values[f] : void 0;
|
|
653
|
+
}, P.prototype.set = function(p, f) {
|
|
654
|
+
var d = this._find(
|
|
655
|
+
p,
|
|
656
|
+
/*insert*/
|
|
657
|
+
!0
|
|
658
|
+
);
|
|
659
|
+
return this._values[d] = f, this;
|
|
660
|
+
}, P.prototype.delete = function(p) {
|
|
661
|
+
var f = this._find(
|
|
662
|
+
p,
|
|
663
|
+
/*insert*/
|
|
664
|
+
!1
|
|
665
|
+
);
|
|
666
|
+
if (f >= 0) {
|
|
667
|
+
for (var d = this._keys.length, m = f + 1; m < d; m++)
|
|
668
|
+
this._keys[m - 1] = this._keys[m], this._values[m - 1] = this._values[m];
|
|
669
|
+
return this._keys.length--, this._values.length--, Ce(p, this._cacheKey) && (this._cacheKey = o, this._cacheIndex = -2), !0;
|
|
670
|
+
}
|
|
671
|
+
return !1;
|
|
672
|
+
}, P.prototype.clear = function() {
|
|
673
|
+
this._keys.length = 0, this._values.length = 0, this._cacheKey = o, this._cacheIndex = -2;
|
|
674
|
+
}, P.prototype.keys = function() {
|
|
675
|
+
return new c(this._keys, this._values, v);
|
|
676
|
+
}, P.prototype.values = function() {
|
|
677
|
+
return new c(this._keys, this._values, j);
|
|
678
|
+
}, P.prototype.entries = function() {
|
|
679
|
+
return new c(this._keys, this._values, R);
|
|
680
|
+
}, P.prototype["@@iterator"] = function() {
|
|
681
|
+
return this.entries();
|
|
682
|
+
}, P.prototype[y] = function() {
|
|
683
|
+
return this.entries();
|
|
684
|
+
}, P.prototype._find = function(p, f) {
|
|
685
|
+
if (!Ce(this._cacheKey, p)) {
|
|
686
|
+
this._cacheIndex = -1;
|
|
687
|
+
for (var d = 0; d < this._keys.length; d++)
|
|
688
|
+
if (Ce(this._keys[d], p)) {
|
|
689
|
+
this._cacheIndex = d;
|
|
690
|
+
break;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
return this._cacheIndex < 0 && f && (this._cacheIndex = this._keys.length, this._keys.push(p), this._values.push(void 0)), this._cacheIndex;
|
|
694
|
+
}, P;
|
|
695
|
+
}()
|
|
696
|
+
);
|
|
697
|
+
return u;
|
|
698
|
+
function v(P, p) {
|
|
699
|
+
return P;
|
|
700
|
+
}
|
|
701
|
+
function j(P, p) {
|
|
702
|
+
return p;
|
|
703
|
+
}
|
|
704
|
+
function R(P, p) {
|
|
705
|
+
return [P, p];
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
function hn() {
|
|
709
|
+
var o = (
|
|
710
|
+
/** @class */
|
|
711
|
+
function() {
|
|
712
|
+
function h() {
|
|
713
|
+
this._map = new ee();
|
|
714
|
+
}
|
|
715
|
+
return Object.defineProperty(h.prototype, "size", {
|
|
716
|
+
get: function() {
|
|
717
|
+
return this._map.size;
|
|
718
|
+
},
|
|
719
|
+
enumerable: !0,
|
|
720
|
+
configurable: !0
|
|
721
|
+
}), h.prototype.has = function(c) {
|
|
722
|
+
return this._map.has(c);
|
|
723
|
+
}, h.prototype.add = function(c) {
|
|
724
|
+
return this._map.set(c, c), this;
|
|
725
|
+
}, h.prototype.delete = function(c) {
|
|
726
|
+
return this._map.delete(c);
|
|
727
|
+
}, h.prototype.clear = function() {
|
|
728
|
+
this._map.clear();
|
|
729
|
+
}, h.prototype.keys = function() {
|
|
730
|
+
return this._map.keys();
|
|
731
|
+
}, h.prototype.values = function() {
|
|
732
|
+
return this._map.keys();
|
|
733
|
+
}, h.prototype.entries = function() {
|
|
734
|
+
return this._map.entries();
|
|
735
|
+
}, h.prototype["@@iterator"] = function() {
|
|
736
|
+
return this.keys();
|
|
737
|
+
}, h.prototype[y] = function() {
|
|
738
|
+
return this.keys();
|
|
739
|
+
}, h;
|
|
740
|
+
}()
|
|
741
|
+
);
|
|
742
|
+
return o;
|
|
743
|
+
}
|
|
744
|
+
function ln() {
|
|
745
|
+
var o = 16, h = I.create(), c = u();
|
|
746
|
+
return (
|
|
747
|
+
/** @class */
|
|
748
|
+
function() {
|
|
749
|
+
function p() {
|
|
750
|
+
this._key = u();
|
|
751
|
+
}
|
|
752
|
+
return p.prototype.has = function(f) {
|
|
753
|
+
var d = v(
|
|
754
|
+
f,
|
|
755
|
+
/*create*/
|
|
756
|
+
!1
|
|
757
|
+
);
|
|
758
|
+
return d !== void 0 ? I.has(d, this._key) : !1;
|
|
759
|
+
}, p.prototype.get = function(f) {
|
|
760
|
+
var d = v(
|
|
761
|
+
f,
|
|
762
|
+
/*create*/
|
|
763
|
+
!1
|
|
764
|
+
);
|
|
765
|
+
return d !== void 0 ? I.get(d, this._key) : void 0;
|
|
766
|
+
}, p.prototype.set = function(f, d) {
|
|
767
|
+
var m = v(
|
|
768
|
+
f,
|
|
769
|
+
/*create*/
|
|
770
|
+
!0
|
|
771
|
+
);
|
|
772
|
+
return m[this._key] = d, this;
|
|
773
|
+
}, p.prototype.delete = function(f) {
|
|
774
|
+
var d = v(
|
|
775
|
+
f,
|
|
776
|
+
/*create*/
|
|
777
|
+
!1
|
|
778
|
+
);
|
|
779
|
+
return d !== void 0 ? delete d[this._key] : !1;
|
|
780
|
+
}, p.prototype.clear = function() {
|
|
781
|
+
this._key = u();
|
|
782
|
+
}, p;
|
|
783
|
+
}()
|
|
784
|
+
);
|
|
785
|
+
function u() {
|
|
786
|
+
var p;
|
|
787
|
+
do
|
|
788
|
+
p = "@@WeakMap@@" + P();
|
|
789
|
+
while (I.has(h, p));
|
|
790
|
+
return h[p] = !0, p;
|
|
791
|
+
}
|
|
792
|
+
function v(p, f) {
|
|
793
|
+
if (!i.call(p, c)) {
|
|
794
|
+
if (!f)
|
|
795
|
+
return;
|
|
796
|
+
Object.defineProperty(p, c, { value: I.create() });
|
|
797
|
+
}
|
|
798
|
+
return p[c];
|
|
799
|
+
}
|
|
800
|
+
function j(p, f) {
|
|
801
|
+
for (var d = 0; d < f; ++d)
|
|
802
|
+
p[d] = Math.random() * 255 | 0;
|
|
803
|
+
return p;
|
|
804
|
+
}
|
|
805
|
+
function R(p) {
|
|
806
|
+
if (typeof Uint8Array == "function") {
|
|
807
|
+
var f = new Uint8Array(p);
|
|
808
|
+
return typeof crypto < "u" ? crypto.getRandomValues(f) : typeof msCrypto < "u" ? msCrypto.getRandomValues(f) : j(f, p), f;
|
|
809
|
+
}
|
|
810
|
+
return j(new Array(p), p);
|
|
811
|
+
}
|
|
812
|
+
function P() {
|
|
813
|
+
var p = R(o);
|
|
814
|
+
p[6] = p[6] & 79 | 64, p[8] = p[8] & 191 | 128;
|
|
815
|
+
for (var f = "", d = 0; d < o; ++d) {
|
|
816
|
+
var m = p[d];
|
|
817
|
+
(d === 4 || d === 6 || d === 8) && (f += "-"), m < 16 && (f += "0"), f += m.toString(16).toLowerCase();
|
|
818
|
+
}
|
|
819
|
+
return f;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
function $e(o) {
|
|
823
|
+
return o.__ = void 0, delete o.__, o;
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
}(t || (t = {})), yt;
|
|
827
|
+
}
|
|
828
|
+
En();
|
|
829
|
+
var Se;
|
|
830
|
+
(function(t) {
|
|
831
|
+
t[t.Transient = 0] = "Transient", t[t.Singleton = 1] = "Singleton", t[t.ResolutionScoped = 2] = "ResolutionScoped", t[t.ContainerScoped = 3] = "ContainerScoped";
|
|
832
|
+
})(Se || (Se = {}));
|
|
833
|
+
const x = Se;
|
|
834
|
+
/*! *****************************************************************************
|
|
835
|
+
Copyright (c) Microsoft Corporation.
|
|
836
|
+
|
|
837
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
838
|
+
purpose with or without fee is hereby granted.
|
|
839
|
+
|
|
840
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
841
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
842
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
843
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
844
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
845
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
846
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
847
|
+
***************************************************************************** */
|
|
848
|
+
var je = function(t, e) {
|
|
849
|
+
return je = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
|
|
850
|
+
n.__proto__ = r;
|
|
851
|
+
} || function(n, r) {
|
|
852
|
+
for (var i in r) r.hasOwnProperty(i) && (n[i] = r[i]);
|
|
853
|
+
}, je(t, e);
|
|
854
|
+
};
|
|
855
|
+
function Xe(t, e) {
|
|
856
|
+
je(t, e);
|
|
857
|
+
function n() {
|
|
858
|
+
this.constructor = t;
|
|
859
|
+
}
|
|
860
|
+
t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
|
|
861
|
+
}
|
|
862
|
+
function Mn(t, e, n, r) {
|
|
863
|
+
function i(s) {
|
|
864
|
+
return s instanceof n ? s : new n(function(a) {
|
|
865
|
+
a(s);
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
return new (n || (n = Promise))(function(s, a) {
|
|
869
|
+
function y(E) {
|
|
870
|
+
try {
|
|
871
|
+
_(r.next(E));
|
|
872
|
+
} catch (I) {
|
|
873
|
+
a(I);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
function g(E) {
|
|
877
|
+
try {
|
|
878
|
+
_(r.throw(E));
|
|
879
|
+
} catch (I) {
|
|
880
|
+
a(I);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
function _(E) {
|
|
884
|
+
E.done ? s(E.value) : i(E.value).then(y, g);
|
|
885
|
+
}
|
|
886
|
+
_((r = r.apply(t, [])).next());
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
function Dn(t, e) {
|
|
890
|
+
var n = { label: 0, sent: function() {
|
|
891
|
+
if (s[0] & 1) throw s[1];
|
|
892
|
+
return s[1];
|
|
893
|
+
}, trys: [], ops: [] }, r, i, s, a;
|
|
894
|
+
return a = { next: y(0), throw: y(1), return: y(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
895
|
+
return this;
|
|
896
|
+
}), a;
|
|
897
|
+
function y(_) {
|
|
898
|
+
return function(E) {
|
|
899
|
+
return g([_, E]);
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
function g(_) {
|
|
903
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
904
|
+
for (; n; ) try {
|
|
905
|
+
if (r = 1, i && (s = _[0] & 2 ? i.return : _[0] ? i.throw || ((s = i.return) && s.call(i), 0) : i.next) && !(s = s.call(i, _[1])).done) return s;
|
|
906
|
+
switch (i = 0, s && (_ = [_[0] & 2, s.value]), _[0]) {
|
|
907
|
+
case 0:
|
|
908
|
+
case 1:
|
|
909
|
+
s = _;
|
|
910
|
+
break;
|
|
911
|
+
case 4:
|
|
912
|
+
return n.label++, { value: _[1], done: !1 };
|
|
913
|
+
case 5:
|
|
914
|
+
n.label++, i = _[1], _ = [0];
|
|
915
|
+
continue;
|
|
916
|
+
case 7:
|
|
917
|
+
_ = n.ops.pop(), n.trys.pop();
|
|
918
|
+
continue;
|
|
919
|
+
default:
|
|
920
|
+
if (s = n.trys, !(s = s.length > 0 && s[s.length - 1]) && (_[0] === 6 || _[0] === 2)) {
|
|
921
|
+
n = 0;
|
|
922
|
+
continue;
|
|
923
|
+
}
|
|
924
|
+
if (_[0] === 3 && (!s || _[1] > s[0] && _[1] < s[3])) {
|
|
925
|
+
n.label = _[1];
|
|
926
|
+
break;
|
|
927
|
+
}
|
|
928
|
+
if (_[0] === 6 && n.label < s[1]) {
|
|
929
|
+
n.label = s[1], s = _;
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
932
|
+
if (s && n.label < s[2]) {
|
|
933
|
+
n.label = s[2], n.ops.push(_);
|
|
934
|
+
break;
|
|
935
|
+
}
|
|
936
|
+
s[2] && n.ops.pop(), n.trys.pop();
|
|
937
|
+
continue;
|
|
938
|
+
}
|
|
939
|
+
_ = e.call(t, n);
|
|
940
|
+
} catch (E) {
|
|
941
|
+
_ = [6, E], i = 0;
|
|
942
|
+
} finally {
|
|
943
|
+
r = s = 0;
|
|
944
|
+
}
|
|
945
|
+
if (_[0] & 5) throw _[1];
|
|
946
|
+
return { value: _[0] ? _[1] : void 0, done: !0 };
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
function le(t) {
|
|
950
|
+
var e = typeof Symbol == "function" && Symbol.iterator, n = e && t[e], r = 0;
|
|
951
|
+
if (n) return n.call(t);
|
|
952
|
+
if (t && typeof t.length == "number") return {
|
|
953
|
+
next: function() {
|
|
954
|
+
return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t };
|
|
955
|
+
}
|
|
956
|
+
};
|
|
957
|
+
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
958
|
+
}
|
|
959
|
+
function _e(t, e) {
|
|
960
|
+
var n = typeof Symbol == "function" && t[Symbol.iterator];
|
|
961
|
+
if (!n) return t;
|
|
962
|
+
var r = n.call(t), i, s = [], a;
|
|
963
|
+
try {
|
|
964
|
+
for (; (e === void 0 || e-- > 0) && !(i = r.next()).done; ) s.push(i.value);
|
|
965
|
+
} catch (y) {
|
|
966
|
+
a = { error: y };
|
|
967
|
+
} finally {
|
|
968
|
+
try {
|
|
969
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
970
|
+
} finally {
|
|
971
|
+
if (a) throw a.error;
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
return s;
|
|
975
|
+
}
|
|
976
|
+
function Z() {
|
|
977
|
+
for (var t = [], e = 0; e < arguments.length; e++)
|
|
978
|
+
t = t.concat(_e(arguments[e]));
|
|
979
|
+
return t;
|
|
980
|
+
}
|
|
981
|
+
var xe = "injectionTokens";
|
|
982
|
+
function Tn(t) {
|
|
983
|
+
var e = Reflect.getMetadata("design:paramtypes", t) || [], n = Reflect.getOwnMetadata(xe, t) || {};
|
|
984
|
+
return Object.keys(n).forEach(function(r) {
|
|
985
|
+
e[+r] = n[r];
|
|
986
|
+
}), e;
|
|
987
|
+
}
|
|
988
|
+
function Rn(t, e) {
|
|
989
|
+
return function(n, r, i) {
|
|
990
|
+
var s = Reflect.getOwnMetadata(xe, n) || {};
|
|
991
|
+
s[i] = t, Reflect.defineMetadata(xe, s, n);
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
function jt(t) {
|
|
995
|
+
return !!t.useClass;
|
|
996
|
+
}
|
|
997
|
+
function Ae(t) {
|
|
998
|
+
return !!t.useFactory;
|
|
999
|
+
}
|
|
1000
|
+
var xt = function() {
|
|
1001
|
+
function t(e) {
|
|
1002
|
+
this.wrap = e, this.reflectMethods = [
|
|
1003
|
+
"get",
|
|
1004
|
+
"getPrototypeOf",
|
|
1005
|
+
"setPrototypeOf",
|
|
1006
|
+
"getOwnPropertyDescriptor",
|
|
1007
|
+
"defineProperty",
|
|
1008
|
+
"has",
|
|
1009
|
+
"set",
|
|
1010
|
+
"deleteProperty",
|
|
1011
|
+
"apply",
|
|
1012
|
+
"construct",
|
|
1013
|
+
"ownKeys"
|
|
1014
|
+
];
|
|
1015
|
+
}
|
|
1016
|
+
return t.prototype.createProxy = function(e) {
|
|
1017
|
+
var n = this, r = {}, i = !1, s, a = function() {
|
|
1018
|
+
return i || (s = e(n.wrap()), i = !0), s;
|
|
1019
|
+
};
|
|
1020
|
+
return new Proxy(r, this.createHandler(a));
|
|
1021
|
+
}, t.prototype.createHandler = function(e) {
|
|
1022
|
+
var n = {}, r = function(i) {
|
|
1023
|
+
n[i] = function() {
|
|
1024
|
+
for (var s = [], a = 0; a < arguments.length; a++)
|
|
1025
|
+
s[a] = arguments[a];
|
|
1026
|
+
s[0] = e();
|
|
1027
|
+
var y = Reflect[i];
|
|
1028
|
+
return y.apply(void 0, Z(s));
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
return this.reflectMethods.forEach(r), n;
|
|
1032
|
+
}, t;
|
|
1033
|
+
}();
|
|
1034
|
+
function X(t) {
|
|
1035
|
+
return typeof t == "string" || typeof t == "symbol";
|
|
1036
|
+
}
|
|
1037
|
+
function Sn(t) {
|
|
1038
|
+
return typeof t == "object" && "token" in t && "multiple" in t;
|
|
1039
|
+
}
|
|
1040
|
+
function bt(t) {
|
|
1041
|
+
return typeof t == "object" && "token" in t && "transform" in t;
|
|
1042
|
+
}
|
|
1043
|
+
function jn(t) {
|
|
1044
|
+
return typeof t == "function" || t instanceof xt;
|
|
1045
|
+
}
|
|
1046
|
+
function fe(t) {
|
|
1047
|
+
return !!t.useToken;
|
|
1048
|
+
}
|
|
1049
|
+
function de(t) {
|
|
1050
|
+
return t.useValue != null;
|
|
1051
|
+
}
|
|
1052
|
+
function xn(t) {
|
|
1053
|
+
return jt(t) || de(t) || fe(t) || Ae(t);
|
|
1054
|
+
}
|
|
1055
|
+
var Ke = function() {
|
|
1056
|
+
function t() {
|
|
1057
|
+
this._registryMap = /* @__PURE__ */ new Map();
|
|
1058
|
+
}
|
|
1059
|
+
return t.prototype.entries = function() {
|
|
1060
|
+
return this._registryMap.entries();
|
|
1061
|
+
}, t.prototype.getAll = function(e) {
|
|
1062
|
+
return this.ensure(e), this._registryMap.get(e);
|
|
1063
|
+
}, t.prototype.get = function(e) {
|
|
1064
|
+
this.ensure(e);
|
|
1065
|
+
var n = this._registryMap.get(e);
|
|
1066
|
+
return n[n.length - 1] || null;
|
|
1067
|
+
}, t.prototype.set = function(e, n) {
|
|
1068
|
+
this.ensure(e), this._registryMap.get(e).push(n);
|
|
1069
|
+
}, t.prototype.setAll = function(e, n) {
|
|
1070
|
+
this._registryMap.set(e, n);
|
|
1071
|
+
}, t.prototype.has = function(e) {
|
|
1072
|
+
return this.ensure(e), this._registryMap.get(e).length > 0;
|
|
1073
|
+
}, t.prototype.clear = function() {
|
|
1074
|
+
this._registryMap.clear();
|
|
1075
|
+
}, t.prototype.ensure = function(e) {
|
|
1076
|
+
this._registryMap.has(e) || this._registryMap.set(e, []);
|
|
1077
|
+
}, t;
|
|
1078
|
+
}(), An = function(t) {
|
|
1079
|
+
Xe(e, t);
|
|
1080
|
+
function e() {
|
|
1081
|
+
return t !== null && t.apply(this, arguments) || this;
|
|
1082
|
+
}
|
|
1083
|
+
return e;
|
|
1084
|
+
}(Ke), wt = /* @__PURE__ */ function() {
|
|
1085
|
+
function t() {
|
|
1086
|
+
this.scopedResolutions = /* @__PURE__ */ new Map();
|
|
1087
|
+
}
|
|
1088
|
+
return t;
|
|
1089
|
+
}();
|
|
1090
|
+
function In(t, e) {
|
|
1091
|
+
if (t === null)
|
|
1092
|
+
return "at position #" + e;
|
|
1093
|
+
var n = t.split(",")[e].trim();
|
|
1094
|
+
return '"' + n + '" at position #' + e;
|
|
1095
|
+
}
|
|
1096
|
+
function zn(t, e, n) {
|
|
1097
|
+
return n === void 0 && (n = " "), Z([t], e.message.split(`
|
|
1098
|
+
`).map(function(r) {
|
|
1099
|
+
return n + r;
|
|
1100
|
+
})).join(`
|
|
1101
|
+
`);
|
|
1102
|
+
}
|
|
1103
|
+
function Nn(t, e, n) {
|
|
1104
|
+
var r = _e(t.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), i = r[1], s = i === void 0 ? null : i, a = In(s, e);
|
|
1105
|
+
return zn("Cannot inject the dependency " + a + ' of "' + t.name + '" constructor. Reason:', n);
|
|
1106
|
+
}
|
|
1107
|
+
function Hn(t) {
|
|
1108
|
+
if (typeof t.dispose != "function")
|
|
1109
|
+
return !1;
|
|
1110
|
+
var e = t.dispose;
|
|
1111
|
+
return !(e.length > 0);
|
|
1112
|
+
}
|
|
1113
|
+
var Ln = function(t) {
|
|
1114
|
+
Xe(e, t);
|
|
1115
|
+
function e() {
|
|
1116
|
+
return t !== null && t.apply(this, arguments) || this;
|
|
1117
|
+
}
|
|
1118
|
+
return e;
|
|
1119
|
+
}(Ke), Un = function(t) {
|
|
1120
|
+
Xe(e, t);
|
|
1121
|
+
function e() {
|
|
1122
|
+
return t !== null && t.apply(this, arguments) || this;
|
|
1123
|
+
}
|
|
1124
|
+
return e;
|
|
1125
|
+
}(Ke), Yn = /* @__PURE__ */ function() {
|
|
1126
|
+
function t() {
|
|
1127
|
+
this.preResolution = new Ln(), this.postResolution = new Un();
|
|
1128
|
+
}
|
|
1129
|
+
return t;
|
|
1130
|
+
}(), At = /* @__PURE__ */ new Map(), Zn = function() {
|
|
1131
|
+
function t(e) {
|
|
1132
|
+
this.parent = e, this._registry = new An(), this.interceptors = new Yn(), this.disposed = !1, this.disposables = /* @__PURE__ */ new Set();
|
|
1133
|
+
}
|
|
1134
|
+
return t.prototype.register = function(e, n, r) {
|
|
1135
|
+
r === void 0 && (r = { lifecycle: x.Transient }), this.ensureNotDisposed();
|
|
1136
|
+
var i;
|
|
1137
|
+
if (xn(n) ? i = n : i = { useClass: n }, fe(i))
|
|
1138
|
+
for (var s = [e], a = i; a != null; ) {
|
|
1139
|
+
var y = a.useToken;
|
|
1140
|
+
if (s.includes(y))
|
|
1141
|
+
throw new Error("Token registration cycle detected! " + Z(s, [y]).join(" -> "));
|
|
1142
|
+
s.push(y);
|
|
1143
|
+
var g = this._registry.get(y);
|
|
1144
|
+
g && fe(g.provider) ? a = g.provider : a = null;
|
|
1145
|
+
}
|
|
1146
|
+
if ((r.lifecycle === x.Singleton || r.lifecycle == x.ContainerScoped || r.lifecycle == x.ResolutionScoped) && (de(i) || Ae(i)))
|
|
1147
|
+
throw new Error('Cannot use lifecycle "' + x[r.lifecycle] + '" with ValueProviders or FactoryProviders');
|
|
1148
|
+
return this._registry.set(e, { provider: i, options: r }), this;
|
|
1149
|
+
}, t.prototype.registerType = function(e, n) {
|
|
1150
|
+
return this.ensureNotDisposed(), X(n) ? this.register(e, {
|
|
1151
|
+
useToken: n
|
|
1152
|
+
}) : this.register(e, {
|
|
1153
|
+
useClass: n
|
|
1154
|
+
});
|
|
1155
|
+
}, t.prototype.registerInstance = function(e, n) {
|
|
1156
|
+
return this.ensureNotDisposed(), this.register(e, {
|
|
1157
|
+
useValue: n
|
|
1158
|
+
});
|
|
1159
|
+
}, t.prototype.registerSingleton = function(e, n) {
|
|
1160
|
+
if (this.ensureNotDisposed(), X(e)) {
|
|
1161
|
+
if (X(n))
|
|
1162
|
+
return this.register(e, {
|
|
1163
|
+
useToken: n
|
|
1164
|
+
}, { lifecycle: x.Singleton });
|
|
1165
|
+
if (n)
|
|
1166
|
+
return this.register(e, {
|
|
1167
|
+
useClass: n
|
|
1168
|
+
}, { lifecycle: x.Singleton });
|
|
1169
|
+
throw new Error('Cannot register a type name as a singleton without a "to" token');
|
|
1170
|
+
}
|
|
1171
|
+
var r = e;
|
|
1172
|
+
return n && !X(n) && (r = n), this.register(e, {
|
|
1173
|
+
useClass: r
|
|
1174
|
+
}, { lifecycle: x.Singleton });
|
|
1175
|
+
}, t.prototype.resolve = function(e, n) {
|
|
1176
|
+
n === void 0 && (n = new wt()), this.ensureNotDisposed();
|
|
1177
|
+
var r = this.getRegistration(e);
|
|
1178
|
+
if (!r && X(e))
|
|
1179
|
+
throw new Error('Attempted to resolve unregistered dependency token: "' + e.toString() + '"');
|
|
1180
|
+
if (this.executePreResolutionInterceptor(e, "Single"), r) {
|
|
1181
|
+
var i = this.resolveRegistration(r, n);
|
|
1182
|
+
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
1183
|
+
}
|
|
1184
|
+
if (jn(e)) {
|
|
1185
|
+
var i = this.construct(e, n);
|
|
1186
|
+
return this.executePostResolutionInterceptor(e, i, "Single"), i;
|
|
1187
|
+
}
|
|
1188
|
+
throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.");
|
|
1189
|
+
}, t.prototype.executePreResolutionInterceptor = function(e, n) {
|
|
1190
|
+
var r, i;
|
|
1191
|
+
if (this.interceptors.preResolution.has(e)) {
|
|
1192
|
+
var s = [];
|
|
1193
|
+
try {
|
|
1194
|
+
for (var a = le(this.interceptors.preResolution.getAll(e)), y = a.next(); !y.done; y = a.next()) {
|
|
1195
|
+
var g = y.value;
|
|
1196
|
+
g.options.frequency != "Once" && s.push(g), g.callback(e, n);
|
|
1197
|
+
}
|
|
1198
|
+
} catch (_) {
|
|
1199
|
+
r = { error: _ };
|
|
1200
|
+
} finally {
|
|
1201
|
+
try {
|
|
1202
|
+
y && !y.done && (i = a.return) && i.call(a);
|
|
1203
|
+
} finally {
|
|
1204
|
+
if (r) throw r.error;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
this.interceptors.preResolution.setAll(e, s);
|
|
1208
|
+
}
|
|
1209
|
+
}, t.prototype.executePostResolutionInterceptor = function(e, n, r) {
|
|
1210
|
+
var i, s;
|
|
1211
|
+
if (this.interceptors.postResolution.has(e)) {
|
|
1212
|
+
var a = [];
|
|
1213
|
+
try {
|
|
1214
|
+
for (var y = le(this.interceptors.postResolution.getAll(e)), g = y.next(); !g.done; g = y.next()) {
|
|
1215
|
+
var _ = g.value;
|
|
1216
|
+
_.options.frequency != "Once" && a.push(_), _.callback(e, n, r);
|
|
1217
|
+
}
|
|
1218
|
+
} catch (E) {
|
|
1219
|
+
i = { error: E };
|
|
1220
|
+
} finally {
|
|
1221
|
+
try {
|
|
1222
|
+
g && !g.done && (s = y.return) && s.call(y);
|
|
1223
|
+
} finally {
|
|
1224
|
+
if (i) throw i.error;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
this.interceptors.postResolution.setAll(e, a);
|
|
1228
|
+
}
|
|
1229
|
+
}, t.prototype.resolveRegistration = function(e, n) {
|
|
1230
|
+
if (this.ensureNotDisposed(), e.options.lifecycle === x.ResolutionScoped && n.scopedResolutions.has(e))
|
|
1231
|
+
return n.scopedResolutions.get(e);
|
|
1232
|
+
var r = e.options.lifecycle === x.Singleton, i = e.options.lifecycle === x.ContainerScoped, s = r || i, a;
|
|
1233
|
+
return de(e.provider) ? a = e.provider.useValue : fe(e.provider) ? a = s ? e.instance || (e.instance = this.resolve(e.provider.useToken, n)) : this.resolve(e.provider.useToken, n) : jt(e.provider) ? a = s ? e.instance || (e.instance = this.construct(e.provider.useClass, n)) : this.construct(e.provider.useClass, n) : Ae(e.provider) ? a = e.provider.useFactory(this) : a = this.construct(e.provider, n), e.options.lifecycle === x.ResolutionScoped && n.scopedResolutions.set(e, a), a;
|
|
1234
|
+
}, t.prototype.resolveAll = function(e, n) {
|
|
1235
|
+
var r = this;
|
|
1236
|
+
n === void 0 && (n = new wt()), this.ensureNotDisposed();
|
|
1237
|
+
var i = this.getAllRegistrations(e);
|
|
1238
|
+
if (!i && X(e))
|
|
1239
|
+
throw new Error('Attempted to resolve unregistered dependency token: "' + e.toString() + '"');
|
|
1240
|
+
if (this.executePreResolutionInterceptor(e, "All"), i) {
|
|
1241
|
+
var s = i.map(function(y) {
|
|
1242
|
+
return r.resolveRegistration(y, n);
|
|
1243
|
+
});
|
|
1244
|
+
return this.executePostResolutionInterceptor(e, s, "All"), s;
|
|
1245
|
+
}
|
|
1246
|
+
var a = [this.construct(e, n)];
|
|
1247
|
+
return this.executePostResolutionInterceptor(e, a, "All"), a;
|
|
1248
|
+
}, t.prototype.isRegistered = function(e, n) {
|
|
1249
|
+
return n === void 0 && (n = !1), this.ensureNotDisposed(), this._registry.has(e) || n && (this.parent || !1) && this.parent.isRegistered(e, !0);
|
|
1250
|
+
}, t.prototype.reset = function() {
|
|
1251
|
+
this.ensureNotDisposed(), this._registry.clear(), this.interceptors.preResolution.clear(), this.interceptors.postResolution.clear();
|
|
1252
|
+
}, t.prototype.clearInstances = function() {
|
|
1253
|
+
var e, n;
|
|
1254
|
+
this.ensureNotDisposed();
|
|
1255
|
+
try {
|
|
1256
|
+
for (var r = le(this._registry.entries()), i = r.next(); !i.done; i = r.next()) {
|
|
1257
|
+
var s = _e(i.value, 2), a = s[0], y = s[1];
|
|
1258
|
+
this._registry.setAll(a, y.filter(function(g) {
|
|
1259
|
+
return !de(g.provider);
|
|
1260
|
+
}).map(function(g) {
|
|
1261
|
+
return g.instance = void 0, g;
|
|
1262
|
+
}));
|
|
1263
|
+
}
|
|
1264
|
+
} catch (g) {
|
|
1265
|
+
e = { error: g };
|
|
1266
|
+
} finally {
|
|
1267
|
+
try {
|
|
1268
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
1269
|
+
} finally {
|
|
1270
|
+
if (e) throw e.error;
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
}, t.prototype.createChildContainer = function() {
|
|
1274
|
+
var e, n;
|
|
1275
|
+
this.ensureNotDisposed();
|
|
1276
|
+
var r = new t(this);
|
|
1277
|
+
try {
|
|
1278
|
+
for (var i = le(this._registry.entries()), s = i.next(); !s.done; s = i.next()) {
|
|
1279
|
+
var a = _e(s.value, 2), y = a[0], g = a[1];
|
|
1280
|
+
g.some(function(_) {
|
|
1281
|
+
var E = _.options;
|
|
1282
|
+
return E.lifecycle === x.ContainerScoped;
|
|
1283
|
+
}) && r._registry.setAll(y, g.map(function(_) {
|
|
1284
|
+
return _.options.lifecycle === x.ContainerScoped ? {
|
|
1285
|
+
provider: _.provider,
|
|
1286
|
+
options: _.options
|
|
1287
|
+
} : _;
|
|
1288
|
+
}));
|
|
1289
|
+
}
|
|
1290
|
+
} catch (_) {
|
|
1291
|
+
e = { error: _ };
|
|
1292
|
+
} finally {
|
|
1293
|
+
try {
|
|
1294
|
+
s && !s.done && (n = i.return) && n.call(i);
|
|
1295
|
+
} finally {
|
|
1296
|
+
if (e) throw e.error;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
return r;
|
|
1300
|
+
}, t.prototype.beforeResolution = function(e, n, r) {
|
|
1301
|
+
r === void 0 && (r = { frequency: "Always" }), this.interceptors.preResolution.set(e, {
|
|
1302
|
+
callback: n,
|
|
1303
|
+
options: r
|
|
1304
|
+
});
|
|
1305
|
+
}, t.prototype.afterResolution = function(e, n, r) {
|
|
1306
|
+
r === void 0 && (r = { frequency: "Always" }), this.interceptors.postResolution.set(e, {
|
|
1307
|
+
callback: n,
|
|
1308
|
+
options: r
|
|
1309
|
+
});
|
|
1310
|
+
}, t.prototype.dispose = function() {
|
|
1311
|
+
return Mn(this, void 0, void 0, function() {
|
|
1312
|
+
var e;
|
|
1313
|
+
return Dn(this, function(n) {
|
|
1314
|
+
switch (n.label) {
|
|
1315
|
+
case 0:
|
|
1316
|
+
return this.disposed = !0, e = [], this.disposables.forEach(function(r) {
|
|
1317
|
+
var i = r.dispose();
|
|
1318
|
+
i && e.push(i);
|
|
1319
|
+
}), [4, Promise.all(e)];
|
|
1320
|
+
case 1:
|
|
1321
|
+
return n.sent(), [2];
|
|
1322
|
+
}
|
|
1323
|
+
});
|
|
1324
|
+
});
|
|
1325
|
+
}, t.prototype.getRegistration = function(e) {
|
|
1326
|
+
return this.isRegistered(e) ? this._registry.get(e) : this.parent ? this.parent.getRegistration(e) : null;
|
|
1327
|
+
}, t.prototype.getAllRegistrations = function(e) {
|
|
1328
|
+
return this.isRegistered(e) ? this._registry.getAll(e) : this.parent ? this.parent.getAllRegistrations(e) : null;
|
|
1329
|
+
}, t.prototype.construct = function(e, n) {
|
|
1330
|
+
var r = this;
|
|
1331
|
+
if (e instanceof xt)
|
|
1332
|
+
return e.createProxy(function(s) {
|
|
1333
|
+
return r.resolve(s, n);
|
|
1334
|
+
});
|
|
1335
|
+
var i = function() {
|
|
1336
|
+
var s = At.get(e);
|
|
1337
|
+
if (!s || s.length === 0) {
|
|
1338
|
+
if (e.length === 0)
|
|
1339
|
+
return new e();
|
|
1340
|
+
throw new Error('TypeInfo not known for "' + e.name + '"');
|
|
1341
|
+
}
|
|
1342
|
+
var a = s.map(r.resolveParams(n, e));
|
|
1343
|
+
return new (e.bind.apply(e, Z([void 0], a)))();
|
|
1344
|
+
}();
|
|
1345
|
+
return Hn(i) && this.disposables.add(i), i;
|
|
1346
|
+
}, t.prototype.resolveParams = function(e, n) {
|
|
1347
|
+
var r = this;
|
|
1348
|
+
return function(i, s) {
|
|
1349
|
+
var a, y, g;
|
|
1350
|
+
try {
|
|
1351
|
+
return Sn(i) ? bt(i) ? i.multiple ? (a = r.resolve(i.transform)).transform.apply(a, Z([r.resolveAll(i.token)], i.transformArgs)) : (y = r.resolve(i.transform)).transform.apply(y, Z([r.resolve(i.token, e)], i.transformArgs)) : i.multiple ? r.resolveAll(i.token) : r.resolve(i.token, e) : bt(i) ? (g = r.resolve(i.transform, e)).transform.apply(g, Z([r.resolve(i.token, e)], i.transformArgs)) : r.resolve(i, e);
|
|
1352
|
+
} catch (_) {
|
|
1353
|
+
throw new Error(Nn(n, s, _));
|
|
1354
|
+
}
|
|
1355
|
+
};
|
|
1356
|
+
}, t.prototype.ensureNotDisposed = function() {
|
|
1357
|
+
if (this.disposed)
|
|
1358
|
+
throw new Error("This container has been disposed, you cannot interact with a disposed container");
|
|
1359
|
+
}, t;
|
|
1360
|
+
}(), It = new Zn();
|
|
1361
|
+
function w(t) {
|
|
1362
|
+
return Rn(t);
|
|
1363
|
+
}
|
|
1364
|
+
function Fn() {
|
|
1365
|
+
return function(t) {
|
|
1366
|
+
At.set(t, Tn(t));
|
|
1367
|
+
};
|
|
1368
|
+
}
|
|
1369
|
+
function D() {
|
|
1370
|
+
return function(t) {
|
|
1371
|
+
Fn()(t), It.registerSingleton(t);
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
if (typeof Reflect > "u" || !Reflect.getMetadata)
|
|
1375
|
+
throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);
|
|
1376
|
+
var Gn = Object.defineProperty, Wn = Object.getOwnPropertyDescriptor, Vn = (t, e, n, r) => {
|
|
1377
|
+
for (var i = r > 1 ? void 0 : r ? Wn(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
1378
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
1379
|
+
return r && i && Gn(e, n, i), i;
|
|
1380
|
+
};
|
|
1381
|
+
let ie = class {
|
|
1382
|
+
constructor() {
|
|
1383
|
+
l(this, "proxyReceiver", new dn());
|
|
1384
|
+
l(this, "initialized", !1);
|
|
1385
|
+
l(this, "canvas");
|
|
1386
|
+
}
|
|
1387
|
+
};
|
|
1388
|
+
ie = Vn([
|
|
1389
|
+
D()
|
|
1390
|
+
], ie);
|
|
1391
|
+
class Xn {
|
|
1392
|
+
constructor() {
|
|
1393
|
+
l(this, "contextmenu$$");
|
|
1394
|
+
l(this, "resize$$");
|
|
1395
|
+
l(this, "mousedown$$");
|
|
1396
|
+
l(this, "mousemove$$");
|
|
1397
|
+
l(this, "mouseup$$");
|
|
1398
|
+
l(this, "pointerdown$$");
|
|
1399
|
+
l(this, "pointermove$$");
|
|
1400
|
+
l(this, "pointercancel$$");
|
|
1401
|
+
l(this, "pointerup$$");
|
|
1402
|
+
l(this, "touchstart$$");
|
|
1403
|
+
l(this, "touchmove$$");
|
|
1404
|
+
l(this, "touchend$$");
|
|
1405
|
+
l(this, "wheel$$");
|
|
1406
|
+
l(this, "keydown$$");
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
class Kn extends Xn {
|
|
1410
|
+
constructor() {
|
|
1411
|
+
super(...arguments);
|
|
1412
|
+
l(this, "contextmenu$");
|
|
1413
|
+
l(this, "resize$");
|
|
1414
|
+
l(this, "mousedown$");
|
|
1415
|
+
l(this, "mousemove$");
|
|
1416
|
+
l(this, "mouseup$");
|
|
1417
|
+
l(this, "pointerdown$");
|
|
1418
|
+
l(this, "pointermove$");
|
|
1419
|
+
l(this, "pointercancel$");
|
|
1420
|
+
l(this, "pointerup$");
|
|
1421
|
+
l(this, "touchstart$");
|
|
1422
|
+
l(this, "touchmove$");
|
|
1423
|
+
l(this, "touchend$");
|
|
1424
|
+
l(this, "wheel$");
|
|
1425
|
+
l(this, "keydown$");
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
class qn extends Kn {
|
|
1429
|
+
constructor() {
|
|
1430
|
+
super(...arguments);
|
|
1431
|
+
l(this, "contextmenu");
|
|
1432
|
+
l(this, "resize");
|
|
1433
|
+
l(this, "mousedown");
|
|
1434
|
+
l(this, "mousemove");
|
|
1435
|
+
l(this, "mouseup");
|
|
1436
|
+
l(this, "pointerdown");
|
|
1437
|
+
l(this, "pointermove");
|
|
1438
|
+
l(this, "pointercancel");
|
|
1439
|
+
l(this, "pointerup");
|
|
1440
|
+
l(this, "touchstart");
|
|
1441
|
+
l(this, "touchmove");
|
|
1442
|
+
l(this, "touchend");
|
|
1443
|
+
l(this, "wheel");
|
|
1444
|
+
l(this, "keydown");
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
const Er = [
|
|
1448
|
+
"ArrowUp",
|
|
1449
|
+
"ArrowDown",
|
|
1450
|
+
"ArrowLeft",
|
|
1451
|
+
"ArrowRight"
|
|
1452
|
+
], zt = [
|
|
1453
|
+
"contextmenu",
|
|
1454
|
+
"resize",
|
|
1455
|
+
"mousedown",
|
|
1456
|
+
"mousemove",
|
|
1457
|
+
"mouseup",
|
|
1458
|
+
"pointerdown",
|
|
1459
|
+
"pointermove",
|
|
1460
|
+
"pointercancel",
|
|
1461
|
+
"pointerup",
|
|
1462
|
+
"touchstart",
|
|
1463
|
+
"touchmove",
|
|
1464
|
+
"touchend",
|
|
1465
|
+
"wheel",
|
|
1466
|
+
"keydown"
|
|
1467
|
+
];
|
|
1468
|
+
var Bn = Object.defineProperty, kn = Object.getOwnPropertyDescriptor, Qn = (t, e, n, r) => {
|
|
1469
|
+
for (var i = r > 1 ? void 0 : r ? kn(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
1470
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
1471
|
+
return r && i && Bn(e, n, i), i;
|
|
1472
|
+
}, Jn = (t, e) => (n, r) => e(n, r, t);
|
|
1473
|
+
let re = class extends qn {
|
|
1474
|
+
constructor(e) {
|
|
1475
|
+
super();
|
|
1476
|
+
l(this, "lifecycle$$", new U());
|
|
1477
|
+
l(this, "lifecycle$", this.lifecycle$$.pipe());
|
|
1478
|
+
this.component = e;
|
|
1479
|
+
for (const n of zt)
|
|
1480
|
+
this[`${n}$$`] = new U(), this[`${n}$`] = this[`${n}$$`].pipe(), this[n] = (r) => {
|
|
1481
|
+
this.component.proxyReceiver.handleEvent({
|
|
1482
|
+
...r,
|
|
1483
|
+
type: r.type || n
|
|
1484
|
+
}), this[`${n}$$`].next(r);
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
};
|
|
1488
|
+
re = Qn([
|
|
1489
|
+
D(),
|
|
1490
|
+
Jn(0, w(ie))
|
|
1491
|
+
], re);
|
|
1492
|
+
var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ni = (t, e, n, r) => {
|
|
1493
|
+
for (var i = r > 1 ? void 0 : r ? ti(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
1494
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
1495
|
+
return r && i && ei(e, n, i), i;
|
|
1496
|
+
};
|
|
1497
|
+
let ye = class {
|
|
1498
|
+
constructor() {
|
|
1499
|
+
l(this, "clock", new mn());
|
|
1500
|
+
l(this, "frame", 1e3 / 60);
|
|
1501
|
+
l(this, "delta", 0);
|
|
1502
|
+
l(this, "deltaRatio", 0);
|
|
1503
|
+
l(this, "enabled", !1);
|
|
1504
|
+
}
|
|
1505
|
+
};
|
|
1506
|
+
ye = ni([
|
|
1507
|
+
D()
|
|
1508
|
+
], ye);
|
|
1509
|
+
var ii = Object.defineProperty, ri = Object.getOwnPropertyDescriptor, si = (t, e, n, r) => {
|
|
1510
|
+
for (var i = r > 1 ? void 0 : r ? ri(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
1511
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
1512
|
+
return r && i && ii(e, n, i), i;
|
|
1513
|
+
};
|
|
1514
|
+
let se = class {
|
|
1515
|
+
constructor() {
|
|
1516
|
+
l(this, "scene", new St());
|
|
1517
|
+
l(this, "enabled", !0);
|
|
1518
|
+
}
|
|
1519
|
+
};
|
|
1520
|
+
se = si([
|
|
1521
|
+
D()
|
|
1522
|
+
], se);
|
|
1523
|
+
var oi = Object.defineProperty, ai = Object.getOwnPropertyDescriptor, hi = (t, e, n, r) => {
|
|
1524
|
+
for (var i = r > 1 ? void 0 : r ? ai(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
1525
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
1526
|
+
return r && i && oi(e, n, i), i;
|
|
1527
|
+
};
|
|
1528
|
+
let F = class {
|
|
1529
|
+
constructor() {
|
|
1530
|
+
l(this, "width", 0);
|
|
1531
|
+
l(this, "height", 0);
|
|
1532
|
+
l(this, "aspect", 0);
|
|
1533
|
+
l(this, "pixelRatio", 0);
|
|
1534
|
+
l(this, "frustrum", 5);
|
|
1535
|
+
l(this, "enabled", !0);
|
|
1536
|
+
}
|
|
1537
|
+
init(t, e) {
|
|
1538
|
+
this.height = Number(t.height ?? this.height), this.width = Number(t.width ?? this.width), this.aspect = this.width / this.height, this.enabled = e === void 0 ? !0 : !!e;
|
|
1539
|
+
}
|
|
1540
|
+
};
|
|
1541
|
+
F = hi([
|
|
1542
|
+
D()
|
|
1543
|
+
], F);
|
|
1544
|
+
var Ie = /* @__PURE__ */ ((t) => (t[t.PERSPECTIVE = 0] = "PERSPECTIVE", t[t.ORTHOGRAPHIC = 1] = "ORTHOGRAPHIC", t))(Ie || {}), li = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, ui = (t, e, n, r) => {
|
|
1545
|
+
for (var i = r > 1 ? void 0 : r ? ci(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
1546
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
1547
|
+
return r && i && li(e, n, i), i;
|
|
1548
|
+
}, pi = (t, e) => (n, r) => e(n, r, t);
|
|
1549
|
+
let k = class {
|
|
1550
|
+
constructor(t) {
|
|
1551
|
+
l(this, "instance");
|
|
1552
|
+
l(this, "miniCamera");
|
|
1553
|
+
l(this, "enabled", !0);
|
|
1554
|
+
this.sizesComponent = t;
|
|
1555
|
+
}
|
|
1556
|
+
set aspectRatio(t) {
|
|
1557
|
+
var e;
|
|
1558
|
+
this.instance instanceof K && (this.instance.aspect = t), (this.instance instanceof K || this.instance instanceof pe) && ((e = this.instance) == null || e.updateProjectionMatrix());
|
|
1559
|
+
}
|
|
1560
|
+
set quaternion(t) {
|
|
1561
|
+
var e;
|
|
1562
|
+
(e = this.instance) == null || e.quaternion.copy(t);
|
|
1563
|
+
}
|
|
1564
|
+
set position(t) {
|
|
1565
|
+
var e;
|
|
1566
|
+
(e = this.instance) == null || e.position.copy(t);
|
|
1567
|
+
}
|
|
1568
|
+
set rotation(t) {
|
|
1569
|
+
var e;
|
|
1570
|
+
(e = this.instance) == null || e.rotation.copy(t);
|
|
1571
|
+
}
|
|
1572
|
+
initDefaultCamera(t) {
|
|
1573
|
+
if (this.removeCamera(), t === Ie.PERSPECTIVE || t === void 0) {
|
|
1574
|
+
this.instance = new K(
|
|
1575
|
+
70,
|
|
1576
|
+
this.sizesComponent.width / this.sizesComponent.height,
|
|
1577
|
+
1e-4,
|
|
1578
|
+
100
|
|
1579
|
+
), this.instance.position.z = 8;
|
|
1580
|
+
return;
|
|
1581
|
+
}
|
|
1582
|
+
t === Ie.ORTHOGRAPHIC && (this.instance = new pe(
|
|
1583
|
+
-this.sizesComponent.aspect * this.sizesComponent.frustrum / 2,
|
|
1584
|
+
this.sizesComponent.aspect * this.sizesComponent.frustrum / 2,
|
|
1585
|
+
this.sizesComponent.frustrum / 2,
|
|
1586
|
+
-this.sizesComponent.frustrum / 2,
|
|
1587
|
+
-50,
|
|
1588
|
+
50
|
|
1589
|
+
));
|
|
1590
|
+
}
|
|
1591
|
+
setMiniCamera() {
|
|
1592
|
+
this.removeMiniCamera(), this.miniCamera = new K(
|
|
1593
|
+
75,
|
|
1594
|
+
this.sizesComponent.width / this.sizesComponent.height,
|
|
1595
|
+
0.1,
|
|
1596
|
+
500
|
|
1597
|
+
), this.miniCamera.position.z = 10, this.miniCamera.position.x = -5;
|
|
1598
|
+
}
|
|
1599
|
+
removeCamera() {
|
|
1600
|
+
this.instance instanceof ne && ((this.instance instanceof K || this.instance instanceof pe) && this.instance.clearViewOffset(), this.instance.clear(), this.instance = void 0);
|
|
1601
|
+
}
|
|
1602
|
+
removeMiniCamera() {
|
|
1603
|
+
this.miniCamera instanceof ne && (this.miniCamera.clearViewOffset(), this.miniCamera.clear(), this.miniCamera = void 0);
|
|
1604
|
+
}
|
|
1605
|
+
};
|
|
1606
|
+
k = ui([
|
|
1607
|
+
D(),
|
|
1608
|
+
pi(0, w(F))
|
|
1609
|
+
], k);
|
|
1610
|
+
const gt = { type: "change" }, qe = { type: "start" }, Nt = { type: "end" }, ce = new _n(), Pt = new yn(), fi = Math.cos(70 * vn.DEG2RAD), S = new L(), A = 2 * Math.PI, O = {
|
|
1611
|
+
NONE: -1,
|
|
1612
|
+
ROTATE: 0,
|
|
1613
|
+
DOLLY: 1,
|
|
1614
|
+
PAN: 2,
|
|
1615
|
+
TOUCH_ROTATE: 3,
|
|
1616
|
+
TOUCH_PAN: 4,
|
|
1617
|
+
TOUCH_DOLLY_PAN: 5,
|
|
1618
|
+
TOUCH_DOLLY_ROTATE: 6
|
|
1619
|
+
}, Ee = 1e-6;
|
|
1620
|
+
class Ct extends bn {
|
|
1621
|
+
constructor(e, n = null) {
|
|
1622
|
+
super(e, n), this.state = O.NONE, this.enabled = !0, this.target = new L(), this.cursor = new L(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: B.ROTATE, MIDDLE: B.DOLLY, RIGHT: B.PAN }, this.touches = { ONE: q.ROTATE, TWO: q.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new L(), this._lastQuaternion = new ft(), this._lastTargetPosition = new L(), this._quat = new ft().setFromUnitVectors(e.up, new L(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new dt(), this._sphericalDelta = new dt(), this._scale = 1, this._panOffset = new L(), this._rotateStart = new N(), this._rotateEnd = new N(), this._rotateDelta = new N(), this._panStart = new N(), this._panEnd = new N(), this._panDelta = new N(), this._dollyStart = new N(), this._dollyEnd = new N(), this._dollyDelta = new N(), this._dollyDirection = new L(), this._mouse = new N(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = mi.bind(this), this._onPointerDown = di.bind(this), this._onPointerUp = _i.bind(this), this._onContextMenu = Ci.bind(this), this._onMouseWheel = bi.bind(this), this._onKeyDown = wi.bind(this), this._onTouchStart = gi.bind(this), this._onTouchMove = Pi.bind(this), this._onMouseDown = yi.bind(this), this._onMouseMove = vi.bind(this), this._interceptControlDown = Oi.bind(this), this._interceptControlUp = $i.bind(this), this.domElement !== null && this.connect(), this.update();
|
|
1623
|
+
}
|
|
1624
|
+
connect() {
|
|
1625
|
+
this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
|
|
1626
|
+
}
|
|
1627
|
+
disconnect() {
|
|
1628
|
+
this.domElement.removeEventListener("pointerdown", this._onPointerDown), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.domElement.removeEventListener("pointercancel", this._onPointerUp), this.domElement.removeEventListener("wheel", this._onMouseWheel), this.domElement.removeEventListener("contextmenu", this._onContextMenu), this.stopListenToKeyEvents(), this.domElement.getRootNode().removeEventListener("keydown", this._interceptControlDown, { capture: !0 }), this.domElement.style.touchAction = "auto";
|
|
1629
|
+
}
|
|
1630
|
+
dispose() {
|
|
1631
|
+
this.disconnect();
|
|
1632
|
+
}
|
|
1633
|
+
getPolarAngle() {
|
|
1634
|
+
return this._spherical.phi;
|
|
1635
|
+
}
|
|
1636
|
+
getAzimuthalAngle() {
|
|
1637
|
+
return this._spherical.theta;
|
|
1638
|
+
}
|
|
1639
|
+
getDistance() {
|
|
1640
|
+
return this.object.position.distanceTo(this.target);
|
|
1641
|
+
}
|
|
1642
|
+
listenToKeyEvents(e) {
|
|
1643
|
+
e.addEventListener("keydown", this._onKeyDown), this._domElementKeyEvents = e;
|
|
1644
|
+
}
|
|
1645
|
+
stopListenToKeyEvents() {
|
|
1646
|
+
this._domElementKeyEvents !== null && (this._domElementKeyEvents.removeEventListener("keydown", this._onKeyDown), this._domElementKeyEvents = null);
|
|
1647
|
+
}
|
|
1648
|
+
saveState() {
|
|
1649
|
+
this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
|
|
1650
|
+
}
|
|
1651
|
+
reset() {
|
|
1652
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(gt), this.update(), this.state = O.NONE;
|
|
1653
|
+
}
|
|
1654
|
+
update(e = null) {
|
|
1655
|
+
const n = this.object.position;
|
|
1656
|
+
S.copy(n).sub(this.target), S.applyQuaternion(this._quat), this._spherical.setFromVector3(S), this.autoRotate && this.state === O.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
|
|
1657
|
+
let r = this.minAzimuthAngle, i = this.maxAzimuthAngle;
|
|
1658
|
+
isFinite(r) && isFinite(i) && (r < -Math.PI ? r += A : r > Math.PI && (r -= A), i < -Math.PI ? i += A : i > Math.PI && (i -= A), r <= i ? this._spherical.theta = Math.max(r, Math.min(i, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (r + i) / 2 ? Math.max(r, this._spherical.theta) : Math.min(i, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
|
|
1659
|
+
let s = !1;
|
|
1660
|
+
if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
|
|
1661
|
+
this._spherical.radius = this._clampDistance(this._spherical.radius);
|
|
1662
|
+
else {
|
|
1663
|
+
const a = this._spherical.radius;
|
|
1664
|
+
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), s = a != this._spherical.radius;
|
|
1665
|
+
}
|
|
1666
|
+
if (S.setFromSpherical(this._spherical), S.applyQuaternion(this._quatInverse), n.copy(this.target).add(S), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
|
|
1667
|
+
let a = null;
|
|
1668
|
+
if (this.object.isPerspectiveCamera) {
|
|
1669
|
+
const y = S.length();
|
|
1670
|
+
a = this._clampDistance(y * this._scale);
|
|
1671
|
+
const g = y - a;
|
|
1672
|
+
this.object.position.addScaledVector(this._dollyDirection, g), this.object.updateMatrixWorld(), s = !!g;
|
|
1673
|
+
} else if (this.object.isOrthographicCamera) {
|
|
1674
|
+
const y = new L(this._mouse.x, this._mouse.y, 0);
|
|
1675
|
+
y.unproject(this.object);
|
|
1676
|
+
const g = this.object.zoom;
|
|
1677
|
+
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), s = g !== this.object.zoom;
|
|
1678
|
+
const _ = new L(this._mouse.x, this._mouse.y, 0);
|
|
1679
|
+
_.unproject(this.object), this.object.position.sub(_).add(y), this.object.updateMatrixWorld(), a = S.length();
|
|
1680
|
+
} else
|
|
1681
|
+
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
1682
|
+
a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (ce.origin.copy(this.object.position), ce.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(ce.direction)) < fi ? this.object.lookAt(this.target) : (Pt.setFromNormalAndCoplanarPoint(this.object.up, this.target), ce.intersectPlane(Pt, this.target))));
|
|
1683
|
+
} else if (this.object.isOrthographicCamera) {
|
|
1684
|
+
const a = this.object.zoom;
|
|
1685
|
+
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), a !== this.object.zoom && (this.object.updateProjectionMatrix(), s = !0);
|
|
1686
|
+
}
|
|
1687
|
+
return this._scale = 1, this._performCursorZoom = !1, s || this._lastPosition.distanceToSquared(this.object.position) > Ee || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Ee || this._lastTargetPosition.distanceToSquared(this.target) > Ee ? (this.dispatchEvent(gt), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
1688
|
+
}
|
|
1689
|
+
_getAutoRotationAngle(e) {
|
|
1690
|
+
return e !== null ? A / 60 * this.autoRotateSpeed * e : A / 60 / 60 * this.autoRotateSpeed;
|
|
1691
|
+
}
|
|
1692
|
+
_getZoomScale(e) {
|
|
1693
|
+
const n = Math.abs(e * 0.01);
|
|
1694
|
+
return Math.pow(0.95, this.zoomSpeed * n);
|
|
1695
|
+
}
|
|
1696
|
+
_rotateLeft(e) {
|
|
1697
|
+
this._sphericalDelta.theta -= e;
|
|
1698
|
+
}
|
|
1699
|
+
_rotateUp(e) {
|
|
1700
|
+
this._sphericalDelta.phi -= e;
|
|
1701
|
+
}
|
|
1702
|
+
_panLeft(e, n) {
|
|
1703
|
+
S.setFromMatrixColumn(n, 0), S.multiplyScalar(-e), this._panOffset.add(S);
|
|
1704
|
+
}
|
|
1705
|
+
_panUp(e, n) {
|
|
1706
|
+
this.screenSpacePanning === !0 ? S.setFromMatrixColumn(n, 1) : (S.setFromMatrixColumn(n, 0), S.crossVectors(this.object.up, S)), S.multiplyScalar(e), this._panOffset.add(S);
|
|
1707
|
+
}
|
|
1708
|
+
// deltaX and deltaY are in pixels; right and down are positive
|
|
1709
|
+
_pan(e, n) {
|
|
1710
|
+
const r = this.domElement;
|
|
1711
|
+
if (this.object.isPerspectiveCamera) {
|
|
1712
|
+
const i = this.object.position;
|
|
1713
|
+
S.copy(i).sub(this.target);
|
|
1714
|
+
let s = S.length();
|
|
1715
|
+
s *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * s / r.clientHeight, this.object.matrix), this._panUp(2 * n * s / r.clientHeight, this.object.matrix);
|
|
1716
|
+
} else this.object.isOrthographicCamera ? (this._panLeft(e * (this.object.right - this.object.left) / this.object.zoom / r.clientWidth, this.object.matrix), this._panUp(n * (this.object.top - this.object.bottom) / this.object.zoom / r.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
|
|
1717
|
+
}
|
|
1718
|
+
_dollyOut(e) {
|
|
1719
|
+
this.object.isPerspectiveCamera || this.object.isOrthographicCamera ? this._scale /= e : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), this.enableZoom = !1);
|
|
1720
|
+
}
|
|
1721
|
+
_dollyIn(e) {
|
|
1722
|
+
this.object.isPerspectiveCamera || this.object.isOrthographicCamera ? this._scale *= e : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), this.enableZoom = !1);
|
|
1723
|
+
}
|
|
1724
|
+
_updateZoomParameters(e, n) {
|
|
1725
|
+
if (!this.zoomToCursor)
|
|
1726
|
+
return;
|
|
1727
|
+
this._performCursorZoom = !0;
|
|
1728
|
+
const r = this.domElement.getBoundingClientRect(), i = e - r.left, s = n - r.top, a = r.width, y = r.height;
|
|
1729
|
+
this._mouse.x = i / a * 2 - 1, this._mouse.y = -(s / y) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
|
|
1730
|
+
}
|
|
1731
|
+
_clampDistance(e) {
|
|
1732
|
+
return Math.max(this.minDistance, Math.min(this.maxDistance, e));
|
|
1733
|
+
}
|
|
1734
|
+
//
|
|
1735
|
+
// event callbacks - update the object state
|
|
1736
|
+
//
|
|
1737
|
+
_handleMouseDownRotate(e) {
|
|
1738
|
+
this._rotateStart.set(e.clientX, e.clientY);
|
|
1739
|
+
}
|
|
1740
|
+
_handleMouseDownDolly(e) {
|
|
1741
|
+
this._updateZoomParameters(e.clientX, e.clientX), this._dollyStart.set(e.clientX, e.clientY);
|
|
1742
|
+
}
|
|
1743
|
+
_handleMouseDownPan(e) {
|
|
1744
|
+
this._panStart.set(e.clientX, e.clientY);
|
|
1745
|
+
}
|
|
1746
|
+
_handleMouseMoveRotate(e) {
|
|
1747
|
+
this._rotateEnd.set(e.clientX, e.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
1748
|
+
const n = this.domElement;
|
|
1749
|
+
this._rotateLeft(A * this._rotateDelta.x / n.clientHeight), this._rotateUp(A * this._rotateDelta.y / n.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
|
|
1750
|
+
}
|
|
1751
|
+
_handleMouseMoveDolly(e) {
|
|
1752
|
+
this._dollyEnd.set(e.clientX, e.clientY), this._dollyDelta.subVectors(this._dollyEnd, this._dollyStart), this._dollyDelta.y > 0 ? this._dollyOut(this._getZoomScale(this._dollyDelta.y)) : this._dollyDelta.y < 0 && this._dollyIn(this._getZoomScale(this._dollyDelta.y)), this._dollyStart.copy(this._dollyEnd), this.update();
|
|
1753
|
+
}
|
|
1754
|
+
_handleMouseMovePan(e) {
|
|
1755
|
+
this._panEnd.set(e.clientX, e.clientY), this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd), this.update();
|
|
1756
|
+
}
|
|
1757
|
+
_handleMouseWheel(e) {
|
|
1758
|
+
this._updateZoomParameters(e.clientX, e.clientY), e.deltaY < 0 ? this._dollyIn(this._getZoomScale(e.deltaY)) : e.deltaY > 0 && this._dollyOut(this._getZoomScale(e.deltaY)), this.update();
|
|
1759
|
+
}
|
|
1760
|
+
_handleKeyDown(e) {
|
|
1761
|
+
let n = !1;
|
|
1762
|
+
switch (e.code) {
|
|
1763
|
+
case this.keys.UP:
|
|
1764
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this._rotateUp(A * this.rotateSpeed / this.domElement.clientHeight) : this._pan(0, this.keyPanSpeed), n = !0;
|
|
1765
|
+
break;
|
|
1766
|
+
case this.keys.BOTTOM:
|
|
1767
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this._rotateUp(-A * this.rotateSpeed / this.domElement.clientHeight) : this._pan(0, -this.keyPanSpeed), n = !0;
|
|
1768
|
+
break;
|
|
1769
|
+
case this.keys.LEFT:
|
|
1770
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this._rotateLeft(A * this.rotateSpeed / this.domElement.clientHeight) : this._pan(this.keyPanSpeed, 0), n = !0;
|
|
1771
|
+
break;
|
|
1772
|
+
case this.keys.RIGHT:
|
|
1773
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this._rotateLeft(-A * this.rotateSpeed / this.domElement.clientHeight) : this._pan(-this.keyPanSpeed, 0), n = !0;
|
|
1774
|
+
break;
|
|
1775
|
+
}
|
|
1776
|
+
n && (e.preventDefault(), this.update());
|
|
1777
|
+
}
|
|
1778
|
+
_handleTouchStartRotate(e) {
|
|
1779
|
+
if (this._pointers.length === 1)
|
|
1780
|
+
this._rotateStart.set(e.pageX, e.pageY);
|
|
1781
|
+
else {
|
|
1782
|
+
const n = this._getSecondPointerPosition(e), r = 0.5 * (e.pageX + n.x), i = 0.5 * (e.pageY + n.y);
|
|
1783
|
+
this._rotateStart.set(r, i);
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
_handleTouchStartPan(e) {
|
|
1787
|
+
if (this._pointers.length === 1)
|
|
1788
|
+
this._panStart.set(e.pageX, e.pageY);
|
|
1789
|
+
else {
|
|
1790
|
+
const n = this._getSecondPointerPosition(e), r = 0.5 * (e.pageX + n.x), i = 0.5 * (e.pageY + n.y);
|
|
1791
|
+
this._panStart.set(r, i);
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
_handleTouchStartDolly(e) {
|
|
1795
|
+
const n = this._getSecondPointerPosition(e), r = e.pageX - n.x, i = e.pageY - n.y, s = Math.sqrt(r * r + i * i);
|
|
1796
|
+
this._dollyStart.set(0, s);
|
|
1797
|
+
}
|
|
1798
|
+
_handleTouchStartDollyPan(e) {
|
|
1799
|
+
this.enableZoom && this._handleTouchStartDolly(e), this.enablePan && this._handleTouchStartPan(e);
|
|
1800
|
+
}
|
|
1801
|
+
_handleTouchStartDollyRotate(e) {
|
|
1802
|
+
this.enableZoom && this._handleTouchStartDolly(e), this.enableRotate && this._handleTouchStartRotate(e);
|
|
1803
|
+
}
|
|
1804
|
+
_handleTouchMoveRotate(e) {
|
|
1805
|
+
if (this._pointers.length == 1)
|
|
1806
|
+
this._rotateEnd.set(e.pageX, e.pageY);
|
|
1807
|
+
else {
|
|
1808
|
+
const r = this._getSecondPointerPosition(e), i = 0.5 * (e.pageX + r.x), s = 0.5 * (e.pageY + r.y);
|
|
1809
|
+
this._rotateEnd.set(i, s);
|
|
1810
|
+
}
|
|
1811
|
+
this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
1812
|
+
const n = this.domElement;
|
|
1813
|
+
this._rotateLeft(A * this._rotateDelta.x / n.clientHeight), this._rotateUp(A * this._rotateDelta.y / n.clientHeight), this._rotateStart.copy(this._rotateEnd);
|
|
1814
|
+
}
|
|
1815
|
+
_handleTouchMovePan(e) {
|
|
1816
|
+
if (this._pointers.length === 1)
|
|
1817
|
+
this._panEnd.set(e.pageX, e.pageY);
|
|
1818
|
+
else {
|
|
1819
|
+
const n = this._getSecondPointerPosition(e), r = 0.5 * (e.pageX + n.x), i = 0.5 * (e.pageY + n.y);
|
|
1820
|
+
this._panEnd.set(r, i);
|
|
1821
|
+
}
|
|
1822
|
+
this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd);
|
|
1823
|
+
}
|
|
1824
|
+
_handleTouchMoveDolly(e) {
|
|
1825
|
+
const n = this._getSecondPointerPosition(e), r = e.pageX - n.x, i = e.pageY - n.y, s = Math.sqrt(r * r + i * i);
|
|
1826
|
+
this._dollyEnd.set(0, s), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
|
|
1827
|
+
const a = (e.pageX + n.x) * 0.5, y = (e.pageY + n.y) * 0.5;
|
|
1828
|
+
this._updateZoomParameters(a, y);
|
|
1829
|
+
}
|
|
1830
|
+
_handleTouchMoveDollyPan(e) {
|
|
1831
|
+
this.enableZoom && this._handleTouchMoveDolly(e), this.enablePan && this._handleTouchMovePan(e);
|
|
1832
|
+
}
|
|
1833
|
+
_handleTouchMoveDollyRotate(e) {
|
|
1834
|
+
this.enableZoom && this._handleTouchMoveDolly(e), this.enableRotate && this._handleTouchMoveRotate(e);
|
|
1835
|
+
}
|
|
1836
|
+
// pointers
|
|
1837
|
+
_addPointer(e) {
|
|
1838
|
+
this._pointers.push(e.pointerId);
|
|
1839
|
+
}
|
|
1840
|
+
_removePointer(e) {
|
|
1841
|
+
delete this._pointerPositions[e.pointerId];
|
|
1842
|
+
for (let n = 0; n < this._pointers.length; n++)
|
|
1843
|
+
if (this._pointers[n] == e.pointerId) {
|
|
1844
|
+
this._pointers.splice(n, 1);
|
|
1845
|
+
return;
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
_isTrackingPointer(e) {
|
|
1849
|
+
for (let n = 0; n < this._pointers.length; n++)
|
|
1850
|
+
if (this._pointers[n] == e.pointerId) return !0;
|
|
1851
|
+
return !1;
|
|
1852
|
+
}
|
|
1853
|
+
_trackPointer(e) {
|
|
1854
|
+
let n = this._pointerPositions[e.pointerId];
|
|
1855
|
+
n === void 0 && (n = new N(), this._pointerPositions[e.pointerId] = n), n.set(e.pageX, e.pageY);
|
|
1856
|
+
}
|
|
1857
|
+
_getSecondPointerPosition(e) {
|
|
1858
|
+
const n = e.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
|
|
1859
|
+
return this._pointerPositions[n];
|
|
1860
|
+
}
|
|
1861
|
+
//
|
|
1862
|
+
_customWheelEvent(e) {
|
|
1863
|
+
const n = e.deltaMode, r = {
|
|
1864
|
+
clientX: e.clientX,
|
|
1865
|
+
clientY: e.clientY,
|
|
1866
|
+
deltaY: e.deltaY
|
|
1867
|
+
};
|
|
1868
|
+
switch (n) {
|
|
1869
|
+
case 1:
|
|
1870
|
+
r.deltaY *= 16;
|
|
1871
|
+
break;
|
|
1872
|
+
case 2:
|
|
1873
|
+
r.deltaY *= 100;
|
|
1874
|
+
break;
|
|
1875
|
+
}
|
|
1876
|
+
return e.ctrlKey && !this._controlActive && (r.deltaY *= 10), r;
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
function di(t) {
|
|
1880
|
+
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(t.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(t) && (this._addPointer(t), t.pointerType === "touch" ? this._onTouchStart(t) : this._onMouseDown(t)));
|
|
1881
|
+
}
|
|
1882
|
+
function mi(t) {
|
|
1883
|
+
this.enabled !== !1 && (t.pointerType === "touch" ? this._onTouchMove(t) : this._onMouseMove(t));
|
|
1884
|
+
}
|
|
1885
|
+
function _i(t) {
|
|
1886
|
+
switch (this._removePointer(t), this._pointers.length) {
|
|
1887
|
+
case 0:
|
|
1888
|
+
this.domElement.releasePointerCapture(t.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Nt), this.state = O.NONE;
|
|
1889
|
+
break;
|
|
1890
|
+
case 1:
|
|
1891
|
+
const e = this._pointers[0], n = this._pointerPositions[e];
|
|
1892
|
+
this._onTouchStart({ pointerId: e, pageX: n.x, pageY: n.y });
|
|
1893
|
+
break;
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
function yi(t) {
|
|
1897
|
+
let e;
|
|
1898
|
+
switch (t.button) {
|
|
1899
|
+
case 0:
|
|
1900
|
+
e = this.mouseButtons.LEFT;
|
|
1901
|
+
break;
|
|
1902
|
+
case 1:
|
|
1903
|
+
e = this.mouseButtons.MIDDLE;
|
|
1904
|
+
break;
|
|
1905
|
+
case 2:
|
|
1906
|
+
e = this.mouseButtons.RIGHT;
|
|
1907
|
+
break;
|
|
1908
|
+
default:
|
|
1909
|
+
e = -1;
|
|
1910
|
+
}
|
|
1911
|
+
switch (e) {
|
|
1912
|
+
case B.DOLLY:
|
|
1913
|
+
if (this.enableZoom === !1) return;
|
|
1914
|
+
this._handleMouseDownDolly(t), this.state = O.DOLLY;
|
|
1915
|
+
break;
|
|
1916
|
+
case B.ROTATE:
|
|
1917
|
+
if (t.ctrlKey || t.metaKey || t.shiftKey) {
|
|
1918
|
+
if (this.enablePan === !1) return;
|
|
1919
|
+
this._handleMouseDownPan(t), this.state = O.PAN;
|
|
1920
|
+
} else {
|
|
1921
|
+
if (this.enableRotate === !1) return;
|
|
1922
|
+
this._handleMouseDownRotate(t), this.state = O.ROTATE;
|
|
1923
|
+
}
|
|
1924
|
+
break;
|
|
1925
|
+
case B.PAN:
|
|
1926
|
+
if (t.ctrlKey || t.metaKey || t.shiftKey) {
|
|
1927
|
+
if (this.enableRotate === !1) return;
|
|
1928
|
+
this._handleMouseDownRotate(t), this.state = O.ROTATE;
|
|
1929
|
+
} else {
|
|
1930
|
+
if (this.enablePan === !1) return;
|
|
1931
|
+
this._handleMouseDownPan(t), this.state = O.PAN;
|
|
1932
|
+
}
|
|
1933
|
+
break;
|
|
1934
|
+
default:
|
|
1935
|
+
this.state = O.NONE;
|
|
1936
|
+
}
|
|
1937
|
+
this.state !== O.NONE && this.dispatchEvent(qe);
|
|
1938
|
+
}
|
|
1939
|
+
function vi(t) {
|
|
1940
|
+
switch (this.state) {
|
|
1941
|
+
case O.ROTATE:
|
|
1942
|
+
if (this.enableRotate === !1) return;
|
|
1943
|
+
this._handleMouseMoveRotate(t);
|
|
1944
|
+
break;
|
|
1945
|
+
case O.DOLLY:
|
|
1946
|
+
if (this.enableZoom === !1) return;
|
|
1947
|
+
this._handleMouseMoveDolly(t);
|
|
1948
|
+
break;
|
|
1949
|
+
case O.PAN:
|
|
1950
|
+
if (this.enablePan === !1) return;
|
|
1951
|
+
this._handleMouseMovePan(t);
|
|
1952
|
+
break;
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
function bi(t) {
|
|
1956
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== O.NONE || (t.preventDefault(), this.dispatchEvent(qe), this._handleMouseWheel(this._customWheelEvent(t)), this.dispatchEvent(Nt));
|
|
1957
|
+
}
|
|
1958
|
+
function wi(t) {
|
|
1959
|
+
this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(t);
|
|
1960
|
+
}
|
|
1961
|
+
function gi(t) {
|
|
1962
|
+
switch (this._trackPointer(t), this._pointers.length) {
|
|
1963
|
+
case 1:
|
|
1964
|
+
switch (this.touches.ONE) {
|
|
1965
|
+
case q.ROTATE:
|
|
1966
|
+
if (this.enableRotate === !1) return;
|
|
1967
|
+
this._handleTouchStartRotate(t), this.state = O.TOUCH_ROTATE;
|
|
1968
|
+
break;
|
|
1969
|
+
case q.PAN:
|
|
1970
|
+
if (this.enablePan === !1) return;
|
|
1971
|
+
this._handleTouchStartPan(t), this.state = O.TOUCH_PAN;
|
|
1972
|
+
break;
|
|
1973
|
+
default:
|
|
1974
|
+
this.state = O.NONE;
|
|
1975
|
+
}
|
|
1976
|
+
break;
|
|
1977
|
+
case 2:
|
|
1978
|
+
switch (this.touches.TWO) {
|
|
1979
|
+
case q.DOLLY_PAN:
|
|
1980
|
+
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
1981
|
+
this._handleTouchStartDollyPan(t), this.state = O.TOUCH_DOLLY_PAN;
|
|
1982
|
+
break;
|
|
1983
|
+
case q.DOLLY_ROTATE:
|
|
1984
|
+
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
1985
|
+
this._handleTouchStartDollyRotate(t), this.state = O.TOUCH_DOLLY_ROTATE;
|
|
1986
|
+
break;
|
|
1987
|
+
default:
|
|
1988
|
+
this.state = O.NONE;
|
|
1989
|
+
}
|
|
1990
|
+
break;
|
|
1991
|
+
default:
|
|
1992
|
+
this.state = O.NONE;
|
|
1993
|
+
}
|
|
1994
|
+
this.state !== O.NONE && this.dispatchEvent(qe);
|
|
1995
|
+
}
|
|
1996
|
+
function Pi(t) {
|
|
1997
|
+
switch (this._trackPointer(t), this.state) {
|
|
1998
|
+
case O.TOUCH_ROTATE:
|
|
1999
|
+
if (this.enableRotate === !1) return;
|
|
2000
|
+
this._handleTouchMoveRotate(t), this.update();
|
|
2001
|
+
break;
|
|
2002
|
+
case O.TOUCH_PAN:
|
|
2003
|
+
if (this.enablePan === !1) return;
|
|
2004
|
+
this._handleTouchMovePan(t), this.update();
|
|
2005
|
+
break;
|
|
2006
|
+
case O.TOUCH_DOLLY_PAN:
|
|
2007
|
+
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
2008
|
+
this._handleTouchMoveDollyPan(t), this.update();
|
|
2009
|
+
break;
|
|
2010
|
+
case O.TOUCH_DOLLY_ROTATE:
|
|
2011
|
+
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
2012
|
+
this._handleTouchMoveDollyRotate(t), this.update();
|
|
2013
|
+
break;
|
|
2014
|
+
default:
|
|
2015
|
+
this.state = O.NONE;
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
function Ci(t) {
|
|
2019
|
+
this.enabled !== !1 && t.preventDefault();
|
|
2020
|
+
}
|
|
2021
|
+
function Oi(t) {
|
|
2022
|
+
t.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
2023
|
+
}
|
|
2024
|
+
function $i(t) {
|
|
2025
|
+
t.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
2026
|
+
}
|
|
2027
|
+
var Ei = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, Di = (t, e, n, r) => {
|
|
2028
|
+
for (var i = r > 1 ? void 0 : r ? Mi(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2029
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2030
|
+
return r && i && Ei(e, n, i), i;
|
|
2031
|
+
}, Me = (t, e) => (n, r) => e(n, r, t);
|
|
2032
|
+
let ve = class {
|
|
2033
|
+
constructor(t, e, n) {
|
|
2034
|
+
l(this, "enabled", !0);
|
|
2035
|
+
l(this, "cameraControls");
|
|
2036
|
+
l(this, "miniCameraControls");
|
|
2037
|
+
l(this, "cameraHelper");
|
|
2038
|
+
l(this, "axesHelper");
|
|
2039
|
+
l(this, "gridHelper");
|
|
2040
|
+
this.appComponent = t, this.cameraComponent = e, this.worldComponent = n;
|
|
2041
|
+
}
|
|
2042
|
+
_setCameraOrbitControl() {
|
|
2043
|
+
var t;
|
|
2044
|
+
this.cameraControls && ((t = this.cameraControls) == null || t.dispose(), this.cameraControls = void 0), !(!this.enabled || !(this.cameraComponent.instance instanceof ne)) && this.cameraComponent.instance instanceof ne && (this.cameraControls = new Ct(
|
|
2045
|
+
this.cameraComponent.instance,
|
|
2046
|
+
this.appComponent.proxyReceiver
|
|
2047
|
+
), this.cameraControls && (this.cameraControls.enableDamping = !0));
|
|
2048
|
+
}
|
|
2049
|
+
_setMiniCameraOrbitControls() {
|
|
2050
|
+
this.miniCameraControls && (this.miniCameraControls.dispose(), this.miniCameraControls = void 0), this.enabled && this.cameraComponent.miniCamera && (this.miniCameraControls = new Ct(
|
|
2051
|
+
this.cameraComponent.miniCamera,
|
|
2052
|
+
this.appComponent.proxyReceiver
|
|
2053
|
+
), this.miniCameraControls.enableDamping = !0);
|
|
2054
|
+
}
|
|
2055
|
+
_setCameraHelper() {
|
|
2056
|
+
this.cameraHelper && (this.worldComponent.scene.remove(this.cameraHelper), this.cameraHelper = void 0), this.enabled && this.cameraComponent.instance && (this.cameraHelper = new wn(this.cameraComponent.instance), this.worldComponent.scene.add(this.cameraHelper));
|
|
2057
|
+
}
|
|
2058
|
+
_setAxesHelper(t) {
|
|
2059
|
+
const e = new gn(t);
|
|
2060
|
+
this.worldComponent.scene.add(e);
|
|
2061
|
+
}
|
|
2062
|
+
_setGridHelper(t) {
|
|
2063
|
+
const e = new Pn(t, t);
|
|
2064
|
+
this.worldComponent.scene.add(e);
|
|
2065
|
+
}
|
|
2066
|
+
init(t) {
|
|
2067
|
+
this._setCameraOrbitControl(), this._setMiniCameraOrbitControls(), this._setCameraHelper(), typeof (t == null ? void 0 : t.axesSizes) == "number" && this._setAxesHelper(t.axesSizes), typeof (t == null ? void 0 : t.gridSizes) == "number" && this._setGridHelper(t.gridSizes);
|
|
2068
|
+
}
|
|
2069
|
+
update() {
|
|
2070
|
+
var t, e;
|
|
2071
|
+
this.enabled && ((t = this.cameraControls) == null || t.update(), (e = this.miniCameraControls) == null || e.update());
|
|
2072
|
+
}
|
|
2073
|
+
dispose() {
|
|
2074
|
+
this.cameraHelper && (this.worldComponent.scene.remove(this.cameraHelper), this.cameraHelper = void 0), this.cameraControls && (this.cameraControls.dispose(), this.cameraControls = void 0), this.miniCameraControls && (this.miniCameraControls.dispose(), this.miniCameraControls = void 0);
|
|
2075
|
+
}
|
|
2076
|
+
};
|
|
2077
|
+
ve = Di([
|
|
2078
|
+
D(),
|
|
2079
|
+
Me(0, w(ie)),
|
|
2080
|
+
Me(1, w(k)),
|
|
2081
|
+
Me(2, w(se))
|
|
2082
|
+
], ve);
|
|
2083
|
+
var Ht = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, Ri = (t, e, n) => e in t ? Ht(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Si = (t, e, n, r) => {
|
|
2084
|
+
for (var i = r > 1 ? void 0 : r ? Ti(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2085
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2086
|
+
return r && i && Ht(e, n, i), i;
|
|
2087
|
+
}, ue = (t, e) => (n, r) => e(n, r, t), ji = (t, e, n) => Ri(t, e + "", n);
|
|
2088
|
+
let G = class {
|
|
2089
|
+
constructor(t, e, n, r) {
|
|
2090
|
+
l(this, "enabled", !0);
|
|
2091
|
+
l(this, "instance");
|
|
2092
|
+
this.worldComponent = t, this.cameraComponent = e, this.sizesComponent = n, this.debugComponent = r;
|
|
2093
|
+
}
|
|
2094
|
+
init(t) {
|
|
2095
|
+
this.instance = new mt({
|
|
2096
|
+
canvas: t,
|
|
2097
|
+
context: t.getContext("webgl2", {
|
|
2098
|
+
stencil: !0,
|
|
2099
|
+
powerPreference: "high-performance"
|
|
2100
|
+
}),
|
|
2101
|
+
powerPreference: "high-performance",
|
|
2102
|
+
depth: !0,
|
|
2103
|
+
antialias: !0
|
|
2104
|
+
}), this.instance.autoClear = !1, this.instance.setPixelRatio(G.RENDERER_PIXEL_RATIO), this.instance.setClearColor(0, 0), this.instance.shadowMap.enabled = !0, this.instance.shadowMap.type = Cn, this.instance.outputColorSpace = On, this.instance.toneMapping = $n, this.instance.toneMappingExposure = 1.75;
|
|
2105
|
+
}
|
|
2106
|
+
setSize(t, e) {
|
|
2107
|
+
var n;
|
|
2108
|
+
(n = this.instance) == null || n.setSize(t, e);
|
|
2109
|
+
}
|
|
2110
|
+
render() {
|
|
2111
|
+
this.enabled && this.cameraComponent.instance instanceof ne && this.instance instanceof mt && (this.instance.setViewport(
|
|
2112
|
+
0,
|
|
2113
|
+
0,
|
|
2114
|
+
this.sizesComponent.width,
|
|
2115
|
+
this.sizesComponent.height
|
|
2116
|
+
), this.instance.render(
|
|
2117
|
+
this.worldComponent.scene,
|
|
2118
|
+
this.cameraComponent.instance
|
|
2119
|
+
), this.debugComponent.enabled && this.cameraComponent.miniCamera && (this.instance.setScissorTest(!0), this.instance.setViewport(
|
|
2120
|
+
this.sizesComponent.width - this.sizesComponent.width / 3,
|
|
2121
|
+
this.sizesComponent.height - this.sizesComponent.height / 3,
|
|
2122
|
+
this.sizesComponent.width / 3,
|
|
2123
|
+
this.sizesComponent.height / 3
|
|
2124
|
+
), this.instance.setScissor(
|
|
2125
|
+
this.sizesComponent.width - this.sizesComponent.width / 3,
|
|
2126
|
+
this.sizesComponent.height - this.sizesComponent.height / 3,
|
|
2127
|
+
this.sizesComponent.width / 3,
|
|
2128
|
+
this.sizesComponent.height / 3
|
|
2129
|
+
), this.instance.render(
|
|
2130
|
+
this.worldComponent.scene,
|
|
2131
|
+
this.cameraComponent.miniCamera
|
|
2132
|
+
), this.instance.setScissorTest(!1)));
|
|
2133
|
+
}
|
|
2134
|
+
};
|
|
2135
|
+
ji(G, "RENDERER_PIXEL_RATIO", 1);
|
|
2136
|
+
G = Si([
|
|
2137
|
+
D(),
|
|
2138
|
+
ue(0, w(se)),
|
|
2139
|
+
ue(1, w(k)),
|
|
2140
|
+
ue(2, w(F)),
|
|
2141
|
+
ue(3, w(ve))
|
|
2142
|
+
], G);
|
|
2143
|
+
var xi = /* @__PURE__ */ ((t) => (t[t.INITIALIZED = 0] = "INITIALIZED", t[t.DISPOSED = 1] = "DISPOSED", t))(xi || {}), oe = /* @__PURE__ */ ((t) => (t[t.INITIALIZED = 0] = "INITIALIZED", t[t.STEP_STARTED = 1] = "STEP_STARTED", t[t.STEP_ENDED = 2] = "STEP_ENDED", t[t.DISPOSED = 3] = "DISPOSED", t))(oe || {}), Ai = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, zi = (t, e, n, r) => {
|
|
2144
|
+
for (var i = r > 1 ? void 0 : r ? Ii(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2145
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2146
|
+
return r && i && Ai(e, n, i), i;
|
|
2147
|
+
}, Ot = (t, e) => (n, r) => e(n, r, t);
|
|
2148
|
+
let Q = class {
|
|
2149
|
+
constructor(t, e) {
|
|
2150
|
+
l(this, "step$$", new U());
|
|
2151
|
+
l(this, "enable$$", new U());
|
|
2152
|
+
l(this, "step$", this.step$$.pipe());
|
|
2153
|
+
l(this, "enable$", this.enable$$.pipe());
|
|
2154
|
+
this.component = t, this.appController = e;
|
|
2155
|
+
}
|
|
2156
|
+
step() {
|
|
2157
|
+
this.appController.lifecycle$$.next(oe.STEP_STARTED), this.component.enabled && (this.component.delta = this.component.clock.getDelta() ?? this.component.frame, this.component.deltaRatio = this.component.delta * 1e3 / this.component.frame, this.step$$.next({
|
|
2158
|
+
delta: this.component.delta,
|
|
2159
|
+
deltaRatio: this.component.deltaRatio
|
|
2160
|
+
})), this.appController.lifecycle$$.next(oe.STEP_ENDED);
|
|
2161
|
+
}
|
|
2162
|
+
};
|
|
2163
|
+
Q = zi([
|
|
2164
|
+
D(),
|
|
2165
|
+
Ot(0, w(ye)),
|
|
2166
|
+
Ot(1, w(re))
|
|
2167
|
+
], Q);
|
|
2168
|
+
var Ni = Object.defineProperty, Hi = Object.getOwnPropertyDescriptor, Li = (t, e, n, r) => {
|
|
2169
|
+
for (var i = r > 1 ? void 0 : r ? Hi(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2170
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2171
|
+
return r && i && Ni(e, n, i), i;
|
|
2172
|
+
}, De = (t, e) => (n, r) => e(n, r, t);
|
|
2173
|
+
let ze = class {
|
|
2174
|
+
constructor(t, e, n) {
|
|
2175
|
+
this.component = t, this.controller = e, this.rendererComponent = n;
|
|
2176
|
+
}
|
|
2177
|
+
init(t) {
|
|
2178
|
+
this.controller.enable$.subscribe((e) => {
|
|
2179
|
+
var n, r;
|
|
2180
|
+
this.component.enabled = !!e, e ? (n = this.rendererComponent.instance) == null || n.setAnimationLoop(
|
|
2181
|
+
this.controller.step.bind(this.controller)
|
|
2182
|
+
) : (r = this.rendererComponent.instance) == null || r.setAnimationLoop(null);
|
|
2183
|
+
}), t && this.enabled(!0);
|
|
2184
|
+
}
|
|
2185
|
+
clock() {
|
|
2186
|
+
return this.component.clock;
|
|
2187
|
+
}
|
|
2188
|
+
frame() {
|
|
2189
|
+
return this.component.frame;
|
|
2190
|
+
}
|
|
2191
|
+
delta(t) {
|
|
2192
|
+
return typeof t == "number" && (this.component.delta = t), this.component.delta;
|
|
2193
|
+
}
|
|
2194
|
+
deltaRatio(t) {
|
|
2195
|
+
return typeof t == "number" && (this.component.deltaRatio = t), this.component.deltaRatio;
|
|
2196
|
+
}
|
|
2197
|
+
enabled(t) {
|
|
2198
|
+
return typeof t == "boolean" && this.controller.enable$$.next(t), this.component.enabled;
|
|
2199
|
+
}
|
|
2200
|
+
dispose() {
|
|
2201
|
+
this.controller.step$$.complete(), this.controller.enable$$.complete();
|
|
2202
|
+
}
|
|
2203
|
+
enabled$() {
|
|
2204
|
+
return this.controller.enable$;
|
|
2205
|
+
}
|
|
2206
|
+
step$() {
|
|
2207
|
+
return this.controller.step$;
|
|
2208
|
+
}
|
|
2209
|
+
};
|
|
2210
|
+
ze = Li([
|
|
2211
|
+
D(),
|
|
2212
|
+
De(0, w(ye)),
|
|
2213
|
+
De(1, w(Q)),
|
|
2214
|
+
De(2, w(G))
|
|
2215
|
+
], ze);
|
|
2216
|
+
var Ui = Object.defineProperty, Yi = Object.getOwnPropertyDescriptor, Zi = (t, e, n, r) => {
|
|
2217
|
+
for (var i = r > 1 ? void 0 : r ? Yi(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2218
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2219
|
+
return r && i && Ui(e, n, i), i;
|
|
2220
|
+
}, $t = (t, e) => (n, r) => e(n, r, t);
|
|
2221
|
+
let Ne = class {
|
|
2222
|
+
constructor(t, e) {
|
|
2223
|
+
l(this, "enable$$", new U());
|
|
2224
|
+
l(this, "enable$", this.enable$$.pipe());
|
|
2225
|
+
l(this, "step$");
|
|
2226
|
+
this.component = t, this.timerController = e, this.step$ = this.timerController.step$.pipe(
|
|
2227
|
+
me(() => this.component.enabled)
|
|
2228
|
+
);
|
|
2229
|
+
}
|
|
2230
|
+
};
|
|
2231
|
+
Ne = Zi([
|
|
2232
|
+
D(),
|
|
2233
|
+
$t(0, w(k)),
|
|
2234
|
+
$t(1, w(Q))
|
|
2235
|
+
], Ne);
|
|
2236
|
+
var Fi = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, Wi = (t, e, n, r) => {
|
|
2237
|
+
for (var i = r > 1 ? void 0 : r ? Gi(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2238
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2239
|
+
return r && i && Fi(e, n, i), i;
|
|
2240
|
+
}, Te = (t, e) => (n, r) => e(n, r, t);
|
|
2241
|
+
let He = class {
|
|
2242
|
+
constructor(t, e, n) {
|
|
2243
|
+
this.component = t, this.sizesComponent = e, this.controller = n;
|
|
2244
|
+
}
|
|
2245
|
+
init(t) {
|
|
2246
|
+
this.component.initDefaultCamera(), t && this.component.setMiniCamera(), this.controller.enable$.subscribe((e) => {
|
|
2247
|
+
this.component.enabled = !!e;
|
|
2248
|
+
}), this.controller.step$.subscribe(() => {
|
|
2249
|
+
var e, n;
|
|
2250
|
+
this.component.enabled && (this.component.aspectRatio = this.sizesComponent.aspect, (this.component.instance instanceof K || this.component.instance instanceof pe) && ((e = this.component.instance) == null || e.updateProjectionMatrix()), (n = this.component.miniCamera) == null || n.updateProjectionMatrix());
|
|
2251
|
+
});
|
|
2252
|
+
}
|
|
2253
|
+
dispose() {
|
|
2254
|
+
this.component.removeCamera(), this.component.removeMiniCamera();
|
|
2255
|
+
}
|
|
2256
|
+
aspectRatio(t) {
|
|
2257
|
+
return t && (this.component.aspectRatio = t), this.component.aspectRatio;
|
|
2258
|
+
}
|
|
2259
|
+
enabled(t) {
|
|
2260
|
+
return typeof t == "boolean" && this.controller.enable$$.next(t), this.component.enabled;
|
|
2261
|
+
}
|
|
2262
|
+
instance(t) {
|
|
2263
|
+
return t && (this.component.instance = t), this.component.instance;
|
|
2264
|
+
}
|
|
2265
|
+
miniCamera(t) {
|
|
2266
|
+
return t && (this.component.miniCamera = t), this.component.miniCamera;
|
|
2267
|
+
}
|
|
2268
|
+
position(t) {
|
|
2269
|
+
return t && (this.component.position = t), this.component.position;
|
|
2270
|
+
}
|
|
2271
|
+
quaternion(t) {
|
|
2272
|
+
return t && (this.component.quaternion = t), this.component.quaternion;
|
|
2273
|
+
}
|
|
2274
|
+
enabled$() {
|
|
2275
|
+
return this.controller.enable$;
|
|
2276
|
+
}
|
|
2277
|
+
};
|
|
2278
|
+
He = Wi([
|
|
2279
|
+
D(),
|
|
2280
|
+
Te(0, w(k)),
|
|
2281
|
+
Te(1, w(F)),
|
|
2282
|
+
Te(2, w(Ne))
|
|
2283
|
+
], He);
|
|
2284
|
+
var Vi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, Ki = (t, e, n, r) => {
|
|
2285
|
+
for (var i = r > 1 ? void 0 : r ? Xi(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2286
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2287
|
+
return r && i && Vi(e, n, i), i;
|
|
2288
|
+
}, Et = (t, e) => (n, r) => e(n, r, t);
|
|
2289
|
+
let be = class {
|
|
2290
|
+
constructor(t, e) {
|
|
2291
|
+
l(this, "enable$$", new U());
|
|
2292
|
+
l(this, "enable$", this.enable$$.pipe());
|
|
2293
|
+
l(this, "resize$");
|
|
2294
|
+
this.appController = t, this.component = e, this.resize$ = this.appController.resize$$.pipe(
|
|
2295
|
+
me(() => this.component.enabled)
|
|
2296
|
+
);
|
|
2297
|
+
}
|
|
2298
|
+
};
|
|
2299
|
+
be = Ki([
|
|
2300
|
+
D(),
|
|
2301
|
+
Et(0, w(re)),
|
|
2302
|
+
Et(1, w(F))
|
|
2303
|
+
], be);
|
|
2304
|
+
var qi = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, ki = (t, e, n, r) => {
|
|
2305
|
+
for (var i = r > 1 ? void 0 : r ? Bi(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2306
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2307
|
+
return r && i && qi(e, n, i), i;
|
|
2308
|
+
}, Re = (t, e) => (n, r) => e(n, r, t);
|
|
2309
|
+
let Le = class {
|
|
2310
|
+
constructor(t, e, n) {
|
|
2311
|
+
l(this, "enable$$", new U());
|
|
2312
|
+
l(this, "enable$", this.enable$$.pipe());
|
|
2313
|
+
l(this, "step$");
|
|
2314
|
+
l(this, "resize$");
|
|
2315
|
+
this.rendererComponent = t, this.timerController = e, this.sizesController = n, this.step$ = this.timerController.step$.pipe(
|
|
2316
|
+
me(() => this.rendererComponent.enabled)
|
|
2317
|
+
), this.resize$ = this.sizesController.resize$.pipe(
|
|
2318
|
+
me(() => this.rendererComponent.enabled)
|
|
2319
|
+
);
|
|
2320
|
+
}
|
|
2321
|
+
};
|
|
2322
|
+
Le = ki([
|
|
2323
|
+
D(),
|
|
2324
|
+
Re(0, w(G)),
|
|
2325
|
+
Re(1, w(Q)),
|
|
2326
|
+
Re(2, w(be))
|
|
2327
|
+
], Le);
|
|
2328
|
+
var Qi = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, er = (t, e, n, r) => {
|
|
2329
|
+
for (var i = r > 1 ? void 0 : r ? Ji(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2330
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2331
|
+
return r && i && Qi(e, n, i), i;
|
|
2332
|
+
}, Mt = (t, e) => (n, r) => e(n, r, t);
|
|
2333
|
+
let Ue = class {
|
|
2334
|
+
constructor(t, e) {
|
|
2335
|
+
this.component = t, this.controller = e;
|
|
2336
|
+
}
|
|
2337
|
+
init(t) {
|
|
2338
|
+
this.controller.enable$.subscribe((e) => {
|
|
2339
|
+
this.component.enabled = !!e;
|
|
2340
|
+
}), this.controller.step$.subscribe(() => this.component.render()), this.controller.resize$.subscribe(
|
|
2341
|
+
(e) => this.component.setSize(e.windowWidth, e.windowHeight)
|
|
2342
|
+
), this.component.init(t);
|
|
2343
|
+
}
|
|
2344
|
+
dispose() {
|
|
2345
|
+
this.controller.enable$$.unsubscribe();
|
|
2346
|
+
}
|
|
2347
|
+
enabled(t) {
|
|
2348
|
+
return typeof t == "boolean" && this.controller.enable$$.next(t), this.component.enabled;
|
|
2349
|
+
}
|
|
2350
|
+
instance() {
|
|
2351
|
+
return this.component.instance;
|
|
2352
|
+
}
|
|
2353
|
+
setSize(t) {
|
|
2354
|
+
return this.component.setSize(t.x, t.y);
|
|
2355
|
+
}
|
|
2356
|
+
render() {
|
|
2357
|
+
return this.component.render();
|
|
2358
|
+
}
|
|
2359
|
+
enabled$() {
|
|
2360
|
+
return this.controller.enable$;
|
|
2361
|
+
}
|
|
2362
|
+
};
|
|
2363
|
+
Ue = er([
|
|
2364
|
+
D(),
|
|
2365
|
+
Mt(0, w(G)),
|
|
2366
|
+
Mt(1, w(Le))
|
|
2367
|
+
], Ue);
|
|
2368
|
+
var tr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, ir = (t, e, n, r) => {
|
|
2369
|
+
for (var i = r > 1 ? void 0 : r ? nr(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2370
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2371
|
+
return r && i && tr(e, n, i), i;
|
|
2372
|
+
}, Dt = (t, e) => (n, r) => e(n, r, t);
|
|
2373
|
+
let Ye = class {
|
|
2374
|
+
constructor(t, e) {
|
|
2375
|
+
this.component = t, this.controller = e;
|
|
2376
|
+
}
|
|
2377
|
+
init(t) {
|
|
2378
|
+
this.controller.enable$.subscribe((e) => {
|
|
2379
|
+
this.component.enabled = !!e;
|
|
2380
|
+
}), this.controller.resize$.subscribe((e) => {
|
|
2381
|
+
this.component.width = e.windowWidth, this.component.height = e.windowHeight, this.component.aspect = e.windowWidth / e.windowHeight;
|
|
2382
|
+
}), this.component.init(t);
|
|
2383
|
+
}
|
|
2384
|
+
dispose() {
|
|
2385
|
+
}
|
|
2386
|
+
aspect(t) {
|
|
2387
|
+
return typeof t == "number" && (this.component.aspect = t), this.component.aspect;
|
|
2388
|
+
}
|
|
2389
|
+
enabled(t) {
|
|
2390
|
+
return typeof t == "boolean" && this.controller.enable$$.next(t), this.component.enabled;
|
|
2391
|
+
}
|
|
2392
|
+
frustrum(t) {
|
|
2393
|
+
return typeof t == "number" && (this.component.frustrum = t), this.component.frustrum;
|
|
2394
|
+
}
|
|
2395
|
+
height(t) {
|
|
2396
|
+
return typeof t == "number" && (this.component.height = t), this.component.height;
|
|
2397
|
+
}
|
|
2398
|
+
pixelRatio(t) {
|
|
2399
|
+
return typeof t == "number" && (this.component.pixelRatio = t), this.component.pixelRatio;
|
|
2400
|
+
}
|
|
2401
|
+
width(t) {
|
|
2402
|
+
return typeof t == "number" && (this.component.width = t), this.component.width;
|
|
2403
|
+
}
|
|
2404
|
+
enabled$() {
|
|
2405
|
+
return this.controller.enable$;
|
|
2406
|
+
}
|
|
2407
|
+
resize$() {
|
|
2408
|
+
return this.controller.resize$;
|
|
2409
|
+
}
|
|
2410
|
+
};
|
|
2411
|
+
Ye = ir([
|
|
2412
|
+
D(),
|
|
2413
|
+
Dt(0, w(F)),
|
|
2414
|
+
Dt(1, w(be))
|
|
2415
|
+
], Ye);
|
|
2416
|
+
var rr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, or = (t, e, n, r) => {
|
|
2417
|
+
for (var i = r > 1 ? void 0 : r ? sr(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2418
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2419
|
+
return r && i && rr(e, n, i), i;
|
|
2420
|
+
};
|
|
2421
|
+
let Ze = class {
|
|
2422
|
+
constructor() {
|
|
2423
|
+
l(this, "enable$$", new U());
|
|
2424
|
+
l(this, "enable$", this.enable$$.pipe());
|
|
2425
|
+
}
|
|
2426
|
+
};
|
|
2427
|
+
Ze = or([
|
|
2428
|
+
D()
|
|
2429
|
+
], Ze);
|
|
2430
|
+
var ar = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, lr = (t, e, n, r) => {
|
|
2431
|
+
for (var i = r > 1 ? void 0 : r ? hr(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2432
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2433
|
+
return r && i && ar(e, n, i), i;
|
|
2434
|
+
}, Tt = (t, e) => (n, r) => e(n, r, t);
|
|
2435
|
+
let Fe = class {
|
|
2436
|
+
constructor(t, e) {
|
|
2437
|
+
this.component = t, this.controller = e;
|
|
2438
|
+
}
|
|
2439
|
+
init() {
|
|
2440
|
+
this.controller.enable$.subscribe((t) => {
|
|
2441
|
+
this.component.enabled = !!t;
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
dispose() {
|
|
2445
|
+
}
|
|
2446
|
+
scene(t) {
|
|
2447
|
+
return t instanceof St && (this.component.scene = t), this.component.scene;
|
|
2448
|
+
}
|
|
2449
|
+
enabled(t) {
|
|
2450
|
+
return typeof t == "boolean" && this.controller.enable$$.next(t), this.component.enabled;
|
|
2451
|
+
}
|
|
2452
|
+
get enable$() {
|
|
2453
|
+
return this.controller.enable$;
|
|
2454
|
+
}
|
|
2455
|
+
};
|
|
2456
|
+
Fe = lr([
|
|
2457
|
+
D(),
|
|
2458
|
+
Tt(0, w(se)),
|
|
2459
|
+
Tt(1, w(Ze))
|
|
2460
|
+
], Fe);
|
|
2461
|
+
var cr = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, pr = (t, e, n, r) => {
|
|
2462
|
+
for (var i = r > 1 ? void 0 : r ? ur(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2463
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2464
|
+
return r && i && cr(e, n, i), i;
|
|
2465
|
+
}, fr = (t, e) => (n, r) => e(n, r, t);
|
|
2466
|
+
let Ge = class {
|
|
2467
|
+
constructor(t) {
|
|
2468
|
+
l(this, "enable$$", new U());
|
|
2469
|
+
l(this, "enable$", this.enable$$.pipe());
|
|
2470
|
+
l(this, "step$");
|
|
2471
|
+
this.timerController = t, this.step$ = this.timerController.step$;
|
|
2472
|
+
}
|
|
2473
|
+
};
|
|
2474
|
+
Ge = pr([
|
|
2475
|
+
D(),
|
|
2476
|
+
fr(0, w(Q))
|
|
2477
|
+
], Ge);
|
|
2478
|
+
var dr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, _r = (t, e, n, r) => {
|
|
2479
|
+
for (var i = r > 1 ? void 0 : r ? mr(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2480
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2481
|
+
return r && i && dr(e, n, i), i;
|
|
2482
|
+
}, Rt = (t, e) => (n, r) => e(n, r, t);
|
|
2483
|
+
let We = class {
|
|
2484
|
+
constructor(t, e) {
|
|
2485
|
+
this.component = t, this.controller = e, this.controller.step$.subscribe(() => {
|
|
2486
|
+
this.component.update();
|
|
2487
|
+
});
|
|
2488
|
+
}
|
|
2489
|
+
init(t) {
|
|
2490
|
+
this.component.init(t);
|
|
2491
|
+
}
|
|
2492
|
+
dispose() {
|
|
2493
|
+
this.component.dispose();
|
|
2494
|
+
}
|
|
2495
|
+
axesHelper() {
|
|
2496
|
+
return this.component.axesHelper;
|
|
2497
|
+
}
|
|
2498
|
+
cameraControls() {
|
|
2499
|
+
return this.component.cameraControls;
|
|
2500
|
+
}
|
|
2501
|
+
cameraHelper() {
|
|
2502
|
+
return this.component.cameraHelper;
|
|
2503
|
+
}
|
|
2504
|
+
enabled(t) {
|
|
2505
|
+
return t && (this.component.enabled = t), this.component.enabled;
|
|
2506
|
+
}
|
|
2507
|
+
gridHelper() {
|
|
2508
|
+
return this.component.gridHelper;
|
|
2509
|
+
}
|
|
2510
|
+
miniCameraControls() {
|
|
2511
|
+
return this.component.miniCameraControls;
|
|
2512
|
+
}
|
|
2513
|
+
enabled$() {
|
|
2514
|
+
return this.controller.enable$;
|
|
2515
|
+
}
|
|
2516
|
+
};
|
|
2517
|
+
We = _r([
|
|
2518
|
+
D(),
|
|
2519
|
+
Rt(0, w(ve)),
|
|
2520
|
+
Rt(1, w(Ge))
|
|
2521
|
+
], We);
|
|
2522
|
+
class yr {
|
|
2523
|
+
constructor() {
|
|
2524
|
+
l(this, "contextmenu$");
|
|
2525
|
+
l(this, "resize$");
|
|
2526
|
+
l(this, "mousedown$");
|
|
2527
|
+
l(this, "mousemove$");
|
|
2528
|
+
l(this, "mouseup$");
|
|
2529
|
+
l(this, "pointerdown$");
|
|
2530
|
+
l(this, "pointermove$");
|
|
2531
|
+
l(this, "pointercancel$");
|
|
2532
|
+
l(this, "pointerup$");
|
|
2533
|
+
l(this, "touchstart$");
|
|
2534
|
+
l(this, "touchmove$");
|
|
2535
|
+
l(this, "touchend$");
|
|
2536
|
+
l(this, "wheel$");
|
|
2537
|
+
l(this, "keydown$");
|
|
2538
|
+
l(this, "contextmenu");
|
|
2539
|
+
l(this, "resize");
|
|
2540
|
+
l(this, "mousedown");
|
|
2541
|
+
l(this, "mousemove");
|
|
2542
|
+
l(this, "mouseup");
|
|
2543
|
+
l(this, "pointerdown");
|
|
2544
|
+
l(this, "pointermove");
|
|
2545
|
+
l(this, "pointercancel");
|
|
2546
|
+
l(this, "pointerup");
|
|
2547
|
+
l(this, "touchstart");
|
|
2548
|
+
l(this, "touchmove");
|
|
2549
|
+
l(this, "touchend");
|
|
2550
|
+
l(this, "wheel");
|
|
2551
|
+
l(this, "keydown");
|
|
2552
|
+
}
|
|
2553
|
+
}
|
|
2554
|
+
var vr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, wr = (t, e, n, r) => {
|
|
2555
|
+
for (var i = r > 1 ? void 0 : r ? br(e, n) : e, s = t.length - 1, a; s >= 0; s--)
|
|
2556
|
+
(a = t[s]) && (i = (r ? a(e, n, i) : a(i)) || i);
|
|
2557
|
+
return r && i && vr(e, n, i), i;
|
|
2558
|
+
}, Y = (t, e) => (n, r) => e(n, r, t);
|
|
2559
|
+
let Ve = class extends yr {
|
|
2560
|
+
constructor(t, e, n, r, i, s, a, y) {
|
|
2561
|
+
super(), this.controller = t, this.component = e, this.timer = n, this.sizes = r, this.camera = i, this.world = s, this.renderer = a, this.debug = y, this._initProxyEvents(), typeof (self == null ? void 0 : self.addEventListener) == "function" && self.addEventListener("message", this._onMessage.bind(this));
|
|
2562
|
+
}
|
|
2563
|
+
_initProxyEvents() {
|
|
2564
|
+
zt.forEach((t) => {
|
|
2565
|
+
this[`${t}$`] = () => {
|
|
2566
|
+
var e;
|
|
2567
|
+
return (e = this.controller) == null ? void 0 : e[`${t}$`];
|
|
2568
|
+
}, this[t] = (e) => {
|
|
2569
|
+
var n, r;
|
|
2570
|
+
return (r = (n = this.controller) == null ? void 0 : n[t]) == null ? void 0 : r.call(n, e);
|
|
2571
|
+
};
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
_onMessage(t) {
|
|
2575
|
+
var i, s, a, y;
|
|
2576
|
+
if (!((i = t.data) != null && i.canvas) || this.component.initialized) return;
|
|
2577
|
+
const e = !!((s = t.data) != null && s.startTimer), n = !!((a = t.data) != null && a.withMiniCamera), r = !!((y = t.data) != null && y.fullScreen);
|
|
2578
|
+
this.init({
|
|
2579
|
+
...t.data,
|
|
2580
|
+
startTimer: e,
|
|
2581
|
+
withMiniCamera: n,
|
|
2582
|
+
fullScreen: r
|
|
2583
|
+
});
|
|
2584
|
+
}
|
|
2585
|
+
init(t) {
|
|
2586
|
+
if (!t.canvas || this.component.initialized) return;
|
|
2587
|
+
this.component.initialized = !0, t.canvas.style = {
|
|
2588
|
+
width: t.canvas.width + "",
|
|
2589
|
+
height: t.canvas.height + ""
|
|
2590
|
+
};
|
|
2591
|
+
const e = t.canvas;
|
|
2592
|
+
this.component.canvas = e, this.sizes.init(e), this.camera.init(t.withMiniCamera), this.world.init(), this.renderer.init(e), this.timer.init(t.startTimer), this.debug.init(t), this.controller.lifecycle$$.next(oe.INITIALIZED);
|
|
2593
|
+
}
|
|
2594
|
+
get canvas() {
|
|
2595
|
+
return this.component.canvas;
|
|
2596
|
+
}
|
|
2597
|
+
get initialized() {
|
|
2598
|
+
return this.component.initialized;
|
|
2599
|
+
}
|
|
2600
|
+
isInitialized() {
|
|
2601
|
+
return this.component.initialized;
|
|
2602
|
+
}
|
|
2603
|
+
dispose() {
|
|
2604
|
+
this.sizes.dispose(), this.camera.dispose(), this.world.dispose(), this.renderer.dispose(), this.timer.dispose(), this.debug.dispose(), this.controller.lifecycle$$.next(oe.DISPOSED), this.controller.lifecycle$$.complete(), typeof self < "u" && self.removeEventListener("message", this._onMessage.bind(this));
|
|
2605
|
+
}
|
|
2606
|
+
lifecycle$() {
|
|
2607
|
+
return this.controller.lifecycle$;
|
|
2608
|
+
}
|
|
2609
|
+
};
|
|
2610
|
+
Ve = wr([
|
|
2611
|
+
D(),
|
|
2612
|
+
Y(0, w(re)),
|
|
2613
|
+
Y(1, w(ie)),
|
|
2614
|
+
Y(2, w(ze)),
|
|
2615
|
+
Y(3, w(Ye)),
|
|
2616
|
+
Y(4, w(He)),
|
|
2617
|
+
Y(5, w(Fe)),
|
|
2618
|
+
Y(6, w(Ue)),
|
|
2619
|
+
Y(7, w(We))
|
|
2620
|
+
], Ve);
|
|
2621
|
+
const Mr = It.resolve(Ve);
|
|
2622
|
+
export {
|
|
2623
|
+
oe as A,
|
|
2624
|
+
Ie as D,
|
|
2625
|
+
Er as K,
|
|
2626
|
+
x as L,
|
|
2627
|
+
qn as P,
|
|
2628
|
+
xi as R,
|
|
2629
|
+
It as a,
|
|
2630
|
+
w as b,
|
|
2631
|
+
zt as c,
|
|
2632
|
+
Ve as d,
|
|
2633
|
+
Mr as e,
|
|
2634
|
+
yr as f,
|
|
2635
|
+
Kn as g,
|
|
2636
|
+
Xn as h,
|
|
2637
|
+
Fn as i,
|
|
2638
|
+
$r as j,
|
|
2639
|
+
D as s
|
|
2640
|
+
};
|