@carbon/ibmdotcom-services 1.59.0 → 1.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,6 +56,8 @@ import root from 'window-or-global';
56
56
  import settings from 'carbon-components/es/globals/js/settings';
57
57
  var prefix = settings.prefix;
58
58
  var ddsPrefix = ddsSettings.stablePrefix;
59
+ var c4dPrefix = 'c4d';
60
+ var cdsPrefix = 'cds';
59
61
  var gridBreakpoint = parseFloat(breakpoints.lg.width) * baseFontSize;
60
62
  var StickyHeader = /*#__PURE__*/function () {
61
63
  function StickyHeader() {
@@ -108,19 +110,89 @@ var StickyHeader = /*#__PURE__*/function () {
108
110
  value: function _validateComponent(component, expected) {
109
111
  var received = component.tagName.toLowerCase();
110
112
  if (received !== expected) {
111
- throw new TypeError("".concat(expected, " expected, ").concat(received, " provided"));
113
+ // TODO: don't check for v1/v2 compatibility after v1 EOL.
114
+ if (received.split('-').splice(1).join('-') !== expected.split('-').splice(1).join('-')) {
115
+ throw new TypeError("".concat(expected, " expected, ").concat(received, " provided"));
116
+ } else {
117
+ var message = ["Mixed prefixes detected.\n", "expected ".concat(expected, ", found ").concat(received, ".")];
118
+ console.warn(message.join(''));
119
+ return true;
120
+ }
112
121
  } else {
113
122
  return true;
114
123
  }
115
124
  }
116
125
 
117
126
  /**
118
- * Stores references to TOC sub-elements that are relevant to current viewport
119
- * dimensions.
127
+ * Helper method to query for either C4IBM v1.x or v2.x sub-elements;
128
+ *
129
+ * @param {*} element The C4IBM element.
130
+ * @param {*} v1Func The querying function to run if using a C4IBM v1.x element.
131
+ * @param {*} v2Func The querying function to run if using a C4IBM v2.x element.
120
132
  */
121
133
  }, {
122
- key: "_updateTableOfContentsRefs",
123
- value: function _updateTableOfContentsRefs() {
134
+ key: "_updateRefsV1orV2",
135
+ value: function _updateRefsV1orV2(element, v1Func, v2Func) {
136
+ var elementPrefix = element.tagName.toLowerCase().split('-')[0];
137
+ if (elementPrefix === ddsPrefix) {
138
+ v1Func.bind(this)();
139
+ } else if (elementPrefix === c4dPrefix) {
140
+ v2Func.bind(this)();
141
+ } else {
142
+ throw new Error("\n Could not find sub-elements for ".concat(element.tagName.toLowerCase(), ".\n "));
143
+ }
144
+ }
145
+
146
+ /**
147
+ * Temporary method to find v1 leadspace sub-elements.
148
+ */
149
+ }, {
150
+ key: "_updateLeadspaceRefsV1",
151
+ value: function _updateLeadspaceRefsV1() {
152
+ var leadspaceSearch = this._elements.leadspaceSearch;
153
+ this._elements.leadspaceSearchBar = leadspaceSearch.shadowRoot.querySelector(".".concat(prefix, "--search-container"));
154
+ this._elements.leadspaceSearchInput = leadspaceSearch.querySelector("".concat(ddsPrefix, "-search-with-typeahead"));
155
+ }
156
+
157
+ /**
158
+ * Temporary method to find v2 leadspace sub-elements.
159
+ */
160
+ }, {
161
+ key: "_updateLeadspaceRefsV2",
162
+ value: function _updateLeadspaceRefsV2() {
163
+ var leadspaceSearch = this._elements.leadspaceSearch;
164
+ this._elements.leadspaceSearchBar = leadspaceSearch.shadowRoot.querySelector(".".concat(cdsPrefix, "--search-container"));
165
+ this._elements.leadspaceSearchInput = leadspaceSearch.querySelector("".concat(c4dPrefix, "-search-with-typeahead"));
166
+ }
167
+
168
+ /**
169
+ * Temporary method to find v1 masthead sub-elements.
170
+ */
171
+ }, {
172
+ key: "_updateMastheadRefsV1",
173
+ value: function _updateMastheadRefsV1() {
174
+ var masthead = this._elements.masthead;
175
+ this._elements.mastheadL0 = masthead.shadowRoot.querySelector(".".concat(prefix, "--masthead__l0"));
176
+ this._elements.mastheadL1 = masthead.querySelector("".concat(ddsPrefix, "-masthead-l1"));
177
+ }
178
+
179
+ /**
180
+ * Temporary method to find v2 masthead sub-elements.
181
+ */
182
+ }, {
183
+ key: "_updateMastheadRefsV2",
184
+ value: function _updateMastheadRefsV2() {
185
+ var masthead = this._elements.masthead;
186
+ this._elements.mastheadL0 = masthead.shadowRoot.querySelector(".".concat(cdsPrefix, "--masthead__l0"));
187
+ this._elements.mastheadL1 = masthead.querySelector("".concat(c4dPrefix, "-masthead-l1"));
188
+ }
189
+
190
+ /**
191
+ * Temporary method to find v1 table of contents sub-elements.
192
+ */
193
+ }, {
194
+ key: "_updateTableOfContentsRefsV1",
195
+ value: function _updateTableOfContentsRefsV1() {
124
196
  var toc = this._elements.tableOfContents;
125
197
  var tocRoot = toc.shadowRoot;
126
198
  var selectors = {
@@ -136,6 +208,28 @@ var StickyHeader = /*#__PURE__*/function () {
136
208
  var viewportDimension = window.innerWidth >= gridBreakpoint ? 'desktop' : 'mobile';
137
209
  this._elements.tableOfContentsInnerBar = tocRoot.querySelector(selectors[viewportDimension][toc.layout || 'vertical']);
138
210
  }
211
+
212
+ /**
213
+ * Temporary method to find v2 table of contents sub-elements.
214
+ */
215
+ }, {
216
+ key: "_updateTableOfContentsRefsV2",
217
+ value: function _updateTableOfContentsRefsV2() {
218
+ var toc = this._elements.tableOfContents;
219
+ var tocRoot = toc.shadowRoot;
220
+ this._elements.tableOfContentsInnerBar = tocRoot.querySelector(window.innerWidth >= gridBreakpoint && (toc === null || toc === void 0 ? void 0 : toc.layout) !== 'horizontal' ? ".".concat(c4dPrefix, "-ce--table-of-contents__items-container") : ".".concat(cdsPrefix, "--tableofcontents__navbar"));
221
+ }
222
+
223
+ /**
224
+ * Stores references to TOC sub-elements that are relevant to current viewport
225
+ * dimensions.
226
+ */
227
+ }, {
228
+ key: "_updateTableOfContentsRefs",
229
+ value: function _updateTableOfContentsRefs() {
230
+ var toc = this._elements.tableOfContents;
231
+ this._updateRefsV1orV2(toc, this._updateTableOfContentsRefsV1, this._updateTableOfContentsRefsV2);
232
+ }
139
233
  }, {
140
234
  key: "banner",
141
235
  set: function set(component) {
@@ -153,10 +247,8 @@ var StickyHeader = /*#__PURE__*/function () {
153
247
  set: function set(component) {
154
248
  if (this._validateComponent(component, "".concat(ddsPrefix, "-leadspace-with-search"))) {
155
249
  this._elements.leadspaceSearch = component;
156
- var leadspaceSearchBar = component.shadowRoot.querySelector(".".concat(prefix, "--search-container"));
157
- this._elements.leadspaceSearchBar = leadspaceSearchBar;
158
- this._elements.leadspaceSearchInput = component.querySelector("".concat(ddsPrefix, "-search-with-typeahead"));
159
- this._state.leadspaceSearchThreshold = parseInt(window.getComputedStyle(leadspaceSearchBar).paddingBottom) - 16;
250
+ this._updateRefsV1orV2(component, this._updateLeadspaceRefsV1, this._updateLeadspaceRefsV2);
251
+ this._state.leadspaceSearchThreshold = parseInt(window.getComputedStyle(this._elements.leadspaceSearchBar).paddingBottom) - 16;
160
252
  this._manageStickyElements();
161
253
  }
162
254
  }
@@ -173,9 +265,10 @@ var StickyHeader = /*#__PURE__*/function () {
173
265
  set: function set(component) {
174
266
  if (this._validateComponent(component, "".concat(ddsPrefix, "-masthead"))) {
175
267
  this._elements.masthead = component;
176
- if (this._elements.banner) this._elements.masthead.setAttribute('with-banner', '');
177
- this._elements.mastheadL0 = component.shadowRoot.querySelector(".".concat(prefix, "--masthead__l0"));
178
- this._elements.mastheadL1 = component.querySelector("".concat(ddsPrefix, "-masthead-l1"));
268
+ if (this._elements.banner) {
269
+ this._elements.masthead.setAttribute('with-banner', '');
270
+ }
271
+ this._updateRefsV1orV2(component, this._updateMastheadRefsV1, this._updateMastheadRefsV2);
179
272
  this._manageStickyElements();
180
273
  }
181
274
  }
@@ -11,10 +11,10 @@
11
11
  * @exports ibmdotcom.settings
12
12
  * @type {object} Settings object
13
13
  * @property {string} [prefix=dds]
14
- * Carbon for IBM.com v1.59.0',
14
+ * Carbon for IBM.com v1.60.0',
15
15
  */
16
16
  var settings = {
17
- version: 'Carbon for IBM.com v1.59.0',
17
+ version: 'Carbon for IBM.com v1.60.0',
18
18
  stablePrefix: 'dds'
19
19
  };
20
20
  export default settings;
@@ -63,6 +63,8 @@ function _toPrimitive(input, hint) {
63
63
 
64
64
  var prefix = _settings2.default.prefix;
65
65
  var ddsPrefix = _settings.default.stablePrefix;
66
+ var c4dPrefix = 'c4d';
67
+ var cdsPrefix = 'cds';
66
68
  var gridBreakpoint = parseFloat(_layout.breakpoints.lg.width) * _layout.baseFontSize;
67
69
  var StickyHeader = /*#__PURE__*/function () {
68
70
  function StickyHeader() {
@@ -115,19 +117,89 @@ var StickyHeader = /*#__PURE__*/function () {
115
117
  value: function _validateComponent(component, expected) {
116
118
  var received = component.tagName.toLowerCase();
117
119
  if (received !== expected) {
118
- throw new TypeError("".concat(expected, " expected, ").concat(received, " provided"));
120
+ // TODO: don't check for v1/v2 compatibility after v1 EOL.
121
+ if (received.split('-').splice(1).join('-') !== expected.split('-').splice(1).join('-')) {
122
+ throw new TypeError("".concat(expected, " expected, ").concat(received, " provided"));
123
+ } else {
124
+ var message = ["Mixed prefixes detected.\n", "expected ".concat(expected, ", found ").concat(received, ".")];
125
+ console.warn(message.join(''));
126
+ return true;
127
+ }
119
128
  } else {
120
129
  return true;
121
130
  }
122
131
  }
123
132
 
124
133
  /**
125
- * Stores references to TOC sub-elements that are relevant to current viewport
126
- * dimensions.
134
+ * Helper method to query for either C4IBM v1.x or v2.x sub-elements;
135
+ *
136
+ * @param {*} element The C4IBM element.
137
+ * @param {*} v1Func The querying function to run if using a C4IBM v1.x element.
138
+ * @param {*} v2Func The querying function to run if using a C4IBM v2.x element.
127
139
  */
128
140
  }, {
129
- key: "_updateTableOfContentsRefs",
130
- value: function _updateTableOfContentsRefs() {
141
+ key: "_updateRefsV1orV2",
142
+ value: function _updateRefsV1orV2(element, v1Func, v2Func) {
143
+ var elementPrefix = element.tagName.toLowerCase().split('-')[0];
144
+ if (elementPrefix === ddsPrefix) {
145
+ v1Func.bind(this)();
146
+ } else if (elementPrefix === c4dPrefix) {
147
+ v2Func.bind(this)();
148
+ } else {
149
+ throw new Error("\n Could not find sub-elements for ".concat(element.tagName.toLowerCase(), ".\n "));
150
+ }
151
+ }
152
+
153
+ /**
154
+ * Temporary method to find v1 leadspace sub-elements.
155
+ */
156
+ }, {
157
+ key: "_updateLeadspaceRefsV1",
158
+ value: function _updateLeadspaceRefsV1() {
159
+ var leadspaceSearch = this._elements.leadspaceSearch;
160
+ this._elements.leadspaceSearchBar = leadspaceSearch.shadowRoot.querySelector(".".concat(prefix, "--search-container"));
161
+ this._elements.leadspaceSearchInput = leadspaceSearch.querySelector("".concat(ddsPrefix, "-search-with-typeahead"));
162
+ }
163
+
164
+ /**
165
+ * Temporary method to find v2 leadspace sub-elements.
166
+ */
167
+ }, {
168
+ key: "_updateLeadspaceRefsV2",
169
+ value: function _updateLeadspaceRefsV2() {
170
+ var leadspaceSearch = this._elements.leadspaceSearch;
171
+ this._elements.leadspaceSearchBar = leadspaceSearch.shadowRoot.querySelector(".".concat(cdsPrefix, "--search-container"));
172
+ this._elements.leadspaceSearchInput = leadspaceSearch.querySelector("".concat(c4dPrefix, "-search-with-typeahead"));
173
+ }
174
+
175
+ /**
176
+ * Temporary method to find v1 masthead sub-elements.
177
+ */
178
+ }, {
179
+ key: "_updateMastheadRefsV1",
180
+ value: function _updateMastheadRefsV1() {
181
+ var masthead = this._elements.masthead;
182
+ this._elements.mastheadL0 = masthead.shadowRoot.querySelector(".".concat(prefix, "--masthead__l0"));
183
+ this._elements.mastheadL1 = masthead.querySelector("".concat(ddsPrefix, "-masthead-l1"));
184
+ }
185
+
186
+ /**
187
+ * Temporary method to find v2 masthead sub-elements.
188
+ */
189
+ }, {
190
+ key: "_updateMastheadRefsV2",
191
+ value: function _updateMastheadRefsV2() {
192
+ var masthead = this._elements.masthead;
193
+ this._elements.mastheadL0 = masthead.shadowRoot.querySelector(".".concat(cdsPrefix, "--masthead__l0"));
194
+ this._elements.mastheadL1 = masthead.querySelector("".concat(c4dPrefix, "-masthead-l1"));
195
+ }
196
+
197
+ /**
198
+ * Temporary method to find v1 table of contents sub-elements.
199
+ */
200
+ }, {
201
+ key: "_updateTableOfContentsRefsV1",
202
+ value: function _updateTableOfContentsRefsV1() {
131
203
  var toc = this._elements.tableOfContents;
132
204
  var tocRoot = toc.shadowRoot;
133
205
  var selectors = {
@@ -143,6 +215,28 @@ var StickyHeader = /*#__PURE__*/function () {
143
215
  var viewportDimension = window.innerWidth >= gridBreakpoint ? 'desktop' : 'mobile';
144
216
  this._elements.tableOfContentsInnerBar = tocRoot.querySelector(selectors[viewportDimension][toc.layout || 'vertical']);
145
217
  }
218
+
219
+ /**
220
+ * Temporary method to find v2 table of contents sub-elements.
221
+ */
222
+ }, {
223
+ key: "_updateTableOfContentsRefsV2",
224
+ value: function _updateTableOfContentsRefsV2() {
225
+ var toc = this._elements.tableOfContents;
226
+ var tocRoot = toc.shadowRoot;
227
+ this._elements.tableOfContentsInnerBar = tocRoot.querySelector(window.innerWidth >= gridBreakpoint && (toc === null || toc === void 0 ? void 0 : toc.layout) !== 'horizontal' ? ".".concat(c4dPrefix, "-ce--table-of-contents__items-container") : ".".concat(cdsPrefix, "--tableofcontents__navbar"));
228
+ }
229
+
230
+ /**
231
+ * Stores references to TOC sub-elements that are relevant to current viewport
232
+ * dimensions.
233
+ */
234
+ }, {
235
+ key: "_updateTableOfContentsRefs",
236
+ value: function _updateTableOfContentsRefs() {
237
+ var toc = this._elements.tableOfContents;
238
+ this._updateRefsV1orV2(toc, this._updateTableOfContentsRefsV1, this._updateTableOfContentsRefsV2);
239
+ }
146
240
  }, {
147
241
  key: "banner",
148
242
  set: function set(component) {
@@ -160,10 +254,8 @@ var StickyHeader = /*#__PURE__*/function () {
160
254
  set: function set(component) {
161
255
  if (this._validateComponent(component, "".concat(ddsPrefix, "-leadspace-with-search"))) {
162
256
  this._elements.leadspaceSearch = component;
163
- var leadspaceSearchBar = component.shadowRoot.querySelector(".".concat(prefix, "--search-container"));
164
- this._elements.leadspaceSearchBar = leadspaceSearchBar;
165
- this._elements.leadspaceSearchInput = component.querySelector("".concat(ddsPrefix, "-search-with-typeahead"));
166
- this._state.leadspaceSearchThreshold = parseInt(window.getComputedStyle(leadspaceSearchBar).paddingBottom) - 16;
257
+ this._updateRefsV1orV2(component, this._updateLeadspaceRefsV1, this._updateLeadspaceRefsV2);
258
+ this._state.leadspaceSearchThreshold = parseInt(window.getComputedStyle(this._elements.leadspaceSearchBar).paddingBottom) - 16;
167
259
  this._manageStickyElements();
168
260
  }
169
261
  }
@@ -180,9 +272,10 @@ var StickyHeader = /*#__PURE__*/function () {
180
272
  set: function set(component) {
181
273
  if (this._validateComponent(component, "".concat(ddsPrefix, "-masthead"))) {
182
274
  this._elements.masthead = component;
183
- if (this._elements.banner) this._elements.masthead.setAttribute('with-banner', '');
184
- this._elements.mastheadL0 = component.shadowRoot.querySelector(".".concat(prefix, "--masthead__l0"));
185
- this._elements.mastheadL1 = component.querySelector("".concat(ddsPrefix, "-masthead-l1"));
275
+ if (this._elements.banner) {
276
+ this._elements.masthead.setAttribute('with-banner', '');
277
+ }
278
+ this._updateRefsV1orV2(component, this._updateMastheadRefsV1, this._updateMastheadRefsV2);
186
279
  this._manageStickyElements();
187
280
  }
188
281
  }
@@ -17,10 +17,10 @@ exports.default = void 0;
17
17
  * @exports ibmdotcom.settings
18
18
  * @type {object} Settings object
19
19
  * @property {string} [prefix=dds]
20
- * Carbon for IBM.com v1.59.0',
20
+ * Carbon for IBM.com v1.60.0',
21
21
  */
22
22
  var settings = {
23
- version: 'Carbon for IBM.com v1.59.0',
23
+ version: 'Carbon for IBM.com v1.60.0',
24
24
  stablePrefix: 'dds'
25
25
  };
26
26
  var _default = exports.default = settings;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/ibmdotcom-services",
3
3
  "description": "Carbon for IBM.com Services",
4
- "version": "1.59.0",
4
+ "version": "1.60.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.16.3",
52
- "@carbon/ibmdotcom-utilities": "1.59.0",
52
+ "@carbon/ibmdotcom-utilities": "1.60.0",
53
53
  "@ibm/telemetry-js": "^1.3.0",
54
54
  "axios": "^1.6.8",
55
55
  "marked": "^4.0.10",
@@ -91,5 +91,5 @@
91
91
  "rollup-plugin-terser": "^7.0.2",
92
92
  "whatwg-fetch": "^2.0.3"
93
93
  },
94
- "gitHead": "198bdef4ac7666807a6cab98dc8fda7307899b95"
94
+ "gitHead": "f251c905e8ea8aadfd839b1d80993b84419cf584"
95
95
  }
@@ -4138,10 +4138,10 @@
4138
4138
  * @exports ibmdotcom.settings
4139
4139
  * @type {object} Settings object
4140
4140
  * @property {string} [prefix=dds]
4141
- * Carbon for IBM.com v1.59.0',
4141
+ * Carbon for IBM.com v1.60.0',
4142
4142
  */
4143
4143
  var settings = {
4144
- version: 'Carbon for IBM.com v1.59.0',
4144
+ version: 'Carbon for IBM.com v1.60.0',
4145
4145
  stablePrefix: 'dds'
4146
4146
  };
4147
4147
 
@@ -7,4 +7,4 @@ e.exports=r=function(){return o},e.exports.__esModule=!0,e.exports.default=e.exp
7
7
  *
8
8
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
9
9
  * Released under the MIT license
10
- */!function(e,t){var r;r=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(n){function o(){}function i(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(r);/^[\{\[]/.test(a)&&(r=a)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+r+s}}function a(e,r){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");r||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(n.read||n)(c,u)||t(c),r)try{c=JSON.parse(c)}catch(e){}if(o[u]=c,e===u)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,r){i(t,"",e(r,{expires:-1}))},o.defaults={},o.withConverter=r,o}((function(){}))},e.exports=r()}(St);var kt=St.exports,Tt=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"checkCookie",value:function(){return{user:"1"===kt.get("com.ibm.cloud.iam.LoggedIn.prod")?"authenticated":"anonymous"}}},{key:"checkAPI",value:(t=m(b.mark((function e(){var t;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ot.get("/api/v6/selected-account?profile=true",{headers:{Accept:"application/json"}}).then((function(e){return 200===e.status?"authenticated":"anonymous"})).catch((function(e){return console.error(e),"anonymous"}));case 2:return t=e.sent,e.abrupt("return",{user:t});case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),e}(),At="Carbon for IBM.com v1.59.0";var _t;function Pt(){return _t||(_t=new Promise((function(e,t){var r=0;!function n(){f.digitalData&&f.digitalData.page&&f.digitalData.page.isDataLayerReady?e():++r<50?setTimeout((function(){n()}),100):t(new Error("Timeout polling for digital data object."))}()}))),_t}var Rt=function(){function e(){o(this,e)}var t,r,n,i;return l(e,null,[{key:"isReady",value:function(){return Pt()}},{key:"getAll",value:(i=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData})).catch((function(){return null}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"setVersion",value:(n=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){f.digitalData.page.pageInfo.version=At}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getLanguage",value:(r=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData.page.pageInfo.language}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getLocation",value:(t=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData.user.location.country.toLowerCase()}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),jt="https://1.www.s81c.com/common/carbon/plex",Ct={ar:{entry:"sans-arabic",family:"IBM Plex Sans Arabic"},ja:{entry:"sans-jp",family:"IBM Plex Sans JP"},ko:{entry:"sans-kr",family:"IBM Plex Sans KR"}},Lt={100:"thin",200:"extralight",300:"light",400:"regular",450:"text",500:"medium",600:"semibold",700:"bold"};function Nt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Ct[e]&&(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0===t.length){var r=document.createElement("link");r.href="".concat(jt,"/").concat(Ct[e].entry,".css"),r.type="text/css",r.rel="stylesheet",r.media="screen,print",document.getElementsByTagName("head")[0].appendChild(r)}else t.forEach((function(t){var r=document.createElement("link");r.href="".concat(jt,"/").concat(Ct[e].entry,"-").concat(Lt[t],".css"),r.type="text/css",r.rel="stylesheet",r.media="screen,print",document.getElementsByTagName("head")[0].appendChild(r)}))}(e,t),function(e){document.body.style.fontFamily="".concat(Ct[e].family,",IBM Plex Sans,Helvetica Neue,Arial,sans-serif")}(e))}function It(e){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},It(e)}function Dt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==It(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==It(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===It(i)?i:String(i)),n)}var o,i}var Mt="ipcInfo",Ft=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"get",value:function(){var e,t,r=kt.withConverter({read:function(e){return decodeURIComponent(e)}}).get(Mt);if(r)return r.split(";").map((function(r){var n=r.split("=");"cc"===n[0]&&(e=n[1]),"lc"===n[0]&&(t=n[1])})),{cc:e,lc:t}}},{key:"set",value:function(e){var t=e.cc,r=e.lc,n="cc=".concat(t,";lc=").concat(r);kt.withConverter({write:function(e){return encodeURIComponent(e)}}).set(Mt,n,{expires:365,domain:".ibm.com"})}}],(r=null)&&Dt(t.prototype,r),n&&Dt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Ut=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",Bt={lc:"en",cc:"us"},Ht="".concat(Ut,"/common/js/dynamicnav/www/countrylist/jsononly"),qt={headers:{"Content-Type":"application/json; charset=utf-8"}},Jt="dds-countrylist",zt={};function Kt(){var e;if(null!==(e=f.document)&&void 0!==e&&null!==(e=e.documentElement)&&void 0!==e&&e.lang){var t=f.document.documentElement.lang.toLowerCase(),r={};if(-1===t.indexOf("-"))r.lc=t;else{var n=t.split("-");r.cc=n[1],r.lc=n[0]}return r}return!1}var Wt=function(){var e=m(b.mark((function e(){var t;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((t=Ft.get())&&t.cc&&t.lc)){e.next=5;break}return e.next=4,$t.getList(t);case 4:return e.abrupt("return",t);case 5:return e.abrupt("return",!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Gt=function(){var e=m(b.mark((function e(){var t,r,n,o,i;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Rt.getLocation();case 3:if(t=e.sent,r=f.navigator.language,n=r.split("-")[0],!t||!n){e.next=13;break}return e.next=9,$t.getList({cc:t,lc:n});case 9:return o=e.sent,i=$t.verifyLocale(t,n,o),Ft.set(i),e.abrupt("return",i);case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(0);case 17:return e.abrupt("return",!1);case 18:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(){return e.apply(this,arguments)}}();function Vt(){var e,t=Object.assign({},f.digitalData||{});if(null!==(e=t.page)&&void 0!==e&&null!==(e=e.pageInfo)&&void 0!==e&&e.language){var r,n,o={};return null!==(r=t.page)&&void 0!==r&&null!==(r=r.pageInfo)&&void 0!==r&&r.language.includes("-")&&null!==(n=t.page)&&void 0!==n&&null!==(n=n.pageInfo)&&void 0!==n&&null!==(n=n.ibm)&&void 0!==n&&n.country?(o.lc=t.page.pageInfo.language.substring(0,2).toLowerCase(),o.cc=t.page.pageInfo.ibm.country.toLowerCase().trim(),o.cc.indexOf(",")>-1&&(o.cc=o.cc.substring(0,o.cc.indexOf(",")).trim()),"gb"===o.cc&&(o.cc="uk"),"zz"===o.cc&&(o.cc="us")):o.lc=t.page.pageInfo.language.substring(0,2).toLowerCase(),o}return!1}var $t=function(){function e(){o(this,e)}var t,r,n,i;return l(e,null,[{key:"clearCache",value:function(){if("undefined"!=typeof sessionStorage){Object.keys(zt).forEach((function(e){return delete zt[e]}));for(var e=0;e<sessionStorage.length;++e){var t=sessionStorage.key(e);0===t.indexOf(Jt)&&sessionStorage.removeItem(t)}}}},{key:"getLocale",value:(i=m(b.mark((function e(){var t,r,n,o;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,r=[Vt,Kt,Wt,Gt];case 2:if(!(t<r.length)){e.next=12;break}return n=r[t],e.next=6,n();case 6:if(!(o=e.sent)){e.next=9;break}return e.abrupt("return",o);case 9:t++,e.next=2;break;case 12:return e.abrupt("return",Bt);case 13:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"getLang",value:(n=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getLocale());case 1:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getLangDisplay",value:(r=m(b.mark((function e(t){var r,n,o,i;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}e.t0=t,e.next=7;break;case 4:return e.next=6,this.getLocale();case 6:e.t0=e.sent;case 7:return r=e.t0,e.next=10,this.getList(r);case 10:if(n=e.sent,o=[],n.regionList.forEach((function(e){o=o.concat(e.countryList)})),!(i=o.filter((function(e){if(-1!==e.locale.findIndex((function(e){return e[0]==="".concat(r.lc,"-").concat(r.cc)}))){var t,n=e.locale.filter((function(e){return e.includes("".concat(r.lc,"-").concat(r.cc))}));return(t=e.locale).splice.apply(t,[0,e.locale.length].concat(Xe(n))),e}}))).length){e.next=18;break}return e.abrupt("return","".concat(i[0].name," — ").concat(i[0].locale[0][1]));case 18:return e.abrupt("return","United States — English");case 19:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getList",value:(t=m(b.mark((function e(t){var r,n,o=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cc,n=t.lc,e.abrupt("return",new Promise((function(e,t){o.fetchList(r,n,e,t)})));case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"fetchList",value:function(e,t,r,n){var o=this,i="undefined"!==e?"".concat(t,"-").concat(e):"".concat(t),a="".concat(Jt,"-").concat(i),s=this.getSessionCache(a);if(s)r(s);else{if(!zt[i]){var c="".concat(Ht,"/").concat("undefined"!==e?"".concat(e).concat(t):"".concat(t),"-utf8.json");zt[i]=Ot.get(c,qt).then((function(e){var t=e.data;return t.timestamp=Date.now(),sessionStorage.setItem("".concat(Jt,"-").concat(i),JSON.stringify(t)),t}))}zt[i].then(r,(function(i){e===Bt.cc&&t===Bt.lc?n(i):o.fetchList(Bt.cc,Bt.lc,r,n)}))}}},{key:"verifyLocale",value:function(e,t,r){var n,o;return!(r&&r.regionList.forEach((function(r){return r.countryList.forEach((function(r){var i=r.locale[0][0].split("-"),a=i[0],s=i[1];s===e&&a===t?o={cc:e,lc:t}:s!==e||n||(n=a)}))})))&&n&&(o={cc:e,lc:n}),o}},{key:"getSessionCache",value:function(e){var t="undefined"==typeof sessionStorage?void 0:JSON.parse(sessionStorage.getItem(e));if(t&&t.timestamp){if(!(Date.now()-t.timestamp>72e5))return t;sessionStorage.removeItem(e)}}}]),e}(),Xt=!1;var Yt=process&&process.env.MARKETING_SEARCH_HOST||"https://www.ibm.com",Qt=process&&process.env.MARKETING_SEARCH_VERSION||"v3",Zt="".concat(Yt,"/marketplace/api/search/").concat(Qt,"/combined_suggestions"),er=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var r;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(Zt,"?locale=").concat("en","-").concat("us","&q=").concat(encodeURIComponent(t)),e.next=5,Ot.get(r,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then((function(e){return e.data}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),tr=function(){function e(){o(this,e)}return l(e,null,[{key:"setMastheadLogo",value:function(e){if(void 0===e)return!1;var t=(new Date).getTime(),r=e.end?Date.parse(e.end):null,n=!!(r&&t>r);return!(null===e.svg||n||e.denylist&&-1!==e.denylist.indexOf(location.pathname))&&!(!e.allowlist||0!=e.allowlist.length&&-1===e.allowlist.indexOf(location.pathname)||!e.svg)}}]),e}(),rr=process&&(process.env.REACT_APP_PROFILE_HOST||process.env.PROFILE_HOST)||"https://login.ibm.com",nr=process&&process.env.PROFILE_VERSION||"v1",or="".concat(rr,"/").concat(nr,"/mgmt/idaas/user/status/"),ir=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getUserStatus",value:(t=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ot.get(or,{headers:{"Content-Type":"application/json; charset=utf-8"},withCredentials:!0}).then((function(e){return e.data})).catch((function(e){return console.log("Failed Profile Network Call",e),{user:"Unauthenticated"}}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),e}(),ar=process&&process.env.SEARCH_TYPEAHEAD_API||"https://www-api.ibm.com",sr=process&&process.env.SEARCH_TYPEAHEAD_VERSION||"v1",cr="".concat(ar,"/search/typeahead/").concat(sr),ur=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var r,n,o,i,a=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:"",e.next=3,$t.getLang();case 3:return n=e.sent,o=["lang=".concat(n.lc).concat(n.cc?"&cc=".concat(n.cc):""),"query=".concat(encodeURIComponent(t)),"".concat(r?"appid=".concat(r):"")].filter((function(e){return e})).join("&"),i="".concat(cr,"?").concat(o),e.next=8,Ot.get(i,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then((function(e){return e.data.response}));case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),lr=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",fr="/common/carbon-for-ibm-dotcom/translations/masthead-footer",pr=process&&(process.env.REACT_APP_DDS_TRANSLATION_ENDPOINT||process.env.DDS_TRANSLATION_ENDPOINT)||fr,dr={},hr="en",vr="us",mr=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"clearCache",value:function(e){var t=this.getSessionKey(e);if("undefined"!=typeof sessionStorage){Object.keys(dr).forEach((function(e){return delete dr[e]}));for(var r=0;r<sessionStorage.length;++r){var n=sessionStorage.key(r);0===n.indexOf(t)&&sessionStorage.removeItem(n)}}}},{key:"getTranslation",value:(t=m(b.mark((function e(t,r){var n,o,i,a=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n="en",o="us",!(t&&t.lc&&t.cc)){e.next=7;break}n=t.lc,o=t.cc,e.next=12;break;case 7:return e.next=9,$t.getLocale();case 9:i=e.sent,n=i.lc,o=i.cc;case 12:return e.abrupt("return",new Promise((function(e,t){a.fetchTranslation(n,o,r,e,t)})));case 13:case"end":return e.stop()}}),e)}))),function(e,r){return t.apply(this,arguments)})},{key:"fetchTranslation",value:function(e,t,r,n,o){var i=this,a=this.getSessionKey(r),s="".concat(a,"-").concat(t,"-").concat(e),c=this.getSessionCache(s);if(c)n(c);else{var u="undefined"!==t?"".concat(t,"-").concat(e):"".concat(e);if(!dr[u]){var l=r||pr,f="undefined"!==t?"".concat(t).concat(e):"".concat(e),p=/((http(s?)):\/\/)/g.test(r)?"":lr,d="".concat(p).concat(l,"/").concat(f,".json");dr[u]=Ot.get(d,{headers:{"Content-Type":"text/plain",origin:lr}}).then((function(e){return i.transformData(e.data)})).then((function(e){return e.timestamp=Date.now(),"undefined"!=typeof sessionStorage&&sessionStorage.setItem("".concat(a,"-").concat(u),JSON.stringify(e)),e}))}dr[u].then(n,(function(a){t===vr&&e===hr?o(a):i.fetchTranslation(hr,vr,r,n,o)}))}}},{key:"getSessionKey",value:function(e){var t="dds-translation";(fr!==pr||e)&&(t=(e||pr).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,""));return t}},{key:"transformData",value:function(e){var t,r=null===(t=e.profileMenu)||void 0===t?void 0:t.signedout;if(r){var n="state=https%3A%2F%2Fwww.ibm.com",o=r.findIndex((function(e){var t;return-1!==(null===(t=e.url)||void 0===t?void 0:t.indexOf(n))}));if(-1!==o&&f.location){var i=encodeURIComponent(f.location.href);e.profileMenu.signedout[o].url=r[o].url.replace(n,"state=".concat(i))}}return e.footerMenu.push(e.socialFollow),e}},{key:"getSessionCache",value:function(e){var t="undefined"==typeof sessionStorage?void 0:JSON.parse(sessionStorage.getItem(e));if(t&&t.timestamp){if(!(Date.now()-t.timestamp>72e5))return t;sessionStorage.removeItem(e)}}}]),e}();function yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yr(Object(r),!0).forEach((function(t){ge(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var br=process&&(process.env.REACT_APP_KALTURA_PARTNER_ID||process.env.KALTURA_PARTNER_ID)||1773841,wr=process&&(process.env.REACT_APP_KALTURA_UICONF_ID||process.env.KALTURA_UICONF_ID)||27941801,xr="https://cdnapisec.kaltura.com/p/".concat(br,"/sp/").concat(br,"00/embedIframeJs/uiconf_id/").concat(wr,"/partner_id/").concat(br),Er="https://cdnsecakmi.kaltura.com/p/".concat(br,"/thumbnail/entry_id/"),Or=0,Sr=!1;function kr(e,t){f.kWidget?(Sr=!1,e()):Sr?++Or<50?setTimeout((function(){kr(e,t)}),100):t():(!function(){Sr=!0;var e=document.createElement("script");e.src=xr,e.async=!0,document.body.appendChild(e)}(),kr(e,t))}var Tr={},Ar=function(){function e(){o(this,e)}var t,r;return l(e,null,[{key:"checkScript",value:function(){return new Promise((function(e,t){kr(e,t)}))}},{key:"getThumbnailUrl",value:function(e){var t=e.mediaId,r=e.height,n=e.width,o=Er+t;return r&&(o+="/height/".concat(r)),n&&(o+="/width/".concat(n)),o}},{key:"embedMedia",value:(r=m(b.mark((function e(t,r){var n,o,i,a,s=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>2&&void 0!==s[2]?s[2]:{},o=!(s.length>3&&void 0!==s[3])||s[3],i=s.length>4&&void 0!==s[4]?s[4]:function(){},a=this.fireEvent,e.next=6,this.checkScript().then((function(){var e=new Promise((function(e){var s;if(!document.getElementById(r)&&document.querySelector("dds-tabs-extended-media")){var c=document.createElement("div");c.classList.add("bx--video-player__video"),c.setAttribute("id",r),document.body.append(c),s=!0}f.kWidget.embed({targetId:r,wid:"_"+br,uiconf_id:wr,entry_id:t,flashvars:gr(gr({},{autoPlay:!0,closedCaptions:{plugin:!0},titleLabel:{plugin:!0,align:"left",text:"{mediaProxy.entry.name}"},ibm:{template:"idl"}}),n),params:{wmode:"transparent"},readyCallback:function(r){var n=document.getElementById(r);o&&(n.addJsListener("playerPaused.ibm",(function(){a({playerState:1,kdp:n,mediaId:t})})),n.addJsListener("playerPlayed.ibm",(function(){a({playerState:2,kdp:n,mediaId:t})})),n.addJsListener("playerPlayEnd.ibm",(function(){a({playerState:3,kdp:n,mediaId:t})})),n.addJsListener("IbmCtaEvent.ibm",(function(e){var r=(null==e?void 0:e.customMetricsData)||{};a({playerState:101,kdp:n,mediaId:t,customMetricsData:r})}))),i(n),e(n)}}),s&&document.querySelector("dds-tabs-extended-media").shadowRoot.querySelector(".bx--accordion__item--active dds-video-player").lastChild.parentElement.appendChild(document.getElementById(r))}));return{kWidget:function(){return e}}}));case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"fireEvent",value:function(e){var t=e.playerState,r=e.kdp,n=e.mediaId,o=e.customMetricsData,i=void 0===o?{}:o,a=Math.round(r.evaluate("{video.player.currentTime}"));2===t&&0===a&&(t=0);var s={playerType:"kaltura",title:r.evaluate("{mediaProxy.entry.name}"),currentTime:a,duration:r.evaluate("{mediaProxy.entry.duration}"),playerState:t,mediaId:n,customMetricsData:i};h.videoPlayerStats(s)}},{key:"api",value:(t=m(b.mark((function e(t){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.checkScript().then((function(){return Tr&&Tr[t]?Tr[t]:new Promise((function(e){return new f.kWidget.api({wid:"_"+br}).doRequest({service:"media",action:"get",entryId:t},(function(t){Tr[t.id]=t,e(t)}))}))}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getMediaDuration",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(arguments.length>1?arguments[1]:void 0){var r=Math.floor(t/1e3%60),n=Math.floor(t/6e4%60),o=Math.floor(t/36e5%24);return o=o>0?o+":":"",r=r<10?"0"+r:r,t&&"("+o+n+":"+r+")"}var i=(null==f||null===(e=f.kWidget)||void 0===e?void 0:e.seconds2Measurements(t))||{},a=(null==i?void 0:i.hours)||0,s=(null==i?void 0:i.minutes)||0,c=(null==i?void 0:i.seconds)||0;return s=(a>0?"0"+s:s).toString().slice(-2),(a=a>0?a+":":"")+s+":"+(c=("0"+c).slice(-2))}},{key:"getMediaDurationFormatted",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=t;(arguments.length>1?arguments[1]:void 0)||(r=1e3*t);var n=Math.floor(r/1e3%60),o=Math.floor(r/6e4%60),i=Math.floor(r/36e5%24),a=e.formatTime(n,"second"),s=i||o?e.formatTime(o,"minute"):"",c=i?e.formatTime(i,"hour"):"";return"".concat(c," ").concat(s," ").concat(a).trim()}},{key:"formatTime",value:function(e,t){var r=f.document.documentElement.lang||f.navigator.language;return new Intl.NumberFormat(r,{style:"unit",unitDisplay:"long",unit:t}).format(e)}}]),e}();e.AnalyticsAPI=h,e.CloudAccountAuthAPI=Tt,e.DDOAPI=Rt,e.KalturaPlayerAPI=Ar,e.LocaleAPI=$t,e.MarketingSearchAPI=er,e.MastheadLogo=tr,e.ProfileAPI=ir,e.SearchTypeaheadAPI=ur,e.TranslationAPI=mr,e.globalInit=function(){Xt||(Xt=!0,Rt.setVersion().catch((function(e){console.error("Error setting the version of the library in the DDO:",e)})),$t.getLang().then((function(e){Nt(e.lc)})),h.initAll())},Object.defineProperty(e,"__esModule",{value:!0})}));
10
+ */!function(e,t){var r;r=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(n){function o(){}function i(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(r);/^[\{\[]/.test(a)&&(r=a)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+r+s}}function a(e,r){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");r||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(n.read||n)(c,u)||t(c),r)try{c=JSON.parse(c)}catch(e){}if(o[u]=c,e===u)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return a(e,!1)},o.getJSON=function(e){return a(e,!0)},o.remove=function(t,r){i(t,"",e(r,{expires:-1}))},o.defaults={},o.withConverter=r,o}((function(){}))},e.exports=r()}(St);var kt=St.exports,Tt=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"checkCookie",value:function(){return{user:"1"===kt.get("com.ibm.cloud.iam.LoggedIn.prod")?"authenticated":"anonymous"}}},{key:"checkAPI",value:(t=m(b.mark((function e(){var t;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ot.get("/api/v6/selected-account?profile=true",{headers:{Accept:"application/json"}}).then((function(e){return 200===e.status?"authenticated":"anonymous"})).catch((function(e){return console.error(e),"anonymous"}));case 2:return t=e.sent,e.abrupt("return",{user:t});case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),e}(),At="Carbon for IBM.com v1.60.0";var _t;function Pt(){return _t||(_t=new Promise((function(e,t){var r=0;!function n(){f.digitalData&&f.digitalData.page&&f.digitalData.page.isDataLayerReady?e():++r<50?setTimeout((function(){n()}),100):t(new Error("Timeout polling for digital data object."))}()}))),_t}var Rt=function(){function e(){o(this,e)}var t,r,n,i;return l(e,null,[{key:"isReady",value:function(){return Pt()}},{key:"getAll",value:(i=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData})).catch((function(){return null}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"setVersion",value:(n=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){f.digitalData.page.pageInfo.version=At}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getLanguage",value:(r=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData.page.pageInfo.language}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getLocation",value:(t=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isReady().then((function(){return f.digitalData.user.location.country.toLowerCase()}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),jt="https://1.www.s81c.com/common/carbon/plex",Ct={ar:{entry:"sans-arabic",family:"IBM Plex Sans Arabic"},ja:{entry:"sans-jp",family:"IBM Plex Sans JP"},ko:{entry:"sans-kr",family:"IBM Plex Sans KR"}},Lt={100:"thin",200:"extralight",300:"light",400:"regular",450:"text",500:"medium",600:"semibold",700:"bold"};function Nt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Ct[e]&&(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0===t.length){var r=document.createElement("link");r.href="".concat(jt,"/").concat(Ct[e].entry,".css"),r.type="text/css",r.rel="stylesheet",r.media="screen,print",document.getElementsByTagName("head")[0].appendChild(r)}else t.forEach((function(t){var r=document.createElement("link");r.href="".concat(jt,"/").concat(Ct[e].entry,"-").concat(Lt[t],".css"),r.type="text/css",r.rel="stylesheet",r.media="screen,print",document.getElementsByTagName("head")[0].appendChild(r)}))}(e,t),function(e){document.body.style.fontFamily="".concat(Ct[e].family,",IBM Plex Sans,Helvetica Neue,Arial,sans-serif")}(e))}function It(e){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},It(e)}function Dt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==It(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==It(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===It(i)?i:String(i)),n)}var o,i}var Mt="ipcInfo",Ft=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"get",value:function(){var e,t,r=kt.withConverter({read:function(e){return decodeURIComponent(e)}}).get(Mt);if(r)return r.split(";").map((function(r){var n=r.split("=");"cc"===n[0]&&(e=n[1]),"lc"===n[0]&&(t=n[1])})),{cc:e,lc:t}}},{key:"set",value:function(e){var t=e.cc,r=e.lc,n="cc=".concat(t,";lc=").concat(r);kt.withConverter({write:function(e){return encodeURIComponent(e)}}).set(Mt,n,{expires:365,domain:".ibm.com"})}}],(r=null)&&Dt(t.prototype,r),n&&Dt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Ut=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",Bt={lc:"en",cc:"us"},Ht="".concat(Ut,"/common/js/dynamicnav/www/countrylist/jsononly"),qt={headers:{"Content-Type":"application/json; charset=utf-8"}},Jt="dds-countrylist",zt={};function Kt(){var e;if(null!==(e=f.document)&&void 0!==e&&null!==(e=e.documentElement)&&void 0!==e&&e.lang){var t=f.document.documentElement.lang.toLowerCase(),r={};if(-1===t.indexOf("-"))r.lc=t;else{var n=t.split("-");r.cc=n[1],r.lc=n[0]}return r}return!1}var Wt=function(){var e=m(b.mark((function e(){var t;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((t=Ft.get())&&t.cc&&t.lc)){e.next=5;break}return e.next=4,$t.getList(t);case 4:return e.abrupt("return",t);case 5:return e.abrupt("return",!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Gt=function(){var e=m(b.mark((function e(){var t,r,n,o,i;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Rt.getLocation();case 3:if(t=e.sent,r=f.navigator.language,n=r.split("-")[0],!t||!n){e.next=13;break}return e.next=9,$t.getList({cc:t,lc:n});case 9:return o=e.sent,i=$t.verifyLocale(t,n,o),Ft.set(i),e.abrupt("return",i);case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(0);case 17:return e.abrupt("return",!1);case 18:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(){return e.apply(this,arguments)}}();function Vt(){var e,t=Object.assign({},f.digitalData||{});if(null!==(e=t.page)&&void 0!==e&&null!==(e=e.pageInfo)&&void 0!==e&&e.language){var r,n,o={};return null!==(r=t.page)&&void 0!==r&&null!==(r=r.pageInfo)&&void 0!==r&&r.language.includes("-")&&null!==(n=t.page)&&void 0!==n&&null!==(n=n.pageInfo)&&void 0!==n&&null!==(n=n.ibm)&&void 0!==n&&n.country?(o.lc=t.page.pageInfo.language.substring(0,2).toLowerCase(),o.cc=t.page.pageInfo.ibm.country.toLowerCase().trim(),o.cc.indexOf(",")>-1&&(o.cc=o.cc.substring(0,o.cc.indexOf(",")).trim()),"gb"===o.cc&&(o.cc="uk"),"zz"===o.cc&&(o.cc="us")):o.lc=t.page.pageInfo.language.substring(0,2).toLowerCase(),o}return!1}var $t=function(){function e(){o(this,e)}var t,r,n,i;return l(e,null,[{key:"clearCache",value:function(){if("undefined"!=typeof sessionStorage){Object.keys(zt).forEach((function(e){return delete zt[e]}));for(var e=0;e<sessionStorage.length;++e){var t=sessionStorage.key(e);0===t.indexOf(Jt)&&sessionStorage.removeItem(t)}}}},{key:"getLocale",value:(i=m(b.mark((function e(){var t,r,n,o;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,r=[Vt,Kt,Wt,Gt];case 2:if(!(t<r.length)){e.next=12;break}return n=r[t],e.next=6,n();case 6:if(!(o=e.sent)){e.next=9;break}return e.abrupt("return",o);case 9:t++,e.next=2;break;case 12:return e.abrupt("return",Bt);case 13:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"getLang",value:(n=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getLocale());case 1:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getLangDisplay",value:(r=m(b.mark((function e(t){var r,n,o,i;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}e.t0=t,e.next=7;break;case 4:return e.next=6,this.getLocale();case 6:e.t0=e.sent;case 7:return r=e.t0,e.next=10,this.getList(r);case 10:if(n=e.sent,o=[],n.regionList.forEach((function(e){o=o.concat(e.countryList)})),!(i=o.filter((function(e){if(-1!==e.locale.findIndex((function(e){return e[0]==="".concat(r.lc,"-").concat(r.cc)}))){var t,n=e.locale.filter((function(e){return e.includes("".concat(r.lc,"-").concat(r.cc))}));return(t=e.locale).splice.apply(t,[0,e.locale.length].concat(Xe(n))),e}}))).length){e.next=18;break}return e.abrupt("return","".concat(i[0].name," — ").concat(i[0].locale[0][1]));case 18:return e.abrupt("return","United States — English");case 19:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getList",value:(t=m(b.mark((function e(t){var r,n,o=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.cc,n=t.lc,e.abrupt("return",new Promise((function(e,t){o.fetchList(r,n,e,t)})));case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"fetchList",value:function(e,t,r,n){var o=this,i="undefined"!==e?"".concat(t,"-").concat(e):"".concat(t),a="".concat(Jt,"-").concat(i),s=this.getSessionCache(a);if(s)r(s);else{if(!zt[i]){var c="".concat(Ht,"/").concat("undefined"!==e?"".concat(e).concat(t):"".concat(t),"-utf8.json");zt[i]=Ot.get(c,qt).then((function(e){var t=e.data;return t.timestamp=Date.now(),sessionStorage.setItem("".concat(Jt,"-").concat(i),JSON.stringify(t)),t}))}zt[i].then(r,(function(i){e===Bt.cc&&t===Bt.lc?n(i):o.fetchList(Bt.cc,Bt.lc,r,n)}))}}},{key:"verifyLocale",value:function(e,t,r){var n,o;return!(r&&r.regionList.forEach((function(r){return r.countryList.forEach((function(r){var i=r.locale[0][0].split("-"),a=i[0],s=i[1];s===e&&a===t?o={cc:e,lc:t}:s!==e||n||(n=a)}))})))&&n&&(o={cc:e,lc:n}),o}},{key:"getSessionCache",value:function(e){var t="undefined"==typeof sessionStorage?void 0:JSON.parse(sessionStorage.getItem(e));if(t&&t.timestamp){if(!(Date.now()-t.timestamp>72e5))return t;sessionStorage.removeItem(e)}}}]),e}(),Xt=!1;var Yt=process&&process.env.MARKETING_SEARCH_HOST||"https://www.ibm.com",Qt=process&&process.env.MARKETING_SEARCH_VERSION||"v3",Zt="".concat(Yt,"/marketplace/api/search/").concat(Qt,"/combined_suggestions"),er=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var r;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(Zt,"?locale=").concat("en","-").concat("us","&q=").concat(encodeURIComponent(t)),e.next=5,Ot.get(r,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then((function(e){return e.data}));case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),tr=function(){function e(){o(this,e)}return l(e,null,[{key:"setMastheadLogo",value:function(e){if(void 0===e)return!1;var t=(new Date).getTime(),r=e.end?Date.parse(e.end):null,n=!!(r&&t>r);return!(null===e.svg||n||e.denylist&&-1!==e.denylist.indexOf(location.pathname))&&!(!e.allowlist||0!=e.allowlist.length&&-1===e.allowlist.indexOf(location.pathname)||!e.svg)}}]),e}(),rr=process&&(process.env.REACT_APP_PROFILE_HOST||process.env.PROFILE_HOST)||"https://login.ibm.com",nr=process&&process.env.PROFILE_VERSION||"v1",or="".concat(rr,"/").concat(nr,"/mgmt/idaas/user/status/"),ir=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getUserStatus",value:(t=m(b.mark((function e(){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ot.get(or,{headers:{"Content-Type":"application/json; charset=utf-8"},withCredentials:!0}).then((function(e){return e.data})).catch((function(e){return console.log("Failed Profile Network Call",e),{user:"Unauthenticated"}}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),e}(),ar=process&&process.env.SEARCH_TYPEAHEAD_API||"https://www-api.ibm.com",sr=process&&process.env.SEARCH_TYPEAHEAD_VERSION||"v1",cr="".concat(ar,"/search/typeahead/").concat(sr),ur=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var r,n,o,i,a=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:"",e.next=3,$t.getLang();case 3:return n=e.sent,o=["lang=".concat(n.lc).concat(n.cc?"&cc=".concat(n.cc):""),"query=".concat(encodeURIComponent(t)),"".concat(r?"appid=".concat(r):"")].filter((function(e){return e})).join("&"),i="".concat(cr,"?").concat(o),e.next=8,Ot.get(i,{headers:{"Content-Type":"application/json; charset=utf-8"}}).then((function(e){return e.data.response}));case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),lr=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",fr="/common/carbon-for-ibm-dotcom/translations/masthead-footer",pr=process&&(process.env.REACT_APP_DDS_TRANSLATION_ENDPOINT||process.env.DDS_TRANSLATION_ENDPOINT)||fr,dr={},hr="en",vr="us",mr=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"clearCache",value:function(e){var t=this.getSessionKey(e);if("undefined"!=typeof sessionStorage){Object.keys(dr).forEach((function(e){return delete dr[e]}));for(var r=0;r<sessionStorage.length;++r){var n=sessionStorage.key(r);0===n.indexOf(t)&&sessionStorage.removeItem(n)}}}},{key:"getTranslation",value:(t=m(b.mark((function e(t,r){var n,o,i,a=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n="en",o="us",!(t&&t.lc&&t.cc)){e.next=7;break}n=t.lc,o=t.cc,e.next=12;break;case 7:return e.next=9,$t.getLocale();case 9:i=e.sent,n=i.lc,o=i.cc;case 12:return e.abrupt("return",new Promise((function(e,t){a.fetchTranslation(n,o,r,e,t)})));case 13:case"end":return e.stop()}}),e)}))),function(e,r){return t.apply(this,arguments)})},{key:"fetchTranslation",value:function(e,t,r,n,o){var i=this,a=this.getSessionKey(r),s="".concat(a,"-").concat(t,"-").concat(e),c=this.getSessionCache(s);if(c)n(c);else{var u="undefined"!==t?"".concat(t,"-").concat(e):"".concat(e);if(!dr[u]){var l=r||pr,f="undefined"!==t?"".concat(t).concat(e):"".concat(e),p=/((http(s?)):\/\/)/g.test(r)?"":lr,d="".concat(p).concat(l,"/").concat(f,".json");dr[u]=Ot.get(d,{headers:{"Content-Type":"text/plain",origin:lr}}).then((function(e){return i.transformData(e.data)})).then((function(e){return e.timestamp=Date.now(),"undefined"!=typeof sessionStorage&&sessionStorage.setItem("".concat(a,"-").concat(u),JSON.stringify(e)),e}))}dr[u].then(n,(function(a){t===vr&&e===hr?o(a):i.fetchTranslation(hr,vr,r,n,o)}))}}},{key:"getSessionKey",value:function(e){var t="dds-translation";(fr!==pr||e)&&(t=(e||pr).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,""));return t}},{key:"transformData",value:function(e){var t,r=null===(t=e.profileMenu)||void 0===t?void 0:t.signedout;if(r){var n="state=https%3A%2F%2Fwww.ibm.com",o=r.findIndex((function(e){var t;return-1!==(null===(t=e.url)||void 0===t?void 0:t.indexOf(n))}));if(-1!==o&&f.location){var i=encodeURIComponent(f.location.href);e.profileMenu.signedout[o].url=r[o].url.replace(n,"state=".concat(i))}}return e.footerMenu.push(e.socialFollow),e}},{key:"getSessionCache",value:function(e){var t="undefined"==typeof sessionStorage?void 0:JSON.parse(sessionStorage.getItem(e));if(t&&t.timestamp){if(!(Date.now()-t.timestamp>72e5))return t;sessionStorage.removeItem(e)}}}]),e}();function yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yr(Object(r),!0).forEach((function(t){ge(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var br=process&&(process.env.REACT_APP_KALTURA_PARTNER_ID||process.env.KALTURA_PARTNER_ID)||1773841,wr=process&&(process.env.REACT_APP_KALTURA_UICONF_ID||process.env.KALTURA_UICONF_ID)||27941801,xr="https://cdnapisec.kaltura.com/p/".concat(br,"/sp/").concat(br,"00/embedIframeJs/uiconf_id/").concat(wr,"/partner_id/").concat(br),Er="https://cdnsecakmi.kaltura.com/p/".concat(br,"/thumbnail/entry_id/"),Or=0,Sr=!1;function kr(e,t){f.kWidget?(Sr=!1,e()):Sr?++Or<50?setTimeout((function(){kr(e,t)}),100):t():(!function(){Sr=!0;var e=document.createElement("script");e.src=xr,e.async=!0,document.body.appendChild(e)}(),kr(e,t))}var Tr={},Ar=function(){function e(){o(this,e)}var t,r;return l(e,null,[{key:"checkScript",value:function(){return new Promise((function(e,t){kr(e,t)}))}},{key:"getThumbnailUrl",value:function(e){var t=e.mediaId,r=e.height,n=e.width,o=Er+t;return r&&(o+="/height/".concat(r)),n&&(o+="/width/".concat(n)),o}},{key:"embedMedia",value:(r=m(b.mark((function e(t,r){var n,o,i,a,s=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>2&&void 0!==s[2]?s[2]:{},o=!(s.length>3&&void 0!==s[3])||s[3],i=s.length>4&&void 0!==s[4]?s[4]:function(){},a=this.fireEvent,e.next=6,this.checkScript().then((function(){var e=new Promise((function(e){var s;if(!document.getElementById(r)&&document.querySelector("dds-tabs-extended-media")){var c=document.createElement("div");c.classList.add("bx--video-player__video"),c.setAttribute("id",r),document.body.append(c),s=!0}f.kWidget.embed({targetId:r,wid:"_"+br,uiconf_id:wr,entry_id:t,flashvars:gr(gr({},{autoPlay:!0,closedCaptions:{plugin:!0},titleLabel:{plugin:!0,align:"left",text:"{mediaProxy.entry.name}"},ibm:{template:"idl"}}),n),params:{wmode:"transparent"},readyCallback:function(r){var n=document.getElementById(r);o&&(n.addJsListener("playerPaused.ibm",(function(){a({playerState:1,kdp:n,mediaId:t})})),n.addJsListener("playerPlayed.ibm",(function(){a({playerState:2,kdp:n,mediaId:t})})),n.addJsListener("playerPlayEnd.ibm",(function(){a({playerState:3,kdp:n,mediaId:t})})),n.addJsListener("IbmCtaEvent.ibm",(function(e){var r=(null==e?void 0:e.customMetricsData)||{};a({playerState:101,kdp:n,mediaId:t,customMetricsData:r})}))),i(n),e(n)}}),s&&document.querySelector("dds-tabs-extended-media").shadowRoot.querySelector(".bx--accordion__item--active dds-video-player").lastChild.parentElement.appendChild(document.getElementById(r))}));return{kWidget:function(){return e}}}));case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"fireEvent",value:function(e){var t=e.playerState,r=e.kdp,n=e.mediaId,o=e.customMetricsData,i=void 0===o?{}:o,a=Math.round(r.evaluate("{video.player.currentTime}"));2===t&&0===a&&(t=0);var s={playerType:"kaltura",title:r.evaluate("{mediaProxy.entry.name}"),currentTime:a,duration:r.evaluate("{mediaProxy.entry.duration}"),playerState:t,mediaId:n,customMetricsData:i};h.videoPlayerStats(s)}},{key:"api",value:(t=m(b.mark((function e(t){return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.checkScript().then((function(){return Tr&&Tr[t]?Tr[t]:new Promise((function(e){return new f.kWidget.api({wid:"_"+br}).doRequest({service:"media",action:"get",entryId:t},(function(t){Tr[t.id]=t,e(t)}))}))}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getMediaDuration",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(arguments.length>1?arguments[1]:void 0){var r=Math.floor(t/1e3%60),n=Math.floor(t/6e4%60),o=Math.floor(t/36e5%24);return o=o>0?o+":":"",r=r<10?"0"+r:r,t&&"("+o+n+":"+r+")"}var i=(null==f||null===(e=f.kWidget)||void 0===e?void 0:e.seconds2Measurements(t))||{},a=(null==i?void 0:i.hours)||0,s=(null==i?void 0:i.minutes)||0,c=(null==i?void 0:i.seconds)||0;return s=(a>0?"0"+s:s).toString().slice(-2),(a=a>0?a+":":"")+s+":"+(c=("0"+c).slice(-2))}},{key:"getMediaDurationFormatted",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=t;(arguments.length>1?arguments[1]:void 0)||(r=1e3*t);var n=Math.floor(r/1e3%60),o=Math.floor(r/6e4%60),i=Math.floor(r/36e5%24),a=e.formatTime(n,"second"),s=i||o?e.formatTime(o,"minute"):"",c=i?e.formatTime(i,"hour"):"";return"".concat(c," ").concat(s," ").concat(a).trim()}},{key:"formatTime",value:function(e,t){var r=f.document.documentElement.lang||f.navigator.language;return new Intl.NumberFormat(r,{style:"unit",unitDisplay:"long",unit:t}).format(e)}}]),e}();e.AnalyticsAPI=h,e.CloudAccountAuthAPI=Tt,e.DDOAPI=Rt,e.KalturaPlayerAPI=Ar,e.LocaleAPI=$t,e.MarketingSearchAPI=er,e.MastheadLogo=tr,e.ProfileAPI=ir,e.SearchTypeaheadAPI=ur,e.TranslationAPI=mr,e.globalInit=function(){Xt||(Xt=!0,Rt.setVersion().catch((function(e){console.error("Error setting the version of the library in the DDO:",e)})),$t.getLang().then((function(e){Nt(e.lc)})),h.initAll())},Object.defineProperty(e,"__esModule",{value:!0})}));