@ohif/app 3.14.0-beta.98 → 3.14.0-beta.99

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.
Files changed (62) hide show
  1. package/dist/{1645.bundle.a98b9ca6.js → 1645.bundle.1a466b16.js} +600 -600
  2. package/dist/{1788.bundle.3f1349d2.js → 1788.bundle.962951f9.js} +26 -26
  3. package/dist/{1793.bundle.27458a55.js → 1793.bundle.30f89e46.js} +5 -3
  4. package/dist/{1862.bundle.79bfe469.js → 1862.bundle.3ae388c3.js} +2 -2
  5. package/dist/204.bundle.bc44c201.js +101 -0
  6. package/dist/204.bundle.css +52 -0
  7. package/dist/{2748.bundle.eaa94e2e.js → 2103.bundle.1cf348e8.js} +1 -1771
  8. package/dist/{2478.bundle.fc6ab30b.js → 2478.bundle.68ff1b2d.js} +2 -2
  9. package/dist/{2717.bundle.d5f58443.js → 2717.bundle.4318f1ee.js} +45 -43
  10. package/dist/{5989.bundle.f484884a.js → 287.bundle.ee60c370.js} +4570 -832
  11. package/dist/{2894.bundle.d612efb2.js → 2894.bundle.30c0af5b.js} +20 -14
  12. package/dist/{2991.bundle.f94892fb.js → 2991.bundle.77642eee.js} +101 -97
  13. package/dist/{3004.bundle.51919fdc.js → 3004.bundle.5568149a.js} +39 -38
  14. package/dist/{3255.bundle.13e205ac.js → 3255.bundle.3272671f.js} +29 -27
  15. package/dist/{3366.bundle.62baeeec.js → 3366.bundle.d9e78e25.js} +57 -53
  16. package/dist/{3468.bundle.f5dc5e44.js → 3468.bundle.666f2441.js} +37 -27
  17. package/dist/{347.bundle.397bb252.js → 347.bundle.1323658e.js} +44 -44
  18. package/dist/{3622.bundle.f4cf2d16.js → 3622.bundle.edb42b96.js} +56 -54
  19. package/dist/{3723.bundle.eab70100.js → 3723.bundle.43ff1971.js} +1 -1
  20. package/dist/{3771.bundle.aba09bd7.js → 3771.bundle.a5754f97.js} +8 -8
  21. package/dist/{4449.bundle.aaa4ab92.js → 4487.bundle.fa0375a4.js} +853 -95
  22. package/dist/{4606.bundle.a3485206.js → 4606.bundle.6c297e2a.js} +9 -7
  23. package/dist/{4998.bundle.3aedb48d.js → 4998.bundle.25b8cbfe.js} +5 -3
  24. package/dist/{5076.bundle.95c07142.js → 5076.bundle.2a14756f.js} +66 -66
  25. package/dist/{5143.bundle.04f54c00.js → 5143.bundle.53156bb0.js} +358 -226
  26. package/dist/{5154.bundle.2f460017.js → 5154.bundle.ccd02dd7.js} +5 -3
  27. package/dist/{5320.bundle.9b05cebb.js → 5320.bundle.c17eb4a7.js} +678 -546
  28. package/dist/{6212.bundle.e505e123.js → 6212.bundle.c4856be7.js} +48 -46
  29. package/dist/{6253.bundle.f74ac5c2.js → 6253.bundle.596ce463.js} +1225 -1145
  30. package/dist/{1153.bundle.51d39e80.js → 6314.bundle.5aadfe48.js} +199 -420
  31. package/dist/{641.bundle.4627a8e1.js → 641.bundle.8e45751e.js} +89 -89
  32. package/dist/{6481.bundle.d2fca485.js → 6481.bundle.85093e70.js} +29 -23
  33. package/dist/{6507.bundle.d52f5e81.js → 6507.bundle.bbcdd01e.js} +76 -76
  34. package/dist/{6722.bundle.d09a8aad.js → 6722.bundle.3e9a4ef6.js} +4 -4
  35. package/dist/{6956.bundle.c82fd790.js → 6956.bundle.dc0e8660.js} +33 -33
  36. package/dist/{7526.bundle.0685dfeb.js → 7526.bundle.3460c3ca.js} +55 -53
  37. package/dist/{7604.bundle.9eb317c8.js → 7604.bundle.f1eeded4.js} +2 -2
  38. package/dist/{8312.bundle.2cb75b58.js → 8312.bundle.d67b6f4e.js} +652 -687
  39. package/dist/{6847.bundle.b2adb444.js → 8729.bundle.e17fe9b2.js} +87 -845
  40. package/dist/{8788.bundle.4bb4c65b.js → 8788.bundle.83ddf642.js} +21 -20
  41. package/dist/{8868.bundle.4c357767.js → 8868.bundle.8f3653b3.js} +31 -31
  42. package/dist/{8923.bundle.9aca06c4.js → 8923.bundle.8b682e96.js} +148 -148
  43. package/dist/{899.bundle.9a033d16.js → 899.bundle.4e1aee7f.js} +73 -203
  44. package/dist/{9187.bundle.8f72b4fe.js → 9187.bundle.407afa07.js} +112 -110
  45. package/dist/9385.bundle.fb0bbf4a.js +1888 -0
  46. package/dist/{9481.bundle.ccb81f53.js → 9481.bundle.d045ae3a.js} +8 -6
  47. package/dist/{9517.bundle.1ae74db3.js → 9517.bundle.3e2896ef.js} +31 -17
  48. package/dist/{9620.bundle.d1dc0be1.js → 9620.bundle.b4cc392c.js} +63 -61
  49. package/dist/{9841.bundle.0f40f02b.js → 9841.bundle.4f2c401a.js} +93 -91
  50. package/dist/{9886.bundle.cabb4a24.js → 9886.bundle.b00d5d78.js} +4 -4
  51. package/dist/{8037.bundle.30a187f7.js → 9889.bundle.bf312047.js} +7743 -1098
  52. package/dist/{9948.bundle.1172ebca.js → 9948.bundle.fecf81f8.js} +5 -5
  53. package/dist/{app.bundle.51f0a437.js → app.bundle.bb359653.js} +1926 -1223
  54. package/dist/{compute.bundle.0ed1fe87.js → compute.bundle.9267d449.js} +13 -12
  55. package/dist/{histogram-worker.bundle.58e60d7c.js → histogram-worker.bundle.29bcdbf6.js} +6 -5
  56. package/dist/index.html +1 -1
  57. package/dist/{interpolation.bundle.5a53d112.js → interpolation.bundle.ee9998a4.js} +8 -7
  58. package/dist/{lib-router.bundle.a5ac870a.js → lib-router.bundle.2a887bc7.js} +334 -201
  59. package/dist/{polySeg.bundle.b4089601.js → polySeg.bundle.a55f8eee.js} +12 -12
  60. package/dist/sw.js +11 -1
  61. package/package.json +14 -19
  62. package/dist/1566.bundle.d58db206.js +0 -3610
