idmission-web-sdk 2.5.64 → 2.5.65-react16compat.0
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/index.d.ts +1 -1
- package/dist/props.json +1 -1
- package/dist/sdk2.cjs.development.js +1140 -190
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +1131 -181
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +117 -43
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/package.json +12 -8
package/dist/sdk2.esm.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect, useLayoutEffect, useCallback, useMemo, useContext, createContext, createElement, forwardRef, useImperativeHandle, memo, useReducer } from 'react';
|
|
2
|
-
import { createStore } from 'zustand/vanilla';
|
|
3
2
|
import platform from 'platform';
|
|
4
3
|
import { DetailedError, Upload } from 'tus-js-client';
|
|
5
4
|
import SparkMD5 from 'spark-md5';
|
|
@@ -9,10 +8,8 @@ import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
|
|
9
8
|
import { useTranslation } from 'react-i18next';
|
|
10
9
|
import LanguageDetector from 'i18next-browser-languagedetector';
|
|
11
10
|
import { createInstance } from 'i18next';
|
|
12
|
-
import { createPortal } from 'react-dom';
|
|
11
|
+
import ReactDOM, { createPortal } from 'react-dom';
|
|
13
12
|
import SignaturePad from 'signature_pad';
|
|
14
|
-
import { ThinkingOrb } from 'thinking-orbs';
|
|
15
|
-
import ReactDOM from 'react-dom/client';
|
|
16
13
|
import { ImageSegmenter, FilesetResolver, ObjectDetector, ImageClassifier, FaceLandmarker as FaceLandmarker$2 } from '@mediapipe/tasks-vision';
|
|
17
14
|
import { isWebGPUSupported, loadAndCompile, loadLiteRt, Tensor } from '@litertjs/core';
|
|
18
15
|
|
|
@@ -446,17 +443,17 @@ function _iterableToArrayLimit(r, l) {
|
|
|
446
443
|
}
|
|
447
444
|
}
|
|
448
445
|
|
|
449
|
-
function _arrayLikeToArray$
|
|
446
|
+
function _arrayLikeToArray$w(r, a) {
|
|
450
447
|
(null == a || a > r.length) && (a = r.length);
|
|
451
448
|
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
452
449
|
return n;
|
|
453
450
|
}
|
|
454
451
|
|
|
455
|
-
function _unsupportedIterableToArray$
|
|
452
|
+
function _unsupportedIterableToArray$w(r, a) {
|
|
456
453
|
if (r) {
|
|
457
|
-
if ("string" == typeof r) return _arrayLikeToArray$
|
|
454
|
+
if ("string" == typeof r) return _arrayLikeToArray$w(r, a);
|
|
458
455
|
var t = {}.toString.call(r).slice(8, -1);
|
|
459
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$
|
|
456
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$w(r, a) : void 0;
|
|
460
457
|
}
|
|
461
458
|
}
|
|
462
459
|
|
|
@@ -465,11 +462,11 @@ function _nonIterableRest() {
|
|
|
465
462
|
}
|
|
466
463
|
|
|
467
464
|
function _slicedToArray(r, e) {
|
|
468
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$
|
|
465
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$w(r, e) || _nonIterableRest();
|
|
469
466
|
}
|
|
470
467
|
|
|
471
468
|
function _arrayWithoutHoles(r) {
|
|
472
|
-
if (Array.isArray(r)) return _arrayLikeToArray$
|
|
469
|
+
if (Array.isArray(r)) return _arrayLikeToArray$w(r);
|
|
473
470
|
}
|
|
474
471
|
|
|
475
472
|
function _iterableToArray(r) {
|
|
@@ -481,7 +478,7 @@ function _nonIterableSpread() {
|
|
|
481
478
|
}
|
|
482
479
|
|
|
483
480
|
function _toConsumableArray(r) {
|
|
484
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$
|
|
481
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$w(r) || _nonIterableSpread();
|
|
485
482
|
}
|
|
486
483
|
|
|
487
484
|
var webSdkCoreVersion = '0.4.0';
|
|
@@ -1256,9 +1253,9 @@ var attemptStatuses = ["active", "completed", "failed", "superseded", "disposed"
|
|
|
1256
1253
|
({
|
|
1257
1254
|
workflowMilestones: [].concat(_toConsumableArray(workflowMilestones), ["task-completed"])});
|
|
1258
1255
|
|
|
1259
|
-
function _createForOfIteratorHelperLoose$
|
|
1260
|
-
function _unsupportedIterableToArray$
|
|
1261
|
-
function _arrayLikeToArray$
|
|
1256
|
+
function _createForOfIteratorHelperLoose$v(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$v(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1257
|
+
function _unsupportedIterableToArray$v(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$v(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$v(r, a) : void 0; } }
|
|
1258
|
+
function _arrayLikeToArray$v(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1262
1259
|
var maximumBytes = 32 * 1024;
|
|
1263
1260
|
var maximumTime = 86400000;
|
|
1264
1261
|
var uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -1326,7 +1323,7 @@ function validateSnapshot(report) {
|
|
|
1326
1323
|
unique(report.phaseTotals.map(function (total) {
|
|
1327
1324
|
return total.phase;
|
|
1328
1325
|
}));
|
|
1329
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
1326
|
+
for (var _iterator = _createForOfIteratorHelperLoose$v(report.phaseTotals), _step; !(_step = _iterator()).done;) {
|
|
1330
1327
|
var _total4 = _step.value;
|
|
1331
1328
|
requireValid(member(phases, _total4.phase) && integer(_total4.completions, 1000000) && _total4.completions <= _total4.duration.entries);
|
|
1332
1329
|
durationValid(_total4.duration);
|
|
@@ -1348,7 +1345,7 @@ function validateSnapshot(report) {
|
|
|
1348
1345
|
requireValid(report.recentTransitions.length <= 32);
|
|
1349
1346
|
var index = 0;
|
|
1350
1347
|
var atMs = 0;
|
|
1351
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
1348
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$v(report.recentTransitions), _step2; !(_step2 = _iterator2()).done;) {
|
|
1352
1349
|
var transition = _step2.value;
|
|
1353
1350
|
requireValid(member(transitionKinds, transition.kind));
|
|
1354
1351
|
requireValid(integer(transition.index, 1000000) && transition.index > index && integer(transition.atMs) && transition.atMs >= atMs && transition.atMs <= report.elapsedMs);
|
|
@@ -1372,12 +1369,12 @@ function validateSnapshot(report) {
|
|
|
1372
1369
|
unique(report.controllerGuidanceTotals.map(function (total) {
|
|
1373
1370
|
return JSON.stringify([total.phase, total.guidance]);
|
|
1374
1371
|
}));
|
|
1375
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
1372
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$v(report.guidanceTotals), _step3; !(_step3 = _iterator3()).done;) {
|
|
1376
1373
|
var _total2 = _step3.value;
|
|
1377
1374
|
durationValid(_total2.duration);
|
|
1378
1375
|
exposureValid(_total2.phase, _total2.exposure);
|
|
1379
1376
|
}
|
|
1380
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
1377
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$v(report.controllerGuidanceTotals), _step4; !(_step4 = _iterator4()).done;) {
|
|
1381
1378
|
var _total3 = _step4.value;
|
|
1382
1379
|
durationValid(_total3.duration);
|
|
1383
1380
|
guidanceValid(_total3.phase, _total3.guidance, false);
|
|
@@ -1411,7 +1408,7 @@ function encodeProgressBatch(batch) {
|
|
|
1411
1408
|
requireValid(batch.schemaVersion === 1 && batch.sdkVersion.length > 0 && batch.sdkVersion.length <= 32 && batch.sessionId.length > 0 && uuidPattern.test(batch.producerId) && integer(batch.sentAtUnixMs, Number.MAX_SAFE_INTEGER));
|
|
1412
1409
|
var reports = [];
|
|
1413
1410
|
var dropped = [];
|
|
1414
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
1411
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$v(batch.reports), _step5; !(_step5 = _iterator5()).done;) {
|
|
1415
1412
|
var report = _step5.value;
|
|
1416
1413
|
try {
|
|
1417
1414
|
validateSnapshot(report);
|
|
@@ -1440,9 +1437,9 @@ function encodeProgressBatch(batch) {
|
|
|
1440
1437
|
};
|
|
1441
1438
|
}
|
|
1442
1439
|
|
|
1443
|
-
function _createForOfIteratorHelperLoose$
|
|
1444
|
-
function _unsupportedIterableToArray$
|
|
1445
|
-
function _arrayLikeToArray$
|
|
1440
|
+
function _createForOfIteratorHelperLoose$u(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$u(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1441
|
+
function _unsupportedIterableToArray$u(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$u(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$u(r, a) : void 0; } }
|
|
1442
|
+
function _arrayLikeToArray$u(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
1446
1443
|
var taskOpeners = new WeakMap();
|
|
1447
1444
|
var inertObserver = {
|
|
1448
1445
|
observe: function observe() {},
|
|
@@ -1496,7 +1493,7 @@ function createSessionActor(options, deps) {
|
|
|
1496
1493
|
var due = new Map();
|
|
1497
1494
|
var eligibilityRetries = new Map();
|
|
1498
1495
|
function dropped(report) {
|
|
1499
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
1496
|
+
for (var _iterator = _createForOfIteratorHelperLoose$u(streams), _step; !(_step = _iterator()).done;) {
|
|
1500
1497
|
var stream = _step.value;
|
|
1501
1498
|
if (stream.state.report.streamId === report.streamId) stream.state = _extends({}, stream.state, {
|
|
1502
1499
|
report: _extends({}, stream.state.report, {
|
|
@@ -1540,7 +1537,7 @@ function createSessionActor(options, deps) {
|
|
|
1540
1537
|
var retained = new Set(queued.map(function (report) {
|
|
1541
1538
|
return report.sequence;
|
|
1542
1539
|
}));
|
|
1543
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
1540
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$u(due.keys()), _step2; !(_step2 = _iterator2()).done;) {
|
|
1544
1541
|
var _sequence = _step2.value;
|
|
1545
1542
|
if (!retained.has(_sequence)) due["delete"](_sequence);
|
|
1546
1543
|
}
|
|
@@ -1553,7 +1550,7 @@ function createSessionActor(options, deps) {
|
|
|
1553
1550
|
var keys = new Set(reports.map(function (report) {
|
|
1554
1551
|
return report.sequence;
|
|
1555
1552
|
}));
|
|
1556
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
1553
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$u(pending), _step3; !(_step3 = _iterator3()).done;) {
|
|
1557
1554
|
var _step3$value = _slicedToArray(_step3.value, 2),
|
|
1558
1555
|
key = _step3$value[0],
|
|
1559
1556
|
report = _step3$value[1];
|
|
@@ -1577,14 +1574,14 @@ function createSessionActor(options, deps) {
|
|
|
1577
1574
|
if ((_emergency = emergency) != null && _emergency.reports.some(function (report) {
|
|
1578
1575
|
return report.context === context;
|
|
1579
1576
|
})) emergency = null;
|
|
1580
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
1577
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$u(pending), _step4; !(_step4 = _iterator4()).done;) {
|
|
1581
1578
|
var _step4$value = _slicedToArray(_step4.value, 2),
|
|
1582
1579
|
key = _step4$value[0],
|
|
1583
1580
|
report = _step4$value[1];
|
|
1584
1581
|
if (report.context === context) pending["delete"](key);
|
|
1585
1582
|
}
|
|
1586
1583
|
for (var i = terminal.length - 1; i >= 0; i--) if (terminal[i].context === context) terminal.splice(i, 1);
|
|
1587
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
1584
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$u(streams), _step5; !(_step5 = _iterator5()).done;) {
|
|
1588
1585
|
var stream = _step5.value;
|
|
1589
1586
|
if (stream.state.report.context === context) {
|
|
1590
1587
|
stream.disposed = true;
|
|
@@ -1613,7 +1610,7 @@ function createSessionActor(options, deps) {
|
|
|
1613
1610
|
unsubscribe();
|
|
1614
1611
|
cancelTimer == null || cancelTimer();
|
|
1615
1612
|
cancelRequest == null || cancelRequest();
|
|
1616
|
-
for (var _iterator6 = _createForOfIteratorHelperLoose$
|
|
1613
|
+
for (var _iterator6 = _createForOfIteratorHelperLoose$u(streams), _step6; !(_step6 = _iterator6()).done;) {
|
|
1617
1614
|
var stream = _step6.value;
|
|
1618
1615
|
stream.disposed = true;
|
|
1619
1616
|
}
|
|
@@ -1635,7 +1632,7 @@ function createSessionActor(options, deps) {
|
|
|
1635
1632
|
sentAtUnixMs: Math.floor(deps.unixMs()),
|
|
1636
1633
|
reports: reports
|
|
1637
1634
|
});
|
|
1638
|
-
for (var _iterator7 = _createForOfIteratorHelperLoose$
|
|
1635
|
+
for (var _iterator7 = _createForOfIteratorHelperLoose$u(result.dropped), _step7; !(_step7 = _iterator7()).done;) {
|
|
1639
1636
|
var report = _step7.value;
|
|
1640
1637
|
dropped(report);
|
|
1641
1638
|
removeReports([report]);
|
|
@@ -1805,14 +1802,14 @@ function createSessionActor(options, deps) {
|
|
|
1805
1802
|
retries = 0;
|
|
1806
1803
|
failureStreak = 0;
|
|
1807
1804
|
} else if (result.kind === "permanent") {
|
|
1808
|
-
for (_iterator11 = _createForOfIteratorHelperLoose$
|
|
1805
|
+
for (_iterator11 = _createForOfIteratorHelperLoose$u(sending.reports); !(_step11 = _iterator11()).done;) {
|
|
1809
1806
|
report = _step11.value;
|
|
1810
1807
|
disable(report.context);
|
|
1811
1808
|
}
|
|
1812
1809
|
} else {
|
|
1813
1810
|
backoff(result);
|
|
1814
1811
|
if (++retries > 3) {
|
|
1815
|
-
for (_iterator12 = _createForOfIteratorHelperLoose$
|
|
1812
|
+
for (_iterator12 = _createForOfIteratorHelperLoose$u(sending.reports); !(_step12 = _iterator12()).done;) {
|
|
1816
1813
|
_report = _step12.value;
|
|
1817
1814
|
dropped(_report);
|
|
1818
1815
|
}
|
|
@@ -1834,7 +1831,7 @@ function createSessionActor(options, deps) {
|
|
|
1834
1831
|
backoff({});
|
|
1835
1832
|
if (authorizing) failedEligibility(authorizing);
|
|
1836
1833
|
if (frozen && ++retries > 3) {
|
|
1837
|
-
for (_iterator13 = _createForOfIteratorHelperLoose$
|
|
1834
|
+
for (_iterator13 = _createForOfIteratorHelperLoose$u(frozen.reports); !(_step13 = _iterator13()).done;) {
|
|
1838
1835
|
_report2 = _step13.value;
|
|
1839
1836
|
dropped(_report2);
|
|
1840
1837
|
}
|
|
@@ -1877,7 +1874,7 @@ function createSessionActor(options, deps) {
|
|
|
1877
1874
|
} else if (outcome.kind === "committed") {
|
|
1878
1875
|
if (emergency === sending) emergency = null;
|
|
1879
1876
|
} else if (outcome.kind === "permanent") {
|
|
1880
|
-
for (var _iterator8 = _createForOfIteratorHelperLoose$
|
|
1877
|
+
for (var _iterator8 = _createForOfIteratorHelperLoose$u(sending.reports), _step8; !(_step8 = _iterator8()).done;) {
|
|
1881
1878
|
var report = _step8.value;
|
|
1882
1879
|
disable(report.context);
|
|
1883
1880
|
}
|
|
@@ -1909,7 +1906,7 @@ function createSessionActor(options, deps) {
|
|
|
1909
1906
|
}
|
|
1910
1907
|
function tick() {
|
|
1911
1908
|
if (disposed || visibility === "hidden") return;
|
|
1912
|
-
for (var _iterator9 = _createForOfIteratorHelperLoose$
|
|
1909
|
+
for (var _iterator9 = _createForOfIteratorHelperLoose$u(streams), _step9; !(_step9 = _iterator9()).done;) {
|
|
1913
1910
|
var stream = _step9.value;
|
|
1914
1911
|
var report = prepareDeadline(stream);
|
|
1915
1912
|
if (!(report != null && report.current)) continue;
|
|
@@ -1936,7 +1933,7 @@ function createSessionActor(options, deps) {
|
|
|
1936
1933
|
if (disposed || visibility === "hidden") return;
|
|
1937
1934
|
var delay = Infinity;
|
|
1938
1935
|
if (!busy && (pending.size || terminal.length || frozen || emergency)) delay = Math.max(0, deliveryReadyAt() - deps.now());
|
|
1939
|
-
for (var _iterator0 = _createForOfIteratorHelperLoose$
|
|
1936
|
+
for (var _iterator0 = _createForOfIteratorHelperLoose$u(streams), _step0; !(_step0 = _iterator0()).done;) {
|
|
1940
1937
|
var stream = _step0.value;
|
|
1941
1938
|
var report = prepareDeadline(stream);
|
|
1942
1939
|
if (!(report != null && report.current)) continue;
|
|
@@ -2022,7 +2019,7 @@ function createSessionActor(options, deps) {
|
|
|
2022
2019
|
return guard$2(function () {
|
|
2023
2020
|
if (disposed || next === visibility) return;
|
|
2024
2021
|
visibility = next;
|
|
2025
|
-
for (var _iterator1 = _createForOfIteratorHelperLoose$
|
|
2022
|
+
for (var _iterator1 = _createForOfIteratorHelperLoose$u(streams), _step1; !(_step1 = _iterator1()).done;) {
|
|
2026
2023
|
var stream = _step1.value;
|
|
2027
2024
|
if (stream.state.report.attemptStatus !== "active") continue;
|
|
2028
2025
|
stream.state = reduceObservation(stream.state, {
|
|
@@ -2063,7 +2060,7 @@ function createSessionActor(options, deps) {
|
|
|
2063
2060
|
if (taskDisposed) return;
|
|
2064
2061
|
taskDisposed = true;
|
|
2065
2062
|
if (workflowStream) close(workflowStream, "disposed");
|
|
2066
|
-
for (var _iterator10 = _createForOfIteratorHelperLoose$
|
|
2063
|
+
for (var _iterator10 = _createForOfIteratorHelperLoose$u(captures), _step10; !(_step10 = _iterator10()).done;) {
|
|
2067
2064
|
var capture = _step10.value;
|
|
2068
2065
|
capture.dispose();
|
|
2069
2066
|
}
|
|
@@ -2201,6 +2198,44 @@ function isApprovedResponse(action, response) {
|
|
|
2201
2198
|
return action === SubmissionAction.ENROLL ? result === "Customer Onboarded" : result === "Approved";
|
|
2202
2199
|
}
|
|
2203
2200
|
|
|
2201
|
+
var createStoreImpl = function createStoreImpl(createState) {
|
|
2202
|
+
var state;
|
|
2203
|
+
var listeners = /* @__PURE__ */new Set();
|
|
2204
|
+
var setState = function setState(partial, replace) {
|
|
2205
|
+
var nextState = typeof partial === "function" ? partial(state) : partial;
|
|
2206
|
+
if (!Object.is(nextState, state)) {
|
|
2207
|
+
var previousState = state;
|
|
2208
|
+
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
|
|
2209
|
+
listeners.forEach(function (listener) {
|
|
2210
|
+
return listener(state, previousState);
|
|
2211
|
+
});
|
|
2212
|
+
}
|
|
2213
|
+
};
|
|
2214
|
+
var getState = function getState() {
|
|
2215
|
+
return state;
|
|
2216
|
+
};
|
|
2217
|
+
var getInitialState = function getInitialState() {
|
|
2218
|
+
return initialState;
|
|
2219
|
+
};
|
|
2220
|
+
var subscribe = function subscribe(listener) {
|
|
2221
|
+
listeners.add(listener);
|
|
2222
|
+
return function () {
|
|
2223
|
+
return listeners["delete"](listener);
|
|
2224
|
+
};
|
|
2225
|
+
};
|
|
2226
|
+
var api = {
|
|
2227
|
+
setState: setState,
|
|
2228
|
+
getState: getState,
|
|
2229
|
+
getInitialState: getInitialState,
|
|
2230
|
+
subscribe: subscribe
|
|
2231
|
+
};
|
|
2232
|
+
var initialState = state = createState(setState, getState, api);
|
|
2233
|
+
return api;
|
|
2234
|
+
};
|
|
2235
|
+
var createStore = function createStore(createState) {
|
|
2236
|
+
return createState ? createStoreImpl(createState) : createStoreImpl;
|
|
2237
|
+
};
|
|
2238
|
+
|
|
2204
2239
|
function sessionReducer(state, action) {
|
|
2205
2240
|
switch (action.type) {
|
|
2206
2241
|
case 'setSessionId':
|
|
@@ -2858,7 +2893,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
2858
2893
|
return t;
|
|
2859
2894
|
}
|
|
2860
2895
|
|
|
2861
|
-
var _excluded$
|
|
2896
|
+
var _excluded$k = ["nonce", "web", "os"];
|
|
2862
2897
|
/**
|
|
2863
2898
|
* Grade the envelope from whichever inputs are present:
|
|
2864
2899
|
* - OS token present -> 'os-attested' (attach `os`)
|
|
@@ -2872,7 +2907,7 @@ function buildClientAttestation(input) {
|
|
|
2872
2907
|
var nonce = input.nonce,
|
|
2873
2908
|
web = input.web,
|
|
2874
2909
|
os = input.os,
|
|
2875
|
-
versions = _objectWithoutPropertiesLoose(input, _excluded$
|
|
2910
|
+
versions = _objectWithoutPropertiesLoose(input, _excluded$k);
|
|
2876
2911
|
if (os) {
|
|
2877
2912
|
return _extends({
|
|
2878
2913
|
assuranceLevel: 'os-attested',
|
|
@@ -3455,9 +3490,9 @@ function blobToB64(blob) {
|
|
|
3455
3490
|
});
|
|
3456
3491
|
}
|
|
3457
3492
|
|
|
3458
|
-
function _createForOfIteratorHelperLoose$
|
|
3459
|
-
function _unsupportedIterableToArray$
|
|
3460
|
-
function _arrayLikeToArray$
|
|
3493
|
+
function _createForOfIteratorHelperLoose$t(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$t(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3494
|
+
function _unsupportedIterableToArray$t(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$t(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$t(r, a) : void 0; } }
|
|
3495
|
+
function _arrayLikeToArray$t(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
3461
3496
|
/**
|
|
3462
3497
|
* Parser for AAMVA (American Association of Motor Vehicle Administrators)
|
|
3463
3498
|
* PDF417 barcode data found on US and Canadian driver's licenses.
|
|
@@ -3719,7 +3754,7 @@ function parseAAMVABarcode(rawData) {
|
|
|
3719
3754
|
DAD: false
|
|
3720
3755
|
};
|
|
3721
3756
|
var daaValue = null;
|
|
3722
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
3757
|
+
for (var _iterator = _createForOfIteratorHelperLoose$t(lines), _step; !(_step = _iterator()).done;) {
|
|
3723
3758
|
var line = _step.value;
|
|
3724
3759
|
var match = line.match(fieldRegex);
|
|
3725
3760
|
if (match) {
|
|
@@ -3760,7 +3795,7 @@ function parseAAMVABarcode(rawData) {
|
|
|
3760
3795
|
result.fields.push(field);
|
|
3761
3796
|
}
|
|
3762
3797
|
};
|
|
3763
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
3798
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$t(daaFields), _step2; !(_step2 = _iterator2()).done;) {
|
|
3764
3799
|
_loop();
|
|
3765
3800
|
}
|
|
3766
3801
|
}
|
|
@@ -6453,7 +6488,7 @@ var fr = {
|
|
|
6453
6488
|
'Barcode capture in progress, please hold still': 'Capture du code-barres en cours, veuillez ne pas bouger'
|
|
6454
6489
|
};
|
|
6455
6490
|
|
|
6456
|
-
var it = {
|
|
6491
|
+
var it$1 = {
|
|
6457
6492
|
'English - en': 'Italian - it',
|
|
6458
6493
|
'Use your device camera to capture your ID': 'Utilizzare la fotocamera del dispositivo per acquisire il documento',
|
|
6459
6494
|
'Use your iPhone as a webcam': 'Utilizza iPhone come webcam',
|
|
@@ -6749,7 +6784,7 @@ var ja = {
|
|
|
6749
6784
|
'Barcode capture in progress, please hold still': 'バーコードを読み取っています。動かないでください'
|
|
6750
6785
|
};
|
|
6751
6786
|
|
|
6752
|
-
var pt = {
|
|
6787
|
+
var pt$1 = {
|
|
6753
6788
|
'English - en': 'Portuguese (Brazil) - pt',
|
|
6754
6789
|
'Use your device camera to capture your ID': 'Usar a câmera do dispositivo para fotografar sua identidade',
|
|
6755
6790
|
'Use your iPhone as a webcam': 'Use seu iPhone como uma câmera Web',
|
|
@@ -7299,13 +7334,13 @@ var resources = {
|
|
|
7299
7334
|
translation: withThreeOhTranslations('fr', fr)
|
|
7300
7335
|
},
|
|
7301
7336
|
it: {
|
|
7302
|
-
translation: withThreeOhTranslations('it', it)
|
|
7337
|
+
translation: withThreeOhTranslations('it', it$1)
|
|
7303
7338
|
},
|
|
7304
7339
|
ja: {
|
|
7305
7340
|
translation: withThreeOhTranslations('ja', ja)
|
|
7306
7341
|
},
|
|
7307
7342
|
pt: {
|
|
7308
|
-
translation: withThreeOhTranslations('pt', pt)
|
|
7343
|
+
translation: withThreeOhTranslations('pt', pt$1)
|
|
7309
7344
|
},
|
|
7310
7345
|
ru: {
|
|
7311
7346
|
translation: withThreeOhTranslations('ru', ru)
|
|
@@ -7620,10 +7655,10 @@ function useGuideOrientationContext() {
|
|
|
7620
7655
|
}
|
|
7621
7656
|
|
|
7622
7657
|
var _templateObject$_, _templateObject2$Q;
|
|
7623
|
-
var _excluded$
|
|
7658
|
+
var _excluded$j = ["isRearFacing"];
|
|
7624
7659
|
var CameraVideoTag = /*#__PURE__*/forwardRef(function CameraVideoTag(_ref, ref) {
|
|
7625
7660
|
var isRearFacing = _ref.isRearFacing,
|
|
7626
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7661
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
7627
7662
|
return jsx(FullscreenVideoTag, _extends({
|
|
7628
7663
|
autoPlay: true,
|
|
7629
7664
|
playsInline: true,
|
|
@@ -7691,9 +7726,9 @@ function ScalingCameraFeed(_ref2) {
|
|
|
7691
7726
|
}
|
|
7692
7727
|
|
|
7693
7728
|
var _templateObject$Z, _templateObject2$P, _templateObject3$D, _templateObject4$y, _templateObject5$t, _templateObject6$l;
|
|
7694
|
-
function _createForOfIteratorHelperLoose$
|
|
7695
|
-
function _unsupportedIterableToArray$
|
|
7696
|
-
function _arrayLikeToArray$
|
|
7729
|
+
function _createForOfIteratorHelperLoose$s(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$s(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7730
|
+
function _unsupportedIterableToArray$s(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$s(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$s(r, a) : void 0; } }
|
|
7731
|
+
function _arrayLikeToArray$s(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7697
7732
|
/** Displays camera readiness and available source-frame dimensions. */
|
|
7698
7733
|
function CameraDebugStatus(_ref) {
|
|
7699
7734
|
var ready = _ref.ready,
|
|
@@ -7958,7 +7993,7 @@ function SelfieCaptureFaceMesh(_ref15) {
|
|
|
7958
7993
|
groups.forEach(function (indices, color) {
|
|
7959
7994
|
ctx.fillStyle = color;
|
|
7960
7995
|
ctx.beginPath();
|
|
7961
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
7996
|
+
for (var _iterator = _createForOfIteratorHelperLoose$s(indices), _step; !(_step = _iterator()).done;) {
|
|
7962
7997
|
var _i = _step.value;
|
|
7963
7998
|
var p = meshLandmarks[_i];
|
|
7964
7999
|
ctx.moveTo(p.x + dotRadius, p.y);
|
|
@@ -8140,7 +8175,7 @@ var EdgeStrip = styled.div(_templateObject$Y || (_templateObject$Y = _taggedTemp
|
|
|
8140
8175
|
});
|
|
8141
8176
|
|
|
8142
8177
|
var _templateObject$X;
|
|
8143
|
-
var _excluded$
|
|
8178
|
+
var _excluded$i = ["children", "className", "colors", "disabled", "finished", "variant"];
|
|
8144
8179
|
var LoaderButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
8145
8180
|
var children = _ref.children,
|
|
8146
8181
|
className = _ref.className,
|
|
@@ -8150,7 +8185,7 @@ var LoaderButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
8150
8185
|
finished = _ref.finished,
|
|
8151
8186
|
_ref$variant = _ref.variant,
|
|
8152
8187
|
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
8153
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8188
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
8154
8189
|
var buttonRef = useRef(null);
|
|
8155
8190
|
var laddaRef = useRef(null);
|
|
8156
8191
|
var _useState = useState(false),
|
|
@@ -8461,7 +8496,7 @@ var error = function error() {
|
|
|
8461
8496
|
return (console.error ).apply(void 0, arguments);
|
|
8462
8497
|
}; // eslint-disable-line no-console
|
|
8463
8498
|
|
|
8464
|
-
var _excluded$
|
|
8499
|
+
var _excluded$h = ["children", "status", "borderWidth", "borderRadius", "borderColor", "aspectRatio", "progress", "guideBoxDisabled"],
|
|
8465
8500
|
_excluded2$5 = ["borderRadius", "borderColor", "borderWidth", "borderOpacity", "progress", "isProgressBar", "scaleBorderRadius"];
|
|
8466
8501
|
var _templateObject$S, _templateObject2$L, _templateObject3$A, _templateObject4$v, _templateObject5$r, _templateObject6$j, _templateObject7$g;
|
|
8467
8502
|
var IdCardGuideImageContainer = styled(IdCardBorder)(_templateObject$S || (_templateObject$S = _taggedTemplateLiteralLoose(["\n position: relative;\n ", "\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n ", ";\n"])), function (props) {
|
|
@@ -8491,7 +8526,7 @@ function IdCardBorder(_ref) {
|
|
|
8491
8526
|
progress = _ref$progress === void 0 ? 0 : _ref$progress,
|
|
8492
8527
|
_ref$guideBoxDisabled = _ref.guideBoxDisabled,
|
|
8493
8528
|
guideBoxDisabled = _ref$guideBoxDisabled === void 0 ? false : _ref$guideBoxDisabled,
|
|
8494
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
8529
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
8495
8530
|
var _useResizeObserver = useResizeObserver(),
|
|
8496
8531
|
ref = _useResizeObserver.ref,
|
|
8497
8532
|
_useResizeObserver$wi = _useResizeObserver.width,
|
|
@@ -9881,11 +9916,11 @@ var LoadingGraphicPhoneGroup = styled.g(_templateObject4$s || (_templateObject4$
|
|
|
9881
9916
|
return props.$offScreen ? '40px' : '0';
|
|
9882
9917
|
});
|
|
9883
9918
|
|
|
9884
|
-
var _excluded$
|
|
9919
|
+
var _excluded$g = ["state"];
|
|
9885
9920
|
function LoadingListItemIndicator(_ref) {
|
|
9886
9921
|
var _ref$state = _ref.state,
|
|
9887
9922
|
state = _ref$state === void 0 ? 'running' : _ref$state,
|
|
9888
|
-
svgProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
9923
|
+
svgProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
9889
9924
|
return jsx("svg", _extends({
|
|
9890
9925
|
width: "16",
|
|
9891
9926
|
height: "16",
|
|
@@ -10390,9 +10425,9 @@ function loadingOverlayBottomEdgeColor(theme, modelsReady) {
|
|
|
10390
10425
|
});
|
|
10391
10426
|
}
|
|
10392
10427
|
|
|
10393
|
-
function _createForOfIteratorHelperLoose$
|
|
10394
|
-
function _unsupportedIterableToArray$
|
|
10395
|
-
function _arrayLikeToArray$
|
|
10428
|
+
function _createForOfIteratorHelperLoose$r(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$r(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10429
|
+
function _unsupportedIterableToArray$r(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$r(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$r(r, a) : void 0; } }
|
|
10430
|
+
function _arrayLikeToArray$r(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
10396
10431
|
var DEFAULT_THRESHOLD = 0.03;
|
|
10397
10432
|
// Minimum confidence a `'Finger'` detection must clear before it counts
|
|
10398
10433
|
// toward occlusion. The LiteRT document detector emits low-score
|
|
@@ -10443,7 +10478,7 @@ function computeFingerOcclusion(bestDocument, detectedObjects, documentType, thr
|
|
|
10443
10478
|
// overlap each other the shared area gets double-counted — that errs
|
|
10444
10479
|
// toward over-blocking, which is the safer direction for occlusion.
|
|
10445
10480
|
var totalOverlap = 0;
|
|
10446
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
10481
|
+
for (var _iterator = _createForOfIteratorHelperLoose$r(detectedObjects), _step; !(_step = _iterator()).done;) {
|
|
10447
10482
|
var obj = _step.value;
|
|
10448
10483
|
if (obj.label !== 'Finger') continue;
|
|
10449
10484
|
if (obj.score < MIN_FINGER_SCORE) continue;
|
|
@@ -10475,7 +10510,7 @@ function anyOverlapByLabel(bestDocument, detectedObjects, label, minScore) {
|
|
|
10475
10510
|
if (!bestDocument) return false;
|
|
10476
10511
|
var docBox = bestDocument.box;
|
|
10477
10512
|
if (docBox.width <= 0 || docBox.height <= 0) return false;
|
|
10478
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
10513
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$r(detectedObjects), _step2; !(_step2 = _iterator2()).done;) {
|
|
10479
10514
|
var obj = _step2.value;
|
|
10480
10515
|
if (obj.label !== label) continue;
|
|
10481
10516
|
if (obj.score < minScore) continue;
|
|
@@ -10651,9 +10686,9 @@ var initialFlowState = {
|
|
|
10651
10686
|
|
|
10652
10687
|
var CapturedDocumentTypeValues = ['idCardFront', 'idCardBack', 'passport', 'singlePage', 'selfie', 'idFrontIrImage', 'idBackIrImage', 'idFrontUvImage', 'idBackUvImage', 'idBarcodeImage'];
|
|
10653
10688
|
|
|
10654
|
-
function _createForOfIteratorHelperLoose$
|
|
10655
|
-
function _unsupportedIterableToArray$
|
|
10656
|
-
function _arrayLikeToArray$
|
|
10689
|
+
function _createForOfIteratorHelperLoose$q(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$q(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10690
|
+
function _unsupportedIterableToArray$q(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$q(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$q(r, a) : void 0; } }
|
|
10691
|
+
function _arrayLikeToArray$q(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
10657
10692
|
// Tuning constants — seeded estimates. Expect on-device tuning against real
|
|
10658
10693
|
// captures across angles/devices (same posture as the liveness geometry).
|
|
10659
10694
|
var CONTAINMENT_MIN = 0.8; // fraction of inner box inside the outer box
|
|
@@ -10681,7 +10716,7 @@ function containment(inner, outer) {
|
|
|
10681
10716
|
}
|
|
10682
10717
|
function bestByLabel(objs, label) {
|
|
10683
10718
|
var best = null;
|
|
10684
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
10719
|
+
for (var _iterator = _createForOfIteratorHelperLoose$q(objs), _step; !(_step = _iterator()).done;) {
|
|
10685
10720
|
var o = _step.value;
|
|
10686
10721
|
if (o.label !== label) continue;
|
|
10687
10722
|
if (o.score < MIN_BOOKLET_SCORE) continue;
|
|
@@ -10856,9 +10891,9 @@ function remainingIdCaptureRequirements(captureRequirement, capturedDocuments, r
|
|
|
10856
10891
|
});
|
|
10857
10892
|
}
|
|
10858
10893
|
|
|
10859
|
-
function _createForOfIteratorHelperLoose$
|
|
10860
|
-
function _unsupportedIterableToArray$
|
|
10861
|
-
function _arrayLikeToArray$
|
|
10894
|
+
function _createForOfIteratorHelperLoose$p(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$p(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10895
|
+
function _unsupportedIterableToArray$p(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$p(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$p(r, a) : void 0; } }
|
|
10896
|
+
function _arrayLikeToArray$p(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
10862
10897
|
/**
|
|
10863
10898
|
* Clears the current frame's verdict (sdk2 idCaptureReducer.ts:367-389). Both
|
|
10864
10899
|
* of these describe "the last frame we looked at", so they are meaningless —
|
|
@@ -10942,7 +10977,7 @@ var _reduceIdCapture = function reduceIdCapture(state, action, now) {
|
|
|
10942
10977
|
// from one the user captured -- `documentCaptured` erases the
|
|
10943
10978
|
// difference by design (see state.ts precapturedDocumentTypes).
|
|
10944
10979
|
var seeded = [];
|
|
10945
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
10980
|
+
for (var _iterator = _createForOfIteratorHelperLoose$p(CapturedDocumentTypeValues), _step; !(_step = _iterator()).done;) {
|
|
10946
10981
|
var k = _step.value;
|
|
10947
10982
|
var payload = precapturedDocuments[k];
|
|
10948
10983
|
if (payload) {
|
|
@@ -11280,7 +11315,7 @@ var _reduceIdCapture = function reduceIdCapture(state, action, now) {
|
|
|
11280
11315
|
case 'documentsCaptured':
|
|
11281
11316
|
{
|
|
11282
11317
|
var _newState2 = _extends({}, state);
|
|
11283
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
11318
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$p(action.payload), _step2; !(_step2 = _iterator2()).done;) {
|
|
11284
11319
|
var doc = _step2.value;
|
|
11285
11320
|
_newState2 = _reduceIdCapture(_newState2, {
|
|
11286
11321
|
type: 'documentCaptured',
|
|
@@ -13482,9 +13517,9 @@ function evaluateIsMobile(nav) {
|
|
|
13482
13517
|
return false;
|
|
13483
13518
|
}
|
|
13484
13519
|
|
|
13485
|
-
function _createForOfIteratorHelperLoose$
|
|
13486
|
-
function _unsupportedIterableToArray$
|
|
13487
|
-
function _arrayLikeToArray$
|
|
13520
|
+
function _createForOfIteratorHelperLoose$o(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$o(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13521
|
+
function _unsupportedIterableToArray$o(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$o(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$o(r, a) : void 0; } }
|
|
13522
|
+
function _arrayLikeToArray$o(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13488
13523
|
// zxing-js UMD build, self-hosted on the SDK's own CDN (version-pinned) rather
|
|
13489
13524
|
// than fetched from unpkg. The previous `@latest` URL was both an external
|
|
13490
13525
|
// dependency and a supply-chain risk — it executed whatever unpkg served as
|
|
@@ -14224,7 +14259,7 @@ function _decodePDF() {
|
|
|
14224
14259
|
}
|
|
14225
14260
|
base = _bases[_i];
|
|
14226
14261
|
log$1("[NativeBarcodeDecoder] Trying fine rotation deskew around " + base.angle + "\xB0...");
|
|
14227
|
-
_iterator = _createForOfIteratorHelperLoose$
|
|
14262
|
+
_iterator = _createForOfIteratorHelperLoose$o(FINE_ROTATION_ANGLES);
|
|
14228
14263
|
case 11:
|
|
14229
14264
|
if ((_step = _iterator()).done) {
|
|
14230
14265
|
_context0.next = 14;
|
|
@@ -14749,7 +14784,7 @@ function _decodePDF417WithDetails() {
|
|
|
14749
14784
|
}
|
|
14750
14785
|
base = _bases2[_i2];
|
|
14751
14786
|
log$1("[NativeBarcodeDecoder] Trying fine rotation deskew around " + base.angle + "\xB0 (detailed)...");
|
|
14752
|
-
_iterator2 = _createForOfIteratorHelperLoose$
|
|
14787
|
+
_iterator2 = _createForOfIteratorHelperLoose$o(FINE_ROTATION_ANGLES);
|
|
14753
14788
|
case 12:
|
|
14754
14789
|
if ((_step2 = _iterator2()).done) {
|
|
14755
14790
|
_context12.next = 15;
|
|
@@ -14868,9 +14903,9 @@ var CaptureAttachError = /*#__PURE__*/function (_Error) {
|
|
|
14868
14903
|
return CaptureAttachError;
|
|
14869
14904
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
14870
14905
|
|
|
14871
|
-
function _createForOfIteratorHelperLoose$
|
|
14872
|
-
function _unsupportedIterableToArray$
|
|
14873
|
-
function _arrayLikeToArray$
|
|
14906
|
+
function _createForOfIteratorHelperLoose$n(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$n(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14907
|
+
function _unsupportedIterableToArray$n(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$n(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$n(r, a) : void 0; } }
|
|
14908
|
+
function _arrayLikeToArray$n(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14874
14909
|
/**
|
|
14875
14910
|
* Analyzes barcode readability for a detected document
|
|
14876
14911
|
* (IdCaptureModelsProvider.tsx:83-199, ported verbatim; the last two
|
|
@@ -15331,7 +15366,7 @@ function createDetectionPipeline(opts) {
|
|
|
15331
15366
|
});
|
|
15332
15367
|
if (failed) {
|
|
15333
15368
|
loadSettled = true;
|
|
15334
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
15369
|
+
for (var _iterator = _createForOfIteratorHelperLoose$n(lifecycleHandles), _step; !(_step = _iterator()).done;) {
|
|
15335
15370
|
var handle = _step.value;
|
|
15336
15371
|
handle.cancel();
|
|
15337
15372
|
}
|
|
@@ -16617,9 +16652,9 @@ function maybeDataUrlToBase64Sync(url) {
|
|
|
16617
16652
|
return dataUrlToBase64Sync(url);
|
|
16618
16653
|
}
|
|
16619
16654
|
|
|
16620
|
-
function _createForOfIteratorHelperLoose$
|
|
16621
|
-
function _unsupportedIterableToArray$
|
|
16622
|
-
function _arrayLikeToArray$
|
|
16655
|
+
function _createForOfIteratorHelperLoose$m(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$m(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16656
|
+
function _unsupportedIterableToArray$m(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$m(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$m(r, a) : void 0; } }
|
|
16657
|
+
function _arrayLikeToArray$m(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16623
16658
|
// Document types whose capture attempt becomes an upload's `filemetadata`, in
|
|
16624
16659
|
// write order: `singlePage` after `idCardFront` so it wins `idFrontImage`,
|
|
16625
16660
|
// exactly as the image does below.
|
|
@@ -16709,7 +16744,7 @@ function buildIdCaptureArtifacts(inputs, now) {
|
|
|
16709
16744
|
};
|
|
16710
16745
|
if (ocrMetadata) meta.ocrMetadata = ocrMetadata;
|
|
16711
16746
|
var documentFileMetadata = {};
|
|
16712
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
16747
|
+
for (var _iterator = _createForOfIteratorHelperLoose$m(FILE_METADATA_KEYS), _step; !(_step = _iterator()).done;) {
|
|
16713
16748
|
var _step$value = _slicedToArray(_step.value, 2),
|
|
16714
16749
|
documentType = _step$value[0],
|
|
16715
16750
|
documentKey = _step$value[1];
|
|
@@ -16736,10 +16771,10 @@ function buildIdCaptureArtifacts(inputs, now) {
|
|
|
16736
16771
|
};
|
|
16737
16772
|
}
|
|
16738
16773
|
|
|
16739
|
-
var _excluded$
|
|
16740
|
-
function _createForOfIteratorHelperLoose$
|
|
16741
|
-
function _unsupportedIterableToArray$
|
|
16742
|
-
function _arrayLikeToArray$
|
|
16774
|
+
var _excluded$f = ["bestBarcodeScore", "barcodeBoundingBox"];
|
|
16775
|
+
function _createForOfIteratorHelperLoose$l(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$l(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16776
|
+
function _unsupportedIterableToArray$l(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$l(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$l(r, a) : void 0; } }
|
|
16777
|
+
function _arrayLikeToArray$l(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16743
16778
|
// sdk2/src/components/id_capture/IdCaptureWizard.tsx:253-262
|
|
16744
16779
|
var lastDocumentDetectedAtDefaults = {
|
|
16745
16780
|
idCardFront: null,
|
|
@@ -16909,7 +16944,7 @@ function createIdCaptureController(config) {
|
|
|
16909
16944
|
// payload.ts's buildNoBarcodeOCRMetadata fallback counts).
|
|
16910
16945
|
var bestBarcodeScore = metadata.bestBarcodeScore,
|
|
16911
16946
|
barcodeBoundingBox = metadata.barcodeBoundingBox,
|
|
16912
|
-
captureAttemptWithoutBarcode = _objectWithoutPropertiesLoose(metadata, _excluded$
|
|
16947
|
+
captureAttemptWithoutBarcode = _objectWithoutPropertiesLoose(metadata, _excluded$f);
|
|
16913
16948
|
captureAttempts.back.push(captureAttemptWithoutBarcode);
|
|
16914
16949
|
// :619-629 -- appended whenever a barcode score was recorded at all
|
|
16915
16950
|
// (0 counts: auto-capture stamps `bestBarcodeScore: bestBarcode?.score
|
|
@@ -16949,7 +16984,7 @@ function createIdCaptureController(config) {
|
|
|
16949
16984
|
}
|
|
16950
16985
|
}
|
|
16951
16986
|
function clearAllTimers() {
|
|
16952
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
16987
|
+
for (var _iterator = _createForOfIteratorHelperLoose$l(timers.values()), _step; !(_step = _iterator()).done;) {
|
|
16953
16988
|
var handle = _step.value;
|
|
16954
16989
|
io.clearTimeout(handle);
|
|
16955
16990
|
}
|
|
@@ -19956,7 +19991,7 @@ var ContinueButton$2 = styled(LoaderButton)(_templateObject7$c || (_templateObje
|
|
|
19956
19991
|
return (_props$theme$idCaptur5 = (_props$theme7 = props.theme) == null || (_props$theme7 = _props$theme7.idCapture) == null || (_props$theme7 = _props$theme7.loadingOverlay) == null ? void 0 : _props$theme7.continueBtnDisabledBorder) != null ? _props$theme$idCaptur5 : 'none';
|
|
19957
19992
|
});
|
|
19958
19993
|
|
|
19959
|
-
var _excluded$
|
|
19994
|
+
var _excluded$e = ["mode"];
|
|
19960
19995
|
var components$1 = {
|
|
19961
19996
|
"default": IdCaptureLoadingOverlayDefault,
|
|
19962
19997
|
legacy: IdCaptureLoadingOverlayLegacy,
|
|
@@ -19966,7 +20001,7 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_ref) {
|
|
|
19966
20001
|
var _components$mode;
|
|
19967
20002
|
var _ref$mode = _ref.mode,
|
|
19968
20003
|
mode = _ref$mode === void 0 ? 'default' : _ref$mode,
|
|
19969
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
20004
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
19970
20005
|
var Component = (_components$mode = components$1[mode]) != null ? _components$mode : components$1["default"];
|
|
19971
20006
|
return jsx(Component, _extends({}, props));
|
|
19972
20007
|
};
|
|
@@ -21549,9 +21584,9 @@ function useSessionReady() {
|
|
|
21549
21584
|
}
|
|
21550
21585
|
|
|
21551
21586
|
var _templateObject$w;
|
|
21552
|
-
function _createForOfIteratorHelperLoose$
|
|
21553
|
-
function _unsupportedIterableToArray$
|
|
21554
|
-
function _arrayLikeToArray$
|
|
21587
|
+
function _createForOfIteratorHelperLoose$k(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$k(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21588
|
+
function _unsupportedIterableToArray$k(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$k(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$k(r, a) : void 0; } }
|
|
21589
|
+
function _arrayLikeToArray$k(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
21555
21590
|
// Unlike SelfieCaptureView/FaceLivenessView, this view has no root
|
|
21556
21591
|
// container of its own -- ScalingCameraFeed/IdCaptureGuides/etc. render as
|
|
21557
21592
|
// siblings relying on whatever positioned ancestor the host page provides.
|
|
@@ -21819,7 +21854,7 @@ function IdCaptureViewContent(_ref) {
|
|
|
21819
21854
|
// after this effect first runs with an empty state). Folding it in here,
|
|
21820
21855
|
// rather than seeding once on mount, is what makes the skip actually
|
|
21821
21856
|
// apply. `seen` keeps a consumed exclusion from being re-armed.
|
|
21822
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
21857
|
+
for (var _iterator = _createForOfIteratorHelperLoose$k(state.precapturedDocumentTypes), _step; !(_step = _iterator()).done;) {
|
|
21823
21858
|
var _documentType = _step.value;
|
|
21824
21859
|
if (seenPrecapturedRef.current.has(_documentType)) continue;
|
|
21825
21860
|
seenPrecapturedRef.current.add(_documentType);
|
|
@@ -23186,6 +23221,19 @@ function reduceSelfieCapture(state, event) {
|
|
|
23186
23221
|
error: null
|
|
23187
23222
|
});
|
|
23188
23223
|
}
|
|
23224
|
+
// The exit button: abandon the attempt and put the instructions back up.
|
|
23225
|
+
// 'captureStarted' accepts 'loading', so the overlay's continue starts a
|
|
23226
|
+
// fresh attempt from here.
|
|
23227
|
+
case 'exitRequested':
|
|
23228
|
+
{
|
|
23229
|
+
if (state.phase === 'initializing' || state.phase === 'loading') return state;
|
|
23230
|
+
return _extends({}, state, {
|
|
23231
|
+
phase: 'loading'
|
|
23232
|
+
}, clearedSelfieVerdict(), {
|
|
23233
|
+
capturedSelfie: null,
|
|
23234
|
+
error: null
|
|
23235
|
+
});
|
|
23236
|
+
}
|
|
23189
23237
|
}
|
|
23190
23238
|
}
|
|
23191
23239
|
// The ladder's code, except that HOLD_STILL reads HAND_OVER_FACE while the
|
|
@@ -23195,9 +23243,9 @@ function guidanceFor(state, prediction, at) {
|
|
|
23195
23243
|
return code === SelfieGuidanceCode.HOLD_STILL && handOverFaceHeld(state.handOverFaceAt, at) ? SelfieGuidanceCode.HAND_OVER_FACE : code;
|
|
23196
23244
|
}
|
|
23197
23245
|
|
|
23198
|
-
function _createForOfIteratorHelperLoose$
|
|
23199
|
-
function _unsupportedIterableToArray$
|
|
23200
|
-
function _arrayLikeToArray$
|
|
23246
|
+
function _createForOfIteratorHelperLoose$j(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$j(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23247
|
+
function _unsupportedIterableToArray$j(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$j(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$j(r, a) : void 0; } }
|
|
23248
|
+
function _arrayLikeToArray$j(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
23201
23249
|
// sdk2 componenets/selfie_capture/faceDetectorDefault.ts:5
|
|
23202
23250
|
// (DEFAULT_FACE_DETECTOR): face-landmarker is the default face model as of
|
|
23203
23251
|
// 2.4.0.
|
|
@@ -23227,7 +23275,7 @@ function mapDetectionsToFaces(prediction) {
|
|
|
23227
23275
|
if (!prediction) return null;
|
|
23228
23276
|
var faceDetections = [];
|
|
23229
23277
|
var noseDetections = [];
|
|
23230
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
23278
|
+
for (var _iterator = _createForOfIteratorHelperLoose$j(prediction.detections), _step; !(_step = _iterator()).done;) {
|
|
23231
23279
|
var detection = _step.value;
|
|
23232
23280
|
if (isNoseDetection(detection)) {
|
|
23233
23281
|
noseDetections.push(detection);
|
|
@@ -23241,7 +23289,7 @@ function mapDetectionsToFaces(prediction) {
|
|
|
23241
23289
|
var faceBox = d.boundingBox;
|
|
23242
23290
|
if (!faceBox) continue;
|
|
23243
23291
|
var nose = null;
|
|
23244
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
23292
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$j(noseDetections), _step2; !(_step2 = _iterator2()).done;) {
|
|
23245
23293
|
var n = _step2.value;
|
|
23246
23294
|
var noseBox = n.boundingBox;
|
|
23247
23295
|
if (!noseBox) continue;
|
|
@@ -24043,9 +24091,9 @@ function captureQualityException(reason, measurements, originalThresholds, recov
|
|
|
24043
24091
|
};
|
|
24044
24092
|
}
|
|
24045
24093
|
|
|
24046
|
-
function _createForOfIteratorHelperLoose$
|
|
24047
|
-
function _unsupportedIterableToArray$
|
|
24048
|
-
function _arrayLikeToArray$
|
|
24094
|
+
function _createForOfIteratorHelperLoose$i(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$i(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24095
|
+
function _unsupportedIterableToArray$i(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$i(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$i(r, a) : void 0; } }
|
|
24096
|
+
function _arrayLikeToArray$i(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
24049
24097
|
// sdk2 SelfieGuidanceModelsProvider.tsx onPredictionMade's useThrottledCallback
|
|
24050
24098
|
// second argument (SelfieCapture.tsx:225 -- "locks to 60fps maximum").
|
|
24051
24099
|
var DEFAULT_PREDICTION_THROTTLE_MS = 16;
|
|
@@ -24167,7 +24215,7 @@ function createSelfieCaptureController(config) {
|
|
|
24167
24215
|
// --- timers (idCapture pattern, colon-namespaced) ---
|
|
24168
24216
|
var timers = new Map();
|
|
24169
24217
|
function clearAllTimers() {
|
|
24170
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
24218
|
+
for (var _iterator = _createForOfIteratorHelperLoose$i(timers.values()), _step; !(_step = _iterator()).done;) {
|
|
24171
24219
|
var handle = _step.value;
|
|
24172
24220
|
io.clearTimeout(handle);
|
|
24173
24221
|
}
|
|
@@ -25495,6 +25543,37 @@ function createSelfieCaptureController(config) {
|
|
|
25495
25543
|
return _doAttach.apply(this, arguments);
|
|
25496
25544
|
}
|
|
25497
25545
|
var cameraReacquisition = null;
|
|
25546
|
+
// sdk2's retry and exit both remount FaceLivenessCapture with a new `key`
|
|
25547
|
+
// (FaceLivenessWizard.tsx:394-409), which throws away that component's
|
|
25548
|
+
// whole reducer -- INCLUDING timesLivenessCheckFailed -- so the user gets a
|
|
25549
|
+
// fresh set of liveness attempts. Rebuilding the machine here is that
|
|
25550
|
+
// remount's equivalent; without it a retry from the lockout screen
|
|
25551
|
+
// re-entered capture with the failure budget still spent, and the next
|
|
25552
|
+
// failed check re-locked immediately.
|
|
25553
|
+
function resetLivenessAttempt() {
|
|
25554
|
+
clearTimer('liveness:reset');
|
|
25555
|
+
clearTimer('liveness:kickout');
|
|
25556
|
+
clearTimer('liveness:kickoutGrace');
|
|
25557
|
+
// The challenge runner and its tick are NOT reducer state, so the
|
|
25558
|
+
// setState below cannot reach them -- runLivenessEffects runs only from
|
|
25559
|
+
// dispatchLiveness. Leaving CHALLENGE otherwise left the discarded runner
|
|
25560
|
+
// ticking, still able to fire onChallengeComplete for an attempt the user
|
|
25561
|
+
// had abandoned.
|
|
25562
|
+
clearTimer('challenge:tick');
|
|
25563
|
+
challengeRunner = null;
|
|
25564
|
+
challengeResultConsumed = false;
|
|
25565
|
+
// Orphan any check still in flight: its verdict would otherwise land in
|
|
25566
|
+
// the machine built below (the reducer's livenessChecked case is
|
|
25567
|
+
// unguarded), and its single-flight latch would block the fresh attempt
|
|
25568
|
+
// from checking at all until it settled.
|
|
25569
|
+
livenessGeneration += 1;
|
|
25570
|
+
livenessCheckInFlight = false;
|
|
25571
|
+
internal.setState({
|
|
25572
|
+
liveness: createInitialLivenessMachineState(),
|
|
25573
|
+
challenge: null,
|
|
25574
|
+
livenessTimedOut: false
|
|
25575
|
+
});
|
|
25576
|
+
}
|
|
25498
25577
|
// retry()'s capture re-entry, run straight away or once a released camera
|
|
25499
25578
|
// is back.
|
|
25500
25579
|
function resumeCapture() {
|
|
@@ -25828,37 +25907,7 @@ function createSelfieCaptureController(config) {
|
|
|
25828
25907
|
},
|
|
25829
25908
|
retry: function retry() {
|
|
25830
25909
|
if (!active) return;
|
|
25831
|
-
|
|
25832
|
-
// (FaceLivenessWizard.tsx:402-409), which throws away that
|
|
25833
|
-
// component's whole reducer -- INCLUDING timesLivenessCheckFailed --
|
|
25834
|
-
// so the user gets a fresh set of liveness attempts. Rebuilding the
|
|
25835
|
-
// machine here is that remount's equivalent; without it a retry from
|
|
25836
|
-
// the lockout screen re-entered capture with the failure budget still
|
|
25837
|
-
// spent, and the next failed check re-locked immediately.
|
|
25838
|
-
if (config.liveness) {
|
|
25839
|
-
clearTimer('liveness:reset');
|
|
25840
|
-
clearTimer('liveness:kickout');
|
|
25841
|
-
clearTimer('liveness:kickoutGrace');
|
|
25842
|
-
// The challenge runner and its tick are NOT reducer state, so the
|
|
25843
|
-
// setState below cannot reach them -- runLivenessEffects runs only
|
|
25844
|
-
// from dispatchLiveness. Retrying out of CHALLENGE otherwise left
|
|
25845
|
-
// the discarded runner ticking, still able to fire
|
|
25846
|
-
// onChallengeComplete for an attempt the user had abandoned.
|
|
25847
|
-
clearTimer('challenge:tick');
|
|
25848
|
-
challengeRunner = null;
|
|
25849
|
-
challengeResultConsumed = false;
|
|
25850
|
-
// Orphan any check still in flight: its verdict would otherwise land
|
|
25851
|
-
// in the machine built below (the reducer's livenessChecked case is
|
|
25852
|
-
// unguarded), and its single-flight latch would block the fresh
|
|
25853
|
-
// attempt from checking at all until it settled.
|
|
25854
|
-
livenessGeneration += 1;
|
|
25855
|
-
livenessCheckInFlight = false;
|
|
25856
|
-
internal.setState({
|
|
25857
|
-
liveness: createInitialLivenessMachineState(),
|
|
25858
|
-
challenge: null,
|
|
25859
|
-
livenessTimedOut: false
|
|
25860
|
-
});
|
|
25861
|
-
}
|
|
25910
|
+
if (config.liveness) resetLivenessAttempt();
|
|
25862
25911
|
progress.retry('capture-error');
|
|
25863
25912
|
dispatch({
|
|
25864
25913
|
type: 'retryRequested'
|
|
@@ -25875,12 +25924,43 @@ function createSelfieCaptureController(config) {
|
|
|
25875
25924
|
if (cameraReacquisition) return;
|
|
25876
25925
|
var generation = attachGeneration;
|
|
25877
25926
|
var reacquisition = requestCamera().then(function () {
|
|
25878
|
-
|
|
25927
|
+
// exitCapture() may have sent the user back to the instructions
|
|
25928
|
+
// while the camera was coming back.
|
|
25929
|
+
if (active && generation === attachGeneration && internal.getState().phase === 'capturing') resumeCapture();
|
|
25879
25930
|
})["catch"](function () {})["finally"](function () {
|
|
25880
25931
|
// detach() may have dropped this one and a newer one started.
|
|
25881
25932
|
if (cameraReacquisition === reacquisition) cameraReacquisition = null;
|
|
25882
25933
|
});
|
|
25883
25934
|
cameraReacquisition = reacquisition;
|
|
25935
|
+
},
|
|
25936
|
+
exitCapture: function exitCapture() {
|
|
25937
|
+
var _frameLoop9;
|
|
25938
|
+
if (!active) return;
|
|
25939
|
+
var _internal$getState = internal.getState(),
|
|
25940
|
+
phase = _internal$getState.phase;
|
|
25941
|
+
if (phase === 'initializing' || phase === 'loading') return;
|
|
25942
|
+
// Every armed timer belongs to the abandoned attempt.
|
|
25943
|
+
clearAllTimers();
|
|
25944
|
+
(_frameLoop9 = frameLoop) == null || _frameLoop9.stop();
|
|
25945
|
+
frameLoop = null;
|
|
25946
|
+
trackingOnly = false;
|
|
25947
|
+
initialDelayOver = false;
|
|
25948
|
+
busy = false;
|
|
25949
|
+
pendingFire = null;
|
|
25950
|
+
if (config.liveness) resetLivenessAttempt();
|
|
25951
|
+
progress.retry('user-requested');
|
|
25952
|
+
internal.setState({
|
|
25953
|
+
capturedAttempt: null,
|
|
25954
|
+
capturedImageUrl: null,
|
|
25955
|
+
captureRecovery: null
|
|
25956
|
+
});
|
|
25957
|
+
dispatch({
|
|
25958
|
+
type: 'exitRequested'
|
|
25959
|
+
});
|
|
25960
|
+
// The overlay waits on `camera.ready`, so a camera handed back by a
|
|
25961
|
+
// terminal screen has to come back for its continue to enable. A
|
|
25962
|
+
// failure lands in `error` (requestCamera's own write).
|
|
25963
|
+
if (cameraReleased && !cameraReacquisition) void requestCamera()["catch"](function () {});
|
|
25884
25964
|
}
|
|
25885
25965
|
}
|
|
25886
25966
|
}, progressBinding);
|
|
@@ -25934,7 +26014,7 @@ function SelfieCameraFeed(_ref) {
|
|
|
25934
26014
|
}
|
|
25935
26015
|
|
|
25936
26016
|
var _templateObject$u, _templateObject2$s, _templateObject3$j, _templateObject4$f;
|
|
25937
|
-
var _excluded$
|
|
26017
|
+
var _excluded$d = ["borderColor", "borderOpacity", "borderWidth", "status"],
|
|
25938
26018
|
_excluded2$4 = ["status", "guideStyle"],
|
|
25939
26019
|
_excluded3 = ["frame", "borderWidth", "borderColor", "borderOpacity", "verticalAlign", "status", "guideStyle"],
|
|
25940
26020
|
_excluded4 = ["status"];
|
|
@@ -25951,7 +26031,7 @@ var HeadGuideSvg = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
25951
26031
|
borderWidth = _ref$borderWidth === void 0 ? 5 : _ref$borderWidth,
|
|
25952
26032
|
_ref$status = _ref.status,
|
|
25953
26033
|
status = _ref$status === void 0 ? 'ready' : _ref$status,
|
|
25954
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
26034
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
25955
26035
|
return jsxs("svg", _extends({}, props, {
|
|
25956
26036
|
ref: ref,
|
|
25957
26037
|
viewBox: "271 92 297 406",
|
|
@@ -27237,7 +27317,7 @@ var ContinueButton = styled(LoaderButton)(_templateObject7$8 || (_templateObject
|
|
|
27237
27317
|
return (_props$theme$selfieCa5 = (_props$theme7 = props.theme) == null || (_props$theme7 = _props$theme7.selfieCapture) == null || (_props$theme7 = _props$theme7.loadingOverlay) == null ? void 0 : _props$theme7.continueBtnDisabledBorder) != null ? _props$theme$selfieCa5 : 'none';
|
|
27238
27318
|
});
|
|
27239
27319
|
|
|
27240
|
-
var _excluded$
|
|
27320
|
+
var _excluded$c = ["mode"];
|
|
27241
27321
|
var components = {
|
|
27242
27322
|
"default": SelfieCaptureLoadingOverlayDefault,
|
|
27243
27323
|
legacy: SelfieCaptureLoadingOverlayLegacy,
|
|
@@ -27247,7 +27327,7 @@ var SelfieCaptureLoadingOverlay = function SelfieCaptureLoadingOverlay(_ref) {
|
|
|
27247
27327
|
var _components$mode;
|
|
27248
27328
|
var _ref$mode = _ref.mode,
|
|
27249
27329
|
mode = _ref$mode === void 0 ? 'default' : _ref$mode,
|
|
27250
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
27330
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
27251
27331
|
var Component = (_components$mode = components[mode]) != null ? _components$mode : components["default"];
|
|
27252
27332
|
return jsx(Component, _extends({}, props));
|
|
27253
27333
|
};
|
|
@@ -27627,6 +27707,13 @@ function SelfieCaptureSurface(_ref) {
|
|
|
27627
27707
|
void controller.actions.start();
|
|
27628
27708
|
onLoadingOverlayDismissed == null || onLoadingOverlayDismissed();
|
|
27629
27709
|
}, [controller, onLoadingOverlayDismissed]);
|
|
27710
|
+
// Back to the instructions BEFORE telling the host, as sdk2 did
|
|
27711
|
+
// (FaceLivenessWizard.tsx:394): handing `onExit` to the button raw left the
|
|
27712
|
+
// capture running behind a host that expected the loading screen.
|
|
27713
|
+
var handleExit = useCallback(function () {
|
|
27714
|
+
controller.actions.exitCapture();
|
|
27715
|
+
onExit == null || onExit();
|
|
27716
|
+
}, [controller, onExit]);
|
|
27630
27717
|
// plan-3 ruling: camera-acquisition errors recover via requestCamera()
|
|
27631
27718
|
// (retry() explicitly excludes them, controller.ts), everything else via
|
|
27632
27719
|
// retry(). Applies unconditionally across every loadingOverlayMode.
|
|
@@ -27725,7 +27812,7 @@ function SelfieCaptureSurface(_ref) {
|
|
|
27725
27812
|
children: [jsx("br", {}), state.handOverFace.lastCheck ? state.handOverFace.lastCheck.handOverFace ? '❌' : '✅' : '➖', ' ', "Hand Off Face (", state.handOverFace.status, state.handOverFace.lastCheck && ", last check " + state.handOverFace.lastCheck.coverage.toFixed(2) + " covered in " + Math.round(state.handOverFace.lastCheck.inferenceMs) + " ms", ")"]
|
|
27726
27813
|
})]
|
|
27727
27814
|
}), onExit != null && jsx(ExitCaptureButton, {
|
|
27728
|
-
onClick:
|
|
27815
|
+
onClick: handleExit,
|
|
27729
27816
|
className: classNames.exitBtn
|
|
27730
27817
|
}), showLoadingOverlay && jsx(SelfieCaptureLoadingOverlay, {
|
|
27731
27818
|
state: loadingOverlayState,
|
|
@@ -28612,9 +28699,9 @@ function FaceLivenessViewContent(_ref) {
|
|
|
28612
28699
|
});
|
|
28613
28700
|
}
|
|
28614
28701
|
|
|
28615
|
-
function _createForOfIteratorHelperLoose$
|
|
28616
|
-
function _unsupportedIterableToArray$
|
|
28617
|
-
function _arrayLikeToArray$
|
|
28702
|
+
function _createForOfIteratorHelperLoose$h(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$h(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
28703
|
+
function _unsupportedIterableToArray$h(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$h(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$h(r, a) : void 0; } }
|
|
28704
|
+
function _arrayLikeToArray$h(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
28618
28705
|
/**
|
|
28619
28706
|
* Signature validity estimate (AMEXDESK-676).
|
|
28620
28707
|
*
|
|
@@ -28717,7 +28804,7 @@ function countSignaturePoints(strokes) {
|
|
|
28717
28804
|
*/
|
|
28718
28805
|
function measurePenDownMs(strokes) {
|
|
28719
28806
|
var total = 0;
|
|
28720
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
28807
|
+
for (var _iterator = _createForOfIteratorHelperLoose$h(strokes), _step; !(_step = _iterator()).done;) {
|
|
28721
28808
|
var stroke = _step.value;
|
|
28722
28809
|
if (stroke.length < 2) continue;
|
|
28723
28810
|
total += stroke[stroke.length - 1].time - stroke[0].time;
|
|
@@ -28736,9 +28823,9 @@ function boundingBox(strokes) {
|
|
|
28736
28823
|
var minY = Infinity;
|
|
28737
28824
|
var maxX = -Infinity;
|
|
28738
28825
|
var maxY = -Infinity;
|
|
28739
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
28826
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$h(strokes), _step2; !(_step2 = _iterator2()).done;) {
|
|
28740
28827
|
var stroke = _step2.value;
|
|
28741
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
28828
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$h(stroke), _step3; !(_step3 = _iterator3()).done;) {
|
|
28742
28829
|
var p = _step3.value;
|
|
28743
28830
|
if (p.x < minX) minX = p.x;
|
|
28744
28831
|
if (p.y < minY) minY = p.y;
|
|
@@ -28757,7 +28844,7 @@ function boundingBox(strokes) {
|
|
|
28757
28844
|
/** Sum of Euclidean distances between consecutive points within each stroke. */
|
|
28758
28845
|
function totalPathLength(strokes) {
|
|
28759
28846
|
var length = 0;
|
|
28760
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
28847
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$h(strokes), _step4; !(_step4 = _iterator4()).done;) {
|
|
28761
28848
|
var stroke = _step4.value;
|
|
28762
28849
|
for (var i = 1; i < stroke.length; i++) {
|
|
28763
28850
|
var dx = stroke[i].x - stroke[i - 1].x;
|
|
@@ -28813,7 +28900,7 @@ function resampleStroke(stroke, step) {
|
|
|
28813
28900
|
*/
|
|
28814
28901
|
function countDirectionChanges(strokes, step) {
|
|
28815
28902
|
var totalTurning = 0;
|
|
28816
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
28903
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$h(strokes), _step5; !(_step5 = _iterator5()).done;) {
|
|
28817
28904
|
var stroke = _step5.value;
|
|
28818
28905
|
var pts = resampleStroke(stroke, step);
|
|
28819
28906
|
var prevAngle = null;
|
|
@@ -28846,9 +28933,9 @@ function countZonesCovered(strokes, canvasWidth, canvasHeight, box) {
|
|
|
28846
28933
|
var height = useCanvas ? canvasHeight : box.maxY - box.minY;
|
|
28847
28934
|
if (width <= 0 || height <= 0) return 0;
|
|
28848
28935
|
var occupied = new Set();
|
|
28849
|
-
for (var _iterator6 = _createForOfIteratorHelperLoose$
|
|
28936
|
+
for (var _iterator6 = _createForOfIteratorHelperLoose$h(strokes), _step6; !(_step6 = _iterator6()).done;) {
|
|
28850
28937
|
var stroke = _step6.value;
|
|
28851
|
-
for (var _iterator7 = _createForOfIteratorHelperLoose$
|
|
28938
|
+
for (var _iterator7 = _createForOfIteratorHelperLoose$h(stroke), _step7; !(_step7 = _iterator7()).done;) {
|
|
28852
28939
|
var p = _step7.value;
|
|
28853
28940
|
var col = Math.min(2, Math.max(0, Math.floor((p.x - originX) / width * 3)));
|
|
28854
28941
|
var row = Math.min(2, Math.max(0, Math.floor((p.y - originY) / height * 3)));
|
|
@@ -28939,9 +29026,9 @@ function evaluateSignatureValidity(strokes, canvasWidth, canvasHeight, config) {
|
|
|
28939
29026
|
};
|
|
28940
29027
|
}
|
|
28941
29028
|
|
|
28942
|
-
function _createForOfIteratorHelperLoose$
|
|
28943
|
-
function _unsupportedIterableToArray$
|
|
28944
|
-
function _arrayLikeToArray$
|
|
29029
|
+
function _createForOfIteratorHelperLoose$g(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$g(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29030
|
+
function _unsupportedIterableToArray$g(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$g(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$g(r, a) : void 0; } }
|
|
29031
|
+
function _arrayLikeToArray$g(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
28945
29032
|
/**
|
|
28946
29033
|
* Off-screen, post-capture validation that proves a real frame renders at the
|
|
28947
29034
|
* signature's trim start offset. This is the authoritative detector for the
|
|
@@ -29390,7 +29477,7 @@ function _seekProbes() {
|
|
|
29390
29477
|
while (1) switch (_context4.prev = _context4.next) {
|
|
29391
29478
|
case 0:
|
|
29392
29479
|
probes = [];
|
|
29393
|
-
_iterator = _createForOfIteratorHelperLoose$
|
|
29480
|
+
_iterator = _createForOfIteratorHelperLoose$g(probeTimesMs);
|
|
29394
29481
|
case 1:
|
|
29395
29482
|
if ((_step = _iterator()).done) {
|
|
29396
29483
|
_context4.next = 4;
|
|
@@ -29460,7 +29547,7 @@ function _playbackProbes() {
|
|
|
29460
29547
|
};
|
|
29461
29548
|
var grab = function grab(mediaSec) {
|
|
29462
29549
|
if (mediaSec * 1000 > maxMediaMs) maxMediaMs = mediaSec * 1000;
|
|
29463
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
29550
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$g(targets), _step2; !(_step2 = _iterator2()).done;) {
|
|
29464
29551
|
var t = _step2.value;
|
|
29465
29552
|
if (t.result != null) continue;
|
|
29466
29553
|
if (maxMediaMs + SEEK_TOLERANCE_MS < t.ms) continue;
|
|
@@ -29513,7 +29600,7 @@ function _playbackProbes() {
|
|
|
29513
29600
|
video.play()["catch"](_finish);
|
|
29514
29601
|
});
|
|
29515
29602
|
case 2:
|
|
29516
|
-
_iterator3 = _createForOfIteratorHelperLoose$
|
|
29603
|
+
_iterator3 = _createForOfIteratorHelperLoose$g(targets);
|
|
29517
29604
|
case 3:
|
|
29518
29605
|
if ((_step3 = _iterator3()).done) {
|
|
29519
29606
|
_context5.next = 6;
|
|
@@ -31225,9 +31312,9 @@ function reduceSignatureCapture(state, event) {
|
|
|
31225
31312
|
}
|
|
31226
31313
|
}
|
|
31227
31314
|
|
|
31228
|
-
function _createForOfIteratorHelperLoose$
|
|
31229
|
-
function _unsupportedIterableToArray$
|
|
31230
|
-
function _arrayLikeToArray$
|
|
31315
|
+
function _createForOfIteratorHelperLoose$f(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$f(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31316
|
+
function _unsupportedIterableToArray$f(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$f(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$f(r, a) : void 0; } }
|
|
31317
|
+
function _arrayLikeToArray$f(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
31231
31318
|
/**
|
|
31232
31319
|
* Marks a microphone acquisition failure so `captureError` can type it.
|
|
31233
31320
|
*
|
|
@@ -31361,7 +31448,7 @@ function createSignatureCaptureController(config) {
|
|
|
31361
31448
|
}
|
|
31362
31449
|
function publish() {
|
|
31363
31450
|
snapshot = store.getState();
|
|
31364
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
31451
|
+
for (var _iterator = _createForOfIteratorHelperLoose$f(listeners), _step; !(_step = _iterator()).done;) {
|
|
31365
31452
|
var listener = _step.value;
|
|
31366
31453
|
try {
|
|
31367
31454
|
listener(snapshot);
|
|
@@ -32192,7 +32279,7 @@ function useSignatureCapture(controller) {
|
|
|
32192
32279
|
}
|
|
32193
32280
|
|
|
32194
32281
|
var _templateObject$j, _templateObject2$j, _templateObject3$f, _templateObject4$b, _templateObject5$b, _templateObject6$8;
|
|
32195
|
-
var _excluded$
|
|
32282
|
+
var _excluded$b = ["device", "frameDecode"];
|
|
32196
32283
|
var ASSUMED_TRIM_PADDING = {
|
|
32197
32284
|
startMs: TRIM_PADDING_START_MS,
|
|
32198
32285
|
endMs: TRIM_PADDING_END_MS
|
|
@@ -32424,7 +32511,7 @@ function trippedSignals(warning) {
|
|
|
32424
32511
|
var _warning$signals = warning.signals,
|
|
32425
32512
|
device = _warning$signals.device,
|
|
32426
32513
|
frameDecode = _warning$signals.frameDecode,
|
|
32427
|
-
top = _objectWithoutPropertiesLoose(_warning$signals, _excluded$
|
|
32514
|
+
top = _objectWithoutPropertiesLoose(_warning$signals, _excluded$b);
|
|
32428
32515
|
var tripped = [].concat(_toConsumableArray(Object.entries(top).filter(function (_ref2) {
|
|
32429
32516
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
32430
32517
|
signal = _ref3[1];
|
|
@@ -33476,9 +33563,9 @@ function buildVideoIdCaptureArtifacts(artifact) {
|
|
|
33476
33563
|
};
|
|
33477
33564
|
}
|
|
33478
33565
|
|
|
33479
|
-
function _createForOfIteratorHelperLoose$
|
|
33480
|
-
function _unsupportedIterableToArray$
|
|
33481
|
-
function _arrayLikeToArray$
|
|
33566
|
+
function _createForOfIteratorHelperLoose$e(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$e(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33567
|
+
function _unsupportedIterableToArray$e(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$e(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$e(r, a) : void 0; } }
|
|
33568
|
+
function _arrayLikeToArray$e(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
33482
33569
|
var DEFAULT_VIDEO_ID_PREDICTION_THROTTLE_MS = 16;
|
|
33483
33570
|
var RECENT_DETECTION_WINDOW_MS = 2000;
|
|
33484
33571
|
var defaultVideoIdCaptureThresholds = {
|
|
@@ -33622,7 +33709,7 @@ function createVideoIdCaptureController(config) {
|
|
|
33622
33709
|
var backImage = null;
|
|
33623
33710
|
function update(patch) {
|
|
33624
33711
|
state = _extends({}, state, patch);
|
|
33625
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
33712
|
+
for (var _iterator = _createForOfIteratorHelperLoose$e(listeners), _step; !(_step = _iterator()).done;) {
|
|
33626
33713
|
var listener = _step.value;
|
|
33627
33714
|
try {
|
|
33628
33715
|
listener(state);
|
|
@@ -38452,9 +38539,9 @@ var highlightJson = function highlightJson(str) {
|
|
|
38452
38539
|
};
|
|
38453
38540
|
|
|
38454
38541
|
var _templateObject$3, _templateObject2$3, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
|
|
38455
|
-
function _createForOfIteratorHelperLoose$
|
|
38456
|
-
function _unsupportedIterableToArray$
|
|
38457
|
-
function _arrayLikeToArray$
|
|
38542
|
+
function _createForOfIteratorHelperLoose$d(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$d(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
38543
|
+
function _unsupportedIterableToArray$d(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$d(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$d(r, a) : void 0; } }
|
|
38544
|
+
function _arrayLikeToArray$d(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
38458
38545
|
var SUBMISSION_SUCCESS_FALLBACKS = {
|
|
38459
38546
|
completeText: 'Submission complete',
|
|
38460
38547
|
responseReceivedText: 'Response received',
|
|
@@ -38530,7 +38617,7 @@ var quickFactConfig = [{
|
|
|
38530
38617
|
*/
|
|
38531
38618
|
var readDocumentId = function readDocumentId(request, path) {
|
|
38532
38619
|
var node = request;
|
|
38533
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
38620
|
+
for (var _iterator = _createForOfIteratorHelperLoose$d(path), _step; !(_step = _iterator()).done;) {
|
|
38534
38621
|
var segment = _step.value;
|
|
38535
38622
|
if (!node || typeof node !== 'object') return null;
|
|
38536
38623
|
node = node[segment];
|
|
@@ -38641,10 +38728,10 @@ var ASSET_CONFIG = [{
|
|
|
38641
38728
|
*/
|
|
38642
38729
|
var TRUNCATABLE_IMAGE_PATHS = [['customerData', 'idData', 'idImageFront'], ['customerData', 'idData', 'idImageBack'], ['customerData', 'idData', 'idBarcodeImage'], ['customerData', 'idData', 'idFrontIrImage'], ['customerData', 'idData', 'idBackIrImage'], ['customerData', 'idData', 'idFrontUvImage'], ['customerData', 'idData', 'idBackUvImage'], ['customerData', 'idData', 'videoIdImageFront'], ['customerData', 'idData', 'videoIdImageBack'], ['customerData', 'biometricData', 'selfie']];
|
|
38643
38730
|
function truncateImagePaths(body) {
|
|
38644
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
38731
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$d(TRUNCATABLE_IMAGE_PATHS), _step2; !(_step2 = _iterator2()).done;) {
|
|
38645
38732
|
var path = _step2.value;
|
|
38646
38733
|
var node = body;
|
|
38647
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
38734
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$d(path.slice(0, -1)), _step3; !(_step3 = _iterator3()).done;) {
|
|
38648
38735
|
var segment = _step3.value;
|
|
38649
38736
|
if (!isRecord(node)) break;
|
|
38650
38737
|
node = node[segment];
|
|
@@ -39043,6 +39130,847 @@ var JsonBlockHeader = styled.div(_templateObject22 || (_templateObject22 = _tagg
|
|
|
39043
39130
|
var JsonBlockActions = styled.div(_templateObject23 || (_templateObject23 = _taggedTemplateLiteralLoose(["\n display: flex;\n gap: 8px;\n"])));
|
|
39044
39131
|
var ResponsePre = styled.pre(_templateObject24 || (_templateObject24 = _taggedTemplateLiteralLoose(["\n box-sizing: border-box;\n width: 100%;\n overflow: auto;\n padding: 18px;\n border-radius: 8px;\n background: #17211d;\n color: #dff9e9;\n font-size: 0.8rem;\n line-height: 1.55;\n text-align: left;\n"])));
|
|
39045
39132
|
|
|
39133
|
+
var _excluded$a = ["state", "size", "theme", "speed", "paused", "style", "aria-label"];
|
|
39134
|
+
function _createForOfIteratorHelperLoose$c(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$c(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
39135
|
+
function _unsupportedIterableToArray$c(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$c(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$c(r, a) : void 0; } }
|
|
39136
|
+
function _arrayLikeToArray$c(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
39137
|
+
function F(e, n) {
|
|
39138
|
+
var s = Math.sin(e * 12.9898 + n * 78.233) * 43758.5453;
|
|
39139
|
+
return s - Math.floor(s);
|
|
39140
|
+
}
|
|
39141
|
+
function st(e, n) {
|
|
39142
|
+
var s = Math.PI * (3 - Math.sqrt(5)),
|
|
39143
|
+
r = 1 - 2 * (e + 0.5) / n,
|
|
39144
|
+
t = Math.sqrt(1 - r * r),
|
|
39145
|
+
o = e * s;
|
|
39146
|
+
return [t * Math.cos(o), r, t * Math.sin(o)];
|
|
39147
|
+
}
|
|
39148
|
+
function ot(e, n) {
|
|
39149
|
+
return Math.atan2(Math.sin(e - n), Math.cos(e - n));
|
|
39150
|
+
}
|
|
39151
|
+
function q(e, n, s, r, t) {
|
|
39152
|
+
var o = Math.sin(n),
|
|
39153
|
+
c = Math.cos(n),
|
|
39154
|
+
a = Math.sin(e),
|
|
39155
|
+
i = Math.cos(e);
|
|
39156
|
+
return function (m, g, M) {
|
|
39157
|
+
var u = m * i + M * a,
|
|
39158
|
+
h = -m * a + M * i,
|
|
39159
|
+
b = g * c - h * o,
|
|
39160
|
+
x = g * o + h * c;
|
|
39161
|
+
return [s + u * t, r - b * t, x];
|
|
39162
|
+
};
|
|
39163
|
+
}
|
|
39164
|
+
function _(e, n, s, r) {
|
|
39165
|
+
if (r === void 0) {
|
|
39166
|
+
r = 0.3;
|
|
39167
|
+
}
|
|
39168
|
+
n.sort(function (t, o) {
|
|
39169
|
+
return t.z - o.z;
|
|
39170
|
+
});
|
|
39171
|
+
for (var _iterator = _createForOfIteratorHelperLoose$c(n), _step; !(_step = _iterator()).done;) {
|
|
39172
|
+
var _t$a;
|
|
39173
|
+
var t = _step.value;
|
|
39174
|
+
var o = (_t$a = t.a) != null ? _t$a : 1;
|
|
39175
|
+
if (o < 0.02) continue;
|
|
39176
|
+
var c = Math.min(1, Math.max(0, t.white)),
|
|
39177
|
+
a = Math.round((s ? 1 - c : c) * 255);
|
|
39178
|
+
e.fillStyle = "rgba(" + a + "," + a + "," + a + "," + o + ")", e.beginPath(), e.arc(t.x, t.y, Math.max(r, t.r), 0, Math.PI * 2), e.fill();
|
|
39179
|
+
}
|
|
39180
|
+
}
|
|
39181
|
+
function $(e, n) {
|
|
39182
|
+
return Math.pow(e / 300, n);
|
|
39183
|
+
}
|
|
39184
|
+
function et(e, n, s, r) {
|
|
39185
|
+
var t = 2 * n * s + r,
|
|
39186
|
+
o = e % t,
|
|
39187
|
+
c = new Array(n).fill(0);
|
|
39188
|
+
var a = -1;
|
|
39189
|
+
if (o < 2 * n * s) {
|
|
39190
|
+
var i = Math.floor(o / s),
|
|
39191
|
+
m = (o - i * s) / s,
|
|
39192
|
+
M = 1 - Math.pow(1 - Math.min(1, m / 0.7), 3);
|
|
39193
|
+
if (i < n) {
|
|
39194
|
+
for (var u = 0; u < i; u++) c[u] = 1;
|
|
39195
|
+
c[i] = M, a = i;
|
|
39196
|
+
} else {
|
|
39197
|
+
var _u = 2 * n - 1 - i;
|
|
39198
|
+
for (var h = 0; h < _u; h++) c[h] = 1;
|
|
39199
|
+
c[_u] = 1 - M, a = _u;
|
|
39200
|
+
}
|
|
39201
|
+
}
|
|
39202
|
+
return {
|
|
39203
|
+
amount: c,
|
|
39204
|
+
active: a
|
|
39205
|
+
};
|
|
39206
|
+
}
|
|
39207
|
+
function ct(e, n, s) {
|
|
39208
|
+
var _e = _slicedToArray(e, 3),
|
|
39209
|
+
r = _e[0],
|
|
39210
|
+
t = _e[1],
|
|
39211
|
+
o = _e[2],
|
|
39212
|
+
c = false;
|
|
39213
|
+
for (var a = 0; a < n.length; a++) {
|
|
39214
|
+
if (s.amount[a] <= 0) continue;
|
|
39215
|
+
var i = n[a],
|
|
39216
|
+
m = i.axis === 0 ? r : i.axis === 1 ? t : o;
|
|
39217
|
+
if (m < i.lo || m >= i.hi) continue;
|
|
39218
|
+
a === s.active && (c = true);
|
|
39219
|
+
var g = i.ang * s.amount[a],
|
|
39220
|
+
M = Math.cos(g),
|
|
39221
|
+
u = Math.sin(g);
|
|
39222
|
+
if (i.axis === 0) {
|
|
39223
|
+
var h = t * M - o * u;
|
|
39224
|
+
o = t * u + o * M, t = h;
|
|
39225
|
+
} else if (i.axis === 1) {
|
|
39226
|
+
var _h = r * M + o * u;
|
|
39227
|
+
o = -r * u + o * M, r = _h;
|
|
39228
|
+
} else {
|
|
39229
|
+
var _h2 = r * M - t * u;
|
|
39230
|
+
t = r * u + t * M, r = _h2;
|
|
39231
|
+
}
|
|
39232
|
+
}
|
|
39233
|
+
return [r, t, o, c];
|
|
39234
|
+
}
|
|
39235
|
+
function at(e) {
|
|
39236
|
+
var n = [];
|
|
39237
|
+
for (var s = 0; s < e; s++) {
|
|
39238
|
+
var r = Math.min(2, Math.floor(F(s, 2.3) * 3)),
|
|
39239
|
+
t = -1 + 0.5 * Math.min(3, Math.floor(F(s, 5.9) * 4)),
|
|
39240
|
+
o = F(s, 7.7) < 0.5 ? 1 : -1;
|
|
39241
|
+
n.push({
|
|
39242
|
+
axis: r,
|
|
39243
|
+
lo: t,
|
|
39244
|
+
hi: t + 0.5,
|
|
39245
|
+
ang: o * Math.PI / 2
|
|
39246
|
+
});
|
|
39247
|
+
}
|
|
39248
|
+
return n;
|
|
39249
|
+
}
|
|
39250
|
+
var rt = function rt(e, n, s, r, t) {
|
|
39251
|
+
var _t$scanMul, _t$rsPow, _t$dimBase, _t$latRings, _t$lonDensity;
|
|
39252
|
+
var c = n / 2,
|
|
39253
|
+
a = n / 2,
|
|
39254
|
+
i = n / 2 * 0.82,
|
|
39255
|
+
m = 0.4 + 0.06 * Math.sin(s * 0.35),
|
|
39256
|
+
g = q(s * 0.5, m, c, a, i),
|
|
39257
|
+
M = s * (0.5 + (1.7 - 0.5) * ((_t$scanMul = t.scanMul) != null ? _t$scanMul : 1)),
|
|
39258
|
+
u = $(n, (_t$rsPow = t.rsPow) != null ? _t$rsPow : 0.6),
|
|
39259
|
+
h = (_t$dimBase = t.dimBase) != null ? _t$dimBase : 1,
|
|
39260
|
+
b = [],
|
|
39261
|
+
x = (_t$latRings = t.latRings) != null ? _t$latRings : 17,
|
|
39262
|
+
I = (_t$lonDensity = t.lonDensity) != null ? _t$lonDensity : 44;
|
|
39263
|
+
for (var P = 0; P <= x; P++) {
|
|
39264
|
+
var y = -Math.PI / 2 + P / x * Math.PI,
|
|
39265
|
+
D = Math.cos(y),
|
|
39266
|
+
w = Math.sin(y),
|
|
39267
|
+
k = Math.max(1, Math.round(Math.abs(D) * I));
|
|
39268
|
+
for (var v = 0; v < k; v++) {
|
|
39269
|
+
var _t$rBase, _t$rDepth, _t$rBoost, _t$inkFar, _t$inkSpan;
|
|
39270
|
+
var R = v / k * 2 * Math.PI,
|
|
39271
|
+
_g = g(D * Math.cos(R), w, D * Math.sin(R)),
|
|
39272
|
+
_g2 = _slicedToArray(_g, 3),
|
|
39273
|
+
p = _g2[0],
|
|
39274
|
+
d = _g2[1],
|
|
39275
|
+
l = _g2[2],
|
|
39276
|
+
f = (l + 1) / 2,
|
|
39277
|
+
S = ot(R + s * 0.5, M),
|
|
39278
|
+
L = Math.exp(-(S * S) / 0.18) * Math.max(0, l);
|
|
39279
|
+
b.push({
|
|
39280
|
+
x: p,
|
|
39281
|
+
y: d,
|
|
39282
|
+
z: l,
|
|
39283
|
+
r: (((_t$rBase = t.rBase) != null ? _t$rBase : 0.6) + ((_t$rDepth = t.rDepth) != null ? _t$rDepth : 1.7) * f + ((_t$rBoost = t.rBoost) != null ? _t$rBoost : 1) * L) * u,
|
|
39284
|
+
white: ((_t$inkFar = t.inkFar) != null ? _t$inkFar : 0.62) - ((_t$inkSpan = t.inkSpan) != null ? _t$inkSpan : 0.54) * f,
|
|
39285
|
+
// dimBase < 1 fades un-scanned dots so the meridian reads clearly
|
|
39286
|
+
a: h + (1 - h) * Math.min(1, L)
|
|
39287
|
+
});
|
|
39288
|
+
}
|
|
39289
|
+
}
|
|
39290
|
+
_(e, b, r, t.rMin);
|
|
39291
|
+
},
|
|
39292
|
+
it = function it(e, n, s, r, t) {
|
|
39293
|
+
var _t$rsPow2, _t$moveCount, _t$latRings2, _t$lonDensity2;
|
|
39294
|
+
var o = n / 2,
|
|
39295
|
+
c = n / 2,
|
|
39296
|
+
a = n / 2 * 0.82,
|
|
39297
|
+
i = q(s * 0.55, 0.35 + 0.1 * Math.sin(s * 0.9), o, c, a),
|
|
39298
|
+
m = $(n, (_t$rsPow2 = t.rsPow) != null ? _t$rsPow2 : 0.6),
|
|
39299
|
+
g = (_t$moveCount = t.moveCount) != null ? _t$moveCount : 14,
|
|
39300
|
+
M = at(g),
|
|
39301
|
+
u = et(s, g, 0.42, 1.2),
|
|
39302
|
+
h = [],
|
|
39303
|
+
b = (_t$latRings2 = t.latRings) != null ? _t$latRings2 : 15,
|
|
39304
|
+
x = (_t$lonDensity2 = t.lonDensity) != null ? _t$lonDensity2 : 40;
|
|
39305
|
+
for (var I = 0; I <= b; I++) {
|
|
39306
|
+
var P = -Math.PI / 2 + I / b * Math.PI,
|
|
39307
|
+
y = Math.cos(P),
|
|
39308
|
+
D = Math.sin(P),
|
|
39309
|
+
w = Math.max(1, Math.round(Math.abs(y) * x));
|
|
39310
|
+
for (var k = 0; k < w; k++) {
|
|
39311
|
+
var _t$rBase2, _t$rDepth2, _t$rActive, _t$inkFar2, _t$inkSpan2;
|
|
39312
|
+
var v = k / w * 2 * Math.PI,
|
|
39313
|
+
_ct = ct([y * Math.cos(v), D, y * Math.sin(v)], M, u),
|
|
39314
|
+
_ct2 = _slicedToArray(_ct, 4),
|
|
39315
|
+
R = _ct2[0],
|
|
39316
|
+
p = _ct2[1],
|
|
39317
|
+
d = _ct2[2],
|
|
39318
|
+
l = _ct2[3],
|
|
39319
|
+
_i = i(R, p, d),
|
|
39320
|
+
_i2 = _slicedToArray(_i, 3),
|
|
39321
|
+
f = _i2[0],
|
|
39322
|
+
S = _i2[1],
|
|
39323
|
+
L = _i2[2],
|
|
39324
|
+
A = (L + 1) / 2;
|
|
39325
|
+
h.push({
|
|
39326
|
+
x: f,
|
|
39327
|
+
y: S,
|
|
39328
|
+
z: L,
|
|
39329
|
+
r: (((_t$rBase2 = t.rBase) != null ? _t$rBase2 : 0.6) + ((_t$rDepth2 = t.rDepth) != null ? _t$rDepth2 : 1.7) * A + (l ? (_t$rActive = t.rActive) != null ? _t$rActive : 0.3 : 0)) * m,
|
|
39330
|
+
white: ((_t$inkFar2 = t.inkFar) != null ? _t$inkFar2 : 0.62) - ((_t$inkSpan2 = t.inkSpan) != null ? _t$inkSpan2 : 0.54) * A - (l ? 0.14 : 0)
|
|
39331
|
+
});
|
|
39332
|
+
}
|
|
39333
|
+
}
|
|
39334
|
+
_(e, h, r, t.rMin);
|
|
39335
|
+
},
|
|
39336
|
+
ht = function ht(e, n, s, r, t) {
|
|
39337
|
+
var _t$rsPow3, _t$rings, _t$lonDensity3;
|
|
39338
|
+
var o = n / 2,
|
|
39339
|
+
c = n / 2,
|
|
39340
|
+
a = n / 2 * 0.874,
|
|
39341
|
+
i = q(s * 0.18, 0.38, o, c, 1),
|
|
39342
|
+
m = $(n, (_t$rsPow3 = t.rsPow) != null ? _t$rsPow3 : 0.6),
|
|
39343
|
+
g = [],
|
|
39344
|
+
M = (_t$rings = t.rings) != null ? _t$rings : 15,
|
|
39345
|
+
u = (_t$lonDensity3 = t.lonDensity) != null ? _t$lonDensity3 : 40;
|
|
39346
|
+
for (var h = 0; h <= M; h++) {
|
|
39347
|
+
var b = -Math.PI / 2 + h / M * Math.PI,
|
|
39348
|
+
x = Math.cos(b),
|
|
39349
|
+
I = Math.sin(b),
|
|
39350
|
+
P = 0.62 * Math.sin(s * 2.1 - h * 0.52) + 0.38 * Math.sin(s * 1.27 + h * 0.83),
|
|
39351
|
+
y = a * (0.88 + 0.105 * P),
|
|
39352
|
+
D = Math.max(1, Math.round(Math.abs(x) * u));
|
|
39353
|
+
for (var w = 0; w < D; w++) {
|
|
39354
|
+
var _t$rBase3, _t$rDepth3;
|
|
39355
|
+
var k = w / D * 2 * Math.PI,
|
|
39356
|
+
_i3 = i(x * Math.cos(k) * y, I * y, x * Math.sin(k) * y),
|
|
39357
|
+
_i4 = _slicedToArray(_i3, 3),
|
|
39358
|
+
v = _i4[0],
|
|
39359
|
+
R = _i4[1],
|
|
39360
|
+
p = _i4[2],
|
|
39361
|
+
d = (p / a + 1) / 2,
|
|
39362
|
+
l = Math.max(0, P);
|
|
39363
|
+
g.push({
|
|
39364
|
+
x: v,
|
|
39365
|
+
y: R,
|
|
39366
|
+
z: p,
|
|
39367
|
+
r: (((_t$rBase3 = t.rBase) != null ? _t$rBase3 : 0.6) + ((_t$rDepth3 = t.rDepth) != null ? _t$rDepth3 : 1.7) * d) * (1 + 0.4 * l) * m,
|
|
39368
|
+
white: 0.66 - 0.56 * d - 0.1 * l
|
|
39369
|
+
});
|
|
39370
|
+
}
|
|
39371
|
+
}
|
|
39372
|
+
_(e, g, r, t.rMin);
|
|
39373
|
+
};
|
|
39374
|
+
function lt(e) {
|
|
39375
|
+
return e * e * (3 - 2 * e);
|
|
39376
|
+
}
|
|
39377
|
+
function Q(e) {
|
|
39378
|
+
var n = e.length,
|
|
39379
|
+
s = [];
|
|
39380
|
+
var r = 0;
|
|
39381
|
+
for (var t = 0; t < n; t++) {
|
|
39382
|
+
var o = e[t],
|
|
39383
|
+
c = e[(t + 1) % n],
|
|
39384
|
+
a = Math.hypot(c[0] - o[0], c[1] - o[1]);
|
|
39385
|
+
s.push(a), r += a;
|
|
39386
|
+
}
|
|
39387
|
+
return function (t) {
|
|
39388
|
+
var o = t * r,
|
|
39389
|
+
c = 0;
|
|
39390
|
+
for (; o > s[c] && c < n - 1;) o -= s[c], c++;
|
|
39391
|
+
var a = e[c],
|
|
39392
|
+
i = e[(c + 1) % n],
|
|
39393
|
+
m = s[c] ? Math.min(1, o / s[c]) : 0;
|
|
39394
|
+
return [a[0] + (i[0] - a[0]) * m, a[1] + (i[1] - a[1]) * m];
|
|
39395
|
+
};
|
|
39396
|
+
}
|
|
39397
|
+
var ut = function ut(e) {
|
|
39398
|
+
var n = -Math.PI / 2 + e * 2 * Math.PI;
|
|
39399
|
+
return [Math.cos(n) * 0.24, Math.sin(n) * 0.24];
|
|
39400
|
+
},
|
|
39401
|
+
Mt = Q([[0, -0.26], [0.24, 0.16], [-0.24, 0.16]]),
|
|
39402
|
+
pt = Q([[0, -0.2], [0.2, -0.2], [0.2, 0.2], [-0.2, 0.2], [-0.2, -0.2]]),
|
|
39403
|
+
Y = [ut, Mt, pt];
|
|
39404
|
+
function dt(e) {
|
|
39405
|
+
return Math.max(6, Math.round(34 * e));
|
|
39406
|
+
}
|
|
39407
|
+
var U = 1.4,
|
|
39408
|
+
J = 0.9,
|
|
39409
|
+
K = U + J,
|
|
39410
|
+
ft = function ft(e, n, s, r, t) {
|
|
39411
|
+
var _t$spread, _t$iconD, _t$rDot;
|
|
39412
|
+
var o = Y.length,
|
|
39413
|
+
c = s % (K * o),
|
|
39414
|
+
a = Math.floor(c / K),
|
|
39415
|
+
i = c - a * K,
|
|
39416
|
+
m = i > U ? lt((i - U) / J) : 0,
|
|
39417
|
+
g = (_t$spread = t.spread) != null ? _t$spread : 1,
|
|
39418
|
+
M = Y[a],
|
|
39419
|
+
u = Y[(a + 1) % o],
|
|
39420
|
+
h = 160,
|
|
39421
|
+
b = [];
|
|
39422
|
+
for (var p = 0; p < h; p++) {
|
|
39423
|
+
var d = p / h,
|
|
39424
|
+
l = M(d),
|
|
39425
|
+
f = u(d);
|
|
39426
|
+
b.push([(l[0] + (f[0] - l[0]) * m) * g, (l[1] + (f[1] - l[1]) * m) * g]);
|
|
39427
|
+
}
|
|
39428
|
+
var x = [];
|
|
39429
|
+
var I = 0;
|
|
39430
|
+
for (var _p = 0; _p < h; _p++) {
|
|
39431
|
+
var _d = b[_p],
|
|
39432
|
+
_l = b[(_p + 1) % h],
|
|
39433
|
+
_f = Math.hypot(_l[0] - _d[0], _l[1] - _d[1]);
|
|
39434
|
+
x.push(_f), I += _f;
|
|
39435
|
+
}
|
|
39436
|
+
var P = dt((_t$iconD = t.iconD) != null ? _t$iconD : 1),
|
|
39437
|
+
y = ((_t$rDot = t.rDot) != null ? _t$rDot : 0.021) * 1.35 * g,
|
|
39438
|
+
D = 1 + 0.02 * Math.sin(i * 3.1),
|
|
39439
|
+
w = [],
|
|
39440
|
+
k = n / 2;
|
|
39441
|
+
var v = 0,
|
|
39442
|
+
R = 0;
|
|
39443
|
+
for (var _p2 = 0; _p2 < P; _p2++) {
|
|
39444
|
+
var _d2 = _p2 / P * I;
|
|
39445
|
+
for (; R + x[v] < _d2 && v < h - 1;) R += x[v], v++;
|
|
39446
|
+
var _l2 = b[v],
|
|
39447
|
+
_f2 = b[(v + 1) % h],
|
|
39448
|
+
S = x[v] ? Math.min(1, (_d2 - R) / x[v]) : 0,
|
|
39449
|
+
L = (_l2[0] + (_f2[0] - _l2[0]) * S) * D,
|
|
39450
|
+
A = (_l2[1] + (_f2[1] - _l2[1]) * S) * D;
|
|
39451
|
+
w.push({
|
|
39452
|
+
x: k + L * n,
|
|
39453
|
+
y: k + A * n,
|
|
39454
|
+
z: 0,
|
|
39455
|
+
r: Math.max(0.35, y * n),
|
|
39456
|
+
white: 0.1
|
|
39457
|
+
});
|
|
39458
|
+
}
|
|
39459
|
+
_(e, w, r, t.rMin);
|
|
39460
|
+
},
|
|
39461
|
+
mt = function mt(e, n, s, r, t) {
|
|
39462
|
+
var _t$rsPow4, _t$orbitN, _t$ghostN, _t$particles;
|
|
39463
|
+
var o = n / 2,
|
|
39464
|
+
c = n / 2,
|
|
39465
|
+
a = n / 2 * 0.82,
|
|
39466
|
+
i = q(s * 0.12, 0.3, o, c, 1),
|
|
39467
|
+
m = $(n, (_t$rsPow4 = t.rsPow) != null ? _t$rsPow4 : 0.6),
|
|
39468
|
+
g = [],
|
|
39469
|
+
M = (_t$orbitN = t.orbitN) != null ? _t$orbitN : 12,
|
|
39470
|
+
u = (_t$ghostN = t.ghostN) != null ? _t$ghostN : 40,
|
|
39471
|
+
h = (_t$particles = t.particles) != null ? _t$particles : 3;
|
|
39472
|
+
for (var b = 0; b < M; b++) {
|
|
39473
|
+
var x = F(b, 1.7),
|
|
39474
|
+
I = F(b, 5.2),
|
|
39475
|
+
P = F(b, 8.9),
|
|
39476
|
+
y = a * (0.45 + 0.52 * x),
|
|
39477
|
+
D = x * 2 * Math.PI,
|
|
39478
|
+
w = Math.acos(2 * I - 1),
|
|
39479
|
+
k = Math.sin(w) * Math.cos(D),
|
|
39480
|
+
v = Math.cos(w),
|
|
39481
|
+
R = Math.sin(w) * Math.sin(D);
|
|
39482
|
+
var p = -v,
|
|
39483
|
+
d = k;
|
|
39484
|
+
var l = 0,
|
|
39485
|
+
f = Math.max(1e-6, Math.sqrt(p * p + d * d));
|
|
39486
|
+
p /= f, d /= f;
|
|
39487
|
+
var S = v * l - R * d,
|
|
39488
|
+
L = R * p - k * l,
|
|
39489
|
+
A = k * d - v * p,
|
|
39490
|
+
B = (0.25 + 0.55 * P) * (P > 0.5 ? 1 : -1);
|
|
39491
|
+
for (var C = 0; C < u; C++) {
|
|
39492
|
+
var _t$ghostR, _t$ghostA;
|
|
39493
|
+
var E = C / u * 2 * Math.PI,
|
|
39494
|
+
_i5 = i((p * Math.cos(E) + S * Math.sin(E)) * y, (d * Math.cos(E) + L * Math.sin(E)) * y, (l * Math.cos(E) + A * Math.sin(E)) * y),
|
|
39495
|
+
_i6 = _slicedToArray(_i5, 3),
|
|
39496
|
+
T = _i6[0],
|
|
39497
|
+
z = _i6[1],
|
|
39498
|
+
N = _i6[2],
|
|
39499
|
+
O = (N / y + 1) / 2;
|
|
39500
|
+
g.push({
|
|
39501
|
+
x: T,
|
|
39502
|
+
y: z,
|
|
39503
|
+
z: N,
|
|
39504
|
+
r: ((_t$ghostR = t.ghostR) != null ? _t$ghostR : 0.9) * m,
|
|
39505
|
+
white: 0.72,
|
|
39506
|
+
a: ((_t$ghostA = t.ghostA) != null ? _t$ghostA : 0.5) * (0.4 + 0.6 * O)
|
|
39507
|
+
});
|
|
39508
|
+
}
|
|
39509
|
+
for (var _C = 0; _C < h; _C++) {
|
|
39510
|
+
var _t$partR, _t$partRDepth;
|
|
39511
|
+
var _E = s * B + _C / h * 2 * Math.PI + I * 6,
|
|
39512
|
+
_i7 = i((p * Math.cos(_E) + S * Math.sin(_E)) * y, (d * Math.cos(_E) + L * Math.sin(_E)) * y, (l * Math.cos(_E) + A * Math.sin(_E)) * y),
|
|
39513
|
+
_i8 = _slicedToArray(_i7, 3),
|
|
39514
|
+
_T = _i8[0],
|
|
39515
|
+
_z = _i8[1],
|
|
39516
|
+
_N = _i8[2],
|
|
39517
|
+
_O = (_N / y + 1) / 2;
|
|
39518
|
+
g.push({
|
|
39519
|
+
x: _T,
|
|
39520
|
+
y: _z,
|
|
39521
|
+
z: _N,
|
|
39522
|
+
r: (((_t$partR = t.partR) != null ? _t$partR : 1.2) + ((_t$partRDepth = t.partRDepth) != null ? _t$partRDepth : 1.6) * _O) * m,
|
|
39523
|
+
white: 0.3 - 0.22 * _O
|
|
39524
|
+
});
|
|
39525
|
+
}
|
|
39526
|
+
}
|
|
39527
|
+
_(e, g, r, t.rMin);
|
|
39528
|
+
},
|
|
39529
|
+
gt = function gt(e, n, s, r, t) {
|
|
39530
|
+
var _t$spin, _t$rsPow5, _t$ghostN2, _t$lanes, _t$segs, _t$bandMul;
|
|
39531
|
+
var o = n / 2,
|
|
39532
|
+
c = n / 2,
|
|
39533
|
+
a = n / 2 * 0.78,
|
|
39534
|
+
i = (_t$spin = t.spin) != null ? _t$spin : 1,
|
|
39535
|
+
m = q(s * 0.1 * i, 0.3, o, c, 1),
|
|
39536
|
+
g = $(n, (_t$rsPow5 = t.rsPow) != null ? _t$rsPow5 : 0.6),
|
|
39537
|
+
M = [],
|
|
39538
|
+
u = (_t$ghostN2 = t.ghostN) != null ? _t$ghostN2 : 150;
|
|
39539
|
+
for (var f = 0; f < u; f++) {
|
|
39540
|
+
var S = st(f, u),
|
|
39541
|
+
_m = m(S[0] * a, S[1] * a, S[2] * a),
|
|
39542
|
+
_m2 = _slicedToArray(_m, 3),
|
|
39543
|
+
L = _m2[0],
|
|
39544
|
+
A = _m2[1],
|
|
39545
|
+
B = _m2[2],
|
|
39546
|
+
C = (B / a + 1) / 2;
|
|
39547
|
+
M.push({
|
|
39548
|
+
x: L,
|
|
39549
|
+
y: A,
|
|
39550
|
+
z: B,
|
|
39551
|
+
r: 0.8 * g,
|
|
39552
|
+
white: 0.78,
|
|
39553
|
+
a: 0.1 + 0.22 * C
|
|
39554
|
+
});
|
|
39555
|
+
}
|
|
39556
|
+
var h = s * 0.24 * i,
|
|
39557
|
+
b = 0.55 + 0.3 * Math.sin(s * 0.18) * i,
|
|
39558
|
+
x = Math.cos(h),
|
|
39559
|
+
I = 0,
|
|
39560
|
+
P = Math.sin(h),
|
|
39561
|
+
y = -P * Math.sin(b),
|
|
39562
|
+
D = Math.cos(b),
|
|
39563
|
+
w = x * Math.sin(b),
|
|
39564
|
+
k = I * w - P * D,
|
|
39565
|
+
v = P * y - x * w,
|
|
39566
|
+
R = x * D - I * y,
|
|
39567
|
+
p = (_t$lanes = t.lanes) != null ? _t$lanes : 5,
|
|
39568
|
+
d = (_t$segs = t.segs) != null ? _t$segs : 88,
|
|
39569
|
+
l = Math.max(1, Math.round(p * ((_t$bandMul = t.bandMul) != null ? _t$bandMul : 1)));
|
|
39570
|
+
for (var _f3 = 0; _f3 < l; _f3++) {
|
|
39571
|
+
var _S = (_f3 - (l - 1) / 2) * 0.075,
|
|
39572
|
+
_L = Math.abs(_f3 - (l - 1) / 2) / Math.max(1, (l - 1) / 2);
|
|
39573
|
+
for (var _A = 0; _A < d; _A++) {
|
|
39574
|
+
var _t$wobMul, _t$rBase4, _t$rDepth4;
|
|
39575
|
+
var _B = _A / d * 2 * Math.PI,
|
|
39576
|
+
_C2 = (0.16 * Math.sin(_B * 3 - s * 1.7 + _f3 * 0.22) + 0.07 * Math.sin(_B * 5 + s * 1.1)) * ((_t$wobMul = t.wobMul) != null ? _t$wobMul : 1),
|
|
39577
|
+
E = _S + _C2,
|
|
39578
|
+
T = x * Math.cos(_B) + y * Math.sin(_B) + k * E,
|
|
39579
|
+
z = I * Math.cos(_B) + D * Math.sin(_B) + v * E,
|
|
39580
|
+
N = P * Math.cos(_B) + w * Math.sin(_B) + R * E,
|
|
39581
|
+
O = Math.sqrt(T * T + z * z + N * N),
|
|
39582
|
+
_m3 = m(T / O * a, z / O * a, N / O * a),
|
|
39583
|
+
_m4 = _slicedToArray(_m3, 3),
|
|
39584
|
+
X = _m4[0],
|
|
39585
|
+
Z = _m4[1],
|
|
39586
|
+
W = _m4[2],
|
|
39587
|
+
j = (W / a + 1) / 2;
|
|
39588
|
+
M.push({
|
|
39589
|
+
x: X,
|
|
39590
|
+
y: Z,
|
|
39591
|
+
z: W,
|
|
39592
|
+
r: (((_t$rBase4 = t.rBase) != null ? _t$rBase4 : 1.1) + ((_t$rDepth4 = t.rDepth) != null ? _t$rDepth4 : 1.7) * j) * (1 - 0.25 * _L) * g,
|
|
39593
|
+
white: 0.52 - 0.44 * j + 0.18 * _L,
|
|
39594
|
+
a: 0.4 + 0.6 * j
|
|
39595
|
+
});
|
|
39596
|
+
}
|
|
39597
|
+
}
|
|
39598
|
+
_(e, M, r, t.rMin);
|
|
39599
|
+
},
|
|
39600
|
+
bt = {
|
|
39601
|
+
orbits: mt,
|
|
39602
|
+
globe: rt,
|
|
39603
|
+
rubik: it,
|
|
39604
|
+
wave: ht,
|
|
39605
|
+
ribbon: gt,
|
|
39606
|
+
morph: ft
|
|
39607
|
+
},
|
|
39608
|
+
yt = [["latRings", "lonDensity"], ["rings", "lonDensity"], ["lanes", "segs"]],
|
|
39609
|
+
xt = ["orbitN", "ghostN"],
|
|
39610
|
+
vt = ["iconD"],
|
|
39611
|
+
wt = ["rBase", "rDepth", "rActive", "rDot", "ghostR", "partR", "partRDepth"];
|
|
39612
|
+
function kt(e, n) {
|
|
39613
|
+
var s = _extends({}, e),
|
|
39614
|
+
r = /* @__PURE__ */new Set(),
|
|
39615
|
+
t = Math.sqrt(n);
|
|
39616
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$c(yt), _step2; !(_step2 = _iterator2()).done;) {
|
|
39617
|
+
var _step2$value = _slicedToArray(_step2.value, 2),
|
|
39618
|
+
o = _step2$value[0],
|
|
39619
|
+
c = _step2$value[1];
|
|
39620
|
+
var a = s[o],
|
|
39621
|
+
i = s[c];
|
|
39622
|
+
a != null && i != null && !r.has(o) && !r.has(c) && (s[o] = Math.max(2, Math.round(a * t)), s[c] = Math.max(2, Math.round(i * t)), r.add(o), r.add(c));
|
|
39623
|
+
}
|
|
39624
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$c(xt), _step3; !(_step3 = _iterator3()).done;) {
|
|
39625
|
+
var _o = _step3.value;
|
|
39626
|
+
var _c = s[_o];
|
|
39627
|
+
_c != null && !r.has(_o) && (s[_o] = Math.max(1, Math.round(_c * n)));
|
|
39628
|
+
}
|
|
39629
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$c(vt), _step4; !(_step4 = _iterator4()).done;) {
|
|
39630
|
+
var _o2 = _step4.value;
|
|
39631
|
+
var _c2 = s[_o2];
|
|
39632
|
+
_c2 != null && (s[_o2] = Math.max(0.02, _c2 * n));
|
|
39633
|
+
}
|
|
39634
|
+
return s;
|
|
39635
|
+
}
|
|
39636
|
+
function Pt(e, n) {
|
|
39637
|
+
var _s$rSizeMul;
|
|
39638
|
+
var s = _extends({}, e);
|
|
39639
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$c(wt), _step5; !(_step5 = _iterator5()).done;) {
|
|
39640
|
+
var r = _step5.value;
|
|
39641
|
+
var t = s[r];
|
|
39642
|
+
t != null && (s[r] = t * n);
|
|
39643
|
+
}
|
|
39644
|
+
return s.rSizeMul = ((_s$rSizeMul = s.rSizeMul) != null ? _s$rSizeMul : 1) * n, s;
|
|
39645
|
+
}
|
|
39646
|
+
var Dt = {
|
|
39647
|
+
globe: {
|
|
39648
|
+
latRings: 17,
|
|
39649
|
+
lonDensity: 44,
|
|
39650
|
+
rBase: 0.6,
|
|
39651
|
+
rDepth: 1.7,
|
|
39652
|
+
rBoost: 1,
|
|
39653
|
+
inkFar: 0.62,
|
|
39654
|
+
inkSpan: 0.54,
|
|
39655
|
+
rsPow: 0.6,
|
|
39656
|
+
rMin: 0.3
|
|
39657
|
+
},
|
|
39658
|
+
orbits: {
|
|
39659
|
+
orbitN: 12,
|
|
39660
|
+
ghostN: 40,
|
|
39661
|
+
ghostR: 0.9,
|
|
39662
|
+
ghostA: 0.5,
|
|
39663
|
+
particles: 3,
|
|
39664
|
+
partR: 1.2,
|
|
39665
|
+
partRDepth: 1.6,
|
|
39666
|
+
rsPow: 0.6,
|
|
39667
|
+
rMin: 0.3
|
|
39668
|
+
},
|
|
39669
|
+
rubik: {
|
|
39670
|
+
latRings: 15,
|
|
39671
|
+
lonDensity: 40,
|
|
39672
|
+
moveCount: 14,
|
|
39673
|
+
rBase: 0.6,
|
|
39674
|
+
rDepth: 1.7,
|
|
39675
|
+
rActive: 0.3,
|
|
39676
|
+
inkFar: 0.62,
|
|
39677
|
+
inkSpan: 0.54,
|
|
39678
|
+
rsPow: 0.6,
|
|
39679
|
+
rMin: 0.3
|
|
39680
|
+
},
|
|
39681
|
+
wave: {
|
|
39682
|
+
rings: 15,
|
|
39683
|
+
lonDensity: 40,
|
|
39684
|
+
rBase: 0.6,
|
|
39685
|
+
rDepth: 1.7,
|
|
39686
|
+
rsPow: 0.6,
|
|
39687
|
+
rMin: 0.3
|
|
39688
|
+
},
|
|
39689
|
+
ribbon: {
|
|
39690
|
+
lanes: 5,
|
|
39691
|
+
segs: 88,
|
|
39692
|
+
ghostN: 150,
|
|
39693
|
+
rBase: 1.1,
|
|
39694
|
+
rDepth: 1.7,
|
|
39695
|
+
rsPow: 0.6,
|
|
39696
|
+
rMin: 0.3
|
|
39697
|
+
},
|
|
39698
|
+
morph: {
|
|
39699
|
+
rDot: 0.021,
|
|
39700
|
+
iconD: 1,
|
|
39701
|
+
rMin: 0.25
|
|
39702
|
+
}
|
|
39703
|
+
},
|
|
39704
|
+
Rt = {
|
|
39705
|
+
working: "orbits",
|
|
39706
|
+
searching: "globe",
|
|
39707
|
+
solving: "rubik",
|
|
39708
|
+
listening: "wave",
|
|
39709
|
+
composing: "ribbon",
|
|
39710
|
+
shaping: "morph"
|
|
39711
|
+
},
|
|
39712
|
+
St = {
|
|
39713
|
+
orbits: {
|
|
39714
|
+
64: {
|
|
39715
|
+
speed: 1.885,
|
|
39716
|
+
count: 1,
|
|
39717
|
+
size: 1
|
|
39718
|
+
},
|
|
39719
|
+
20: {
|
|
39720
|
+
speed: 3.9,
|
|
39721
|
+
count: 0.238,
|
|
39722
|
+
size: 2.4
|
|
39723
|
+
}
|
|
39724
|
+
},
|
|
39725
|
+
globe: {
|
|
39726
|
+
64: {
|
|
39727
|
+
speed: 2.015,
|
|
39728
|
+
count: 0.42,
|
|
39729
|
+
size: 1.15,
|
|
39730
|
+
extra: {
|
|
39731
|
+
scanMul: 4.08,
|
|
39732
|
+
dimBase: 0.45
|
|
39733
|
+
}
|
|
39734
|
+
},
|
|
39735
|
+
20: {
|
|
39736
|
+
speed: 2.665,
|
|
39737
|
+
count: 0.105,
|
|
39738
|
+
size: 1.75,
|
|
39739
|
+
extra: {
|
|
39740
|
+
scanMul: 4.335,
|
|
39741
|
+
dimBase: 0.45
|
|
39742
|
+
}
|
|
39743
|
+
}
|
|
39744
|
+
},
|
|
39745
|
+
rubik: {
|
|
39746
|
+
64: {
|
|
39747
|
+
speed: 1.82,
|
|
39748
|
+
count: 0.35,
|
|
39749
|
+
size: 1.05
|
|
39750
|
+
},
|
|
39751
|
+
20: {
|
|
39752
|
+
speed: 1.95,
|
|
39753
|
+
count: 0.088,
|
|
39754
|
+
size: 1.9
|
|
39755
|
+
}
|
|
39756
|
+
},
|
|
39757
|
+
wave: {
|
|
39758
|
+
64: {
|
|
39759
|
+
speed: 4.388,
|
|
39760
|
+
count: 0.341,
|
|
39761
|
+
size: 1
|
|
39762
|
+
},
|
|
39763
|
+
20: {
|
|
39764
|
+
speed: 3.998,
|
|
39765
|
+
count: 0.105,
|
|
39766
|
+
size: 1.6
|
|
39767
|
+
}
|
|
39768
|
+
},
|
|
39769
|
+
ribbon: {
|
|
39770
|
+
64: {
|
|
39771
|
+
speed: 2.34,
|
|
39772
|
+
count: 0.25,
|
|
39773
|
+
size: 0.85,
|
|
39774
|
+
extra: {
|
|
39775
|
+
spin: 0,
|
|
39776
|
+
bandMul: 3.9,
|
|
39777
|
+
wobMul: 1
|
|
39778
|
+
}
|
|
39779
|
+
},
|
|
39780
|
+
20: {
|
|
39781
|
+
speed: 3.12,
|
|
39782
|
+
count: 0.051,
|
|
39783
|
+
size: 1.073,
|
|
39784
|
+
extra: {
|
|
39785
|
+
spin: 0,
|
|
39786
|
+
bandMul: 4.94,
|
|
39787
|
+
wobMul: 1
|
|
39788
|
+
}
|
|
39789
|
+
}
|
|
39790
|
+
},
|
|
39791
|
+
morph: {
|
|
39792
|
+
64: {
|
|
39793
|
+
speed: 2.405,
|
|
39794
|
+
count: 0.54,
|
|
39795
|
+
size: 0.395,
|
|
39796
|
+
extra: {
|
|
39797
|
+
spread: 1.45
|
|
39798
|
+
}
|
|
39799
|
+
},
|
|
39800
|
+
20: {
|
|
39801
|
+
speed: 2.08,
|
|
39802
|
+
count: 0.53,
|
|
39803
|
+
size: 1.011,
|
|
39804
|
+
extra: {
|
|
39805
|
+
spread: 1.45
|
|
39806
|
+
}
|
|
39807
|
+
}
|
|
39808
|
+
}
|
|
39809
|
+
},
|
|
39810
|
+
H = /* @__PURE__ */new Map();
|
|
39811
|
+
function It(e, n) {
|
|
39812
|
+
var s = e + "-" + n,
|
|
39813
|
+
r = H.get(s);
|
|
39814
|
+
if (r) return r;
|
|
39815
|
+
var t = Rt[e],
|
|
39816
|
+
o = St[t][n];
|
|
39817
|
+
var c = _extends({}, Dt[t]);
|
|
39818
|
+
o.count !== 1 && (c = kt(c, o.count)), o.size !== 1 && (c = Pt(c, o.size)), o.extra && (c = _extends({}, c, o.extra));
|
|
39819
|
+
var a = {
|
|
39820
|
+
mode: t,
|
|
39821
|
+
speed: o.speed,
|
|
39822
|
+
opts: c
|
|
39823
|
+
};
|
|
39824
|
+
return H.set(s, a), a;
|
|
39825
|
+
}
|
|
39826
|
+
function Et(e) {
|
|
39827
|
+
var n = e;
|
|
39828
|
+
for (; n;) {
|
|
39829
|
+
var s = n.getAttribute("data-theme");
|
|
39830
|
+
if (s === "dark") return true;
|
|
39831
|
+
if (s === "light") return false;
|
|
39832
|
+
if (n.classList.contains("dark")) return true;
|
|
39833
|
+
if (n.classList.contains("light")) return false;
|
|
39834
|
+
n = n.parentElement;
|
|
39835
|
+
}
|
|
39836
|
+
return null;
|
|
39837
|
+
}
|
|
39838
|
+
function Lt() {
|
|
39839
|
+
return typeof matchMedia > "u" || matchMedia("(prefers-color-scheme: dark)").matches;
|
|
39840
|
+
}
|
|
39841
|
+
function At(e, n) {
|
|
39842
|
+
var _V = useState(true),
|
|
39843
|
+
_V2 = _slicedToArray(_V, 2),
|
|
39844
|
+
s = _V2[0],
|
|
39845
|
+
r = _V2[1];
|
|
39846
|
+
return useEffect(function () {
|
|
39847
|
+
if (e === "dark") {
|
|
39848
|
+
r(true);
|
|
39849
|
+
return;
|
|
39850
|
+
}
|
|
39851
|
+
if (e === "light") {
|
|
39852
|
+
r(false);
|
|
39853
|
+
return;
|
|
39854
|
+
}
|
|
39855
|
+
var t = function t() {
|
|
39856
|
+
var i = Et(n.current);
|
|
39857
|
+
r(i != null ? i : Lt());
|
|
39858
|
+
};
|
|
39859
|
+
t();
|
|
39860
|
+
var o = typeof matchMedia < "u" ? matchMedia("(prefers-color-scheme: dark)") : null,
|
|
39861
|
+
c = function c() {
|
|
39862
|
+
return t();
|
|
39863
|
+
};
|
|
39864
|
+
o == null || o.addEventListener("change", c);
|
|
39865
|
+
var a = null;
|
|
39866
|
+
return typeof MutationObserver < "u" && n.current && (a = new MutationObserver(t), a.observe(document.documentElement, {
|
|
39867
|
+
attributes: true,
|
|
39868
|
+
attributeFilter: ["class", "data-theme"],
|
|
39869
|
+
subtree: true
|
|
39870
|
+
})), function () {
|
|
39871
|
+
o == null || o.removeEventListener("change", c), a == null || a.disconnect();
|
|
39872
|
+
};
|
|
39873
|
+
}, [e, n]), s;
|
|
39874
|
+
}
|
|
39875
|
+
function Bt() {
|
|
39876
|
+
var _V3 = useState(false),
|
|
39877
|
+
_V4 = _slicedToArray(_V3, 2),
|
|
39878
|
+
e = _V4[0],
|
|
39879
|
+
n = _V4[1];
|
|
39880
|
+
return useEffect(function () {
|
|
39881
|
+
if (typeof matchMedia > "u") return;
|
|
39882
|
+
var s = matchMedia("(prefers-reduced-motion: reduce)");
|
|
39883
|
+
n(s.matches);
|
|
39884
|
+
var r = function r(t) {
|
|
39885
|
+
return n(t.matches);
|
|
39886
|
+
};
|
|
39887
|
+
return s.addEventListener("change", r), function () {
|
|
39888
|
+
return s.removeEventListener("change", r);
|
|
39889
|
+
};
|
|
39890
|
+
}, []), e;
|
|
39891
|
+
}
|
|
39892
|
+
var Ct = {
|
|
39893
|
+
working: "Working…",
|
|
39894
|
+
searching: "Searching…",
|
|
39895
|
+
solving: "Solving…",
|
|
39896
|
+
listening: "Listening…",
|
|
39897
|
+
composing: "Composing…",
|
|
39898
|
+
shaping: "Shaping…"
|
|
39899
|
+
};
|
|
39900
|
+
function Tt(_ref) {
|
|
39901
|
+
var _ref$state = _ref.state,
|
|
39902
|
+
e = _ref$state === void 0 ? "working" : _ref$state,
|
|
39903
|
+
_ref$size = _ref.size,
|
|
39904
|
+
n = _ref$size === void 0 ? 64 : _ref$size,
|
|
39905
|
+
_ref$theme = _ref.theme,
|
|
39906
|
+
s = _ref$theme === void 0 ? "auto" : _ref$theme,
|
|
39907
|
+
_ref$speed = _ref.speed,
|
|
39908
|
+
r = _ref$speed === void 0 ? 1 : _ref$speed,
|
|
39909
|
+
_ref$paused = _ref.paused,
|
|
39910
|
+
t = _ref$paused === void 0 ? false : _ref$paused,
|
|
39911
|
+
o = _ref.style,
|
|
39912
|
+
c = _ref["aria-label"],
|
|
39913
|
+
a = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
39914
|
+
var i = useRef(null),
|
|
39915
|
+
m = At(s, i),
|
|
39916
|
+
g = Bt();
|
|
39917
|
+
return useEffect(function () {
|
|
39918
|
+
var M = i.current;
|
|
39919
|
+
if (!M) return;
|
|
39920
|
+
var u = Math.min(2, typeof devicePixelRatio < "u" && devicePixelRatio || 1);
|
|
39921
|
+
M.width = Math.round(n * u), M.height = Math.round(n * u);
|
|
39922
|
+
var h = M.getContext("2d");
|
|
39923
|
+
if (!h) return;
|
|
39924
|
+
var _It = It(e, n),
|
|
39925
|
+
b = _It.mode,
|
|
39926
|
+
x = _It.speed,
|
|
39927
|
+
I = _It.opts,
|
|
39928
|
+
P = bt[b],
|
|
39929
|
+
y = x * r,
|
|
39930
|
+
D = function D(S) {
|
|
39931
|
+
h.setTransform(u, 0, 0, u, 0, 0), h.clearRect(0, 0, n, n), P(h, n, S, m, I);
|
|
39932
|
+
};
|
|
39933
|
+
if (g) {
|
|
39934
|
+
D(0.6);
|
|
39935
|
+
return;
|
|
39936
|
+
}
|
|
39937
|
+
var w = 0,
|
|
39938
|
+
k = false;
|
|
39939
|
+
var _v = function v() {
|
|
39940
|
+
D(performance.now() / 1e3 * y), k && (w = requestAnimationFrame(_v));
|
|
39941
|
+
},
|
|
39942
|
+
R = function R() {
|
|
39943
|
+
k || t || (k = true, w = requestAnimationFrame(_v));
|
|
39944
|
+
},
|
|
39945
|
+
p = function p() {
|
|
39946
|
+
k = false, cancelAnimationFrame(w);
|
|
39947
|
+
};
|
|
39948
|
+
D(performance.now() / 1e3 * y);
|
|
39949
|
+
var d = true;
|
|
39950
|
+
var l = typeof IntersectionObserver < "u" ? new IntersectionObserver(function (_ref2) {
|
|
39951
|
+
var _ref3 = _slicedToArray(_ref2, 1),
|
|
39952
|
+
S = _ref3[0];
|
|
39953
|
+
d = S.isIntersecting, d && document.visibilityState !== "hidden" ? R() : p();
|
|
39954
|
+
}) : null;
|
|
39955
|
+
l == null || l.observe(M);
|
|
39956
|
+
var f = function f() {
|
|
39957
|
+
document.visibilityState === "hidden" ? p() : d && R();
|
|
39958
|
+
};
|
|
39959
|
+
return document.addEventListener("visibilitychange", f), l || R(), function () {
|
|
39960
|
+
p(), l == null || l.disconnect(), document.removeEventListener("visibilitychange", f);
|
|
39961
|
+
};
|
|
39962
|
+
}, [e, n, m, r, t, g]), /* @__PURE__ */jsx("canvas", _extends({
|
|
39963
|
+
ref: i,
|
|
39964
|
+
role: "img",
|
|
39965
|
+
"aria-label": c != null ? c : Ct[e],
|
|
39966
|
+
style: _extends({
|
|
39967
|
+
width: n,
|
|
39968
|
+
height: n,
|
|
39969
|
+
display: "block"
|
|
39970
|
+
}, o)
|
|
39971
|
+
}, a));
|
|
39972
|
+
}
|
|
39973
|
+
|
|
39046
39974
|
var _templateObject$2, _templateObject2$2;
|
|
39047
39975
|
function OrbStatusScreen(_ref) {
|
|
39048
39976
|
var state = _ref.state,
|
|
@@ -39051,7 +39979,7 @@ function OrbStatusScreen(_ref) {
|
|
|
39051
39979
|
loadingStage = _ref.loadingStage;
|
|
39052
39980
|
var theme = useTheme();
|
|
39053
39981
|
var label = accessibleLabel != null ? accessibleLabel : typeof text === 'string' ? text : undefined;
|
|
39054
|
-
var orb = jsx(
|
|
39982
|
+
var orb = jsx(Tt, {
|
|
39055
39983
|
state: state,
|
|
39056
39984
|
size: 64,
|
|
39057
39985
|
style: {
|
|
@@ -48035,7 +48963,7 @@ function mapCustomerIdAndBiometricsEnrollmentProps(props, ctx) {
|
|
|
48035
48963
|
});
|
|
48036
48964
|
}
|
|
48037
48965
|
|
|
48038
|
-
var webSdkVersion = '2.5.
|
|
48966
|
+
var webSdkVersion = '2.5.65-react16compat.0';
|
|
48039
48967
|
|
|
48040
48968
|
var MAPPED = 'mapped';
|
|
48041
48969
|
var NOOP = 'dropped-noop';
|
|
@@ -49036,6 +49964,25 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
49036
49964
|
}, mapCustomerIdAndBiometricsEnrollmentProps(props, ctx)), props.children);
|
|
49037
49965
|
};
|
|
49038
49966
|
|
|
49967
|
+
/**
|
|
49968
|
+
* react-16-compat: React 16/17 have no `createRoot`, so this adapts the legacy
|
|
49969
|
+
* `ReactDOM.render` API to the root shape the rest of this module expects.
|
|
49970
|
+
* Keeping that shape means the teardown logic below stays byte-identical to
|
|
49971
|
+
* develop and merges cleanly. Runs on React 16.14 through 18; React 19
|
|
49972
|
+
* removed `ReactDOM.render`, which is why this build's peer range stops at 18.
|
|
49973
|
+
*/
|
|
49974
|
+
function createRoot(container) {
|
|
49975
|
+
return {
|
|
49976
|
+
render: function render(element) {
|
|
49977
|
+
// eslint-disable-next-line react/no-deprecated -- the only mount API React 16 has
|
|
49978
|
+
ReactDOM.render(element, container);
|
|
49979
|
+
},
|
|
49980
|
+
unmount: function unmount() {
|
|
49981
|
+
// eslint-disable-next-line react/no-deprecated -- pairs with ReactDOM.render above
|
|
49982
|
+
ReactDOM.unmountComponentAtNode(container);
|
|
49983
|
+
}
|
|
49984
|
+
};
|
|
49985
|
+
}
|
|
49039
49986
|
/**
|
|
49040
49987
|
* Targets whose `remove` this module has already wrapped. Permanent: the
|
|
49041
49988
|
* wrapper is installed at most once per element, so repeat renders can never
|
|
@@ -49063,8 +50010,7 @@ function renderElement(component, targetElement) {
|
|
|
49063
50010
|
targetElement = document.createElement('div');
|
|
49064
50011
|
document.body.append(targetElement);
|
|
49065
50012
|
}
|
|
49066
|
-
var root =
|
|
49067
|
-
root.render(/*#__PURE__*/React.createElement(OverlayContainer, null, component));
|
|
50013
|
+
var root = createRoot(targetElement);
|
|
49068
50014
|
if ('remove' in targetElement) {
|
|
49069
50015
|
var element_1 = targetElement;
|
|
49070
50016
|
// Always point at the newest root, even when the wrapper is already
|
|
@@ -49114,6 +50060,10 @@ function renderElement(component, targetElement) {
|
|
|
49114
50060
|
};
|
|
49115
50061
|
}
|
|
49116
50062
|
}
|
|
50063
|
+
// react-16-compat: render LAST. A legacy root mounts synchronously, so layout
|
|
50064
|
+
// effects (e.g. a customer `loadingSpinner`) run inside this call; one that
|
|
50065
|
+
// calls `.remove()` must already hit the wrapper above, not the native method.
|
|
50066
|
+
root.render(/*#__PURE__*/React.createElement(OverlayContainer, null, component));
|
|
49117
50067
|
return targetElement;
|
|
49118
50068
|
}
|
|
49119
50069
|
function renderComponent(Component, targetElement, options) {
|