@myinterview/widget-react 1.1.23-revert-dev-deps-001 → 1.1.23-svg-check
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/cjs/components/CountDown.d.ts +2 -2
- package/dist/cjs/components/Counter.d.ts +2 -2
- package/dist/cjs/components/DeviceSelector.d.ts +1 -1
- package/dist/cjs/index.js +273 -274
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/widgetInterface.d.ts +2 -7
- package/dist/cjs/services/event.service.d.ts +1 -6
- package/dist/cjs/utils/constants.utils.d.ts +0 -1
- package/dist/esm/components/CountDown.d.ts +2 -2
- package/dist/esm/components/Counter.d.ts +2 -2
- package/dist/esm/components/DeviceSelector.d.ts +1 -1
- package/dist/esm/index.js +259 -260
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/widgetInterface.d.ts +2 -7
- package/dist/esm/services/event.service.d.ts +1 -6
- package/dist/esm/utils/constants.utils.d.ts +0 -1
- package/package.json +98 -98
package/dist/cjs/index.js
CHANGED
|
@@ -8,51 +8,26 @@ var reactDom = require('react-dom');
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
9
|
|
|
10
10
|
function _interopNamespace(e) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
}
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
22
20
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
29
29
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
30
|
|
|
31
|
-
/*! *****************************************************************************
|
|
32
|
-
Copyright (c) Microsoft Corporation.
|
|
33
|
-
|
|
34
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
35
|
-
purpose with or without fee is hereby granted.
|
|
36
|
-
|
|
37
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
38
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
39
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
40
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
41
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
42
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
43
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
44
|
-
***************************************************************************** */
|
|
45
|
-
|
|
46
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
47
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
48
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
49
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
50
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
51
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
52
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
|
|
56
31
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
57
32
|
const objectToString = Object.prototype.toString;
|
|
58
33
|
|
|
@@ -421,19 +396,83 @@ function getLocationHref() {
|
|
|
421
396
|
}
|
|
422
397
|
}
|
|
423
398
|
|
|
424
|
-
/**
|
|
425
|
-
|
|
426
|
-
/** Display name of this error instance. */
|
|
399
|
+
/** Prefix for logging strings */
|
|
400
|
+
const PREFIX = 'Sentry Logger ';
|
|
427
401
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
402
|
+
const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Temporarily disable sentry console instrumentations.
|
|
406
|
+
*
|
|
407
|
+
* @param callback The function to run against the original `console` messages
|
|
408
|
+
* @returns The results of the callback
|
|
409
|
+
*/
|
|
410
|
+
function consoleSandbox(callback) {
|
|
411
|
+
if (!('console' in GLOBAL_OBJ)) {
|
|
412
|
+
return callback();
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
const originalConsole = GLOBAL_OBJ.console ;
|
|
416
|
+
const wrappedLevels = {};
|
|
417
|
+
|
|
418
|
+
// Restore all wrapped console methods
|
|
419
|
+
CONSOLE_LEVELS.forEach(level => {
|
|
420
|
+
// TODO(v7): Remove this check as it's only needed for Node 6
|
|
421
|
+
const originalWrappedFunc =
|
|
422
|
+
originalConsole[level] && (originalConsole[level] ).__sentry_original__;
|
|
423
|
+
if (level in originalConsole && originalWrappedFunc) {
|
|
424
|
+
wrappedLevels[level] = originalConsole[level] ;
|
|
425
|
+
originalConsole[level] = originalWrappedFunc ;
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
try {
|
|
430
|
+
return callback();
|
|
431
|
+
} finally {
|
|
432
|
+
// Revert restoration to wrapped state
|
|
433
|
+
Object.keys(wrappedLevels).forEach(level => {
|
|
434
|
+
originalConsole[level] = wrappedLevels[level ];
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
function makeLogger() {
|
|
440
|
+
let enabled = false;
|
|
441
|
+
const logger = {
|
|
442
|
+
enable: () => {
|
|
443
|
+
enabled = true;
|
|
444
|
+
},
|
|
445
|
+
disable: () => {
|
|
446
|
+
enabled = false;
|
|
447
|
+
},
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
|
|
451
|
+
CONSOLE_LEVELS.forEach(name => {
|
|
452
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
453
|
+
logger[name] = (...args) => {
|
|
454
|
+
if (enabled) {
|
|
455
|
+
consoleSandbox(() => {
|
|
456
|
+
GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
});
|
|
461
|
+
} else {
|
|
462
|
+
CONSOLE_LEVELS.forEach(name => {
|
|
463
|
+
logger[name] = () => undefined;
|
|
464
|
+
});
|
|
436
465
|
}
|
|
466
|
+
|
|
467
|
+
return logger ;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
|
|
471
|
+
let logger;
|
|
472
|
+
if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
|
|
473
|
+
logger = getGlobalSingleton('logger', makeLogger);
|
|
474
|
+
} else {
|
|
475
|
+
logger = makeLogger();
|
|
437
476
|
}
|
|
438
477
|
|
|
439
478
|
/** Regular expression used to parse a Dsn. */
|
|
@@ -464,13 +503,16 @@ function dsnToString(dsn, withPassword = false) {
|
|
|
464
503
|
* Parses a Dsn from a given string.
|
|
465
504
|
*
|
|
466
505
|
* @param str A Dsn as string
|
|
467
|
-
* @returns Dsn as DsnComponents
|
|
506
|
+
* @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string
|
|
468
507
|
*/
|
|
469
508
|
function dsnFromString(str) {
|
|
470
509
|
const match = DSN_REGEX.exec(str);
|
|
471
510
|
|
|
472
511
|
if (!match) {
|
|
473
|
-
|
|
512
|
+
// This should be logged to the console
|
|
513
|
+
// eslint-disable-next-line no-console
|
|
514
|
+
console.error(`Invalid Sentry Dsn: ${str}`);
|
|
515
|
+
return undefined;
|
|
474
516
|
}
|
|
475
517
|
|
|
476
518
|
const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);
|
|
@@ -507,117 +549,67 @@ function dsnFromComponents(components) {
|
|
|
507
549
|
|
|
508
550
|
function validateDsn(dsn) {
|
|
509
551
|
if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
|
|
510
|
-
return;
|
|
552
|
+
return true;
|
|
511
553
|
}
|
|
512
554
|
|
|
513
555
|
const { port, projectId, protocol } = dsn;
|
|
514
556
|
|
|
515
557
|
const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];
|
|
516
|
-
requiredComponents.
|
|
558
|
+
const hasMissingRequiredComponent = requiredComponents.find(component => {
|
|
517
559
|
if (!dsn[component]) {
|
|
518
|
-
|
|
560
|
+
logger.error(`Invalid Sentry Dsn: ${component} missing`);
|
|
561
|
+
return true;
|
|
519
562
|
}
|
|
563
|
+
return false;
|
|
520
564
|
});
|
|
521
565
|
|
|
566
|
+
if (hasMissingRequiredComponent) {
|
|
567
|
+
return false;
|
|
568
|
+
}
|
|
569
|
+
|
|
522
570
|
if (!projectId.match(/^\d+$/)) {
|
|
523
|
-
|
|
571
|
+
logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);
|
|
572
|
+
return false;
|
|
524
573
|
}
|
|
525
574
|
|
|
526
575
|
if (!isValidProtocol(protocol)) {
|
|
527
|
-
|
|
576
|
+
logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);
|
|
577
|
+
return false;
|
|
528
578
|
}
|
|
529
579
|
|
|
530
580
|
if (port && isNaN(parseInt(port, 10))) {
|
|
531
|
-
|
|
581
|
+
logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);
|
|
582
|
+
return false;
|
|
532
583
|
}
|
|
533
584
|
|
|
534
585
|
return true;
|
|
535
586
|
}
|
|
536
587
|
|
|
537
|
-
/** The Sentry Dsn, identifying a Sentry instance and project. */
|
|
538
|
-
function makeDsn(from) {
|
|
539
|
-
const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);
|
|
540
|
-
validateDsn(components);
|
|
541
|
-
return components;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/** Prefix for logging strings */
|
|
545
|
-
const PREFIX = 'Sentry Logger ';
|
|
546
|
-
|
|
547
|
-
const CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ;
|
|
548
|
-
|
|
549
588
|
/**
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
* @param callback The function to run against the original `console` messages
|
|
553
|
-
* @returns The results of the callback
|
|
589
|
+
* Creates a valid Sentry Dsn object, identifying a Sentry instance and project.
|
|
590
|
+
* @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source
|
|
554
591
|
*/
|
|
555
|
-
function
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
const originalConsole = GLOBAL_OBJ.console ;
|
|
561
|
-
const wrappedLevels = {};
|
|
562
|
-
|
|
563
|
-
// Restore all wrapped console methods
|
|
564
|
-
CONSOLE_LEVELS.forEach(level => {
|
|
565
|
-
// TODO(v7): Remove this check as it's only needed for Node 6
|
|
566
|
-
const originalWrappedFunc =
|
|
567
|
-
originalConsole[level] && (originalConsole[level] ).__sentry_original__;
|
|
568
|
-
if (level in originalConsole && originalWrappedFunc) {
|
|
569
|
-
wrappedLevels[level] = originalConsole[level] ;
|
|
570
|
-
originalConsole[level] = originalWrappedFunc ;
|
|
571
|
-
}
|
|
572
|
-
});
|
|
573
|
-
|
|
574
|
-
try {
|
|
575
|
-
return callback();
|
|
576
|
-
} finally {
|
|
577
|
-
// Revert restoration to wrapped state
|
|
578
|
-
Object.keys(wrappedLevels).forEach(level => {
|
|
579
|
-
originalConsole[level] = wrappedLevels[level ];
|
|
580
|
-
});
|
|
592
|
+
function makeDsn(from) {
|
|
593
|
+
const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);
|
|
594
|
+
if (!components || !validateDsn(components)) {
|
|
595
|
+
return undefined;
|
|
581
596
|
}
|
|
597
|
+
return components;
|
|
582
598
|
}
|
|
583
599
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
enable: () => {
|
|
588
|
-
enabled = true;
|
|
589
|
-
},
|
|
590
|
-
disable: () => {
|
|
591
|
-
enabled = false;
|
|
592
|
-
},
|
|
593
|
-
};
|
|
600
|
+
/** An error emitted by Sentry SDKs and related utilities. */
|
|
601
|
+
class SentryError extends Error {
|
|
602
|
+
/** Display name of this error instance. */
|
|
594
603
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}
|
|
604
|
-
};
|
|
605
|
-
});
|
|
606
|
-
} else {
|
|
607
|
-
CONSOLE_LEVELS.forEach(name => {
|
|
608
|
-
logger[name] = () => undefined;
|
|
609
|
-
});
|
|
604
|
+
constructor( message, logLevel = 'warn') {
|
|
605
|
+
super(message);this.message = message;
|
|
606
|
+
this.name = new.target.prototype.constructor.name;
|
|
607
|
+
// This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line
|
|
608
|
+
// out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes
|
|
609
|
+
// instances of `SentryError` fail `obj instanceof SentryError` checks.
|
|
610
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
611
|
+
this.logLevel = logLevel;
|
|
610
612
|
}
|
|
611
|
-
|
|
612
|
-
return logger ;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
|
|
616
|
-
let logger;
|
|
617
|
-
if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
|
|
618
|
-
logger = getGlobalSingleton('logger', makeLogger);
|
|
619
|
-
} else {
|
|
620
|
-
logger = makeLogger();
|
|
621
613
|
}
|
|
622
614
|
|
|
623
615
|
/**
|
|
@@ -5117,16 +5109,20 @@ class BaseClient {
|
|
|
5117
5109
|
*/
|
|
5118
5110
|
constructor(options) {BaseClient.prototype.__init.call(this);BaseClient.prototype.__init2.call(this);BaseClient.prototype.__init3.call(this);BaseClient.prototype.__init4.call(this);BaseClient.prototype.__init5.call(this);
|
|
5119
5111
|
this._options = options;
|
|
5112
|
+
|
|
5120
5113
|
if (options.dsn) {
|
|
5121
5114
|
this._dsn = makeDsn(options.dsn);
|
|
5115
|
+
} else {
|
|
5116
|
+
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('No DSN provided, client will not do anything.');
|
|
5117
|
+
}
|
|
5118
|
+
|
|
5119
|
+
if (this._dsn) {
|
|
5122
5120
|
const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);
|
|
5123
5121
|
this._transport = options.transport({
|
|
5124
5122
|
recordDroppedEvent: this.recordDroppedEvent.bind(this),
|
|
5125
5123
|
...options.transportOptions,
|
|
5126
5124
|
url,
|
|
5127
5125
|
});
|
|
5128
|
-
} else {
|
|
5129
|
-
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('No DSN provided, client will not do anything.');
|
|
5130
5126
|
}
|
|
5131
5127
|
}
|
|
5132
5128
|
|
|
@@ -5845,7 +5841,7 @@ function getEventForEnvelopeItem(item, type) {
|
|
|
5845
5841
|
return Array.isArray(item) ? (item )[1] : undefined;
|
|
5846
5842
|
}
|
|
5847
5843
|
|
|
5848
|
-
const SDK_VERSION = '7.
|
|
5844
|
+
const SDK_VERSION = '7.53.0';
|
|
5849
5845
|
|
|
5850
5846
|
let originalFunctionToString;
|
|
5851
5847
|
|
|
@@ -6078,9 +6074,9 @@ function _getEventFilterUrl(event) {
|
|
|
6078
6074
|
}
|
|
6079
6075
|
|
|
6080
6076
|
var Integrations = /*#__PURE__*/Object.freeze({
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6077
|
+
__proto__: null,
|
|
6078
|
+
FunctionToString: FunctionToString,
|
|
6079
|
+
InboundFilters: InboundFilters
|
|
6084
6080
|
});
|
|
6085
6081
|
|
|
6086
6082
|
const WINDOW$1 = GLOBAL_OBJ ;
|
|
@@ -8304,13 +8300,13 @@ function startSessionTracking() {
|
|
|
8304
8300
|
}
|
|
8305
8301
|
|
|
8306
8302
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8303
|
+
__proto__: null,
|
|
8304
|
+
GlobalHandlers: GlobalHandlers,
|
|
8305
|
+
TryCatch: TryCatch,
|
|
8306
|
+
Breadcrumbs: Breadcrumbs,
|
|
8307
|
+
LinkedErrors: LinkedErrors,
|
|
8308
|
+
HttpContext: HttpContext,
|
|
8309
|
+
Dedupe: Dedupe
|
|
8314
8310
|
});
|
|
8315
8311
|
|
|
8316
8312
|
// exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`
|
|
@@ -11597,6 +11593,23 @@ var NodeType;
|
|
|
11597
11593
|
NodeType[NodeType["Comment"] = 5] = "Comment";
|
|
11598
11594
|
})(NodeType || (NodeType = {}));
|
|
11599
11595
|
|
|
11596
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
11597
|
+
|
|
11598
|
+
var EventType; (function (EventType) {
|
|
11599
|
+
const DomContentLoaded = 0; EventType[EventType["DomContentLoaded"] = DomContentLoaded] = "DomContentLoaded";
|
|
11600
|
+
const Load = 1; EventType[EventType["Load"] = Load] = "Load";
|
|
11601
|
+
const FullSnapshot = 2; EventType[EventType["FullSnapshot"] = FullSnapshot] = "FullSnapshot";
|
|
11602
|
+
const IncrementalSnapshot = 3; EventType[EventType["IncrementalSnapshot"] = IncrementalSnapshot] = "IncrementalSnapshot";
|
|
11603
|
+
const Meta = 4; EventType[EventType["Meta"] = Meta] = "Meta";
|
|
11604
|
+
const Custom = 5; EventType[EventType["Custom"] = Custom] = "Custom";
|
|
11605
|
+
const Plugin = 6; EventType[EventType["Plugin"] = Plugin] = "Plugin";
|
|
11606
|
+
})(EventType || (EventType = {}));
|
|
11607
|
+
|
|
11608
|
+
/**
|
|
11609
|
+
* This is a partial copy of rrweb's eventWithTime type which only contains the properties
|
|
11610
|
+
* we specifcally need in the SDK.
|
|
11611
|
+
*/
|
|
11612
|
+
|
|
11600
11613
|
/**
|
|
11601
11614
|
* Converts a timestamp to ms, if it was in s, or keeps it as ms.
|
|
11602
11615
|
*/
|
|
@@ -11639,7 +11652,18 @@ async function addEvent(
|
|
|
11639
11652
|
replay.eventBuffer.clear();
|
|
11640
11653
|
}
|
|
11641
11654
|
|
|
11642
|
-
|
|
11655
|
+
const replayOptions = replay.getOptions();
|
|
11656
|
+
|
|
11657
|
+
const eventAfterPossibleCallback =
|
|
11658
|
+
typeof replayOptions.beforeAddRecordingEvent === 'function' && event.type === EventType.Custom
|
|
11659
|
+
? replayOptions.beforeAddRecordingEvent(event)
|
|
11660
|
+
: event;
|
|
11661
|
+
|
|
11662
|
+
if (!eventAfterPossibleCallback) {
|
|
11663
|
+
return;
|
|
11664
|
+
}
|
|
11665
|
+
|
|
11666
|
+
return await replay.eventBuffer.addEvent(eventAfterPossibleCallback);
|
|
11643
11667
|
} catch (error) {
|
|
11644
11668
|
(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(error);
|
|
11645
11669
|
await replay.stop('addEvent');
|
|
@@ -14615,23 +14639,6 @@ function debounce(func, wait, options) {
|
|
|
14615
14639
|
return debounced;
|
|
14616
14640
|
}
|
|
14617
14641
|
|
|
14618
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
14619
|
-
|
|
14620
|
-
var EventType; (function (EventType) {
|
|
14621
|
-
const DomContentLoaded = 0; EventType[EventType["DomContentLoaded"] = DomContentLoaded] = "DomContentLoaded";
|
|
14622
|
-
const Load = 1; EventType[EventType["Load"] = Load] = "Load";
|
|
14623
|
-
const FullSnapshot = 2; EventType[EventType["FullSnapshot"] = FullSnapshot] = "FullSnapshot";
|
|
14624
|
-
const IncrementalSnapshot = 3; EventType[EventType["IncrementalSnapshot"] = IncrementalSnapshot] = "IncrementalSnapshot";
|
|
14625
|
-
const Meta = 4; EventType[EventType["Meta"] = Meta] = "Meta";
|
|
14626
|
-
const Custom = 5; EventType[EventType["Custom"] = Custom] = "Custom";
|
|
14627
|
-
const Plugin = 6; EventType[EventType["Plugin"] = Plugin] = "Plugin";
|
|
14628
|
-
})(EventType || (EventType = {}));
|
|
14629
|
-
|
|
14630
|
-
/**
|
|
14631
|
-
* This is a partial copy of rrweb's eventWithTime type which only contains the properties
|
|
14632
|
-
* we specifcally need in the SDK.
|
|
14633
|
-
*/
|
|
14634
|
-
|
|
14635
14642
|
/**
|
|
14636
14643
|
* Handler for recording events.
|
|
14637
14644
|
*
|
|
@@ -14705,6 +14712,30 @@ function getHandleRecordingEmit(replay) {
|
|
|
14705
14712
|
}
|
|
14706
14713
|
}
|
|
14707
14714
|
|
|
14715
|
+
const options = replay.getOptions();
|
|
14716
|
+
|
|
14717
|
+
// TODO: We want this as an experiment so that we can test
|
|
14718
|
+
// internally and create metrics before making this the default
|
|
14719
|
+
if (options._experiments.delayFlushOnCheckout) {
|
|
14720
|
+
// If the full snapshot is due to an initial load, we will not have
|
|
14721
|
+
// a previous session ID. In this case, we want to buffer events
|
|
14722
|
+
// for a set amount of time before flushing. This can help avoid
|
|
14723
|
+
// capturing replays of users that immediately close the window.
|
|
14724
|
+
setTimeout(() => replay.conditionalFlush(), options._experiments.delayFlushOnCheckout);
|
|
14725
|
+
|
|
14726
|
+
// Cancel any previously debounced flushes to ensure there are no [near]
|
|
14727
|
+
// simultaneous flushes happening. The latter request should be
|
|
14728
|
+
// insignificant in this case, so wait for additional user interaction to
|
|
14729
|
+
// trigger a new flush.
|
|
14730
|
+
//
|
|
14731
|
+
// This can happen because there's no guarantee that a recording event
|
|
14732
|
+
// happens first. e.g. a mouse click can happen and trigger a debounced
|
|
14733
|
+
// flush before the checkout.
|
|
14734
|
+
replay.cancelFlush();
|
|
14735
|
+
|
|
14736
|
+
return true;
|
|
14737
|
+
}
|
|
14738
|
+
|
|
14708
14739
|
// Flush immediately so that we do not miss the first segment, otherwise
|
|
14709
14740
|
// it can prevent loading on the UI. This will cause an increase in short
|
|
14710
14741
|
// replays (e.g. opening and closing a tab quickly), but these can be
|
|
@@ -15470,7 +15501,17 @@ class ReplayContainer {
|
|
|
15470
15501
|
}
|
|
15471
15502
|
|
|
15472
15503
|
/**
|
|
15473
|
-
*
|
|
15504
|
+
* Only flush if `this.recordingMode === 'session'`
|
|
15505
|
+
*/
|
|
15506
|
+
conditionalFlush() {
|
|
15507
|
+
if (this.recordingMode === 'buffer') {
|
|
15508
|
+
return Promise.resolve();
|
|
15509
|
+
}
|
|
15510
|
+
|
|
15511
|
+
return this.flushImmediate();
|
|
15512
|
+
}
|
|
15513
|
+
|
|
15514
|
+
/**
|
|
15474
15515
|
* Always flush via `_debouncedFlush` so that we do not have flushes triggered
|
|
15475
15516
|
* from calling both `flush` and `_debouncedFlush`. Otherwise, there could be
|
|
15476
15517
|
* cases of mulitple flushes happening closely together.
|
|
@@ -15481,6 +15522,13 @@ class ReplayContainer {
|
|
|
15481
15522
|
return this._debouncedFlush.flush() ;
|
|
15482
15523
|
}
|
|
15483
15524
|
|
|
15525
|
+
/**
|
|
15526
|
+
* Cancels queued up flushes.
|
|
15527
|
+
*/
|
|
15528
|
+
cancelFlush() {
|
|
15529
|
+
this._debouncedFlush.cancel();
|
|
15530
|
+
}
|
|
15531
|
+
|
|
15484
15532
|
/** Get the current sesion (=replay) ID */
|
|
15485
15533
|
getSessionId() {
|
|
15486
15534
|
return this.session && this.session.id;
|
|
@@ -15730,7 +15778,7 @@ class ReplayContainer {
|
|
|
15730
15778
|
// Send replay when the page/tab becomes hidden. There is no reason to send
|
|
15731
15779
|
// replay if it becomes visible, since no actions we care about were done
|
|
15732
15780
|
// while it was hidden
|
|
15733
|
-
this.
|
|
15781
|
+
void this.conditionalFlush();
|
|
15734
15782
|
}
|
|
15735
15783
|
|
|
15736
15784
|
/**
|
|
@@ -15814,17 +15862,6 @@ class ReplayContainer {
|
|
|
15814
15862
|
return Promise.all(createPerformanceSpans(this, createPerformanceEntries(entries)));
|
|
15815
15863
|
}
|
|
15816
15864
|
|
|
15817
|
-
/**
|
|
15818
|
-
* Only flush if `this.recordingMode === 'session'`
|
|
15819
|
-
*/
|
|
15820
|
-
_conditionalFlush() {
|
|
15821
|
-
if (this.recordingMode === 'buffer') {
|
|
15822
|
-
return;
|
|
15823
|
-
}
|
|
15824
|
-
|
|
15825
|
-
void this.flushImmediate();
|
|
15826
|
-
}
|
|
15827
|
-
|
|
15828
15865
|
/**
|
|
15829
15866
|
* Clear _context
|
|
15830
15867
|
*/
|
|
@@ -16186,6 +16223,8 @@ class Replay {
|
|
|
16186
16223
|
ignore = [],
|
|
16187
16224
|
maskFn,
|
|
16188
16225
|
|
|
16226
|
+
beforeAddRecordingEvent,
|
|
16227
|
+
|
|
16189
16228
|
// eslint-disable-next-line deprecation/deprecation
|
|
16190
16229
|
blockClass,
|
|
16191
16230
|
// eslint-disable-next-line deprecation/deprecation
|
|
@@ -16243,6 +16282,7 @@ class Replay {
|
|
|
16243
16282
|
networkCaptureBodies,
|
|
16244
16283
|
networkRequestHeaders: _getMergedNetworkHeaders(networkRequestHeaders),
|
|
16245
16284
|
networkResponseHeaders: _getMergedNetworkHeaders(networkResponseHeaders),
|
|
16285
|
+
beforeAddRecordingEvent,
|
|
16246
16286
|
|
|
16247
16287
|
_experiments,
|
|
16248
16288
|
};
|
|
@@ -25611,7 +25651,6 @@ var STATES$5;
|
|
|
25611
25651
|
STATES["RE_INIT_RECORDER__NEXT_QUESTION"] = "reInitRecorderNextQuestion";
|
|
25612
25652
|
STATES["UPLOADING"] = "uploading";
|
|
25613
25653
|
STATES["CONFIRM"] = "confirm";
|
|
25614
|
-
STATES["CONFIRM_WATING"] = "confirmWaiting";
|
|
25615
25654
|
STATES["FINISHED"] = "finished";
|
|
25616
25655
|
STATES["ERROR"] = "error";
|
|
25617
25656
|
})(STATES$5 || (STATES$5 = {}));
|
|
@@ -25665,7 +25704,6 @@ var ACTIONS$6;
|
|
|
25665
25704
|
ACTIONS["RESET_FAILED_RECORDING_ATTEMPTS"] = "resetFailedRecordingAttempts";
|
|
25666
25705
|
ACTIONS["CLEAR_VIDEO_ERROR"] = "clearVideoError";
|
|
25667
25706
|
ACTIONS["UPDATE_VIDEO_DIMENSIONS"] = "updateVideoDimensions";
|
|
25668
|
-
ACTIONS["UPDATE_UPLOADED_FALSE_COUNT"] = "updateUploadedFalseCount";
|
|
25669
25707
|
})(ACTIONS$6 || (ACTIONS$6 = {}));
|
|
25670
25708
|
var EVENTS$5;
|
|
25671
25709
|
(function (EVENTS) {
|
|
@@ -25721,7 +25759,6 @@ var GUARDS$3;
|
|
|
25721
25759
|
GUARDS["IS_RECORDER_READY"] = "isRecorderReady";
|
|
25722
25760
|
GUARDS["IS_ASSESSMENT_QUESTION"] = "isAssessmentQuestion";
|
|
25723
25761
|
GUARDS["IS_TIMES_UP"] = "isTimesUp";
|
|
25724
|
-
GUARDS["SHOULD_TRY_TO_CONFIRM"] = "shouldTryToConfirm";
|
|
25725
25762
|
})(GUARDS$3 || (GUARDS$3 = {}));
|
|
25726
25763
|
var TAGS;
|
|
25727
25764
|
(function (TAGS) {
|
|
@@ -25731,7 +25768,6 @@ var TAGS;
|
|
|
25731
25768
|
TAGS["DISPLAY_OUTER_VIEW"] = "displayOuterView";
|
|
25732
25769
|
TAGS["DISPLAY_QUESTION"] = "displayQuestion";
|
|
25733
25770
|
TAGS["DISPLAY_QUESTIONS_LIST"] = "displayQuestionsList";
|
|
25734
|
-
TAGS["DISPLAY_UPLOAD"] = "displayUpload";
|
|
25735
25771
|
TAGS["LOADING"] = "loading";
|
|
25736
25772
|
})(TAGS || (TAGS = {}));
|
|
25737
25773
|
|
|
@@ -30453,7 +30489,7 @@ const configGenerator = () => {
|
|
|
30453
30489
|
let release;
|
|
30454
30490
|
try {
|
|
30455
30491
|
environment !== null && environment !== void 0 ? environment : (environment = "staging");
|
|
30456
|
-
release !== null && release !== void 0 ? release : (release = "1.1.23-
|
|
30492
|
+
release !== null && release !== void 0 ? release : (release = "1.1.23-svg-check");
|
|
30457
30493
|
}
|
|
30458
30494
|
catch (_a) {
|
|
30459
30495
|
console.error('sentry configGenerator error');
|
|
@@ -30926,7 +30962,6 @@ const SECONDS_LEFT_HIGHLIGHT = 10;
|
|
|
30926
30962
|
const DEFAULT_ASSESSMENT_MAX_CHARS = 300;
|
|
30927
30963
|
const DEFAULT_ASSESSMENT_DURATION = 0;
|
|
30928
30964
|
const DEFAULT_VIDEO_DIMENSIONS = { width: 1280, height: 720 }; // Transcoder default dimensions (720p)
|
|
30929
|
-
const MAX_CONFIRM_ATTEMPTS = 5;
|
|
30930
30965
|
// Font
|
|
30931
30966
|
const FONT_URL = 'https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700&display=swap';
|
|
30932
30967
|
var RETAKE_SPEED;
|
|
@@ -35087,8 +35122,8 @@ function memoizeOne(resultFn, isEqual) {
|
|
|
35087
35122
|
}
|
|
35088
35123
|
|
|
35089
35124
|
var memoizeOne_esm = /*#__PURE__*/Object.freeze({
|
|
35090
|
-
|
|
35091
|
-
|
|
35125
|
+
__proto__: null,
|
|
35126
|
+
'default': memoizeOne
|
|
35092
35127
|
});
|
|
35093
35128
|
|
|
35094
35129
|
var require$$2 = /*@__PURE__*/getAugmentedNamespace(memoizeOne_esm);
|
|
@@ -39048,11 +39083,6 @@ var EVENT_TYPES;
|
|
|
39048
39083
|
EVENT_TYPES["SOUND_RESTORED"] = "soundRestored";
|
|
39049
39084
|
EVENT_TYPES["TIMES_UP"] = "timesUp";
|
|
39050
39085
|
EVENT_TYPES["COMPLETED_INTERVIEW"] = "completedInterview";
|
|
39051
|
-
EVENT_TYPES["RECONNECTED"] = "reconnected";
|
|
39052
|
-
EVENT_TYPES["CONFIRM_UPLOADED_FAILED"] = "confirmUploadedFailed";
|
|
39053
|
-
EVENT_TYPES["FINISHED"] = "finished";
|
|
39054
|
-
EVENT_TYPES["ON_FINISH_SUCCEED"] = "onFinishSucceed";
|
|
39055
|
-
EVENT_TYPES["ON_FINISH_FAILED"] = "onFinishFailed";
|
|
39056
39086
|
})(EVENT_TYPES || (EVENT_TYPES = {}));
|
|
39057
39087
|
let event_id;
|
|
39058
39088
|
const updateEventId = (eventId) => { event_id = eventId; };
|
|
@@ -39602,6 +39632,31 @@ const Setup = ({ widgetMachine, sendToWidget, isPracticeDisabled, recordWithoutV
|
|
|
39602
39632
|
React__default["default"].createElement(C, { className: startButtonClassNames, color: "special", backgroundColor: "white", onClick: () => sendToWidget(EVENTS$5.QUESTION_MODE), disabled: !canStartInterview }, t(isResumed ? 'welcome.resumeInterview' : 'buttons.btn_start').toUpperCase()))));
|
|
39603
39633
|
};
|
|
39604
39634
|
|
|
39635
|
+
/*! *****************************************************************************
|
|
39636
|
+
Copyright (c) Microsoft Corporation.
|
|
39637
|
+
|
|
39638
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
39639
|
+
purpose with or without fee is hereby granted.
|
|
39640
|
+
|
|
39641
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
39642
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
39643
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
39644
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
39645
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
39646
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
39647
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
39648
|
+
***************************************************************************** */
|
|
39649
|
+
|
|
39650
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
39651
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
39652
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39653
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39654
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
39655
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
39656
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
39657
|
+
});
|
|
39658
|
+
}
|
|
39659
|
+
|
|
39605
39660
|
const uploadToS3 = (url, data, onProgress, timeout = 0) => s3AxiosInstance.put(url, data, {
|
|
39606
39661
|
headers: { 'Content-Type': 'video/webm' }, onUploadProgress: onProgress, timeout,
|
|
39607
39662
|
});
|
|
@@ -39672,8 +39727,8 @@ const OuterView = ({ widgetMachine, sendToWidget, recorderRef }) => {
|
|
|
39672
39727
|
const isQuestionDisplayed = widgetMachine.hasTag(TAGS.DISPLAY_QUESTION) || (isVideoQuestionState && !currentQuestionObj.thinkingTime);
|
|
39673
39728
|
const isPreviewState = widgetMachine.matches(STATES$5.PREVIEW);
|
|
39674
39729
|
const isUploadingState = widgetMachine.matches(STATES$5.UPLOADING);
|
|
39730
|
+
const isConfirmState = widgetMachine.matches(STATES$5.CONFIRM);
|
|
39675
39731
|
const isQuestionsListDisplayed = widgetMachine.hasTag(TAGS.DISPLAY_QUESTIONS_LIST);
|
|
39676
|
-
const isUploadDisplayed = widgetMachine.hasTag(TAGS.DISPLAY_UPLOAD);
|
|
39677
39732
|
const isRecording = recorderMachine.matches({ [STATES$6.RECORDING]: STATES$6.COLLECTING_BLOBS });
|
|
39678
39733
|
const isCountDown = recorderMachine.matches({ [STATES$6.RECORDING]: STATES$6.COUNT_DOWN });
|
|
39679
39734
|
const isPracticeMode = recordingType === TAKE_TYPES.PRACTICE;
|
|
@@ -39691,7 +39746,7 @@ const OuterView = ({ widgetMachine, sendToWidget, recorderRef }) => {
|
|
|
39691
39746
|
isSetupState && React__default["default"].createElement(Setup, { recordWithoutVideo: recordWithoutVideo, widgetMachine: widgetMachine, sendToWidget: sendToWidget, isPracticeDisabled: !!config.disablePractice }),
|
|
39692
39747
|
isQuestionsListDisplayed && React__default["default"].createElement(QuestionsList, { questions: questions, currentQuestion: currentQuestion, isPracticeMode: isPracticeMode, questionsStatus: questionsStatus }),
|
|
39693
39748
|
isQuestionDisplayed && React__default["default"].createElement(Question, { questionObj: currentQuestionObj }),
|
|
39694
|
-
|
|
39749
|
+
(isUploadingState || isConfirmState) && (React__default["default"].createElement(Upload, { isConnected: isConnected, totalFileSize: totalFileSize, totalUploadedFilesSize: totalUploadedFilesSize, totalUploadSpeed: totalUploadSpeed }))));
|
|
39695
39750
|
};
|
|
39696
39751
|
|
|
39697
39752
|
var actions = {};
|
|
@@ -44788,7 +44843,7 @@ const accUploaderMachine = createMachine({
|
|
|
44788
44843
|
actions: [ACTIONS$2.SENTRY],
|
|
44789
44844
|
},
|
|
44790
44845
|
{
|
|
44791
|
-
actions: [ACTIONS$2.SENTRY],
|
|
44846
|
+
actions: [ACTIONS$2.SET_UPLOADED, ACTIONS$2.SENTRY],
|
|
44792
44847
|
target: `#uploader.${STATES$2.UPLOADED}`, // In case the video already uploaded
|
|
44793
44848
|
},
|
|
44794
44849
|
],
|
|
@@ -44805,6 +44860,7 @@ const accUploaderMachine = createMachine({
|
|
|
44805
44860
|
id: 'uploadToS3',
|
|
44806
44861
|
src: ({ signedUrl, file }) => (callback) => uploadToS3(signedUrl, file, callback),
|
|
44807
44862
|
onDone: {
|
|
44863
|
+
// actions: [ACTIONS.SET_UPLOADED],
|
|
44808
44864
|
target: `#uploader.${STATES$2.UPLOADED}`,
|
|
44809
44865
|
},
|
|
44810
44866
|
onError: {
|
|
@@ -45160,14 +45216,10 @@ const accWidgetMachine = createMachine({
|
|
|
45160
45216
|
failedRecordingMessage: VIDEO_CORRUPTED_STATES.NO_ERROR,
|
|
45161
45217
|
isResumed: false,
|
|
45162
45218
|
videoDimensions: DEFAULT_VIDEO_DIMENSIONS,
|
|
45163
|
-
confirmUploadedFalseCount: 0,
|
|
45164
45219
|
},
|
|
45165
45220
|
on: {
|
|
45166
45221
|
[EVENTS$1.CONNECTION_CHANGED]: {
|
|
45167
|
-
actions: [
|
|
45168
|
-
ACTIONS$6.SET_CONNECTION,
|
|
45169
|
-
{ type: ACTIONS$6.EMIT_TRACKING_EVENT, data: { eventType: EVENT_TYPES.RECONNECTED } },
|
|
45170
|
-
],
|
|
45222
|
+
actions: [ACTIONS$6.SET_CONNECTION],
|
|
45171
45223
|
},
|
|
45172
45224
|
[EVENTS$5.UPLOADER_PROGRESS]: {
|
|
45173
45225
|
actions: [ACTIONS$6.UPDATE_TOTAL_UPLOADED_FILES_SIZE],
|
|
@@ -45694,7 +45746,7 @@ const accWidgetMachine = createMachine({
|
|
|
45694
45746
|
},
|
|
45695
45747
|
},
|
|
45696
45748
|
[STATES$5.UPLOADING]: {
|
|
45697
|
-
tags: [TAGS.DISPLAY_OUTER_VIEW
|
|
45749
|
+
tags: [TAGS.DISPLAY_OUTER_VIEW],
|
|
45698
45750
|
entry: [
|
|
45699
45751
|
{ type: ACTIONS$6.SESSION_EVENT, data: { event: 'widget_completed', type: 'date' } },
|
|
45700
45752
|
{ type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.UPLOADING_STATE } },
|
|
@@ -45708,57 +45760,30 @@ const accWidgetMachine = createMachine({
|
|
|
45708
45760
|
},
|
|
45709
45761
|
},
|
|
45710
45762
|
},
|
|
45711
|
-
[STATES$5.CONFIRM_WATING]: {
|
|
45712
|
-
tags: [TAGS.DISPLAY_OUTER_VIEW, TAGS.DISPLAY_UPLOAD],
|
|
45713
|
-
always: {
|
|
45714
|
-
target: STATES$5.CONFIRM,
|
|
45715
|
-
cond: GUARDS$3.IS_CONNECTED,
|
|
45716
|
-
},
|
|
45717
|
-
},
|
|
45718
45763
|
[STATES$5.CONFIRM]: {
|
|
45719
|
-
tags: [TAGS.DISPLAY_OUTER_VIEW
|
|
45764
|
+
tags: [TAGS.DISPLAY_OUTER_VIEW],
|
|
45720
45765
|
invoke: {
|
|
45721
45766
|
id: 'getVideo',
|
|
45722
45767
|
src: (context) => { var _a; return getVideo(((_a = context.widgetConfig.video) === null || _a === void 0 ? void 0 : _a.video_id) || ''); },
|
|
45723
|
-
onDone:
|
|
45724
|
-
|
|
45725
|
-
|
|
45726
|
-
|
|
45727
|
-
},
|
|
45728
|
-
{
|
|
45729
|
-
actions: [
|
|
45730
|
-
ACTIONS$6.UPDATE_UPLOADED_FALSE_COUNT,
|
|
45731
|
-
{ type: ACTIONS$6.SENTRY, data: { eventName: 'CONFIRM::UPLOADED_FALSE' } },
|
|
45732
|
-
],
|
|
45733
|
-
target: STATES$5.CONFIRM_WATING,
|
|
45734
|
-
cond: GUARDS$3.SHOULD_TRY_TO_CONFIRM,
|
|
45735
|
-
},
|
|
45736
|
-
{
|
|
45737
|
-
actions: [
|
|
45738
|
-
{ type: ACTIONS$6.SET_VIDEO_ERROR, data: { errorMessage: 'Error, Please contact support' } },
|
|
45739
|
-
{ type: ACTIONS$6.EMIT_TRACKING_EVENT, data: { eventType: EVENT_TYPES.CONFIRM_UPLOADED_FAILED } },
|
|
45740
|
-
],
|
|
45741
|
-
target: STATES$5.ERROR,
|
|
45742
|
-
},
|
|
45743
|
-
],
|
|
45768
|
+
onDone: {
|
|
45769
|
+
target: STATES$5.FINISHED,
|
|
45770
|
+
cond: (_, event) => !!event.data.data.data.video.uploaded,
|
|
45771
|
+
},
|
|
45744
45772
|
onError: [
|
|
45745
45773
|
{
|
|
45746
|
-
actions: [() => console.error('UPDATE_VIDEO_UPLADED_ERROR:'), console.error,
|
|
45774
|
+
actions: [() => console.error('UPDATE_VIDEO_UPLADED_ERROR:'), console.error, ACTIONS$6.SENTRY],
|
|
45747
45775
|
target: STATES$5.FINISHED,
|
|
45748
45776
|
cond: (_, event) => event.data.response.status === STATUS_CODES.NOT_FOUND,
|
|
45749
45777
|
},
|
|
45750
45778
|
{
|
|
45751
|
-
actions: [
|
|
45752
|
-
target: STATES$5.
|
|
45779
|
+
actions: [ACTIONS$6.SENTRY],
|
|
45780
|
+
target: STATES$5.CONFIRM,
|
|
45753
45781
|
},
|
|
45754
45782
|
],
|
|
45755
45783
|
},
|
|
45756
45784
|
},
|
|
45757
45785
|
[STATES$5.FINISHED]: {
|
|
45758
|
-
entry: [
|
|
45759
|
-
{ type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.INTERVIEW_SUBMITTED } },
|
|
45760
|
-
{ type: ACTIONS$6.EMIT_TRACKING_EVENT, data: { eventType: EVENT_TYPES.FINISHED } },
|
|
45761
|
-
],
|
|
45786
|
+
entry: [{ type: ACTIONS$6.CONSOLE_DEBUG, data: { message: DEBUG.INTERVIEW_SUBMITTED } }],
|
|
45762
45787
|
type: 'final',
|
|
45763
45788
|
},
|
|
45764
45789
|
[STATES$5.ERROR]: {
|
|
@@ -45954,12 +45979,9 @@ const accWidgetMachine = createMachine({
|
|
|
45954
45979
|
widgetConfig: Object.assign(Object.assign({}, widgetConfig), { video: Object.assign(Object.assign({}, widgetConfig.video), { videos: (_b = (_a = widgetConfig.video) === null || _a === void 0 ? void 0 : _a.videos) === null || _b === void 0 ? void 0 : _b.map((video, idx) => ((idx !== questionNumber - 1) ? video : videoFile)) }) }),
|
|
45955
45980
|
});
|
|
45956
45981
|
}),
|
|
45957
|
-
[ACTIONS$6.SET_VIDEO_ERROR]: assign$2((_, event
|
|
45958
|
-
|
|
45959
|
-
|
|
45960
|
-
error: ((_b = (_a = event.data) === null || _a === void 0 ? void 0 : _a.response) === null || _b === void 0 ? void 0 : _b.data) || { errorMessage: ((_c = event.data) === null || _c === void 0 ? void 0 : _c.message) || ((_d = meta.action.data) === null || _d === void 0 ? void 0 : _d.errorMessage) },
|
|
45961
|
-
});
|
|
45962
|
-
}),
|
|
45982
|
+
[ACTIONS$6.SET_VIDEO_ERROR]: assign$2((_, event) => ({
|
|
45983
|
+
error: event.data.response.data || { errorMessage: event.data.message },
|
|
45984
|
+
})),
|
|
45963
45985
|
[ACTIONS$6.REVOKE_MEMORY]: send$2((_, event) => ({ type: EVENTS$4.REMOVE_TAKES, data: { questionToRemove: event.data.questionNumber } }), { to: ({ storageRef }) => storageRef }),
|
|
45964
45986
|
[ACTIONS$6.UPDATE_VIDEO_OBJECT]: assign$2(({ widgetConfig, recordingType }) => {
|
|
45965
45987
|
var _a, _b;
|
|
@@ -45993,9 +46015,6 @@ const accWidgetMachine = createMachine({
|
|
|
45993
46015
|
height: event.data.height,
|
|
45994
46016
|
},
|
|
45995
46017
|
})),
|
|
45996
|
-
[ACTIONS$6.UPDATE_UPLOADED_FALSE_COUNT]: assign$2(({ confirmUploadedFalseCount }) => ({
|
|
45997
|
-
confirmUploadedFalseCount: confirmUploadedFalseCount + 1,
|
|
45998
|
-
})),
|
|
45999
46018
|
},
|
|
46000
46019
|
services: {
|
|
46001
46020
|
[SERVICES$1.UPDATE_VIDEO_OBJECT_CALL]: ({ widgetConfig: { video }, recordingType, speedTestResult }, event, meta) => (callback, onReceive) => {
|
|
@@ -46039,7 +46058,6 @@ const accWidgetMachine = createMachine({
|
|
|
46039
46058
|
[GUARDS$3.IS_RECORDER_READY]: ({ recorderRef }) => (recorderRef === null || recorderRef === void 0 ? void 0 : recorderRef.getSnapshot().value) === STATES$6.IDLE,
|
|
46040
46059
|
[GUARDS$3.IS_ASSESSMENT_QUESTION]: ({ questions, currentQuestion }) => !!questions[currentQuestion - 1].answerType && questions[currentQuestion - 1].answerType !== ANSWER_TYPES.VIDEO,
|
|
46041
46060
|
[GUARDS$3.IS_TIMES_UP]: (_, event) => !!event.data.isTimesUp,
|
|
46042
|
-
[GUARDS$3.SHOULD_TRY_TO_CONFIRM]: ({ confirmUploadedFalseCount }) => confirmUploadedFalseCount <= MAX_CONFIRM_ATTEMPTS,
|
|
46043
46061
|
},
|
|
46044
46062
|
});
|
|
46045
46063
|
|
|
@@ -48562,25 +48580,10 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
|
|
|
48562
48580
|
React.useEffect(() => {
|
|
48563
48581
|
setShouldShowWaterMark(!!(company === null || company === void 0 ? void 0 : company.shouldShowWaterMark));
|
|
48564
48582
|
}, [company === null || company === void 0 ? void 0 : company.shouldShowWaterMark]);
|
|
48565
|
-
const _onFinish = () => __awaiter(void 0, void 0, void 0, function* () { var _a, _b; return (_b = (_a = widgetConfig.config).onFinish) === null || _b === void 0 ? void 0 : _b.call(_a, { redirectUrl: candidate.redirectUrl, video_id: (video === null || video === void 0 ? void 0 : video.video_id) || '' }); });
|
|
48566
48583
|
React.useEffect(() => {
|
|
48584
|
+
var _a, _b;
|
|
48567
48585
|
if (machine.done) {
|
|
48568
|
-
|
|
48569
|
-
_onFinish().then(() => {
|
|
48570
|
-
emitTrackEvent({ eventType: EVENT_TYPES.ON_FINISH_SUCCEED });
|
|
48571
|
-
}).catch((err) => {
|
|
48572
|
-
var _a;
|
|
48573
|
-
let errorMessage = '';
|
|
48574
|
-
try {
|
|
48575
|
-
errorMessage = (err === null || err === void 0 ? void 0 : err.message) || (err === null || err === void 0 ? void 0 : err.msg) || ((_a = err === null || err === void 0 ? void 0 : err.data) === null || _a === void 0 ? void 0 : _a.message);
|
|
48576
|
-
}
|
|
48577
|
-
catch (_b) {
|
|
48578
|
-
//
|
|
48579
|
-
}
|
|
48580
|
-
emitTrackEvent({ eventType: EVENT_TYPES.ON_FINISH_FAILED, extraData: { errorMessage } });
|
|
48581
|
-
throw err;
|
|
48582
|
-
});
|
|
48583
|
-
}
|
|
48586
|
+
(_b = (_a = widgetConfig.config).onFinish) === null || _b === void 0 ? void 0 : _b.call(_a, { redirectUrl: candidate.redirectUrl, video_id: (video === null || video === void 0 ? void 0 : video.video_id) || '' });
|
|
48584
48587
|
}
|
|
48585
48588
|
}, [machine.done]);
|
|
48586
48589
|
React.useEffect(() => {
|
|
@@ -48596,16 +48599,11 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
|
|
|
48596
48599
|
});
|
|
48597
48600
|
}
|
|
48598
48601
|
}, [candidate, job === null || job === void 0 ? void 0 : job.language]);
|
|
48599
|
-
const setBackgroundOpacity = () => {
|
|
48600
|
-
var _a;
|
|
48601
|
-
(_a = myinterviewRef === null || myinterviewRef === void 0 ? void 0 : myinterviewRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty('--myinterview-background-opacity', isLoading || isErrorState ? '0' : '1');
|
|
48602
|
-
};
|
|
48603
48602
|
React.useEffect(() => {
|
|
48604
48603
|
var _a, _b;
|
|
48605
48604
|
if (isErrorState && (error === null || error === void 0 ? void 0 : error.statusCode) === 400) {
|
|
48606
48605
|
(_b = (_a = widgetConfig.config).onError) === null || _b === void 0 ? void 0 : _b.call(_a, { messageType: 'applied' });
|
|
48607
48606
|
}
|
|
48608
|
-
setBackgroundOpacity();
|
|
48609
48607
|
}, [isErrorState]);
|
|
48610
48608
|
const isResumed = React.useMemo(() => { var _a, _b; return !!((_b = (_a = widgetConfig.video) === null || _a === void 0 ? void 0 : _a.videos) === null || _b === void 0 ? void 0 : _b.some((v) => v.uploaded)); }, [widgetConfig.video]);
|
|
48611
48609
|
const handleScroll = (e) => {
|
|
@@ -48615,7 +48613,8 @@ const Main = ({ widgetConfig, setShouldShowWaterMark, myinterviewRef, isWidgetMi
|
|
|
48615
48613
|
(_b = viewsRef === null || viewsRef === void 0 ? void 0 : viewsRef.current) === null || _b === void 0 ? void 0 : _b.style.setProperty('--myinterview-widget-practice-opacity', scrollTop > 10 ? '0' : '1');
|
|
48616
48614
|
};
|
|
48617
48615
|
React.useEffect(() => {
|
|
48618
|
-
|
|
48616
|
+
var _a;
|
|
48617
|
+
(_a = myinterviewRef === null || myinterviewRef === void 0 ? void 0 : myinterviewRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty('--myinterview-background-opacity', isLoading || isErrorState ? '0' : '1');
|
|
48619
48618
|
}, [isLoading]);
|
|
48620
48619
|
const onRetry = () => {
|
|
48621
48620
|
send(EVENTS$5.RETRY);
|
|
@@ -48813,15 +48812,15 @@ const Widget = ({ candidate, job, video, config, disabled = false, buttonText =
|
|
|
48813
48812
|
revertBodyStyling();
|
|
48814
48813
|
setIsWidgetOpen(false);
|
|
48815
48814
|
};
|
|
48816
|
-
const onInterviewCompleted = (data) =>
|
|
48815
|
+
const onInterviewCompleted = (data) => {
|
|
48817
48816
|
var _a;
|
|
48817
|
+
(_a = config.onFinish) === null || _a === void 0 ? void 0 : _a.call(config, data);
|
|
48818
48818
|
onCloseWidget();
|
|
48819
|
-
|
|
48820
|
-
});
|
|
48819
|
+
};
|
|
48821
48820
|
const onError = (data) => {
|
|
48822
48821
|
var _a;
|
|
48823
|
-
onCloseWidget();
|
|
48824
48822
|
(_a = config.onError) === null || _a === void 0 ? void 0 : _a.call(config, data);
|
|
48823
|
+
onCloseWidget();
|
|
48825
48824
|
};
|
|
48826
48825
|
const openWidget = () => {
|
|
48827
48826
|
var _a;
|