@frontegg/js 6.148.0-alpha.0 → 6.148.0-alpha.2
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/FronteggApp/FronteggApp.d.ts +5 -23
- package/FronteggApp/FronteggApp.js +12 -44
- package/index.js +1 -1
- package/node/FronteggApp/FronteggApp.js +11 -43
- package/node/index.js +1 -1
- package/node/version.js +1 -1
- package/package.json +2 -2
- package/umd/frontegg.development.js +95 -1370
- package/umd/frontegg.production.min.js +1 -1
- package/umd/frontegg.production.min.js.LICENSE.txt +1 -1
- package/version.js +1 -1
|
@@ -294,29 +294,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
294
294
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
295
295
|
/* harmony export */ "FronteggApp": () => (/* binding */ FronteggApp)
|
|
296
296
|
/* harmony export */ });
|
|
297
|
-
/* harmony import */ var
|
|
298
|
-
/* harmony import */ var
|
|
299
|
-
/* harmony import */ var
|
|
300
|
-
/* harmony import */ var
|
|
301
|
-
/* harmony import */ var
|
|
302
|
-
/* harmony import */ var
|
|
303
|
-
/* harmony import */ var
|
|
304
|
-
/* harmony import */ var
|
|
305
|
-
/* harmony import */ var
|
|
306
|
-
/* harmony import */ var
|
|
307
|
-
/* harmony import */ var
|
|
308
|
-
/* harmony import */ var
|
|
309
|
-
/* harmony import */ var
|
|
310
|
-
/* harmony import */ var
|
|
311
|
-
/* harmony import */ var
|
|
312
|
-
/* harmony import */ var
|
|
313
|
-
/* harmony import */ var
|
|
314
|
-
/* harmony import */ var
|
|
315
|
-
/* harmony import */ var
|
|
316
|
-
/* harmony import */ var
|
|
317
|
-
/* harmony import */ var _utils_mockFlagsList__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/mockFlagsList */ "../../dist/@frontegg/js/utils/mockFlagsList.js");
|
|
318
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils */ "../../dist/@frontegg/js/FronteggApp/utils.js");
|
|
319
|
-
|
|
297
|
+
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "../../node_modules/@babel/runtime/helpers/esm/extends.js");
|
|
298
|
+
/* harmony import */ var _babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/asyncToGenerator */ "../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
|
|
299
|
+
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
|
|
300
|
+
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "../../node_modules/@babel/runtime/helpers/esm/createClass.js");
|
|
301
|
+
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/regenerator */ "../../node_modules/@babel/runtime/regenerator/index.js");
|
|
302
|
+
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4__);
|
|
303
|
+
/* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/toolkit/index.js");
|
|
304
|
+
/* harmony import */ var _frontegg_redux_store__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @frontegg/redux-store */ "../../dist/@frontegg/redux-store/auth/Entitlements/utils.js");
|
|
305
|
+
/* harmony import */ var _frontegg_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @frontegg/types */ "../../dist/@frontegg/types/Metadata/index.js");
|
|
306
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ "../../dist/@frontegg/js/utils/index.js");
|
|
307
|
+
/* harmony import */ var _AppHolder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../AppHolder */ "../../dist/@frontegg/js/AppHolder/index.js");
|
|
308
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/fetch.js");
|
|
309
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js");
|
|
310
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/interfaces.js");
|
|
311
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/feature-flags/index.js");
|
|
312
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/index.js");
|
|
313
|
+
/* harmony import */ var _frontegg_types__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @frontegg/types */ "../../dist/@frontegg/types/index.js");
|
|
314
|
+
/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../version */ "../../dist/@frontegg/js/version.js");
|
|
315
|
+
/* harmony import */ var _utils_mockFlagsList__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/mockFlagsList */ "../../dist/@frontegg/js/utils/mockFlagsList.js");
|
|
316
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils */ "../../dist/@frontegg/js/FronteggApp/utils.js");
|
|
320
317
|
|
|
321
318
|
|
|
322
319
|
|
|
@@ -340,12 +337,12 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
340
337
|
_options$authOptions;
|
|
341
338
|
var iframeRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
342
339
|
var allowMultipleRenderers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
343
|
-
(0,
|
|
340
|
+
(0,_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, FronteggApp);
|
|
344
341
|
this.name = void 0;
|
|
345
342
|
this.iframeRendering = void 0;
|
|
346
343
|
this.options = void 0;
|
|
347
344
|
this.loading = true;
|
|
348
|
-
this.cdnUrl = "https://assets.frontegg.com/admin-box/".concat(
|
|
345
|
+
this.cdnUrl = "https://assets.frontegg.com/admin-box/".concat(_version__WEBPACK_IMPORTED_MODULE_7__["default"].cdnVersion);
|
|
349
346
|
this.customElementName = '';
|
|
350
347
|
this.adminPortalEl = void 0;
|
|
351
348
|
this.adminPortalRenderer = void 0;
|
|
@@ -359,12 +356,12 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
359
356
|
this.store = void 0;
|
|
360
357
|
this.loadingListeners = [];
|
|
361
358
|
this.updateLocalizations = void 0;
|
|
362
|
-
this.loadAdminBoxMetadata = /*#__PURE__*/(0,
|
|
359
|
+
this.loadAdminBoxMetadata = /*#__PURE__*/(0,_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee() {
|
|
363
360
|
var Get, _data$rows$0$configur, _data$rows, _data$rows$, data;
|
|
364
|
-
return
|
|
361
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee$(_context) {
|
|
365
362
|
while (1) switch (_context.prev = _context.next) {
|
|
366
363
|
case 0:
|
|
367
|
-
Get =
|
|
364
|
+
Get = _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_10__.Get;
|
|
368
365
|
if (_this.options.metadata) {
|
|
369
366
|
_context.next = 12;
|
|
370
367
|
break;
|
|
@@ -384,17 +381,17 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
384
381
|
_context.t0 = _context["catch"](2);
|
|
385
382
|
console.error('failed to get admin portal metadata', _context.t0);
|
|
386
383
|
case 12:
|
|
387
|
-
|
|
384
|
+
_frontegg_types__WEBPACK_IMPORTED_MODULE_11__.Metadata.set(_this.options.metadata, _this.name);
|
|
388
385
|
case 13:
|
|
389
386
|
case "end":
|
|
390
387
|
return _context.stop();
|
|
391
388
|
}
|
|
392
389
|
}, _callee, null, [[2, 9]]);
|
|
393
390
|
}));
|
|
394
|
-
this.requestAuthorize = /*#__PURE__*/(0,
|
|
391
|
+
this.requestAuthorize = /*#__PURE__*/(0,_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee2() {
|
|
395
392
|
var _this$options$authOpt, _this$options$authOpt2;
|
|
396
393
|
var shouldRequestHostedLoginAuthorize;
|
|
397
|
-
return
|
|
394
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee2$(_context2) {
|
|
398
395
|
while (1) switch (_context2.prev = _context2.next) {
|
|
399
396
|
case 0:
|
|
400
397
|
shouldRequestHostedLoginAuthorize = (_this$options$authOpt = _this.options.authOptions) == null ? void 0 : (_this$options$authOpt2 = _this$options$authOpt.hostedLoginOptions) == null ? void 0 : _this$options$authOpt2.loadUserOnFirstLoad;
|
|
@@ -420,28 +417,28 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
420
417
|
}
|
|
421
418
|
}, _callee2);
|
|
422
419
|
}));
|
|
423
|
-
this.loadFeatureFlags = /*#__PURE__*/(0,
|
|
420
|
+
this.loadFeatureFlags = /*#__PURE__*/(0,_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee3() {
|
|
424
421
|
var flags;
|
|
425
|
-
return
|
|
422
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee3$(_context3) {
|
|
426
423
|
while (1) switch (_context3.prev = _context3.next) {
|
|
427
424
|
case 0:
|
|
428
425
|
if (!(_this.options.previewMode || _this.options.builderMode)) {
|
|
429
426
|
_context3.next = 4;
|
|
430
427
|
break;
|
|
431
428
|
}
|
|
432
|
-
|
|
429
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_12__.FeatureFlags.set(_utils_mockFlagsList__WEBPACK_IMPORTED_MODULE_8__.mockFlagsList, _this.name);
|
|
433
430
|
_context3.next = 15;
|
|
434
431
|
break;
|
|
435
432
|
case 4:
|
|
436
433
|
_context3.prev = 4;
|
|
437
434
|
_context3.next = 7;
|
|
438
|
-
return
|
|
435
|
+
return _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_12__.loadFeatureFlags();
|
|
439
436
|
case 7:
|
|
440
437
|
flags = _context3.sent;
|
|
441
438
|
if (_this.options.overrideFeatureFlags) {
|
|
442
439
|
Object.assign(flags, _this.options.overrideFeatureFlags);
|
|
443
440
|
}
|
|
444
|
-
|
|
441
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_12__.FeatureFlags.set(flags, _this.name);
|
|
445
442
|
_context3.next = 15;
|
|
446
443
|
break;
|
|
447
444
|
case 12:
|
|
@@ -455,10 +452,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
455
452
|
}, _callee3, null, [[4, 12]]);
|
|
456
453
|
}));
|
|
457
454
|
this.setFeatureFlagsForPreview = function (previewFeatureFlags) {
|
|
458
|
-
|
|
459
|
-
};
|
|
460
|
-
this.queryFeatureFlags = function (flags) {
|
|
461
|
-
return _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_13__.FeatureFlags.getFeatureFlags(flags, _this.name);
|
|
455
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_12__.FeatureFlags.set((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _utils_mockFlagsList__WEBPACK_IMPORTED_MODULE_8__.mockFlagsList, previewFeatureFlags), _this.name);
|
|
462
456
|
};
|
|
463
457
|
this.updateLocalizationsSetter = function (localizationUpdateFn) {
|
|
464
458
|
_this.updateLocalizations = localizationUpdateFn;
|
|
@@ -467,31 +461,12 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
467
461
|
var _this$store$getState$;
|
|
468
462
|
return (_this$store$getState$ = _this.store.getState().auth.user) == null ? void 0 : _this$store$getState$.entitlements;
|
|
469
463
|
};
|
|
470
|
-
|
|
471
|
-
return _this.store.getState().auth.user;
|
|
472
|
-
};
|
|
473
|
-
this.getEntitlementsQueryData = function (customAttributes) {
|
|
474
|
-
var user = _this.getUserFromStore();
|
|
475
|
-
var entitlements = _this.getEntitlementsFromStore();
|
|
476
|
-
var attributes = {
|
|
477
|
-
custom: customAttributes,
|
|
478
|
-
jwt: user
|
|
479
|
-
};
|
|
480
|
-
var _this$queryFeatureFla = _this.queryFeatureFlags([_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.USE_ENTITLEMENTS_V2_ENDPOINT_FF]),
|
|
481
|
-
_this$queryFeatureFla2 = (0,_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__["default"])(_this$queryFeatureFla, 1),
|
|
482
|
-
useEntitlementsV2 = _this$queryFeatureFla2[0];
|
|
483
|
-
return {
|
|
484
|
-
entitlements: entitlements,
|
|
485
|
-
attributes: attributes,
|
|
486
|
-
isV2: useEntitlementsV2
|
|
487
|
-
};
|
|
488
|
-
};
|
|
489
|
-
var appName = (0,_utils__WEBPACK_IMPORTED_MODULE_6__.formatName)(name);
|
|
464
|
+
var appName = (0,_utils__WEBPACK_IMPORTED_MODULE_5__.formatName)(name);
|
|
490
465
|
var customElementName = "frontegg-app-".concat(appName);
|
|
491
466
|
this.iframeRendering = iframeRendering;
|
|
492
467
|
this.name = appName;
|
|
493
|
-
this.options = (0,
|
|
494
|
-
contextOptions: (0,
|
|
468
|
+
this.options = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _options, {
|
|
469
|
+
contextOptions: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({
|
|
495
470
|
requestCredentials: 'include'
|
|
496
471
|
}, _options.contextOptions)
|
|
497
472
|
});
|
|
@@ -499,7 +474,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
499
474
|
this.cdnUrl = this.options.cdnUrl;
|
|
500
475
|
}
|
|
501
476
|
this.customElementName = customElementName;
|
|
502
|
-
var authOptions = this.options.authOptions ? (0,
|
|
477
|
+
var authOptions = this.options.authOptions ? (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, this.options.authOptions, {
|
|
503
478
|
hostedLoginBox: this.options.hostedLoginBox
|
|
504
479
|
}) : {
|
|
505
480
|
hostedLoginBox: this.options.hostedLoginBox
|
|
@@ -512,7 +487,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
512
487
|
}
|
|
513
488
|
} else {
|
|
514
489
|
var _this$options$authOpt4, _this$options$auditsO;
|
|
515
|
-
this.store = (0,
|
|
490
|
+
this.store = (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_13__.createFronteggStore)({
|
|
516
491
|
context: this.options.contextOptions,
|
|
517
492
|
appName: this.name
|
|
518
493
|
}, this, this.options.previewMode, authOptions, {
|
|
@@ -520,35 +495,35 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
520
495
|
audits: (_this$options$auditsO = this.options.auditsOptions) != null ? _this$options$auditsO : {}
|
|
521
496
|
}, false, this.options.urlStrategy);
|
|
522
497
|
}
|
|
523
|
-
|
|
498
|
+
_AppHolder__WEBPACK_IMPORTED_MODULE_6__.AppHolder.setInstance(appName, this);
|
|
524
499
|
this.setEntitlementsOptions(_options.entitlementsOptions);
|
|
525
500
|
this.setSessionContext({
|
|
526
501
|
enableSessionPerTenant: (_options$authOptions = _options.authOptions) == null ? void 0 : _options$authOptions.enableSessionPerTenant
|
|
527
502
|
});
|
|
528
503
|
|
|
529
504
|
// for feature flags (for entitlements)
|
|
530
|
-
|
|
505
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.ContextHolder.setAppName(appName);
|
|
531
506
|
}
|
|
532
507
|
|
|
533
508
|
/**
|
|
534
509
|
* Set entitlements related options in context holder according to frontegg options
|
|
535
510
|
* @param entitlementsOptions - entitlements options from frontegg options
|
|
536
511
|
*/
|
|
537
|
-
(0,
|
|
512
|
+
(0,_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(FronteggApp, [{
|
|
538
513
|
key: "setEntitlementsOptions",
|
|
539
514
|
value: function setEntitlementsOptions(entitlementsOptions) {
|
|
540
|
-
|
|
515
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.ContextHolder.setEntitlementsOptions((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, entitlementsOptions));
|
|
541
516
|
}
|
|
542
517
|
}, {
|
|
543
518
|
key: "setSessionContext",
|
|
544
519
|
value: function setSessionContext(sessionContext) {
|
|
545
|
-
|
|
520
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.ContextHolder.setSessionContext((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, sessionContext));
|
|
546
521
|
}
|
|
547
522
|
}, {
|
|
548
523
|
key: "initContainers",
|
|
549
524
|
value: function () {
|
|
550
|
-
var _initContainers = (0,
|
|
551
|
-
return
|
|
525
|
+
var _initContainers = (0,_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee4(elements) {
|
|
526
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee4$(_context4) {
|
|
552
527
|
while (1) switch (_context4.prev = _context4.next) {
|
|
553
528
|
case 0:
|
|
554
529
|
this.adminPortalEl = elements.adminPortalEl;
|
|
@@ -574,7 +549,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
574
549
|
case 11:
|
|
575
550
|
if (!this.options.previewMode && !this.options.customLoginBox) {
|
|
576
551
|
this.loadLoginBox();
|
|
577
|
-
(0,
|
|
552
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_9__.loadGTM)(this.name);
|
|
578
553
|
}
|
|
579
554
|
if (!this.options.lazyLoadAdminPortal) {
|
|
580
555
|
this.loadScript('FronteggAdminPortal');
|
|
@@ -593,7 +568,7 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
593
568
|
}, {
|
|
594
569
|
key: "updateMetadata",
|
|
595
570
|
value: function updateMetadata(metadata) {
|
|
596
|
-
|
|
571
|
+
_frontegg_types__WEBPACK_IMPORTED_MODULE_11__.Metadata.set(metadata, this.name);
|
|
597
572
|
if (metadata != null && metadata.localizations) {
|
|
598
573
|
var _this$updateLocalizat;
|
|
599
574
|
(_this$updateLocalizat = this.updateLocalizations) == null ? void 0 : _this$updateLocalizat.call(this, metadata.localizations);
|
|
@@ -669,8 +644,8 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
669
644
|
script.onload = function () {
|
|
670
645
|
if (window["".concat(component, "Init")]) {
|
|
671
646
|
resolve(window["".concat(component, "Init")]({
|
|
672
|
-
FronteggRestApi:
|
|
673
|
-
FronteggTypes:
|
|
647
|
+
FronteggRestApi: _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_15__,
|
|
648
|
+
FronteggTypes: _frontegg_types__WEBPACK_IMPORTED_MODULE_16__
|
|
674
649
|
}));
|
|
675
650
|
} else {
|
|
676
651
|
resolve(window[component]);
|
|
@@ -687,9 +662,9 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
687
662
|
}, {
|
|
688
663
|
key: "loadLoginBox",
|
|
689
664
|
value: function () {
|
|
690
|
-
var _loadLoginBox = (0,
|
|
665
|
+
var _loadLoginBox = (0,_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee5() {
|
|
691
666
|
var FronteggLoginBox;
|
|
692
|
-
return
|
|
667
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee5$(_context5) {
|
|
693
668
|
while (1) switch (_context5.prev = _context5.next) {
|
|
694
669
|
case 0:
|
|
695
670
|
_context5.next = 2;
|
|
@@ -723,12 +698,12 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
723
698
|
}, {
|
|
724
699
|
key: "showAdminPortal",
|
|
725
700
|
value: function () {
|
|
726
|
-
var _showAdminPortal = (0,
|
|
701
|
+
var _showAdminPortal = (0,_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee6() {
|
|
727
702
|
var FronteggAdminPortal;
|
|
728
|
-
return
|
|
703
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee6$(_context6) {
|
|
729
704
|
while (1) switch (_context6.prev = _context6.next) {
|
|
730
705
|
case 0:
|
|
731
|
-
|
|
706
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.ContextHolder.setRequestSource(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_17__.RequestSource.AdminPortal);
|
|
732
707
|
_context6.next = 3;
|
|
733
708
|
return this.loadScript('FronteggAdminPortal');
|
|
734
709
|
case 3:
|
|
@@ -756,8 +731,8 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
756
731
|
var searchParams = new URLSearchParams(window.location.search);
|
|
757
732
|
(_this$adminPortalRend = this.adminPortalRenderer) == null ? void 0 : _this$adminPortalRend.unmount();
|
|
758
733
|
// unmount is removing url search params, therefore we need to restore them after unmount
|
|
759
|
-
(0,
|
|
760
|
-
|
|
734
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_5__.restoreSearchParams)(searchParams);
|
|
735
|
+
_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_14__.ContextHolder.setRequestSource(null);
|
|
761
736
|
} catch (e) {
|
|
762
737
|
console.error('Failed to unmount admin portal', e);
|
|
763
738
|
}
|
|
@@ -765,16 +740,16 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
765
740
|
}, {
|
|
766
741
|
key: "showCheckoutDialog",
|
|
767
742
|
value: function () {
|
|
768
|
-
var _showCheckoutDialog = (0,
|
|
743
|
+
var _showCheckoutDialog = (0,_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee7(opts) {
|
|
769
744
|
var FronteggAdminPortal;
|
|
770
|
-
return
|
|
745
|
+
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee7$(_context7) {
|
|
771
746
|
while (1) switch (_context7.prev = _context7.next) {
|
|
772
747
|
case 0:
|
|
773
748
|
_context7.next = 2;
|
|
774
749
|
return this.loadScript('FronteggAdminPortal');
|
|
775
750
|
case 2:
|
|
776
751
|
FronteggAdminPortal = _context7.sent;
|
|
777
|
-
this.checkoutDialogRenderer = FronteggAdminPortal.renderCheckoutDialog(this.checkoutDialogEl, (0,
|
|
752
|
+
this.checkoutDialogRenderer = FronteggAdminPortal.renderCheckoutDialog(this.checkoutDialogEl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({
|
|
778
753
|
injector: this
|
|
779
754
|
}, opts, {
|
|
780
755
|
options: this.options
|
|
@@ -808,49 +783,40 @@ var FronteggApp = /*#__PURE__*/function () {
|
|
|
808
783
|
key: "getFeatureEntitlements",
|
|
809
784
|
value:
|
|
810
785
|
/**
|
|
811
|
-
@param key
|
|
812
|
-
@param customAttributes user attributes
|
|
786
|
+
@param key
|
|
813
787
|
@returns if the user is entitled to the given feature. Attaching the justification if not
|
|
814
788
|
@throws when entitlement is not enabled via frontegg options
|
|
815
789
|
*/
|
|
816
|
-
function getFeatureEntitlements(key
|
|
817
|
-
var
|
|
818
|
-
|
|
819
|
-
attributes = _this$getEntitlements.attributes,
|
|
820
|
-
isV2 = _this$getEntitlements.isV2;
|
|
821
|
-
return (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_20__.getFeatureEntitlements)(entitlements, key, attributes, isV2);
|
|
790
|
+
function getFeatureEntitlements(key) {
|
|
791
|
+
var entitlements = this.getEntitlementsFromStore();
|
|
792
|
+
return (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_18__.getFeatureEntitlements)(entitlements, key);
|
|
822
793
|
}
|
|
823
794
|
|
|
824
795
|
/**
|
|
825
|
-
@param key
|
|
826
|
-
@param customAttributes user attributes
|
|
796
|
+
@param key
|
|
827
797
|
@returns if the user is entitled to the given permission. Attaching the justification if not
|
|
828
798
|
@throws when entitlement is not enabled via frontegg options
|
|
829
799
|
*/
|
|
830
800
|
}, {
|
|
831
801
|
key: "getPermissionEntitlements",
|
|
832
|
-
value: function getPermissionEntitlements(key
|
|
833
|
-
var
|
|
834
|
-
|
|
835
|
-
attributes = _this$getEntitlements2.attributes,
|
|
836
|
-
isV2 = _this$getEntitlements2.isV2;
|
|
837
|
-
return (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_20__.getPermissionEntitlements)(entitlements, key, attributes, isV2);
|
|
802
|
+
value: function getPermissionEntitlements(key) {
|
|
803
|
+
var entitlements = this.getEntitlementsFromStore();
|
|
804
|
+
return (0,_frontegg_redux_store__WEBPACK_IMPORTED_MODULE_18__.getPermissionEntitlements)(entitlements, key);
|
|
838
805
|
}
|
|
839
806
|
|
|
840
807
|
/**
|
|
841
808
|
@param options - including permission or feature key
|
|
842
|
-
@param customAttributes user attributes
|
|
843
809
|
@returns if the user is entitled to the given permission or feature. Attaching the justification if not
|
|
844
810
|
@throws when entitlement is not enabled via frontegg options
|
|
845
811
|
*/
|
|
846
812
|
}, {
|
|
847
813
|
key: "getEntitlements",
|
|
848
|
-
value: function getEntitlements(options
|
|
814
|
+
value: function getEntitlements(options) {
|
|
849
815
|
// we use permissionKey (options key) to decide if the user is using permission key or feature key
|
|
850
816
|
if ('permissionKey' in options) {
|
|
851
|
-
return this.getPermissionEntitlements(options.permissionKey
|
|
817
|
+
return this.getPermissionEntitlements(options.permissionKey);
|
|
852
818
|
}
|
|
853
|
-
return this.getFeatureEntitlements(options.featureKey
|
|
819
|
+
return this.getFeatureEntitlements(options.featureKey);
|
|
854
820
|
}
|
|
855
821
|
|
|
856
822
|
/**
|
|
@@ -1414,7 +1380,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1414
1380
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1415
1381
|
/* harmony export */ });
|
|
1416
1382
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
1417
|
-
cdnVersion: '6.148.0-alpha.
|
|
1383
|
+
cdnVersion: '6.148.0-alpha.2'
|
|
1418
1384
|
});
|
|
1419
1385
|
|
|
1420
1386
|
/***/ }),
|
|
@@ -4074,12 +4040,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4074
4040
|
/* harmony import */ var fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fast-deep-equal */ "../../node_modules/fast-deep-equal/index.js");
|
|
4075
4041
|
/* harmony import */ var fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fast_deep_equal__WEBPACK_IMPORTED_MODULE_0__);
|
|
4076
4042
|
/* harmony import */ var redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux-saga/effects */ "../../node_modules/redux-saga/dist/redux-saga-effects-npm-proxy.esm.js");
|
|
4077
|
-
/* harmony import */ var
|
|
4078
|
-
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/index.js");
|
|
4043
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/index.js");
|
|
4079
4044
|
/* harmony import */ var _reducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../reducer */ "../../dist/@frontegg/redux-store/auth/reducer.js");
|
|
4080
|
-
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../helpers */ "../../dist/@frontegg/redux-store/helpers.js");
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
4045
|
|
|
4084
4046
|
|
|
4085
4047
|
|
|
@@ -4120,9 +4082,8 @@ function* loadEntitlements({
|
|
|
4120
4082
|
payload
|
|
4121
4083
|
}) {
|
|
4122
4084
|
const callback = payload == null ? void 0 : payload.callback;
|
|
4123
|
-
const [useEntitlementsV2] = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.call)(_helpers__WEBPACK_IMPORTED_MODULE_3__.getFeatureFlags, [_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_4__.USE_ENTITLEMENTS_V2_ENDPOINT_FF]);
|
|
4124
4085
|
try {
|
|
4125
|
-
const entitlements = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.call)(
|
|
4086
|
+
const entitlements = yield (0,redux_saga_effects__WEBPACK_IMPORTED_MODULE_1__.call)(_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_3__.api.entitlements.loadEntitlements);
|
|
4126
4087
|
yield handleFetchedEntitlements(entitlements);
|
|
4127
4088
|
callback == null ? void 0 : callback(true);
|
|
4128
4089
|
} catch (e) {
|
|
@@ -4148,21 +4109,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4148
4109
|
/* harmony export */ "getFeatureEntitlements": () => (/* binding */ getFeatureEntitlements),
|
|
4149
4110
|
/* harmony export */ "getPermissionEntitlements": () => (/* binding */ getPermissionEntitlements)
|
|
4150
4111
|
/* harmony export */ });
|
|
4151
|
-
/* harmony import */ var
|
|
4152
|
-
/* harmony import */ var
|
|
4153
|
-
/* harmony import */ var _frontegg_entitlements_javascript_commons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @frontegg/entitlements-javascript-commons */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/index.js");
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
/**
|
|
4157
|
-
* NOTE: This file including the usage of user entitlements API V1 and V2. The BE API response is diffrent.
|
|
4158
|
-
* V1 is the initial implementation.
|
|
4159
|
-
* V2 is using the entitlenents package for Rule Based entitlements.
|
|
4160
|
-
*
|
|
4161
|
-
* V1 is still supported with feature flag but it's depracated.
|
|
4162
|
-
*
|
|
4163
|
-
* The entitlements query functions supports both APIs by an optional argument of [isV2] to decide what version to choose.
|
|
4164
|
-
* The function returns the same type.
|
|
4165
|
-
*/
|
|
4112
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js");
|
|
4113
|
+
/* harmony import */ var _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @frontegg/rest-api */ "../../node_modules/@frontegg/rest-api/entitlements/interfaces.js");
|
|
4166
4114
|
|
|
4167
4115
|
const ENTITLEMENTS_NOT_ENABLED_EXCEPTION_TEXT = 'You must first enable entitlements via Frontegg options to use this function';
|
|
4168
4116
|
|
|
@@ -4171,19 +4119,18 @@ const ENTITLEMENTS_NOT_ENABLED_EXCEPTION_TEXT = 'You must first enable entitleme
|
|
|
4171
4119
|
* @throws when entitlement is not enabled via frontegg options
|
|
4172
4120
|
*/
|
|
4173
4121
|
const guardEntitlementsUsage = () => {
|
|
4174
|
-
if (
|
|
4122
|
+
if (_frontegg_rest_api__WEBPACK_IMPORTED_MODULE_0__.ContextHolder.shouldLoadEntitlements()) return;
|
|
4175
4123
|
throw new Error(ENTITLEMENTS_NOT_ENABLED_EXCEPTION_TEXT);
|
|
4176
4124
|
};
|
|
4177
4125
|
|
|
4178
4126
|
/**
|
|
4179
|
-
For user entitlements API V1
|
|
4180
|
-
|
|
4181
4127
|
@param keyEntitlements permission or feature data object
|
|
4182
4128
|
@param missingKeyEnum missing key for scenario that the key does not exist in entitlementsValuePerKeys
|
|
4183
4129
|
@returns if the user is entitled to the given key. Attaching the justification if not
|
|
4184
4130
|
@throws when entitlement is not enabled via frontegg options
|
|
4185
4131
|
*/
|
|
4186
|
-
const
|
|
4132
|
+
const getEntitlementsHelper = (keyEntitlements, missingKeyEnum) => {
|
|
4133
|
+
guardEntitlementsUsage();
|
|
4187
4134
|
if (!keyEntitlements) {
|
|
4188
4135
|
return {
|
|
4189
4136
|
isEntitled: false,
|
|
@@ -4203,51 +4150,37 @@ const getEntitlementsHelperV1 = (keyEntitlements, missingKeyEnum) => {
|
|
|
4203
4150
|
|
|
4204
4151
|
/**
|
|
4205
4152
|
@param entitlements
|
|
4206
|
-
@param key
|
|
4207
|
-
@param attributes entitlements query attributes including comnsumer and frontegg attributes
|
|
4208
|
-
@param isV2 true when need to use entitlements API V2
|
|
4153
|
+
@param key
|
|
4209
4154
|
@returns if the user is entitled to the given permission. Attaching the justification if not
|
|
4210
4155
|
@throws when entitlement is not enabled via frontegg options
|
|
4211
4156
|
*/
|
|
4212
|
-
const getPermissionEntitlements = (entitlements, key
|
|
4213
|
-
var
|
|
4214
|
-
|
|
4215
|
-
if (isV2) {
|
|
4216
|
-
return (0,_frontegg_entitlements_javascript_commons__WEBPACK_IMPORTED_MODULE_0__.evaluateIsEntitledToPermissions)(key, entitlements, attributes);
|
|
4217
|
-
}
|
|
4218
|
-
return getEntitlementsHelperV1(entitlements == null ? void 0 : (_permissions = entitlements.permissions) == null ? void 0 : _permissions[key], _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__.NotEntitledJustification.MISSING_PERMISSION);
|
|
4157
|
+
const getPermissionEntitlements = (entitlements, key) => {
|
|
4158
|
+
var _entitlements$permiss;
|
|
4159
|
+
return getEntitlementsHelper(entitlements == null ? void 0 : (_entitlements$permiss = entitlements.permissions) == null ? void 0 : _entitlements$permiss[key], _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__.NotEntitledJustification.MISSING_PERMISSION);
|
|
4219
4160
|
};
|
|
4220
4161
|
|
|
4221
4162
|
/**
|
|
4222
4163
|
@param entitlements
|
|
4223
|
-
@param key
|
|
4224
|
-
@param attributes entitlements query attributes including comnsumer and frontegg attributes
|
|
4225
|
-
@param isV2 true when need to use entitlements API V2
|
|
4164
|
+
@param key
|
|
4226
4165
|
@returns if the user is entitled to the given feature. Attaching the justification if not
|
|
4227
4166
|
@throws when entitlement is not enabled via frontegg options
|
|
4228
4167
|
*/
|
|
4229
|
-
const getFeatureEntitlements = (entitlements, key
|
|
4230
|
-
var
|
|
4231
|
-
|
|
4232
|
-
if (isV2) {
|
|
4233
|
-
return (0,_frontegg_entitlements_javascript_commons__WEBPACK_IMPORTED_MODULE_0__.evaluateIsEntitledToFeature)(key, entitlements, attributes);
|
|
4234
|
-
}
|
|
4235
|
-
return getEntitlementsHelperV1(entitlements == null ? void 0 : (_features = entitlements.features) == null ? void 0 : _features[key], _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_2__.NotEntitledJustification.MISSING_FEATURE);
|
|
4168
|
+
const getFeatureEntitlements = (entitlements, key) => {
|
|
4169
|
+
var _entitlements$feature;
|
|
4170
|
+
return getEntitlementsHelper(entitlements == null ? void 0 : (_entitlements$feature = entitlements.features) == null ? void 0 : _entitlements$feature[key], _frontegg_rest_api__WEBPACK_IMPORTED_MODULE_1__.NotEntitledJustification.MISSING_FEATURE);
|
|
4236
4171
|
};
|
|
4237
4172
|
|
|
4238
4173
|
/**
|
|
4239
4174
|
@param entitlements
|
|
4240
4175
|
@param options including permission or feature
|
|
4241
|
-
@param attributes entitlements query attributes including comnsumer and frontegg attributes
|
|
4242
|
-
@param isV2 true when need to use entitlements API V2
|
|
4243
4176
|
@returns if the user is entitled to the given feature or permission (check only one). Attaching the justification if not
|
|
4244
4177
|
@throws when entitlement is not enabled via frontegg options
|
|
4245
4178
|
*/
|
|
4246
|
-
const getEntitlements = (entitlements, options
|
|
4179
|
+
const getEntitlements = (entitlements, options) => {
|
|
4247
4180
|
if ('permissionKey' in options) {
|
|
4248
|
-
return getPermissionEntitlements(entitlements, options.permissionKey
|
|
4181
|
+
return getPermissionEntitlements(entitlements, options.permissionKey);
|
|
4249
4182
|
}
|
|
4250
|
-
return getFeatureEntitlements(entitlements, options.featureKey
|
|
4183
|
+
return getFeatureEntitlements(entitlements, options.featureKey);
|
|
4251
4184
|
};
|
|
4252
4185
|
|
|
4253
4186
|
/***/ }),
|
|
@@ -23245,7 +23178,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23245
23178
|
/* harmony export */ });
|
|
23246
23179
|
/* harmony import */ var _ThemeOptions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeOptions */ "../../dist/@frontegg/types/ThemeOptions/index.js");
|
|
23247
23180
|
/* harmony import */ var _Metadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Metadata */ "../../dist/@frontegg/types/Metadata/index.js");
|
|
23248
|
-
/** @license Frontegg v6.148.0-alpha.
|
|
23181
|
+
/** @license Frontegg v6.148.0-alpha.2
|
|
23249
23182
|
*
|
|
23250
23183
|
* This source code is licensed under the MIT license found in the
|
|
23251
23184
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -23260,1068 +23193,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23260
23193
|
|
|
23261
23194
|
|
|
23262
23195
|
|
|
23263
|
-
/***/ }),
|
|
23264
|
-
|
|
23265
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/conditions/condition.evaluator.js":
|
|
23266
|
-
/*!***********************************************************************************************************!*\
|
|
23267
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/conditions/condition.evaluator.js ***!
|
|
23268
|
-
\***********************************************************************************************************/
|
|
23269
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23270
|
-
|
|
23271
|
-
"use strict";
|
|
23272
|
-
|
|
23273
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23274
|
-
exports.createConditionEvaluator = void 0;
|
|
23275
|
-
const operation_resolver_1 = __webpack_require__(/*! ../operations/components/operation.resolver */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/components/operation.resolver.js");
|
|
23276
|
-
const sanitizers_resolver_1 = __webpack_require__(/*! ../operations/components/sanitizers.resolver */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/components/sanitizers.resolver.js");
|
|
23277
|
-
function failingConditionEvaluator() {
|
|
23278
|
-
return () => false;
|
|
23279
|
-
}
|
|
23280
|
-
function createConditionEvaluator(payload) {
|
|
23281
|
-
const sanitizer = (0, sanitizers_resolver_1.useSanitizer)(payload.condition.op);
|
|
23282
|
-
if (!sanitizer) {
|
|
23283
|
-
return failingConditionEvaluator();
|
|
23284
|
-
}
|
|
23285
|
-
const { isSanitized, sanitizedValue } = sanitizer(payload.condition.value);
|
|
23286
|
-
if (!isSanitized || sanitizedValue === undefined) {
|
|
23287
|
-
return failingConditionEvaluator();
|
|
23288
|
-
}
|
|
23289
|
-
const operation = (0, operation_resolver_1.useOperation)(payload.condition.op, sanitizedValue);
|
|
23290
|
-
return (attributes) => {
|
|
23291
|
-
const attributeKey = payload.condition.attribute;
|
|
23292
|
-
const value = attributes[attributeKey];
|
|
23293
|
-
const { isValid: result } = value !== undefined && operation ? operation(value) : { isValid: false };
|
|
23294
|
-
return payload.condition.negate ? !result : result;
|
|
23295
|
-
};
|
|
23296
|
-
}
|
|
23297
|
-
exports.createConditionEvaluator = createConditionEvaluator;
|
|
23298
|
-
//# sourceMappingURL=condition.evaluator.js.map
|
|
23299
|
-
|
|
23300
|
-
/***/ }),
|
|
23301
|
-
|
|
23302
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/conditions/index.js":
|
|
23303
|
-
/*!*********************************************************************************************!*\
|
|
23304
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/conditions/index.js ***!
|
|
23305
|
-
\*********************************************************************************************/
|
|
23306
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
23307
|
-
|
|
23308
|
-
"use strict";
|
|
23309
|
-
|
|
23310
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23311
|
-
if (k2 === undefined) k2 = k;
|
|
23312
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23313
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23314
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23315
|
-
}
|
|
23316
|
-
Object.defineProperty(o, k2, desc);
|
|
23317
|
-
}) : (function(o, m, k, k2) {
|
|
23318
|
-
if (k2 === undefined) k2 = k;
|
|
23319
|
-
o[k2] = m[k];
|
|
23320
|
-
}));
|
|
23321
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23322
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23323
|
-
};
|
|
23324
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23325
|
-
__exportStar(__webpack_require__(/*! ./condition.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/conditions/condition.evaluator.js"), exports);
|
|
23326
|
-
__exportStar(__webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/conditions/types.js"), exports);
|
|
23327
|
-
//# sourceMappingURL=index.js.map
|
|
23328
|
-
|
|
23329
|
-
/***/ }),
|
|
23330
|
-
|
|
23331
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/conditions/types.js":
|
|
23332
|
-
/*!*********************************************************************************************!*\
|
|
23333
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/conditions/types.js ***!
|
|
23334
|
-
\*********************************************************************************************/
|
|
23335
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
23336
|
-
|
|
23337
|
-
"use strict";
|
|
23338
|
-
|
|
23339
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23340
|
-
//# sourceMappingURL=types.js.map
|
|
23341
|
-
|
|
23342
|
-
/***/ }),
|
|
23343
|
-
|
|
23344
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/feature-flags/feature-flag.evaluator.js":
|
|
23345
|
-
/*!*****************************************************************************************************************!*\
|
|
23346
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/feature-flags/feature-flag.evaluator.js ***!
|
|
23347
|
-
\*****************************************************************************************************************/
|
|
23348
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23349
|
-
|
|
23350
|
-
"use strict";
|
|
23351
|
-
|
|
23352
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23353
|
-
exports.evaluateFeatureFlag = void 0;
|
|
23354
|
-
const rules_1 = __webpack_require__(/*! ../rules */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js");
|
|
23355
|
-
function evaluateFeatureFlag(featureFlag, attributes) {
|
|
23356
|
-
if (!featureFlag.on) {
|
|
23357
|
-
return { treatment: featureFlag.offTreatment };
|
|
23358
|
-
}
|
|
23359
|
-
const treatableRule = findTreatableRule(featureFlag, attributes);
|
|
23360
|
-
if (treatableRule) {
|
|
23361
|
-
return { treatment: treatableRule.treatment };
|
|
23362
|
-
}
|
|
23363
|
-
return { treatment: featureFlag.defaultTreatment };
|
|
23364
|
-
}
|
|
23365
|
-
exports.evaluateFeatureFlag = evaluateFeatureFlag;
|
|
23366
|
-
function findTreatableRule(featureFlag, attributes) {
|
|
23367
|
-
var _a;
|
|
23368
|
-
return (_a = featureFlag.rules) === null || _a === void 0 ? void 0 : _a.find((rule) => {
|
|
23369
|
-
const evaluator = (0, rules_1.createRuleEvaluator)({ rule });
|
|
23370
|
-
const result = evaluator(attributes);
|
|
23371
|
-
return result === rules_1.RuleEvaluationResultEnum.Treatable;
|
|
23372
|
-
});
|
|
23373
|
-
}
|
|
23374
|
-
//# sourceMappingURL=feature-flag.evaluator.js.map
|
|
23375
|
-
|
|
23376
|
-
/***/ }),
|
|
23377
|
-
|
|
23378
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/feature-flags/index.js":
|
|
23379
|
-
/*!************************************************************************************************!*\
|
|
23380
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/feature-flags/index.js ***!
|
|
23381
|
-
\************************************************************************************************/
|
|
23382
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
23383
|
-
|
|
23384
|
-
"use strict";
|
|
23385
|
-
|
|
23386
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23387
|
-
if (k2 === undefined) k2 = k;
|
|
23388
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23389
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23390
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23391
|
-
}
|
|
23392
|
-
Object.defineProperty(o, k2, desc);
|
|
23393
|
-
}) : (function(o, m, k, k2) {
|
|
23394
|
-
if (k2 === undefined) k2 = k;
|
|
23395
|
-
o[k2] = m[k];
|
|
23396
|
-
}));
|
|
23397
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23398
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23399
|
-
};
|
|
23400
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23401
|
-
__exportStar(__webpack_require__(/*! ./feature-flag.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/feature-flags/feature-flag.evaluator.js"), exports);
|
|
23402
|
-
//# sourceMappingURL=index.js.map
|
|
23403
|
-
|
|
23404
|
-
/***/ }),
|
|
23405
|
-
|
|
23406
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/index.js":
|
|
23407
|
-
/*!**********************************************************************************!*\
|
|
23408
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/index.js ***!
|
|
23409
|
-
\**********************************************************************************/
|
|
23410
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23411
|
-
|
|
23412
|
-
"use strict";
|
|
23413
|
-
|
|
23414
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23415
|
-
exports.NotEntitledJustification = exports.prepareAttributes = exports.evaluateIsEntitledToPermissions = exports.evaluateIsEntitledToFeature = exports.OperationEnum = exports.TreatmentEnum = exports.evaluateFeatureFlag = void 0;
|
|
23416
|
-
var feature_flags_1 = __webpack_require__(/*! ./feature-flags */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/feature-flags/index.js");
|
|
23417
|
-
Object.defineProperty(exports, "evaluateFeatureFlag", ({ enumerable: true, get: function () { return feature_flags_1.evaluateFeatureFlag; } }));
|
|
23418
|
-
var rules_1 = __webpack_require__(/*! ./rules */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js");
|
|
23419
|
-
Object.defineProperty(exports, "TreatmentEnum", ({ enumerable: true, get: function () { return rules_1.TreatmentEnum; } }));
|
|
23420
|
-
var types_1 = __webpack_require__(/*! ./operations/types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
|
|
23421
|
-
Object.defineProperty(exports, "OperationEnum", ({ enumerable: true, get: function () { return types_1.OperationEnum; } }));
|
|
23422
|
-
var user_entitlements_1 = __webpack_require__(/*! ./user-entitlements */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/index.js");
|
|
23423
|
-
Object.defineProperty(exports, "evaluateIsEntitledToFeature", ({ enumerable: true, get: function () { return user_entitlements_1.evaluateIsEntitledToFeature; } }));
|
|
23424
|
-
Object.defineProperty(exports, "evaluateIsEntitledToPermissions", ({ enumerable: true, get: function () { return user_entitlements_1.evaluateIsEntitledToPermissions; } }));
|
|
23425
|
-
Object.defineProperty(exports, "prepareAttributes", ({ enumerable: true, get: function () { return user_entitlements_1.prepareAttributes; } }));
|
|
23426
|
-
Object.defineProperty(exports, "NotEntitledJustification", ({ enumerable: true, get: function () { return user_entitlements_1.NotEntitledJustification; } }));
|
|
23427
|
-
//# sourceMappingURL=index.js.map
|
|
23428
|
-
|
|
23429
|
-
/***/ }),
|
|
23430
|
-
|
|
23431
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/index.js":
|
|
23432
|
-
/*!*****************************************************************************************************!*\
|
|
23433
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/index.js ***!
|
|
23434
|
-
\*****************************************************************************************************/
|
|
23435
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
23436
|
-
|
|
23437
|
-
"use strict";
|
|
23438
|
-
|
|
23439
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23440
|
-
if (k2 === undefined) k2 = k;
|
|
23441
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23442
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23443
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23444
|
-
}
|
|
23445
|
-
Object.defineProperty(o, k2, desc);
|
|
23446
|
-
}) : (function(o, m, k, k2) {
|
|
23447
|
-
if (k2 === undefined) k2 = k;
|
|
23448
|
-
o[k2] = m[k];
|
|
23449
|
-
}));
|
|
23450
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23451
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23452
|
-
};
|
|
23453
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23454
|
-
exports.BooleanOperationsMapper = void 0;
|
|
23455
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
|
|
23456
|
-
const operations_1 = __webpack_require__(/*! ./operations */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/operations.js");
|
|
23457
|
-
__exportStar(__webpack_require__(/*! ./operations */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/operations.js"), exports);
|
|
23458
|
-
__exportStar(__webpack_require__(/*! ./sanitizers */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/sanitizers.js"), exports);
|
|
23459
|
-
exports.BooleanOperationsMapper = {
|
|
23460
|
-
[types_1.OperationEnum.Is]: (value) => (0, operations_1.useIsOperation)(value),
|
|
23461
|
-
};
|
|
23462
|
-
//# sourceMappingURL=index.js.map
|
|
23463
|
-
|
|
23464
|
-
/***/ }),
|
|
23465
|
-
|
|
23466
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/operations.js":
|
|
23467
|
-
/*!**********************************************************************************************************!*\
|
|
23468
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/operations.js ***!
|
|
23469
|
-
\**********************************************************************************************************/
|
|
23470
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
23471
|
-
|
|
23472
|
-
"use strict";
|
|
23473
|
-
|
|
23474
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23475
|
-
exports.useIsOperation = void 0;
|
|
23476
|
-
function useIsOperation(payload) {
|
|
23477
|
-
return (attribute) => ({ isValid: attribute === payload.boolean });
|
|
23478
|
-
}
|
|
23479
|
-
exports.useIsOperation = useIsOperation;
|
|
23480
|
-
//# sourceMappingURL=operations.js.map
|
|
23481
|
-
|
|
23482
|
-
/***/ }),
|
|
23483
|
-
|
|
23484
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/sanitizers.js":
|
|
23485
|
-
/*!**********************************************************************************************************!*\
|
|
23486
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/sanitizers.js ***!
|
|
23487
|
-
\**********************************************************************************************************/
|
|
23488
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23489
|
-
|
|
23490
|
-
"use strict";
|
|
23491
|
-
|
|
23492
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23493
|
-
exports.BooleanSanitizersMapper = exports.singleBooleanSanitizer = void 0;
|
|
23494
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
|
|
23495
|
-
const isBoolean = (value) => typeof value === 'boolean';
|
|
23496
|
-
const singleBooleanSanitizer = (value) => {
|
|
23497
|
-
const sanitizedValue = value.boolean !== undefined && isBoolean(value.boolean) ? { boolean: value.boolean } : undefined;
|
|
23498
|
-
return {
|
|
23499
|
-
isSanitized: !!sanitizedValue,
|
|
23500
|
-
sanitizedValue,
|
|
23501
|
-
};
|
|
23502
|
-
};
|
|
23503
|
-
exports.singleBooleanSanitizer = singleBooleanSanitizer;
|
|
23504
|
-
exports.BooleanSanitizersMapper = {
|
|
23505
|
-
[types_1.OperationEnum.Is]: exports.singleBooleanSanitizer,
|
|
23506
|
-
};
|
|
23507
|
-
//# sourceMappingURL=sanitizers.js.map
|
|
23508
|
-
|
|
23509
|
-
/***/ }),
|
|
23510
|
-
|
|
23511
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/components/operation.resolver.js":
|
|
23512
|
-
/*!*********************************************************************************************************************!*\
|
|
23513
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/components/operation.resolver.js ***!
|
|
23514
|
-
\*********************************************************************************************************************/
|
|
23515
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23516
|
-
|
|
23517
|
-
"use strict";
|
|
23518
|
-
|
|
23519
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23520
|
-
exports.useOperation = void 0;
|
|
23521
|
-
const string_1 = __webpack_require__(/*! ../string */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/index.js");
|
|
23522
|
-
const numeric_1 = __webpack_require__(/*! ../numeric */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/index.js");
|
|
23523
|
-
const date_1 = __webpack_require__(/*! ../date */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/index.js");
|
|
23524
|
-
const boolean_1 = __webpack_require__(/*! ../boolean */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/index.js");
|
|
23525
|
-
const operationEnrichersMapper = {
|
|
23526
|
-
...string_1.StringOperationsMapper,
|
|
23527
|
-
...numeric_1.NumericOperationsMapper,
|
|
23528
|
-
...date_1.DateOperationsMapper,
|
|
23529
|
-
...boolean_1.BooleanOperationsMapper,
|
|
23530
|
-
};
|
|
23531
|
-
function useOperation(operation, value) {
|
|
23532
|
-
const operationContextEnricher = operationEnrichersMapper[operation];
|
|
23533
|
-
return operationContextEnricher ? operationContextEnricher(value) : undefined;
|
|
23534
|
-
}
|
|
23535
|
-
exports.useOperation = useOperation;
|
|
23536
|
-
//# sourceMappingURL=operation.resolver.js.map
|
|
23537
|
-
|
|
23538
|
-
/***/ }),
|
|
23539
|
-
|
|
23540
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/components/sanitizers.resolver.js":
|
|
23541
|
-
/*!**********************************************************************************************************************!*\
|
|
23542
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/components/sanitizers.resolver.js ***!
|
|
23543
|
-
\**********************************************************************************************************************/
|
|
23544
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23545
|
-
|
|
23546
|
-
"use strict";
|
|
23547
|
-
|
|
23548
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23549
|
-
exports.useSanitizer = void 0;
|
|
23550
|
-
const boolean_1 = __webpack_require__(/*! ../boolean */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/boolean/index.js");
|
|
23551
|
-
const sanitizers_1 = __webpack_require__(/*! ../string/sanitizers */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/sanitizers.js");
|
|
23552
|
-
const sanitizers_2 = __webpack_require__(/*! ../date/sanitizers */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/sanitizers.js");
|
|
23553
|
-
const numeric_1 = __webpack_require__(/*! ../numeric */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/index.js");
|
|
23554
|
-
const SanitizersMapper = {
|
|
23555
|
-
...sanitizers_1.StringSanitizersMapper,
|
|
23556
|
-
...numeric_1.NumericSanitizersMapper,
|
|
23557
|
-
...sanitizers_2.DateSanitizersMapper,
|
|
23558
|
-
...boolean_1.BooleanSanitizersMapper,
|
|
23559
|
-
};
|
|
23560
|
-
function useSanitizer(operation) {
|
|
23561
|
-
return SanitizersMapper[operation];
|
|
23562
|
-
}
|
|
23563
|
-
exports.useSanitizer = useSanitizer;
|
|
23564
|
-
//# sourceMappingURL=sanitizers.resolver.js.map
|
|
23565
|
-
|
|
23566
|
-
/***/ }),
|
|
23567
|
-
|
|
23568
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/index.js":
|
|
23569
|
-
/*!**************************************************************************************************!*\
|
|
23570
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/index.js ***!
|
|
23571
|
-
\**************************************************************************************************/
|
|
23572
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
23573
|
-
|
|
23574
|
-
"use strict";
|
|
23575
|
-
|
|
23576
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23577
|
-
if (k2 === undefined) k2 = k;
|
|
23578
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23579
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23580
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23581
|
-
}
|
|
23582
|
-
Object.defineProperty(o, k2, desc);
|
|
23583
|
-
}) : (function(o, m, k, k2) {
|
|
23584
|
-
if (k2 === undefined) k2 = k;
|
|
23585
|
-
o[k2] = m[k];
|
|
23586
|
-
}));
|
|
23587
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23588
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23589
|
-
};
|
|
23590
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23591
|
-
exports.DateOperationsMapper = void 0;
|
|
23592
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
|
|
23593
|
-
const operations_1 = __webpack_require__(/*! ./operations */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/operations.js");
|
|
23594
|
-
__exportStar(__webpack_require__(/*! ./operations */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/operations.js"), exports);
|
|
23595
|
-
__exportStar(__webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/types.js"), exports);
|
|
23596
|
-
exports.DateOperationsMapper = {
|
|
23597
|
-
[types_1.OperationEnum.On]: (value) => (0, operations_1.useDateOnOperation)(value),
|
|
23598
|
-
[types_1.OperationEnum.OnOrAfter]: (value) => (0, operations_1.useDateOnOrAfterOperation)(value),
|
|
23599
|
-
[types_1.OperationEnum.OnOrBefore]: (value) => (0, operations_1.useDateOnOrBeforeOperation)(value),
|
|
23600
|
-
[types_1.OperationEnum.BetweenDate]: (value) => (0, operations_1.useDateBetweenOperation)(value),
|
|
23601
|
-
};
|
|
23602
|
-
//# sourceMappingURL=index.js.map
|
|
23603
|
-
|
|
23604
|
-
/***/ }),
|
|
23605
|
-
|
|
23606
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/operations.js":
|
|
23607
|
-
/*!*******************************************************************************************************!*\
|
|
23608
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/operations.js ***!
|
|
23609
|
-
\*******************************************************************************************************/
|
|
23610
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
23611
|
-
|
|
23612
|
-
"use strict";
|
|
23613
|
-
|
|
23614
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23615
|
-
exports.useDateBetweenOperation = exports.useDateOnOrBeforeOperation = exports.useDateOnOrAfterOperation = exports.useDateOnOperation = void 0;
|
|
23616
|
-
function useDateOnOperation(payload) {
|
|
23617
|
-
return (attribute) => ({ isValid: attribute.getTime() === payload.date.getTime() });
|
|
23618
|
-
}
|
|
23619
|
-
exports.useDateOnOperation = useDateOnOperation;
|
|
23620
|
-
function useDateOnOrAfterOperation(payload) {
|
|
23621
|
-
return (attribute) => ({ isValid: attribute.getTime() >= payload.date.getTime() });
|
|
23622
|
-
}
|
|
23623
|
-
exports.useDateOnOrAfterOperation = useDateOnOrAfterOperation;
|
|
23624
|
-
function useDateOnOrBeforeOperation(payload) {
|
|
23625
|
-
return (attribute) => ({ isValid: attribute.getTime() <= payload.date.getTime() });
|
|
23626
|
-
}
|
|
23627
|
-
exports.useDateOnOrBeforeOperation = useDateOnOrBeforeOperation;
|
|
23628
|
-
function useDateBetweenOperation(payload) {
|
|
23629
|
-
return (attribute) => ({
|
|
23630
|
-
isValid: attribute.getTime() >= payload.start.getTime() && attribute.getTime() <= payload.end.getTime(),
|
|
23631
|
-
});
|
|
23632
|
-
}
|
|
23633
|
-
exports.useDateBetweenOperation = useDateBetweenOperation;
|
|
23634
|
-
//# sourceMappingURL=operations.js.map
|
|
23635
|
-
|
|
23636
|
-
/***/ }),
|
|
23637
|
-
|
|
23638
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/sanitizers.js":
|
|
23639
|
-
/*!*******************************************************************************************************!*\
|
|
23640
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/sanitizers.js ***!
|
|
23641
|
-
\*******************************************************************************************************/
|
|
23642
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23643
|
-
|
|
23644
|
-
"use strict";
|
|
23645
|
-
|
|
23646
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23647
|
-
exports.DateSanitizersMapper = exports.sanitizeDateRange = exports.sanitizeSingleDate = void 0;
|
|
23648
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
|
|
23649
|
-
const sanitizeSingleDate = (value) => {
|
|
23650
|
-
const sanitizedValue = value.date ? { date: value.date } : undefined;
|
|
23651
|
-
return {
|
|
23652
|
-
isSanitized: !!sanitizedValue,
|
|
23653
|
-
sanitizedValue,
|
|
23654
|
-
};
|
|
23655
|
-
};
|
|
23656
|
-
exports.sanitizeSingleDate = sanitizeSingleDate;
|
|
23657
|
-
const sanitizeDateRange = (value) => {
|
|
23658
|
-
const sanitizedValue = value.start && value.end ? { start: value.start, end: value.end } : undefined;
|
|
23659
|
-
return {
|
|
23660
|
-
isSanitized: !!sanitizedValue,
|
|
23661
|
-
sanitizedValue,
|
|
23662
|
-
};
|
|
23663
|
-
};
|
|
23664
|
-
exports.sanitizeDateRange = sanitizeDateRange;
|
|
23665
|
-
exports.DateSanitizersMapper = {
|
|
23666
|
-
[types_1.OperationEnum.On]: exports.sanitizeSingleDate,
|
|
23667
|
-
[types_1.OperationEnum.OnOrAfter]: exports.sanitizeDateRange,
|
|
23668
|
-
[types_1.OperationEnum.OnOrBefore]: exports.sanitizeSingleDate,
|
|
23669
|
-
[types_1.OperationEnum.BetweenDate]: exports.sanitizeSingleDate,
|
|
23670
|
-
};
|
|
23671
|
-
//# sourceMappingURL=sanitizers.js.map
|
|
23672
|
-
|
|
23673
|
-
/***/ }),
|
|
23674
|
-
|
|
23675
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/types.js":
|
|
23676
|
-
/*!**************************************************************************************************!*\
|
|
23677
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/date/types.js ***!
|
|
23678
|
-
\**************************************************************************************************/
|
|
23679
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
23680
|
-
|
|
23681
|
-
"use strict";
|
|
23682
|
-
|
|
23683
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23684
|
-
//# sourceMappingURL=types.js.map
|
|
23685
|
-
|
|
23686
|
-
/***/ }),
|
|
23687
|
-
|
|
23688
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/index.js":
|
|
23689
|
-
/*!*****************************************************************************************************!*\
|
|
23690
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/index.js ***!
|
|
23691
|
-
\*****************************************************************************************************/
|
|
23692
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
23693
|
-
|
|
23694
|
-
"use strict";
|
|
23695
|
-
|
|
23696
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23697
|
-
if (k2 === undefined) k2 = k;
|
|
23698
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23699
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23700
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23701
|
-
}
|
|
23702
|
-
Object.defineProperty(o, k2, desc);
|
|
23703
|
-
}) : (function(o, m, k, k2) {
|
|
23704
|
-
if (k2 === undefined) k2 = k;
|
|
23705
|
-
o[k2] = m[k];
|
|
23706
|
-
}));
|
|
23707
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23708
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23709
|
-
};
|
|
23710
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23711
|
-
exports.NumericOperationsMapper = void 0;
|
|
23712
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
|
|
23713
|
-
const operations_1 = __webpack_require__(/*! ./operations */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/operations.js");
|
|
23714
|
-
exports.NumericOperationsMapper = {
|
|
23715
|
-
[types_1.OperationEnum.Equal]: (value) => (0, operations_1.useEqualsOperation)(value),
|
|
23716
|
-
[types_1.OperationEnum.GreaterThan]: (value) => (0, operations_1.useGreaterThanOperation)(value),
|
|
23717
|
-
[types_1.OperationEnum.GreaterThanEqual]: (value) => (0, operations_1.useGreaterThanEqualOperation)(value),
|
|
23718
|
-
[types_1.OperationEnum.LesserThan]: (value) => (0, operations_1.useLesserThanOperation)(value),
|
|
23719
|
-
[types_1.OperationEnum.LesserThanEqual]: (value) => (0, operations_1.useLesserThanEqualOperation)(value),
|
|
23720
|
-
[types_1.OperationEnum.BetweenNumeric]: (value) => (0, operations_1.useBetweenNumericOperation)(value),
|
|
23721
|
-
};
|
|
23722
|
-
__exportStar(__webpack_require__(/*! ./operations */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/operations.js"), exports);
|
|
23723
|
-
__exportStar(__webpack_require__(/*! ./sanitizers */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/sanitizers.js"), exports);
|
|
23724
|
-
__exportStar(__webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/types.js"), exports);
|
|
23725
|
-
//# sourceMappingURL=index.js.map
|
|
23726
|
-
|
|
23727
|
-
/***/ }),
|
|
23728
|
-
|
|
23729
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/operations.js":
|
|
23730
|
-
/*!**********************************************************************************************************!*\
|
|
23731
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/operations.js ***!
|
|
23732
|
-
\**********************************************************************************************************/
|
|
23733
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
23734
|
-
|
|
23735
|
-
"use strict";
|
|
23736
|
-
|
|
23737
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23738
|
-
exports.useBetweenNumericOperation = exports.useLesserThanEqualOperation = exports.useLesserThanOperation = exports.useGreaterThanEqualOperation = exports.useGreaterThanOperation = exports.useEqualsOperation = void 0;
|
|
23739
|
-
function useEqualsOperation(payload) {
|
|
23740
|
-
return (attribute) => ({ isValid: attribute === payload.number });
|
|
23741
|
-
}
|
|
23742
|
-
exports.useEqualsOperation = useEqualsOperation;
|
|
23743
|
-
function useGreaterThanOperation(payload) {
|
|
23744
|
-
return (attribute) => ({ isValid: attribute > payload.number });
|
|
23745
|
-
}
|
|
23746
|
-
exports.useGreaterThanOperation = useGreaterThanOperation;
|
|
23747
|
-
function useGreaterThanEqualOperation(payload) {
|
|
23748
|
-
return (attribute) => ({ isValid: attribute >= payload.number });
|
|
23749
|
-
}
|
|
23750
|
-
exports.useGreaterThanEqualOperation = useGreaterThanEqualOperation;
|
|
23751
|
-
function useLesserThanOperation(payload) {
|
|
23752
|
-
return (attribute) => ({ isValid: attribute < payload.number });
|
|
23753
|
-
}
|
|
23754
|
-
exports.useLesserThanOperation = useLesserThanOperation;
|
|
23755
|
-
function useLesserThanEqualOperation(payload) {
|
|
23756
|
-
return (attribute) => ({ isValid: attribute <= payload.number });
|
|
23757
|
-
}
|
|
23758
|
-
exports.useLesserThanEqualOperation = useLesserThanEqualOperation;
|
|
23759
|
-
function useBetweenNumericOperation(payload) {
|
|
23760
|
-
return (attribute) => ({ isValid: attribute >= payload.start && attribute <= payload.end });
|
|
23761
|
-
}
|
|
23762
|
-
exports.useBetweenNumericOperation = useBetweenNumericOperation;
|
|
23763
|
-
//# sourceMappingURL=operations.js.map
|
|
23764
|
-
|
|
23765
|
-
/***/ }),
|
|
23766
|
-
|
|
23767
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/sanitizers.js":
|
|
23768
|
-
/*!**********************************************************************************************************!*\
|
|
23769
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/sanitizers.js ***!
|
|
23770
|
-
\**********************************************************************************************************/
|
|
23771
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23772
|
-
|
|
23773
|
-
"use strict";
|
|
23774
|
-
|
|
23775
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23776
|
-
exports.NumericSanitizersMapper = exports.sanitizeNumericRange = exports.sanitizeSingleNumber = void 0;
|
|
23777
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
|
|
23778
|
-
const isNumber = (value) => typeof value === 'number';
|
|
23779
|
-
const sanitizeSingleNumber = (value) => {
|
|
23780
|
-
const sanitizedValue = value.number !== undefined && isNumber(value.number) ? { number: value.number } : undefined;
|
|
23781
|
-
return {
|
|
23782
|
-
isSanitized: !!sanitizedValue,
|
|
23783
|
-
sanitizedValue,
|
|
23784
|
-
};
|
|
23785
|
-
};
|
|
23786
|
-
exports.sanitizeSingleNumber = sanitizeSingleNumber;
|
|
23787
|
-
const sanitizeNumericRange = (value) => {
|
|
23788
|
-
const sanitizedValue = value.start !== undefined && value.end !== undefined && isNumber(value.start) && isNumber(value.end)
|
|
23789
|
-
? { start: value.start, end: value.end }
|
|
23790
|
-
: undefined;
|
|
23791
|
-
return {
|
|
23792
|
-
isSanitized: !!sanitizedValue,
|
|
23793
|
-
sanitizedValue,
|
|
23794
|
-
};
|
|
23795
|
-
};
|
|
23796
|
-
exports.sanitizeNumericRange = sanitizeNumericRange;
|
|
23797
|
-
exports.NumericSanitizersMapper = {
|
|
23798
|
-
[types_1.OperationEnum.Equal]: exports.sanitizeSingleNumber,
|
|
23799
|
-
[types_1.OperationEnum.GreaterThan]: exports.sanitizeNumericRange,
|
|
23800
|
-
[types_1.OperationEnum.GreaterThanEqual]: exports.sanitizeSingleNumber,
|
|
23801
|
-
[types_1.OperationEnum.LesserThan]: exports.sanitizeSingleNumber,
|
|
23802
|
-
[types_1.OperationEnum.LesserThanEqual]: exports.sanitizeNumericRange,
|
|
23803
|
-
[types_1.OperationEnum.BetweenNumeric]: exports.sanitizeNumericRange,
|
|
23804
|
-
};
|
|
23805
|
-
//# sourceMappingURL=sanitizers.js.map
|
|
23806
|
-
|
|
23807
|
-
/***/ }),
|
|
23808
|
-
|
|
23809
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/types.js":
|
|
23810
|
-
/*!*****************************************************************************************************!*\
|
|
23811
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/numeric/types.js ***!
|
|
23812
|
-
\*****************************************************************************************************/
|
|
23813
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
23814
|
-
|
|
23815
|
-
"use strict";
|
|
23816
|
-
|
|
23817
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23818
|
-
//# sourceMappingURL=types.js.map
|
|
23819
|
-
|
|
23820
|
-
/***/ }),
|
|
23821
|
-
|
|
23822
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/index.js":
|
|
23823
|
-
/*!****************************************************************************************************!*\
|
|
23824
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/index.js ***!
|
|
23825
|
-
\****************************************************************************************************/
|
|
23826
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
23827
|
-
|
|
23828
|
-
"use strict";
|
|
23829
|
-
|
|
23830
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23831
|
-
if (k2 === undefined) k2 = k;
|
|
23832
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23833
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23834
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23835
|
-
}
|
|
23836
|
-
Object.defineProperty(o, k2, desc);
|
|
23837
|
-
}) : (function(o, m, k, k2) {
|
|
23838
|
-
if (k2 === undefined) k2 = k;
|
|
23839
|
-
o[k2] = m[k];
|
|
23840
|
-
}));
|
|
23841
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23842
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23843
|
-
};
|
|
23844
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23845
|
-
exports.StringOperationsMapper = void 0;
|
|
23846
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
|
|
23847
|
-
const operations_1 = __webpack_require__(/*! ./operations */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/operations.js");
|
|
23848
|
-
__exportStar(__webpack_require__(/*! ./operations */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/operations.js"), exports);
|
|
23849
|
-
__exportStar(__webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/types.js"), exports);
|
|
23850
|
-
exports.StringOperationsMapper = {
|
|
23851
|
-
[types_1.OperationEnum.StartsWith]: (value) => (0, operations_1.useStartsWithOperation)(value),
|
|
23852
|
-
[types_1.OperationEnum.EndsWith]: (value) => (0, operations_1.useEndsWithOperation)(value),
|
|
23853
|
-
[types_1.OperationEnum.Contains]: (value) => (0, operations_1.useContainsOperation)(value),
|
|
23854
|
-
[types_1.OperationEnum.InList]: (value) => (0, operations_1.useInListOperation)(value),
|
|
23855
|
-
[types_1.OperationEnum.Matches]: (value) => (0, operations_1.useMatchesOperation)(value),
|
|
23856
|
-
};
|
|
23857
|
-
//# sourceMappingURL=index.js.map
|
|
23858
|
-
|
|
23859
|
-
/***/ }),
|
|
23860
|
-
|
|
23861
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/operations.js":
|
|
23862
|
-
/*!*********************************************************************************************************!*\
|
|
23863
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/operations.js ***!
|
|
23864
|
-
\*********************************************************************************************************/
|
|
23865
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
23866
|
-
|
|
23867
|
-
"use strict";
|
|
23868
|
-
|
|
23869
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23870
|
-
exports.useMatchesOperation = exports.useInListOperation = exports.useContainsOperation = exports.useEndsWithOperation = exports.useStartsWithOperation = void 0;
|
|
23871
|
-
function useStartsWithOperation(payload) {
|
|
23872
|
-
return (attribute) => ({ isValid: payload.list.some((value) => attribute.startsWith(value)) });
|
|
23873
|
-
}
|
|
23874
|
-
exports.useStartsWithOperation = useStartsWithOperation;
|
|
23875
|
-
function useEndsWithOperation(payload) {
|
|
23876
|
-
return (attribute) => ({ isValid: payload.list.some((value) => attribute.endsWith(value)) });
|
|
23877
|
-
}
|
|
23878
|
-
exports.useEndsWithOperation = useEndsWithOperation;
|
|
23879
|
-
function useContainsOperation(payload) {
|
|
23880
|
-
return (attribute) => ({ isValid: payload.list.some((value) => attribute.includes(value)) });
|
|
23881
|
-
}
|
|
23882
|
-
exports.useContainsOperation = useContainsOperation;
|
|
23883
|
-
function useInListOperation(payload) {
|
|
23884
|
-
return (attribute) => ({ isValid: payload.list.includes(attribute) });
|
|
23885
|
-
}
|
|
23886
|
-
exports.useInListOperation = useInListOperation;
|
|
23887
|
-
function useMatchesOperation(payload) {
|
|
23888
|
-
return (attribute) => {
|
|
23889
|
-
let expression;
|
|
23890
|
-
try {
|
|
23891
|
-
expression = new RegExp(payload.string);
|
|
23892
|
-
}
|
|
23893
|
-
catch (e) {
|
|
23894
|
-
return { isValid: false };
|
|
23895
|
-
}
|
|
23896
|
-
return { isValid: expression.test(attribute) };
|
|
23897
|
-
};
|
|
23898
|
-
}
|
|
23899
|
-
exports.useMatchesOperation = useMatchesOperation;
|
|
23900
|
-
//# sourceMappingURL=operations.js.map
|
|
23901
|
-
|
|
23902
|
-
/***/ }),
|
|
23903
|
-
|
|
23904
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/sanitizers.js":
|
|
23905
|
-
/*!*********************************************************************************************************!*\
|
|
23906
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/sanitizers.js ***!
|
|
23907
|
-
\*********************************************************************************************************/
|
|
23908
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23909
|
-
|
|
23910
|
-
"use strict";
|
|
23911
|
-
|
|
23912
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23913
|
-
exports.StringSanitizersMapper = exports.sanitizeListString = exports.sanitizeSingleString = void 0;
|
|
23914
|
-
const types_1 = __webpack_require__(/*! ../types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js");
|
|
23915
|
-
const isString = (value) => typeof value === 'string';
|
|
23916
|
-
const sanitizeSingleString = (value) => {
|
|
23917
|
-
const sanitizedValue = value.string !== undefined && isString(value.string) ? { string: value.string } : undefined;
|
|
23918
|
-
return {
|
|
23919
|
-
isSanitized: !!sanitizedValue,
|
|
23920
|
-
sanitizedValue,
|
|
23921
|
-
};
|
|
23922
|
-
};
|
|
23923
|
-
exports.sanitizeSingleString = sanitizeSingleString;
|
|
23924
|
-
const sanitizeListString = (value) => {
|
|
23925
|
-
const sanitizedValue = value.list !== undefined && value.list.every((str) => isString(str))
|
|
23926
|
-
? { list: value.list }
|
|
23927
|
-
: undefined;
|
|
23928
|
-
return {
|
|
23929
|
-
isSanitized: !!sanitizedValue,
|
|
23930
|
-
sanitizedValue,
|
|
23931
|
-
};
|
|
23932
|
-
};
|
|
23933
|
-
exports.sanitizeListString = sanitizeListString;
|
|
23934
|
-
exports.StringSanitizersMapper = {
|
|
23935
|
-
[types_1.OperationEnum.Matches]: exports.sanitizeSingleString,
|
|
23936
|
-
[types_1.OperationEnum.Contains]: exports.sanitizeListString,
|
|
23937
|
-
[types_1.OperationEnum.StartsWith]: exports.sanitizeListString,
|
|
23938
|
-
[types_1.OperationEnum.EndsWith]: exports.sanitizeListString,
|
|
23939
|
-
[types_1.OperationEnum.InList]: exports.sanitizeListString,
|
|
23940
|
-
};
|
|
23941
|
-
//# sourceMappingURL=sanitizers.js.map
|
|
23942
|
-
|
|
23943
|
-
/***/ }),
|
|
23944
|
-
|
|
23945
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/types.js":
|
|
23946
|
-
/*!****************************************************************************************************!*\
|
|
23947
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/string/types.js ***!
|
|
23948
|
-
\****************************************************************************************************/
|
|
23949
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
23950
|
-
|
|
23951
|
-
"use strict";
|
|
23952
|
-
|
|
23953
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23954
|
-
//# sourceMappingURL=types.js.map
|
|
23955
|
-
|
|
23956
|
-
/***/ }),
|
|
23957
|
-
|
|
23958
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js":
|
|
23959
|
-
/*!***************************************************************************************************!*\
|
|
23960
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/index.js ***!
|
|
23961
|
-
\***************************************************************************************************/
|
|
23962
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
23963
|
-
|
|
23964
|
-
"use strict";
|
|
23965
|
-
|
|
23966
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23967
|
-
if (k2 === undefined) k2 = k;
|
|
23968
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23969
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23970
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
23971
|
-
}
|
|
23972
|
-
Object.defineProperty(o, k2, desc);
|
|
23973
|
-
}) : (function(o, m, k, k2) {
|
|
23974
|
-
if (k2 === undefined) k2 = k;
|
|
23975
|
-
o[k2] = m[k];
|
|
23976
|
-
}));
|
|
23977
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23978
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23979
|
-
};
|
|
23980
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23981
|
-
__exportStar(__webpack_require__(/*! ./operation.enum */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/operation.enum.js"), exports);
|
|
23982
|
-
//# sourceMappingURL=index.js.map
|
|
23983
|
-
|
|
23984
|
-
/***/ }),
|
|
23985
|
-
|
|
23986
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/operation.enum.js":
|
|
23987
|
-
/*!************************************************************************************************************!*\
|
|
23988
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/operations/types/operation.enum.js ***!
|
|
23989
|
-
\************************************************************************************************************/
|
|
23990
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
23991
|
-
|
|
23992
|
-
"use strict";
|
|
23993
|
-
|
|
23994
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23995
|
-
exports.OperationEnum = void 0;
|
|
23996
|
-
var OperationEnum;
|
|
23997
|
-
(function (OperationEnum) {
|
|
23998
|
-
// String Operations
|
|
23999
|
-
OperationEnum["InList"] = "in_list";
|
|
24000
|
-
OperationEnum["StartsWith"] = "starts_with";
|
|
24001
|
-
OperationEnum["EndsWith"] = "ends_with";
|
|
24002
|
-
OperationEnum["Contains"] = "contains";
|
|
24003
|
-
OperationEnum["Matches"] = "matches";
|
|
24004
|
-
// Numeric Operations
|
|
24005
|
-
OperationEnum["Equal"] = "equal";
|
|
24006
|
-
OperationEnum["GreaterThan"] = "greater_than";
|
|
24007
|
-
OperationEnum["GreaterThanEqual"] = "greater_than_equal";
|
|
24008
|
-
OperationEnum["LesserThan"] = "lower_than";
|
|
24009
|
-
OperationEnum["LesserThanEqual"] = "lower_than_equal";
|
|
24010
|
-
OperationEnum["BetweenNumeric"] = "between_numeric";
|
|
24011
|
-
// Boolean Operations
|
|
24012
|
-
OperationEnum["Is"] = "is";
|
|
24013
|
-
// Date Operations
|
|
24014
|
-
OperationEnum["On"] = "on";
|
|
24015
|
-
OperationEnum["BetweenDate"] = "between_date";
|
|
24016
|
-
OperationEnum["OnOrAfter"] = "on_or_after";
|
|
24017
|
-
OperationEnum["OnOrBefore"] = "on_or_before";
|
|
24018
|
-
})(OperationEnum = exports.OperationEnum || (exports.OperationEnum = {}));
|
|
24019
|
-
//# sourceMappingURL=operation.enum.js.map
|
|
24020
|
-
|
|
24021
|
-
/***/ }),
|
|
24022
|
-
|
|
24023
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js":
|
|
24024
|
-
/*!****************************************************************************************!*\
|
|
24025
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js ***!
|
|
24026
|
-
\****************************************************************************************/
|
|
24027
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
24028
|
-
|
|
24029
|
-
"use strict";
|
|
24030
|
-
|
|
24031
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
24032
|
-
if (k2 === undefined) k2 = k;
|
|
24033
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
24034
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24035
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
24036
|
-
}
|
|
24037
|
-
Object.defineProperty(o, k2, desc);
|
|
24038
|
-
}) : (function(o, m, k, k2) {
|
|
24039
|
-
if (k2 === undefined) k2 = k;
|
|
24040
|
-
o[k2] = m[k];
|
|
24041
|
-
}));
|
|
24042
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
24043
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
24044
|
-
};
|
|
24045
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24046
|
-
__exportStar(__webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/types.js"), exports);
|
|
24047
|
-
__exportStar(__webpack_require__(/*! ./rule.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/rule.evaluator.js"), exports);
|
|
24048
|
-
//# sourceMappingURL=index.js.map
|
|
24049
|
-
|
|
24050
|
-
/***/ }),
|
|
24051
|
-
|
|
24052
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/rule.evaluator.js":
|
|
24053
|
-
/*!*************************************************************************************************!*\
|
|
24054
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/rule.evaluator.js ***!
|
|
24055
|
-
\*************************************************************************************************/
|
|
24056
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
24057
|
-
|
|
24058
|
-
"use strict";
|
|
24059
|
-
|
|
24060
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24061
|
-
exports.createRuleEvaluator = void 0;
|
|
24062
|
-
const types_1 = __webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/types.js");
|
|
24063
|
-
const conditions_1 = __webpack_require__(/*! ../conditions */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/conditions/index.js");
|
|
24064
|
-
function createRuleEvaluator(payload) {
|
|
24065
|
-
return (attributes) => {
|
|
24066
|
-
const isRuleTreatable = payload.rule.conditions.every((condition) => {
|
|
24067
|
-
const evaluator = (0, conditions_1.createConditionEvaluator)({ condition });
|
|
24068
|
-
return evaluator(attributes);
|
|
24069
|
-
});
|
|
24070
|
-
return isRuleTreatable ? types_1.RuleEvaluationResultEnum.Treatable : types_1.RuleEvaluationResultEnum.Insufficient;
|
|
24071
|
-
};
|
|
24072
|
-
}
|
|
24073
|
-
exports.createRuleEvaluator = createRuleEvaluator;
|
|
24074
|
-
//# sourceMappingURL=rule.evaluator.js.map
|
|
24075
|
-
|
|
24076
|
-
/***/ }),
|
|
24077
|
-
|
|
24078
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/types.js":
|
|
24079
|
-
/*!****************************************************************************************!*\
|
|
24080
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/types.js ***!
|
|
24081
|
-
\****************************************************************************************/
|
|
24082
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
24083
|
-
|
|
24084
|
-
"use strict";
|
|
24085
|
-
|
|
24086
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24087
|
-
exports.RuleEvaluationResultEnum = exports.TreatmentEnum = exports.ConditionLogicEnum = void 0;
|
|
24088
|
-
var ConditionLogicEnum;
|
|
24089
|
-
(function (ConditionLogicEnum) {
|
|
24090
|
-
ConditionLogicEnum["And"] = "and";
|
|
24091
|
-
})(ConditionLogicEnum = exports.ConditionLogicEnum || (exports.ConditionLogicEnum = {}));
|
|
24092
|
-
var TreatmentEnum;
|
|
24093
|
-
(function (TreatmentEnum) {
|
|
24094
|
-
TreatmentEnum["True"] = "true";
|
|
24095
|
-
TreatmentEnum["False"] = "false";
|
|
24096
|
-
})(TreatmentEnum = exports.TreatmentEnum || (exports.TreatmentEnum = {}));
|
|
24097
|
-
var RuleEvaluationResultEnum;
|
|
24098
|
-
(function (RuleEvaluationResultEnum) {
|
|
24099
|
-
RuleEvaluationResultEnum["Treatable"] = "treatable";
|
|
24100
|
-
RuleEvaluationResultEnum["Insufficient"] = "insufficient";
|
|
24101
|
-
})(RuleEvaluationResultEnum = exports.RuleEvaluationResultEnum || (exports.RuleEvaluationResultEnum = {}));
|
|
24102
|
-
//# sourceMappingURL=types.js.map
|
|
24103
|
-
|
|
24104
|
-
/***/ }),
|
|
24105
|
-
|
|
24106
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/attributes.utils.js":
|
|
24107
|
-
/*!***************************************************************************************************************!*\
|
|
24108
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/attributes.utils.js ***!
|
|
24109
|
-
\***************************************************************************************************************/
|
|
24110
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
24111
|
-
|
|
24112
|
-
"use strict";
|
|
24113
|
-
|
|
24114
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24115
|
-
exports.modifyObjectKeysWithPrefix = exports.defaultFronteggAttributesMapper = exports.prepareAttributes = void 0;
|
|
24116
|
-
const flatten_utils_1 = __webpack_require__(/*! ./flatten.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/flatten.utils.js");
|
|
24117
|
-
/**
|
|
24118
|
-
* Merges both `custom` and `jwt` records, map Frontegg attributes and modifies record keys with corrisponding prefixes
|
|
24119
|
-
*
|
|
24120
|
-
* Example:
|
|
24121
|
-
* Input: { 'custom': { 'customAttribute': 'someValue' }, 'jwt': { 'email': 'user@email.com', other: 'some-vaule' } }
|
|
24122
|
-
* Output: { 'customAttribute': 'someValue', 'frontegg.email': 'user@email.com', 'jwt.email': 'user@email.com', 'jwt.other': 'some-vaule' }
|
|
24123
|
-
*/
|
|
24124
|
-
function prepareAttributes(attributes = {}, customFronteggAttributesMapper) {
|
|
24125
|
-
const { custom = {}, jwt = {} } = attributes;
|
|
24126
|
-
const flatJwtAttributes = (0, flatten_utils_1.flatten)(jwt);
|
|
24127
|
-
const fronteggAttributes = customFronteggAttributesMapper
|
|
24128
|
-
? customFronteggAttributesMapper(jwt)
|
|
24129
|
-
: defaultFronteggAttributesMapper(jwt);
|
|
24130
|
-
const fronteggAttributesPrefix = 'frontegg.';
|
|
24131
|
-
const jwtAttributesPrefix = 'jwt.';
|
|
24132
|
-
return {
|
|
24133
|
-
...custom,
|
|
24134
|
-
...modifyObjectKeysWithPrefix(fronteggAttributes, fronteggAttributesPrefix),
|
|
24135
|
-
...modifyObjectKeysWithPrefix(flatJwtAttributes, jwtAttributesPrefix),
|
|
24136
|
-
};
|
|
24137
|
-
}
|
|
24138
|
-
exports.prepareAttributes = prepareAttributes;
|
|
24139
|
-
function defaultFronteggAttributesMapper(jwt) {
|
|
24140
|
-
return {
|
|
24141
|
-
email: jwt.email,
|
|
24142
|
-
emailVerified: jwt.email_verified,
|
|
24143
|
-
tenantId: jwt.tenantId,
|
|
24144
|
-
userId: jwt.userId,
|
|
24145
|
-
};
|
|
24146
|
-
}
|
|
24147
|
-
exports.defaultFronteggAttributesMapper = defaultFronteggAttributesMapper;
|
|
24148
|
-
function modifyObjectKeysWithPrefix(object, prefix) {
|
|
24149
|
-
return Object.keys(object).reduce((modifiedObject, currentKey) => {
|
|
24150
|
-
modifiedObject[`${prefix}${currentKey}`] = object[currentKey];
|
|
24151
|
-
return modifiedObject;
|
|
24152
|
-
}, {});
|
|
24153
|
-
}
|
|
24154
|
-
exports.modifyObjectKeysWithPrefix = modifyObjectKeysWithPrefix;
|
|
24155
|
-
//# sourceMappingURL=attributes.utils.js.map
|
|
24156
|
-
|
|
24157
|
-
/***/ }),
|
|
24158
|
-
|
|
24159
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/flatten.utils.js":
|
|
24160
|
-
/*!************************************************************************************************************!*\
|
|
24161
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/flatten.utils.js ***!
|
|
24162
|
-
\************************************************************************************************************/
|
|
24163
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
24164
|
-
|
|
24165
|
-
"use strict";
|
|
24166
|
-
|
|
24167
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24168
|
-
exports.flatten = void 0;
|
|
24169
|
-
function flatten(target, opts) {
|
|
24170
|
-
opts = opts || {};
|
|
24171
|
-
const delimiter = (opts === null || opts === void 0 ? void 0 : opts.delimiter) || '.';
|
|
24172
|
-
const maxDepth = opts === null || opts === void 0 ? void 0 : opts.maxDepth;
|
|
24173
|
-
const transformKey = (opts === null || opts === void 0 ? void 0 : opts.transformKey) || keyIdentity;
|
|
24174
|
-
const output = {};
|
|
24175
|
-
function step(object, prev, currentDepth) {
|
|
24176
|
-
currentDepth = currentDepth || 1;
|
|
24177
|
-
Object.keys(object).forEach(function (key) {
|
|
24178
|
-
const value = object[key];
|
|
24179
|
-
const isarray = (opts === null || opts === void 0 ? void 0 : opts.safe) && Array.isArray(value);
|
|
24180
|
-
const type = Object.prototype.toString.call(value);
|
|
24181
|
-
const isbuffer = isBuffer(value);
|
|
24182
|
-
const isobject = type === '[object Object]' || type === '[object Array]';
|
|
24183
|
-
const newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);
|
|
24184
|
-
if (!isarray &&
|
|
24185
|
-
!isbuffer &&
|
|
24186
|
-
isobject &&
|
|
24187
|
-
Object.keys(value).length &&
|
|
24188
|
-
(!(opts === null || opts === void 0 ? void 0 : opts.maxDepth) || (maxDepth && currentDepth < maxDepth))) {
|
|
24189
|
-
return step(value, newKey, currentDepth + 1);
|
|
24190
|
-
}
|
|
24191
|
-
output[newKey] = value;
|
|
24192
|
-
});
|
|
24193
|
-
}
|
|
24194
|
-
step(target);
|
|
24195
|
-
return output;
|
|
24196
|
-
}
|
|
24197
|
-
exports.flatten = flatten;
|
|
24198
|
-
function isBuffer(obj) {
|
|
24199
|
-
return obj && obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);
|
|
24200
|
-
}
|
|
24201
|
-
function keyIdentity(key) {
|
|
24202
|
-
return key;
|
|
24203
|
-
}
|
|
24204
|
-
//# sourceMappingURL=flatten.utils.js.map
|
|
24205
|
-
|
|
24206
|
-
/***/ }),
|
|
24207
|
-
|
|
24208
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/index.js":
|
|
24209
|
-
/*!****************************************************************************************************!*\
|
|
24210
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/index.js ***!
|
|
24211
|
-
\****************************************************************************************************/
|
|
24212
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
24213
|
-
|
|
24214
|
-
"use strict";
|
|
24215
|
-
|
|
24216
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
24217
|
-
if (k2 === undefined) k2 = k;
|
|
24218
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
24219
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24220
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
24221
|
-
}
|
|
24222
|
-
Object.defineProperty(o, k2, desc);
|
|
24223
|
-
}) : (function(o, m, k, k2) {
|
|
24224
|
-
if (k2 === undefined) k2 = k;
|
|
24225
|
-
o[k2] = m[k];
|
|
24226
|
-
}));
|
|
24227
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
24228
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
24229
|
-
};
|
|
24230
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24231
|
-
__exportStar(__webpack_require__(/*! ./is-entitled.evaluator */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled.evaluator.js"), exports);
|
|
24232
|
-
__exportStar(__webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js"), exports);
|
|
24233
|
-
__exportStar(__webpack_require__(/*! ./attributes.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/attributes.utils.js"), exports);
|
|
24234
|
-
//# sourceMappingURL=index.js.map
|
|
24235
|
-
|
|
24236
|
-
/***/ }),
|
|
24237
|
-
|
|
24238
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled.evaluator.js":
|
|
24239
|
-
/*!********************************************************************************************************************!*\
|
|
24240
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/is-entitled.evaluator.js ***!
|
|
24241
|
-
\********************************************************************************************************************/
|
|
24242
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
24243
|
-
|
|
24244
|
-
"use strict";
|
|
24245
|
-
|
|
24246
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24247
|
-
exports.evaluateIsEntitledToPermissions = exports.evaluateIsEntitledToFeature = void 0;
|
|
24248
|
-
const types_1 = __webpack_require__(/*! ./types */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js");
|
|
24249
|
-
const feature_flags_1 = __webpack_require__(/*! ../feature-flags */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/feature-flags/index.js");
|
|
24250
|
-
const attributes_utils_1 = __webpack_require__(/*! ./attributes.utils */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/attributes.utils.js");
|
|
24251
|
-
const rules_1 = __webpack_require__(/*! ../rules */ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/rules/index.js");
|
|
24252
|
-
function evaluateIsEntitledToFeature(featureKey, userEntitlementsContext, attributes = {}) {
|
|
24253
|
-
const feature = userEntitlementsContext.features[featureKey];
|
|
24254
|
-
let hasExpired = false;
|
|
24255
|
-
if (feature && feature.expireTime !== null) {
|
|
24256
|
-
hasExpired = feature.expireTime !== types_1.NO_EXPIRATION_TIME && feature.expireTime < Date.now();
|
|
24257
|
-
if (!hasExpired) {
|
|
24258
|
-
return { isEntitled: true };
|
|
24259
|
-
}
|
|
24260
|
-
}
|
|
24261
|
-
if (feature && feature.featureFlag) {
|
|
24262
|
-
const preparedAttributes = (0, attributes_utils_1.prepareAttributes)(attributes);
|
|
24263
|
-
const { treatment } = (0, feature_flags_1.evaluateFeatureFlag)(feature.featureFlag, preparedAttributes);
|
|
24264
|
-
if (treatment === rules_1.TreatmentEnum.True) {
|
|
24265
|
-
return { isEntitled: true };
|
|
24266
|
-
}
|
|
24267
|
-
}
|
|
24268
|
-
return {
|
|
24269
|
-
isEntitled: false,
|
|
24270
|
-
justification: hasExpired ? types_1.NotEntitledJustification.BUNDLE_EXPIRED : types_1.NotEntitledJustification.MISSING_FEATURE,
|
|
24271
|
-
};
|
|
24272
|
-
}
|
|
24273
|
-
exports.evaluateIsEntitledToFeature = evaluateIsEntitledToFeature;
|
|
24274
|
-
function evaluateIsEntitledToPermissions(permissionKey, userEntitlementsContext, attributes) {
|
|
24275
|
-
const permission = userEntitlementsContext.permissions[permissionKey];
|
|
24276
|
-
if (!permission) {
|
|
24277
|
-
return { isEntitled: false, justification: types_1.NotEntitledJustification.MISSING_PERMISSION };
|
|
24278
|
-
}
|
|
24279
|
-
const linkedFeatures = getLinkedFeatures(permissionKey, userEntitlementsContext);
|
|
24280
|
-
if (!linkedFeatures.length) {
|
|
24281
|
-
return { isEntitled: true };
|
|
24282
|
-
}
|
|
24283
|
-
let hasExpired = false;
|
|
24284
|
-
for (const featureKey of linkedFeatures) {
|
|
24285
|
-
const { isEntitled, justification } = evaluateIsEntitledToFeature(featureKey, userEntitlementsContext, attributes);
|
|
24286
|
-
if (isEntitled) {
|
|
24287
|
-
return { isEntitled: true };
|
|
24288
|
-
}
|
|
24289
|
-
if (justification === types_1.NotEntitledJustification.BUNDLE_EXPIRED) {
|
|
24290
|
-
hasExpired = true;
|
|
24291
|
-
}
|
|
24292
|
-
}
|
|
24293
|
-
return {
|
|
24294
|
-
isEntitled: false,
|
|
24295
|
-
justification: hasExpired ? types_1.NotEntitledJustification.BUNDLE_EXPIRED : types_1.NotEntitledJustification.MISSING_FEATURE,
|
|
24296
|
-
};
|
|
24297
|
-
}
|
|
24298
|
-
exports.evaluateIsEntitledToPermissions = evaluateIsEntitledToPermissions;
|
|
24299
|
-
function getLinkedFeatures(permissionKey, userEntitlementsContext) {
|
|
24300
|
-
return Object.keys(userEntitlementsContext.features).filter((featureKey) => userEntitlementsContext.features[featureKey].linkedPermissions.includes(permissionKey));
|
|
24301
|
-
}
|
|
24302
|
-
//# sourceMappingURL=is-entitled.evaluator.js.map
|
|
24303
|
-
|
|
24304
|
-
/***/ }),
|
|
24305
|
-
|
|
24306
|
-
/***/ "../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js":
|
|
24307
|
-
/*!****************************************************************************************************!*\
|
|
24308
|
-
!*** ../../node_modules/@frontegg/entitlements-javascript-commons/dist/user-entitlements/types.js ***!
|
|
24309
|
-
\****************************************************************************************************/
|
|
24310
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
24311
|
-
|
|
24312
|
-
"use strict";
|
|
24313
|
-
|
|
24314
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24315
|
-
exports.NO_EXPIRATION_TIME = exports.NotEntitledJustification = void 0;
|
|
24316
|
-
var NotEntitledJustification;
|
|
24317
|
-
(function (NotEntitledJustification) {
|
|
24318
|
-
NotEntitledJustification["MISSING_FEATURE"] = "MISSING_FEATURE";
|
|
24319
|
-
NotEntitledJustification["MISSING_PERMISSION"] = "MISSING_PERMISSION";
|
|
24320
|
-
NotEntitledJustification["BUNDLE_EXPIRED"] = "BUNDLE_EXPIRED";
|
|
24321
|
-
})(NotEntitledJustification = exports.NotEntitledJustification || (exports.NotEntitledJustification = {}));
|
|
24322
|
-
exports.NO_EXPIRATION_TIME = -1;
|
|
24323
|
-
//# sourceMappingURL=types.js.map
|
|
24324
|
-
|
|
24325
23196
|
/***/ }),
|
|
24326
23197
|
|
|
24327
23198
|
/***/ "../../node_modules/@frontegg/rest-api/ContextHolder/index.js":
|
|
@@ -24797,10 +23668,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24797
23668
|
/* harmony import */ var _fetch__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../fetch */ "../../node_modules/@frontegg/rest-api/fetch.js");
|
|
24798
23669
|
/* harmony import */ var _jwt__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../jwt */ "../../node_modules/@frontegg/rest-api/jwt.js");
|
|
24799
23670
|
/* harmony import */ var _interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./interfaces */ "../../node_modules/@frontegg/rest-api/auth/interfaces.js");
|
|
24800
|
-
/* harmony import */ var
|
|
23671
|
+
/* harmony import */ var _entitlements__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../entitlements */ "../../node_modules/@frontegg/rest-api/entitlements/index.js");
|
|
24801
23672
|
/* harmony import */ var _entitlements_interfaces__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../entitlements/interfaces */ "../../node_modules/@frontegg/rest-api/entitlements/interfaces.js");
|
|
24802
23673
|
/* harmony import */ var _feature_flags__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../feature-flags */ "../../node_modules/@frontegg/rest-api/feature-flags/index.js");
|
|
24803
|
-
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./constants */ "../../node_modules/@frontegg/rest-api/auth/constants.js");
|
|
24804
23674
|
|
|
24805
23675
|
|
|
24806
23676
|
const _excluded = ["type"],
|
|
@@ -24819,7 +23689,6 @@ const _excluded = ["type"],
|
|
|
24819
23689
|
|
|
24820
23690
|
|
|
24821
23691
|
|
|
24822
|
-
|
|
24823
23692
|
async function generateLoginResponse(loginResponse) {
|
|
24824
23693
|
if (!loginResponse.accessToken) {
|
|
24825
23694
|
return loginResponse;
|
|
@@ -25528,12 +24397,11 @@ async function getMeV2() {
|
|
|
25528
24397
|
return (0,_fetch__WEBPACK_IMPORTED_MODULE_11__.Get)(`${_constants__WEBPACK_IMPORTED_MODULE_12__.urls.identity.users.v2}/me`);
|
|
25529
24398
|
}
|
|
25530
24399
|
async function getMeAndEntitlements() {
|
|
25531
|
-
const [useEntitlementsV2] = _feature_flags__WEBPACK_IMPORTED_MODULE_8__.FeatureFlags.getFeatureFlags([_constants__WEBPACK_IMPORTED_MODULE_13__.USE_ENTITLEMENTS_V2_ENDPOINT_FF], _ContextHolder__WEBPACK_IMPORTED_MODULE_5__.ContextHolder.getAppName() || '');
|
|
25532
24400
|
const actions = [{
|
|
25533
24401
|
action: getMeV2,
|
|
25534
24402
|
shouldLoad: true
|
|
25535
24403
|
}, {
|
|
25536
|
-
action:
|
|
24404
|
+
action: _entitlements__WEBPACK_IMPORTED_MODULE_13__.loadEntitlements,
|
|
25537
24405
|
shouldLoad: shouldLoadEntitlements()
|
|
25538
24406
|
}, {
|
|
25539
24407
|
action: getUserAuthorization,
|
|
@@ -26955,7 +25823,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26955
25823
|
/* harmony import */ var _users_interfaces__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./users/interfaces */ "../../node_modules/@frontegg/rest-api/users/interfaces.js");
|
|
26956
25824
|
/* harmony import */ var _entitlements_interfaces__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./entitlements/interfaces */ "../../node_modules/@frontegg/rest-api/entitlements/interfaces.js");
|
|
26957
25825
|
/* harmony import */ var _security_center_interfaces__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./security-center/interfaces */ "../../node_modules/@frontegg/rest-api/security-center/interfaces.js");
|
|
26958
|
-
/** @license Frontegg v3.1.
|
|
25826
|
+
/** @license Frontegg v3.1.39
|
|
26959
25827
|
*
|
|
26960
25828
|
* This source code is licensed under the MIT license found in the
|
|
26961
25829
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -35263,42 +34131,6 @@ try {
|
|
|
35263
34131
|
}
|
|
35264
34132
|
|
|
35265
34133
|
|
|
35266
|
-
/***/ }),
|
|
35267
|
-
|
|
35268
|
-
/***/ "../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
|
|
35269
|
-
/*!*************************************************************************!*\
|
|
35270
|
-
!*** ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
|
|
35271
|
-
\*************************************************************************/
|
|
35272
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
35273
|
-
|
|
35274
|
-
"use strict";
|
|
35275
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35276
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35277
|
-
/* harmony export */ "default": () => (/* binding */ _arrayLikeToArray)
|
|
35278
|
-
/* harmony export */ });
|
|
35279
|
-
function _arrayLikeToArray(arr, len) {
|
|
35280
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
35281
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
35282
|
-
return arr2;
|
|
35283
|
-
}
|
|
35284
|
-
|
|
35285
|
-
/***/ }),
|
|
35286
|
-
|
|
35287
|
-
/***/ "../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
|
|
35288
|
-
/*!***********************************************************************!*\
|
|
35289
|
-
!*** ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
|
|
35290
|
-
\***********************************************************************/
|
|
35291
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
35292
|
-
|
|
35293
|
-
"use strict";
|
|
35294
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35295
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35296
|
-
/* harmony export */ "default": () => (/* binding */ _arrayWithHoles)
|
|
35297
|
-
/* harmony export */ });
|
|
35298
|
-
function _arrayWithHoles(arr) {
|
|
35299
|
-
if (Array.isArray(arr)) return arr;
|
|
35300
|
-
}
|
|
35301
|
-
|
|
35302
34134
|
/***/ }),
|
|
35303
34135
|
|
|
35304
34136
|
/***/ "../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
|
|
@@ -35602,64 +34434,6 @@ function _isNativeReflectConstruct() {
|
|
|
35602
34434
|
|
|
35603
34435
|
/***/ }),
|
|
35604
34436
|
|
|
35605
|
-
/***/ "../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":
|
|
35606
|
-
/*!*****************************************************************************!*\
|
|
35607
|
-
!*** ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***!
|
|
35608
|
-
\*****************************************************************************/
|
|
35609
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
35610
|
-
|
|
35611
|
-
"use strict";
|
|
35612
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35613
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35614
|
-
/* harmony export */ "default": () => (/* binding */ _iterableToArrayLimit)
|
|
35615
|
-
/* harmony export */ });
|
|
35616
|
-
function _iterableToArrayLimit(arr, i) {
|
|
35617
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
35618
|
-
if (null != _i) {
|
|
35619
|
-
var _s,
|
|
35620
|
-
_e,
|
|
35621
|
-
_x,
|
|
35622
|
-
_r,
|
|
35623
|
-
_arr = [],
|
|
35624
|
-
_n = !0,
|
|
35625
|
-
_d = !1;
|
|
35626
|
-
try {
|
|
35627
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
35628
|
-
if (Object(_i) !== _i) return;
|
|
35629
|
-
_n = !1;
|
|
35630
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
35631
|
-
} catch (err) {
|
|
35632
|
-
_d = !0, _e = err;
|
|
35633
|
-
} finally {
|
|
35634
|
-
try {
|
|
35635
|
-
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
35636
|
-
} finally {
|
|
35637
|
-
if (_d) throw _e;
|
|
35638
|
-
}
|
|
35639
|
-
}
|
|
35640
|
-
return _arr;
|
|
35641
|
-
}
|
|
35642
|
-
}
|
|
35643
|
-
|
|
35644
|
-
/***/ }),
|
|
35645
|
-
|
|
35646
|
-
/***/ "../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
|
|
35647
|
-
/*!************************************************************************!*\
|
|
35648
|
-
!*** ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
|
|
35649
|
-
\************************************************************************/
|
|
35650
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
35651
|
-
|
|
35652
|
-
"use strict";
|
|
35653
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35654
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35655
|
-
/* harmony export */ "default": () => (/* binding */ _nonIterableRest)
|
|
35656
|
-
/* harmony export */ });
|
|
35657
|
-
function _nonIterableRest() {
|
|
35658
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
35659
|
-
}
|
|
35660
|
-
|
|
35661
|
-
/***/ }),
|
|
35662
|
-
|
|
35663
34437
|
/***/ "../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js":
|
|
35664
34438
|
/*!**********************************************************************!*\
|
|
35665
34439
|
!*** ../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***!
|
|
@@ -35770,31 +34544,6 @@ function _setPrototypeOf(o, p) {
|
|
|
35770
34544
|
|
|
35771
34545
|
/***/ }),
|
|
35772
34546
|
|
|
35773
|
-
/***/ "../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
|
|
35774
|
-
/*!**********************************************************************!*\
|
|
35775
|
-
!*** ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***!
|
|
35776
|
-
\**********************************************************************/
|
|
35777
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
35778
|
-
|
|
35779
|
-
"use strict";
|
|
35780
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35781
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35782
|
-
/* harmony export */ "default": () => (/* binding */ _slicedToArray)
|
|
35783
|
-
/* harmony export */ });
|
|
35784
|
-
/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
|
|
35785
|
-
/* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js");
|
|
35786
|
-
/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
|
|
35787
|
-
/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
|
|
35788
|
-
|
|
35789
|
-
|
|
35790
|
-
|
|
35791
|
-
|
|
35792
|
-
function _slicedToArray(arr, i) {
|
|
35793
|
-
return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || (0,_iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arr, i) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arr, i) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__["default"])();
|
|
35794
|
-
}
|
|
35795
|
-
|
|
35796
|
-
/***/ }),
|
|
35797
|
-
|
|
35798
34547
|
/***/ "../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js":
|
|
35799
34548
|
/*!********************************************************************!*\
|
|
35800
34549
|
!*** ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***!
|
|
@@ -35866,30 +34615,6 @@ function _typeof(obj) {
|
|
|
35866
34615
|
|
|
35867
34616
|
/***/ }),
|
|
35868
34617
|
|
|
35869
|
-
/***/ "../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
|
|
35870
|
-
/*!***********************************************************************************!*\
|
|
35871
|
-
!*** ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
|
|
35872
|
-
\***********************************************************************************/
|
|
35873
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
35874
|
-
|
|
35875
|
-
"use strict";
|
|
35876
|
-
__webpack_require__.r(__webpack_exports__);
|
|
35877
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35878
|
-
/* harmony export */ "default": () => (/* binding */ _unsupportedIterableToArray)
|
|
35879
|
-
/* harmony export */ });
|
|
35880
|
-
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
|
|
35881
|
-
|
|
35882
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
35883
|
-
if (!o) return;
|
|
35884
|
-
if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen);
|
|
35885
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
35886
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
35887
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
35888
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen);
|
|
35889
|
-
}
|
|
35890
|
-
|
|
35891
|
-
/***/ }),
|
|
35892
|
-
|
|
35893
34618
|
/***/ "../../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js":
|
|
35894
34619
|
/*!************************************************************************!*\
|
|
35895
34620
|
!*** ../../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js ***!
|
|
@@ -35996,7 +34721,7 @@ function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e<r;e++)t[e-1]=a
|
|
|
35996
34721
|
/******/ };
|
|
35997
34722
|
/******/
|
|
35998
34723
|
/******/ // Execute the module function
|
|
35999
|
-
/******/ __webpack_modules__[moduleId]
|
|
34724
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
36000
34725
|
/******/
|
|
36001
34726
|
/******/ // Return the exports of the module
|
|
36002
34727
|
/******/ return module.exports;
|