@carbon/ibmdotcom-services 1.56.0 → 1.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/StickyHeader/StickyHeader.js +1 -1
- package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js +2 -2
- package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/StickyHeader/StickyHeader.js +1 -1
- package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js +2 -2
- package/package.json +2 -2
- package/umd/ibmdotcom-services.js +2 -2
- package/umd/ibmdotcom-services.min.js +1 -1
package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/StickyHeader/StickyHeader.js
CHANGED
|
@@ -121,7 +121,7 @@ var StickyHeader = /*#__PURE__*/function () {
|
|
|
121
121
|
this._tableOfContentsInnerBar = tocRoot.querySelector(desktopSelector);
|
|
122
122
|
}
|
|
123
123
|
} else {
|
|
124
|
-
this._tableOfContentsInnerBar = tocRoot.querySelector(".".concat(prefix, "--tableofcontents__sidebar"));
|
|
124
|
+
this._tableOfContentsInnerBar = tocRoot.querySelector(toc.layout === 'horizontal' ? ".".concat(prefix, "--tableofcontents__navbar") : ".".concat(prefix, "--tableofcontents__sidebar"));
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
}, {
|
|
@@ -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.
|
|
14
|
+
* Carbon for IBM.com v1.57.0',
|
|
15
15
|
*/
|
|
16
16
|
var settings = {
|
|
17
|
-
version: 'Carbon for IBM.com v1.
|
|
17
|
+
version: 'Carbon for IBM.com v1.57.0',
|
|
18
18
|
stablePrefix: 'dds'
|
|
19
19
|
};
|
|
20
20
|
export default settings;
|
package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/StickyHeader/StickyHeader.js
CHANGED
|
@@ -128,7 +128,7 @@ var StickyHeader = /*#__PURE__*/function () {
|
|
|
128
128
|
this._tableOfContentsInnerBar = tocRoot.querySelector(desktopSelector);
|
|
129
129
|
}
|
|
130
130
|
} else {
|
|
131
|
-
this._tableOfContentsInnerBar = tocRoot.querySelector(".".concat(prefix, "--tableofcontents__sidebar"));
|
|
131
|
+
this._tableOfContentsInnerBar = tocRoot.querySelector(toc.layout === 'horizontal' ? ".".concat(prefix, "--tableofcontents__navbar") : ".".concat(prefix, "--tableofcontents__sidebar"));
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
}, {
|
|
@@ -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.
|
|
20
|
+
* Carbon for IBM.com v1.57.0',
|
|
21
21
|
*/
|
|
22
22
|
var settings = {
|
|
23
|
-
version: 'Carbon for IBM.com v1.
|
|
23
|
+
version: 'Carbon for IBM.com v1.57.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.
|
|
4
|
+
"version": "1.57.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"rollup-plugin-terser": "^7.0.2",
|
|
91
91
|
"whatwg-fetch": "^2.0.3"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "f8e908033ead26349bbcc0876f8d380030080832"
|
|
94
94
|
}
|
|
@@ -4098,10 +4098,10 @@
|
|
|
4098
4098
|
* @exports ibmdotcom.settings
|
|
4099
4099
|
* @type {object} Settings object
|
|
4100
4100
|
* @property {string} [prefix=dds]
|
|
4101
|
-
* Carbon for IBM.com v1.
|
|
4101
|
+
* Carbon for IBM.com v1.57.0',
|
|
4102
4102
|
*/
|
|
4103
4103
|
var settings = {
|
|
4104
|
-
version: 'Carbon for IBM.com v1.
|
|
4104
|
+
version: 'Carbon for IBM.com v1.57.0',
|
|
4105
4105
|
stablePrefix: 'dds'
|
|
4106
4106
|
};
|
|
4107
4107
|
|
|
@@ -7,4 +7,4 @@ e.exports=n=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 n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,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(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).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+"="+n+s}}function a(e,n){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("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(r.read||r)(c,u)||t(c),n)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,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))},e.exports=n()}(St);var Ot=St.exports,Tt=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"checkCookie",value:function(){return{user:"1"===Ot.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,Et.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}(),kt="Carbon for IBM.com v1.56.0";var At;function Rt(){return At||(At=new Promise((function(e,t){var n=0;!function r(){f.digitalData&&f.digitalData.page&&f.digitalData.page.isDataLayerReady?e():++n<50?setTimeout((function(){r()}),100):t(new Error("Timeout polling for digital data object."))}()}))),At}var _t=function(){function e(){o(this,e)}var t,n,r,i;return l(e,null,[{key:"isReady",value:function(){return Rt()}},{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:(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(){f.digitalData.page.pageInfo.version=kt}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getLanguage",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(){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 n.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}(),Pt="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"}},jt={100:"thin",200:"extralight",300:"light",400:"regular",450:"text",500:"medium",600:"semibold",700:"bold"};function Lt(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 n=document.createElement("link");n.href="".concat(Pt,"/").concat(Ct[e].entry,".css"),n.type="text/css",n.rel="stylesheet",n.media="screen,print",document.getElementsByTagName("head")[0].appendChild(n)}else t.forEach((function(t){var n=document.createElement("link");n.href="".concat(Pt,"/").concat(Ct[e].entry,"-").concat(jt[t],".css"),n.type="text/css",n.rel="stylesheet",n.media="screen,print",document.getElementsByTagName("head")[0].appendChild(n)}))}(e,t),function(e){document.body.style.fontFamily="".concat(Ct[e].family,",IBM Plex Sans,Helvetica Neue,Arial,sans-serif")}(e))}function Nt(e){return Nt="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},Nt(e)}function It(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==Nt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Nt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===Nt(i)?i:String(i)),r)}var o,i}var Dt="ipcInfo",Mt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"get",value:function(){var e,t,n=Ot.withConverter({read:function(e){return decodeURIComponent(e)}}).get(Dt);if(n)return n.split(";").map((function(n){var r=n.split("=");"cc"===r[0]&&(e=r[1]),"lc"===r[0]&&(t=r[1])})),{cc:e,lc:t}}},{key:"set",value:function(e){var t=e.cc,n=e.lc,r="cc=".concat(t,";lc=").concat(n);Ot.withConverter({write:function(e){return encodeURIComponent(e)}}).set(Dt,r,{expires:365,domain:".ibm.com"})}}],(n=null)&&It(t.prototype,n),r&&It(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Ft=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",Ut={lc:"en",cc:"us"},Bt="".concat(Ft,"/common/js/dynamicnav/www/countrylist/jsononly"),Ht={headers:{"Content-Type":"application/json; charset=utf-8"}},qt="dds-countrylist",Jt={};function zt(){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(),n={};if(-1===t.indexOf("-"))n.lc=t;else{var r=t.split("-");n.cc=r[1],n.lc=r[0]}return n}return!1}var Kt=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=Mt.get())&&t.cc&&t.lc)){e.next=5;break}return e.next=4,Vt.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,n,r,o,i;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_t.getLocation();case 3:if(t=e.sent,n=f.navigator.language,r=n.split("-")[0],!t||!r){e.next=13;break}return e.next=9,Vt.getList({cc:t,lc:r});case 9:return o=e.sent,i=Vt.verifyLocale(t,r,o),Mt.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 Wt(){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 n,r,o={};return null!==(n=t.page)&&void 0!==n&&null!==(n=n.pageInfo)&&void 0!==n&&n.language.includes("-")&&null!==(r=t.page)&&void 0!==r&&null!==(r=r.pageInfo)&&void 0!==r&&null!==(r=r.ibm)&&void 0!==r&&r.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 Vt=function(){function e(){o(this,e)}var t,n,r,i;return l(e,null,[{key:"clearCache",value:function(){if("undefined"!=typeof sessionStorage){Object.keys(Jt).forEach((function(e){return delete Jt[e]}));for(var e=0;e<sessionStorage.length;++e){var t=sessionStorage.key(e);0===t.indexOf(qt)&&sessionStorage.removeItem(t)}}}},{key:"getLocale",value:(i=m(b.mark((function e(){var t,n,r,o;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,n=[Wt,zt,Kt,Gt];case 2:if(!(t<n.length)){e.next=12;break}return r=n[t],e.next=6,r();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",Ut);case 13:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"getLang",value:(r=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 r.apply(this,arguments)})},{key:"getLangDisplay",value:(n=m(b.mark((function e(t){var n,r,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 n=e.t0,e.next=10,this.getList(n);case 10:if(r=e.sent,o=[],r.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(n.lc,"-").concat(n.cc)}))){var t,r=e.locale.filter((function(e){return e.includes("".concat(n.lc,"-").concat(n.cc))}));return(t=e.locale).splice.apply(t,[0,e.locale.length].concat(Xe(r))),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 n.apply(this,arguments)})},{key:"getList",value:(t=m(b.mark((function e(t){var n,r,o=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.cc,r=t.lc,e.abrupt("return",new Promise((function(e,t){o.fetchList(n,r,e,t)})));case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"fetchList",value:function(e,t,n,r){var o=this,i="undefined"!==e?"".concat(t,"-").concat(e):"".concat(t),a="".concat(qt,"-").concat(i),s=this.getSessionCache(a);if(s)n(s);else{if(!Jt[i]){var c="".concat(Bt,"/").concat("undefined"!==e?"".concat(e).concat(t):"".concat(t),"-utf8.json");Jt[i]=Et.get(c,Ht).then((function(e){var t=e.data;return t.timestamp=Date.now(),sessionStorage.setItem("".concat(qt,"-").concat(i),JSON.stringify(t)),t}))}Jt[i].then(n,(function(i){e===Ut.cc&&t===Ut.lc?r(i):o.fetchList(Ut.cc,Ut.lc,n,r)}))}}},{key:"verifyLocale",value:function(e,t,n){var r,o;return!(n&&n.regionList.forEach((function(n){return n.countryList.forEach((function(n){var i=n.locale[0][0].split("-"),a=i[0],s=i[1];s===e&&a===t?o={cc:e,lc:t}:s!==e||r||(r=a)}))})))&&r&&(o={cc:e,lc:r}),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}(),$t=!1;var Xt=process&&process.env.MARKETING_SEARCH_HOST||"https://www.ibm.com",Yt=process&&process.env.MARKETING_SEARCH_VERSION||"v3",Qt="".concat(Xt,"/marketplace/api/search/").concat(Yt,"/combined_suggestions"),Zt=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var n;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Qt,"?locale=").concat("en","-").concat("us","&q=").concat(encodeURIComponent(t)),e.next=5,Et.get(n,{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}(),en=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(),n=e.end?Date.parse(e.end):null,r=!!(n&&t>n);return!(null===e.svg||r||e.denylist&&-1!==e.denylist.indexOf(location.pathname))&&!(!e.allowlist||0!=e.allowlist.length&&-1===e.allowlist.indexOf(location.pathname)||!e.svg)}}]),e}(),tn=process&&(process.env.REACT_APP_PROFILE_HOST||process.env.PROFILE_HOST)||"https://login.ibm.com",nn=process&&process.env.PROFILE_VERSION||"v1",rn="".concat(tn,"/").concat(nn,"/mgmt/idaas/user/status/"),on=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,Et.get(rn,{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}(),an=process&&process.env.SEARCH_TYPEAHEAD_API||"https://www-api.ibm.com",sn=process&&process.env.SEARCH_TYPEAHEAD_VERSION||"v1",cn="".concat(an,"/search/typeahead/").concat(sn),un=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var n,r,o,i,a=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:"",e.next=3,Vt.getLang();case 3:return r=e.sent,o=["lang=".concat(r.lc).concat(r.cc?"&cc=".concat(r.cc):""),"query=".concat(encodeURIComponent(t)),"".concat(n?"appid=".concat(n):"")].filter((function(e){return e})).join("&"),i="".concat(cn,"?").concat(o),e.next=8,Et.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}(),ln=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",fn="/common/carbon-for-ibm-dotcom/translations/masthead-footer",pn=process&&(process.env.REACT_APP_DDS_TRANSLATION_ENDPOINT||process.env.DDS_TRANSLATION_ENDPOINT)||fn,dn={},hn="en",vn="us",mn=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(dn).forEach((function(e){return delete dn[e]}));for(var n=0;n<sessionStorage.length;++n){var r=sessionStorage.key(n);0===r.indexOf(t)&&sessionStorage.removeItem(r)}}}},{key:"getTranslation",value:(t=m(b.mark((function e(t,n){var r,o,i,a=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="en",o="us",!(t&&t.lc&&t.cc)){e.next=7;break}r=t.lc,o=t.cc,e.next=12;break;case 7:return e.next=9,Vt.getLocale();case 9:i=e.sent,r=i.lc,o=i.cc;case 12:return e.abrupt("return",new Promise((function(e,t){a.fetchTranslation(r,o,n,e,t)})));case 13:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})},{key:"fetchTranslation",value:function(e,t,n,r,o){var i=this,a=this.getSessionKey(n),s="".concat(a,"-").concat(t,"-").concat(e),c=this.getSessionCache(s);if(c)r(c);else{var u="undefined"!==t?"".concat(t,"-").concat(e):"".concat(e);if(!dn[u]){var l=n||pn,f="undefined"!==t?"".concat(t).concat(e):"".concat(e),p=/((http(s?)):\/\/)/g.test(n)?"":ln,d="".concat(p).concat(l,"/").concat(f,".json");dn[u]=Et.get(d,{headers:{"Content-Type":"text/plain",origin:ln}}).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}))}dn[u].then(r,(function(a){t===vn&&e===hn?o(a):i.fetchTranslation(hn,vn,n,r,o)}))}}},{key:"getSessionKey",value:function(e){var t="dds-translation";(fn!==pn||e)&&(t=(e||pn).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,""));return t}},{key:"transformData",value:function(e){var t,n=null===(t=e.profileMenu)||void 0===t?void 0:t.signedout;if(n){var r="state=https%3A%2F%2Fwww.ibm.com",o=n.findIndex((function(e){var t;return-1!==(null===(t=e.url)||void 0===t?void 0:t.indexOf(r))}));if(-1!==o&&f.location){var i=encodeURIComponent(f.location.href);e.profileMenu.signedout[o].url=n[o].url.replace(r,"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 yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bn=process&&(process.env.REACT_APP_KALTURA_PARTNER_ID||process.env.KALTURA_PARTNER_ID)||1773841,wn=process&&(process.env.REACT_APP_KALTURA_UICONF_ID||process.env.KALTURA_UICONF_ID)||27941801,xn="https://cdnapisec.kaltura.com/p/".concat(bn,"/sp/").concat(bn,"00/embedIframeJs/uiconf_id/").concat(wn,"/partner_id/").concat(bn),En="https://cdnsecakmi.kaltura.com/p/".concat(bn,"/thumbnail/entry_id/"),Sn=0,On=!1;function Tn(e,t){f.kWidget?(On=!1,e()):On?++Sn<50?setTimeout((function(){Tn(e,t)}),100):t():(!function(){On=!0;var e=document.createElement("script");e.src=xn,e.async=!0,document.body.appendChild(e)}(),Tn(e,t))}var kn={},An=function(){function e(){o(this,e)}var t,n;return l(e,null,[{key:"checkScript",value:function(){return new Promise((function(e,t){Tn(e,t)}))}},{key:"getThumbnailUrl",value:function(e){var t=e.mediaId,n=e.height,r=e.width,o=En+t;return n&&(o+="/height/".concat(n)),r&&(o+="/width/".concat(r)),o}},{key:"embedMedia",value:(n=m(b.mark((function e(t,n){var r,o,i,a,s=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=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(n)&&document.querySelector("dds-tabs-extended-media")){var c=document.createElement("div");c.classList.add("bx--video-player__video"),c.setAttribute("id",n),document.body.append(c),s=!0}f.kWidget.embed({targetId:n,wid:"_"+bn,uiconf_id:wn,entry_id:t,flashvars:gn(gn({},{autoPlay:!0,closedCaptions:{plugin:!0},titleLabel:{plugin:!0,align:"left",text:"{mediaProxy.entry.name}"},ibm:{template:"idl"}}),r),params:{wmode:"transparent"},readyCallback:function(n){var r=document.getElementById(n);o&&(r.addJsListener("playerPaused.ibm",(function(){a({playerState:1,kdp:r,mediaId:t})})),r.addJsListener("playerPlayed.ibm",(function(){a({playerState:2,kdp:r,mediaId:t})})),r.addJsListener("playerPlayEnd.ibm",(function(){a({playerState:3,kdp:r,mediaId:t})})),r.addJsListener("IbmCtaEvent.ibm",(function(e){var n=(null==e?void 0:e.customMetricsData)||{};a({playerState:101,kdp:r,mediaId:t,customMetricsData:n})}))),i(r),e(r)}}),s&&document.querySelector("dds-tabs-extended-media").shadowRoot.querySelector(".bx--accordion__item--active dds-video-player").lastChild.parentElement.appendChild(document.getElementById(n))}));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 n.apply(this,arguments)})},{key:"fireEvent",value:function(e){var t=e.playerState,n=e.kdp,r=e.mediaId,o=e.customMetricsData,i=void 0===o?{}:o,a=Math.round(n.evaluate("{video.player.currentTime}"));2===t&&0===a&&(t=0);var s={playerType:"kaltura",title:n.evaluate("{mediaProxy.entry.name}"),currentTime:a,duration:n.evaluate("{mediaProxy.entry.duration}"),playerState:t,mediaId:r,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 kn&&kn[t]?kn[t]:new Promise((function(e){return new f.kWidget.api({wid:"_"+bn}).doRequest({service:"media",action:"get",entryId:t},(function(t){kn[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 n=Math.floor(t/1e3%60),r=Math.floor(t/6e4%60),o=Math.floor(t/36e5%24);return o=o>0?o+":":"",n=n<10?"0"+n:n,t&&"("+o+r+":"+n+")"}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,n=t;(arguments.length>1?arguments[1]:void 0)||(n=1e3*t);var r=Math.floor(n/1e3%60),o=Math.floor(n/6e4%60),i=Math.floor(n/36e5%24),a=e.formatTime(r,"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 n=f.document.documentElement.lang||f.navigator.language;return new Intl.NumberFormat(n,{style:"unit",unitDisplay:"long",unit:t}).format(e)}}]),e}();e.AnalyticsAPI=h,e.CloudAccountAuthAPI=Tt,e.DDOAPI=_t,e.KalturaPlayerAPI=An,e.LocaleAPI=Vt,e.MarketingSearchAPI=Zt,e.MastheadLogo=en,e.ProfileAPI=on,e.SearchTypeaheadAPI=un,e.TranslationAPI=mn,e.globalInit=function(){$t||($t=!0,_t.setVersion().catch((function(e){console.error("Error setting the version of the library in the DDO:",e)})),Vt.getLang().then((function(e){Lt(e.lc)})),h.initAll())},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
10
|
+
*/!function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,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(n);/^[\{\[]/.test(a)&&(n=a)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).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+"="+n+s}}function a(e,n){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("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(r.read||r)(c,u)||t(c),n)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,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))},e.exports=n()}(St);var Ot=St.exports,Tt=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"checkCookie",value:function(){return{user:"1"===Ot.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,Et.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}(),kt="Carbon for IBM.com v1.57.0";var At;function Rt(){return At||(At=new Promise((function(e,t){var n=0;!function r(){f.digitalData&&f.digitalData.page&&f.digitalData.page.isDataLayerReady?e():++n<50?setTimeout((function(){r()}),100):t(new Error("Timeout polling for digital data object."))}()}))),At}var _t=function(){function e(){o(this,e)}var t,n,r,i;return l(e,null,[{key:"isReady",value:function(){return Rt()}},{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:(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(){f.digitalData.page.pageInfo.version=kt}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getLanguage",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(){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 n.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}(),Pt="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"}},jt={100:"thin",200:"extralight",300:"light",400:"regular",450:"text",500:"medium",600:"semibold",700:"bold"};function Lt(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 n=document.createElement("link");n.href="".concat(Pt,"/").concat(Ct[e].entry,".css"),n.type="text/css",n.rel="stylesheet",n.media="screen,print",document.getElementsByTagName("head")[0].appendChild(n)}else t.forEach((function(t){var n=document.createElement("link");n.href="".concat(Pt,"/").concat(Ct[e].entry,"-").concat(jt[t],".css"),n.type="text/css",n.rel="stylesheet",n.media="screen,print",document.getElementsByTagName("head")[0].appendChild(n)}))}(e,t),function(e){document.body.style.fontFamily="".concat(Ct[e].family,",IBM Plex Sans,Helvetica Neue,Arial,sans-serif")}(e))}function Nt(e){return Nt="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},Nt(e)}function It(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(o=r.key,i=void 0,i=function(e,t){if("object"!==Nt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Nt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===Nt(i)?i:String(i)),r)}var o,i}var Dt="ipcInfo",Mt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"get",value:function(){var e,t,n=Ot.withConverter({read:function(e){return decodeURIComponent(e)}}).get(Dt);if(n)return n.split(";").map((function(n){var r=n.split("=");"cc"===r[0]&&(e=r[1]),"lc"===r[0]&&(t=r[1])})),{cc:e,lc:t}}},{key:"set",value:function(e){var t=e.cc,n=e.lc,r="cc=".concat(t,";lc=").concat(n);Ot.withConverter({write:function(e){return encodeURIComponent(e)}}).set(Dt,r,{expires:365,domain:".ibm.com"})}}],(n=null)&&It(t.prototype,n),r&&It(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Ft=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",Ut={lc:"en",cc:"us"},Bt="".concat(Ft,"/common/js/dynamicnav/www/countrylist/jsononly"),Ht={headers:{"Content-Type":"application/json; charset=utf-8"}},qt="dds-countrylist",Jt={};function zt(){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(),n={};if(-1===t.indexOf("-"))n.lc=t;else{var r=t.split("-");n.cc=r[1],n.lc=r[0]}return n}return!1}var Kt=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=Mt.get())&&t.cc&&t.lc)){e.next=5;break}return e.next=4,Vt.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,n,r,o,i;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_t.getLocation();case 3:if(t=e.sent,n=f.navigator.language,r=n.split("-")[0],!t||!r){e.next=13;break}return e.next=9,Vt.getList({cc:t,lc:r});case 9:return o=e.sent,i=Vt.verifyLocale(t,r,o),Mt.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 Wt(){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 n,r,o={};return null!==(n=t.page)&&void 0!==n&&null!==(n=n.pageInfo)&&void 0!==n&&n.language.includes("-")&&null!==(r=t.page)&&void 0!==r&&null!==(r=r.pageInfo)&&void 0!==r&&null!==(r=r.ibm)&&void 0!==r&&r.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 Vt=function(){function e(){o(this,e)}var t,n,r,i;return l(e,null,[{key:"clearCache",value:function(){if("undefined"!=typeof sessionStorage){Object.keys(Jt).forEach((function(e){return delete Jt[e]}));for(var e=0;e<sessionStorage.length;++e){var t=sessionStorage.key(e);0===t.indexOf(qt)&&sessionStorage.removeItem(t)}}}},{key:"getLocale",value:(i=m(b.mark((function e(){var t,n,r,o;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,n=[Wt,zt,Kt,Gt];case 2:if(!(t<n.length)){e.next=12;break}return r=n[t],e.next=6,r();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",Ut);case 13:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"getLang",value:(r=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 r.apply(this,arguments)})},{key:"getLangDisplay",value:(n=m(b.mark((function e(t){var n,r,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 n=e.t0,e.next=10,this.getList(n);case 10:if(r=e.sent,o=[],r.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(n.lc,"-").concat(n.cc)}))){var t,r=e.locale.filter((function(e){return e.includes("".concat(n.lc,"-").concat(n.cc))}));return(t=e.locale).splice.apply(t,[0,e.locale.length].concat(Xe(r))),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 n.apply(this,arguments)})},{key:"getList",value:(t=m(b.mark((function e(t){var n,r,o=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.cc,r=t.lc,e.abrupt("return",new Promise((function(e,t){o.fetchList(n,r,e,t)})));case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"fetchList",value:function(e,t,n,r){var o=this,i="undefined"!==e?"".concat(t,"-").concat(e):"".concat(t),a="".concat(qt,"-").concat(i),s=this.getSessionCache(a);if(s)n(s);else{if(!Jt[i]){var c="".concat(Bt,"/").concat("undefined"!==e?"".concat(e).concat(t):"".concat(t),"-utf8.json");Jt[i]=Et.get(c,Ht).then((function(e){var t=e.data;return t.timestamp=Date.now(),sessionStorage.setItem("".concat(qt,"-").concat(i),JSON.stringify(t)),t}))}Jt[i].then(n,(function(i){e===Ut.cc&&t===Ut.lc?r(i):o.fetchList(Ut.cc,Ut.lc,n,r)}))}}},{key:"verifyLocale",value:function(e,t,n){var r,o;return!(n&&n.regionList.forEach((function(n){return n.countryList.forEach((function(n){var i=n.locale[0][0].split("-"),a=i[0],s=i[1];s===e&&a===t?o={cc:e,lc:t}:s!==e||r||(r=a)}))})))&&r&&(o={cc:e,lc:r}),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}(),$t=!1;var Xt=process&&process.env.MARKETING_SEARCH_HOST||"https://www.ibm.com",Yt=process&&process.env.MARKETING_SEARCH_VERSION||"v3",Qt="".concat(Xt,"/marketplace/api/search/").concat(Yt,"/combined_suggestions"),Zt=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var n;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(Qt,"?locale=").concat("en","-").concat("us","&q=").concat(encodeURIComponent(t)),e.next=5,Et.get(n,{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}(),en=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(),n=e.end?Date.parse(e.end):null,r=!!(n&&t>n);return!(null===e.svg||r||e.denylist&&-1!==e.denylist.indexOf(location.pathname))&&!(!e.allowlist||0!=e.allowlist.length&&-1===e.allowlist.indexOf(location.pathname)||!e.svg)}}]),e}(),tn=process&&(process.env.REACT_APP_PROFILE_HOST||process.env.PROFILE_HOST)||"https://login.ibm.com",nn=process&&process.env.PROFILE_VERSION||"v1",rn="".concat(tn,"/").concat(nn,"/mgmt/idaas/user/status/"),on=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,Et.get(rn,{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}(),an=process&&process.env.SEARCH_TYPEAHEAD_API||"https://www-api.ibm.com",sn=process&&process.env.SEARCH_TYPEAHEAD_VERSION||"v1",cn="".concat(an,"/search/typeahead/").concat(sn),un=function(){function e(){o(this,e)}var t;return l(e,null,[{key:"getResults",value:(t=m(b.mark((function e(t){var n,r,o,i,a=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:"",e.next=3,Vt.getLang();case 3:return r=e.sent,o=["lang=".concat(r.lc).concat(r.cc?"&cc=".concat(r.cc):""),"query=".concat(encodeURIComponent(t)),"".concat(n?"appid=".concat(n):"")].filter((function(e){return e})).join("&"),i="".concat(cn,"?").concat(o),e.next=8,Et.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}(),ln=process&&(process.env.REACT_APP_TRANSLATION_HOST||process.env.TRANSLATION_HOST)||"https://1.www.s81c.com",fn="/common/carbon-for-ibm-dotcom/translations/masthead-footer",pn=process&&(process.env.REACT_APP_DDS_TRANSLATION_ENDPOINT||process.env.DDS_TRANSLATION_ENDPOINT)||fn,dn={},hn="en",vn="us",mn=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(dn).forEach((function(e){return delete dn[e]}));for(var n=0;n<sessionStorage.length;++n){var r=sessionStorage.key(n);0===r.indexOf(t)&&sessionStorage.removeItem(r)}}}},{key:"getTranslation",value:(t=m(b.mark((function e(t,n){var r,o,i,a=this;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="en",o="us",!(t&&t.lc&&t.cc)){e.next=7;break}r=t.lc,o=t.cc,e.next=12;break;case 7:return e.next=9,Vt.getLocale();case 9:i=e.sent,r=i.lc,o=i.cc;case 12:return e.abrupt("return",new Promise((function(e,t){a.fetchTranslation(r,o,n,e,t)})));case 13:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})},{key:"fetchTranslation",value:function(e,t,n,r,o){var i=this,a=this.getSessionKey(n),s="".concat(a,"-").concat(t,"-").concat(e),c=this.getSessionCache(s);if(c)r(c);else{var u="undefined"!==t?"".concat(t,"-").concat(e):"".concat(e);if(!dn[u]){var l=n||pn,f="undefined"!==t?"".concat(t).concat(e):"".concat(e),p=/((http(s?)):\/\/)/g.test(n)?"":ln,d="".concat(p).concat(l,"/").concat(f,".json");dn[u]=Et.get(d,{headers:{"Content-Type":"text/plain",origin:ln}}).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}))}dn[u].then(r,(function(a){t===vn&&e===hn?o(a):i.fetchTranslation(hn,vn,n,r,o)}))}}},{key:"getSessionKey",value:function(e){var t="dds-translation";(fn!==pn||e)&&(t=(e||pn).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,""));return t}},{key:"transformData",value:function(e){var t,n=null===(t=e.profileMenu)||void 0===t?void 0:t.signedout;if(n){var r="state=https%3A%2F%2Fwww.ibm.com",o=n.findIndex((function(e){var t;return-1!==(null===(t=e.url)||void 0===t?void 0:t.indexOf(r))}));if(-1!==o&&f.location){var i=encodeURIComponent(f.location.href);e.profileMenu.signedout[o].url=n[o].url.replace(r,"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 yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){ge(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bn=process&&(process.env.REACT_APP_KALTURA_PARTNER_ID||process.env.KALTURA_PARTNER_ID)||1773841,wn=process&&(process.env.REACT_APP_KALTURA_UICONF_ID||process.env.KALTURA_UICONF_ID)||27941801,xn="https://cdnapisec.kaltura.com/p/".concat(bn,"/sp/").concat(bn,"00/embedIframeJs/uiconf_id/").concat(wn,"/partner_id/").concat(bn),En="https://cdnsecakmi.kaltura.com/p/".concat(bn,"/thumbnail/entry_id/"),Sn=0,On=!1;function Tn(e,t){f.kWidget?(On=!1,e()):On?++Sn<50?setTimeout((function(){Tn(e,t)}),100):t():(!function(){On=!0;var e=document.createElement("script");e.src=xn,e.async=!0,document.body.appendChild(e)}(),Tn(e,t))}var kn={},An=function(){function e(){o(this,e)}var t,n;return l(e,null,[{key:"checkScript",value:function(){return new Promise((function(e,t){Tn(e,t)}))}},{key:"getThumbnailUrl",value:function(e){var t=e.mediaId,n=e.height,r=e.width,o=En+t;return n&&(o+="/height/".concat(n)),r&&(o+="/width/".concat(r)),o}},{key:"embedMedia",value:(n=m(b.mark((function e(t,n){var r,o,i,a,s=arguments;return b.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=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(n)&&document.querySelector("dds-tabs-extended-media")){var c=document.createElement("div");c.classList.add("bx--video-player__video"),c.setAttribute("id",n),document.body.append(c),s=!0}f.kWidget.embed({targetId:n,wid:"_"+bn,uiconf_id:wn,entry_id:t,flashvars:gn(gn({},{autoPlay:!0,closedCaptions:{plugin:!0},titleLabel:{plugin:!0,align:"left",text:"{mediaProxy.entry.name}"},ibm:{template:"idl"}}),r),params:{wmode:"transparent"},readyCallback:function(n){var r=document.getElementById(n);o&&(r.addJsListener("playerPaused.ibm",(function(){a({playerState:1,kdp:r,mediaId:t})})),r.addJsListener("playerPlayed.ibm",(function(){a({playerState:2,kdp:r,mediaId:t})})),r.addJsListener("playerPlayEnd.ibm",(function(){a({playerState:3,kdp:r,mediaId:t})})),r.addJsListener("IbmCtaEvent.ibm",(function(e){var n=(null==e?void 0:e.customMetricsData)||{};a({playerState:101,kdp:r,mediaId:t,customMetricsData:n})}))),i(r),e(r)}}),s&&document.querySelector("dds-tabs-extended-media").shadowRoot.querySelector(".bx--accordion__item--active dds-video-player").lastChild.parentElement.appendChild(document.getElementById(n))}));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 n.apply(this,arguments)})},{key:"fireEvent",value:function(e){var t=e.playerState,n=e.kdp,r=e.mediaId,o=e.customMetricsData,i=void 0===o?{}:o,a=Math.round(n.evaluate("{video.player.currentTime}"));2===t&&0===a&&(t=0);var s={playerType:"kaltura",title:n.evaluate("{mediaProxy.entry.name}"),currentTime:a,duration:n.evaluate("{mediaProxy.entry.duration}"),playerState:t,mediaId:r,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 kn&&kn[t]?kn[t]:new Promise((function(e){return new f.kWidget.api({wid:"_"+bn}).doRequest({service:"media",action:"get",entryId:t},(function(t){kn[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 n=Math.floor(t/1e3%60),r=Math.floor(t/6e4%60),o=Math.floor(t/36e5%24);return o=o>0?o+":":"",n=n<10?"0"+n:n,t&&"("+o+r+":"+n+")"}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,n=t;(arguments.length>1?arguments[1]:void 0)||(n=1e3*t);var r=Math.floor(n/1e3%60),o=Math.floor(n/6e4%60),i=Math.floor(n/36e5%24),a=e.formatTime(r,"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 n=f.document.documentElement.lang||f.navigator.language;return new Intl.NumberFormat(n,{style:"unit",unitDisplay:"long",unit:t}).format(e)}}]),e}();e.AnalyticsAPI=h,e.CloudAccountAuthAPI=Tt,e.DDOAPI=_t,e.KalturaPlayerAPI=An,e.LocaleAPI=Vt,e.MarketingSearchAPI=Zt,e.MastheadLogo=en,e.ProfileAPI=on,e.SearchTypeaheadAPI=un,e.TranslationAPI=mn,e.globalInit=function(){$t||($t=!0,_t.setVersion().catch((function(e){console.error("Error setting the version of the library in the DDO:",e)})),Vt.getLang().then((function(e){Lt(e.lc)})),h.initAll())},Object.defineProperty(e,"__esModule",{value:!0})}));
|