@carbon/ibmdotcom-web-components 2.55.2 → 2.55.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dotcom-shell.js +2 -2
- package/dist/dotcom-shell.min.js +2 -2
- package/dist/ibmdotcom-web-components-dotcom-shell.js +2 -2
- package/dist/ibmdotcom-web-components-dotcom-shell.min.js +2 -2
- package/dist/{index-be1f0d99.js → index-5becb925.js} +195 -22
- package/dist/{index-b326a4b8.js → index-9b1155d4.js} +265 -265
- package/dist/{left-nav-menu-9f0d5440.js → left-nav-menu-4a6c5357.js} +2 -2
- package/dist/{left-nav-menu-a8434277.js → left-nav-menu-96dbffa3.js} +2 -2
- package/dist/{left-nav-menu-category-heading-d5ebb582.js → left-nav-menu-category-heading-4eaaa1cb.js} +2 -2
- package/dist/{left-nav-menu-category-heading-0db7fdac.js → left-nav-menu-category-heading-8c2b8ed1.js} +2 -2
- package/dist/{left-nav-menu-item-c52800b2.js → left-nav-menu-item-2919662e.js} +2 -2
- package/dist/{left-nav-menu-item-fdaa0bb7.js → left-nav-menu-item-e3cb7a75.js} +2 -2
- package/dist/{left-nav-menu-section-5d57cc54.js → left-nav-menu-section-3f725e26.js} +2 -2
- package/dist/{left-nav-menu-section-2272b80a.js → left-nav-menu-section-ee8222d1.js} +2 -2
- package/dist/{left-nav-overlay-69843140.js → left-nav-overlay-69df9fd0.js} +2 -2
- package/dist/{left-nav-overlay-ced9c29b.js → left-nav-overlay-eb67d1de.js} +2 -2
- package/dist/{megamenu-category-group-c69fb5d2.js → megamenu-category-group-3f2bfe7c.js} +2 -2
- package/dist/{megamenu-category-group-de1f78af.js → megamenu-category-group-6c76c126.js} +2 -2
- package/dist/{megamenu-category-group-copy-854dcd81.js → megamenu-category-group-copy-2f09fb89.js} +2 -2
- package/dist/{megamenu-category-group-copy-7b95d53d.js → megamenu-category-group-copy-62f21ae2.js} +2 -2
- package/dist/{megamenu-category-heading-9a6fa4b2.js → megamenu-category-heading-32e44d96.js} +2 -2
- package/dist/{megamenu-category-heading-78122438.js → megamenu-category-heading-478cfb1a.js} +2 -2
- package/dist/{megamenu-category-link-531caec6.js → megamenu-category-link-05dee472.js} +2 -2
- package/dist/{megamenu-category-link-8e7e7d24.js → megamenu-category-link-82d0de27.js} +2 -2
- package/dist/{megamenu-category-link-group-a017d5e6.js → megamenu-category-link-group-8099bca4.js} +2 -2
- package/dist/{megamenu-category-link-group-15bba423.js → megamenu-category-link-group-8e7eb5a1.js} +2 -2
- package/dist/{megamenu-left-navigation-df0c2578.js → megamenu-left-navigation-5cea51eb.js} +2 -2
- package/dist/{megamenu-left-navigation-42583912.js → megamenu-left-navigation-946e6ecd.js} +2 -2
- package/dist/{megamenu-overlay-295ba580.js → megamenu-overlay-8b50d36d.js} +2 -2
- package/dist/{megamenu-overlay-49a05565.js → megamenu-overlay-babb56ff.js} +2 -2
- package/dist/{megamenu-tab-7188fba7.js → megamenu-tab-62d05074.js} +2 -2
- package/dist/{megamenu-tab-f667b3bf.js → megamenu-tab-8b71189a.js} +2 -2
- package/es/components/cta/video-cta-container.d.ts +1 -0
- package/es/components/lightbox-media-viewer/lightbox-video-player-container.d.ts +1 -0
- package/es/components/video-player-v7/video-player-composite.d.ts +18 -0
- package/es/components/video-player-v7/video-player-composite.js +136 -7
- package/es/components/video-player-v7/video-player-composite.js.map +1 -1
- package/es/components/video-player-v7/video-player-container.d.ts +20 -0
- package/es/components/video-player-v7/video-player-container.js +63 -10
- package/es/components/video-player-v7/video-player-container.js.map +1 -1
- package/es/internal/vendor/@carbon/ibmdotcom-services/services/KalturaPlayerV7/KalturaPlayer.js +192 -19
- package/lib/internal/vendor/@carbon/ibmdotcom-services/services/KalturaPlayerV7/KalturaPlayer.js +192 -19
- package/package.json +5 -5
package/dist/dotcom-shell.js
CHANGED
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
* https://www.npmjs.com/package/redux
|
|
81
81
|
* https://www.npmjs.com/package/lodash-es
|
|
82
82
|
* https://www.npmjs.com/package/window-or-global
|
|
83
|
-
* https://www.npmjs.com/package/redux-logger
|
|
84
83
|
* https://www.npmjs.com/package/redux-thunk
|
|
84
|
+
* https://www.npmjs.com/package/redux-logger
|
|
85
85
|
* https://www.npmjs.com/package/axios
|
|
86
86
|
* https://www.npmjs.com/package/isomorphic-dompurify
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
let process = { env: {} };
|
|
91
|
-
import './index-
|
|
91
|
+
import './index-5becb925.js';
|
package/dist/dotcom-shell.min.js
CHANGED
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
* https://www.npmjs.com/package/redux
|
|
81
81
|
* https://www.npmjs.com/package/lodash-es
|
|
82
82
|
* https://www.npmjs.com/package/window-or-global
|
|
83
|
-
* https://www.npmjs.com/package/redux-logger
|
|
84
83
|
* https://www.npmjs.com/package/redux-thunk
|
|
84
|
+
* https://www.npmjs.com/package/redux-logger
|
|
85
85
|
* https://www.npmjs.com/package/axios
|
|
86
86
|
* https://www.npmjs.com/package/isomorphic-dompurify
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
import"./index-
|
|
90
|
+
import"./index-9b1155d4.js";
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
* https://www.npmjs.com/package/redux
|
|
81
81
|
* https://www.npmjs.com/package/lodash-es
|
|
82
82
|
* https://www.npmjs.com/package/window-or-global
|
|
83
|
-
* https://www.npmjs.com/package/redux-logger
|
|
84
83
|
* https://www.npmjs.com/package/redux-thunk
|
|
84
|
+
* https://www.npmjs.com/package/redux-logger
|
|
85
85
|
* https://www.npmjs.com/package/axios
|
|
86
86
|
* https://www.npmjs.com/package/isomorphic-dompurify
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
let process = { env: {} };
|
|
91
|
-
import './index-
|
|
91
|
+
import './index-5becb925.js';
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
* https://www.npmjs.com/package/redux
|
|
81
81
|
* https://www.npmjs.com/package/lodash-es
|
|
82
82
|
* https://www.npmjs.com/package/window-or-global
|
|
83
|
-
* https://www.npmjs.com/package/redux-logger
|
|
84
83
|
* https://www.npmjs.com/package/redux-thunk
|
|
84
|
+
* https://www.npmjs.com/package/redux-logger
|
|
85
85
|
* https://www.npmjs.com/package/axios
|
|
86
86
|
* https://www.npmjs.com/package/isomorphic-dompurify
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
-
import"./index-
|
|
90
|
+
import"./index-9b1155d4.js";
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
* https://www.npmjs.com/package/redux
|
|
81
81
|
* https://www.npmjs.com/package/lodash-es
|
|
82
82
|
* https://www.npmjs.com/package/window-or-global
|
|
83
|
-
* https://www.npmjs.com/package/redux-logger
|
|
84
83
|
* https://www.npmjs.com/package/redux-thunk
|
|
84
|
+
* https://www.npmjs.com/package/redux-logger
|
|
85
85
|
* https://www.npmjs.com/package/axios
|
|
86
86
|
* https://www.npmjs.com/package/isomorphic-dompurify
|
|
87
87
|
* https://www.npmjs.com/package/striptags
|
|
@@ -17472,9 +17472,19 @@ var _ibmScriptUrl = function _ibmScriptUrl() {
|
|
|
17472
17472
|
*/
|
|
17473
17473
|
function _loadScript() {
|
|
17474
17474
|
var environment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _ibmEnvironment;
|
|
17475
|
+
// loader.js uses top-level const/let declarations and cannot be safely re-injected
|
|
17476
|
+
// into the same page — doing so throws "SyntaxError: Identifier already declared".
|
|
17477
|
+
// If a script tag for this URL already exists in the DOM, skip injection and rely
|
|
17478
|
+
// on the existing execution to eventually set IBM.Mediacenter.player. We still set
|
|
17479
|
+
// the flag to true so _scriptReady stays in polling mode.
|
|
17480
|
+
var loaderUrl = _ibmScriptUrl(environment);
|
|
17481
|
+
if (document.querySelector("script[src=\"".concat(loaderUrl, "\"]"))) {
|
|
17482
|
+
lib._ibmKalturaScriptLoading = true;
|
|
17483
|
+
return;
|
|
17484
|
+
}
|
|
17475
17485
|
lib._ibmKalturaScriptLoading = true;
|
|
17476
17486
|
var script = document.createElement('script');
|
|
17477
|
-
script.src =
|
|
17487
|
+
script.src = loaderUrl;
|
|
17478
17488
|
script.async = true;
|
|
17479
17489
|
document.body.appendChild(script);
|
|
17480
17490
|
}
|
|
@@ -17487,6 +17497,18 @@ function _loadScript() {
|
|
|
17487
17497
|
*/
|
|
17488
17498
|
var _timeoutRetries = 50;
|
|
17489
17499
|
|
|
17500
|
+
/**
|
|
17501
|
+
* Milliseconds to wait for IBM.Mediacenter.player.embed() to resolve before
|
|
17502
|
+
* treating it as a missed-event hang. On cached page loads, loader.js's
|
|
17503
|
+
* player-plugin.js can fire its ready event before embed() registers its
|
|
17504
|
+
* listener, leaving the returned Promise pending indefinitely. If that
|
|
17505
|
+
* happens we reset the loader state and retry from scratch.
|
|
17506
|
+
*
|
|
17507
|
+
* @type {number}
|
|
17508
|
+
* @private
|
|
17509
|
+
*/
|
|
17510
|
+
var _embedTimeoutMs = 8000;
|
|
17511
|
+
|
|
17490
17512
|
/**
|
|
17491
17513
|
* Tracks the script loading status. Stored on `root` (window) so the value
|
|
17492
17514
|
* persists when this module is executed more than once in the same page
|
|
@@ -17507,10 +17529,69 @@ if (lib._ibmKalturaScriptLoading === undefined) {
|
|
|
17507
17529
|
* not reliably support simultaneous calls for the same entryId, so we chain
|
|
17508
17530
|
* each call onto the previous one to ensure they run sequentially.
|
|
17509
17531
|
*
|
|
17532
|
+
* Stored on `root` (window) so the value persists when this module is executed
|
|
17533
|
+
* more than once in the same page (e.g. once as an async page script and again
|
|
17534
|
+
* as a deferred Adobe Target Experience Fragment script). Without this, a second
|
|
17535
|
+
* execution resets the queue to Promise.resolve(), breaking serialization and
|
|
17536
|
+
* allowing simultaneous embed() calls that hang indefinitely.
|
|
17537
|
+
*
|
|
17510
17538
|
* @type {Promise<any>}
|
|
17511
17539
|
* @private
|
|
17512
17540
|
*/
|
|
17513
|
-
|
|
17541
|
+
if (lib._ibmKalturaEmbedQueue === undefined) {
|
|
17542
|
+
lib._ibmKalturaEmbedQueue = Promise.resolve();
|
|
17543
|
+
}
|
|
17544
|
+
|
|
17545
|
+
/**
|
|
17546
|
+
* Installs a one-time Object.defineProperty setter on root.IBM.Mediacenter.player
|
|
17547
|
+
* so that resolve() is called SYNCHRONOUSLY the instant loader.js assigns the
|
|
17548
|
+
* player object — before player-plugin.js can fire its ready event. This closes
|
|
17549
|
+
* the ~100 ms gap that the polling fallback leaves between the assignment and
|
|
17550
|
+
* the first poll tick, which was causing embed() to miss the ready event (Bug 2).
|
|
17551
|
+
*
|
|
17552
|
+
* Falls back to the polling loop (_scriptReady) if defineProperty is not available
|
|
17553
|
+
* or if IBM.Mediacenter has already been replaced after the trap was installed.
|
|
17554
|
+
*
|
|
17555
|
+
* @param {Function} resolve Resolve function
|
|
17556
|
+
* @private
|
|
17557
|
+
*/
|
|
17558
|
+
function _trapPlayerReady(resolve) {
|
|
17559
|
+
var _root$IBM, _root$IBM2, _root$IBM3, _root$IBM3$Mediacente;
|
|
17560
|
+
// If the player is already set, resolve immediately.
|
|
17561
|
+
if (lib !== null && lib !== void 0 && (_root$IBM = lib.IBM) !== null && _root$IBM !== void 0 && (_root$IBM = _root$IBM.Mediacenter) !== null && _root$IBM !== void 0 && _root$IBM.player) {
|
|
17562
|
+
lib._ibmKalturaScriptLoading = false;
|
|
17563
|
+
resolve();
|
|
17564
|
+
return;
|
|
17565
|
+
}
|
|
17566
|
+
|
|
17567
|
+
// Ensure the IBM.Mediacenter path exists so we have an object to trap.
|
|
17568
|
+
(_root$IBM2 = lib.IBM) !== null && _root$IBM2 !== void 0 ? _root$IBM2 : lib.IBM = {};
|
|
17569
|
+
(_root$IBM3$Mediacente = (_root$IBM3 = lib.IBM).Mediacenter) !== null && _root$IBM3$Mediacente !== void 0 ? _root$IBM3$Mediacente : _root$IBM3.Mediacenter = {};
|
|
17570
|
+
var mc = lib.IBM.Mediacenter;
|
|
17571
|
+
var trapped = false;
|
|
17572
|
+
try {
|
|
17573
|
+
Object.defineProperty(mc, 'player', {
|
|
17574
|
+
configurable: true,
|
|
17575
|
+
enumerable: true,
|
|
17576
|
+
set: function set(value) {
|
|
17577
|
+
// Restore as a plain writable property before anything else runs.
|
|
17578
|
+
Object.defineProperty(mc, 'player', {
|
|
17579
|
+
configurable: true,
|
|
17580
|
+
enumerable: true,
|
|
17581
|
+
writable: true,
|
|
17582
|
+
value: value
|
|
17583
|
+
});
|
|
17584
|
+
if (!trapped) {
|
|
17585
|
+
trapped = true;
|
|
17586
|
+
lib._ibmKalturaScriptLoading = false;
|
|
17587
|
+
resolve();
|
|
17588
|
+
}
|
|
17589
|
+
}
|
|
17590
|
+
});
|
|
17591
|
+
} catch (_e) {
|
|
17592
|
+
// defineProperty not supported in this environment — fall through to polling.
|
|
17593
|
+
}
|
|
17594
|
+
}
|
|
17514
17595
|
|
|
17515
17596
|
/**
|
|
17516
17597
|
* Timeout loop to check script state is the _scriptLoaded state or _scriptLoading state
|
|
@@ -17522,13 +17603,13 @@ var _embedQueue = Promise.resolve();
|
|
|
17522
17603
|
* @private
|
|
17523
17604
|
*/
|
|
17524
17605
|
function _scriptReady(resolve, reject) {
|
|
17525
|
-
var _root$
|
|
17606
|
+
var _root$IBM4;
|
|
17526
17607
|
var environment = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _ibmEnvironment;
|
|
17527
17608
|
var attempt = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
17528
17609
|
/**
|
|
17529
17610
|
* @param {object} root?.IBM.Mediacenter.player if exists then resolve
|
|
17530
17611
|
*/
|
|
17531
|
-
if (lib !== null && lib !== void 0 && (_root$
|
|
17612
|
+
if (lib !== null && lib !== void 0 && (_root$IBM4 = lib.IBM) !== null && _root$IBM4 !== void 0 && (_root$IBM4 = _root$IBM4.Mediacenter) !== null && _root$IBM4 !== void 0 && _root$IBM4.player) {
|
|
17532
17613
|
lib._ibmKalturaScriptLoading = false;
|
|
17533
17614
|
resolve();
|
|
17534
17615
|
} else if (lib._ibmKalturaScriptLoading) {
|
|
@@ -17540,8 +17621,19 @@ function _scriptReady(resolve, reject) {
|
|
|
17540
17621
|
reject();
|
|
17541
17622
|
}
|
|
17542
17623
|
} else {
|
|
17624
|
+
// Install the defineProperty trap BEFORE injecting loader.js so we catch
|
|
17625
|
+
// the player assignment synchronously when loader.js sets IBM.Mediacenter.player.
|
|
17626
|
+
_trapPlayerReady(resolve);
|
|
17543
17627
|
_loadScript(environment);
|
|
17544
|
-
|
|
17628
|
+
// Also poll as a backstop: if IBM.Mediacenter gets replaced wholesale instead
|
|
17629
|
+
// of mutated in place, the trap above is orphaned and would never fire.
|
|
17630
|
+
if (attempt < _timeoutRetries) {
|
|
17631
|
+
setTimeout(function () {
|
|
17632
|
+
_scriptReady(resolve, reject, environment, attempt + 1);
|
|
17633
|
+
}, 100);
|
|
17634
|
+
} else {
|
|
17635
|
+
reject();
|
|
17636
|
+
}
|
|
17545
17637
|
}
|
|
17546
17638
|
}
|
|
17547
17639
|
|
|
@@ -17599,7 +17691,7 @@ var KalturaPlayerAPIV7 = /*#__PURE__*/function () {
|
|
|
17599
17691
|
}, {
|
|
17600
17692
|
key: "getThumbnailUrl",
|
|
17601
17693
|
value: function getThumbnailUrl(_ref6) {
|
|
17602
|
-
var _root$
|
|
17694
|
+
var _root$IBM5;
|
|
17603
17695
|
var _ref6$mediaId = _ref6.mediaId,
|
|
17604
17696
|
mediaId = _ref6$mediaId === void 0 ? '' : _ref6$mediaId,
|
|
17605
17697
|
_ref6$height = _ref6.height,
|
|
@@ -17608,7 +17700,7 @@ var KalturaPlayerAPIV7 = /*#__PURE__*/function () {
|
|
|
17608
17700
|
width = _ref6$width === void 0 ? 0 : _ref6$width,
|
|
17609
17701
|
_ref6$partnerId = _ref6.partnerId,
|
|
17610
17702
|
partnerId = _ref6$partnerId === void 0 ? _partnerId : _ref6$partnerId;
|
|
17611
|
-
return (lib === null || lib === void 0 || (_root$
|
|
17703
|
+
return (lib === null || lib === void 0 || (_root$IBM5 = lib.IBM) === null || _root$IBM5 === void 0 || (_root$IBM5 = _root$IBM5.Mediacenter) === null || _root$IBM5 === void 0 || (_root$IBM5 = _root$IBM5.player) === null || _root$IBM5 === void 0 || (_root$IBM5 = _root$IBM5.api) === null || _root$IBM5 === void 0 ? void 0 : _root$IBM5.getThumbnail(partnerId, mediaId, width, height)) || '';
|
|
17612
17704
|
}
|
|
17613
17705
|
|
|
17614
17706
|
/**
|
|
@@ -17639,8 +17731,8 @@ var KalturaPlayerAPIV7 = /*#__PURE__*/function () {
|
|
|
17639
17731
|
partnerId = _args.length > 1 && _args[1] !== undefined ? _args[1] : _partnerId;
|
|
17640
17732
|
_context.next = 1;
|
|
17641
17733
|
return this.checkScript().then(function () {
|
|
17642
|
-
var _root$
|
|
17643
|
-
return (lib === null || lib === void 0 || (_root$
|
|
17734
|
+
var _root$IBM6;
|
|
17735
|
+
return (lib === null || lib === void 0 || (_root$IBM6 = lib.IBM) === null || _root$IBM6 === void 0 || (_root$IBM6 = _root$IBM6.Mediacenter) === null || _root$IBM6 === void 0 || (_root$IBM6 = _root$IBM6.player) === null || _root$IBM6 === void 0 || (_root$IBM6 = _root$IBM6.api) === null || _root$IBM6 === void 0 ? void 0 : _root$IBM6.getMediaProperties(partnerId, mediaId)) || {};
|
|
17644
17736
|
});
|
|
17645
17737
|
case 1:
|
|
17646
17738
|
return _context.abrupt("return", _context.sent);
|
|
@@ -17693,14 +17785,15 @@ var KalturaPlayerAPIV7 = /*#__PURE__*/function () {
|
|
|
17693
17785
|
return this.checkScript().then(function () {
|
|
17694
17786
|
var legacyPromiseKWidget = /*#__PURE__*/function () {
|
|
17695
17787
|
var _ref7 = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee2() {
|
|
17696
|
-
var _configuration$player, _ibmEnvironments$conf, _configuration$
|
|
17697
|
-
var playerType, playerEnvironment, playerUiConfId, playerConfiguration, isCustomCreated, newVideoDiv, kalturaPlayer, previousVideoDiv;
|
|
17788
|
+
var _configuration$player, _configuration$player2, _ibmEnvironments$conf, _configuration$player3;
|
|
17789
|
+
var playerType, envKey, playerEnvironment, playerUiConfId, playerConfiguration, isCustomCreated, newVideoDiv, kalturaPlayer, loaderUrl, loaderAlreadyInjected, _root$IBM7, previousVideoDiv, _t, _t2;
|
|
17698
17790
|
return regenerator.wrap(function (_context2) {
|
|
17699
17791
|
while (1) switch (_context2.prev = _context2.next) {
|
|
17700
17792
|
case 0:
|
|
17701
17793
|
playerType = (_configuration$player = configuration === null || configuration === void 0 ? void 0 : configuration.playerType) !== null && _configuration$player !== void 0 ? _configuration$player : 'VIDEO';
|
|
17794
|
+
envKey = (_configuration$player2 = configuration.playerEnvironment) !== null && _configuration$player2 !== void 0 ? _configuration$player2 : _ibmEnvironment;
|
|
17702
17795
|
playerEnvironment = (_ibmEnvironments$conf = _ibmEnvironments[configuration.playerEnvironment]) !== null && _ibmEnvironments$conf !== void 0 ? _ibmEnvironments$conf : _ibmEnvironments[_ibmEnvironment];
|
|
17703
|
-
playerUiConfId = (_configuration$
|
|
17796
|
+
playerUiConfId = (_configuration$player3 = configuration.playerUiConfId) !== null && _configuration$player3 !== void 0 ? _configuration$player3 : _uiConfIds[playerType];
|
|
17704
17797
|
playerConfiguration = _objectSpread$7({
|
|
17705
17798
|
playerType: playerType,
|
|
17706
17799
|
autoPlay: true,
|
|
@@ -17729,32 +17822,112 @@ var KalturaPlayerAPIV7 = /*#__PURE__*/function () {
|
|
|
17729
17822
|
}
|
|
17730
17823
|
|
|
17731
17824
|
/**
|
|
17732
|
-
* Embed the player and execute custom callback
|
|
17825
|
+
* Embed the player and execute custom callback.
|
|
17826
|
+
*
|
|
17827
|
+
* Wraps embed() with a timeout guard: on cached page loads,
|
|
17828
|
+
* loader.js's player-plugin.js may fire its ready event before
|
|
17829
|
+
* embed() registers its listener, leaving the Promise pending
|
|
17830
|
+
* indefinitely. If the timeout fires we reset the loader state so
|
|
17831
|
+
* _scriptReady() re-injects loader.js, giving the plugin a fresh
|
|
17832
|
+
* chance to fire its event after the listener is in place.
|
|
17733
17833
|
*/
|
|
17734
|
-
|
|
17735
|
-
|
|
17834
|
+
// If the target element was removed from the DOM before we get here
|
|
17835
|
+
// (e.g. Adobe Target replaced the mbox while embed() was queued),
|
|
17836
|
+
// skip the embed entirely so we don't block _embedQueue indefinitely.
|
|
17837
|
+
if (document.getElementById(targetId)) {
|
|
17838
|
+
_context2.next = 1;
|
|
17839
|
+
break;
|
|
17840
|
+
}
|
|
17841
|
+
return _context2.abrupt("return", null);
|
|
17736
17842
|
case 1:
|
|
17843
|
+
_context2.prev = 1;
|
|
17844
|
+
_context2.next = 2;
|
|
17845
|
+
return Promise.race([lib.IBM.Mediacenter.player.embed(playerConfiguration), new Promise(function (_, reject) {
|
|
17846
|
+
return setTimeout(function () {
|
|
17847
|
+
return reject(new Error('ibm_embed_timeout'));
|
|
17848
|
+
}, _embedTimeoutMs);
|
|
17849
|
+
})]);
|
|
17850
|
+
case 2:
|
|
17851
|
+
kalturaPlayer = _context2.sent;
|
|
17852
|
+
_context2.next = 10;
|
|
17853
|
+
break;
|
|
17854
|
+
case 3:
|
|
17855
|
+
_context2.prev = 3;
|
|
17856
|
+
_t = _context2["catch"](1);
|
|
17857
|
+
if (!((_t === null || _t === void 0 ? void 0 : _t.message) !== 'ibm_embed_timeout')) {
|
|
17858
|
+
_context2.next = 4;
|
|
17859
|
+
break;
|
|
17860
|
+
}
|
|
17861
|
+
throw _t;
|
|
17862
|
+
case 4:
|
|
17863
|
+
// Only perform a full reset (delete player, re-inject loader.js) when
|
|
17864
|
+
// the loader has already finished (_ibmKalturaScriptLoading === false)
|
|
17865
|
+
// AND loader.js is not yet in the DOM (so re-injection is safe).
|
|
17866
|
+
// loader.js uses top-level const/let declarations and crashes with
|
|
17867
|
+
// "SyntaxError: Identifier already declared" on a second injection, so
|
|
17868
|
+
// we skip the delete+reinject path when it's already present and instead
|
|
17869
|
+
// rely on polling to detect when IBM.Mediacenter.player becomes available.
|
|
17870
|
+
loaderUrl = _ibmScriptUrl(envKey);
|
|
17871
|
+
loaderAlreadyInjected = !!document.querySelector("script[src=\"".concat(loaderUrl, "\"]"));
|
|
17872
|
+
if (lib._ibmKalturaScriptLoading === false && !loaderAlreadyInjected) {
|
|
17873
|
+
lib._ibmKalturaScriptLoading = undefined;
|
|
17874
|
+
if ((_root$IBM7 = lib.IBM) !== null && _root$IBM7 !== void 0 && _root$IBM7.Mediacenter) {
|
|
17875
|
+
delete lib.IBM.Mediacenter;
|
|
17876
|
+
}
|
|
17877
|
+
}
|
|
17878
|
+
_context2.next = 5;
|
|
17879
|
+
return new Promise(function (res, rej) {
|
|
17880
|
+
return _scriptReady(res, rej, envKey);
|
|
17881
|
+
});
|
|
17882
|
+
case 5:
|
|
17883
|
+
if (document.getElementById(targetId)) {
|
|
17884
|
+
_context2.next = 6;
|
|
17885
|
+
break;
|
|
17886
|
+
}
|
|
17887
|
+
return _context2.abrupt("return", null);
|
|
17888
|
+
case 6:
|
|
17889
|
+
_context2.prev = 6;
|
|
17890
|
+
_context2.next = 7;
|
|
17891
|
+
return Promise.race([lib.IBM.Mediacenter.player.embed(playerConfiguration), new Promise(function (_, reject) {
|
|
17892
|
+
return setTimeout(function () {
|
|
17893
|
+
return reject(new Error('ibm_embed_timeout_retry'));
|
|
17894
|
+
}, _embedTimeoutMs);
|
|
17895
|
+
})]);
|
|
17896
|
+
case 7:
|
|
17737
17897
|
kalturaPlayer = _context2.sent;
|
|
17898
|
+
_context2.next = 10;
|
|
17899
|
+
break;
|
|
17900
|
+
case 8:
|
|
17901
|
+
_context2.prev = 8;
|
|
17902
|
+
_t2 = _context2["catch"](6);
|
|
17903
|
+
if (!((_t2 === null || _t2 === void 0 ? void 0 : _t2.message) !== 'ibm_embed_timeout_retry')) {
|
|
17904
|
+
_context2.next = 9;
|
|
17905
|
+
break;
|
|
17906
|
+
}
|
|
17907
|
+
throw _t2;
|
|
17908
|
+
case 9:
|
|
17909
|
+
return _context2.abrupt("return", null);
|
|
17910
|
+
case 10:
|
|
17738
17911
|
customReadyCallback(kalturaPlayer);
|
|
17739
17912
|
if (isCustomCreated) {
|
|
17740
17913
|
previousVideoDiv = document.querySelector('cds-tabs-extended-media').shadowRoot.querySelector(".bx--accordion__item--active cds-video-player").lastChild;
|
|
17741
17914
|
previousVideoDiv.parentElement.appendChild(document.getElementById(targetId));
|
|
17742
17915
|
}
|
|
17743
17916
|
return _context2.abrupt("return", kalturaPlayer);
|
|
17744
|
-
case
|
|
17917
|
+
case 11:
|
|
17745
17918
|
case "end":
|
|
17746
17919
|
return _context2.stop();
|
|
17747
17920
|
}
|
|
17748
|
-
}, _callee2);
|
|
17921
|
+
}, _callee2, null, [[1, 3], [6, 8]]);
|
|
17749
17922
|
}));
|
|
17750
17923
|
return function legacyPromiseKWidget() {
|
|
17751
17924
|
return _ref7.apply(this, arguments);
|
|
17752
17925
|
};
|
|
17753
17926
|
}();
|
|
17754
|
-
|
|
17927
|
+
lib._ibmKalturaEmbedQueue = lib._ibmKalturaEmbedQueue.catch(function () {}).then(function () {
|
|
17755
17928
|
return legacyPromiseKWidget();
|
|
17756
17929
|
});
|
|
17757
|
-
return
|
|
17930
|
+
return lib._ibmKalturaEmbedQueue;
|
|
17758
17931
|
});
|
|
17759
17932
|
case 1:
|
|
17760
17933
|
return _context3.abrupt("return", _context3.sent);
|
|
@@ -33789,7 +33962,7 @@ let C4DMegaMenuTopNavMenu = _decorate$s([carbonElement(`${c4dPrefix$s}-megamenu-
|
|
|
33789
33962
|
var _this$parentElement;
|
|
33790
33963
|
// Import needed subcomponents on first expansion
|
|
33791
33964
|
if (!((_this$parentElement = this.parentElement) !== null && _this$parentElement !== void 0 && _this$parentElement.importedMegamenu)) {
|
|
33792
|
-
await Promise.all([import('./megamenu-left-navigation-
|
|
33965
|
+
await Promise.all([import('./megamenu-left-navigation-946e6ecd.js'), import('./megamenu-category-link-05dee472.js'), import('./megamenu-category-link-group-8099bca4.js'), import('./megamenu-category-group-6c76c126.js'), import('./megamenu-category-group-copy-62f21ae2.js'), import('./megamenu-category-heading-478cfb1a.js'), Promise.resolve().then(function () { return megamenuLinkWithIcon; }), import('./megamenu-overlay-8b50d36d.js'), import('./megamenu-tab-8b71189a.js'), Promise.resolve().then(function () { return megamenuTabs; })]);
|
|
33793
33966
|
this.parentElement.importedMegamenu = true;
|
|
33794
33967
|
}
|
|
33795
33968
|
|
|
@@ -39867,7 +40040,7 @@ let C4DLeftNav = _decorate$b([carbonElement(`${c4dPrefix$b}-left-nav`)], functio
|
|
|
39867
40040
|
value() {
|
|
39868
40041
|
return async event => {
|
|
39869
40042
|
if (!this._importedSideNav) {
|
|
39870
|
-
await Promise.all([Promise.resolve().then(function () { return leftNavName; }), import('./left-nav-menu-
|
|
40043
|
+
await Promise.all([Promise.resolve().then(function () { return leftNavName; }), import('./left-nav-menu-96dbffa3.js'), import('./left-nav-menu-section-ee8222d1.js'), import('./left-nav-menu-item-2919662e.js'), import('./left-nav-menu-category-heading-8c2b8ed1.js'), import('./left-nav-overlay-69df9fd0.js')]);
|
|
39871
40044
|
this._importedSideNav = true;
|
|
39872
40045
|
}
|
|
39873
40046
|
this.expanded = event.detail.active;
|