@quick-threejs/reactive 0.1.17 → 0.1.19
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/main.d.mts +2 -3
- package/dist/main.d.ts +2 -3
- package/dist/main.js +1312 -628
- package/dist/main.js.map +1 -1
- package/dist/main.mjs +1317 -652
- package/dist/main.mjs.map +1 -1
- package/dist/{main.worker-WTRf-uyZ.d.mts → main.worker-Dms3WqJl.d.mts} +3 -4
- package/dist/{main.worker-WTRf-uyZ.d.ts → main.worker-Dms3WqJl.d.ts} +3 -4
- package/dist/main.worker.d.mts +1 -2
- package/dist/main.worker.d.ts +1 -2
- package/dist/main.worker.js +1064 -460
- package/dist/main.worker.js.map +1 -1
- package/dist/main.worker.mjs +1067 -476
- package/dist/main.worker.mjs.map +1 -1
- package/package.json +4 -7
package/dist/main.mjs
CHANGED
|
@@ -4,7 +4,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
10
|
};
|
|
@@ -24,16 +24,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
28
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
29
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
30
|
-
if (decorator = decorators[i])
|
|
31
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
32
|
-
if (kind && result) __defProp(target, key, result);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
36
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
37
27
|
|
|
38
28
|
// ../../node_modules/.pnpm/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
|
|
39
29
|
var require_Reflect = __commonJS({
|
|
@@ -53,40 +43,51 @@ var require_Reflect = __commonJS({
|
|
|
53
43
|
}
|
|
54
44
|
function makeExporter(target, previous) {
|
|
55
45
|
return function(key, value) {
|
|
56
|
-
Object.defineProperty(target, key, {
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
Object.defineProperty(target, key, {
|
|
47
|
+
configurable: true,
|
|
48
|
+
writable: true,
|
|
49
|
+
value
|
|
50
|
+
});
|
|
51
|
+
if (previous) previous(key, value);
|
|
59
52
|
};
|
|
60
53
|
}
|
|
54
|
+
__name(makeExporter, "makeExporter");
|
|
61
55
|
function functionThis() {
|
|
62
56
|
try {
|
|
63
57
|
return Function("return this;")();
|
|
64
58
|
} catch (_) {
|
|
65
59
|
}
|
|
66
60
|
}
|
|
61
|
+
__name(functionThis, "functionThis");
|
|
67
62
|
function indirectEvalThis() {
|
|
68
63
|
try {
|
|
69
|
-
return (
|
|
64
|
+
return (0, eval)("(function() { return this; })()");
|
|
70
65
|
} catch (_) {
|
|
71
66
|
}
|
|
72
67
|
}
|
|
68
|
+
__name(indirectEvalThis, "indirectEvalThis");
|
|
73
69
|
function sloppyModeThis() {
|
|
74
70
|
return functionThis() || indirectEvalThis();
|
|
75
71
|
}
|
|
72
|
+
__name(sloppyModeThis, "sloppyModeThis");
|
|
76
73
|
})(function(exporter, root) {
|
|
77
74
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
78
75
|
var supportsSymbol = typeof Symbol === "function";
|
|
79
76
|
var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive";
|
|
80
77
|
var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator";
|
|
81
78
|
var supportsCreate = typeof Object.create === "function";
|
|
82
|
-
var supportsProto = {
|
|
79
|
+
var supportsProto = {
|
|
80
|
+
__proto__: []
|
|
81
|
+
} instanceof Array;
|
|
83
82
|
var downLevel = !supportsCreate && !supportsProto;
|
|
84
83
|
var HashMap = {
|
|
85
84
|
// create an object in dictionary mode (a.k.a. "slow" mode in v8)
|
|
86
85
|
create: supportsCreate ? function() {
|
|
87
86
|
return MakeDictionary(/* @__PURE__ */ Object.create(null));
|
|
88
87
|
} : supportsProto ? function() {
|
|
89
|
-
return MakeDictionary({
|
|
88
|
+
return MakeDictionary({
|
|
89
|
+
__proto__: null
|
|
90
|
+
});
|
|
90
91
|
} : function() {
|
|
91
92
|
return MakeDictionary({});
|
|
92
93
|
},
|
|
@@ -110,145 +111,128 @@ var require_Reflect = __commonJS({
|
|
|
110
111
|
var metadataProvider = CreateMetadataProvider(metadataRegistry);
|
|
111
112
|
function decorate(decorators, target, propertyKey, attributes) {
|
|
112
113
|
if (!IsUndefined(propertyKey)) {
|
|
113
|
-
if (!IsArray(decorators))
|
|
114
|
-
|
|
115
|
-
if (!IsObject(
|
|
116
|
-
|
|
117
|
-
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes))
|
|
118
|
-
throw new TypeError();
|
|
119
|
-
if (IsNull(attributes))
|
|
120
|
-
attributes = void 0;
|
|
114
|
+
if (!IsArray(decorators)) throw new TypeError();
|
|
115
|
+
if (!IsObject(target)) throw new TypeError();
|
|
116
|
+
if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes)) throw new TypeError();
|
|
117
|
+
if (IsNull(attributes)) attributes = void 0;
|
|
121
118
|
propertyKey = ToPropertyKey(propertyKey);
|
|
122
119
|
return DecorateProperty(decorators, target, propertyKey, attributes);
|
|
123
120
|
} else {
|
|
124
|
-
if (!IsArray(decorators))
|
|
125
|
-
|
|
126
|
-
if (!IsConstructor(target))
|
|
127
|
-
throw new TypeError();
|
|
121
|
+
if (!IsArray(decorators)) throw new TypeError();
|
|
122
|
+
if (!IsConstructor(target)) throw new TypeError();
|
|
128
123
|
return DecorateConstructor(decorators, target);
|
|
129
124
|
}
|
|
130
125
|
}
|
|
126
|
+
__name(decorate, "decorate");
|
|
131
127
|
exporter("decorate", decorate);
|
|
132
128
|
function metadata(metadataKey, metadataValue) {
|
|
133
129
|
function decorator(target, propertyKey) {
|
|
134
|
-
if (!IsObject(target))
|
|
135
|
-
|
|
136
|
-
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey))
|
|
137
|
-
throw new TypeError();
|
|
130
|
+
if (!IsObject(target)) throw new TypeError();
|
|
131
|
+
if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey)) throw new TypeError();
|
|
138
132
|
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
139
133
|
}
|
|
134
|
+
__name(decorator, "decorator");
|
|
140
135
|
return decorator;
|
|
141
136
|
}
|
|
137
|
+
__name(metadata, "metadata");
|
|
142
138
|
exporter("metadata", metadata);
|
|
143
139
|
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
144
|
-
if (!IsObject(target))
|
|
145
|
-
|
|
146
|
-
if (!IsUndefined(propertyKey))
|
|
147
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
140
|
+
if (!IsObject(target)) throw new TypeError();
|
|
141
|
+
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
148
142
|
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
149
143
|
}
|
|
144
|
+
__name(defineMetadata, "defineMetadata");
|
|
150
145
|
exporter("defineMetadata", defineMetadata);
|
|
151
146
|
function hasMetadata(metadataKey, target, propertyKey) {
|
|
152
|
-
if (!IsObject(target))
|
|
153
|
-
|
|
154
|
-
if (!IsUndefined(propertyKey))
|
|
155
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
147
|
+
if (!IsObject(target)) throw new TypeError();
|
|
148
|
+
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
156
149
|
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
157
150
|
}
|
|
151
|
+
__name(hasMetadata, "hasMetadata");
|
|
158
152
|
exporter("hasMetadata", hasMetadata);
|
|
159
153
|
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
160
|
-
if (!IsObject(target))
|
|
161
|
-
|
|
162
|
-
if (!IsUndefined(propertyKey))
|
|
163
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
154
|
+
if (!IsObject(target)) throw new TypeError();
|
|
155
|
+
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
164
156
|
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
165
157
|
}
|
|
158
|
+
__name(hasOwnMetadata, "hasOwnMetadata");
|
|
166
159
|
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
167
160
|
function getMetadata(metadataKey, target, propertyKey) {
|
|
168
|
-
if (!IsObject(target))
|
|
169
|
-
|
|
170
|
-
if (!IsUndefined(propertyKey))
|
|
171
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
161
|
+
if (!IsObject(target)) throw new TypeError();
|
|
162
|
+
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
172
163
|
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
173
164
|
}
|
|
165
|
+
__name(getMetadata, "getMetadata");
|
|
174
166
|
exporter("getMetadata", getMetadata);
|
|
175
167
|
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
176
|
-
if (!IsObject(target))
|
|
177
|
-
|
|
178
|
-
if (!IsUndefined(propertyKey))
|
|
179
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
168
|
+
if (!IsObject(target)) throw new TypeError();
|
|
169
|
+
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
180
170
|
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
181
171
|
}
|
|
172
|
+
__name(getOwnMetadata, "getOwnMetadata");
|
|
182
173
|
exporter("getOwnMetadata", getOwnMetadata);
|
|
183
174
|
function getMetadataKeys(target, propertyKey) {
|
|
184
|
-
if (!IsObject(target))
|
|
185
|
-
|
|
186
|
-
if (!IsUndefined(propertyKey))
|
|
187
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
175
|
+
if (!IsObject(target)) throw new TypeError();
|
|
176
|
+
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
188
177
|
return OrdinaryMetadataKeys(target, propertyKey);
|
|
189
178
|
}
|
|
179
|
+
__name(getMetadataKeys, "getMetadataKeys");
|
|
190
180
|
exporter("getMetadataKeys", getMetadataKeys);
|
|
191
181
|
function getOwnMetadataKeys(target, propertyKey) {
|
|
192
|
-
if (!IsObject(target))
|
|
193
|
-
|
|
194
|
-
if (!IsUndefined(propertyKey))
|
|
195
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
182
|
+
if (!IsObject(target)) throw new TypeError();
|
|
183
|
+
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
196
184
|
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
197
185
|
}
|
|
186
|
+
__name(getOwnMetadataKeys, "getOwnMetadataKeys");
|
|
198
187
|
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
199
188
|
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
200
|
-
if (!IsObject(target))
|
|
201
|
-
|
|
202
|
-
if (!
|
|
203
|
-
|
|
204
|
-
if (!IsObject(target))
|
|
205
|
-
throw new TypeError();
|
|
206
|
-
if (!IsUndefined(propertyKey))
|
|
207
|
-
propertyKey = ToPropertyKey(propertyKey);
|
|
189
|
+
if (!IsObject(target)) throw new TypeError();
|
|
190
|
+
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
191
|
+
if (!IsObject(target)) throw new TypeError();
|
|
192
|
+
if (!IsUndefined(propertyKey)) propertyKey = ToPropertyKey(propertyKey);
|
|
208
193
|
var provider = GetMetadataProvider(
|
|
209
194
|
target,
|
|
210
195
|
propertyKey,
|
|
211
196
|
/*Create*/
|
|
212
197
|
false
|
|
213
198
|
);
|
|
214
|
-
if (IsUndefined(provider))
|
|
215
|
-
return false;
|
|
199
|
+
if (IsUndefined(provider)) return false;
|
|
216
200
|
return provider.OrdinaryDeleteMetadata(metadataKey, target, propertyKey);
|
|
217
201
|
}
|
|
202
|
+
__name(deleteMetadata, "deleteMetadata");
|
|
218
203
|
exporter("deleteMetadata", deleteMetadata);
|
|
219
204
|
function DecorateConstructor(decorators, target) {
|
|
220
205
|
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
221
206
|
var decorator = decorators[i];
|
|
222
207
|
var decorated = decorator(target);
|
|
223
208
|
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
224
|
-
if (!IsConstructor(decorated))
|
|
225
|
-
throw new TypeError();
|
|
209
|
+
if (!IsConstructor(decorated)) throw new TypeError();
|
|
226
210
|
target = decorated;
|
|
227
211
|
}
|
|
228
212
|
}
|
|
229
213
|
return target;
|
|
230
214
|
}
|
|
215
|
+
__name(DecorateConstructor, "DecorateConstructor");
|
|
231
216
|
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
232
217
|
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
233
218
|
var decorator = decorators[i];
|
|
234
219
|
var decorated = decorator(target, propertyKey, descriptor);
|
|
235
220
|
if (!IsUndefined(decorated) && !IsNull(decorated)) {
|
|
236
|
-
if (!IsObject(decorated))
|
|
237
|
-
throw new TypeError();
|
|
221
|
+
if (!IsObject(decorated)) throw new TypeError();
|
|
238
222
|
descriptor = decorated;
|
|
239
223
|
}
|
|
240
224
|
}
|
|
241
225
|
return descriptor;
|
|
242
226
|
}
|
|
227
|
+
__name(DecorateProperty, "DecorateProperty");
|
|
243
228
|
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
244
229
|
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
245
|
-
if (hasOwn2)
|
|
246
|
-
return true;
|
|
230
|
+
if (hasOwn2) return true;
|
|
247
231
|
var parent = OrdinaryGetPrototypeOf(O);
|
|
248
|
-
if (!IsNull(parent))
|
|
249
|
-
return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
232
|
+
if (!IsNull(parent)) return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
250
233
|
return false;
|
|
251
234
|
}
|
|
235
|
+
__name(OrdinaryHasMetadata, "OrdinaryHasMetadata");
|
|
252
236
|
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
253
237
|
var provider = GetMetadataProvider(
|
|
254
238
|
O,
|
|
@@ -256,19 +240,18 @@ var require_Reflect = __commonJS({
|
|
|
256
240
|
/*Create*/
|
|
257
241
|
false
|
|
258
242
|
);
|
|
259
|
-
if (IsUndefined(provider))
|
|
260
|
-
return false;
|
|
243
|
+
if (IsUndefined(provider)) return false;
|
|
261
244
|
return ToBoolean(provider.OrdinaryHasOwnMetadata(MetadataKey, O, P));
|
|
262
245
|
}
|
|
246
|
+
__name(OrdinaryHasOwnMetadata, "OrdinaryHasOwnMetadata");
|
|
263
247
|
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
264
248
|
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
265
|
-
if (hasOwn2)
|
|
266
|
-
return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
249
|
+
if (hasOwn2) return OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
267
250
|
var parent = OrdinaryGetPrototypeOf(O);
|
|
268
|
-
if (!IsNull(parent))
|
|
269
|
-
return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
251
|
+
if (!IsNull(parent)) return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
270
252
|
return void 0;
|
|
271
253
|
}
|
|
254
|
+
__name(OrdinaryGetMetadata, "OrdinaryGetMetadata");
|
|
272
255
|
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
273
256
|
var provider = GetMetadataProvider(
|
|
274
257
|
O,
|
|
@@ -276,10 +259,10 @@ var require_Reflect = __commonJS({
|
|
|
276
259
|
/*Create*/
|
|
277
260
|
false
|
|
278
261
|
);
|
|
279
|
-
if (IsUndefined(provider))
|
|
280
|
-
return;
|
|
262
|
+
if (IsUndefined(provider)) return;
|
|
281
263
|
return provider.OrdinaryGetOwnMetadata(MetadataKey, O, P);
|
|
282
264
|
}
|
|
265
|
+
__name(OrdinaryGetOwnMetadata, "OrdinaryGetOwnMetadata");
|
|
283
266
|
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
284
267
|
var provider = GetMetadataProvider(
|
|
285
268
|
O,
|
|
@@ -289,16 +272,14 @@ var require_Reflect = __commonJS({
|
|
|
289
272
|
);
|
|
290
273
|
provider.OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P);
|
|
291
274
|
}
|
|
275
|
+
__name(OrdinaryDefineOwnMetadata, "OrdinaryDefineOwnMetadata");
|
|
292
276
|
function OrdinaryMetadataKeys(O, P) {
|
|
293
277
|
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
294
278
|
var parent = OrdinaryGetPrototypeOf(O);
|
|
295
|
-
if (parent === null)
|
|
296
|
-
return ownKeys;
|
|
279
|
+
if (parent === null) return ownKeys;
|
|
297
280
|
var parentKeys = OrdinaryMetadataKeys(parent, P);
|
|
298
|
-
if (parentKeys.length <= 0)
|
|
299
|
-
|
|
300
|
-
if (ownKeys.length <= 0)
|
|
301
|
-
return parentKeys;
|
|
281
|
+
if (parentKeys.length <= 0) return ownKeys;
|
|
282
|
+
if (ownKeys.length <= 0) return parentKeys;
|
|
302
283
|
var set = new _Set();
|
|
303
284
|
var keys = [];
|
|
304
285
|
for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) {
|
|
@@ -319,6 +300,7 @@ var require_Reflect = __commonJS({
|
|
|
319
300
|
}
|
|
320
301
|
return keys;
|
|
321
302
|
}
|
|
303
|
+
__name(OrdinaryMetadataKeys, "OrdinaryMetadataKeys");
|
|
322
304
|
function OrdinaryOwnMetadataKeys(O, P) {
|
|
323
305
|
var provider = GetMetadataProvider(
|
|
324
306
|
O,
|
|
@@ -331,9 +313,9 @@ var require_Reflect = __commonJS({
|
|
|
331
313
|
}
|
|
332
314
|
return provider.OrdinaryOwnMetadataKeys(O, P);
|
|
333
315
|
}
|
|
316
|
+
__name(OrdinaryOwnMetadataKeys, "OrdinaryOwnMetadataKeys");
|
|
334
317
|
function Type(x) {
|
|
335
|
-
if (x === null)
|
|
336
|
-
return 1;
|
|
318
|
+
if (x === null) return 1;
|
|
337
319
|
switch (typeof x) {
|
|
338
320
|
case "undefined":
|
|
339
321
|
return 0;
|
|
@@ -351,18 +333,23 @@ var require_Reflect = __commonJS({
|
|
|
351
333
|
return 6;
|
|
352
334
|
}
|
|
353
335
|
}
|
|
336
|
+
__name(Type, "Type");
|
|
354
337
|
function IsUndefined(x) {
|
|
355
338
|
return x === void 0;
|
|
356
339
|
}
|
|
340
|
+
__name(IsUndefined, "IsUndefined");
|
|
357
341
|
function IsNull(x) {
|
|
358
342
|
return x === null;
|
|
359
343
|
}
|
|
344
|
+
__name(IsNull, "IsNull");
|
|
360
345
|
function IsSymbol(x) {
|
|
361
346
|
return typeof x === "symbol";
|
|
362
347
|
}
|
|
348
|
+
__name(IsSymbol, "IsSymbol");
|
|
363
349
|
function IsObject(x) {
|
|
364
350
|
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
365
351
|
}
|
|
352
|
+
__name(IsObject, "IsObject");
|
|
366
353
|
function ToPrimitive(input, PreferredType) {
|
|
367
354
|
switch (Type(input)) {
|
|
368
355
|
case 0:
|
|
@@ -382,67 +369,69 @@ var require_Reflect = __commonJS({
|
|
|
382
369
|
var exoticToPrim = GetMethod(input, toPrimitiveSymbol);
|
|
383
370
|
if (exoticToPrim !== void 0) {
|
|
384
371
|
var result = exoticToPrim.call(input, hint);
|
|
385
|
-
if (IsObject(result))
|
|
386
|
-
throw new TypeError();
|
|
372
|
+
if (IsObject(result)) throw new TypeError();
|
|
387
373
|
return result;
|
|
388
374
|
}
|
|
389
375
|
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
390
376
|
}
|
|
377
|
+
__name(ToPrimitive, "ToPrimitive");
|
|
391
378
|
function OrdinaryToPrimitive(O, hint) {
|
|
392
379
|
if (hint === "string") {
|
|
393
380
|
var toString_1 = O.toString;
|
|
394
381
|
if (IsCallable(toString_1)) {
|
|
395
382
|
var result = toString_1.call(O);
|
|
396
|
-
if (!IsObject(result))
|
|
397
|
-
return result;
|
|
383
|
+
if (!IsObject(result)) return result;
|
|
398
384
|
}
|
|
399
385
|
var valueOf = O.valueOf;
|
|
400
386
|
if (IsCallable(valueOf)) {
|
|
401
387
|
var result = valueOf.call(O);
|
|
402
|
-
if (!IsObject(result))
|
|
403
|
-
return result;
|
|
388
|
+
if (!IsObject(result)) return result;
|
|
404
389
|
}
|
|
405
390
|
} else {
|
|
406
391
|
var valueOf = O.valueOf;
|
|
407
392
|
if (IsCallable(valueOf)) {
|
|
408
393
|
var result = valueOf.call(O);
|
|
409
|
-
if (!IsObject(result))
|
|
410
|
-
return result;
|
|
394
|
+
if (!IsObject(result)) return result;
|
|
411
395
|
}
|
|
412
396
|
var toString_2 = O.toString;
|
|
413
397
|
if (IsCallable(toString_2)) {
|
|
414
398
|
var result = toString_2.call(O);
|
|
415
|
-
if (!IsObject(result))
|
|
416
|
-
return result;
|
|
399
|
+
if (!IsObject(result)) return result;
|
|
417
400
|
}
|
|
418
401
|
}
|
|
419
402
|
throw new TypeError();
|
|
420
403
|
}
|
|
404
|
+
__name(OrdinaryToPrimitive, "OrdinaryToPrimitive");
|
|
421
405
|
function ToBoolean(argument) {
|
|
422
406
|
return !!argument;
|
|
423
407
|
}
|
|
408
|
+
__name(ToBoolean, "ToBoolean");
|
|
424
409
|
function ToString(argument) {
|
|
425
410
|
return "" + argument;
|
|
426
411
|
}
|
|
412
|
+
__name(ToString, "ToString");
|
|
427
413
|
function ToPropertyKey(argument) {
|
|
428
414
|
var key = ToPrimitive(
|
|
429
415
|
argument,
|
|
430
416
|
3
|
|
431
417
|
/* String */
|
|
432
418
|
);
|
|
433
|
-
if (IsSymbol(key))
|
|
434
|
-
return key;
|
|
419
|
+
if (IsSymbol(key)) return key;
|
|
435
420
|
return ToString(key);
|
|
436
421
|
}
|
|
422
|
+
__name(ToPropertyKey, "ToPropertyKey");
|
|
437
423
|
function IsArray(argument) {
|
|
438
424
|
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
|
|
439
425
|
}
|
|
426
|
+
__name(IsArray, "IsArray");
|
|
440
427
|
function IsCallable(argument) {
|
|
441
428
|
return typeof argument === "function";
|
|
442
429
|
}
|
|
430
|
+
__name(IsCallable, "IsCallable");
|
|
443
431
|
function IsConstructor(argument) {
|
|
444
432
|
return typeof argument === "function";
|
|
445
433
|
}
|
|
434
|
+
__name(IsConstructor, "IsConstructor");
|
|
446
435
|
function IsPropertyKey(argument) {
|
|
447
436
|
switch (Type(argument)) {
|
|
448
437
|
case 3:
|
|
@@ -453,55 +442,53 @@ var require_Reflect = __commonJS({
|
|
|
453
442
|
return false;
|
|
454
443
|
}
|
|
455
444
|
}
|
|
445
|
+
__name(IsPropertyKey, "IsPropertyKey");
|
|
456
446
|
function SameValueZero(x, y) {
|
|
457
447
|
return x === y || x !== x && y !== y;
|
|
458
448
|
}
|
|
449
|
+
__name(SameValueZero, "SameValueZero");
|
|
459
450
|
function GetMethod(V, P) {
|
|
460
451
|
var func = V[P];
|
|
461
|
-
if (func === void 0 || func === null)
|
|
462
|
-
|
|
463
|
-
if (!IsCallable(func))
|
|
464
|
-
throw new TypeError();
|
|
452
|
+
if (func === void 0 || func === null) return void 0;
|
|
453
|
+
if (!IsCallable(func)) throw new TypeError();
|
|
465
454
|
return func;
|
|
466
455
|
}
|
|
456
|
+
__name(GetMethod, "GetMethod");
|
|
467
457
|
function GetIterator(obj) {
|
|
468
458
|
var method = GetMethod(obj, iteratorSymbol);
|
|
469
|
-
if (!IsCallable(method))
|
|
470
|
-
throw new TypeError();
|
|
459
|
+
if (!IsCallable(method)) throw new TypeError();
|
|
471
460
|
var iterator = method.call(obj);
|
|
472
|
-
if (!IsObject(iterator))
|
|
473
|
-
throw new TypeError();
|
|
461
|
+
if (!IsObject(iterator)) throw new TypeError();
|
|
474
462
|
return iterator;
|
|
475
463
|
}
|
|
464
|
+
__name(GetIterator, "GetIterator");
|
|
476
465
|
function IteratorValue(iterResult) {
|
|
477
466
|
return iterResult.value;
|
|
478
467
|
}
|
|
468
|
+
__name(IteratorValue, "IteratorValue");
|
|
479
469
|
function IteratorStep(iterator) {
|
|
480
470
|
var result = iterator.next();
|
|
481
471
|
return result.done ? false : result;
|
|
482
472
|
}
|
|
473
|
+
__name(IteratorStep, "IteratorStep");
|
|
483
474
|
function IteratorClose(iterator) {
|
|
484
475
|
var f = iterator["return"];
|
|
485
|
-
if (f)
|
|
486
|
-
f.call(iterator);
|
|
476
|
+
if (f) f.call(iterator);
|
|
487
477
|
}
|
|
478
|
+
__name(IteratorClose, "IteratorClose");
|
|
488
479
|
function OrdinaryGetPrototypeOf(O) {
|
|
489
480
|
var proto = Object.getPrototypeOf(O);
|
|
490
|
-
if (typeof O !== "function" || O === functionPrototype)
|
|
491
|
-
|
|
492
|
-
if (proto !== functionPrototype)
|
|
493
|
-
return proto;
|
|
481
|
+
if (typeof O !== "function" || O === functionPrototype) return proto;
|
|
482
|
+
if (proto !== functionPrototype) return proto;
|
|
494
483
|
var prototype = O.prototype;
|
|
495
484
|
var prototypeProto = prototype && Object.getPrototypeOf(prototype);
|
|
496
|
-
if (prototypeProto == null || prototypeProto === Object.prototype)
|
|
497
|
-
return proto;
|
|
485
|
+
if (prototypeProto == null || prototypeProto === Object.prototype) return proto;
|
|
498
486
|
var constructor = prototypeProto.constructor;
|
|
499
|
-
if (typeof constructor !== "function")
|
|
500
|
-
|
|
501
|
-
if (constructor === O)
|
|
502
|
-
return proto;
|
|
487
|
+
if (typeof constructor !== "function") return proto;
|
|
488
|
+
if (constructor === O) return proto;
|
|
503
489
|
return constructor;
|
|
504
490
|
}
|
|
491
|
+
__name(OrdinaryGetPrototypeOf, "OrdinaryGetPrototypeOf");
|
|
505
492
|
function CreateMetadataRegistry() {
|
|
506
493
|
var fallback;
|
|
507
494
|
if (!IsUndefined(registrySymbol) && typeof root.Reflect !== "undefined" && !(registrySymbol in root.Reflect) && typeof root.Reflect.defineMetadata === "function") {
|
|
@@ -535,19 +522,17 @@ var require_Reflect = __commonJS({
|
|
|
535
522
|
case second === provider:
|
|
536
523
|
break;
|
|
537
524
|
default:
|
|
538
|
-
if (rest === void 0)
|
|
539
|
-
rest = new _Set();
|
|
525
|
+
if (rest === void 0) rest = new _Set();
|
|
540
526
|
rest.add(provider);
|
|
541
527
|
break;
|
|
542
528
|
}
|
|
543
529
|
}
|
|
530
|
+
__name(registerProvider, "registerProvider");
|
|
544
531
|
function getProviderNoCache(O, P) {
|
|
545
532
|
if (!IsUndefined(first)) {
|
|
546
|
-
if (first.isProviderFor(O, P))
|
|
547
|
-
return first;
|
|
533
|
+
if (first.isProviderFor(O, P)) return first;
|
|
548
534
|
if (!IsUndefined(second)) {
|
|
549
|
-
if (second.isProviderFor(O, P))
|
|
550
|
-
return first;
|
|
535
|
+
if (second.isProviderFor(O, P)) return first;
|
|
551
536
|
if (!IsUndefined(rest)) {
|
|
552
537
|
var iterator = GetIterator(rest);
|
|
553
538
|
while (true) {
|
|
@@ -569,6 +554,7 @@ var require_Reflect = __commonJS({
|
|
|
569
554
|
}
|
|
570
555
|
return void 0;
|
|
571
556
|
}
|
|
557
|
+
__name(getProviderNoCache, "getProviderNoCache");
|
|
572
558
|
function getProvider(O, P) {
|
|
573
559
|
var providerMap = targetProviderMap.get(O);
|
|
574
560
|
var provider;
|
|
@@ -588,11 +574,12 @@ var require_Reflect = __commonJS({
|
|
|
588
574
|
}
|
|
589
575
|
return provider;
|
|
590
576
|
}
|
|
577
|
+
__name(getProvider, "getProvider");
|
|
591
578
|
function hasProvider(provider) {
|
|
592
|
-
if (IsUndefined(provider))
|
|
593
|
-
throw new TypeError();
|
|
579
|
+
if (IsUndefined(provider)) throw new TypeError();
|
|
594
580
|
return first === provider || second === provider || !IsUndefined(rest) && rest.has(provider);
|
|
595
581
|
}
|
|
582
|
+
__name(hasProvider, "hasProvider");
|
|
596
583
|
function setProvider(O, P, provider) {
|
|
597
584
|
if (!hasProvider(provider)) {
|
|
598
585
|
throw new Error("Metadata provider not registered.");
|
|
@@ -611,7 +598,9 @@ var require_Reflect = __commonJS({
|
|
|
611
598
|
}
|
|
612
599
|
return true;
|
|
613
600
|
}
|
|
601
|
+
__name(setProvider, "setProvider");
|
|
614
602
|
}
|
|
603
|
+
__name(CreateMetadataRegistry, "CreateMetadataRegistry");
|
|
615
604
|
function GetOrCreateMetadataRegistry() {
|
|
616
605
|
var metadataRegistry2;
|
|
617
606
|
if (!IsUndefined(registrySymbol) && IsObject(root.Reflect) && Object.isExtensible(root.Reflect)) {
|
|
@@ -630,15 +619,15 @@ var require_Reflect = __commonJS({
|
|
|
630
619
|
}
|
|
631
620
|
return metadataRegistry2;
|
|
632
621
|
}
|
|
622
|
+
__name(GetOrCreateMetadataRegistry, "GetOrCreateMetadataRegistry");
|
|
633
623
|
function CreateMetadataProvider(registry) {
|
|
634
624
|
var metadata2 = new _WeakMap();
|
|
635
625
|
var provider = {
|
|
636
|
-
isProviderFor: function(O, P) {
|
|
626
|
+
isProviderFor: /* @__PURE__ */ __name(function(O, P) {
|
|
637
627
|
var targetMetadata = metadata2.get(O);
|
|
638
|
-
if (IsUndefined(targetMetadata))
|
|
639
|
-
return false;
|
|
628
|
+
if (IsUndefined(targetMetadata)) return false;
|
|
640
629
|
return targetMetadata.has(P);
|
|
641
|
-
},
|
|
630
|
+
}, "isProviderFor"),
|
|
642
631
|
OrdinaryDefineOwnMetadata: OrdinaryDefineOwnMetadata2,
|
|
643
632
|
OrdinaryHasOwnMetadata: OrdinaryHasOwnMetadata2,
|
|
644
633
|
OrdinaryGetOwnMetadata: OrdinaryGetOwnMetadata2,
|
|
@@ -651,16 +640,14 @@ var require_Reflect = __commonJS({
|
|
|
651
640
|
var targetMetadata = metadata2.get(O);
|
|
652
641
|
var createdTargetMetadata = false;
|
|
653
642
|
if (IsUndefined(targetMetadata)) {
|
|
654
|
-
if (!Create)
|
|
655
|
-
return void 0;
|
|
643
|
+
if (!Create) return void 0;
|
|
656
644
|
targetMetadata = new _Map();
|
|
657
645
|
metadata2.set(O, targetMetadata);
|
|
658
646
|
createdTargetMetadata = true;
|
|
659
647
|
}
|
|
660
648
|
var metadataMap = targetMetadata.get(P);
|
|
661
649
|
if (IsUndefined(metadataMap)) {
|
|
662
|
-
if (!Create)
|
|
663
|
-
return void 0;
|
|
650
|
+
if (!Create) return void 0;
|
|
664
651
|
metadataMap = new _Map();
|
|
665
652
|
targetMetadata.set(P, metadataMap);
|
|
666
653
|
if (!registry.setProvider(O, P, provider)) {
|
|
@@ -673,6 +660,7 @@ var require_Reflect = __commonJS({
|
|
|
673
660
|
}
|
|
674
661
|
return metadataMap;
|
|
675
662
|
}
|
|
663
|
+
__name(GetOrCreateMetadataMap, "GetOrCreateMetadataMap");
|
|
676
664
|
function OrdinaryHasOwnMetadata2(MetadataKey, O, P) {
|
|
677
665
|
var metadataMap = GetOrCreateMetadataMap(
|
|
678
666
|
O,
|
|
@@ -680,10 +668,10 @@ var require_Reflect = __commonJS({
|
|
|
680
668
|
/*Create*/
|
|
681
669
|
false
|
|
682
670
|
);
|
|
683
|
-
if (IsUndefined(metadataMap))
|
|
684
|
-
return false;
|
|
671
|
+
if (IsUndefined(metadataMap)) return false;
|
|
685
672
|
return ToBoolean(metadataMap.has(MetadataKey));
|
|
686
673
|
}
|
|
674
|
+
__name(OrdinaryHasOwnMetadata2, "OrdinaryHasOwnMetadata");
|
|
687
675
|
function OrdinaryGetOwnMetadata2(MetadataKey, O, P) {
|
|
688
676
|
var metadataMap = GetOrCreateMetadataMap(
|
|
689
677
|
O,
|
|
@@ -691,10 +679,10 @@ var require_Reflect = __commonJS({
|
|
|
691
679
|
/*Create*/
|
|
692
680
|
false
|
|
693
681
|
);
|
|
694
|
-
if (IsUndefined(metadataMap))
|
|
695
|
-
return void 0;
|
|
682
|
+
if (IsUndefined(metadataMap)) return void 0;
|
|
696
683
|
return metadataMap.get(MetadataKey);
|
|
697
684
|
}
|
|
685
|
+
__name(OrdinaryGetOwnMetadata2, "OrdinaryGetOwnMetadata");
|
|
698
686
|
function OrdinaryDefineOwnMetadata2(MetadataKey, MetadataValue, O, P) {
|
|
699
687
|
var metadataMap = GetOrCreateMetadataMap(
|
|
700
688
|
O,
|
|
@@ -704,6 +692,7 @@ var require_Reflect = __commonJS({
|
|
|
704
692
|
);
|
|
705
693
|
metadataMap.set(MetadataKey, MetadataValue);
|
|
706
694
|
}
|
|
695
|
+
__name(OrdinaryDefineOwnMetadata2, "OrdinaryDefineOwnMetadata");
|
|
707
696
|
function OrdinaryOwnMetadataKeys2(O, P) {
|
|
708
697
|
var keys = [];
|
|
709
698
|
var metadataMap = GetOrCreateMetadataMap(
|
|
@@ -712,8 +701,7 @@ var require_Reflect = __commonJS({
|
|
|
712
701
|
/*Create*/
|
|
713
702
|
false
|
|
714
703
|
);
|
|
715
|
-
if (IsUndefined(metadataMap))
|
|
716
|
-
return keys;
|
|
704
|
+
if (IsUndefined(metadataMap)) return keys;
|
|
717
705
|
var keysObj = metadataMap.keys();
|
|
718
706
|
var iterator = GetIterator(keysObj);
|
|
719
707
|
var k = 0;
|
|
@@ -736,6 +724,7 @@ var require_Reflect = __commonJS({
|
|
|
736
724
|
k++;
|
|
737
725
|
}
|
|
738
726
|
}
|
|
727
|
+
__name(OrdinaryOwnMetadataKeys2, "OrdinaryOwnMetadataKeys");
|
|
739
728
|
function OrdinaryDeleteMetadata(MetadataKey, O, P) {
|
|
740
729
|
var metadataMap = GetOrCreateMetadataMap(
|
|
741
730
|
O,
|
|
@@ -743,10 +732,8 @@ var require_Reflect = __commonJS({
|
|
|
743
732
|
/*Create*/
|
|
744
733
|
false
|
|
745
734
|
);
|
|
746
|
-
if (IsUndefined(metadataMap))
|
|
747
|
-
|
|
748
|
-
if (!metadataMap.delete(MetadataKey))
|
|
749
|
-
return false;
|
|
735
|
+
if (IsUndefined(metadataMap)) return false;
|
|
736
|
+
if (!metadataMap.delete(MetadataKey)) return false;
|
|
750
737
|
if (metadataMap.size === 0) {
|
|
751
738
|
var targetMetadata = metadata2.get(O);
|
|
752
739
|
if (!IsUndefined(targetMetadata)) {
|
|
@@ -758,12 +745,14 @@ var require_Reflect = __commonJS({
|
|
|
758
745
|
}
|
|
759
746
|
return true;
|
|
760
747
|
}
|
|
748
|
+
__name(OrdinaryDeleteMetadata, "OrdinaryDeleteMetadata");
|
|
761
749
|
}
|
|
750
|
+
__name(CreateMetadataProvider, "CreateMetadataProvider");
|
|
762
751
|
function CreateFallbackProvider(reflect) {
|
|
763
752
|
var defineMetadata2 = reflect.defineMetadata, hasOwnMetadata2 = reflect.hasOwnMetadata, getOwnMetadata2 = reflect.getOwnMetadata, getOwnMetadataKeys2 = reflect.getOwnMetadataKeys, deleteMetadata2 = reflect.deleteMetadata;
|
|
764
753
|
var metadataOwner = new _WeakMap();
|
|
765
754
|
var provider = {
|
|
766
|
-
isProviderFor: function(O, P) {
|
|
755
|
+
isProviderFor: /* @__PURE__ */ __name(function(O, P) {
|
|
767
756
|
var metadataPropertySet = metadataOwner.get(O);
|
|
768
757
|
if (!IsUndefined(metadataPropertySet) && metadataPropertySet.has(P)) {
|
|
769
758
|
return true;
|
|
@@ -777,7 +766,7 @@ var require_Reflect = __commonJS({
|
|
|
777
766
|
return true;
|
|
778
767
|
}
|
|
779
768
|
return false;
|
|
780
|
-
},
|
|
769
|
+
}, "isProviderFor"),
|
|
781
770
|
OrdinaryDefineOwnMetadata: defineMetadata2,
|
|
782
771
|
OrdinaryHasOwnMetadata: hasOwnMetadata2,
|
|
783
772
|
OrdinaryGetOwnMetadata: getOwnMetadata2,
|
|
@@ -786,6 +775,7 @@ var require_Reflect = __commonJS({
|
|
|
786
775
|
};
|
|
787
776
|
return provider;
|
|
788
777
|
}
|
|
778
|
+
__name(CreateFallbackProvider, "CreateFallbackProvider");
|
|
789
779
|
function GetMetadataProvider(O, P, Create) {
|
|
790
780
|
var registeredProvider = metadataRegistry.getProvider(O, P);
|
|
791
781
|
if (!IsUndefined(registeredProvider)) {
|
|
@@ -799,6 +789,7 @@ var require_Reflect = __commonJS({
|
|
|
799
789
|
}
|
|
800
790
|
return void 0;
|
|
801
791
|
}
|
|
792
|
+
__name(GetMetadataProvider, "GetMetadataProvider");
|
|
802
793
|
function CreateMapPolyfill() {
|
|
803
794
|
var cacheSentinel = {};
|
|
804
795
|
var arraySentinel = [];
|
|
@@ -811,6 +802,7 @@ var require_Reflect = __commonJS({
|
|
|
811
802
|
this._values = values;
|
|
812
803
|
this._selector = selector;
|
|
813
804
|
}
|
|
805
|
+
__name(MapIterator2, "MapIterator");
|
|
814
806
|
MapIterator2.prototype["@@iterator"] = function() {
|
|
815
807
|
return this;
|
|
816
808
|
};
|
|
@@ -828,9 +820,15 @@ var require_Reflect = __commonJS({
|
|
|
828
820
|
} else {
|
|
829
821
|
this._index++;
|
|
830
822
|
}
|
|
831
|
-
return {
|
|
823
|
+
return {
|
|
824
|
+
value: result,
|
|
825
|
+
done: false
|
|
826
|
+
};
|
|
832
827
|
}
|
|
833
|
-
return {
|
|
828
|
+
return {
|
|
829
|
+
value: void 0,
|
|
830
|
+
done: true
|
|
831
|
+
};
|
|
834
832
|
};
|
|
835
833
|
MapIterator2.prototype.throw = function(error) {
|
|
836
834
|
if (this._index >= 0) {
|
|
@@ -846,35 +844,39 @@ var require_Reflect = __commonJS({
|
|
|
846
844
|
this._keys = arraySentinel;
|
|
847
845
|
this._values = arraySentinel;
|
|
848
846
|
}
|
|
849
|
-
return {
|
|
847
|
+
return {
|
|
848
|
+
value,
|
|
849
|
+
done: true
|
|
850
|
+
};
|
|
850
851
|
};
|
|
851
852
|
return MapIterator2;
|
|
852
853
|
}()
|
|
853
854
|
);
|
|
854
|
-
var
|
|
855
|
+
var Map1 = (
|
|
855
856
|
/** @class */
|
|
856
857
|
function() {
|
|
857
|
-
function
|
|
858
|
+
function Map12() {
|
|
858
859
|
this._keys = [];
|
|
859
860
|
this._values = [];
|
|
860
861
|
this._cacheKey = cacheSentinel;
|
|
861
862
|
this._cacheIndex = -2;
|
|
862
863
|
}
|
|
863
|
-
|
|
864
|
-
|
|
864
|
+
__name(Map12, "Map1");
|
|
865
|
+
Object.defineProperty(Map12.prototype, "size", {
|
|
866
|
+
get: /* @__PURE__ */ __name(function() {
|
|
865
867
|
return this._keys.length;
|
|
866
|
-
},
|
|
868
|
+
}, "get"),
|
|
867
869
|
enumerable: true,
|
|
868
870
|
configurable: true
|
|
869
871
|
});
|
|
870
|
-
|
|
872
|
+
Map12.prototype.has = function(key) {
|
|
871
873
|
return this._find(
|
|
872
874
|
key,
|
|
873
875
|
/*insert*/
|
|
874
876
|
false
|
|
875
877
|
) >= 0;
|
|
876
878
|
};
|
|
877
|
-
|
|
879
|
+
Map12.prototype.get = function(key) {
|
|
878
880
|
var index = this._find(
|
|
879
881
|
key,
|
|
880
882
|
/*insert*/
|
|
@@ -882,7 +884,7 @@ var require_Reflect = __commonJS({
|
|
|
882
884
|
);
|
|
883
885
|
return index >= 0 ? this._values[index] : void 0;
|
|
884
886
|
};
|
|
885
|
-
|
|
887
|
+
Map12.prototype.set = function(key, value) {
|
|
886
888
|
var index = this._find(
|
|
887
889
|
key,
|
|
888
890
|
/*insert*/
|
|
@@ -891,7 +893,7 @@ var require_Reflect = __commonJS({
|
|
|
891
893
|
this._values[index] = value;
|
|
892
894
|
return this;
|
|
893
895
|
};
|
|
894
|
-
|
|
896
|
+
Map12.prototype.delete = function(key) {
|
|
895
897
|
var index = this._find(
|
|
896
898
|
key,
|
|
897
899
|
/*insert*/
|
|
@@ -913,28 +915,28 @@ var require_Reflect = __commonJS({
|
|
|
913
915
|
}
|
|
914
916
|
return false;
|
|
915
917
|
};
|
|
916
|
-
|
|
918
|
+
Map12.prototype.clear = function() {
|
|
917
919
|
this._keys.length = 0;
|
|
918
920
|
this._values.length = 0;
|
|
919
921
|
this._cacheKey = cacheSentinel;
|
|
920
922
|
this._cacheIndex = -2;
|
|
921
923
|
};
|
|
922
|
-
|
|
924
|
+
Map12.prototype.keys = function() {
|
|
923
925
|
return new MapIterator(this._keys, this._values, getKey);
|
|
924
926
|
};
|
|
925
|
-
|
|
927
|
+
Map12.prototype.values = function() {
|
|
926
928
|
return new MapIterator(this._keys, this._values, getValue);
|
|
927
929
|
};
|
|
928
|
-
|
|
930
|
+
Map12.prototype.entries = function() {
|
|
929
931
|
return new MapIterator(this._keys, this._values, getEntry);
|
|
930
932
|
};
|
|
931
|
-
|
|
933
|
+
Map12.prototype["@@iterator"] = function() {
|
|
932
934
|
return this.entries();
|
|
933
935
|
};
|
|
934
|
-
|
|
936
|
+
Map12.prototype[iteratorSymbol] = function() {
|
|
935
937
|
return this.entries();
|
|
936
938
|
};
|
|
937
|
-
|
|
939
|
+
Map12.prototype._find = function(key, insert) {
|
|
938
940
|
if (!SameValueZero(this._cacheKey, key)) {
|
|
939
941
|
this._cacheIndex = -1;
|
|
940
942
|
for (var i = 0; i < this._keys.length; i++) {
|
|
@@ -951,66 +953,75 @@ var require_Reflect = __commonJS({
|
|
|
951
953
|
}
|
|
952
954
|
return this._cacheIndex;
|
|
953
955
|
};
|
|
954
|
-
return
|
|
956
|
+
return Map12;
|
|
955
957
|
}()
|
|
956
958
|
);
|
|
957
|
-
return
|
|
959
|
+
return Map1;
|
|
958
960
|
function getKey(key, _) {
|
|
959
961
|
return key;
|
|
960
962
|
}
|
|
963
|
+
__name(getKey, "getKey");
|
|
961
964
|
function getValue(_, value) {
|
|
962
965
|
return value;
|
|
963
966
|
}
|
|
967
|
+
__name(getValue, "getValue");
|
|
964
968
|
function getEntry(key, value) {
|
|
965
|
-
return [
|
|
969
|
+
return [
|
|
970
|
+
key,
|
|
971
|
+
value
|
|
972
|
+
];
|
|
966
973
|
}
|
|
974
|
+
__name(getEntry, "getEntry");
|
|
967
975
|
}
|
|
976
|
+
__name(CreateMapPolyfill, "CreateMapPolyfill");
|
|
968
977
|
function CreateSetPolyfill() {
|
|
969
|
-
var
|
|
978
|
+
var Set1 = (
|
|
970
979
|
/** @class */
|
|
971
980
|
function() {
|
|
972
|
-
function
|
|
981
|
+
function Set12() {
|
|
973
982
|
this._map = new _Map();
|
|
974
983
|
}
|
|
975
|
-
|
|
976
|
-
|
|
984
|
+
__name(Set12, "Set1");
|
|
985
|
+
Object.defineProperty(Set12.prototype, "size", {
|
|
986
|
+
get: /* @__PURE__ */ __name(function() {
|
|
977
987
|
return this._map.size;
|
|
978
|
-
},
|
|
988
|
+
}, "get"),
|
|
979
989
|
enumerable: true,
|
|
980
990
|
configurable: true
|
|
981
991
|
});
|
|
982
|
-
|
|
992
|
+
Set12.prototype.has = function(value) {
|
|
983
993
|
return this._map.has(value);
|
|
984
994
|
};
|
|
985
|
-
|
|
995
|
+
Set12.prototype.add = function(value) {
|
|
986
996
|
return this._map.set(value, value), this;
|
|
987
997
|
};
|
|
988
|
-
|
|
998
|
+
Set12.prototype.delete = function(value) {
|
|
989
999
|
return this._map.delete(value);
|
|
990
1000
|
};
|
|
991
|
-
|
|
1001
|
+
Set12.prototype.clear = function() {
|
|
992
1002
|
this._map.clear();
|
|
993
1003
|
};
|
|
994
|
-
|
|
1004
|
+
Set12.prototype.keys = function() {
|
|
995
1005
|
return this._map.keys();
|
|
996
1006
|
};
|
|
997
|
-
|
|
1007
|
+
Set12.prototype.values = function() {
|
|
998
1008
|
return this._map.keys();
|
|
999
1009
|
};
|
|
1000
|
-
|
|
1010
|
+
Set12.prototype.entries = function() {
|
|
1001
1011
|
return this._map.entries();
|
|
1002
1012
|
};
|
|
1003
|
-
|
|
1013
|
+
Set12.prototype["@@iterator"] = function() {
|
|
1004
1014
|
return this.keys();
|
|
1005
1015
|
};
|
|
1006
|
-
|
|
1016
|
+
Set12.prototype[iteratorSymbol] = function() {
|
|
1007
1017
|
return this.keys();
|
|
1008
1018
|
};
|
|
1009
|
-
return
|
|
1019
|
+
return Set12;
|
|
1010
1020
|
}()
|
|
1011
1021
|
);
|
|
1012
|
-
return
|
|
1022
|
+
return Set1;
|
|
1013
1023
|
}
|
|
1024
|
+
__name(CreateSetPolyfill, "CreateSetPolyfill");
|
|
1014
1025
|
function CreateWeakMapPolyfill() {
|
|
1015
1026
|
var UUID_SIZE = 16;
|
|
1016
1027
|
var keys = HashMap.create();
|
|
@@ -1018,10 +1029,11 @@ var require_Reflect = __commonJS({
|
|
|
1018
1029
|
return (
|
|
1019
1030
|
/** @class */
|
|
1020
1031
|
function() {
|
|
1021
|
-
function
|
|
1032
|
+
function WeakMap1() {
|
|
1022
1033
|
this._key = CreateUniqueKey();
|
|
1023
1034
|
}
|
|
1024
|
-
|
|
1035
|
+
__name(WeakMap1, "WeakMap1");
|
|
1036
|
+
WeakMap1.prototype.has = function(target) {
|
|
1025
1037
|
var table = GetOrCreateWeakMapTable(
|
|
1026
1038
|
target,
|
|
1027
1039
|
/*create*/
|
|
@@ -1029,7 +1041,7 @@ var require_Reflect = __commonJS({
|
|
|
1029
1041
|
);
|
|
1030
1042
|
return table !== void 0 ? HashMap.has(table, this._key) : false;
|
|
1031
1043
|
};
|
|
1032
|
-
|
|
1044
|
+
WeakMap1.prototype.get = function(target) {
|
|
1033
1045
|
var table = GetOrCreateWeakMapTable(
|
|
1034
1046
|
target,
|
|
1035
1047
|
/*create*/
|
|
@@ -1037,7 +1049,7 @@ var require_Reflect = __commonJS({
|
|
|
1037
1049
|
);
|
|
1038
1050
|
return table !== void 0 ? HashMap.get(table, this._key) : void 0;
|
|
1039
1051
|
};
|
|
1040
|
-
|
|
1052
|
+
WeakMap1.prototype.set = function(target, value) {
|
|
1041
1053
|
var table = GetOrCreateWeakMapTable(
|
|
1042
1054
|
target,
|
|
1043
1055
|
/*create*/
|
|
@@ -1046,7 +1058,7 @@ var require_Reflect = __commonJS({
|
|
|
1046
1058
|
table[this._key] = value;
|
|
1047
1059
|
return this;
|
|
1048
1060
|
};
|
|
1049
|
-
|
|
1061
|
+
WeakMap1.prototype.delete = function(target) {
|
|
1050
1062
|
var table = GetOrCreateWeakMapTable(
|
|
1051
1063
|
target,
|
|
1052
1064
|
/*create*/
|
|
@@ -1054,10 +1066,10 @@ var require_Reflect = __commonJS({
|
|
|
1054
1066
|
);
|
|
1055
1067
|
return table !== void 0 ? delete table[this._key] : false;
|
|
1056
1068
|
};
|
|
1057
|
-
|
|
1069
|
+
WeakMap1.prototype.clear = function() {
|
|
1058
1070
|
this._key = CreateUniqueKey();
|
|
1059
1071
|
};
|
|
1060
|
-
return
|
|
1072
|
+
return WeakMap1;
|
|
1061
1073
|
}()
|
|
1062
1074
|
);
|
|
1063
1075
|
function CreateUniqueKey() {
|
|
@@ -1068,19 +1080,22 @@ var require_Reflect = __commonJS({
|
|
|
1068
1080
|
keys[key] = true;
|
|
1069
1081
|
return key;
|
|
1070
1082
|
}
|
|
1083
|
+
__name(CreateUniqueKey, "CreateUniqueKey");
|
|
1071
1084
|
function GetOrCreateWeakMapTable(target, create) {
|
|
1072
1085
|
if (!hasOwn.call(target, rootKey)) {
|
|
1073
|
-
if (!create)
|
|
1074
|
-
|
|
1075
|
-
|
|
1086
|
+
if (!create) return void 0;
|
|
1087
|
+
Object.defineProperty(target, rootKey, {
|
|
1088
|
+
value: HashMap.create()
|
|
1089
|
+
});
|
|
1076
1090
|
}
|
|
1077
1091
|
return target[rootKey];
|
|
1078
1092
|
}
|
|
1093
|
+
__name(GetOrCreateWeakMapTable, "GetOrCreateWeakMapTable");
|
|
1079
1094
|
function FillRandomBytes(buffer, size) {
|
|
1080
|
-
for (var i = 0; i < size; ++i)
|
|
1081
|
-
buffer[i] = Math.random() * 255 | 0;
|
|
1095
|
+
for (var i = 0; i < size; ++i) buffer[i] = Math.random() * 255 | 0;
|
|
1082
1096
|
return buffer;
|
|
1083
1097
|
}
|
|
1098
|
+
__name(FillRandomBytes, "FillRandomBytes");
|
|
1084
1099
|
function GenRandomBytes(size) {
|
|
1085
1100
|
if (typeof Uint8Array === "function") {
|
|
1086
1101
|
var array = new Uint8Array(size);
|
|
@@ -1095,6 +1110,7 @@ var require_Reflect = __commonJS({
|
|
|
1095
1110
|
}
|
|
1096
1111
|
return FillRandomBytes(new Array(size), size);
|
|
1097
1112
|
}
|
|
1113
|
+
__name(GenRandomBytes, "GenRandomBytes");
|
|
1098
1114
|
function CreateUUID() {
|
|
1099
1115
|
var data = GenRandomBytes(UUID_SIZE);
|
|
1100
1116
|
data[6] = data[6] & 79 | 64;
|
|
@@ -1102,20 +1118,21 @@ var require_Reflect = __commonJS({
|
|
|
1102
1118
|
var result = "";
|
|
1103
1119
|
for (var offset = 0; offset < UUID_SIZE; ++offset) {
|
|
1104
1120
|
var byte = data[offset];
|
|
1105
|
-
if (offset === 4 || offset === 6 || offset === 8)
|
|
1106
|
-
|
|
1107
|
-
if (byte < 16)
|
|
1108
|
-
result += "0";
|
|
1121
|
+
if (offset === 4 || offset === 6 || offset === 8) result += "-";
|
|
1122
|
+
if (byte < 16) result += "0";
|
|
1109
1123
|
result += byte.toString(16).toLowerCase();
|
|
1110
1124
|
}
|
|
1111
1125
|
return result;
|
|
1112
1126
|
}
|
|
1127
|
+
__name(CreateUUID, "CreateUUID");
|
|
1113
1128
|
}
|
|
1129
|
+
__name(CreateWeakMapPolyfill, "CreateWeakMapPolyfill");
|
|
1114
1130
|
function MakeDictionary(obj) {
|
|
1115
1131
|
obj.__ = void 0;
|
|
1116
1132
|
delete obj.__;
|
|
1117
1133
|
return obj;
|
|
1118
1134
|
}
|
|
1135
|
+
__name(MakeDictionary, "MakeDictionary");
|
|
1119
1136
|
});
|
|
1120
1137
|
})(Reflect2 || (Reflect2 = {}));
|
|
1121
1138
|
}
|
|
@@ -1135,27 +1152,32 @@ var Lifecycle;
|
|
|
1135
1152
|
var lifecycle_default = Lifecycle;
|
|
1136
1153
|
|
|
1137
1154
|
// ../../node_modules/.pnpm/tslib@1.14.1/node_modules/tslib/tslib.es6.js
|
|
1138
|
-
var extendStatics = function(d, b) {
|
|
1139
|
-
extendStatics = Object.setPrototypeOf || {
|
|
1155
|
+
var extendStatics = /* @__PURE__ */ __name(function(d, b) {
|
|
1156
|
+
extendStatics = Object.setPrototypeOf || {
|
|
1157
|
+
__proto__: []
|
|
1158
|
+
} instanceof Array && function(d2, b2) {
|
|
1140
1159
|
d2.__proto__ = b2;
|
|
1141
1160
|
} || function(d2, b2) {
|
|
1142
1161
|
for (var p in b2) if (b2.hasOwnProperty(p)) d2[p] = b2[p];
|
|
1143
1162
|
};
|
|
1144
1163
|
return extendStatics(d, b);
|
|
1145
|
-
};
|
|
1164
|
+
}, "extendStatics");
|
|
1146
1165
|
function __extends(d, b) {
|
|
1147
1166
|
extendStatics(d, b);
|
|
1148
1167
|
function __() {
|
|
1149
1168
|
this.constructor = d;
|
|
1150
1169
|
}
|
|
1170
|
+
__name(__, "__");
|
|
1151
1171
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1152
1172
|
}
|
|
1173
|
+
__name(__extends, "__extends");
|
|
1153
1174
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1154
1175
|
function adopt(value) {
|
|
1155
1176
|
return value instanceof P ? value : new P(function(resolve) {
|
|
1156
1177
|
resolve(value);
|
|
1157
1178
|
});
|
|
1158
1179
|
}
|
|
1180
|
+
__name(adopt, "adopt");
|
|
1159
1181
|
return new (P || (P = Promise))(function(resolve, reject) {
|
|
1160
1182
|
function fulfilled(value) {
|
|
1161
1183
|
try {
|
|
@@ -1164,6 +1186,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
1164
1186
|
reject(e);
|
|
1165
1187
|
}
|
|
1166
1188
|
}
|
|
1189
|
+
__name(fulfilled, "fulfilled");
|
|
1167
1190
|
function rejected(value) {
|
|
1168
1191
|
try {
|
|
1169
1192
|
step(generator["throw"](value));
|
|
@@ -1171,30 +1194,49 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
1171
1194
|
reject(e);
|
|
1172
1195
|
}
|
|
1173
1196
|
}
|
|
1197
|
+
__name(rejected, "rejected");
|
|
1174
1198
|
function step(result) {
|
|
1175
1199
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
1176
1200
|
}
|
|
1201
|
+
__name(step, "step");
|
|
1177
1202
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1178
1203
|
});
|
|
1179
1204
|
}
|
|
1205
|
+
__name(__awaiter, "__awaiter");
|
|
1180
1206
|
function __generator(thisArg, body) {
|
|
1181
|
-
var _ = {
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1207
|
+
var _ = {
|
|
1208
|
+
label: 0,
|
|
1209
|
+
sent: /* @__PURE__ */ __name(function() {
|
|
1210
|
+
if (t[0] & 1) throw t[1];
|
|
1211
|
+
return t[1];
|
|
1212
|
+
}, "sent"),
|
|
1213
|
+
trys: [],
|
|
1214
|
+
ops: []
|
|
1215
|
+
}, f, y, t, g;
|
|
1216
|
+
return g = {
|
|
1217
|
+
next: verb(0),
|
|
1218
|
+
"throw": verb(1),
|
|
1219
|
+
"return": verb(2)
|
|
1220
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
1186
1221
|
return this;
|
|
1187
1222
|
}), g;
|
|
1188
1223
|
function verb(n) {
|
|
1189
1224
|
return function(v) {
|
|
1190
|
-
return step([
|
|
1225
|
+
return step([
|
|
1226
|
+
n,
|
|
1227
|
+
v
|
|
1228
|
+
]);
|
|
1191
1229
|
};
|
|
1192
1230
|
}
|
|
1231
|
+
__name(verb, "verb");
|
|
1193
1232
|
function step(op) {
|
|
1194
1233
|
if (f) throw new TypeError("Generator is already executing.");
|
|
1195
1234
|
while (_) try {
|
|
1196
1235
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
1197
|
-
if (y = 0, t) op = [
|
|
1236
|
+
if (y = 0, t) op = [
|
|
1237
|
+
op[0] & 2,
|
|
1238
|
+
t.value
|
|
1239
|
+
];
|
|
1198
1240
|
switch (op[0]) {
|
|
1199
1241
|
case 0:
|
|
1200
1242
|
case 1:
|
|
@@ -1202,11 +1244,16 @@ function __generator(thisArg, body) {
|
|
|
1202
1244
|
break;
|
|
1203
1245
|
case 4:
|
|
1204
1246
|
_.label++;
|
|
1205
|
-
return {
|
|
1247
|
+
return {
|
|
1248
|
+
value: op[1],
|
|
1249
|
+
done: false
|
|
1250
|
+
};
|
|
1206
1251
|
case 5:
|
|
1207
1252
|
_.label++;
|
|
1208
1253
|
y = op[1];
|
|
1209
|
-
op = [
|
|
1254
|
+
op = [
|
|
1255
|
+
0
|
|
1256
|
+
];
|
|
1210
1257
|
continue;
|
|
1211
1258
|
case 7:
|
|
1212
1259
|
op = _.ops.pop();
|
|
@@ -1237,26 +1284,38 @@ function __generator(thisArg, body) {
|
|
|
1237
1284
|
}
|
|
1238
1285
|
op = body.call(thisArg, _);
|
|
1239
1286
|
} catch (e) {
|
|
1240
|
-
op = [
|
|
1287
|
+
op = [
|
|
1288
|
+
6,
|
|
1289
|
+
e
|
|
1290
|
+
];
|
|
1241
1291
|
y = 0;
|
|
1242
1292
|
} finally {
|
|
1243
1293
|
f = t = 0;
|
|
1244
1294
|
}
|
|
1245
1295
|
if (op[0] & 5) throw op[1];
|
|
1246
|
-
return {
|
|
1296
|
+
return {
|
|
1297
|
+
value: op[0] ? op[1] : void 0,
|
|
1298
|
+
done: true
|
|
1299
|
+
};
|
|
1247
1300
|
}
|
|
1301
|
+
__name(step, "step");
|
|
1248
1302
|
}
|
|
1303
|
+
__name(__generator, "__generator");
|
|
1249
1304
|
function __values(o) {
|
|
1250
1305
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1251
1306
|
if (m) return m.call(o);
|
|
1252
1307
|
if (o && typeof o.length === "number") return {
|
|
1253
|
-
next: function() {
|
|
1308
|
+
next: /* @__PURE__ */ __name(function() {
|
|
1254
1309
|
if (o && i >= o.length) o = void 0;
|
|
1255
|
-
return {
|
|
1256
|
-
|
|
1310
|
+
return {
|
|
1311
|
+
value: o && o[i++],
|
|
1312
|
+
done: !o
|
|
1313
|
+
};
|
|
1314
|
+
}, "next")
|
|
1257
1315
|
};
|
|
1258
1316
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1259
1317
|
}
|
|
1318
|
+
__name(__values, "__values");
|
|
1260
1319
|
function __read(o, n) {
|
|
1261
1320
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1262
1321
|
if (!m) return o;
|
|
@@ -1264,7 +1323,9 @@ function __read(o, n) {
|
|
|
1264
1323
|
try {
|
|
1265
1324
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
1266
1325
|
} catch (error) {
|
|
1267
|
-
e = {
|
|
1326
|
+
e = {
|
|
1327
|
+
error
|
|
1328
|
+
};
|
|
1268
1329
|
} finally {
|
|
1269
1330
|
try {
|
|
1270
1331
|
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
@@ -1274,11 +1335,12 @@ function __read(o, n) {
|
|
|
1274
1335
|
}
|
|
1275
1336
|
return ar;
|
|
1276
1337
|
}
|
|
1338
|
+
__name(__read, "__read");
|
|
1277
1339
|
function __spread() {
|
|
1278
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
1279
|
-
ar = ar.concat(__read(arguments[i]));
|
|
1340
|
+
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
1280
1341
|
return ar;
|
|
1281
1342
|
}
|
|
1343
|
+
__name(__spread, "__spread");
|
|
1282
1344
|
|
|
1283
1345
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/reflection-helpers.js
|
|
1284
1346
|
var INJECTION_TOKEN_METADATA_KEY = "injectionTokens";
|
|
@@ -1290,6 +1352,7 @@ function getParamInfo(target) {
|
|
|
1290
1352
|
});
|
|
1291
1353
|
return params;
|
|
1292
1354
|
}
|
|
1355
|
+
__name(getParamInfo, "getParamInfo");
|
|
1293
1356
|
function defineInjectionTokenMetadata(data, transform) {
|
|
1294
1357
|
return function(target, _propertyKey, parameterIndex) {
|
|
1295
1358
|
var descriptors = Reflect.getOwnMetadata(INJECTION_TOKEN_METADATA_KEY, target) || {};
|
|
@@ -1301,16 +1364,19 @@ function defineInjectionTokenMetadata(data, transform) {
|
|
|
1301
1364
|
Reflect.defineMetadata(INJECTION_TOKEN_METADATA_KEY, descriptors, target);
|
|
1302
1365
|
};
|
|
1303
1366
|
}
|
|
1367
|
+
__name(defineInjectionTokenMetadata, "defineInjectionTokenMetadata");
|
|
1304
1368
|
|
|
1305
1369
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/class-provider.js
|
|
1306
1370
|
function isClassProvider(provider) {
|
|
1307
1371
|
return !!provider.useClass;
|
|
1308
1372
|
}
|
|
1373
|
+
__name(isClassProvider, "isClassProvider");
|
|
1309
1374
|
|
|
1310
1375
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/factory-provider.js
|
|
1311
1376
|
function isFactoryProvider(provider) {
|
|
1312
1377
|
return !!provider.useFactory;
|
|
1313
1378
|
}
|
|
1379
|
+
__name(isFactoryProvider, "isFactoryProvider");
|
|
1314
1380
|
|
|
1315
1381
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/lazy-helpers.js
|
|
1316
1382
|
var DelayedConstructor = function() {
|
|
@@ -1330,23 +1396,24 @@ var DelayedConstructor = function() {
|
|
|
1330
1396
|
"ownKeys"
|
|
1331
1397
|
];
|
|
1332
1398
|
}
|
|
1399
|
+
__name(DelayedConstructor2, "DelayedConstructor");
|
|
1333
1400
|
DelayedConstructor2.prototype.createProxy = function(createObject) {
|
|
1334
1401
|
var _this = this;
|
|
1335
1402
|
var target = {};
|
|
1336
1403
|
var init = false;
|
|
1337
1404
|
var value;
|
|
1338
|
-
var delayedObject = function() {
|
|
1405
|
+
var delayedObject = /* @__PURE__ */ __name(function() {
|
|
1339
1406
|
if (!init) {
|
|
1340
1407
|
value = createObject(_this.wrap());
|
|
1341
1408
|
init = true;
|
|
1342
1409
|
}
|
|
1343
1410
|
return value;
|
|
1344
|
-
};
|
|
1411
|
+
}, "delayedObject");
|
|
1345
1412
|
return new Proxy(target, this.createHandler(delayedObject));
|
|
1346
1413
|
};
|
|
1347
1414
|
DelayedConstructor2.prototype.createHandler = function(delayedObject) {
|
|
1348
1415
|
var handler = {};
|
|
1349
|
-
var install = function(name) {
|
|
1416
|
+
var install = /* @__PURE__ */ __name(function(name) {
|
|
1350
1417
|
handler[name] = function() {
|
|
1351
1418
|
var args = [];
|
|
1352
1419
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -1356,7 +1423,7 @@ var DelayedConstructor = function() {
|
|
|
1356
1423
|
var method = Reflect[name];
|
|
1357
1424
|
return method.apply(void 0, __spread(args));
|
|
1358
1425
|
};
|
|
1359
|
-
};
|
|
1426
|
+
}, "install");
|
|
1360
1427
|
this.reflectMethods.forEach(install);
|
|
1361
1428
|
return handler;
|
|
1362
1429
|
};
|
|
@@ -1367,36 +1434,44 @@ var DelayedConstructor = function() {
|
|
|
1367
1434
|
function isNormalToken(token) {
|
|
1368
1435
|
return typeof token === "string" || typeof token === "symbol";
|
|
1369
1436
|
}
|
|
1437
|
+
__name(isNormalToken, "isNormalToken");
|
|
1370
1438
|
function isTokenDescriptor(descriptor) {
|
|
1371
1439
|
return typeof descriptor === "object" && "token" in descriptor && "multiple" in descriptor;
|
|
1372
1440
|
}
|
|
1441
|
+
__name(isTokenDescriptor, "isTokenDescriptor");
|
|
1373
1442
|
function isTransformDescriptor(descriptor) {
|
|
1374
1443
|
return typeof descriptor === "object" && "token" in descriptor && "transform" in descriptor;
|
|
1375
1444
|
}
|
|
1445
|
+
__name(isTransformDescriptor, "isTransformDescriptor");
|
|
1376
1446
|
function isConstructorToken(token) {
|
|
1377
1447
|
return typeof token === "function" || token instanceof DelayedConstructor;
|
|
1378
1448
|
}
|
|
1449
|
+
__name(isConstructorToken, "isConstructorToken");
|
|
1379
1450
|
|
|
1380
1451
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/token-provider.js
|
|
1381
1452
|
function isTokenProvider(provider) {
|
|
1382
1453
|
return !!provider.useToken;
|
|
1383
1454
|
}
|
|
1455
|
+
__name(isTokenProvider, "isTokenProvider");
|
|
1384
1456
|
|
|
1385
1457
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/value-provider.js
|
|
1386
1458
|
function isValueProvider(provider) {
|
|
1387
1459
|
return provider.useValue != void 0;
|
|
1388
1460
|
}
|
|
1461
|
+
__name(isValueProvider, "isValueProvider");
|
|
1389
1462
|
|
|
1390
1463
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/providers/provider.js
|
|
1391
1464
|
function isProvider(provider) {
|
|
1392
1465
|
return isClassProvider(provider) || isValueProvider(provider) || isTokenProvider(provider) || isFactoryProvider(provider);
|
|
1393
1466
|
}
|
|
1467
|
+
__name(isProvider, "isProvider");
|
|
1394
1468
|
|
|
1395
1469
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/registry-base.js
|
|
1396
1470
|
var RegistryBase = function() {
|
|
1397
1471
|
function RegistryBase2() {
|
|
1398
1472
|
this._registryMap = /* @__PURE__ */ new Map();
|
|
1399
1473
|
}
|
|
1474
|
+
__name(RegistryBase2, "RegistryBase");
|
|
1400
1475
|
RegistryBase2.prototype.entries = function() {
|
|
1401
1476
|
return this._registryMap.entries();
|
|
1402
1477
|
};
|
|
@@ -1438,6 +1513,7 @@ var Registry = function(_super) {
|
|
|
1438
1513
|
function Registry2() {
|
|
1439
1514
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1440
1515
|
}
|
|
1516
|
+
__name(Registry2, "Registry");
|
|
1441
1517
|
return Registry2;
|
|
1442
1518
|
}(registry_base_default);
|
|
1443
1519
|
var registry_default = Registry;
|
|
@@ -1447,6 +1523,7 @@ var ResolutionContext = /* @__PURE__ */ function() {
|
|
|
1447
1523
|
function ResolutionContext2() {
|
|
1448
1524
|
this.scopedResolutions = /* @__PURE__ */ new Map();
|
|
1449
1525
|
}
|
|
1526
|
+
__name(ResolutionContext2, "ResolutionContext");
|
|
1450
1527
|
return ResolutionContext2;
|
|
1451
1528
|
}();
|
|
1452
1529
|
var resolution_context_default = ResolutionContext;
|
|
@@ -1459,30 +1536,35 @@ function formatDependency(params, idx) {
|
|
|
1459
1536
|
var argName = params.split(",")[idx].trim();
|
|
1460
1537
|
return '"' + argName + '" at position #' + idx;
|
|
1461
1538
|
}
|
|
1539
|
+
__name(formatDependency, "formatDependency");
|
|
1462
1540
|
function composeErrorMessage(msg, e, indent) {
|
|
1463
1541
|
if (indent === void 0) {
|
|
1464
1542
|
indent = " ";
|
|
1465
1543
|
}
|
|
1466
|
-
return __spread([
|
|
1544
|
+
return __spread([
|
|
1545
|
+
msg
|
|
1546
|
+
], e.message.split("\n").map(function(l) {
|
|
1467
1547
|
return indent + l;
|
|
1468
1548
|
})).join("\n");
|
|
1469
1549
|
}
|
|
1550
|
+
__name(composeErrorMessage, "composeErrorMessage");
|
|
1470
1551
|
function formatErrorCtor(ctor, paramIdx, error) {
|
|
1471
1552
|
var _a = __read(ctor.toString().match(/constructor\(([\w, ]+)\)/) || [], 2), _b = _a[1], params = _b === void 0 ? null : _b;
|
|
1472
1553
|
var dep = formatDependency(params, paramIdx);
|
|
1473
1554
|
return composeErrorMessage("Cannot inject the dependency " + dep + ' of "' + ctor.name + '" constructor. Reason:', error);
|
|
1474
1555
|
}
|
|
1556
|
+
__name(formatErrorCtor, "formatErrorCtor");
|
|
1475
1557
|
|
|
1476
1558
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/types/disposable.js
|
|
1477
1559
|
function isDisposable(value) {
|
|
1478
|
-
if (typeof value.dispose !== "function")
|
|
1479
|
-
return false;
|
|
1560
|
+
if (typeof value.dispose !== "function") return false;
|
|
1480
1561
|
var disposeFun = value.dispose;
|
|
1481
1562
|
if (disposeFun.length > 0) {
|
|
1482
1563
|
return false;
|
|
1483
1564
|
}
|
|
1484
1565
|
return true;
|
|
1485
1566
|
}
|
|
1567
|
+
__name(isDisposable, "isDisposable");
|
|
1486
1568
|
|
|
1487
1569
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/interceptors.js
|
|
1488
1570
|
var PreResolutionInterceptors = function(_super) {
|
|
@@ -1490,6 +1572,7 @@ var PreResolutionInterceptors = function(_super) {
|
|
|
1490
1572
|
function PreResolutionInterceptors2() {
|
|
1491
1573
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1492
1574
|
}
|
|
1575
|
+
__name(PreResolutionInterceptors2, "PreResolutionInterceptors");
|
|
1493
1576
|
return PreResolutionInterceptors2;
|
|
1494
1577
|
}(registry_base_default);
|
|
1495
1578
|
var PostResolutionInterceptors = function(_super) {
|
|
@@ -1497,6 +1580,7 @@ var PostResolutionInterceptors = function(_super) {
|
|
|
1497
1580
|
function PostResolutionInterceptors2() {
|
|
1498
1581
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1499
1582
|
}
|
|
1583
|
+
__name(PostResolutionInterceptors2, "PostResolutionInterceptors");
|
|
1500
1584
|
return PostResolutionInterceptors2;
|
|
1501
1585
|
}(registry_base_default);
|
|
1502
1586
|
var Interceptors = /* @__PURE__ */ function() {
|
|
@@ -1504,6 +1588,7 @@ var Interceptors = /* @__PURE__ */ function() {
|
|
|
1504
1588
|
this.preResolution = new PreResolutionInterceptors();
|
|
1505
1589
|
this.postResolution = new PostResolutionInterceptors();
|
|
1506
1590
|
}
|
|
1591
|
+
__name(Interceptors2, "Interceptors");
|
|
1507
1592
|
return Interceptors2;
|
|
1508
1593
|
}();
|
|
1509
1594
|
var interceptors_default = Interceptors;
|
|
@@ -1518,24 +1603,33 @@ var InternalDependencyContainer = function() {
|
|
|
1518
1603
|
this.disposed = false;
|
|
1519
1604
|
this.disposables = /* @__PURE__ */ new Set();
|
|
1520
1605
|
}
|
|
1606
|
+
__name(InternalDependencyContainer2, "InternalDependencyContainer");
|
|
1521
1607
|
InternalDependencyContainer2.prototype.register = function(token, providerOrConstructor, options) {
|
|
1522
1608
|
if (options === void 0) {
|
|
1523
|
-
options = {
|
|
1609
|
+
options = {
|
|
1610
|
+
lifecycle: lifecycle_default.Transient
|
|
1611
|
+
};
|
|
1524
1612
|
}
|
|
1525
1613
|
this.ensureNotDisposed();
|
|
1526
1614
|
var provider;
|
|
1527
1615
|
if (!isProvider(providerOrConstructor)) {
|
|
1528
|
-
provider = {
|
|
1616
|
+
provider = {
|
|
1617
|
+
useClass: providerOrConstructor
|
|
1618
|
+
};
|
|
1529
1619
|
} else {
|
|
1530
1620
|
provider = providerOrConstructor;
|
|
1531
1621
|
}
|
|
1532
1622
|
if (isTokenProvider(provider)) {
|
|
1533
|
-
var path = [
|
|
1623
|
+
var path = [
|
|
1624
|
+
token
|
|
1625
|
+
];
|
|
1534
1626
|
var tokenProvider = provider;
|
|
1535
1627
|
while (tokenProvider != null) {
|
|
1536
1628
|
var currentToken = tokenProvider.useToken;
|
|
1537
1629
|
if (path.includes(currentToken)) {
|
|
1538
|
-
throw new Error("Token registration cycle detected! " + __spread(path, [
|
|
1630
|
+
throw new Error("Token registration cycle detected! " + __spread(path, [
|
|
1631
|
+
currentToken
|
|
1632
|
+
]).join(" -> "));
|
|
1539
1633
|
}
|
|
1540
1634
|
path.push(currentToken);
|
|
1541
1635
|
var registration = this._registry.get(currentToken);
|
|
@@ -1551,7 +1645,10 @@ var InternalDependencyContainer = function() {
|
|
|
1551
1645
|
throw new Error('Cannot use lifecycle "' + lifecycle_default[options.lifecycle] + '" with ValueProviders or FactoryProviders');
|
|
1552
1646
|
}
|
|
1553
1647
|
}
|
|
1554
|
-
this._registry.set(token, {
|
|
1648
|
+
this._registry.set(token, {
|
|
1649
|
+
provider,
|
|
1650
|
+
options
|
|
1651
|
+
});
|
|
1555
1652
|
return this;
|
|
1556
1653
|
};
|
|
1557
1654
|
InternalDependencyContainer2.prototype.registerType = function(from, to) {
|
|
@@ -1577,11 +1674,15 @@ var InternalDependencyContainer = function() {
|
|
|
1577
1674
|
if (isNormalToken(to)) {
|
|
1578
1675
|
return this.register(from, {
|
|
1579
1676
|
useToken: to
|
|
1580
|
-
}, {
|
|
1677
|
+
}, {
|
|
1678
|
+
lifecycle: lifecycle_default.Singleton
|
|
1679
|
+
});
|
|
1581
1680
|
} else if (to) {
|
|
1582
1681
|
return this.register(from, {
|
|
1583
1682
|
useClass: to
|
|
1584
|
-
}, {
|
|
1683
|
+
}, {
|
|
1684
|
+
lifecycle: lifecycle_default.Singleton
|
|
1685
|
+
});
|
|
1585
1686
|
}
|
|
1586
1687
|
throw new Error('Cannot register a type name as a singleton without a "to" token');
|
|
1587
1688
|
}
|
|
@@ -1591,7 +1692,9 @@ var InternalDependencyContainer = function() {
|
|
|
1591
1692
|
}
|
|
1592
1693
|
return this.register(from, {
|
|
1593
1694
|
useClass
|
|
1594
|
-
}, {
|
|
1695
|
+
}, {
|
|
1696
|
+
lifecycle: lifecycle_default.Singleton
|
|
1697
|
+
});
|
|
1595
1698
|
};
|
|
1596
1699
|
InternalDependencyContainer2.prototype.resolve = function(token, context) {
|
|
1597
1700
|
if (context === void 0) {
|
|
@@ -1628,7 +1731,9 @@ var InternalDependencyContainer = function() {
|
|
|
1628
1731
|
interceptor.callback(token, resolutionType);
|
|
1629
1732
|
}
|
|
1630
1733
|
} catch (e_1_1) {
|
|
1631
|
-
e_1 = {
|
|
1734
|
+
e_1 = {
|
|
1735
|
+
error: e_1_1
|
|
1736
|
+
};
|
|
1632
1737
|
} finally {
|
|
1633
1738
|
try {
|
|
1634
1739
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
@@ -1652,7 +1757,9 @@ var InternalDependencyContainer = function() {
|
|
|
1652
1757
|
interceptor.callback(token, result, resolutionType);
|
|
1653
1758
|
}
|
|
1654
1759
|
} catch (e_2_1) {
|
|
1655
|
-
e_2 = {
|
|
1760
|
+
e_2 = {
|
|
1761
|
+
error: e_2_1
|
|
1762
|
+
};
|
|
1656
1763
|
} finally {
|
|
1657
1764
|
try {
|
|
1658
1765
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
@@ -1706,7 +1813,9 @@ var InternalDependencyContainer = function() {
|
|
|
1706
1813
|
this.executePostResolutionInterceptor(token, result_1, "All");
|
|
1707
1814
|
return result_1;
|
|
1708
1815
|
}
|
|
1709
|
-
var result = [
|
|
1816
|
+
var result = [
|
|
1817
|
+
this.construct(token, context)
|
|
1818
|
+
];
|
|
1710
1819
|
this.executePostResolutionInterceptor(token, result, "All");
|
|
1711
1820
|
return result;
|
|
1712
1821
|
};
|
|
@@ -1737,7 +1846,9 @@ var InternalDependencyContainer = function() {
|
|
|
1737
1846
|
}));
|
|
1738
1847
|
}
|
|
1739
1848
|
} catch (e_3_1) {
|
|
1740
|
-
e_3 = {
|
|
1849
|
+
e_3 = {
|
|
1850
|
+
error: e_3_1
|
|
1851
|
+
};
|
|
1741
1852
|
} finally {
|
|
1742
1853
|
try {
|
|
1743
1854
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
@@ -1769,7 +1880,9 @@ var InternalDependencyContainer = function() {
|
|
|
1769
1880
|
}
|
|
1770
1881
|
}
|
|
1771
1882
|
} catch (e_4_1) {
|
|
1772
|
-
e_4 = {
|
|
1883
|
+
e_4 = {
|
|
1884
|
+
error: e_4_1
|
|
1885
|
+
};
|
|
1773
1886
|
} finally {
|
|
1774
1887
|
try {
|
|
1775
1888
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
@@ -1781,7 +1894,9 @@ var InternalDependencyContainer = function() {
|
|
|
1781
1894
|
};
|
|
1782
1895
|
InternalDependencyContainer2.prototype.beforeResolution = function(token, callback, options) {
|
|
1783
1896
|
if (options === void 0) {
|
|
1784
|
-
options = {
|
|
1897
|
+
options = {
|
|
1898
|
+
frequency: "Always"
|
|
1899
|
+
};
|
|
1785
1900
|
}
|
|
1786
1901
|
this.interceptors.preResolution.set(token, {
|
|
1787
1902
|
callback,
|
|
@@ -1790,7 +1905,9 @@ var InternalDependencyContainer = function() {
|
|
|
1790
1905
|
};
|
|
1791
1906
|
InternalDependencyContainer2.prototype.afterResolution = function(token, callback, options) {
|
|
1792
1907
|
if (options === void 0) {
|
|
1793
|
-
options = {
|
|
1908
|
+
options = {
|
|
1909
|
+
frequency: "Always"
|
|
1910
|
+
};
|
|
1794
1911
|
}
|
|
1795
1912
|
this.interceptors.postResolution.set(token, {
|
|
1796
1913
|
callback,
|
|
@@ -1811,10 +1928,15 @@ var InternalDependencyContainer = function() {
|
|
|
1811
1928
|
promises.push(maybePromise);
|
|
1812
1929
|
}
|
|
1813
1930
|
});
|
|
1814
|
-
return [
|
|
1931
|
+
return [
|
|
1932
|
+
4,
|
|
1933
|
+
Promise.all(promises)
|
|
1934
|
+
];
|
|
1815
1935
|
case 1:
|
|
1816
1936
|
_a.sent();
|
|
1817
|
-
return [
|
|
1937
|
+
return [
|
|
1938
|
+
2
|
|
1939
|
+
];
|
|
1818
1940
|
}
|
|
1819
1941
|
});
|
|
1820
1942
|
});
|
|
@@ -1854,7 +1976,9 @@ var InternalDependencyContainer = function() {
|
|
|
1854
1976
|
}
|
|
1855
1977
|
}
|
|
1856
1978
|
var params = paramInfo.map(_this.resolveParams(context, ctor));
|
|
1857
|
-
return new (ctor.bind.apply(ctor, __spread([
|
|
1979
|
+
return new (ctor.bind.apply(ctor, __spread([
|
|
1980
|
+
void 0
|
|
1981
|
+
], params)))();
|
|
1858
1982
|
}();
|
|
1859
1983
|
if (isDisposable(instance2)) {
|
|
1860
1984
|
this.disposables.add(instance2);
|
|
@@ -1868,12 +1992,18 @@ var InternalDependencyContainer = function() {
|
|
|
1868
1992
|
try {
|
|
1869
1993
|
if (isTokenDescriptor(param)) {
|
|
1870
1994
|
if (isTransformDescriptor(param)) {
|
|
1871
|
-
return param.multiple ? (_a = _this.resolve(param.transform)).transform.apply(_a, __spread([
|
|
1995
|
+
return param.multiple ? (_a = _this.resolve(param.transform)).transform.apply(_a, __spread([
|
|
1996
|
+
_this.resolveAll(param.token)
|
|
1997
|
+
], param.transformArgs)) : (_b = _this.resolve(param.transform)).transform.apply(_b, __spread([
|
|
1998
|
+
_this.resolve(param.token, context)
|
|
1999
|
+
], param.transformArgs));
|
|
1872
2000
|
} else {
|
|
1873
2001
|
return param.multiple ? _this.resolveAll(param.token) : _this.resolve(param.token, context);
|
|
1874
2002
|
}
|
|
1875
2003
|
} else if (isTransformDescriptor(param)) {
|
|
1876
|
-
return (_c = _this.resolve(param.transform, context)).transform.apply(_c, __spread([
|
|
2004
|
+
return (_c = _this.resolve(param.transform, context)).transform.apply(_c, __spread([
|
|
2005
|
+
_this.resolve(param.token, context)
|
|
2006
|
+
], param.transformArgs));
|
|
1877
2007
|
}
|
|
1878
2008
|
return _this.resolve(param, context);
|
|
1879
2009
|
} catch (e) {
|
|
@@ -1894,6 +2024,7 @@ var instance = new InternalDependencyContainer();
|
|
|
1894
2024
|
function inject(token) {
|
|
1895
2025
|
return defineInjectionTokenMetadata(token);
|
|
1896
2026
|
}
|
|
2027
|
+
__name(inject, "inject");
|
|
1897
2028
|
var inject_default = inject;
|
|
1898
2029
|
|
|
1899
2030
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/decorators/injectable.js
|
|
@@ -1902,6 +2033,7 @@ function injectable() {
|
|
|
1902
2033
|
typeInfo.set(target, getParamInfo(target));
|
|
1903
2034
|
};
|
|
1904
2035
|
}
|
|
2036
|
+
__name(injectable, "injectable");
|
|
1905
2037
|
var injectable_default = injectable;
|
|
1906
2038
|
|
|
1907
2039
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/decorators/singleton.js
|
|
@@ -1911,6 +2043,7 @@ function singleton() {
|
|
|
1911
2043
|
instance.registerSingleton(target);
|
|
1912
2044
|
};
|
|
1913
2045
|
}
|
|
2046
|
+
__name(singleton, "singleton");
|
|
1914
2047
|
var singleton_default = singleton;
|
|
1915
2048
|
|
|
1916
2049
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/decorators/scoped.js
|
|
@@ -1922,6 +2055,7 @@ function scoped(lifecycle, token) {
|
|
|
1922
2055
|
});
|
|
1923
2056
|
};
|
|
1924
2057
|
}
|
|
2058
|
+
__name(scoped, "scoped");
|
|
1925
2059
|
|
|
1926
2060
|
// ../../node_modules/.pnpm/tsyringe@4.8.0/node_modules/tsyringe/dist/esm5/index.js
|
|
1927
2061
|
if (typeof Reflect === "undefined" || !Reflect.getMetadata) {
|
|
@@ -1933,17 +2067,30 @@ import { Subject } from "rxjs";
|
|
|
1933
2067
|
|
|
1934
2068
|
// src/core/app/app.component.ts
|
|
1935
2069
|
import { ProxyReceiver } from "@quick-threejs/utils";
|
|
2070
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
2071
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2072
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2073
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2074
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2075
|
+
}
|
|
2076
|
+
__name(_ts_decorate, "_ts_decorate");
|
|
1936
2077
|
var AppComponent = class {
|
|
2078
|
+
static {
|
|
2079
|
+
__name(this, "AppComponent");
|
|
2080
|
+
}
|
|
1937
2081
|
proxyReceiver = new ProxyReceiver();
|
|
1938
2082
|
initialized = false;
|
|
1939
2083
|
canvas;
|
|
1940
2084
|
};
|
|
1941
|
-
AppComponent =
|
|
2085
|
+
AppComponent = _ts_decorate([
|
|
1942
2086
|
singleton_default()
|
|
1943
2087
|
], AppComponent);
|
|
1944
2088
|
|
|
1945
2089
|
// src/common/models/proxy-event-subjects.models.ts
|
|
1946
2090
|
var ProxyEventSubjectsModel = class {
|
|
2091
|
+
static {
|
|
2092
|
+
__name(this, "ProxyEventSubjectsModel");
|
|
2093
|
+
}
|
|
1947
2094
|
contextmenu$$;
|
|
1948
2095
|
resize$$;
|
|
1949
2096
|
mousedown$$;
|
|
@@ -1962,6 +2109,9 @@ var ProxyEventSubjectsModel = class {
|
|
|
1962
2109
|
|
|
1963
2110
|
// src/common/models/proxy-event-observables.model.ts
|
|
1964
2111
|
var ProxyEventObservablesModel = class extends ProxyEventSubjectsModel {
|
|
2112
|
+
static {
|
|
2113
|
+
__name(this, "ProxyEventObservablesModel");
|
|
2114
|
+
}
|
|
1965
2115
|
contextmenu$;
|
|
1966
2116
|
resize$;
|
|
1967
2117
|
mousedown$;
|
|
@@ -1980,6 +2130,9 @@ var ProxyEventObservablesModel = class extends ProxyEventSubjectsModel {
|
|
|
1980
2130
|
|
|
1981
2131
|
// src/common/models/proxy-event-handler.model.ts
|
|
1982
2132
|
var ProxyEventHandlersModel = class extends ProxyEventObservablesModel {
|
|
2133
|
+
static {
|
|
2134
|
+
__name(this, "ProxyEventHandlersModel");
|
|
2135
|
+
}
|
|
1983
2136
|
contextmenu;
|
|
1984
2137
|
resize;
|
|
1985
2138
|
mousedown;
|
|
@@ -2021,10 +2174,32 @@ var PROXY_EVENT_LISTENERS = [
|
|
|
2021
2174
|
];
|
|
2022
2175
|
|
|
2023
2176
|
// src/core/app/app.controller.ts
|
|
2177
|
+
function _ts_decorate2(decorators, target, key, desc) {
|
|
2178
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2179
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2180
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2181
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2182
|
+
}
|
|
2183
|
+
__name(_ts_decorate2, "_ts_decorate");
|
|
2184
|
+
function _ts_metadata(k, v) {
|
|
2185
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2186
|
+
}
|
|
2187
|
+
__name(_ts_metadata, "_ts_metadata");
|
|
2188
|
+
function _ts_param(paramIndex, decorator) {
|
|
2189
|
+
return function(target, key) {
|
|
2190
|
+
decorator(target, key, paramIndex);
|
|
2191
|
+
};
|
|
2192
|
+
}
|
|
2193
|
+
__name(_ts_param, "_ts_param");
|
|
2024
2194
|
var AppController = class extends ProxyEventHandlersModel {
|
|
2195
|
+
static {
|
|
2196
|
+
__name(this, "AppController");
|
|
2197
|
+
}
|
|
2198
|
+
component;
|
|
2199
|
+
lifecycle$$;
|
|
2200
|
+
lifecycle$;
|
|
2025
2201
|
constructor(component) {
|
|
2026
|
-
super();
|
|
2027
|
-
this.component = component;
|
|
2202
|
+
super(), this.component = component, this.lifecycle$$ = new Subject(), this.lifecycle$ = this.lifecycle$$.pipe();
|
|
2028
2203
|
for (const eventType of PROXY_EVENT_LISTENERS) {
|
|
2029
2204
|
this[`${eventType}$$`] = new Subject();
|
|
2030
2205
|
this[`${eventType}$`] = this[`${eventType}$$`].pipe();
|
|
@@ -2037,55 +2212,77 @@ var AppController = class extends ProxyEventHandlersModel {
|
|
|
2037
2212
|
};
|
|
2038
2213
|
}
|
|
2039
2214
|
}
|
|
2040
|
-
lifecycle$$ = new Subject();
|
|
2041
|
-
lifecycle$ = this.lifecycle$$.pipe();
|
|
2042
2215
|
};
|
|
2043
|
-
AppController =
|
|
2216
|
+
AppController = _ts_decorate2([
|
|
2044
2217
|
singleton_default(),
|
|
2045
|
-
|
|
2218
|
+
_ts_param(0, inject_default(AppComponent)),
|
|
2219
|
+
_ts_metadata("design:type", Function),
|
|
2220
|
+
_ts_metadata("design:paramtypes", [
|
|
2221
|
+
typeof AppComponent === "undefined" ? Object : AppComponent
|
|
2222
|
+
])
|
|
2046
2223
|
], AppController);
|
|
2047
2224
|
|
|
2048
2225
|
// src/core/app/timer/timer.component.ts
|
|
2049
2226
|
import { Clock } from "three";
|
|
2227
|
+
function _ts_decorate3(decorators, target, key, desc) {
|
|
2228
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2229
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2230
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2231
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2232
|
+
}
|
|
2233
|
+
__name(_ts_decorate3, "_ts_decorate");
|
|
2050
2234
|
var TimerComponent = class {
|
|
2235
|
+
static {
|
|
2236
|
+
__name(this, "TimerComponent");
|
|
2237
|
+
}
|
|
2051
2238
|
clock = new Clock();
|
|
2052
2239
|
frame = 1e3 / 60;
|
|
2053
2240
|
delta = 0;
|
|
2054
2241
|
deltaRatio = 0;
|
|
2055
2242
|
enabled = false;
|
|
2056
2243
|
};
|
|
2057
|
-
TimerComponent =
|
|
2244
|
+
TimerComponent = _ts_decorate3([
|
|
2058
2245
|
singleton_default()
|
|
2059
2246
|
], TimerComponent);
|
|
2060
2247
|
|
|
2061
2248
|
// src/core/app/renderer/renderer.component.ts
|
|
2062
|
-
import {
|
|
2063
|
-
Camera as Camera3,
|
|
2064
|
-
CineonToneMapping,
|
|
2065
|
-
PCFSoftShadowMap,
|
|
2066
|
-
SRGBColorSpace,
|
|
2067
|
-
WebGLRenderer
|
|
2068
|
-
} from "three";
|
|
2249
|
+
import { Camera as Camera3, CineonToneMapping, PCFSoftShadowMap, SRGBColorSpace, WebGLRenderer } from "three";
|
|
2069
2250
|
|
|
2070
2251
|
// src/core/app/world/world.component.ts
|
|
2071
2252
|
import { Scene } from "three";
|
|
2253
|
+
function _ts_decorate4(decorators, target, key, desc) {
|
|
2254
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2255
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2256
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2257
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2258
|
+
}
|
|
2259
|
+
__name(_ts_decorate4, "_ts_decorate");
|
|
2072
2260
|
var WorldComponent = class {
|
|
2261
|
+
static {
|
|
2262
|
+
__name(this, "WorldComponent");
|
|
2263
|
+
}
|
|
2073
2264
|
scene = new Scene();
|
|
2074
2265
|
enabled = true;
|
|
2075
2266
|
};
|
|
2076
|
-
WorldComponent =
|
|
2267
|
+
WorldComponent = _ts_decorate4([
|
|
2077
2268
|
singleton_default()
|
|
2078
2269
|
], WorldComponent);
|
|
2079
2270
|
|
|
2080
2271
|
// src/core/app/camera/camera.component.ts
|
|
2081
|
-
import {
|
|
2082
|
-
Camera,
|
|
2083
|
-
OrthographicCamera,
|
|
2084
|
-
PerspectiveCamera
|
|
2085
|
-
} from "three";
|
|
2272
|
+
import { Camera, OrthographicCamera, PerspectiveCamera } from "three";
|
|
2086
2273
|
|
|
2087
2274
|
// src/core/app/sizes/sizes.component.ts
|
|
2275
|
+
function _ts_decorate5(decorators, target, key, desc) {
|
|
2276
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2277
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2278
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2279
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2280
|
+
}
|
|
2281
|
+
__name(_ts_decorate5, "_ts_decorate");
|
|
2088
2282
|
var SizesComponent = class {
|
|
2283
|
+
static {
|
|
2284
|
+
__name(this, "SizesComponent");
|
|
2285
|
+
}
|
|
2089
2286
|
width = 0;
|
|
2090
2287
|
height = 0;
|
|
2091
2288
|
aspect = 0;
|
|
@@ -2099,30 +2296,50 @@ var SizesComponent = class {
|
|
|
2099
2296
|
this.enabled = enabled === void 0 ? true : !!enabled;
|
|
2100
2297
|
}
|
|
2101
2298
|
};
|
|
2102
|
-
SizesComponent =
|
|
2299
|
+
SizesComponent = _ts_decorate5([
|
|
2103
2300
|
singleton_default()
|
|
2104
2301
|
], SizesComponent);
|
|
2105
2302
|
|
|
2106
2303
|
// src/common/enums/camera.enum.ts
|
|
2107
|
-
var DefaultCameraType = /* @__PURE__ */ (
|
|
2304
|
+
var DefaultCameraType = /* @__PURE__ */ function(DefaultCameraType2) {
|
|
2108
2305
|
DefaultCameraType2[DefaultCameraType2["PERSPECTIVE"] = 0] = "PERSPECTIVE";
|
|
2109
2306
|
DefaultCameraType2[DefaultCameraType2["ORTHOGRAPHIC"] = 1] = "ORTHOGRAPHIC";
|
|
2110
2307
|
return DefaultCameraType2;
|
|
2111
|
-
}
|
|
2308
|
+
}({});
|
|
2112
2309
|
|
|
2113
2310
|
// src/core/app/camera/camera.component.ts
|
|
2311
|
+
function _ts_decorate6(decorators, target, key, desc) {
|
|
2312
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2313
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2314
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2315
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2316
|
+
}
|
|
2317
|
+
__name(_ts_decorate6, "_ts_decorate");
|
|
2318
|
+
function _ts_metadata2(k, v) {
|
|
2319
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2320
|
+
}
|
|
2321
|
+
__name(_ts_metadata2, "_ts_metadata");
|
|
2322
|
+
function _ts_param2(paramIndex, decorator) {
|
|
2323
|
+
return function(target, key) {
|
|
2324
|
+
decorator(target, key, paramIndex);
|
|
2325
|
+
};
|
|
2326
|
+
}
|
|
2327
|
+
__name(_ts_param2, "_ts_param");
|
|
2114
2328
|
var CameraComponent = class {
|
|
2115
|
-
|
|
2116
|
-
this
|
|
2329
|
+
static {
|
|
2330
|
+
__name(this, "CameraComponent");
|
|
2117
2331
|
}
|
|
2332
|
+
sizesComponent;
|
|
2118
2333
|
instance;
|
|
2119
2334
|
miniCamera;
|
|
2120
|
-
enabled
|
|
2335
|
+
enabled;
|
|
2336
|
+
constructor(sizesComponent) {
|
|
2337
|
+
this.sizesComponent = sizesComponent;
|
|
2338
|
+
this.enabled = true;
|
|
2339
|
+
}
|
|
2121
2340
|
set aspectRatio(ratio) {
|
|
2122
|
-
if (this.instance instanceof PerspectiveCamera)
|
|
2123
|
-
|
|
2124
|
-
if (this.instance instanceof PerspectiveCamera || this.instance instanceof OrthographicCamera)
|
|
2125
|
-
this.instance?.updateProjectionMatrix();
|
|
2341
|
+
if (this.instance instanceof PerspectiveCamera) this.instance.aspect = ratio;
|
|
2342
|
+
if (this.instance instanceof PerspectiveCamera || this.instance instanceof OrthographicCamera) this.instance?.updateProjectionMatrix();
|
|
2126
2343
|
}
|
|
2127
2344
|
set quaternion(quaternion) {
|
|
2128
2345
|
this.instance?.quaternion.copy(quaternion);
|
|
@@ -2135,42 +2352,24 @@ var CameraComponent = class {
|
|
|
2135
2352
|
}
|
|
2136
2353
|
initDefaultCamera(cameraType) {
|
|
2137
2354
|
this.removeCamera();
|
|
2138
|
-
if (cameraType ===
|
|
2139
|
-
this.instance = new PerspectiveCamera(
|
|
2140
|
-
70,
|
|
2141
|
-
this.sizesComponent.width / this.sizesComponent.height,
|
|
2142
|
-
1e-4,
|
|
2143
|
-
100
|
|
2144
|
-
);
|
|
2355
|
+
if (cameraType === DefaultCameraType.PERSPECTIVE || cameraType === void 0) {
|
|
2356
|
+
this.instance = new PerspectiveCamera(70, this.sizesComponent.width / this.sizesComponent.height, 1e-4, 100);
|
|
2145
2357
|
this.instance.position.z = 8;
|
|
2146
2358
|
return;
|
|
2147
2359
|
}
|
|
2148
|
-
if (cameraType ===
|
|
2149
|
-
this.instance = new OrthographicCamera(
|
|
2150
|
-
-this.sizesComponent.aspect * this.sizesComponent.frustrum / 2,
|
|
2151
|
-
this.sizesComponent.aspect * this.sizesComponent.frustrum / 2,
|
|
2152
|
-
this.sizesComponent.frustrum / 2,
|
|
2153
|
-
-this.sizesComponent.frustrum / 2,
|
|
2154
|
-
-50,
|
|
2155
|
-
50
|
|
2156
|
-
);
|
|
2360
|
+
if (cameraType === DefaultCameraType.ORTHOGRAPHIC) {
|
|
2361
|
+
this.instance = new OrthographicCamera(-this.sizesComponent.aspect * this.sizesComponent.frustrum / 2, this.sizesComponent.aspect * this.sizesComponent.frustrum / 2, this.sizesComponent.frustrum / 2, -this.sizesComponent.frustrum / 2, -50, 50);
|
|
2157
2362
|
}
|
|
2158
2363
|
}
|
|
2159
2364
|
setMiniCamera() {
|
|
2160
2365
|
this.removeMiniCamera();
|
|
2161
|
-
this.miniCamera = new PerspectiveCamera(
|
|
2162
|
-
75,
|
|
2163
|
-
this.sizesComponent.width / this.sizesComponent.height,
|
|
2164
|
-
0.1,
|
|
2165
|
-
500
|
|
2166
|
-
);
|
|
2366
|
+
this.miniCamera = new PerspectiveCamera(75, this.sizesComponent.width / this.sizesComponent.height, 0.1, 500);
|
|
2167
2367
|
this.miniCamera.position.z = 10;
|
|
2168
2368
|
this.miniCamera.position.x = -5;
|
|
2169
2369
|
}
|
|
2170
2370
|
removeCamera() {
|
|
2171
2371
|
if (!(this.instance instanceof Camera)) return;
|
|
2172
|
-
if (this.instance instanceof PerspectiveCamera || this.instance instanceof OrthographicCamera)
|
|
2173
|
-
this.instance.clearViewOffset();
|
|
2372
|
+
if (this.instance instanceof PerspectiveCamera || this.instance instanceof OrthographicCamera) this.instance.clearViewOffset();
|
|
2174
2373
|
this.instance.clear();
|
|
2175
2374
|
this.instance = void 0;
|
|
2176
2375
|
}
|
|
@@ -2181,38 +2380,62 @@ var CameraComponent = class {
|
|
|
2181
2380
|
this.miniCamera = void 0;
|
|
2182
2381
|
}
|
|
2183
2382
|
};
|
|
2184
|
-
CameraComponent =
|
|
2383
|
+
CameraComponent = _ts_decorate6([
|
|
2185
2384
|
singleton_default(),
|
|
2186
|
-
|
|
2385
|
+
_ts_param2(0, inject_default(SizesComponent)),
|
|
2386
|
+
_ts_metadata2("design:type", Function),
|
|
2387
|
+
_ts_metadata2("design:paramtypes", [
|
|
2388
|
+
typeof SizesComponent === "undefined" ? Object : SizesComponent
|
|
2389
|
+
])
|
|
2187
2390
|
], CameraComponent);
|
|
2188
2391
|
|
|
2189
2392
|
// src/core/app/debug/debug.component.ts
|
|
2190
2393
|
import { AxesHelper, Camera as Camera2, CameraHelper, GridHelper } from "three";
|
|
2191
2394
|
import { OrbitControls } from "three/examples/jsm/Addons";
|
|
2395
|
+
function _ts_decorate7(decorators, target, key, desc) {
|
|
2396
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2397
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2398
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2399
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2400
|
+
}
|
|
2401
|
+
__name(_ts_decorate7, "_ts_decorate");
|
|
2402
|
+
function _ts_metadata3(k, v) {
|
|
2403
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2404
|
+
}
|
|
2405
|
+
__name(_ts_metadata3, "_ts_metadata");
|
|
2406
|
+
function _ts_param3(paramIndex, decorator) {
|
|
2407
|
+
return function(target, key) {
|
|
2408
|
+
decorator(target, key, paramIndex);
|
|
2409
|
+
};
|
|
2410
|
+
}
|
|
2411
|
+
__name(_ts_param3, "_ts_param");
|
|
2192
2412
|
var DebugComponent = class {
|
|
2193
|
-
|
|
2194
|
-
this
|
|
2195
|
-
this.cameraComponent = cameraComponent;
|
|
2196
|
-
this.worldComponent = worldComponent;
|
|
2413
|
+
static {
|
|
2414
|
+
__name(this, "DebugComponent");
|
|
2197
2415
|
}
|
|
2198
|
-
|
|
2416
|
+
appComponent;
|
|
2417
|
+
cameraComponent;
|
|
2418
|
+
worldComponent;
|
|
2419
|
+
enabled;
|
|
2199
2420
|
cameraControls;
|
|
2200
2421
|
miniCameraControls;
|
|
2201
2422
|
cameraHelper;
|
|
2202
2423
|
axesHelper;
|
|
2203
2424
|
gridHelper;
|
|
2425
|
+
constructor(appComponent, cameraComponent, worldComponent) {
|
|
2426
|
+
this.appComponent = appComponent;
|
|
2427
|
+
this.cameraComponent = cameraComponent;
|
|
2428
|
+
this.worldComponent = worldComponent;
|
|
2429
|
+
this.enabled = true;
|
|
2430
|
+
}
|
|
2204
2431
|
_setCameraOrbitControl() {
|
|
2205
2432
|
if (this.cameraControls) {
|
|
2206
2433
|
this.cameraControls?.dispose();
|
|
2207
2434
|
this.cameraControls = void 0;
|
|
2208
2435
|
}
|
|
2209
|
-
if (!this.enabled || !(this.cameraComponent.instance instanceof Camera2))
|
|
2210
|
-
return;
|
|
2436
|
+
if (!this.enabled || !(this.cameraComponent.instance instanceof Camera2)) return;
|
|
2211
2437
|
if (this.cameraComponent.instance instanceof Camera2) {
|
|
2212
|
-
this.cameraControls = new OrbitControls(
|
|
2213
|
-
this.cameraComponent.instance,
|
|
2214
|
-
this.appComponent.proxyReceiver
|
|
2215
|
-
);
|
|
2438
|
+
this.cameraControls = new OrbitControls(this.cameraComponent.instance, this.appComponent.proxyReceiver);
|
|
2216
2439
|
if (this.cameraControls) this.cameraControls.enableDamping = true;
|
|
2217
2440
|
}
|
|
2218
2441
|
}
|
|
@@ -2223,10 +2446,7 @@ var DebugComponent = class {
|
|
|
2223
2446
|
}
|
|
2224
2447
|
if (!this.enabled) return;
|
|
2225
2448
|
if (this.cameraComponent.miniCamera) {
|
|
2226
|
-
this.miniCameraControls = new OrbitControls(
|
|
2227
|
-
this.cameraComponent.miniCamera,
|
|
2228
|
-
this.appComponent.proxyReceiver
|
|
2229
|
-
);
|
|
2449
|
+
this.miniCameraControls = new OrbitControls(this.cameraComponent.miniCamera, this.appComponent.proxyReceiver);
|
|
2230
2450
|
this.miniCameraControls.enableDamping = true;
|
|
2231
2451
|
}
|
|
2232
2452
|
}
|
|
@@ -2253,10 +2473,8 @@ var DebugComponent = class {
|
|
|
2253
2473
|
this._setCameraOrbitControl();
|
|
2254
2474
|
this._setMiniCameraOrbitControls();
|
|
2255
2475
|
this._setCameraHelper();
|
|
2256
|
-
if (typeof props?.axesSizes === "number")
|
|
2257
|
-
|
|
2258
|
-
if (typeof props?.gridSizes === "number")
|
|
2259
|
-
this._setGridHelper(props.gridSizes);
|
|
2476
|
+
if (typeof props?.axesSizes === "number") this._setAxesHelper(props.axesSizes);
|
|
2477
|
+
if (typeof props?.gridSizes === "number") this._setGridHelper(props.gridSizes);
|
|
2260
2478
|
}
|
|
2261
2479
|
update() {
|
|
2262
2480
|
if (!this.enabled) return;
|
|
@@ -2278,23 +2496,55 @@ var DebugComponent = class {
|
|
|
2278
2496
|
}
|
|
2279
2497
|
}
|
|
2280
2498
|
};
|
|
2281
|
-
DebugComponent =
|
|
2499
|
+
DebugComponent = _ts_decorate7([
|
|
2282
2500
|
singleton_default(),
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2501
|
+
_ts_param3(0, inject_default(AppComponent)),
|
|
2502
|
+
_ts_param3(1, inject_default(CameraComponent)),
|
|
2503
|
+
_ts_param3(2, inject_default(WorldComponent)),
|
|
2504
|
+
_ts_metadata3("design:type", Function),
|
|
2505
|
+
_ts_metadata3("design:paramtypes", [
|
|
2506
|
+
typeof AppComponent === "undefined" ? Object : AppComponent,
|
|
2507
|
+
typeof CameraComponent === "undefined" ? Object : CameraComponent,
|
|
2508
|
+
typeof WorldComponent === "undefined" ? Object : WorldComponent
|
|
2509
|
+
])
|
|
2286
2510
|
], DebugComponent);
|
|
2287
2511
|
|
|
2288
2512
|
// src/core/app/renderer/renderer.component.ts
|
|
2289
|
-
|
|
2513
|
+
function _ts_decorate8(decorators, target, key, desc) {
|
|
2514
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2515
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2516
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2517
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2518
|
+
}
|
|
2519
|
+
__name(_ts_decorate8, "_ts_decorate");
|
|
2520
|
+
function _ts_metadata4(k, v) {
|
|
2521
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2522
|
+
}
|
|
2523
|
+
__name(_ts_metadata4, "_ts_metadata");
|
|
2524
|
+
function _ts_param4(paramIndex, decorator) {
|
|
2525
|
+
return function(target, key) {
|
|
2526
|
+
decorator(target, key, paramIndex);
|
|
2527
|
+
};
|
|
2528
|
+
}
|
|
2529
|
+
__name(_ts_param4, "_ts_param");
|
|
2530
|
+
var RendererComponent = class _RendererComponent {
|
|
2531
|
+
static {
|
|
2532
|
+
__name(this, "RendererComponent");
|
|
2533
|
+
}
|
|
2534
|
+
worldComponent;
|
|
2535
|
+
cameraComponent;
|
|
2536
|
+
sizesComponent;
|
|
2537
|
+
debugComponent;
|
|
2538
|
+
static RENDERER_PIXEL_RATIO = 1;
|
|
2539
|
+
enabled;
|
|
2540
|
+
instance;
|
|
2290
2541
|
constructor(worldComponent, cameraComponent, sizesComponent, debugComponent) {
|
|
2291
2542
|
this.worldComponent = worldComponent;
|
|
2292
2543
|
this.cameraComponent = cameraComponent;
|
|
2293
2544
|
this.sizesComponent = sizesComponent;
|
|
2294
2545
|
this.debugComponent = debugComponent;
|
|
2546
|
+
this.enabled = true;
|
|
2295
2547
|
}
|
|
2296
|
-
enabled = true;
|
|
2297
|
-
instance;
|
|
2298
2548
|
init(canvas) {
|
|
2299
2549
|
this.instance = new WebGLRenderer({
|
|
2300
2550
|
canvas,
|
|
@@ -2307,7 +2557,7 @@ var RendererComponent = class {
|
|
|
2307
2557
|
antialias: true
|
|
2308
2558
|
});
|
|
2309
2559
|
this.instance.autoClear = false;
|
|
2310
|
-
this.instance.setPixelRatio(
|
|
2560
|
+
this.instance.setPixelRatio(_RendererComponent.RENDERER_PIXEL_RATIO);
|
|
2311
2561
|
this.instance.setClearColor(0, 0);
|
|
2312
2562
|
this.instance.shadowMap.enabled = true;
|
|
2313
2563
|
this.instance.shadowMap.type = PCFSoftShadowMap;
|
|
@@ -2319,78 +2569,88 @@ var RendererComponent = class {
|
|
|
2319
2569
|
this.instance?.setSize(width, height);
|
|
2320
2570
|
}
|
|
2321
2571
|
render() {
|
|
2322
|
-
if (!(this.enabled && this.cameraComponent.instance instanceof Camera3 && this.instance instanceof WebGLRenderer))
|
|
2323
|
-
|
|
2324
|
-
this.instance.
|
|
2325
|
-
0,
|
|
2326
|
-
0,
|
|
2327
|
-
this.sizesComponent.width,
|
|
2328
|
-
this.sizesComponent.height
|
|
2329
|
-
);
|
|
2330
|
-
this.instance.render(
|
|
2331
|
-
this.worldComponent.scene,
|
|
2332
|
-
this.cameraComponent.instance
|
|
2333
|
-
);
|
|
2572
|
+
if (!(this.enabled && this.cameraComponent.instance instanceof Camera3 && this.instance instanceof WebGLRenderer)) return;
|
|
2573
|
+
this.instance.setViewport(0, 0, this.sizesComponent.width, this.sizesComponent.height);
|
|
2574
|
+
this.instance.render(this.worldComponent.scene, this.cameraComponent.instance);
|
|
2334
2575
|
if (this.debugComponent.enabled && this.cameraComponent.miniCamera) {
|
|
2335
2576
|
this.instance.setScissorTest(true);
|
|
2336
|
-
this.instance.setViewport(
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
this.sizesComponent.width / 3,
|
|
2340
|
-
this.sizesComponent.height / 3
|
|
2341
|
-
);
|
|
2342
|
-
this.instance.setScissor(
|
|
2343
|
-
this.sizesComponent.width - this.sizesComponent.width / 3,
|
|
2344
|
-
this.sizesComponent.height - this.sizesComponent.height / 3,
|
|
2345
|
-
this.sizesComponent.width / 3,
|
|
2346
|
-
this.sizesComponent.height / 3
|
|
2347
|
-
);
|
|
2348
|
-
this.instance.render(
|
|
2349
|
-
this.worldComponent.scene,
|
|
2350
|
-
this.cameraComponent.miniCamera
|
|
2351
|
-
);
|
|
2577
|
+
this.instance.setViewport(this.sizesComponent.width - this.sizesComponent.width / 3, this.sizesComponent.height - this.sizesComponent.height / 3, this.sizesComponent.width / 3, this.sizesComponent.height / 3);
|
|
2578
|
+
this.instance.setScissor(this.sizesComponent.width - this.sizesComponent.width / 3, this.sizesComponent.height - this.sizesComponent.height / 3, this.sizesComponent.width / 3, this.sizesComponent.height / 3);
|
|
2579
|
+
this.instance.render(this.worldComponent.scene, this.cameraComponent.miniCamera);
|
|
2352
2580
|
this.instance.setScissorTest(false);
|
|
2353
2581
|
}
|
|
2354
2582
|
}
|
|
2355
2583
|
};
|
|
2356
|
-
|
|
2357
|
-
RendererComponent = __decorateClass([
|
|
2584
|
+
RendererComponent = _ts_decorate8([
|
|
2358
2585
|
singleton_default(),
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2586
|
+
_ts_param4(0, inject_default(WorldComponent)),
|
|
2587
|
+
_ts_param4(1, inject_default(CameraComponent)),
|
|
2588
|
+
_ts_param4(2, inject_default(SizesComponent)),
|
|
2589
|
+
_ts_param4(3, inject_default(DebugComponent)),
|
|
2590
|
+
_ts_metadata4("design:type", Function),
|
|
2591
|
+
_ts_metadata4("design:paramtypes", [
|
|
2592
|
+
typeof WorldComponent === "undefined" ? Object : WorldComponent,
|
|
2593
|
+
typeof CameraComponent === "undefined" ? Object : CameraComponent,
|
|
2594
|
+
typeof SizesComponent === "undefined" ? Object : SizesComponent,
|
|
2595
|
+
typeof DebugComponent === "undefined" ? Object : DebugComponent
|
|
2596
|
+
])
|
|
2363
2597
|
], RendererComponent);
|
|
2364
2598
|
|
|
2365
2599
|
// src/core/app/timer/timer.controller.ts
|
|
2366
2600
|
import { Subject as Subject2 } from "rxjs";
|
|
2367
2601
|
|
|
2368
2602
|
// src/common/enums/lifecycle.enum.ts
|
|
2369
|
-
var RegisterLifecycleState = /* @__PURE__ */ (
|
|
2603
|
+
var RegisterLifecycleState = /* @__PURE__ */ function(RegisterLifecycleState2) {
|
|
2370
2604
|
RegisterLifecycleState2[RegisterLifecycleState2["INITIALIZED"] = 0] = "INITIALIZED";
|
|
2371
2605
|
RegisterLifecycleState2[RegisterLifecycleState2["DISPOSED"] = 1] = "DISPOSED";
|
|
2372
2606
|
return RegisterLifecycleState2;
|
|
2373
|
-
}
|
|
2374
|
-
var AppLifecycleState = /* @__PURE__ */ (
|
|
2607
|
+
}({});
|
|
2608
|
+
var AppLifecycleState = /* @__PURE__ */ function(AppLifecycleState2) {
|
|
2375
2609
|
AppLifecycleState2[AppLifecycleState2["INITIALIZED"] = 0] = "INITIALIZED";
|
|
2376
2610
|
AppLifecycleState2[AppLifecycleState2["STEP_STARTED"] = 1] = "STEP_STARTED";
|
|
2377
2611
|
AppLifecycleState2[AppLifecycleState2["STEP_ENDED"] = 2] = "STEP_ENDED";
|
|
2378
2612
|
AppLifecycleState2[AppLifecycleState2["DISPOSED"] = 3] = "DISPOSED";
|
|
2379
2613
|
return AppLifecycleState2;
|
|
2380
|
-
}
|
|
2614
|
+
}({});
|
|
2381
2615
|
|
|
2382
2616
|
// src/core/app/timer/timer.controller.ts
|
|
2617
|
+
function _ts_decorate9(decorators, target, key, desc) {
|
|
2618
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2619
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2620
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2621
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2622
|
+
}
|
|
2623
|
+
__name(_ts_decorate9, "_ts_decorate");
|
|
2624
|
+
function _ts_metadata5(k, v) {
|
|
2625
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2626
|
+
}
|
|
2627
|
+
__name(_ts_metadata5, "_ts_metadata");
|
|
2628
|
+
function _ts_param5(paramIndex, decorator) {
|
|
2629
|
+
return function(target, key) {
|
|
2630
|
+
decorator(target, key, paramIndex);
|
|
2631
|
+
};
|
|
2632
|
+
}
|
|
2633
|
+
__name(_ts_param5, "_ts_param");
|
|
2383
2634
|
var TimerController = class {
|
|
2635
|
+
static {
|
|
2636
|
+
__name(this, "TimerController");
|
|
2637
|
+
}
|
|
2638
|
+
component;
|
|
2639
|
+
appController;
|
|
2640
|
+
step$$;
|
|
2641
|
+
enable$$;
|
|
2642
|
+
step$;
|
|
2643
|
+
enable$;
|
|
2384
2644
|
constructor(component, appController) {
|
|
2385
2645
|
this.component = component;
|
|
2386
2646
|
this.appController = appController;
|
|
2647
|
+
this.step$$ = new Subject2();
|
|
2648
|
+
this.enable$$ = new Subject2();
|
|
2649
|
+
this.step$ = this.step$$.pipe();
|
|
2650
|
+
this.enable$ = this.enable$$.pipe();
|
|
2387
2651
|
}
|
|
2388
|
-
step$$ = new Subject2();
|
|
2389
|
-
enable$$ = new Subject2();
|
|
2390
|
-
step$ = this.step$$.pipe();
|
|
2391
|
-
enable$ = this.enable$$.pipe();
|
|
2392
2652
|
step() {
|
|
2393
|
-
this.appController.lifecycle$$.next(
|
|
2653
|
+
this.appController.lifecycle$$.next(AppLifecycleState.STEP_STARTED);
|
|
2394
2654
|
if (this.component.enabled) {
|
|
2395
2655
|
this.component.delta = this.component.clock.getDelta() ?? this.component.frame;
|
|
2396
2656
|
this.component.deltaRatio = this.component.delta * 1e3 / this.component.frame;
|
|
@@ -2399,17 +2659,45 @@ var TimerController = class {
|
|
|
2399
2659
|
deltaRatio: this.component.deltaRatio
|
|
2400
2660
|
});
|
|
2401
2661
|
}
|
|
2402
|
-
this.appController.lifecycle$$.next(
|
|
2662
|
+
this.appController.lifecycle$$.next(AppLifecycleState.STEP_ENDED);
|
|
2403
2663
|
}
|
|
2404
2664
|
};
|
|
2405
|
-
TimerController =
|
|
2665
|
+
TimerController = _ts_decorate9([
|
|
2406
2666
|
singleton_default(),
|
|
2407
|
-
|
|
2408
|
-
|
|
2667
|
+
_ts_param5(0, inject_default(TimerComponent)),
|
|
2668
|
+
_ts_param5(1, inject_default(AppController)),
|
|
2669
|
+
_ts_metadata5("design:type", Function),
|
|
2670
|
+
_ts_metadata5("design:paramtypes", [
|
|
2671
|
+
typeof TimerComponent === "undefined" ? Object : TimerComponent,
|
|
2672
|
+
typeof AppController === "undefined" ? Object : AppController
|
|
2673
|
+
])
|
|
2409
2674
|
], TimerController);
|
|
2410
2675
|
|
|
2411
2676
|
// src/core/app/timer/timer.module.ts
|
|
2677
|
+
function _ts_decorate10(decorators, target, key, desc) {
|
|
2678
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2679
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2680
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2681
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2682
|
+
}
|
|
2683
|
+
__name(_ts_decorate10, "_ts_decorate");
|
|
2684
|
+
function _ts_metadata6(k, v) {
|
|
2685
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2686
|
+
}
|
|
2687
|
+
__name(_ts_metadata6, "_ts_metadata");
|
|
2688
|
+
function _ts_param6(paramIndex, decorator) {
|
|
2689
|
+
return function(target, key) {
|
|
2690
|
+
decorator(target, key, paramIndex);
|
|
2691
|
+
};
|
|
2692
|
+
}
|
|
2693
|
+
__name(_ts_param6, "_ts_param");
|
|
2412
2694
|
var TimerModule = class {
|
|
2695
|
+
static {
|
|
2696
|
+
__name(this, "TimerModule");
|
|
2697
|
+
}
|
|
2698
|
+
component;
|
|
2699
|
+
controller;
|
|
2700
|
+
rendererComponent;
|
|
2413
2701
|
constructor(component, controller, rendererComponent) {
|
|
2414
2702
|
this.component = component;
|
|
2415
2703
|
this.controller = controller;
|
|
@@ -2418,10 +2706,7 @@ var TimerModule = class {
|
|
|
2418
2706
|
init(startTimer) {
|
|
2419
2707
|
this.controller.enable$.subscribe((status) => {
|
|
2420
2708
|
this.component.enabled = !!status;
|
|
2421
|
-
if (status)
|
|
2422
|
-
this.rendererComponent.instance?.setAnimationLoop(
|
|
2423
|
-
this.controller.step.bind(this.controller)
|
|
2424
|
-
);
|
|
2709
|
+
if (status) this.rendererComponent.instance?.setAnimationLoop(this.controller.step.bind(this.controller));
|
|
2425
2710
|
else this.rendererComponent.instance?.setAnimationLoop(null);
|
|
2426
2711
|
});
|
|
2427
2712
|
if (startTimer) this.enabled(true);
|
|
@@ -2455,41 +2740,94 @@ var TimerModule = class {
|
|
|
2455
2740
|
return this.controller.step$;
|
|
2456
2741
|
}
|
|
2457
2742
|
};
|
|
2458
|
-
TimerModule =
|
|
2743
|
+
TimerModule = _ts_decorate10([
|
|
2459
2744
|
singleton_default(),
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2745
|
+
_ts_param6(0, inject_default(TimerComponent)),
|
|
2746
|
+
_ts_param6(1, inject_default(TimerController)),
|
|
2747
|
+
_ts_param6(2, inject_default(RendererComponent)),
|
|
2748
|
+
_ts_metadata6("design:type", Function),
|
|
2749
|
+
_ts_metadata6("design:paramtypes", [
|
|
2750
|
+
typeof TimerComponent === "undefined" ? Object : TimerComponent,
|
|
2751
|
+
typeof TimerController === "undefined" ? Object : TimerController,
|
|
2752
|
+
typeof RendererComponent === "undefined" ? Object : RendererComponent
|
|
2753
|
+
])
|
|
2463
2754
|
], TimerModule);
|
|
2464
2755
|
|
|
2465
2756
|
// src/core/app/camera/camera.module.ts
|
|
2466
|
-
import {
|
|
2467
|
-
OrthographicCamera as OrthographicCamera2,
|
|
2468
|
-
PerspectiveCamera as PerspectiveCamera2
|
|
2469
|
-
} from "three";
|
|
2757
|
+
import { OrthographicCamera as OrthographicCamera2, PerspectiveCamera as PerspectiveCamera2 } from "three";
|
|
2470
2758
|
|
|
2471
2759
|
// src/core/app/camera/camera.controller.ts
|
|
2472
2760
|
import { filter, Subject as Subject3 } from "rxjs";
|
|
2761
|
+
function _ts_decorate11(decorators, target, key, desc) {
|
|
2762
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2763
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2764
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2765
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2766
|
+
}
|
|
2767
|
+
__name(_ts_decorate11, "_ts_decorate");
|
|
2768
|
+
function _ts_metadata7(k, v) {
|
|
2769
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2770
|
+
}
|
|
2771
|
+
__name(_ts_metadata7, "_ts_metadata");
|
|
2772
|
+
function _ts_param7(paramIndex, decorator) {
|
|
2773
|
+
return function(target, key) {
|
|
2774
|
+
decorator(target, key, paramIndex);
|
|
2775
|
+
};
|
|
2776
|
+
}
|
|
2777
|
+
__name(_ts_param7, "_ts_param");
|
|
2473
2778
|
var CameraController = class {
|
|
2779
|
+
static {
|
|
2780
|
+
__name(this, "CameraController");
|
|
2781
|
+
}
|
|
2782
|
+
component;
|
|
2783
|
+
timerController;
|
|
2784
|
+
enable$$;
|
|
2785
|
+
enable$;
|
|
2786
|
+
step$;
|
|
2474
2787
|
constructor(component, timerController) {
|
|
2475
2788
|
this.component = component;
|
|
2476
2789
|
this.timerController = timerController;
|
|
2477
|
-
this.
|
|
2478
|
-
|
|
2479
|
-
);
|
|
2790
|
+
this.enable$$ = new Subject3();
|
|
2791
|
+
this.enable$ = this.enable$$.pipe();
|
|
2792
|
+
this.step$ = this.timerController.step$.pipe(filter(() => this.component.enabled));
|
|
2480
2793
|
}
|
|
2481
|
-
enable$$ = new Subject3();
|
|
2482
|
-
enable$ = this.enable$$.pipe();
|
|
2483
|
-
step$;
|
|
2484
2794
|
};
|
|
2485
|
-
CameraController =
|
|
2795
|
+
CameraController = _ts_decorate11([
|
|
2486
2796
|
singleton_default(),
|
|
2487
|
-
|
|
2488
|
-
|
|
2797
|
+
_ts_param7(0, inject_default(CameraComponent)),
|
|
2798
|
+
_ts_param7(1, inject_default(TimerController)),
|
|
2799
|
+
_ts_metadata7("design:type", Function),
|
|
2800
|
+
_ts_metadata7("design:paramtypes", [
|
|
2801
|
+
typeof CameraComponent === "undefined" ? Object : CameraComponent,
|
|
2802
|
+
typeof TimerController === "undefined" ? Object : TimerController
|
|
2803
|
+
])
|
|
2489
2804
|
], CameraController);
|
|
2490
2805
|
|
|
2491
2806
|
// src/core/app/camera/camera.module.ts
|
|
2807
|
+
function _ts_decorate12(decorators, target, key, desc) {
|
|
2808
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2809
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2810
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2811
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2812
|
+
}
|
|
2813
|
+
__name(_ts_decorate12, "_ts_decorate");
|
|
2814
|
+
function _ts_metadata8(k, v) {
|
|
2815
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2816
|
+
}
|
|
2817
|
+
__name(_ts_metadata8, "_ts_metadata");
|
|
2818
|
+
function _ts_param8(paramIndex, decorator) {
|
|
2819
|
+
return function(target, key) {
|
|
2820
|
+
decorator(target, key, paramIndex);
|
|
2821
|
+
};
|
|
2822
|
+
}
|
|
2823
|
+
__name(_ts_param8, "_ts_param");
|
|
2492
2824
|
var CameraModule = class {
|
|
2825
|
+
static {
|
|
2826
|
+
__name(this, "CameraModule");
|
|
2827
|
+
}
|
|
2828
|
+
component;
|
|
2829
|
+
sizesComponent;
|
|
2830
|
+
controller;
|
|
2493
2831
|
constructor(component, sizesComponent, controller) {
|
|
2494
2832
|
this.component = component;
|
|
2495
2833
|
this.sizesComponent = sizesComponent;
|
|
@@ -2504,8 +2842,7 @@ var CameraModule = class {
|
|
|
2504
2842
|
this.controller.step$.subscribe(() => {
|
|
2505
2843
|
if (!this.component.enabled) return;
|
|
2506
2844
|
this.component.aspectRatio = this.sizesComponent.aspect;
|
|
2507
|
-
if (this.component.instance instanceof PerspectiveCamera2 || this.component.instance instanceof OrthographicCamera2)
|
|
2508
|
-
this.component.instance?.updateProjectionMatrix();
|
|
2845
|
+
if (this.component.instance instanceof PerspectiveCamera2 || this.component.instance instanceof OrthographicCamera2) this.component.instance?.updateProjectionMatrix();
|
|
2509
2846
|
this.component.miniCamera?.updateProjectionMatrix();
|
|
2510
2847
|
});
|
|
2511
2848
|
}
|
|
@@ -2541,11 +2878,17 @@ var CameraModule = class {
|
|
|
2541
2878
|
return this.controller.enable$;
|
|
2542
2879
|
}
|
|
2543
2880
|
};
|
|
2544
|
-
CameraModule =
|
|
2881
|
+
CameraModule = _ts_decorate12([
|
|
2545
2882
|
singleton_default(),
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2883
|
+
_ts_param8(0, inject_default(CameraComponent)),
|
|
2884
|
+
_ts_param8(1, inject_default(SizesComponent)),
|
|
2885
|
+
_ts_param8(2, inject_default(CameraController)),
|
|
2886
|
+
_ts_metadata8("design:type", Function),
|
|
2887
|
+
_ts_metadata8("design:paramtypes", [
|
|
2888
|
+
typeof CameraComponent === "undefined" ? Object : CameraComponent,
|
|
2889
|
+
typeof SizesComponent === "undefined" ? Object : SizesComponent,
|
|
2890
|
+
typeof CameraController === "undefined" ? Object : CameraController
|
|
2891
|
+
])
|
|
2549
2892
|
], CameraModule);
|
|
2550
2893
|
|
|
2551
2894
|
// src/core/app/renderer/renderer.controller.ts
|
|
@@ -2553,51 +2896,127 @@ import { filter as filter3, Subject as Subject5 } from "rxjs";
|
|
|
2553
2896
|
|
|
2554
2897
|
// src/core/app/sizes/sizes.controller.ts
|
|
2555
2898
|
import { filter as filter2, Subject as Subject4 } from "rxjs";
|
|
2899
|
+
function _ts_decorate13(decorators, target, key, desc) {
|
|
2900
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2901
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2902
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2903
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2904
|
+
}
|
|
2905
|
+
__name(_ts_decorate13, "_ts_decorate");
|
|
2906
|
+
function _ts_metadata9(k, v) {
|
|
2907
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2908
|
+
}
|
|
2909
|
+
__name(_ts_metadata9, "_ts_metadata");
|
|
2910
|
+
function _ts_param9(paramIndex, decorator) {
|
|
2911
|
+
return function(target, key) {
|
|
2912
|
+
decorator(target, key, paramIndex);
|
|
2913
|
+
};
|
|
2914
|
+
}
|
|
2915
|
+
__name(_ts_param9, "_ts_param");
|
|
2556
2916
|
var SizesController = class {
|
|
2917
|
+
static {
|
|
2918
|
+
__name(this, "SizesController");
|
|
2919
|
+
}
|
|
2920
|
+
appController;
|
|
2921
|
+
component;
|
|
2922
|
+
enable$$;
|
|
2923
|
+
enable$;
|
|
2924
|
+
resize$;
|
|
2557
2925
|
constructor(appController, component) {
|
|
2558
2926
|
this.appController = appController;
|
|
2559
2927
|
this.component = component;
|
|
2560
|
-
this.
|
|
2561
|
-
|
|
2562
|
-
);
|
|
2928
|
+
this.enable$$ = new Subject4();
|
|
2929
|
+
this.enable$ = this.enable$$.pipe();
|
|
2930
|
+
this.resize$ = this.appController.resize$$.pipe(filter2(() => this.component.enabled));
|
|
2563
2931
|
}
|
|
2564
|
-
enable$$ = new Subject4();
|
|
2565
|
-
enable$ = this.enable$$.pipe();
|
|
2566
|
-
resize$;
|
|
2567
2932
|
};
|
|
2568
|
-
SizesController =
|
|
2933
|
+
SizesController = _ts_decorate13([
|
|
2569
2934
|
singleton_default(),
|
|
2570
|
-
|
|
2571
|
-
|
|
2935
|
+
_ts_param9(0, inject_default(AppController)),
|
|
2936
|
+
_ts_param9(1, inject_default(SizesComponent)),
|
|
2937
|
+
_ts_metadata9("design:type", Function),
|
|
2938
|
+
_ts_metadata9("design:paramtypes", [
|
|
2939
|
+
typeof AppController === "undefined" ? Object : AppController,
|
|
2940
|
+
typeof SizesComponent === "undefined" ? Object : SizesComponent
|
|
2941
|
+
])
|
|
2572
2942
|
], SizesController);
|
|
2573
2943
|
|
|
2574
2944
|
// src/core/app/renderer/renderer.controller.ts
|
|
2945
|
+
function _ts_decorate14(decorators, target, key, desc) {
|
|
2946
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2947
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2948
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2949
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2950
|
+
}
|
|
2951
|
+
__name(_ts_decorate14, "_ts_decorate");
|
|
2952
|
+
function _ts_metadata10(k, v) {
|
|
2953
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2954
|
+
}
|
|
2955
|
+
__name(_ts_metadata10, "_ts_metadata");
|
|
2956
|
+
function _ts_param10(paramIndex, decorator) {
|
|
2957
|
+
return function(target, key) {
|
|
2958
|
+
decorator(target, key, paramIndex);
|
|
2959
|
+
};
|
|
2960
|
+
}
|
|
2961
|
+
__name(_ts_param10, "_ts_param");
|
|
2575
2962
|
var RendererController = class {
|
|
2963
|
+
static {
|
|
2964
|
+
__name(this, "RendererController");
|
|
2965
|
+
}
|
|
2966
|
+
rendererComponent;
|
|
2967
|
+
timerController;
|
|
2968
|
+
sizesController;
|
|
2969
|
+
enable$$;
|
|
2970
|
+
enable$;
|
|
2971
|
+
step$;
|
|
2972
|
+
resize$;
|
|
2576
2973
|
constructor(rendererComponent, timerController, sizesController) {
|
|
2577
2974
|
this.rendererComponent = rendererComponent;
|
|
2578
2975
|
this.timerController = timerController;
|
|
2579
2976
|
this.sizesController = sizesController;
|
|
2580
|
-
this.
|
|
2581
|
-
|
|
2582
|
-
);
|
|
2583
|
-
this.resize$ = this.sizesController.resize$.pipe(
|
|
2584
|
-
|
|
2585
|
-
);
|
|
2586
|
-
}
|
|
2587
|
-
enable$$ = new Subject5();
|
|
2588
|
-
enable$ = this.enable$$.pipe();
|
|
2589
|
-
step$;
|
|
2590
|
-
resize$;
|
|
2977
|
+
this.enable$$ = new Subject5();
|
|
2978
|
+
this.enable$ = this.enable$$.pipe();
|
|
2979
|
+
this.step$ = this.timerController.step$.pipe(filter3(() => this.rendererComponent.enabled));
|
|
2980
|
+
this.resize$ = this.sizesController.resize$.pipe(filter3(() => this.rendererComponent.enabled));
|
|
2981
|
+
}
|
|
2591
2982
|
};
|
|
2592
|
-
RendererController =
|
|
2983
|
+
RendererController = _ts_decorate14([
|
|
2593
2984
|
singleton_default(),
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2985
|
+
_ts_param10(0, inject_default(RendererComponent)),
|
|
2986
|
+
_ts_param10(1, inject_default(TimerController)),
|
|
2987
|
+
_ts_param10(2, inject_default(SizesController)),
|
|
2988
|
+
_ts_metadata10("design:type", Function),
|
|
2989
|
+
_ts_metadata10("design:paramtypes", [
|
|
2990
|
+
typeof RendererComponent === "undefined" ? Object : RendererComponent,
|
|
2991
|
+
typeof TimerController === "undefined" ? Object : TimerController,
|
|
2992
|
+
typeof SizesController === "undefined" ? Object : SizesController
|
|
2993
|
+
])
|
|
2597
2994
|
], RendererController);
|
|
2598
2995
|
|
|
2599
2996
|
// src/core/app/renderer/renderer.module.ts
|
|
2997
|
+
function _ts_decorate15(decorators, target, key, desc) {
|
|
2998
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2999
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3000
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3001
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3002
|
+
}
|
|
3003
|
+
__name(_ts_decorate15, "_ts_decorate");
|
|
3004
|
+
function _ts_metadata11(k, v) {
|
|
3005
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3006
|
+
}
|
|
3007
|
+
__name(_ts_metadata11, "_ts_metadata");
|
|
3008
|
+
function _ts_param11(paramIndex, decorator) {
|
|
3009
|
+
return function(target, key) {
|
|
3010
|
+
decorator(target, key, paramIndex);
|
|
3011
|
+
};
|
|
3012
|
+
}
|
|
3013
|
+
__name(_ts_param11, "_ts_param");
|
|
2600
3014
|
var RendererModule = class {
|
|
3015
|
+
static {
|
|
3016
|
+
__name(this, "RendererModule");
|
|
3017
|
+
}
|
|
3018
|
+
component;
|
|
3019
|
+
controller;
|
|
2601
3020
|
constructor(component, controller) {
|
|
2602
3021
|
this.component = component;
|
|
2603
3022
|
this.controller = controller;
|
|
@@ -2607,9 +3026,7 @@ var RendererModule = class {
|
|
|
2607
3026
|
this.component.enabled = !!status;
|
|
2608
3027
|
});
|
|
2609
3028
|
this.controller.step$.subscribe(() => this.component.render());
|
|
2610
|
-
this.controller.resize$.subscribe(
|
|
2611
|
-
(size) => this.component.setSize(size.windowWidth, size.windowHeight)
|
|
2612
|
-
);
|
|
3029
|
+
this.controller.resize$.subscribe((size) => this.component.setSize(size.windowWidth, size.windowHeight));
|
|
2613
3030
|
this.component.init(canvas);
|
|
2614
3031
|
}
|
|
2615
3032
|
dispose() {
|
|
@@ -2632,14 +3049,41 @@ var RendererModule = class {
|
|
|
2632
3049
|
return this.controller.enable$;
|
|
2633
3050
|
}
|
|
2634
3051
|
};
|
|
2635
|
-
RendererModule =
|
|
3052
|
+
RendererModule = _ts_decorate15([
|
|
2636
3053
|
singleton_default(),
|
|
2637
|
-
|
|
2638
|
-
|
|
3054
|
+
_ts_param11(0, inject_default(RendererComponent)),
|
|
3055
|
+
_ts_param11(1, inject_default(RendererController)),
|
|
3056
|
+
_ts_metadata11("design:type", Function),
|
|
3057
|
+
_ts_metadata11("design:paramtypes", [
|
|
3058
|
+
typeof RendererComponent === "undefined" ? Object : RendererComponent,
|
|
3059
|
+
typeof RendererController === "undefined" ? Object : RendererController
|
|
3060
|
+
])
|
|
2639
3061
|
], RendererModule);
|
|
2640
3062
|
|
|
2641
3063
|
// src/core/app/sizes/sizes.module.ts
|
|
3064
|
+
function _ts_decorate16(decorators, target, key, desc) {
|
|
3065
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3066
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3067
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3068
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3069
|
+
}
|
|
3070
|
+
__name(_ts_decorate16, "_ts_decorate");
|
|
3071
|
+
function _ts_metadata12(k, v) {
|
|
3072
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3073
|
+
}
|
|
3074
|
+
__name(_ts_metadata12, "_ts_metadata");
|
|
3075
|
+
function _ts_param12(paramIndex, decorator) {
|
|
3076
|
+
return function(target, key) {
|
|
3077
|
+
decorator(target, key, paramIndex);
|
|
3078
|
+
};
|
|
3079
|
+
}
|
|
3080
|
+
__name(_ts_param12, "_ts_param");
|
|
2642
3081
|
var SizesModule = class {
|
|
3082
|
+
static {
|
|
3083
|
+
__name(this, "SizesModule");
|
|
3084
|
+
}
|
|
3085
|
+
component;
|
|
3086
|
+
controller;
|
|
2643
3087
|
constructor(component, controller) {
|
|
2644
3088
|
this.component = component;
|
|
2645
3089
|
this.controller = controller;
|
|
@@ -2688,10 +3132,15 @@ var SizesModule = class {
|
|
|
2688
3132
|
return this.controller.resize$;
|
|
2689
3133
|
}
|
|
2690
3134
|
};
|
|
2691
|
-
SizesModule =
|
|
3135
|
+
SizesModule = _ts_decorate16([
|
|
2692
3136
|
singleton_default(),
|
|
2693
|
-
|
|
2694
|
-
|
|
3137
|
+
_ts_param12(0, inject_default(SizesComponent)),
|
|
3138
|
+
_ts_param12(1, inject_default(SizesController)),
|
|
3139
|
+
_ts_metadata12("design:type", Function),
|
|
3140
|
+
_ts_metadata12("design:paramtypes", [
|
|
3141
|
+
typeof SizesComponent === "undefined" ? Object : SizesComponent,
|
|
3142
|
+
typeof SizesController === "undefined" ? Object : SizesController
|
|
3143
|
+
])
|
|
2695
3144
|
], SizesModule);
|
|
2696
3145
|
|
|
2697
3146
|
// src/core/app/world/world.module.ts
|
|
@@ -2699,16 +3148,48 @@ import { Scene as Scene2 } from "three";
|
|
|
2699
3148
|
|
|
2700
3149
|
// src/core/app/world/world.controller.ts
|
|
2701
3150
|
import { Subject as Subject6 } from "rxjs";
|
|
3151
|
+
function _ts_decorate17(decorators, target, key, desc) {
|
|
3152
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3153
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3154
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3155
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3156
|
+
}
|
|
3157
|
+
__name(_ts_decorate17, "_ts_decorate");
|
|
2702
3158
|
var WorldController = class {
|
|
3159
|
+
static {
|
|
3160
|
+
__name(this, "WorldController");
|
|
3161
|
+
}
|
|
2703
3162
|
enable$$ = new Subject6();
|
|
2704
3163
|
enable$ = this.enable$$.pipe();
|
|
2705
3164
|
};
|
|
2706
|
-
WorldController =
|
|
3165
|
+
WorldController = _ts_decorate17([
|
|
2707
3166
|
singleton_default()
|
|
2708
3167
|
], WorldController);
|
|
2709
3168
|
|
|
2710
3169
|
// src/core/app/world/world.module.ts
|
|
3170
|
+
function _ts_decorate18(decorators, target, key, desc) {
|
|
3171
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3172
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3173
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3174
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3175
|
+
}
|
|
3176
|
+
__name(_ts_decorate18, "_ts_decorate");
|
|
3177
|
+
function _ts_metadata13(k, v) {
|
|
3178
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3179
|
+
}
|
|
3180
|
+
__name(_ts_metadata13, "_ts_metadata");
|
|
3181
|
+
function _ts_param13(paramIndex, decorator) {
|
|
3182
|
+
return function(target, key) {
|
|
3183
|
+
decorator(target, key, paramIndex);
|
|
3184
|
+
};
|
|
3185
|
+
}
|
|
3186
|
+
__name(_ts_param13, "_ts_param");
|
|
2711
3187
|
var WorldModule = class {
|
|
3188
|
+
static {
|
|
3189
|
+
__name(this, "WorldModule");
|
|
3190
|
+
}
|
|
3191
|
+
component;
|
|
3192
|
+
controller;
|
|
2712
3193
|
constructor(component, controller) {
|
|
2713
3194
|
this.component = component;
|
|
2714
3195
|
this.controller = controller;
|
|
@@ -2732,30 +3213,84 @@ var WorldModule = class {
|
|
|
2732
3213
|
return this.controller.enable$;
|
|
2733
3214
|
}
|
|
2734
3215
|
};
|
|
2735
|
-
WorldModule =
|
|
3216
|
+
WorldModule = _ts_decorate18([
|
|
2736
3217
|
singleton_default(),
|
|
2737
|
-
|
|
2738
|
-
|
|
3218
|
+
_ts_param13(0, inject_default(WorldComponent)),
|
|
3219
|
+
_ts_param13(1, inject_default(WorldController)),
|
|
3220
|
+
_ts_metadata13("design:type", Function),
|
|
3221
|
+
_ts_metadata13("design:paramtypes", [
|
|
3222
|
+
typeof WorldComponent === "undefined" ? Object : WorldComponent,
|
|
3223
|
+
typeof WorldController === "undefined" ? Object : WorldController
|
|
3224
|
+
])
|
|
2739
3225
|
], WorldModule);
|
|
2740
3226
|
|
|
2741
3227
|
// src/core/app/debug/debug.controller.ts
|
|
2742
3228
|
import { Subject as Subject7 } from "rxjs";
|
|
3229
|
+
function _ts_decorate19(decorators, target, key, desc) {
|
|
3230
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3231
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3232
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3233
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3234
|
+
}
|
|
3235
|
+
__name(_ts_decorate19, "_ts_decorate");
|
|
3236
|
+
function _ts_metadata14(k, v) {
|
|
3237
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3238
|
+
}
|
|
3239
|
+
__name(_ts_metadata14, "_ts_metadata");
|
|
3240
|
+
function _ts_param14(paramIndex, decorator) {
|
|
3241
|
+
return function(target, key) {
|
|
3242
|
+
decorator(target, key, paramIndex);
|
|
3243
|
+
};
|
|
3244
|
+
}
|
|
3245
|
+
__name(_ts_param14, "_ts_param");
|
|
2743
3246
|
var DebugController = class {
|
|
3247
|
+
static {
|
|
3248
|
+
__name(this, "DebugController");
|
|
3249
|
+
}
|
|
3250
|
+
timerController;
|
|
3251
|
+
enable$$;
|
|
3252
|
+
enable$;
|
|
3253
|
+
step$;
|
|
2744
3254
|
constructor(timerController) {
|
|
2745
3255
|
this.timerController = timerController;
|
|
3256
|
+
this.enable$$ = new Subject7();
|
|
3257
|
+
this.enable$ = this.enable$$.pipe();
|
|
2746
3258
|
this.step$ = this.timerController.step$;
|
|
2747
3259
|
}
|
|
2748
|
-
enable$$ = new Subject7();
|
|
2749
|
-
enable$ = this.enable$$.pipe();
|
|
2750
|
-
step$;
|
|
2751
3260
|
};
|
|
2752
|
-
DebugController =
|
|
3261
|
+
DebugController = _ts_decorate19([
|
|
2753
3262
|
singleton_default(),
|
|
2754
|
-
|
|
3263
|
+
_ts_param14(0, inject_default(TimerController)),
|
|
3264
|
+
_ts_metadata14("design:type", Function),
|
|
3265
|
+
_ts_metadata14("design:paramtypes", [
|
|
3266
|
+
typeof TimerController === "undefined" ? Object : TimerController
|
|
3267
|
+
])
|
|
2755
3268
|
], DebugController);
|
|
2756
3269
|
|
|
2757
3270
|
// src/core/app/debug/debug.module.ts
|
|
3271
|
+
function _ts_decorate20(decorators, target, key, desc) {
|
|
3272
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3273
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3274
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3275
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3276
|
+
}
|
|
3277
|
+
__name(_ts_decorate20, "_ts_decorate");
|
|
3278
|
+
function _ts_metadata15(k, v) {
|
|
3279
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3280
|
+
}
|
|
3281
|
+
__name(_ts_metadata15, "_ts_metadata");
|
|
3282
|
+
function _ts_param15(paramIndex, decorator) {
|
|
3283
|
+
return function(target, key) {
|
|
3284
|
+
decorator(target, key, paramIndex);
|
|
3285
|
+
};
|
|
3286
|
+
}
|
|
3287
|
+
__name(_ts_param15, "_ts_param");
|
|
2758
3288
|
var DebugModule = class {
|
|
3289
|
+
static {
|
|
3290
|
+
__name(this, "DebugModule");
|
|
3291
|
+
}
|
|
3292
|
+
component;
|
|
3293
|
+
controller;
|
|
2759
3294
|
constructor(component, controller) {
|
|
2760
3295
|
this.component = component;
|
|
2761
3296
|
this.controller = controller;
|
|
@@ -2792,14 +3327,22 @@ var DebugModule = class {
|
|
|
2792
3327
|
return this.controller.enable$;
|
|
2793
3328
|
}
|
|
2794
3329
|
};
|
|
2795
|
-
DebugModule =
|
|
3330
|
+
DebugModule = _ts_decorate20([
|
|
2796
3331
|
singleton_default(),
|
|
2797
|
-
|
|
2798
|
-
|
|
3332
|
+
_ts_param15(0, inject_default(DebugComponent)),
|
|
3333
|
+
_ts_param15(1, inject_default(DebugController)),
|
|
3334
|
+
_ts_metadata15("design:type", Function),
|
|
3335
|
+
_ts_metadata15("design:paramtypes", [
|
|
3336
|
+
typeof DebugComponent === "undefined" ? Object : DebugComponent,
|
|
3337
|
+
typeof DebugController === "undefined" ? Object : DebugController
|
|
3338
|
+
])
|
|
2799
3339
|
], DebugModule);
|
|
2800
3340
|
|
|
2801
3341
|
// src/common/models/app-proxy-event-handler.model.ts
|
|
2802
3342
|
var AppProxyEventHandlersModel = class {
|
|
3343
|
+
static {
|
|
3344
|
+
__name(this, "AppProxyEventHandlersModel");
|
|
3345
|
+
}
|
|
2803
3346
|
contextmenu$;
|
|
2804
3347
|
resize$;
|
|
2805
3348
|
mousedown$;
|
|
@@ -2831,17 +3374,37 @@ var AppProxyEventHandlersModel = class {
|
|
|
2831
3374
|
};
|
|
2832
3375
|
|
|
2833
3376
|
// src/core/app/app.module.ts
|
|
3377
|
+
function _ts_decorate21(decorators, target, key, desc) {
|
|
3378
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3379
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3380
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3381
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3382
|
+
}
|
|
3383
|
+
__name(_ts_decorate21, "_ts_decorate");
|
|
3384
|
+
function _ts_metadata16(k, v) {
|
|
3385
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3386
|
+
}
|
|
3387
|
+
__name(_ts_metadata16, "_ts_metadata");
|
|
3388
|
+
function _ts_param16(paramIndex, decorator) {
|
|
3389
|
+
return function(target, key) {
|
|
3390
|
+
decorator(target, key, paramIndex);
|
|
3391
|
+
};
|
|
3392
|
+
}
|
|
3393
|
+
__name(_ts_param16, "_ts_param");
|
|
2834
3394
|
var AppModule = class extends AppProxyEventHandlersModel {
|
|
3395
|
+
static {
|
|
3396
|
+
__name(this, "AppModule");
|
|
3397
|
+
}
|
|
3398
|
+
controller;
|
|
3399
|
+
component;
|
|
3400
|
+
timer;
|
|
3401
|
+
sizes;
|
|
3402
|
+
camera;
|
|
3403
|
+
world;
|
|
3404
|
+
renderer;
|
|
3405
|
+
debug;
|
|
2835
3406
|
constructor(controller, component, timer, sizes, camera, world, renderer, debug) {
|
|
2836
|
-
super();
|
|
2837
|
-
this.controller = controller;
|
|
2838
|
-
this.component = component;
|
|
2839
|
-
this.timer = timer;
|
|
2840
|
-
this.sizes = sizes;
|
|
2841
|
-
this.camera = camera;
|
|
2842
|
-
this.world = world;
|
|
2843
|
-
this.renderer = renderer;
|
|
2844
|
-
this.debug = debug;
|
|
3407
|
+
super(), this.controller = controller, this.component = component, this.timer = timer, this.sizes = sizes, this.camera = camera, this.world = world, this.renderer = renderer, this.debug = debug;
|
|
2845
3408
|
this._initProxyEvents();
|
|
2846
3409
|
self.addEventListener("message", this._onMessage.bind(this));
|
|
2847
3410
|
}
|
|
@@ -2878,7 +3441,7 @@ var AppModule = class extends AppProxyEventHandlersModel {
|
|
|
2878
3441
|
this.renderer.init(canvas);
|
|
2879
3442
|
this.timer.init(props.startTimer);
|
|
2880
3443
|
this.debug.init(props);
|
|
2881
|
-
this.controller.lifecycle$$.next(
|
|
3444
|
+
this.controller.lifecycle$$.next(AppLifecycleState.INITIALIZED);
|
|
2882
3445
|
}
|
|
2883
3446
|
get canvas() {
|
|
2884
3447
|
return this.component.canvas;
|
|
@@ -2896,7 +3459,7 @@ var AppModule = class extends AppProxyEventHandlersModel {
|
|
|
2896
3459
|
this.renderer.dispose();
|
|
2897
3460
|
this.timer.dispose();
|
|
2898
3461
|
this.debug.dispose();
|
|
2899
|
-
this.controller.lifecycle$$.next(
|
|
3462
|
+
this.controller.lifecycle$$.next(AppLifecycleState.DISPOSED);
|
|
2900
3463
|
this.controller.lifecycle$$.complete();
|
|
2901
3464
|
self.removeEventListener("message", this._onMessage.bind(this));
|
|
2902
3465
|
}
|
|
@@ -2904,50 +3467,73 @@ var AppModule = class extends AppProxyEventHandlersModel {
|
|
|
2904
3467
|
return this.controller.lifecycle$;
|
|
2905
3468
|
}
|
|
2906
3469
|
};
|
|
2907
|
-
AppModule =
|
|
3470
|
+
AppModule = _ts_decorate21([
|
|
2908
3471
|
singleton_default(),
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
3472
|
+
_ts_param16(0, inject_default(AppController)),
|
|
3473
|
+
_ts_param16(1, inject_default(AppComponent)),
|
|
3474
|
+
_ts_param16(2, inject_default(TimerModule)),
|
|
3475
|
+
_ts_param16(3, inject_default(SizesModule)),
|
|
3476
|
+
_ts_param16(4, inject_default(CameraModule)),
|
|
3477
|
+
_ts_param16(5, inject_default(WorldModule)),
|
|
3478
|
+
_ts_param16(6, inject_default(RendererModule)),
|
|
3479
|
+
_ts_param16(7, inject_default(DebugModule)),
|
|
3480
|
+
_ts_metadata16("design:type", Function),
|
|
3481
|
+
_ts_metadata16("design:paramtypes", [
|
|
3482
|
+
typeof AppController === "undefined" ? Object : AppController,
|
|
3483
|
+
typeof AppComponent === "undefined" ? Object : AppComponent,
|
|
3484
|
+
typeof TimerModule === "undefined" ? Object : TimerModule,
|
|
3485
|
+
typeof SizesModule === "undefined" ? Object : SizesModule,
|
|
3486
|
+
typeof CameraModule === "undefined" ? Object : CameraModule,
|
|
3487
|
+
typeof WorldModule === "undefined" ? Object : WorldModule,
|
|
3488
|
+
typeof RendererModule === "undefined" ? Object : RendererModule,
|
|
3489
|
+
typeof DebugModule === "undefined" ? Object : DebugModule
|
|
3490
|
+
])
|
|
2917
3491
|
], AppModule);
|
|
2918
3492
|
var appModule = instance.resolve(AppModule);
|
|
2919
3493
|
|
|
2920
3494
|
// src/core/loader/loader.module.ts
|
|
2921
3495
|
var import_reflect_metadata2 = __toESM(require_Reflect());
|
|
2922
3496
|
import { CanvasTexture } from "three";
|
|
2923
|
-
import { DRACOLoader
|
|
3497
|
+
import { DRACOLoader } from "three/examples/jsm/Addons";
|
|
2924
3498
|
|
|
2925
3499
|
// src/core/loader/loader.controller.ts
|
|
2926
3500
|
import { Subject as Subject8 } from "rxjs";
|
|
2927
3501
|
import { filter as filter4 } from "rxjs";
|
|
3502
|
+
function _ts_decorate22(decorators, target, key, desc) {
|
|
3503
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3504
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3505
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3506
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3507
|
+
}
|
|
3508
|
+
__name(_ts_decorate22, "_ts_decorate");
|
|
2928
3509
|
var LoaderController = class {
|
|
3510
|
+
static {
|
|
3511
|
+
__name(this, "LoaderController");
|
|
3512
|
+
}
|
|
2929
3513
|
lifecycle$$ = new Subject8();
|
|
2930
3514
|
progress$$ = new Subject8();
|
|
2931
3515
|
progress$ = this.progress$$.pipe();
|
|
2932
3516
|
lifecycle$ = this.lifecycle$$.pipe();
|
|
2933
|
-
progressCompleted$ = this.progress$.pipe(
|
|
2934
|
-
filter4((resource) => resource.toLoad === resource.loaded)
|
|
2935
|
-
);
|
|
3517
|
+
progressCompleted$ = this.progress$.pipe(filter4((resource) => resource.toLoad === resource.loaded));
|
|
2936
3518
|
};
|
|
2937
|
-
LoaderController =
|
|
3519
|
+
LoaderController = _ts_decorate22([
|
|
2938
3520
|
scoped(lifecycle_default.ResolutionScoped)
|
|
2939
3521
|
], LoaderController);
|
|
2940
3522
|
|
|
2941
3523
|
// src/core/loader/loader.component.ts
|
|
2942
|
-
import {
|
|
2943
|
-
AudioLoader,
|
|
2944
|
-
CubeTextureLoader,
|
|
2945
|
-
ImageBitmapLoader,
|
|
2946
|
-
LoadingManager,
|
|
2947
|
-
VideoTexture
|
|
2948
|
-
} from "three";
|
|
3524
|
+
import { AudioLoader, CubeTextureLoader, ImageBitmapLoader, LoadingManager, VideoTexture } from "three";
|
|
2949
3525
|
import { GLTFLoader } from "three/examples/jsm/Addons";
|
|
3526
|
+
function _ts_decorate23(decorators, target, key, desc) {
|
|
3527
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3528
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3529
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3530
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3531
|
+
}
|
|
3532
|
+
__name(_ts_decorate23, "_ts_decorate");
|
|
2950
3533
|
var LoaderComponent = class {
|
|
3534
|
+
static {
|
|
3535
|
+
__name(this, "LoaderComponent");
|
|
3536
|
+
}
|
|
2951
3537
|
loadingManager = new LoadingManager();
|
|
2952
3538
|
loaders = {};
|
|
2953
3539
|
resources = [];
|
|
@@ -2956,7 +3542,7 @@ var LoaderComponent = class {
|
|
|
2956
3542
|
loaded = 0;
|
|
2957
3543
|
get videoLoader() {
|
|
2958
3544
|
return {
|
|
2959
|
-
load: (url, callback) => {
|
|
3545
|
+
load: /* @__PURE__ */ __name((url, callback) => {
|
|
2960
3546
|
let element = document.createElement("video");
|
|
2961
3547
|
element.muted = true;
|
|
2962
3548
|
element.loop = true;
|
|
@@ -2964,7 +3550,7 @@ var LoaderComponent = class {
|
|
|
2964
3550
|
element.playsInline = true;
|
|
2965
3551
|
element.src = url;
|
|
2966
3552
|
element.autoplay = true;
|
|
2967
|
-
const oncanplaythrough = () => {
|
|
3553
|
+
const oncanplaythrough = /* @__PURE__ */ __name(() => {
|
|
2968
3554
|
if (!element) return;
|
|
2969
3555
|
element.play();
|
|
2970
3556
|
const texture = new VideoTexture(element);
|
|
@@ -2978,9 +3564,9 @@ var LoaderComponent = class {
|
|
|
2978
3564
|
callback(texture);
|
|
2979
3565
|
texture.userData.element = element;
|
|
2980
3566
|
element.removeEventListener("canplaythrough", oncanplaythrough);
|
|
2981
|
-
};
|
|
3567
|
+
}, "oncanplaythrough");
|
|
2982
3568
|
element.addEventListener("canplaythrough", oncanplaythrough);
|
|
2983
|
-
}
|
|
3569
|
+
}, "load")
|
|
2984
3570
|
};
|
|
2985
3571
|
}
|
|
2986
3572
|
_setLoaders() {
|
|
@@ -3000,12 +3586,34 @@ var LoaderComponent = class {
|
|
|
3000
3586
|
this._setLoaders();
|
|
3001
3587
|
}
|
|
3002
3588
|
};
|
|
3003
|
-
LoaderComponent =
|
|
3589
|
+
LoaderComponent = _ts_decorate23([
|
|
3004
3590
|
scoped(lifecycle_default.ResolutionScoped)
|
|
3005
3591
|
], LoaderComponent);
|
|
3006
3592
|
|
|
3007
3593
|
// src/core/loader/loader.module.ts
|
|
3594
|
+
function _ts_decorate24(decorators, target, key, desc) {
|
|
3595
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3596
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3597
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3598
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3599
|
+
}
|
|
3600
|
+
__name(_ts_decorate24, "_ts_decorate");
|
|
3601
|
+
function _ts_metadata17(k, v) {
|
|
3602
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3603
|
+
}
|
|
3604
|
+
__name(_ts_metadata17, "_ts_metadata");
|
|
3605
|
+
function _ts_param17(paramIndex, decorator) {
|
|
3606
|
+
return function(target, key) {
|
|
3607
|
+
decorator(target, key, paramIndex);
|
|
3608
|
+
};
|
|
3609
|
+
}
|
|
3610
|
+
__name(_ts_param17, "_ts_param");
|
|
3008
3611
|
var LoaderModule = class {
|
|
3612
|
+
static {
|
|
3613
|
+
__name(this, "LoaderModule");
|
|
3614
|
+
}
|
|
3615
|
+
controller;
|
|
3616
|
+
component;
|
|
3009
3617
|
constructor(controller, component) {
|
|
3010
3618
|
this.controller = controller;
|
|
3011
3619
|
this.component = component;
|
|
@@ -3025,14 +3633,9 @@ var LoaderModule = class {
|
|
|
3025
3633
|
});
|
|
3026
3634
|
}
|
|
3027
3635
|
setDracoLoader(dracoDecoderPath, linkWithGltfLoader = true) {
|
|
3028
|
-
this.component.loaders.dracoLoader = new
|
|
3029
|
-
this.component.loadingManager
|
|
3030
|
-
);
|
|
3636
|
+
this.component.loaders.dracoLoader = new DRACOLoader(this.component.loadingManager);
|
|
3031
3637
|
this.component.loaders.dracoLoader.setDecoderPath(dracoDecoderPath);
|
|
3032
|
-
if (linkWithGltfLoader && this.component.loaders.gltfLoader)
|
|
3033
|
-
this.component.loaders.gltfLoader.setDRACOLoader(
|
|
3034
|
-
this.component.loaders.dracoLoader
|
|
3035
|
-
);
|
|
3638
|
+
if (linkWithGltfLoader && this.component.loaders.gltfLoader) this.component.loaders.gltfLoader.setDRACOLoader(this.component.loaders.dracoLoader);
|
|
3036
3639
|
}
|
|
3037
3640
|
load() {
|
|
3038
3641
|
const firstResource = this.component.resources[0];
|
|
@@ -3042,40 +3645,27 @@ var LoaderModule = class {
|
|
|
3042
3645
|
loaded: this.component.loaded,
|
|
3043
3646
|
toLoad: this.component.toLoad
|
|
3044
3647
|
});
|
|
3045
|
-
for (const source of this.component.resources)
|
|
3046
|
-
if (
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
);
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
);
|
|
3063
|
-
}
|
|
3064
|
-
if (source.type === "video" && typeof source.path === "string") {
|
|
3065
|
-
this.component.loaders.videoLoader?.load(
|
|
3066
|
-
source.path,
|
|
3067
|
-
(texture) => this._handleLoadedResource(source, texture)
|
|
3068
|
-
);
|
|
3069
|
-
}
|
|
3070
|
-
if (source.type === "audio" && typeof source.path === "string") {
|
|
3071
|
-
this.component.loaders.audioLoader?.load(
|
|
3072
|
-
source.path,
|
|
3073
|
-
(audioBuffer) => {
|
|
3074
|
-
this._handleLoadedResource(source, audioBuffer);
|
|
3075
|
-
}
|
|
3076
|
-
);
|
|
3077
|
-
}
|
|
3648
|
+
for (const source of this.component.resources) if (!this.component.items[source.name]) {
|
|
3649
|
+
if (source.type === "gltfModel" && typeof source.path === "string") {
|
|
3650
|
+
this.component.loaders.gltfLoader?.load(source.path, (model) => this._handleLoadedResource(source, model));
|
|
3651
|
+
}
|
|
3652
|
+
if (source.type === "texture" && typeof source.path === "string") {
|
|
3653
|
+
this.component.loaders.textureLoader?.load(source.path, (texture) => {
|
|
3654
|
+
this._handleLoadedResource(source, new CanvasTexture(texture));
|
|
3655
|
+
});
|
|
3656
|
+
}
|
|
3657
|
+
if (source.type === "cubeTexture" && typeof source.path === "object") {
|
|
3658
|
+
this.component.loaders.cubeTextureLoader?.load(source.path, (texture) => this._handleLoadedResource(source, texture));
|
|
3659
|
+
}
|
|
3660
|
+
if (source.type === "video" && typeof source.path === "string") {
|
|
3661
|
+
this.component.loaders.videoLoader?.load(source.path, (texture) => this._handleLoadedResource(source, texture));
|
|
3662
|
+
}
|
|
3663
|
+
if (source.type === "audio" && typeof source.path === "string") {
|
|
3664
|
+
this.component.loaders.audioLoader?.load(source.path, (audioBuffer) => {
|
|
3665
|
+
this._handleLoadedResource(source, audioBuffer);
|
|
3666
|
+
});
|
|
3078
3667
|
}
|
|
3668
|
+
}
|
|
3079
3669
|
}
|
|
3080
3670
|
items() {
|
|
3081
3671
|
return this.component.items;
|
|
@@ -3109,10 +3699,15 @@ var LoaderModule = class {
|
|
|
3109
3699
|
return this.controller.progressCompleted$;
|
|
3110
3700
|
}
|
|
3111
3701
|
};
|
|
3112
|
-
LoaderModule =
|
|
3702
|
+
LoaderModule = _ts_decorate24([
|
|
3113
3703
|
scoped(lifecycle_default.ResolutionScoped),
|
|
3114
|
-
|
|
3115
|
-
|
|
3704
|
+
_ts_param17(0, inject_default(LoaderController)),
|
|
3705
|
+
_ts_param17(1, inject_default(LoaderComponent)),
|
|
3706
|
+
_ts_metadata17("design:type", Function),
|
|
3707
|
+
_ts_metadata17("design:paramtypes", [
|
|
3708
|
+
typeof LoaderController === "undefined" ? Object : LoaderController,
|
|
3709
|
+
typeof LoaderComponent === "undefined" ? Object : LoaderComponent
|
|
3710
|
+
])
|
|
3116
3711
|
], LoaderModule);
|
|
3117
3712
|
var loaderModule = instance.resolve(LoaderModule);
|
|
3118
3713
|
|
|
@@ -3125,7 +3720,17 @@ import { excludeProperties } from "@quick-threejs/utils";
|
|
|
3125
3720
|
import { createWorkerPool } from "@quick-threejs/utils";
|
|
3126
3721
|
import GUI from "three/examples/jsm/libs/lil-gui.module.min.js";
|
|
3127
3722
|
import Stats from "stats.js";
|
|
3723
|
+
function _ts_decorate25(decorators, target, key, desc) {
|
|
3724
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3725
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3726
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3727
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3728
|
+
}
|
|
3729
|
+
__name(_ts_decorate25, "_ts_decorate");
|
|
3128
3730
|
var RegisterComponent = class {
|
|
3731
|
+
static {
|
|
3732
|
+
__name(this, "RegisterComponent");
|
|
3733
|
+
}
|
|
3129
3734
|
workerPool = createWorkerPool();
|
|
3130
3735
|
canvas;
|
|
3131
3736
|
worker;
|
|
@@ -3143,29 +3748,46 @@ var RegisterComponent = class {
|
|
|
3143
3748
|
if (window.innerWidth <= 450) this.gui.close();
|
|
3144
3749
|
}
|
|
3145
3750
|
};
|
|
3146
|
-
RegisterComponent =
|
|
3751
|
+
RegisterComponent = _ts_decorate25([
|
|
3147
3752
|
singleton_default()
|
|
3148
3753
|
], RegisterComponent);
|
|
3149
3754
|
|
|
3150
3755
|
// src/core/register/register.controller.ts
|
|
3151
3756
|
import { fromEvent, map, filter as filter5, Subject as Subject9 } from "rxjs";
|
|
3152
3757
|
import { copyProperties } from "@quick-threejs/utils";
|
|
3758
|
+
function _ts_decorate26(decorators, target, key, desc) {
|
|
3759
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3760
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3761
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3762
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3763
|
+
}
|
|
3764
|
+
__name(_ts_decorate26, "_ts_decorate");
|
|
3765
|
+
function _ts_metadata18(k, v) {
|
|
3766
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3767
|
+
}
|
|
3768
|
+
__name(_ts_metadata18, "_ts_metadata");
|
|
3769
|
+
function _ts_param18(paramIndex, decorator) {
|
|
3770
|
+
return function(target, key) {
|
|
3771
|
+
decorator(target, key, paramIndex);
|
|
3772
|
+
};
|
|
3773
|
+
}
|
|
3774
|
+
__name(_ts_param18, "_ts_param");
|
|
3153
3775
|
var RegisterController = class extends ProxyEventHandlersModel {
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
this.component = component;
|
|
3776
|
+
static {
|
|
3777
|
+
__name(this, "RegisterController");
|
|
3157
3778
|
}
|
|
3779
|
+
component;
|
|
3158
3780
|
canvas;
|
|
3159
|
-
lifecycle
|
|
3160
|
-
lifecycle
|
|
3781
|
+
lifecycle$$;
|
|
3782
|
+
lifecycle$;
|
|
3783
|
+
constructor(component) {
|
|
3784
|
+
super(), this.component = component, this.lifecycle$$ = new Subject9(), this.lifecycle$ = this.lifecycle$$.pipe();
|
|
3785
|
+
}
|
|
3161
3786
|
init(canvas) {
|
|
3162
3787
|
this.canvas = canvas;
|
|
3163
3788
|
for (const key of PROXY_EVENT_LISTENERS) {
|
|
3164
3789
|
const eventHandler = key.startsWith("mouse") || key.startsWith("pointer") || key.startsWith("touch") ? this.mouseEventHandler : key.startsWith("key") ? this.keyEventHandler : key === "resize" ? this.uiEventHandler : key === "wheel" ? this.wheelEventHandler : this.preventDefaultHandler;
|
|
3165
|
-
this[`${key}$`] = fromEvent(
|
|
3166
|
-
key === "resize" ? window : canvas,
|
|
3167
|
-
key
|
|
3168
|
-
).pipe(
|
|
3790
|
+
this[`${key}$`] = fromEvent(key === "resize" ? window : canvas, key).pipe(
|
|
3169
3791
|
// @ts-ignore
|
|
3170
3792
|
map(eventHandler.bind(this)),
|
|
3171
3793
|
filter5((e) => key === "keydown" && !e ? false : true)
|
|
@@ -3216,7 +3838,10 @@ var RegisterController = class extends ProxyEventHandlersModel {
|
|
|
3216
3838
|
}
|
|
3217
3839
|
touchEventHandler(e) {
|
|
3218
3840
|
const touches = [];
|
|
3219
|
-
const data = {
|
|
3841
|
+
const data = {
|
|
3842
|
+
type: e.type,
|
|
3843
|
+
touches
|
|
3844
|
+
};
|
|
3220
3845
|
for (let i = 0; i < e.touches.length; ++i) {
|
|
3221
3846
|
const touch = e.touches[i];
|
|
3222
3847
|
touches.push({
|
|
@@ -3224,13 +3849,19 @@ var RegisterController = class extends ProxyEventHandlersModel {
|
|
|
3224
3849
|
pageY: touch?.pageY ?? 0
|
|
3225
3850
|
});
|
|
3226
3851
|
}
|
|
3227
|
-
return {
|
|
3852
|
+
return {
|
|
3853
|
+
...this.getScreenSizes(),
|
|
3854
|
+
...data
|
|
3855
|
+
};
|
|
3228
3856
|
}
|
|
3229
3857
|
wheelEventHandler(e) {
|
|
3230
3858
|
e.preventDefault();
|
|
3231
3859
|
return {
|
|
3232
3860
|
...this.getScreenSizes(),
|
|
3233
|
-
...copyProperties(e, [
|
|
3861
|
+
...copyProperties(e, [
|
|
3862
|
+
"deltaX",
|
|
3863
|
+
"deltaY"
|
|
3864
|
+
])
|
|
3234
3865
|
};
|
|
3235
3866
|
}
|
|
3236
3867
|
keyEventHandler(e) {
|
|
@@ -3238,13 +3869,22 @@ var RegisterController = class extends ProxyEventHandlersModel {
|
|
|
3238
3869
|
e.preventDefault();
|
|
3239
3870
|
return {
|
|
3240
3871
|
...this.getScreenSizes(),
|
|
3241
|
-
...copyProperties(e, [
|
|
3872
|
+
...copyProperties(e, [
|
|
3873
|
+
"ctrlKey",
|
|
3874
|
+
"metaKey",
|
|
3875
|
+
"shiftKey",
|
|
3876
|
+
"keyCode"
|
|
3877
|
+
])
|
|
3242
3878
|
};
|
|
3243
3879
|
}
|
|
3244
3880
|
};
|
|
3245
|
-
RegisterController =
|
|
3881
|
+
RegisterController = _ts_decorate26([
|
|
3246
3882
|
singleton_default(),
|
|
3247
|
-
|
|
3883
|
+
_ts_param18(0, inject_default(RegisterComponent)),
|
|
3884
|
+
_ts_metadata18("design:type", Function),
|
|
3885
|
+
_ts_metadata18("design:paramtypes", [
|
|
3886
|
+
typeof RegisterComponent === "undefined" ? Object : RegisterComponent
|
|
3887
|
+
])
|
|
3248
3888
|
], RegisterController);
|
|
3249
3889
|
|
|
3250
3890
|
// src/common/serializers/object3d.serializer.ts
|
|
@@ -3264,80 +3904,86 @@ var object3DSerializer = {
|
|
|
3264
3904
|
|
|
3265
3905
|
// src/common/models/register-props.model.ts
|
|
3266
3906
|
var RegisterPropsModel = class {
|
|
3907
|
+
static {
|
|
3908
|
+
__name(this, "RegisterPropsModel");
|
|
3909
|
+
}
|
|
3267
3910
|
/**
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3911
|
+
* @description The app worker logic location.
|
|
3912
|
+
*
|
|
3913
|
+
* @required
|
|
3914
|
+
*/
|
|
3272
3915
|
location;
|
|
3273
3916
|
/**
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3917
|
+
* @description App `canvas` element reference.
|
|
3918
|
+
*
|
|
3919
|
+
* @default undefined
|
|
3920
|
+
*/
|
|
3278
3921
|
canvas;
|
|
3279
3922
|
/**
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3923
|
+
* @description Set the `canvas` view in fullscreen and auto-resize it.
|
|
3924
|
+
*
|
|
3925
|
+
* @default true
|
|
3926
|
+
*/
|
|
3284
3927
|
fullScreen;
|
|
3285
3928
|
/**
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3929
|
+
* Default used camera.
|
|
3930
|
+
*
|
|
3931
|
+
* @see {@link DefaultCameraType}
|
|
3932
|
+
*
|
|
3933
|
+
* @default DefaultCameraType.PERSPECTIVE
|
|
3934
|
+
*/
|
|
3292
3935
|
defaultCamera;
|
|
3293
3936
|
/**
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3937
|
+
* @description Start timer update on launch.
|
|
3938
|
+
*
|
|
3939
|
+
* @default true
|
|
3940
|
+
*/
|
|
3298
3941
|
startTimer;
|
|
3299
3942
|
/**
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3943
|
+
* Enable the debug mode
|
|
3944
|
+
*
|
|
3945
|
+
* @default undefined
|
|
3946
|
+
*/
|
|
3304
3947
|
enableDebug;
|
|
3305
3948
|
/**
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3949
|
+
* Define the {@link THREE.AxesHelper} sizes.
|
|
3950
|
+
*
|
|
3951
|
+
* @remark __Deactivated if the value is `0` or `undefined`__
|
|
3952
|
+
* @remark __This property depends on {@link RegisterPropsModel.enableDebug}__
|
|
3953
|
+
*
|
|
3954
|
+
* @default undefined
|
|
3955
|
+
*/
|
|
3313
3956
|
axesSizes;
|
|
3314
3957
|
/**
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3958
|
+
* Define the {@link THREE.GridHelper} sizes.
|
|
3959
|
+
*
|
|
3960
|
+
* @remark __Deactivated if the value is `0` or `undefined`__
|
|
3961
|
+
* @remark __This property depends on {@link RegisterPropsModel.enableDebug}__
|
|
3962
|
+
*
|
|
3963
|
+
* @default undefined
|
|
3964
|
+
*/
|
|
3322
3965
|
gridSizes;
|
|
3323
3966
|
/**
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3967
|
+
* Display a mini perfective camera at the top right corner of the screen.
|
|
3968
|
+
*
|
|
3969
|
+
* @remark __This property depends on {@link RegisterPropsModel.enableDebug}__
|
|
3970
|
+
*
|
|
3971
|
+
* @default false
|
|
3972
|
+
*/
|
|
3330
3973
|
withMiniCamera;
|
|
3331
3974
|
/**
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3975
|
+
* @description Handler called when the app is ready.
|
|
3976
|
+
*
|
|
3977
|
+
* @default undefined
|
|
3978
|
+
*/
|
|
3336
3979
|
onReady;
|
|
3337
3980
|
};
|
|
3338
3981
|
|
|
3339
3982
|
// src/common/models/register-proxy-event-handler.model.ts
|
|
3340
3983
|
var RegisterProxyEventHandlersModel = class {
|
|
3984
|
+
static {
|
|
3985
|
+
__name(this, "RegisterProxyEventHandlersModel");
|
|
3986
|
+
}
|
|
3341
3987
|
contextmenu$;
|
|
3342
3988
|
resize$;
|
|
3343
3989
|
mousedown$;
|
|
@@ -3355,33 +4001,46 @@ var RegisterProxyEventHandlersModel = class {
|
|
|
3355
4001
|
};
|
|
3356
4002
|
|
|
3357
4003
|
// src/core/register/register.module.ts
|
|
4004
|
+
function _ts_decorate27(decorators, target, key, desc) {
|
|
4005
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4006
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4007
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4008
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4009
|
+
}
|
|
4010
|
+
__name(_ts_decorate27, "_ts_decorate");
|
|
4011
|
+
function _ts_metadata19(k, v) {
|
|
4012
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4013
|
+
}
|
|
4014
|
+
__name(_ts_metadata19, "_ts_metadata");
|
|
4015
|
+
function _ts_param19(paramIndex, decorator) {
|
|
4016
|
+
return function(target, key) {
|
|
4017
|
+
decorator(target, key, paramIndex);
|
|
4018
|
+
};
|
|
4019
|
+
}
|
|
4020
|
+
__name(_ts_param19, "_ts_param");
|
|
3358
4021
|
var RegisterModule = class extends RegisterProxyEventHandlersModel {
|
|
4022
|
+
static {
|
|
4023
|
+
__name(this, "RegisterModule");
|
|
4024
|
+
}
|
|
4025
|
+
component;
|
|
4026
|
+
controller;
|
|
4027
|
+
registerProps;
|
|
3359
4028
|
constructor(component, controller, registerProps) {
|
|
3360
|
-
super();
|
|
3361
|
-
this.component = component;
|
|
3362
|
-
this.controller = controller;
|
|
3363
|
-
this.registerProps = registerProps;
|
|
4029
|
+
super(), this.component = component, this.controller = controller, this.registerProps = registerProps;
|
|
3364
4030
|
this.init();
|
|
3365
4031
|
}
|
|
3366
4032
|
async _initCanvas() {
|
|
3367
4033
|
try {
|
|
3368
4034
|
this.component.canvas = document.createElement("canvas");
|
|
3369
|
-
if (this.registerProps.canvas instanceof HTMLCanvasElement)
|
|
3370
|
-
this.component.canvas = this.registerProps.canvas;
|
|
4035
|
+
if (this.registerProps.canvas instanceof HTMLCanvasElement) this.component.canvas = this.registerProps.canvas;
|
|
3371
4036
|
if (typeof this.registerProps.canvas === "string") {
|
|
3372
|
-
const canvas_ = document.querySelector(
|
|
3373
|
-
|
|
3374
|
-
);
|
|
3375
|
-
if (canvas_ instanceof HTMLCanvasElement)
|
|
3376
|
-
this.component.canvas = canvas_;
|
|
4037
|
+
const canvas_ = document.querySelector(this.registerProps.canvas);
|
|
4038
|
+
if (canvas_ instanceof HTMLCanvasElement) this.component.canvas = canvas_;
|
|
3377
4039
|
}
|
|
3378
|
-
if (!this.component.canvas.parentElement)
|
|
3379
|
-
document.body.appendChild(this.component.canvas);
|
|
4040
|
+
if (!this.component.canvas.parentElement) document.body.appendChild(this.component.canvas);
|
|
3380
4041
|
} catch (err) {
|
|
3381
|
-
console.error(
|
|
3382
|
-
|
|
3383
|
-
${err?.message ?? "Something went wrong"}`
|
|
3384
|
-
);
|
|
4042
|
+
console.error(`\u{1F6D1} Unable to initialize the canvas:
|
|
4043
|
+
${err?.message ?? "Something went wrong"}`);
|
|
3385
4044
|
}
|
|
3386
4045
|
}
|
|
3387
4046
|
async _initComponent() {
|
|
@@ -3394,12 +4053,13 @@ ${err?.message ?? "Something went wrong"}`
|
|
|
3394
4053
|
this.controller.init(this.component.canvas);
|
|
3395
4054
|
if (!this.component.thread || !this.component.worker) return;
|
|
3396
4055
|
this.component.thread?.resize?.({
|
|
3397
|
-
...this.controller.uiEventHandler({
|
|
4056
|
+
...this.controller.uiEventHandler({
|
|
4057
|
+
type: "resize"
|
|
4058
|
+
})
|
|
3398
4059
|
});
|
|
3399
4060
|
this.component.thread?.lifecycle$().subscribe((state) => {
|
|
3400
|
-
if (state ===
|
|
3401
|
-
|
|
3402
|
-
if (state === 2 /* STEP_ENDED */) this.component.stats?.end();
|
|
4061
|
+
if (state === AppLifecycleState.STEP_STARTED) this.component.stats?.begin();
|
|
4062
|
+
if (state === AppLifecycleState.STEP_ENDED) this.component.stats?.end();
|
|
3403
4063
|
});
|
|
3404
4064
|
}
|
|
3405
4065
|
async _initWorkerThread() {
|
|
@@ -3417,18 +4077,17 @@ ${err?.message ?? "Something went wrong"}`
|
|
|
3417
4077
|
]),
|
|
3418
4078
|
canvas: offscreenCanvas
|
|
3419
4079
|
},
|
|
3420
|
-
transferSubject: [
|
|
4080
|
+
transferSubject: [
|
|
4081
|
+
offscreenCanvas
|
|
4082
|
+
]
|
|
3421
4083
|
}
|
|
3422
4084
|
});
|
|
3423
|
-
if (!app.thread || !app.worker)
|
|
3424
|
-
throw new Error("Unable to retrieve app worker info.");
|
|
4085
|
+
if (!app.thread || !app.worker) throw new Error("Unable to retrieve app worker info.");
|
|
3425
4086
|
this.component.worker = app.worker;
|
|
3426
4087
|
this.component.thread = app.thread;
|
|
3427
4088
|
}
|
|
3428
4089
|
async _initProxyEvents() {
|
|
3429
|
-
PROXY_EVENT_LISTENERS.forEach(
|
|
3430
|
-
(key) => this[`${key}$`] = () => this.controller?.[`${key}$`]
|
|
3431
|
-
);
|
|
4090
|
+
PROXY_EVENT_LISTENERS.forEach((key) => this[`${key}$`] = () => this.controller?.[`${key}$`]);
|
|
3432
4091
|
}
|
|
3433
4092
|
async init() {
|
|
3434
4093
|
registerSerializer(object3DSerializer);
|
|
@@ -3437,7 +4096,7 @@ ${err?.message ?? "Something went wrong"}`
|
|
|
3437
4096
|
await this._initComponent();
|
|
3438
4097
|
await this._initController();
|
|
3439
4098
|
await this._initProxyEvents();
|
|
3440
|
-
this.controller.lifecycle$$.next(
|
|
4099
|
+
this.controller.lifecycle$$.next(RegisterLifecycleState.INITIALIZED);
|
|
3441
4100
|
this.registerProps.onReady?.(this);
|
|
3442
4101
|
}
|
|
3443
4102
|
async loadResources(props) {
|
|
@@ -3454,11 +4113,9 @@ ${err?.message ?? "Something went wrong"}`
|
|
|
3454
4113
|
});
|
|
3455
4114
|
loaderWorkerThread.thread?.progressCompleted$().subscribe((resource) => {
|
|
3456
4115
|
props.onProgressComplete?.(resource);
|
|
3457
|
-
if (props.disposeOnComplete || props.disposeOnComplete === void 0)
|
|
3458
|
-
loaderWorkerThread.thread?.dispose();
|
|
4116
|
+
if (props.disposeOnComplete || props.disposeOnComplete === void 0) loaderWorkerThread.thread?.dispose();
|
|
3459
4117
|
});
|
|
3460
|
-
if (props.immediateLoad || props.immediateLoad === void 0)
|
|
3461
|
-
await loaderWorkerThread.thread?.load();
|
|
4118
|
+
if (props.immediateLoad || props.immediateLoad === void 0) await loaderWorkerThread.thread?.load();
|
|
3462
4119
|
return {
|
|
3463
4120
|
...loaderWorkerThread,
|
|
3464
4121
|
load: await loaderWorkerThread.thread?.load,
|
|
@@ -3486,40 +4143,48 @@ ${err?.message ?? "Something went wrong"}`
|
|
|
3486
4143
|
}
|
|
3487
4144
|
dispose() {
|
|
3488
4145
|
this.component.workerPool.terminateAll();
|
|
3489
|
-
this.controller.lifecycle$$.next(
|
|
4146
|
+
this.controller.lifecycle$$.next(RegisterLifecycleState.DISPOSED);
|
|
3490
4147
|
}
|
|
3491
4148
|
lifecycle$() {
|
|
3492
4149
|
return this.controller.lifecycle$;
|
|
3493
4150
|
}
|
|
3494
4151
|
};
|
|
3495
|
-
RegisterModule =
|
|
4152
|
+
RegisterModule = _ts_decorate27([
|
|
3496
4153
|
singleton_default(),
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
4154
|
+
_ts_param19(0, inject_default(RegisterComponent)),
|
|
4155
|
+
_ts_param19(1, inject_default(RegisterController)),
|
|
4156
|
+
_ts_param19(2, inject_default(RegisterPropsModel)),
|
|
4157
|
+
_ts_metadata19("design:type", Function),
|
|
4158
|
+
_ts_metadata19("design:paramtypes", [
|
|
4159
|
+
typeof RegisterComponent === "undefined" ? Object : RegisterComponent,
|
|
4160
|
+
typeof RegisterController === "undefined" ? Object : RegisterController,
|
|
4161
|
+
typeof RegisterPropsModel === "undefined" ? Object : RegisterPropsModel
|
|
4162
|
+
])
|
|
3500
4163
|
], RegisterModule);
|
|
3501
4164
|
|
|
3502
4165
|
// src/core/register/register.util.ts
|
|
3503
4166
|
import { isBoolean, isFunction, isUndefined } from "@quick-threejs/utils";
|
|
3504
|
-
var register = (props) => {
|
|
3505
|
-
if (typeof props?.location !== "string" && !(props?.location instanceof URL))
|
|
3506
|
-
|
|
3507
|
-
"Invalid register props detected. location path is required"
|
|
3508
|
-
);
|
|
3509
|
-
props.defaultCamera = !(props?.defaultCamera && props.defaultCamera in DefaultCameraType) ? 0 /* PERSPECTIVE */ : props.defaultCamera;
|
|
4167
|
+
var register = /* @__PURE__ */ __name((props) => {
|
|
4168
|
+
if (typeof props?.location !== "string" && !(props?.location instanceof URL)) throw new Error("Invalid register props detected. location path is required");
|
|
4169
|
+
props.defaultCamera = !(props?.defaultCamera && props.defaultCamera in DefaultCameraType) ? DefaultCameraType.PERSPECTIVE : props.defaultCamera;
|
|
3510
4170
|
props.withMiniCamera = isUndefined(props.withMiniCamera) || !isBoolean(props.withMiniCamera) ? false : props.withMiniCamera;
|
|
3511
4171
|
props.startTimer = isUndefined(props.startTimer) || !isBoolean(props.startTimer) ? true : props.startTimer;
|
|
3512
4172
|
props.fullScreen = isUndefined(props.fullScreen) || !isBoolean(props.fullScreen) ? true : props.fullScreen;
|
|
3513
4173
|
props.onReady = !isFunction(props.onReady) ? void 0 : props.onReady;
|
|
3514
|
-
instance.register(RegisterPropsModel, {
|
|
4174
|
+
instance.register(RegisterPropsModel, {
|
|
4175
|
+
useValue: props
|
|
4176
|
+
});
|
|
3515
4177
|
return instance.resolve(RegisterModule);
|
|
3516
|
-
};
|
|
4178
|
+
}, "register");
|
|
3517
4179
|
|
|
3518
4180
|
// src/common/models/launch-app-props.model.ts
|
|
3519
4181
|
var LaunchAppProps = class {
|
|
4182
|
+
static {
|
|
4183
|
+
__name(this, "LaunchAppProps");
|
|
4184
|
+
}
|
|
3520
4185
|
/**
|
|
3521
|
-
|
|
3522
|
-
|
|
4186
|
+
* @description Handler triggered when the app is ready.
|
|
4187
|
+
*/
|
|
3523
4188
|
onReady;
|
|
3524
4189
|
};
|
|
3525
4190
|
export {
|