@@ -1,1774 +1,4 @@
1
- (globalThis["rspackChunk_ohif_app"] ||= []).push([[2748], {
2
- 21589(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
3
- "use strict";
4
- /* import */ var _common_js__rspack_import_0 = __webpack_require__(23172);
5
-
6
- /**
7
- * 2x2 Matrix
8
- * @module mat2
9
- */
10
-
11
- /**
12
- * Creates a new identity mat2
13
- *
14
- * @returns {mat2} a new 2x2 matrix
15
- */
16
-
17
- function create() {
18
- var out = new glMatrix.ARRAY_TYPE(4);
19
-
20
- if (glMatrix.ARRAY_TYPE != Float32Array) {
21
- out[1] = 0;
22
- out[2] = 0;
23
- }
24
-
25
- out[0] = 1;
26
- out[3] = 1;
27
- return out;
28
- }
29
- /**
30
- * Creates a new mat2 initialized with values from an existing matrix
31
- *
32
- * @param {ReadonlyMat2} a matrix to clone
33
- * @returns {mat2} a new 2x2 matrix
34
- */
35
-
36
- function clone(a) {
37
- var out = new glMatrix.ARRAY_TYPE(4);
38
- out[0] = a[0];
39
- out[1] = a[1];
40
- out[2] = a[2];
41
- out[3] = a[3];
42
- return out;
43
- }
44
- /**
45
- * Copy the values from one mat2 to another
46
- *
47
- * @param {mat2} out the receiving matrix
48
- * @param {ReadonlyMat2} a the source matrix
49
- * @returns {mat2} out
50
- */
51
-
52
- function copy(out, a) {
53
- out[0] = a[0];
54
- out[1] = a[1];
55
- out[2] = a[2];
56
- out[3] = a[3];
57
- return out;
58
- }
59
- /**
60
- * Set a mat2 to the identity matrix
61
- *
62
- * @param {mat2} out the receiving matrix
63
- * @returns {mat2} out
64
- */
65
-
66
- function identity(out) {
67
- out[0] = 1;
68
- out[1] = 0;
69
- out[2] = 0;
70
- out[3] = 1;
71
- return out;
72
- }
73
- /**
74
- * Create a new mat2 with the given values
75
- *
76
- * @param {Number} m00 Component in column 0, row 0 position (index 0)
77
- * @param {Number} m01 Component in column 0, row 1 position (index 1)
78
- * @param {Number} m10 Component in column 1, row 0 position (index 2)
79
- * @param {Number} m11 Component in column 1, row 1 position (index 3)
80
- * @returns {mat2} out A new 2x2 matrix
81
- */
82
-
83
- function fromValues(m00, m01, m10, m11) {
84
- var out = new glMatrix.ARRAY_TYPE(4);
85
- out[0] = m00;
86
- out[1] = m01;
87
- out[2] = m10;
88
- out[3] = m11;
89
- return out;
90
- }
91
- /**
92
- * Set the components of a mat2 to the given values
93
- *
94
- * @param {mat2} out the receiving matrix
95
- * @param {Number} m00 Component in column 0, row 0 position (index 0)
96
- * @param {Number} m01 Component in column 0, row 1 position (index 1)
97
- * @param {Number} m10 Component in column 1, row 0 position (index 2)
98
- * @param {Number} m11 Component in column 1, row 1 position (index 3)
99
- * @returns {mat2} out
100
- */
101
-
102
- function set(out, m00, m01, m10, m11) {
103
- out[0] = m00;
104
- out[1] = m01;
105
- out[2] = m10;
106
- out[3] = m11;
107
- return out;
108
- }
109
- /**
110
- * Transpose the values of a mat2
111
- *
112
- * @param {mat2} out the receiving matrix
113
- * @param {ReadonlyMat2} a the source matrix
114
- * @returns {mat2} out
115
- */
116
-
117
- function transpose(out, a) {
118
- // If we are transposing ourselves we can skip a few steps but have to cache
119
- // some values
120
- if (out === a) {
121
- var a1 = a[1];
122
- out[1] = a[2];
123
- out[2] = a1;
124
- } else {
125
- out[0] = a[0];
126
- out[1] = a[2];
127
- out[2] = a[1];
128
- out[3] = a[3];
129
- }
130
-
131
- return out;
132
- }
133
- /**
134
- * Inverts a mat2
135
- *
136
- * @param {mat2} out the receiving matrix
137
- * @param {ReadonlyMat2} a the source matrix
138
- * @returns {mat2} out
139
- */
140
-
141
- function invert(out, a) {
142
- var a0 = a[0],
143
- a1 = a[1],
144
- a2 = a[2],
145
- a3 = a[3]; // Calculate the determinant
146
-
147
- var det = a0 * a3 - a2 * a1;
148
-
149
- if (!det) {
150
- return null;
151
- }
152
-
153
- det = 1.0 / det;
154
- out[0] = a3 * det;
155
- out[1] = -a1 * det;
156
- out[2] = -a2 * det;
157
- out[3] = a0 * det;
158
- return out;
159
- }
160
- /**
161
- * Calculates the adjugate of a mat2
162
- *
163
- * @param {mat2} out the receiving matrix
164
- * @param {ReadonlyMat2} a the source matrix
165
- * @returns {mat2} out
166
- */
167
-
168
- function adjoint(out, a) {
169
- // Caching this value is nessecary if out == a
170
- var a0 = a[0];
171
- out[0] = a[3];
172
- out[1] = -a[1];
173
- out[2] = -a[2];
174
- out[3] = a0;
175
- return out;
176
- }
177
- /**
178
- * Calculates the determinant of a mat2
179
- *
180
- * @param {ReadonlyMat2} a the source matrix
181
- * @returns {Number} determinant of a
182
- */
183
-
184
- function determinant(a) {
185
- return a[0] * a[3] - a[2] * a[1];
186
- }
187
- /**
188
- * Multiplies two mat2's
189
- *
190
- * @param {mat2} out the receiving matrix
191
- * @param {ReadonlyMat2} a the first operand
192
- * @param {ReadonlyMat2} b the second operand
193
- * @returns {mat2} out
194
- */
195
-
196
- function multiply(out, a, b) {
197
- var a0 = a[0],
198
- a1 = a[1],
199
- a2 = a[2],
200
- a3 = a[3];
201
- var b0 = b[0],
202
- b1 = b[1],
203
- b2 = b[2],
204
- b3 = b[3];
205
- out[0] = a0 * b0 + a2 * b1;
206
- out[1] = a1 * b0 + a3 * b1;
207
- out[2] = a0 * b2 + a2 * b3;
208
- out[3] = a1 * b2 + a3 * b3;
209
- return out;
210
- }
211
- /**
212
- * Rotates a mat2 by the given angle
213
- *
214
- * @param {mat2} out the receiving matrix
215
- * @param {ReadonlyMat2} a the matrix to rotate
216
- * @param {Number} rad the angle to rotate the matrix by
217
- * @returns {mat2} out
218
- */
219
-
220
- function rotate(out, a, rad) {
221
- var a0 = a[0],
222
- a1 = a[1],
223
- a2 = a[2],
224
- a3 = a[3];
225
- var s = Math.sin(rad);
226
- var c = Math.cos(rad);
227
- out[0] = a0 * c + a2 * s;
228
- out[1] = a1 * c + a3 * s;
229
- out[2] = a0 * -s + a2 * c;
230
- out[3] = a1 * -s + a3 * c;
231
- return out;
232
- }
233
- /**
234
- * Scales the mat2 by the dimensions in the given vec2
235
- *
236
- * @param {mat2} out the receiving matrix
237
- * @param {ReadonlyMat2} a the matrix to rotate
238
- * @param {ReadonlyVec2} v the vec2 to scale the matrix by
239
- * @returns {mat2} out
240
- **/
241
-
242
- function scale(out, a, v) {
243
- var a0 = a[0],
244
- a1 = a[1],
245
- a2 = a[2],
246
- a3 = a[3];
247
- var v0 = v[0],
248
- v1 = v[1];
249
- out[0] = a0 * v0;
250
- out[1] = a1 * v0;
251
- out[2] = a2 * v1;
252
- out[3] = a3 * v1;
253
- return out;
254
- }
255
- /**
256
- * Creates a matrix from a given angle
257
- * This is equivalent to (but much faster than):
258
- *
259
- * mat2.identity(dest);
260
- * mat2.rotate(dest, dest, rad);
261
- *
262
- * @param {mat2} out mat2 receiving operation result
263
- * @param {Number} rad the angle to rotate the matrix by
264
- * @returns {mat2} out
265
- */
266
-
267
- function fromRotation(out, rad) {
268
- var s = Math.sin(rad);
269
- var c = Math.cos(rad);
270
- out[0] = c;
271
- out[1] = s;
272
- out[2] = -s;
273
- out[3] = c;
274
- return out;
275
- }
276
- /**
277
- * Creates a matrix from a vector scaling
278
- * This is equivalent to (but much faster than):
279
- *
280
- * mat2.identity(dest);
281
- * mat2.scale(dest, dest, vec);
282
- *
283
- * @param {mat2} out mat2 receiving operation result
284
- * @param {ReadonlyVec2} v Scaling vector
285
- * @returns {mat2} out
286
- */
287
-
288
- function fromScaling(out, v) {
289
- out[0] = v[0];
290
- out[1] = 0;
291
- out[2] = 0;
292
- out[3] = v[1];
293
- return out;
294
- }
295
- /**
296
- * Returns a string representation of a mat2
297
- *
298
- * @param {ReadonlyMat2} a matrix to represent as a string
299
- * @returns {String} string representation of the matrix
300
- */
301
-
302
- function str(a) {
303
- return "mat2(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ")";
304
- }
305
- /**
306
- * Returns Frobenius norm of a mat2
307
- *
308
- * @param {ReadonlyMat2} a the matrix to calculate Frobenius norm of
309
- * @returns {Number} Frobenius norm
310
- */
311
-
312
- function frob(a) {
313
- return Math.hypot(a[0], a[1], a[2], a[3]);
314
- }
315
- /**
316
- * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix
317
- * @param {ReadonlyMat2} L the lower triangular matrix
318
- * @param {ReadonlyMat2} D the diagonal matrix
319
- * @param {ReadonlyMat2} U the upper triangular matrix
320
- * @param {ReadonlyMat2} a the input matrix to factorize
321
- */
322
-
323
- function LDU(L, D, U, a) {
324
- L[2] = a[2] / a[0];
325
- U[0] = a[0];
326
- U[1] = a[1];
327
- U[3] = a[3] - L[2] * U[1];
328
- return [L, D, U];
329
- }
330
- /**
331
- * Adds two mat2's
332
- *
333
- * @param {mat2} out the receiving matrix
334
- * @param {ReadonlyMat2} a the first operand
335
- * @param {ReadonlyMat2} b the second operand
336
- * @returns {mat2} out
337
- */
338
-
339
- function add(out, a, b) {
340
- out[0] = a[0] + b[0];
341
- out[1] = a[1] + b[1];
342
- out[2] = a[2] + b[2];
343
- out[3] = a[3] + b[3];
344
- return out;
345
- }
346
- /**
347
- * Subtracts matrix b from matrix a
348
- *
349
- * @param {mat2} out the receiving matrix
350
- * @param {ReadonlyMat2} a the first operand
351
- * @param {ReadonlyMat2} b the second operand
352
- * @returns {mat2} out
353
- */
354
-
355
- function subtract(out, a, b) {
356
- out[0] = a[0] - b[0];
357
- out[1] = a[1] - b[1];
358
- out[2] = a[2] - b[2];
359
- out[3] = a[3] - b[3];
360
- return out;
361
- }
362
- /**
363
- * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
364
- *
365
- * @param {ReadonlyMat2} a The first matrix.
366
- * @param {ReadonlyMat2} b The second matrix.
367
- * @returns {Boolean} True if the matrices are equal, false otherwise.
368
- */
369
-
370
- function exactEquals(a, b) {
371
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];
372
- }
373
- /**
374
- * Returns whether or not the matrices have approximately the same elements in the same position.
375
- *
376
- * @param {ReadonlyMat2} a The first matrix.
377
- * @param {ReadonlyMat2} b The second matrix.
378
- * @returns {Boolean} True if the matrices are equal, false otherwise.
379
- */
380
-
381
- function equals(a, b) {
382
- var a0 = a[0],
383
- a1 = a[1],
384
- a2 = a[2],
385
- a3 = a[3];
386
- var b0 = b[0],
387
- b1 = b[1],
388
- b2 = b[2],
389
- b3 = b[3];
390
- return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));
391
- }
392
- /**
393
- * Multiply each element of the matrix by a scalar.
394
- *
395
- * @param {mat2} out the receiving matrix
396
- * @param {ReadonlyMat2} a the matrix to scale
397
- * @param {Number} b amount to scale the matrix's elements by
398
- * @returns {mat2} out
399
- */
400
-
401
- function multiplyScalar(out, a, b) {
402
- out[0] = a[0] * b;
403
- out[1] = a[1] * b;
404
- out[2] = a[2] * b;
405
- out[3] = a[3] * b;
406
- return out;
407
- }
408
- /**
409
- * Adds two mat2's after multiplying each element of the second operand by a scalar value.
410
- *
411
- * @param {mat2} out the receiving vector
412
- * @param {ReadonlyMat2} a the first operand
413
- * @param {ReadonlyMat2} b the second operand
414
- * @param {Number} scale the amount to scale b's elements by before adding
415
- * @returns {mat2} out
416
- */
417
-
418
- function multiplyScalarAndAdd(out, a, b, scale) {
419
- out[0] = a[0] + b[0] * scale;
420
- out[1] = a[1] + b[1] * scale;
421
- out[2] = a[2] + b[2] * scale;
422
- out[3] = a[3] + b[3] * scale;
423
- return out;
424
- }
425
- /**
426
- * Alias for {@link mat2.multiply}
427
- * @function
428
- */
429
-
430
- var mul = (/* unused pure expression or super */ null && (multiply));
431
- /**
432
- * Alias for {@link mat2.subtract}
433
- * @function
434
- */
435
-
436
- var sub = (/* unused pure expression or super */ null && (subtract));
437
-
438
- },
439
- 46245(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
440
- "use strict";
441
- /* import */ var _common_js__rspack_import_0 = __webpack_require__(23172);
442
-
443
- /**
444
- * 2x3 Matrix
445
- * @module mat2d
446
- * @description
447
- * A mat2d contains six elements defined as:
448
- * <pre>
449
- * [a, b,
450
- * c, d,
451
- * tx, ty]
452
- * </pre>
453
- * This is a short form for the 3x3 matrix:
454
- * <pre>
455
- * [a, b, 0,
456
- * c, d, 0,
457
- * tx, ty, 1]
458
- * </pre>
459
- * The last column is ignored so the array is shorter and operations are faster.
460
- */
461
-
462
- /**
463
- * Creates a new identity mat2d
464
- *
465
- * @returns {mat2d} a new 2x3 matrix
466
- */
467
-
468
- function create() {
469
- var out = new glMatrix.ARRAY_TYPE(6);
470
-
471
- if (glMatrix.ARRAY_TYPE != Float32Array) {
472
- out[1] = 0;
473
- out[2] = 0;
474
- out[4] = 0;
475
- out[5] = 0;
476
- }
477
-
478
- out[0] = 1;
479
- out[3] = 1;
480
- return out;
481
- }
482
- /**
483
- * Creates a new mat2d initialized with values from an existing matrix
484
- *
485
- * @param {ReadonlyMat2d} a matrix to clone
486
- * @returns {mat2d} a new 2x3 matrix
487
- */
488
-
489
- function clone(a) {
490
- var out = new glMatrix.ARRAY_TYPE(6);
491
- out[0] = a[0];
492
- out[1] = a[1];
493
- out[2] = a[2];
494
- out[3] = a[3];
495
- out[4] = a[4];
496
- out[5] = a[5];
497
- return out;
498
- }
499
- /**
500
- * Copy the values from one mat2d to another
501
- *
502
- * @param {mat2d} out the receiving matrix
503
- * @param {ReadonlyMat2d} a the source matrix
504
- * @returns {mat2d} out
505
- */
506
-
507
- function copy(out, a) {
508
- out[0] = a[0];
509
- out[1] = a[1];
510
- out[2] = a[2];
511
- out[3] = a[3];
512
- out[4] = a[4];
513
- out[5] = a[5];
514
- return out;
515
- }
516
- /**
517
- * Set a mat2d to the identity matrix
518
- *
519
- * @param {mat2d} out the receiving matrix
520
- * @returns {mat2d} out
521
- */
522
-
523
- function identity(out) {
524
- out[0] = 1;
525
- out[1] = 0;
526
- out[2] = 0;
527
- out[3] = 1;
528
- out[4] = 0;
529
- out[5] = 0;
530
- return out;
531
- }
532
- /**
533
- * Create a new mat2d with the given values
534
- *
535
- * @param {Number} a Component A (index 0)
536
- * @param {Number} b Component B (index 1)
537
- * @param {Number} c Component C (index 2)
538
- * @param {Number} d Component D (index 3)
539
- * @param {Number} tx Component TX (index 4)
540
- * @param {Number} ty Component TY (index 5)
541
- * @returns {mat2d} A new mat2d
542
- */
543
-
544
- function fromValues(a, b, c, d, tx, ty) {
545
- var out = new glMatrix.ARRAY_TYPE(6);
546
- out[0] = a;
547
- out[1] = b;
548
- out[2] = c;
549
- out[3] = d;
550
- out[4] = tx;
551
- out[5] = ty;
552
- return out;
553
- }
554
- /**
555
- * Set the components of a mat2d to the given values
556
- *
557
- * @param {mat2d} out the receiving matrix
558
- * @param {Number} a Component A (index 0)
559
- * @param {Number} b Component B (index 1)
560
- * @param {Number} c Component C (index 2)
561
- * @param {Number} d Component D (index 3)
562
- * @param {Number} tx Component TX (index 4)
563
- * @param {Number} ty Component TY (index 5)
564
- * @returns {mat2d} out
565
- */
566
-
567
- function set(out, a, b, c, d, tx, ty) {
568
- out[0] = a;
569
- out[1] = b;
570
- out[2] = c;
571
- out[3] = d;
572
- out[4] = tx;
573
- out[5] = ty;
574
- return out;
575
- }
576
- /**
577
- * Inverts a mat2d
578
- *
579
- * @param {mat2d} out the receiving matrix
580
- * @param {ReadonlyMat2d} a the source matrix
581
- * @returns {mat2d} out
582
- */
583
-
584
- function invert(out, a) {
585
- var aa = a[0],
586
- ab = a[1],
587
- ac = a[2],
588
- ad = a[3];
589
- var atx = a[4],
590
- aty = a[5];
591
- var det = aa * ad - ab * ac;
592
-
593
- if (!det) {
594
- return null;
595
- }
596
-
597
- det = 1.0 / det;
598
- out[0] = ad * det;
599
- out[1] = -ab * det;
600
- out[2] = -ac * det;
601
- out[3] = aa * det;
602
- out[4] = (ac * aty - ad * atx) * det;
603
- out[5] = (ab * atx - aa * aty) * det;
604
- return out;
605
- }
606
- /**
607
- * Calculates the determinant of a mat2d
608
- *
609
- * @param {ReadonlyMat2d} a the source matrix
610
- * @returns {Number} determinant of a
611
- */
612
-
613
- function determinant(a) {
614
- return a[0] * a[3] - a[1] * a[2];
615
- }
616
- /**
617
- * Multiplies two mat2d's
618
- *
619
- * @param {mat2d} out the receiving matrix
620
- * @param {ReadonlyMat2d} a the first operand
621
- * @param {ReadonlyMat2d} b the second operand
622
- * @returns {mat2d} out
623
- */
624
-
625
- function multiply(out, a, b) {
626
- var a0 = a[0],
627
- a1 = a[1],
628
- a2 = a[2],
629
- a3 = a[3],
630
- a4 = a[4],
631
- a5 = a[5];
632
- var b0 = b[0],
633
- b1 = b[1],
634
- b2 = b[2],
635
- b3 = b[3],
636
- b4 = b[4],
637
- b5 = b[5];
638
- out[0] = a0 * b0 + a2 * b1;
639
- out[1] = a1 * b0 + a3 * b1;
640
- out[2] = a0 * b2 + a2 * b3;
641
- out[3] = a1 * b2 + a3 * b3;
642
- out[4] = a0 * b4 + a2 * b5 + a4;
643
- out[5] = a1 * b4 + a3 * b5 + a5;
644
- return out;
645
- }
646
- /**
647
- * Rotates a mat2d by the given angle
648
- *
649
- * @param {mat2d} out the receiving matrix
650
- * @param {ReadonlyMat2d} a the matrix to rotate
651
- * @param {Number} rad the angle to rotate the matrix by
652
- * @returns {mat2d} out
653
- */
654
-
655
- function rotate(out, a, rad) {
656
- var a0 = a[0],
657
- a1 = a[1],
658
- a2 = a[2],
659
- a3 = a[3],
660
- a4 = a[4],
661
- a5 = a[5];
662
- var s = Math.sin(rad);
663
- var c = Math.cos(rad);
664
- out[0] = a0 * c + a2 * s;
665
- out[1] = a1 * c + a3 * s;
666
- out[2] = a0 * -s + a2 * c;
667
- out[3] = a1 * -s + a3 * c;
668
- out[4] = a4;
669
- out[5] = a5;
670
- return out;
671
- }
672
- /**
673
- * Scales the mat2d by the dimensions in the given vec2
674
- *
675
- * @param {mat2d} out the receiving matrix
676
- * @param {ReadonlyMat2d} a the matrix to translate
677
- * @param {ReadonlyVec2} v the vec2 to scale the matrix by
678
- * @returns {mat2d} out
679
- **/
680
-
681
- function scale(out, a, v) {
682
- var a0 = a[0],
683
- a1 = a[1],
684
- a2 = a[2],
685
- a3 = a[3],
686
- a4 = a[4],
687
- a5 = a[5];
688
- var v0 = v[0],
689
- v1 = v[1];
690
- out[0] = a0 * v0;
691
- out[1] = a1 * v0;
692
- out[2] = a2 * v1;
693
- out[3] = a3 * v1;
694
- out[4] = a4;
695
- out[5] = a5;
696
- return out;
697
- }
698
- /**
699
- * Translates the mat2d by the dimensions in the given vec2
700
- *
701
- * @param {mat2d} out the receiving matrix
702
- * @param {ReadonlyMat2d} a the matrix to translate
703
- * @param {ReadonlyVec2} v the vec2 to translate the matrix by
704
- * @returns {mat2d} out
705
- **/
706
-
707
- function translate(out, a, v) {
708
- var a0 = a[0],
709
- a1 = a[1],
710
- a2 = a[2],
711
- a3 = a[3],
712
- a4 = a[4],
713
- a5 = a[5];
714
- var v0 = v[0],
715
- v1 = v[1];
716
- out[0] = a0;
717
- out[1] = a1;
718
- out[2] = a2;
719
- out[3] = a3;
720
- out[4] = a0 * v0 + a2 * v1 + a4;
721
- out[5] = a1 * v0 + a3 * v1 + a5;
722
- return out;
723
- }
724
- /**
725
- * Creates a matrix from a given angle
726
- * This is equivalent to (but much faster than):
727
- *
728
- * mat2d.identity(dest);
729
- * mat2d.rotate(dest, dest, rad);
730
- *
731
- * @param {mat2d} out mat2d receiving operation result
732
- * @param {Number} rad the angle to rotate the matrix by
733
- * @returns {mat2d} out
734
- */
735
-
736
- function fromRotation(out, rad) {
737
- var s = Math.sin(rad),
738
- c = Math.cos(rad);
739
- out[0] = c;
740
- out[1] = s;
741
- out[2] = -s;
742
- out[3] = c;
743
- out[4] = 0;
744
- out[5] = 0;
745
- return out;
746
- }
747
- /**
748
- * Creates a matrix from a vector scaling
749
- * This is equivalent to (but much faster than):
750
- *
751
- * mat2d.identity(dest);
752
- * mat2d.scale(dest, dest, vec);
753
- *
754
- * @param {mat2d} out mat2d receiving operation result
755
- * @param {ReadonlyVec2} v Scaling vector
756
- * @returns {mat2d} out
757
- */
758
-
759
- function fromScaling(out, v) {
760
- out[0] = v[0];
761
- out[1] = 0;
762
- out[2] = 0;
763
- out[3] = v[1];
764
- out[4] = 0;
765
- out[5] = 0;
766
- return out;
767
- }
768
- /**
769
- * Creates a matrix from a vector translation
770
- * This is equivalent to (but much faster than):
771
- *
772
- * mat2d.identity(dest);
773
- * mat2d.translate(dest, dest, vec);
774
- *
775
- * @param {mat2d} out mat2d receiving operation result
776
- * @param {ReadonlyVec2} v Translation vector
777
- * @returns {mat2d} out
778
- */
779
-
780
- function fromTranslation(out, v) {
781
- out[0] = 1;
782
- out[1] = 0;
783
- out[2] = 0;
784
- out[3] = 1;
785
- out[4] = v[0];
786
- out[5] = v[1];
787
- return out;
788
- }
789
- /**
790
- * Returns a string representation of a mat2d
791
- *
792
- * @param {ReadonlyMat2d} a matrix to represent as a string
793
- * @returns {String} string representation of the matrix
794
- */
795
-
796
- function str(a) {
797
- return "mat2d(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")";
798
- }
799
- /**
800
- * Returns Frobenius norm of a mat2d
801
- *
802
- * @param {ReadonlyMat2d} a the matrix to calculate Frobenius norm of
803
- * @returns {Number} Frobenius norm
804
- */
805
-
806
- function frob(a) {
807
- return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);
808
- }
809
- /**
810
- * Adds two mat2d's
811
- *
812
- * @param {mat2d} out the receiving matrix
813
- * @param {ReadonlyMat2d} a the first operand
814
- * @param {ReadonlyMat2d} b the second operand
815
- * @returns {mat2d} out
816
- */
817
-
818
- function add(out, a, b) {
819
- out[0] = a[0] + b[0];
820
- out[1] = a[1] + b[1];
821
- out[2] = a[2] + b[2];
822
- out[3] = a[3] + b[3];
823
- out[4] = a[4] + b[4];
824
- out[5] = a[5] + b[5];
825
- return out;
826
- }
827
- /**
828
- * Subtracts matrix b from matrix a
829
- *
830
- * @param {mat2d} out the receiving matrix
831
- * @param {ReadonlyMat2d} a the first operand
832
- * @param {ReadonlyMat2d} b the second operand
833
- * @returns {mat2d} out
834
- */
835
-
836
- function subtract(out, a, b) {
837
- out[0] = a[0] - b[0];
838
- out[1] = a[1] - b[1];
839
- out[2] = a[2] - b[2];
840
- out[3] = a[3] - b[3];
841
- out[4] = a[4] - b[4];
842
- out[5] = a[5] - b[5];
843
- return out;
844
- }
845
- /**
846
- * Multiply each element of the matrix by a scalar.
847
- *
848
- * @param {mat2d} out the receiving matrix
849
- * @param {ReadonlyMat2d} a the matrix to scale
850
- * @param {Number} b amount to scale the matrix's elements by
851
- * @returns {mat2d} out
852
- */
853
-
854
- function multiplyScalar(out, a, b) {
855
- out[0] = a[0] * b;
856
- out[1] = a[1] * b;
857
- out[2] = a[2] * b;
858
- out[3] = a[3] * b;
859
- out[4] = a[4] * b;
860
- out[5] = a[5] * b;
861
- return out;
862
- }
863
- /**
864
- * Adds two mat2d's after multiplying each element of the second operand by a scalar value.
865
- *
866
- * @param {mat2d} out the receiving vector
867
- * @param {ReadonlyMat2d} a the first operand
868
- * @param {ReadonlyMat2d} b the second operand
869
- * @param {Number} scale the amount to scale b's elements by before adding
870
- * @returns {mat2d} out
871
- */
872
-
873
- function multiplyScalarAndAdd(out, a, b, scale) {
874
- out[0] = a[0] + b[0] * scale;
875
- out[1] = a[1] + b[1] * scale;
876
- out[2] = a[2] + b[2] * scale;
877
- out[3] = a[3] + b[3] * scale;
878
- out[4] = a[4] + b[4] * scale;
879
- out[5] = a[5] + b[5] * scale;
880
- return out;
881
- }
882
- /**
883
- * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
884
- *
885
- * @param {ReadonlyMat2d} a The first matrix.
886
- * @param {ReadonlyMat2d} b The second matrix.
887
- * @returns {Boolean} True if the matrices are equal, false otherwise.
888
- */
889
-
890
- function exactEquals(a, b) {
891
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5];
892
- }
893
- /**
894
- * Returns whether or not the matrices have approximately the same elements in the same position.
895
- *
896
- * @param {ReadonlyMat2d} a The first matrix.
897
- * @param {ReadonlyMat2d} b The second matrix.
898
- * @returns {Boolean} True if the matrices are equal, false otherwise.
899
- */
900
-
901
- function equals(a, b) {
902
- var a0 = a[0],
903
- a1 = a[1],
904
- a2 = a[2],
905
- a3 = a[3],
906
- a4 = a[4],
907
- a5 = a[5];
908
- var b0 = b[0],
909
- b1 = b[1],
910
- b2 = b[2],
911
- b3 = b[3],
912
- b4 = b[4],
913
- b5 = b[5];
914
- return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5));
915
- }
916
- /**
917
- * Alias for {@link mat2d.multiply}
918
- * @function
919
- */
920
-
921
- var mul = (/* unused pure expression or super */ null && (multiply));
922
- /**
923
- * Alias for {@link mat2d.subtract}
924
- * @function
925
- */
926
-
927
- var sub = (/* unused pure expression or super */ null && (subtract));
928
-
929
- },
930
- 8470(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
931
- "use strict";
932
- /* import */ var _common_js__rspack_import_0 = __webpack_require__(23172);
933
- /* import */ var _quat_js__rspack_import_1 = __webpack_require__(6462);
934
- /* import */ var _mat4_js__rspack_import_2 = __webpack_require__(39095);
935
-
936
-
937
-
938
- /**
939
- * Dual Quaternion<br>
940
- * Format: [real, dual]<br>
941
- * Quaternion format: XYZW<br>
942
- * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.<br>
943
- * @module quat2
944
- */
945
-
946
- /**
947
- * Creates a new identity dual quat
948
- *
949
- * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation]
950
- */
951
-
952
- function create() {
953
- var dq = new glMatrix.ARRAY_TYPE(8);
954
-
955
- if (glMatrix.ARRAY_TYPE != Float32Array) {
956
- dq[0] = 0;
957
- dq[1] = 0;
958
- dq[2] = 0;
959
- dq[4] = 0;
960
- dq[5] = 0;
961
- dq[6] = 0;
962
- dq[7] = 0;
963
- }
964
-
965
- dq[3] = 1;
966
- return dq;
967
- }
968
- /**
969
- * Creates a new quat initialized with values from an existing quaternion
970
- *
971
- * @param {ReadonlyQuat2} a dual quaternion to clone
972
- * @returns {quat2} new dual quaternion
973
- * @function
974
- */
975
-
976
- function clone(a) {
977
- var dq = new glMatrix.ARRAY_TYPE(8);
978
- dq[0] = a[0];
979
- dq[1] = a[1];
980
- dq[2] = a[2];
981
- dq[3] = a[3];
982
- dq[4] = a[4];
983
- dq[5] = a[5];
984
- dq[6] = a[6];
985
- dq[7] = a[7];
986
- return dq;
987
- }
988
- /**
989
- * Creates a new dual quat initialized with the given values
990
- *
991
- * @param {Number} x1 X component
992
- * @param {Number} y1 Y component
993
- * @param {Number} z1 Z component
994
- * @param {Number} w1 W component
995
- * @param {Number} x2 X component
996
- * @param {Number} y2 Y component
997
- * @param {Number} z2 Z component
998
- * @param {Number} w2 W component
999
- * @returns {quat2} new dual quaternion
1000
- * @function
1001
- */
1002
-
1003
- function fromValues(x1, y1, z1, w1, x2, y2, z2, w2) {
1004
- var dq = new glMatrix.ARRAY_TYPE(8);
1005
- dq[0] = x1;
1006
- dq[1] = y1;
1007
- dq[2] = z1;
1008
- dq[3] = w1;
1009
- dq[4] = x2;
1010
- dq[5] = y2;
1011
- dq[6] = z2;
1012
- dq[7] = w2;
1013
- return dq;
1014
- }
1015
- /**
1016
- * Creates a new dual quat from the given values (quat and translation)
1017
- *
1018
- * @param {Number} x1 X component
1019
- * @param {Number} y1 Y component
1020
- * @param {Number} z1 Z component
1021
- * @param {Number} w1 W component
1022
- * @param {Number} x2 X component (translation)
1023
- * @param {Number} y2 Y component (translation)
1024
- * @param {Number} z2 Z component (translation)
1025
- * @returns {quat2} new dual quaternion
1026
- * @function
1027
- */
1028
-
1029
- function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) {
1030
- var dq = new glMatrix.ARRAY_TYPE(8);
1031
- dq[0] = x1;
1032
- dq[1] = y1;
1033
- dq[2] = z1;
1034
- dq[3] = w1;
1035
- var ax = x2 * 0.5,
1036
- ay = y2 * 0.5,
1037
- az = z2 * 0.5;
1038
- dq[4] = ax * w1 + ay * z1 - az * y1;
1039
- dq[5] = ay * w1 + az * x1 - ax * z1;
1040
- dq[6] = az * w1 + ax * y1 - ay * x1;
1041
- dq[7] = -ax * x1 - ay * y1 - az * z1;
1042
- return dq;
1043
- }
1044
- /**
1045
- * Creates a dual quat from a quaternion and a translation
1046
- *
1047
- * @param {ReadonlyQuat2} dual quaternion receiving operation result
1048
- * @param {ReadonlyQuat} q a normalized quaternion
1049
- * @param {ReadonlyVec3} t tranlation vector
1050
- * @returns {quat2} dual quaternion receiving operation result
1051
- * @function
1052
- */
1053
-
1054
- function fromRotationTranslation(out, q, t) {
1055
- var ax = t[0] * 0.5,
1056
- ay = t[1] * 0.5,
1057
- az = t[2] * 0.5,
1058
- bx = q[0],
1059
- by = q[1],
1060
- bz = q[2],
1061
- bw = q[3];
1062
- out[0] = bx;
1063
- out[1] = by;
1064
- out[2] = bz;
1065
- out[3] = bw;
1066
- out[4] = ax * bw + ay * bz - az * by;
1067
- out[5] = ay * bw + az * bx - ax * bz;
1068
- out[6] = az * bw + ax * by - ay * bx;
1069
- out[7] = -ax * bx - ay * by - az * bz;
1070
- return out;
1071
- }
1072
- /**
1073
- * Creates a dual quat from a translation
1074
- *
1075
- * @param {ReadonlyQuat2} dual quaternion receiving operation result
1076
- * @param {ReadonlyVec3} t translation vector
1077
- * @returns {quat2} dual quaternion receiving operation result
1078
- * @function
1079
- */
1080
-
1081
- function fromTranslation(out, t) {
1082
- out[0] = 0;
1083
- out[1] = 0;
1084
- out[2] = 0;
1085
- out[3] = 1;
1086
- out[4] = t[0] * 0.5;
1087
- out[5] = t[1] * 0.5;
1088
- out[6] = t[2] * 0.5;
1089
- out[7] = 0;
1090
- return out;
1091
- }
1092
- /**
1093
- * Creates a dual quat from a quaternion
1094
- *
1095
- * @param {ReadonlyQuat2} dual quaternion receiving operation result
1096
- * @param {ReadonlyQuat} q the quaternion
1097
- * @returns {quat2} dual quaternion receiving operation result
1098
- * @function
1099
- */
1100
-
1101
- function fromRotation(out, q) {
1102
- out[0] = q[0];
1103
- out[1] = q[1];
1104
- out[2] = q[2];
1105
- out[3] = q[3];
1106
- out[4] = 0;
1107
- out[5] = 0;
1108
- out[6] = 0;
1109
- out[7] = 0;
1110
- return out;
1111
- }
1112
- /**
1113
- * Creates a new dual quat from a matrix (4x4)
1114
- *
1115
- * @param {quat2} out the dual quaternion
1116
- * @param {ReadonlyMat4} a the matrix
1117
- * @returns {quat2} dual quat receiving operation result
1118
- * @function
1119
- */
1120
-
1121
- function fromMat4(out, a) {
1122
- //TODO Optimize this
1123
- var outer = quat.create();
1124
- mat4.getRotation(outer, a);
1125
- var t = new glMatrix.ARRAY_TYPE(3);
1126
- mat4.getTranslation(t, a);
1127
- fromRotationTranslation(out, outer, t);
1128
- return out;
1129
- }
1130
- /**
1131
- * Copy the values from one dual quat to another
1132
- *
1133
- * @param {quat2} out the receiving dual quaternion
1134
- * @param {ReadonlyQuat2} a the source dual quaternion
1135
- * @returns {quat2} out
1136
- * @function
1137
- */
1138
-
1139
- function copy(out, a) {
1140
- out[0] = a[0];
1141
- out[1] = a[1];
1142
- out[2] = a[2];
1143
- out[3] = a[3];
1144
- out[4] = a[4];
1145
- out[5] = a[5];
1146
- out[6] = a[6];
1147
- out[7] = a[7];
1148
- return out;
1149
- }
1150
- /**
1151
- * Set a dual quat to the identity dual quaternion
1152
- *
1153
- * @param {quat2} out the receiving quaternion
1154
- * @returns {quat2} out
1155
- */
1156
-
1157
- function identity(out) {
1158
- out[0] = 0;
1159
- out[1] = 0;
1160
- out[2] = 0;
1161
- out[3] = 1;
1162
- out[4] = 0;
1163
- out[5] = 0;
1164
- out[6] = 0;
1165
- out[7] = 0;
1166
- return out;
1167
- }
1168
- /**
1169
- * Set the components of a dual quat to the given values
1170
- *
1171
- * @param {quat2} out the receiving quaternion
1172
- * @param {Number} x1 X component
1173
- * @param {Number} y1 Y component
1174
- * @param {Number} z1 Z component
1175
- * @param {Number} w1 W component
1176
- * @param {Number} x2 X component
1177
- * @param {Number} y2 Y component
1178
- * @param {Number} z2 Z component
1179
- * @param {Number} w2 W component
1180
- * @returns {quat2} out
1181
- * @function
1182
- */
1183
-
1184
- function set(out, x1, y1, z1, w1, x2, y2, z2, w2) {
1185
- out[0] = x1;
1186
- out[1] = y1;
1187
- out[2] = z1;
1188
- out[3] = w1;
1189
- out[4] = x2;
1190
- out[5] = y2;
1191
- out[6] = z2;
1192
- out[7] = w2;
1193
- return out;
1194
- }
1195
- /**
1196
- * Gets the real part of a dual quat
1197
- * @param {quat} out real part
1198
- * @param {ReadonlyQuat2} a Dual Quaternion
1199
- * @return {quat} real part
1200
- */
1201
-
1202
- var getReal = _quat_js__rspack_import_1/* .copy */.C;
1203
- /**
1204
- * Gets the dual part of a dual quat
1205
- * @param {quat} out dual part
1206
- * @param {ReadonlyQuat2} a Dual Quaternion
1207
- * @return {quat} dual part
1208
- */
1209
-
1210
- function getDual(out, a) {
1211
- out[0] = a[4];
1212
- out[1] = a[5];
1213
- out[2] = a[6];
1214
- out[3] = a[7];
1215
- return out;
1216
- }
1217
- /**
1218
- * Set the real component of a dual quat to the given quaternion
1219
- *
1220
- * @param {quat2} out the receiving quaternion
1221
- * @param {ReadonlyQuat} q a quaternion representing the real part
1222
- * @returns {quat2} out
1223
- * @function
1224
- */
1225
-
1226
- var setReal = _quat_js__rspack_import_1/* .copy */.C;
1227
- /**
1228
- * Set the dual component of a dual quat to the given quaternion
1229
- *
1230
- * @param {quat2} out the receiving quaternion
1231
- * @param {ReadonlyQuat} q a quaternion representing the dual part
1232
- * @returns {quat2} out
1233
- * @function
1234
- */
1235
-
1236
- function setDual(out, q) {
1237
- out[4] = q[0];
1238
- out[5] = q[1];
1239
- out[6] = q[2];
1240
- out[7] = q[3];
1241
- return out;
1242
- }
1243
- /**
1244
- * Gets the translation of a normalized dual quat
1245
- * @param {vec3} out translation
1246
- * @param {ReadonlyQuat2} a Dual Quaternion to be decomposed
1247
- * @return {vec3} translation
1248
- */
1249
-
1250
- function getTranslation(out, a) {
1251
- var ax = a[4],
1252
- ay = a[5],
1253
- az = a[6],
1254
- aw = a[7],
1255
- bx = -a[0],
1256
- by = -a[1],
1257
- bz = -a[2],
1258
- bw = a[3];
1259
- out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;
1260
- out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;
1261
- out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;
1262
- return out;
1263
- }
1264
- /**
1265
- * Translates a dual quat by the given vector
1266
- *
1267
- * @param {quat2} out the receiving dual quaternion
1268
- * @param {ReadonlyQuat2} a the dual quaternion to translate
1269
- * @param {ReadonlyVec3} v vector to translate by
1270
- * @returns {quat2} out
1271
- */
1272
-
1273
- function translate(out, a, v) {
1274
- var ax1 = a[0],
1275
- ay1 = a[1],
1276
- az1 = a[2],
1277
- aw1 = a[3],
1278
- bx1 = v[0] * 0.5,
1279
- by1 = v[1] * 0.5,
1280
- bz1 = v[2] * 0.5,
1281
- ax2 = a[4],
1282
- ay2 = a[5],
1283
- az2 = a[6],
1284
- aw2 = a[7];
1285
- out[0] = ax1;
1286
- out[1] = ay1;
1287
- out[2] = az1;
1288
- out[3] = aw1;
1289
- out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2;
1290
- out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2;
1291
- out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2;
1292
- out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2;
1293
- return out;
1294
- }
1295
- /**
1296
- * Rotates a dual quat around the X axis
1297
- *
1298
- * @param {quat2} out the receiving dual quaternion
1299
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
1300
- * @param {number} rad how far should the rotation be
1301
- * @returns {quat2} out
1302
- */
1303
-
1304
- function rotateX(out, a, rad) {
1305
- var bx = -a[0],
1306
- by = -a[1],
1307
- bz = -a[2],
1308
- bw = a[3],
1309
- ax = a[4],
1310
- ay = a[5],
1311
- az = a[6],
1312
- aw = a[7],
1313
- ax1 = ax * bw + aw * bx + ay * bz - az * by,
1314
- ay1 = ay * bw + aw * by + az * bx - ax * bz,
1315
- az1 = az * bw + aw * bz + ax * by - ay * bx,
1316
- aw1 = aw * bw - ax * bx - ay * by - az * bz;
1317
- quat.rotateX(out, a, rad);
1318
- bx = out[0];
1319
- by = out[1];
1320
- bz = out[2];
1321
- bw = out[3];
1322
- out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
1323
- out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
1324
- out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
1325
- out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
1326
- return out;
1327
- }
1328
- /**
1329
- * Rotates a dual quat around the Y axis
1330
- *
1331
- * @param {quat2} out the receiving dual quaternion
1332
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
1333
- * @param {number} rad how far should the rotation be
1334
- * @returns {quat2} out
1335
- */
1336
-
1337
- function rotateY(out, a, rad) {
1338
- var bx = -a[0],
1339
- by = -a[1],
1340
- bz = -a[2],
1341
- bw = a[3],
1342
- ax = a[4],
1343
- ay = a[5],
1344
- az = a[6],
1345
- aw = a[7],
1346
- ax1 = ax * bw + aw * bx + ay * bz - az * by,
1347
- ay1 = ay * bw + aw * by + az * bx - ax * bz,
1348
- az1 = az * bw + aw * bz + ax * by - ay * bx,
1349
- aw1 = aw * bw - ax * bx - ay * by - az * bz;
1350
- quat.rotateY(out, a, rad);
1351
- bx = out[0];
1352
- by = out[1];
1353
- bz = out[2];
1354
- bw = out[3];
1355
- out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
1356
- out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
1357
- out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
1358
- out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
1359
- return out;
1360
- }
1361
- /**
1362
- * Rotates a dual quat around the Z axis
1363
- *
1364
- * @param {quat2} out the receiving dual quaternion
1365
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
1366
- * @param {number} rad how far should the rotation be
1367
- * @returns {quat2} out
1368
- */
1369
-
1370
- function rotateZ(out, a, rad) {
1371
- var bx = -a[0],
1372
- by = -a[1],
1373
- bz = -a[2],
1374
- bw = a[3],
1375
- ax = a[4],
1376
- ay = a[5],
1377
- az = a[6],
1378
- aw = a[7],
1379
- ax1 = ax * bw + aw * bx + ay * bz - az * by,
1380
- ay1 = ay * bw + aw * by + az * bx - ax * bz,
1381
- az1 = az * bw + aw * bz + ax * by - ay * bx,
1382
- aw1 = aw * bw - ax * bx - ay * by - az * bz;
1383
- quat.rotateZ(out, a, rad);
1384
- bx = out[0];
1385
- by = out[1];
1386
- bz = out[2];
1387
- bw = out[3];
1388
- out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
1389
- out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
1390
- out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
1391
- out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
1392
- return out;
1393
- }
1394
- /**
1395
- * Rotates a dual quat by a given quaternion (a * q)
1396
- *
1397
- * @param {quat2} out the receiving dual quaternion
1398
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
1399
- * @param {ReadonlyQuat} q quaternion to rotate by
1400
- * @returns {quat2} out
1401
- */
1402
-
1403
- function rotateByQuatAppend(out, a, q) {
1404
- var qx = q[0],
1405
- qy = q[1],
1406
- qz = q[2],
1407
- qw = q[3],
1408
- ax = a[0],
1409
- ay = a[1],
1410
- az = a[2],
1411
- aw = a[3];
1412
- out[0] = ax * qw + aw * qx + ay * qz - az * qy;
1413
- out[1] = ay * qw + aw * qy + az * qx - ax * qz;
1414
- out[2] = az * qw + aw * qz + ax * qy - ay * qx;
1415
- out[3] = aw * qw - ax * qx - ay * qy - az * qz;
1416
- ax = a[4];
1417
- ay = a[5];
1418
- az = a[6];
1419
- aw = a[7];
1420
- out[4] = ax * qw + aw * qx + ay * qz - az * qy;
1421
- out[5] = ay * qw + aw * qy + az * qx - ax * qz;
1422
- out[6] = az * qw + aw * qz + ax * qy - ay * qx;
1423
- out[7] = aw * qw - ax * qx - ay * qy - az * qz;
1424
- return out;
1425
- }
1426
- /**
1427
- * Rotates a dual quat by a given quaternion (q * a)
1428
- *
1429
- * @param {quat2} out the receiving dual quaternion
1430
- * @param {ReadonlyQuat} q quaternion to rotate by
1431
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
1432
- * @returns {quat2} out
1433
- */
1434
-
1435
- function rotateByQuatPrepend(out, q, a) {
1436
- var qx = q[0],
1437
- qy = q[1],
1438
- qz = q[2],
1439
- qw = q[3],
1440
- bx = a[0],
1441
- by = a[1],
1442
- bz = a[2],
1443
- bw = a[3];
1444
- out[0] = qx * bw + qw * bx + qy * bz - qz * by;
1445
- out[1] = qy * bw + qw * by + qz * bx - qx * bz;
1446
- out[2] = qz * bw + qw * bz + qx * by - qy * bx;
1447
- out[3] = qw * bw - qx * bx - qy * by - qz * bz;
1448
- bx = a[4];
1449
- by = a[5];
1450
- bz = a[6];
1451
- bw = a[7];
1452
- out[4] = qx * bw + qw * bx + qy * bz - qz * by;
1453
- out[5] = qy * bw + qw * by + qz * bx - qx * bz;
1454
- out[6] = qz * bw + qw * bz + qx * by - qy * bx;
1455
- out[7] = qw * bw - qx * bx - qy * by - qz * bz;
1456
- return out;
1457
- }
1458
- /**
1459
- * Rotates a dual quat around a given axis. Does the normalisation automatically
1460
- *
1461
- * @param {quat2} out the receiving dual quaternion
1462
- * @param {ReadonlyQuat2} a the dual quaternion to rotate
1463
- * @param {ReadonlyVec3} axis the axis to rotate around
1464
- * @param {Number} rad how far the rotation should be
1465
- * @returns {quat2} out
1466
- */
1467
-
1468
- function rotateAroundAxis(out, a, axis, rad) {
1469
- //Special case for rad = 0
1470
- if (Math.abs(rad) < glMatrix.EPSILON) {
1471
- return copy(out, a);
1472
- }
1473
-
1474
- var axisLength = Math.hypot(axis[0], axis[1], axis[2]);
1475
- rad = rad * 0.5;
1476
- var s = Math.sin(rad);
1477
- var bx = s * axis[0] / axisLength;
1478
- var by = s * axis[1] / axisLength;
1479
- var bz = s * axis[2] / axisLength;
1480
- var bw = Math.cos(rad);
1481
- var ax1 = a[0],
1482
- ay1 = a[1],
1483
- az1 = a[2],
1484
- aw1 = a[3];
1485
- out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;
1486
- out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;
1487
- out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;
1488
- out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;
1489
- var ax = a[4],
1490
- ay = a[5],
1491
- az = a[6],
1492
- aw = a[7];
1493
- out[4] = ax * bw + aw * bx + ay * bz - az * by;
1494
- out[5] = ay * bw + aw * by + az * bx - ax * bz;
1495
- out[6] = az * bw + aw * bz + ax * by - ay * bx;
1496
- out[7] = aw * bw - ax * bx - ay * by - az * bz;
1497
- return out;
1498
- }
1499
- /**
1500
- * Adds two dual quat's
1501
- *
1502
- * @param {quat2} out the receiving dual quaternion
1503
- * @param {ReadonlyQuat2} a the first operand
1504
- * @param {ReadonlyQuat2} b the second operand
1505
- * @returns {quat2} out
1506
- * @function
1507
- */
1508
-
1509
- function add(out, a, b) {
1510
- out[0] = a[0] + b[0];
1511
- out[1] = a[1] + b[1];
1512
- out[2] = a[2] + b[2];
1513
- out[3] = a[3] + b[3];
1514
- out[4] = a[4] + b[4];
1515
- out[5] = a[5] + b[5];
1516
- out[6] = a[6] + b[6];
1517
- out[7] = a[7] + b[7];
1518
- return out;
1519
- }
1520
- /**
1521
- * Multiplies two dual quat's
1522
- *
1523
- * @param {quat2} out the receiving dual quaternion
1524
- * @param {ReadonlyQuat2} a the first operand
1525
- * @param {ReadonlyQuat2} b the second operand
1526
- * @returns {quat2} out
1527
- */
1528
-
1529
- function multiply(out, a, b) {
1530
- var ax0 = a[0],
1531
- ay0 = a[1],
1532
- az0 = a[2],
1533
- aw0 = a[3],
1534
- bx1 = b[4],
1535
- by1 = b[5],
1536
- bz1 = b[6],
1537
- bw1 = b[7],
1538
- ax1 = a[4],
1539
- ay1 = a[5],
1540
- az1 = a[6],
1541
- aw1 = a[7],
1542
- bx0 = b[0],
1543
- by0 = b[1],
1544
- bz0 = b[2],
1545
- bw0 = b[3];
1546
- out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0;
1547
- out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0;
1548
- out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0;
1549
- out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0;
1550
- out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0;
1551
- out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0;
1552
- out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0;
1553
- out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0;
1554
- return out;
1555
- }
1556
- /**
1557
- * Alias for {@link quat2.multiply}
1558
- * @function
1559
- */
1560
-
1561
- var mul = (/* unused pure expression or super */ null && (multiply));
1562
- /**
1563
- * Scales a dual quat by a scalar number
1564
- *
1565
- * @param {quat2} out the receiving dual quat
1566
- * @param {ReadonlyQuat2} a the dual quat to scale
1567
- * @param {Number} b amount to scale the dual quat by
1568
- * @returns {quat2} out
1569
- * @function
1570
- */
1571
-
1572
- function scale(out, a, b) {
1573
- out[0] = a[0] * b;
1574
- out[1] = a[1] * b;
1575
- out[2] = a[2] * b;
1576
- out[3] = a[3] * b;
1577
- out[4] = a[4] * b;
1578
- out[5] = a[5] * b;
1579
- out[6] = a[6] * b;
1580
- out[7] = a[7] * b;
1581
- return out;
1582
- }
1583
- /**
1584
- * Calculates the dot product of two dual quat's (The dot product of the real parts)
1585
- *
1586
- * @param {ReadonlyQuat2} a the first operand
1587
- * @param {ReadonlyQuat2} b the second operand
1588
- * @returns {Number} dot product of a and b
1589
- * @function
1590
- */
1591
-
1592
- var dot = _quat_js__rspack_import_1/* .dot */.Om;
1593
- /**
1594
- * Performs a linear interpolation between two dual quats's
1595
- * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5)
1596
- *
1597
- * @param {quat2} out the receiving dual quat
1598
- * @param {ReadonlyQuat2} a the first operand
1599
- * @param {ReadonlyQuat2} b the second operand
1600
- * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
1601
- * @returns {quat2} out
1602
- */
1603
-
1604
- function lerp(out, a, b, t) {
1605
- var mt = 1 - t;
1606
- if (dot(a, b) < 0) t = -t;
1607
- out[0] = a[0] * mt + b[0] * t;
1608
- out[1] = a[1] * mt + b[1] * t;
1609
- out[2] = a[2] * mt + b[2] * t;
1610
- out[3] = a[3] * mt + b[3] * t;
1611
- out[4] = a[4] * mt + b[4] * t;
1612
- out[5] = a[5] * mt + b[5] * t;
1613
- out[6] = a[6] * mt + b[6] * t;
1614
- out[7] = a[7] * mt + b[7] * t;
1615
- return out;
1616
- }
1617
- /**
1618
- * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper
1619
- *
1620
- * @param {quat2} out the receiving dual quaternion
1621
- * @param {ReadonlyQuat2} a dual quat to calculate inverse of
1622
- * @returns {quat2} out
1623
- */
1624
-
1625
- function invert(out, a) {
1626
- var sqlen = squaredLength(a);
1627
- out[0] = -a[0] / sqlen;
1628
- out[1] = -a[1] / sqlen;
1629
- out[2] = -a[2] / sqlen;
1630
- out[3] = a[3] / sqlen;
1631
- out[4] = -a[4] / sqlen;
1632
- out[5] = -a[5] / sqlen;
1633
- out[6] = -a[6] / sqlen;
1634
- out[7] = a[7] / sqlen;
1635
- return out;
1636
- }
1637
- /**
1638
- * Calculates the conjugate of a dual quat
1639
- * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result.
1640
- *
1641
- * @param {quat2} out the receiving quaternion
1642
- * @param {ReadonlyQuat2} a quat to calculate conjugate of
1643
- * @returns {quat2} out
1644
- */
1645
-
1646
- function conjugate(out, a) {
1647
- out[0] = -a[0];
1648
- out[1] = -a[1];
1649
- out[2] = -a[2];
1650
- out[3] = a[3];
1651
- out[4] = -a[4];
1652
- out[5] = -a[5];
1653
- out[6] = -a[6];
1654
- out[7] = a[7];
1655
- return out;
1656
- }
1657
- /**
1658
- * Calculates the length of a dual quat
1659
- *
1660
- * @param {ReadonlyQuat2} a dual quat to calculate length of
1661
- * @returns {Number} length of a
1662
- * @function
1663
- */
1664
-
1665
- var length = _quat_js__rspack_import_1/* .length */.Bw;
1666
- /**
1667
- * Alias for {@link quat2.length}
1668
- * @function
1669
- */
1670
-
1671
- var len = (/* unused pure expression or super */ null && (length));
1672
- /**
1673
- * Calculates the squared length of a dual quat
1674
- *
1675
- * @param {ReadonlyQuat2} a dual quat to calculate squared length of
1676
- * @returns {Number} squared length of a
1677
- * @function
1678
- */
1679
-
1680
- var squaredLength = _quat_js__rspack_import_1/* .squaredLength */.m3;
1681
- /**
1682
- * Alias for {@link quat2.squaredLength}
1683
- * @function
1684
- */
1685
-
1686
- var sqrLen = (/* unused pure expression or super */ null && (squaredLength));
1687
- /**
1688
- * Normalize a dual quat
1689
- *
1690
- * @param {quat2} out the receiving dual quaternion
1691
- * @param {ReadonlyQuat2} a dual quaternion to normalize
1692
- * @returns {quat2} out
1693
- * @function
1694
- */
1695
-
1696
- function normalize(out, a) {
1697
- var magnitude = squaredLength(a);
1698
-
1699
- if (magnitude > 0) {
1700
- magnitude = Math.sqrt(magnitude);
1701
- var a0 = a[0] / magnitude;
1702
- var a1 = a[1] / magnitude;
1703
- var a2 = a[2] / magnitude;
1704
- var a3 = a[3] / magnitude;
1705
- var b0 = a[4];
1706
- var b1 = a[5];
1707
- var b2 = a[6];
1708
- var b3 = a[7];
1709
- var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3;
1710
- out[0] = a0;
1711
- out[1] = a1;
1712
- out[2] = a2;
1713
- out[3] = a3;
1714
- out[4] = (b0 - a0 * a_dot_b) / magnitude;
1715
- out[5] = (b1 - a1 * a_dot_b) / magnitude;
1716
- out[6] = (b2 - a2 * a_dot_b) / magnitude;
1717
- out[7] = (b3 - a3 * a_dot_b) / magnitude;
1718
- }
1719
-
1720
- return out;
1721
- }
1722
- /**
1723
- * Returns a string representation of a dual quatenion
1724
- *
1725
- * @param {ReadonlyQuat2} a dual quaternion to represent as a string
1726
- * @returns {String} string representation of the dual quat
1727
- */
1728
-
1729
- function str(a) {
1730
- return "quat2(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ", " + a[6] + ", " + a[7] + ")";
1731
- }
1732
- /**
1733
- * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===)
1734
- *
1735
- * @param {ReadonlyQuat2} a the first dual quaternion.
1736
- * @param {ReadonlyQuat2} b the second dual quaternion.
1737
- * @returns {Boolean} true if the dual quaternions are equal, false otherwise.
1738
- */
1739
-
1740
- function exactEquals(a, b) {
1741
- return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7];
1742
- }
1743
- /**
1744
- * Returns whether or not the dual quaternions have approximately the same elements in the same position.
1745
- *
1746
- * @param {ReadonlyQuat2} a the first dual quat.
1747
- * @param {ReadonlyQuat2} b the second dual quat.
1748
- * @returns {Boolean} true if the dual quats are equal, false otherwise.
1749
- */
1750
-
1751
- function equals(a, b) {
1752
- var a0 = a[0],
1753
- a1 = a[1],
1754
- a2 = a[2],
1755
- a3 = a[3],
1756
- a4 = a[4],
1757
- a5 = a[5],
1758
- a6 = a[6],
1759
- a7 = a[7];
1760
- var b0 = b[0],
1761
- b1 = b[1],
1762
- b2 = b[2],
1763
- b3 = b[3],
1764
- b4 = b[4],
1765
- b5 = b[5],
1766
- b6 = b[6],
1767
- b7 = b[7];
1768
- return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7));
1769
- }
1770
-
1771
- },
1
+ (globalThis["rspackChunk_ohif_app"] ||= []).push([[2103], {
1772
2
  9241(module, __unused_rspack_exports, __webpack_require__) {
1773
3
  /* module decorator */ module = __webpack_require__.nmd(module);
1774
4
  // A port of an algorithm by Johannes Baagøe <baagoe@baagoe.com>, 2010