@candulabs/core
Advanced tools
Comparing version 0.6.4 to 0.6.5
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.6.5](https://github.com/candulabs/candu-sdk/tree/master/packages/candu-core/compare/v0.6.4...v0.6.5) (2020-11-13) | ||
**Note:** Version bump only for package @candulabs/core | ||
## [0.6.4](https://github.com/candulabs/candu-sdk/tree/master/packages/candu-core/compare/v0.6.4-alpha.0...v0.6.4) (2020-11-13) | ||
@@ -8,0 +16,0 @@ |
@@ -16,3 +16,3 @@ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}); | ||
***************************************************************************** */ | ||
var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function __rest(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}function __awaiter(e,t,r,a){return new(r||(r=Promise))((function(n,o){function i(e){try{c(a.next(e))}catch(e){o(e)}}function s(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):new r((function(t){t(e.value)})).then(i,s)}c((a=a.apply(e,t||[])).next())}))}function __generator(e,t){var r,a,n,o,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,a&&(n=2&o[0]?a.return:o[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,o[1])).done)return n;switch(a=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,a=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(n=(n=i.trys).length>0&&n[n.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){i.label=o[1];break}if(6===o[0]&&i.label<n[1]){i.label=n[1],n=o;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(o);break}n[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],a=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var a=Array(e),n=0;for(t=0;t<r;t++)for(var o=arguments[t],i=0,s=o.length;i<s;i++,n++)a[n]=o[i];return a}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=_freeGlobal||freeSelf||Function("return this")(),_root=root,Symbol$1=_root.Symbol,_Symbol=Symbol$1,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty.call(e,symToStringTag),r=e[symToStringTag];try{e[symToStringTag]=void 0;var a=!0}catch(e){}var n=nativeObjectToString.call(e);return a&&(t?e[symToStringTag]=r:delete e[symToStringTag]),n}var _getRawTag=getRawTag,objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString;function objectToString(e){return nativeObjectToString$1.call(e)}var _objectToString=objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag$1&&symToStringTag$1 in Object(e)?_getRawTag(e):_objectToString(e)}var _baseGetTag=baseGetTag;function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject_1(e))return!1;var t=_baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction,coreJsData=_root["__core-js_shared__"],_coreJsData=coreJsData,maskSrcKey=function(){var e=/[^.]+$/.exec(_coreJsData&&_coreJsData.keys&&_coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked,funcProto=Function.prototype,funcToString=funcProto.toString;function toSource(e){if(null!=e){try{return funcToString.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$2=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$1=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(e){return!(!isObject_1(e)||_isMasked(e))&&(isFunction_1(e)?reIsNative:reIsHostCtor).test(_toSource(e))}var _baseIsNative=baseIsNative;function getValue(e,t){return null==e?void 0:e[t]}var _getValue=getValue;function getNative(e,t){var r=_getValue(e,t);return _baseIsNative(r)?r:void 0}var _getNative=getNative,defineProperty=function(){try{var e=_getNative(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),_defineProperty=defineProperty;function baseAssignValue(e,t,r){"__proto__"==t&&_defineProperty?_defineProperty(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var _baseAssignValue=baseAssignValue;function createBaseFor(e){return function(t,r,a){for(var n=-1,o=Object(t),i=a(t),s=i.length;s--;){var c=i[e?s:++n];if(!1===r(o[c],c,o))break}return t}}var _createBaseFor=createBaseFor,baseFor=_createBaseFor(),_baseFor=baseFor;function baseTimes(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var _baseTimes=baseTimes;function isObjectLike(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike,argsTag="[object Arguments]";function baseIsArguments(e){return isObjectLike_1(e)&&_baseGetTag(e)==argsTag}var _baseIsArguments=baseIsArguments,objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty,propertyIsEnumerable=objectProto$3.propertyIsEnumerable,isArguments=_baseIsArguments(function(){return arguments}())?_baseIsArguments:function(e){return isObjectLike_1(e)&&hasOwnProperty$2.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")},isArguments_1=isArguments,isArray=Array.isArray,isArray_1=isArray;function stubFalse(){return!1}var stubFalse_1=stubFalse,isBuffer_1=createCommonjsModule((function(e,t){var r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,n=a&&a.exports===r?_root.Buffer:void 0,o=(n?n.isBuffer:void 0)||stubFalse_1;e.exports=o})),MAX_SAFE_INTEGER=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var r=typeof e;return!!(t=null==t?MAX_SAFE_INTEGER:t)&&("number"==r||"symbol"!=r&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}var _isIndex=isIndex,MAX_SAFE_INTEGER$1=9007199254740991;function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER$1}var isLength_1=isLength,argsTag$1="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag$1="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};function baseIsTypedArray(e){return isObjectLike_1(e)&&isLength_1(e.length)&&!!typedArrayTags[_baseGetTag(e)]}typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var _baseIsTypedArray=baseIsTypedArray;function baseUnary(e){return function(t){return e(t)}}var _baseUnary=baseUnary,_nodeUtil=createCommonjsModule((function(e,t){var r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,n=a&&a.exports===r&&_freeGlobal.process,o=function(){try{var e=a&&a.require&&a.require("util").types;return e||n&&n.binding&&n.binding("util")}catch(e){}}();e.exports=o})),nodeIsTypedArray=_nodeUtil&&_nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?_baseUnary(nodeIsTypedArray):_baseIsTypedArray,isTypedArray_1=isTypedArray,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty;function arrayLikeKeys(e,t){var r=isArray_1(e),a=!r&&isArguments_1(e),n=!r&&!a&&isBuffer_1(e),o=!r&&!a&&!n&&isTypedArray_1(e),i=r||a||n||o,s=i?_baseTimes(e.length,String):[],c=s.length;for(var u in e)!t&&!hasOwnProperty$3.call(e,u)||i&&("length"==u||n&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||_isIndex(u,c))||s.push(u);return s}var _arrayLikeKeys=arrayLikeKeys,objectProto$5=Object.prototype;function isPrototype(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||objectProto$5)}var _isPrototype=isPrototype;function overArg(e,t){return function(r){return e(t(r))}}var _overArg=overArg,nativeKeys=_overArg(Object.keys,Object),_nativeKeys=nativeKeys,objectProto$6=Object.prototype,hasOwnProperty$4=objectProto$6.hasOwnProperty;function baseKeys(e){if(!_isPrototype(e))return _nativeKeys(e);var t=[];for(var r in Object(e))hasOwnProperty$4.call(e,r)&&"constructor"!=r&&t.push(r);return t}var _baseKeys=baseKeys;function isArrayLike(e){return null!=e&&isLength_1(e.length)&&!isFunction_1(e)}var isArrayLike_1=isArrayLike;function keys(e){return isArrayLike_1(e)?_arrayLikeKeys(e):_baseKeys(e)}var keys_1=keys;function baseForOwn(e,t){return e&&_baseFor(e,t,keys_1)}var _baseForOwn=baseForOwn;function listCacheClear(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear;function eq(e,t){return e===t||e!=e&&t!=t}var eq_1=eq;function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq_1(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=_assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete;function listCacheGet(e){var t=this.__data__,r=_assocIndexOf(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet;function listCacheHas(e){return _assocIndexOf(this.__data__,e)>-1}var _listCacheHas=listCacheHas;function listCacheSet(e,t){var r=this.__data__,a=_assocIndexOf(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var _listCacheSet=listCacheSet;function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}ListCache.prototype.clear=_listCacheClear,ListCache.prototype.delete=_listCacheDelete,ListCache.prototype.get=_listCacheGet,ListCache.prototype.has=_listCacheHas,ListCache.prototype.set=_listCacheSet;var _ListCache=ListCache;function stackClear(){this.__data__=new _ListCache,this.size=0}var _stackClear=stackClear;function stackDelete(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var _stackDelete=stackDelete;function stackGet(e){return this.__data__.get(e)}var _stackGet=stackGet;function stackHas(e){return this.__data__.has(e)}var _stackHas=stackHas,Map$1=_getNative(_root,"Map"),_Map=Map$1,nativeCreate=_getNative(Object,"create"),_nativeCreate=nativeCreate;function hashClear(){this.__data__=_nativeCreate?_nativeCreate(null):{},this.size=0}var _hashClear=hashClear;function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete,HASH_UNDEFINED="__lodash_hash_undefined__",objectProto$7=Object.prototype,hasOwnProperty$5=objectProto$7.hasOwnProperty;function hashGet(e){var t=this.__data__;if(_nativeCreate){var r=t[e];return r===HASH_UNDEFINED?void 0:r}return hasOwnProperty$5.call(t,e)?t[e]:void 0}var _hashGet=hashGet,objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function hashHas(e){var t=this.__data__;return _nativeCreate?void 0!==t[e]:hasOwnProperty$6.call(t,e)}var _hashHas=hashHas,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_nativeCreate&&void 0===t?HASH_UNDEFINED$1:t,this}var _hashSet=hashSet;function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}Hash.prototype.clear=_hashClear,Hash.prototype.delete=_hashDelete,Hash.prototype.get=_hashGet,Hash.prototype.has=_hashHas,Hash.prototype.set=_hashSet;var _Hash=Hash;function mapCacheClear(){this.size=0,this.__data__={hash:new _Hash,map:new(_Map||_ListCache),string:new _Hash}}var _mapCacheClear=mapCacheClear;function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable;function getMapData(e,t){var r=e.__data__;return _isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData;function mapCacheDelete(e){var t=_getMapData(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete;function mapCacheGet(e){return _getMapData(this,e).get(e)}var _mapCacheGet=mapCacheGet;function mapCacheHas(e){return _getMapData(this,e).has(e)}var _mapCacheHas=mapCacheHas;function mapCacheSet(e,t){var r=_getMapData(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}var _mapCacheSet=mapCacheSet;function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}MapCache.prototype.clear=_mapCacheClear,MapCache.prototype.delete=_mapCacheDelete,MapCache.prototype.get=_mapCacheGet,MapCache.prototype.has=_mapCacheHas,MapCache.prototype.set=_mapCacheSet;var _MapCache=MapCache,LARGE_ARRAY_SIZE=200;function stackSet(e,t){var r=this.__data__;if(r instanceof _ListCache){var a=r.__data__;if(!_Map||a.length<LARGE_ARRAY_SIZE-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new _MapCache(a)}return r.set(e,t),this.size=r.size,this}var _stackSet=stackSet;function Stack(e){var t=this.__data__=new _ListCache(e);this.size=t.size}Stack.prototype.clear=_stackClear,Stack.prototype.delete=_stackDelete,Stack.prototype.get=_stackGet,Stack.prototype.has=_stackHas,Stack.prototype.set=_stackSet;var _Stack=Stack,HASH_UNDEFINED$2="__lodash_hash_undefined__";function setCacheAdd(e){return this.__data__.set(e,HASH_UNDEFINED$2),this}var _setCacheAdd=setCacheAdd;function setCacheHas(e){return this.__data__.has(e)}var _setCacheHas=setCacheHas;function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new _MapCache;++t<r;)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=_setCacheAdd,SetCache.prototype.has=_setCacheHas;var _SetCache=SetCache;function arraySome(e,t){for(var r=-1,a=null==e?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}var _arraySome=arraySome;function cacheHas(e,t){return e.has(t)}var _cacheHas=cacheHas,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function equalArrays(e,t,r,a,n,o){var i=r&COMPARE_PARTIAL_FLAG,s=e.length,c=t.length;if(s!=c&&!(i&&c>s))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var _=-1,d=!0,f=r&COMPARE_UNORDERED_FLAG?new _SetCache:void 0;for(o.set(e,t),o.set(t,e);++_<s;){var p=e[_],h=t[_];if(a)var g=i?a(h,p,_,t,e,o):a(p,h,_,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!_arraySome(t,(function(e,t){if(!_cacheHas(f,t)&&(p===e||n(p,e,r,a,o)))return f.push(t)}))){d=!1;break}}else if(p!==h&&!n(p,h,r,a,o)){d=!1;break}}return o.delete(e),o.delete(t),d}var _equalArrays=equalArrays,Uint8Array$1=_root.Uint8Array,_Uint8Array=Uint8Array$1;function mapToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e,a){r[++t]=[a,e]})),r}var _mapToArray=mapToArray;function setToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var _setToArray=setToArray,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2,boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",mapTag$1="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",symbolProto=_Symbol?_Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(e,t,r,a,n,o,i){switch(r){case dataViewTag$1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case arrayBufferTag$1:return!(e.byteLength!=t.byteLength||!o(new _Uint8Array(e),new _Uint8Array(t)));case boolTag$1:case dateTag$1:case numberTag$1:return eq_1(+e,+t);case errorTag$1:return e.name==t.name&&e.message==t.message;case regexpTag$1:case stringTag$1:return e==t+"";case mapTag$1:var s=_mapToArray;case setTag$1:var c=a&COMPARE_PARTIAL_FLAG$1;if(s||(s=_setToArray),e.size!=t.size&&!c)return!1;var u=i.get(e);if(u)return u==t;a|=COMPARE_UNORDERED_FLAG$1,i.set(e,t);var l=_equalArrays(s(e),s(t),a,n,o,i);return i.delete(e),l;case symbolTag:if(symbolValueOf)return symbolValueOf.call(e)==symbolValueOf.call(t)}return!1}var _equalByTag=equalByTag;function arrayPush(e,t){for(var r=-1,a=t.length,n=e.length;++r<a;)e[n+r]=t[r];return e}var _arrayPush=arrayPush;function baseGetAllKeys(e,t,r){var a=t(e);return isArray_1(e)?a:_arrayPush(a,r(e))}var _baseGetAllKeys=baseGetAllKeys;function arrayFilter(e,t){for(var r=-1,a=null==e?0:e.length,n=0,o=[];++r<a;){var i=e[r];t(i,r,e)&&(o[n++]=i)}return o}var _arrayFilter=arrayFilter;function stubArray(){return[]}var stubArray_1=stubArray,objectProto$9=Object.prototype,propertyIsEnumerable$1=objectProto$9.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols?function(e){return null==e?[]:(e=Object(e),_arrayFilter(nativeGetSymbols(e),(function(t){return propertyIsEnumerable$1.call(e,t)})))}:stubArray_1,_getSymbols=getSymbols;function getAllKeys(e){return _baseGetAllKeys(e,keys_1,_getSymbols)}var _getAllKeys=getAllKeys,COMPARE_PARTIAL_FLAG$2=1,objectProto$a=Object.prototype,hasOwnProperty$7=objectProto$a.hasOwnProperty;function equalObjects(e,t,r,a,n,o){var i=r&COMPARE_PARTIAL_FLAG$2,s=_getAllKeys(e),c=s.length;if(c!=_getAllKeys(t).length&&!i)return!1;for(var u=c;u--;){var l=s[u];if(!(i?l in t:hasOwnProperty$7.call(t,l)))return!1}var _=o.get(e),d=o.get(t);if(_&&d)return _==t&&d==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=i;++u<c;){var h=e[l=s[u]],g=t[l];if(a)var y=i?a(g,h,l,t,e,o):a(h,g,l,e,t,o);if(!(void 0===y?h===g||n(h,g,r,a,o):y)){f=!1;break}p||(p="constructor"==l)}if(f&&!p){var b=e.constructor,E=t.constructor;b!=E&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof E&&E instanceof E)&&(f=!1)}return o.delete(e),o.delete(t),f}var _equalObjects=equalObjects,DataView=_getNative(_root,"DataView"),_DataView=DataView,Promise$1=_getNative(_root,"Promise"),_Promise=Promise$1,Set=_getNative(_root,"Set"),_Set=Set,WeakMap=_getNative(_root,"WeakMap"),_WeakMap=WeakMap,mapTag$2="[object Map]",objectTag$1="[object Object]",promiseTag="[object Promise]",setTag$2="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$2="[object DataView]",dataViewCtorString=_toSource(_DataView),mapCtorString=_toSource(_Map),promiseCtorString=_toSource(_Promise),setCtorString=_toSource(_Set),weakMapCtorString=_toSource(_WeakMap),getTag=_baseGetTag;(_DataView&&getTag(new _DataView(new ArrayBuffer(1)))!=dataViewTag$2||_Map&&getTag(new _Map)!=mapTag$2||_Promise&&getTag(_Promise.resolve())!=promiseTag||_Set&&getTag(new _Set)!=setTag$2||_WeakMap&&getTag(new _WeakMap)!=weakMapTag$1)&&(getTag=function(e){var t=_baseGetTag(e),r=t==objectTag$1?e.constructor:void 0,a=r?_toSource(r):"";if(a)switch(a){case dataViewCtorString:return dataViewTag$2;case mapCtorString:return mapTag$2;case promiseCtorString:return promiseTag;case setCtorString:return setTag$2;case weakMapCtorString:return weakMapTag$1}return t});var _getTag=getTag,COMPARE_PARTIAL_FLAG$3=1,argsTag$2="[object Arguments]",arrayTag$1="[object Array]",objectTag$2="[object Object]",objectProto$b=Object.prototype,hasOwnProperty$8=objectProto$b.hasOwnProperty;function baseIsEqualDeep(e,t,r,a,n,o){var i=isArray_1(e),s=isArray_1(t),c=i?arrayTag$1:_getTag(e),u=s?arrayTag$1:_getTag(t),l=(c=c==argsTag$2?objectTag$2:c)==objectTag$2,_=(u=u==argsTag$2?objectTag$2:u)==objectTag$2,d=c==u;if(d&&isBuffer_1(e)){if(!isBuffer_1(t))return!1;i=!0,l=!1}if(d&&!l)return o||(o=new _Stack),i||isTypedArray_1(e)?_equalArrays(e,t,r,a,n,o):_equalByTag(e,t,c,r,a,n,o);if(!(r&COMPARE_PARTIAL_FLAG$3)){var f=l&&hasOwnProperty$8.call(e,"__wrapped__"),p=_&&hasOwnProperty$8.call(t,"__wrapped__");if(f||p){var h=f?e.value():e,g=p?t.value():t;return o||(o=new _Stack),n(h,g,r,a,o)}}return!!d&&(o||(o=new _Stack),_equalObjects(e,t,r,a,n,o))}var _baseIsEqualDeep=baseIsEqualDeep;function baseIsEqual(e,t,r,a,n){return e===t||(null==e||null==t||!isObjectLike_1(e)&&!isObjectLike_1(t)?e!=e&&t!=t:_baseIsEqualDeep(e,t,r,a,baseIsEqual,n))}var _baseIsEqual=baseIsEqual,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2;function baseIsMatch(e,t,r,a){var n=r.length,o=n,i=!a;if(null==e)return!o;for(e=Object(e);n--;){var s=r[n];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++n<o;){var c=(s=r[n])[0],u=e[c],l=s[1];if(i&&s[2]){if(void 0===u&&!(c in e))return!1}else{var _=new _Stack;if(a)var d=a(u,l,c,e,t,_);if(!(void 0===d?_baseIsEqual(l,u,COMPARE_PARTIAL_FLAG$4|COMPARE_UNORDERED_FLAG$2,a,_):d))return!1}}return!0}var _baseIsMatch=baseIsMatch;function isStrictComparable(e){return e==e&&!isObject_1(e)}var _isStrictComparable=isStrictComparable;function getMatchData(e){for(var t=keys_1(e),r=t.length;r--;){var a=t[r],n=e[a];t[r]=[a,n,_isStrictComparable(n)]}return t}var _getMatchData=getMatchData;function matchesStrictComparable(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}var _matchesStrictComparable=matchesStrictComparable;function baseMatches(e){var t=_getMatchData(e);return 1==t.length&&t[0][2]?_matchesStrictComparable(t[0][0],t[0][1]):function(r){return r===e||_baseIsMatch(r,e,t)}}var _baseMatches=baseMatches,symbolTag$1="[object Symbol]";function isSymbol(e){return"symbol"==typeof e||isObjectLike_1(e)&&_baseGetTag(e)==symbolTag$1}var isSymbol_1=isSymbol,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray_1(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol_1(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey,FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var a=arguments,n=t?t.apply(this,a):a[0],o=r.cache;if(o.has(n))return o.get(n);var i=e.apply(this,a);return r.cache=o.set(n,i)||o,i};return r.cache=new(memoize.Cache||_MapCache),r}memoize.Cache=_MapCache;var memoize_1=memoize,MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize_1(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=_memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,a,n){t.push(a?n.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath;function arrayMap(e,t){for(var r=-1,a=null==e?0:e.length,n=Array(a);++r<a;)n[r]=t(e[r],r,e);return n}var _arrayMap=arrayMap,INFINITY=1/0,symbolProto$1=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray_1(e))return _arrayMap(e,baseToString)+"";if(isSymbol_1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}var _baseToString=baseToString;function toString(e){return null==e?"":_baseToString(e)}var toString_1=toString;function castPath(e,t){return isArray_1(e)?e:_isKey(e,t)?[e]:_stringToPath(toString_1(e))}var _castPath=castPath,INFINITY$1=1/0;function toKey(e){if("string"==typeof e||isSymbol_1(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _toKey=toKey;function baseGet(e,t){for(var r=0,a=(t=_castPath(t,e)).length;null!=e&&r<a;)e=e[_toKey(t[r++])];return r&&r==a?e:void 0}var _baseGet=baseGet;function get(e,t,r){var a=null==e?void 0:_baseGet(e,t);return void 0===a?r:a}var get_1=get;function baseHasIn(e,t){return null!=e&&t in Object(e)}var _baseHasIn=baseHasIn;function hasPath(e,t,r){for(var a=-1,n=(t=_castPath(t,e)).length,o=!1;++a<n;){var i=_toKey(t[a]);if(!(o=null!=e&&r(e,i)))break;e=e[i]}return o||++a!=n?o:!!(n=null==e?0:e.length)&&isLength_1(n)&&_isIndex(i,n)&&(isArray_1(e)||isArguments_1(e))}var _hasPath=hasPath;function hasIn(e,t){return null!=e&&_hasPath(e,t,_baseHasIn)}var hasIn_1=hasIn,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function baseMatchesProperty(e,t){return _isKey(e)&&_isStrictComparable(t)?_matchesStrictComparable(_toKey(e),t):function(r){var a=get_1(r,e);return void 0===a&&a===t?hasIn_1(r,e):_baseIsEqual(t,a,COMPARE_PARTIAL_FLAG$5|COMPARE_UNORDERED_FLAG$3)}}var _baseMatchesProperty=baseMatchesProperty;function identity(e){return e}var identity_1=identity;function baseProperty(e){return function(t){return null==t?void 0:t[e]}}var _baseProperty=baseProperty;function basePropertyDeep(e){return function(t){return _baseGet(t,e)}}var _basePropertyDeep=basePropertyDeep;function property(e){return _isKey(e)?_baseProperty(_toKey(e)):_basePropertyDeep(e)}var property_1=property;function baseIteratee(e){return"function"==typeof e?e:null==e?identity_1:"object"==typeof e?isArray_1(e)?_baseMatchesProperty(e[0],e[1]):_baseMatches(e):property_1(e)}var _baseIteratee=baseIteratee;function mapValues(e,t){var r={};return t=_baseIteratee(t),_baseForOwn(e,(function(e,a,n){_baseAssignValue(r,a,t(e,a,n))})),r}var mapValues_1=mapValues,isUnitlessNumber={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};function prefixKey(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var prefixes=["Webkit","ms","Moz","O"];Object.keys(isUnitlessNumber).forEach((function(e){prefixes.forEach((function(t){isUnitlessNumber[prefixKey(t,e)]=isUnitlessNumber[e]}))}));var shorthandPropertyExpansions={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},CSSProperty={isUnitlessNumber:isUnitlessNumber,shorthandPropertyExpansions:shorthandPropertyExpansions},CSSProperty_1=CSSProperty;function isNumber(e){return"number"==typeof e}var normalizeCss=function(e){var t=e.css,r={};return Object.entries(t).forEach((function(e){var t=e[0],a=e[1];if(isNumber(a))return CSSProperty_1.isUnitlessNumber[t]?void(r[t]=""+a):void(r[t]=a+"px");r[t]=a})),__assign(__assign({},e),{css:__assign(__assign({},r),{boxSizing:"border-box"})})},typographyNode=function(e){var t=get_1(e,"data.custom.variant","P");return __assign(__assign({},e),{type:t})},normalizeFlexBasis=function(e){var t=e.css.flexBasis;return"0"===t||"0px"===t?__assign(__assign({},e),{css:__assign(__assign({},e.css),{flexBasis:"0%"})}):e},adaptCustomNodes=function(e){return mapValues_1(e,(function(e){var t=e;return"Typography"===t.type&&(t=typographyNode(t)),t.css&&isObject_1(t.css)&&t.css.flexBasis&&(t=normalizeFlexBasis(t)),t.css&&(t=normalizeCss(t)),t}))};const API_BASE_URL="https://api.candu.ai",CDN_BASE_URL="https://cdn.candu.ai";var N,I,R,D,w,M,API_BASE_URL$1=API_BASE_URL,CDN_BASE_URL$1=CDN_BASE_URL,ENDPOINTS={checkListItems:"/api/checklistItems",segmentMembership:"/api/segmentMemberships",segmentsDefinition:"/api/segmentsDefinition",tutorialMetadata:"/api/tutorialMetadata",tutorialDocuments:"/api/tutorialDocumentsSdk",tutorialProdSocket:"wss://2jcfb7pjlf.execute-api.eu-west-1.amazonaws.com/prod"},prefetch=function(e){if(!document.querySelectorAll('[href="'+e+'"]').length){var t=document.createElement("link");t.setAttribute("rel","prefetch"),t.setAttribute("href",e),document.head.appendChild(t)}},fetchHead=function(e,t){e&&isArray_1(e)&&e.map((function(e){var r=e.nodeType,a=e.url;return prefetch("EmbedTutorial"===r?CDN_BASE_URL$1+"/tutorials/"+t+"/"+a+".json":"EmbedPortal"===r?CDN_BASE_URL$1+"/portals/"+t+"/"+a+"/head.json":a)}))},TutorialDependencies=function(){function e(e){this.adjacencyList={},this.rootDocument=e,this.adjacencyList[e]=[]}return e.prototype.get=function(e){return this.adjacencyList[e]},e.prototype.add=function(e,t){var r=this;if(this.adjacencyList[e]||(this.adjacencyList[e]=[]),!this.adjacencyList[t])return this.adjacencyList[e].push(t),this.adjacencyList[t]=[],!0;if(this.adjacencyList[e].includes(t))return!0;var a=function(t){if(t===e)return!0;for(var n=0,o=r.adjacencyList[t];n<o.length;n++){var i=o[n];if(a(i))return!0}return!1};return!a(t)&&(this.adjacencyList[e].push(t),!0)},e}(),createTutorialDocumentContext=function(e,t){return{id:e,dependencies:t?t.dependencies:new TutorialDependencies(e)}},checkCyclicAndAdd=function(e,t){return e.dependencies.add(e.id,t)},n="Everyone",e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t="object"==typeof e&&e&&e.Object===Object&&e,r="object"==typeof self&&self&&self.Object===Object&&self,o=(t||r||Function("return this")()).Symbol,i=Object.prototype,u=i.hasOwnProperty,a=i.toString,c=o?o.toStringTag:void 0,l=function(e){var t=u.call(e,c),r=e[c];try{e[c]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[c]=r:delete e[c]),o},E=Object.prototype.toString,s=function(e){return E.call(e)},f="[object Null]",d="[object Undefined]",v=o?o.toStringTag:void 0,p=function(e){return null==e?void 0===e?d:f:v&&v in Object(e)?l(e):s(e)},T=Array.isArray,O=function(e){return null!=e&&"object"==typeof e},A="[object String]",g=function(e){return"string"==typeof e||!T(e)&&O(e)&&p(e)==A},m="[object Number]",S=function(e){return"number"==typeof e||O(e)&&p(e)==m},P=/^([a-zA-Z0-9]|_|-)+$/,_=function(e){return g(e)&&e.length>=3&&e.length<100&&P.test(e)},b=function(e){return S(e)&&e>=0},y=function(e){return g(e)&&!!e.match(/^[0-9a-zA-Z]*$/)&&e.length>=10},C=function(e){return b(e)||g(e)&&e.trim().length>0};!function(e){e.SDK="SDK",e.PREVIEW="PREVIEW"}(N||(N={})),function(e){e.BOOTSTRAP="Bootstrap",e.CHANGE_POSITION="ChangePosition",e.CLOSE_PREVIEW="ClosePreview",e.PREVIEW_LOADED="PreviewLoaded",e.SET_AVALIABLE_PORTALS="SetAvaliablePortals",e.SET_CONTENT="SetContent",e.SET_SELECTED_ELEMENT="SetSelectedElement",e.SET_VIEW_MODE="SetViewMode",e.ADD_ELEMENT="AddElement",e.REMOVE_ELEMENT="RemoveElement",e.UPDATE_ELEMENT="UpdateElement",e.SET_ELEMENT="SetElement"}(I||(I={})),(R||(R={})).ON_CLICK="OnClick",function(e){e.NATIVE="Native",e.PENDO="Pendo"}(D||(D={})),function(e){e.NAVIGATE="Navigate",e.CHANGE_TUTORIAL="ChangeTutorial",e.OPEN_GUIDE="OpenGuide"}(w||(w={})),function(e){e.PRIMARY="primary",e.SECONDARY="primary",e.WARNING="warning",e.DANGER="danger",e.NEUTRAL="neutral",e.ACTIVE="active",e.INFO="info"}(M||(M={}));var U,k=M.PRIMARY;!function(e){e.U="U",e.B="B",e.Em="Em",e.InlineCode="InlineCode"}(U||(U={}));var B,F,X,nn,en,rn,on,z=function(e){return g(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},H=function(e){return b(e)},K=function(e){return _(e)};!function(e){e.NotStared="NotStarted",e.InProgress="InProgress",e.Done="Done"}(B||(B={})),function(e){e.COLLAPSED="Collapsed",e.EXPANDED="Expanded",e.MINIMIZED="Minimized"}(F||(F={})),function(e){e.TUTORIAL="Tutorial",e.PORTAL="Portal"}(X||(X={})),function(e){e.Global="Global",e.Organization="Organization"}(nn||(nn={})),function(e){e.Root="root",e.Rule="rule",e.Atrule="atrule",e.Decl="decl",e.Any="any"}(en||(en={})),function(e){e.Global="Global",e.Carried="Carried"}(rn||(rn={})),function(e){e.CanduCdn="CanduCdn",e.CheckListApi="CheckListApi"}(on||(on={}));var _a,createLookup=function(e){return e.reduce((function(e,t){var r;return __assign(__assign({},e),((r={})[t]=t,r))}),{})},findMatchingSegment=function(e,t){var r=createLookup(t);return e.content.find((function(e){var t=e.segmentId;return!!r[t]||t===n}))},eventPrefix=function(e){return"candu.sdk."+e},errorPrefix=function(e){return eventPrefix("error."+e)},ERROR_SLUGS={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",PROVIDER_ERROR:"provider_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},EVENT_NAMES={HEARTBEAT:eventPrefix("heartbeat"),PREVIEW_OPEN:eventPrefix("preview.open"),PORTAL:eventPrefix("portal"),TUTORIAL:eventPrefix("tutorial"),TUTORIAL_INTERACTION:eventPrefix("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:errorPrefix("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:errorPrefix("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:errorPrefix("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:errorPrefix("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:errorPrefix("commit_api"),TUTORIAL_LOADING_ERROR:errorPrefix("tutorial"),UNKOWN_NODE_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),PORTAL_ERROR:errorPrefix(ERROR_SLUGS.PORTAL_ERROR),PROVIDER_ERROR:errorPrefix(ERROR_SLUGS.PROVIDER_ERROR),STYLEGUIDE_MAP_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),RENDER_NODE_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:errorPrefix("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:errorPrefix("circular_dependecy_embed_tutorial"),STATE_FETCH_FAILED:errorPrefix("state_fetch_failed"),STATE_UPDATE_FAILED:errorPrefix("state_update_failed")},PORTAL_ASSET_NOT_FOUND="Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",unknownMessage=function(e){return"An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: "+e+"."},EVENTING_NOT_INITIALIZED="You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n",PORTAL_NO_SEGMENT_IDS="You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",NO_MATCHING_TUTORIALS="The Tutorial will not be rendered because there are no matching segments for the given user.",ERROR_MESSAGES=((_a={EVENTING_NOT_INITIALIZED:EVENTING_NOT_INITIALIZED})[EVENT_NAMES.PORTAL_ASSET_NOT_FOUND]=PORTAL_ASSET_NOT_FOUND,_a[EVENT_NAMES.PORTAL_NO_SEGMENT_IDS]=PORTAL_NO_SEGMENT_IDS,_a[EVENT_NAMES.NO_MATCHING_TUTORIALS]=NO_MATCHING_TUTORIALS,_a[EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER]="(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",_a[EVENT_NAMES.TUTORIAL_LOADING_ERROR]="An error has occurred while trying to load the Tutorial",_a[EVENT_NAMES.UNKOWN_INLINE_NODE_TYPE]=unknownMessage(ERROR_SLUGS.UNKOWN_INLINE_NODE_TYPE),_a[EVENT_NAMES.UNKOWN_NODE_TYPE]=unknownMessage(ERROR_SLUGS.UNKOWN_NODE_TYPE),_a[EVENT_NAMES.CIRCULAR_DEPENDENCY_EMBED_PORTAL]="Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",_a[EVENT_NAMES.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]="Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",_a[EVENT_NAMES.PORTAL_ERROR]="An error has occured within Portal",_a[EVENT_NAMES.PROVIDER_ERROR]="An error has occured within Provider",_a[EVENT_NAMES.TUTORIAL_ERROR]="An error has occured within Tutorial",_a[EVENT_NAMES.RENDER_NODE_ERROR]="An error has occured while rendering tutorial node",_a[EVENT_NAMES.STYLEGUIDE_MAP_ERROR]="An error has occured while mapping node to styleguide",_a[EVENT_NAMES.STATE_FETCH_FAILED]="An error has occured while fetching state:",_a[EVENT_NAMES.STATE_UPDATE_FAILED]="An error has occured while updating state:",_a),defaultStyleguide={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},trackStyleguideProperties=function(e){var t={};return Object.keys(e).forEach((function(r){defaultStyleguide[r]&&(t["styleguide."+r]=e[r].displayName||!0)})),t},LOGGER={error:console.error,warning:console.warn},internalEventing=function(e){var t=e.identify,r=e.track;return{provider:function(e){var a=e.userId,n=e.traits,o=e.styleguide;t(a,n),r(EVENT_NAMES.HEARTBEAT,trackStyleguideProperties(o))},tutorialDocumentLoadingError:function(e){var t=e.tutorialId,a=e.slug,n=e.contentHashId;LOGGER.error(ERROR_MESSAGES[EVENT_NAMES.TUTORIAL_LOADING_ERROR]),r(EVENT_NAMES.TUTORIAL_LOADING_ERROR,{tutorialId:t,slug:a,contentHashId:n})}}};function createCommonjsModule$1(e,t){return e(t={exports:{}},t.exports),t.exports}for(var rngBrowser=createCommonjsModule$1((function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var r=new Uint8Array(16);e.exports=function(){return t(r),r}}else{var a=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),a[t]=e>>>((3&t)<<3)&255;return a}}})),byteToHex=[],i$1=0;i$1<256;++i$1)byteToHex[i$1]=(i$1+256).toString(16).substr(1);function bytesToUuid(e,t){var r=t||0,a=byteToHex;return[a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]]].join("")}var bytesToUuid_1=bytesToUuid;function v4(e,t,r){var a=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var n=(e=e||{}).random||(e.rng||rngBrowser)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t)for(var o=0;o<16;++o)t[a+o]=n[o];return t||bytesToUuid_1(n)}var Source,EventType,v4_1=v4;!function(e){e.UserGenerated="UserGenerated",e.SDK="SDK"}(Source||(Source={})),function(e){e.Identify="Identify",e.Group="Group",e.Track="Track",e.Page="Page",e.Screen="Screen"}(EventType||(EventType={}));var ANONYMOUS_ID_STORAGE_KEY="candu:anonymous_id",hasStorage=function(){return"undefined"!=typeof window&&window.localStorage},get$1=function(e){return function(){if(hasStorage()){var t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return null}}}},getOrCreate=function(e,t){return function(){return get$1(e)()||t()}},set=function(e){return function(t){hasStorage()&&null!=t&&window.localStorage.setItem(e,JSON.stringify(t))}},storage={anonymousId:{getOrCreate:getOrCreate(ANONYMOUS_ID_STORAGE_KEY,(function(){var e=v4_1();return set(ANONYMOUS_ID_STORAGE_KEY)(e),e})),set:set(ANONYMOUS_ID_STORAGE_KEY)}},getAnonymousId=storage.anonymousId.getOrCreate,invariant=function(e,t,r,a,n,o,i,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,a,n,o,i,s],l=0;(c=new Error(t.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}},browser=invariant,isValidStyleguideProps=function(e){return browser(!e||isObject_1(e),"(Candu) styleguide must be undefined or an object")},providerValidation=function(e){var t=e.clientToken,r=e.userId,a=e.traits,n=e.options,o=e.styleguide,i=__rest(e,["clientToken","userId","traits","options","styleguide"]);return browser(y(t),"(Candu) you must provide a valid clientToken"),browser(!r||C(r),"(Candu) you must provide a valid userId"),isValidStyleguideProps(o),browser(!a||isObject_1(a),"(Candu) traits must be undefined or an object"),browser(!n||isObject_1(n),"(Candu) options must be undefined or an object"),__assign(__assign({},i),{clientToken:t,traits:a||{},options:n||{},styleguide:o||{},userId:r||getAnonymousId()})},tutorialValidation=function(e){var t=e.slug,r=e.styleguide,a=e.contentHashId,n=e.tutorialId,o=e.tutorialDocument,i=e.renderedByClient,s=__rest(e,["slug","styleguide","contentHashId","tutorialId","tutorialDocument","renderedByClient"]);return isValidStyleguideProps(r),__assign(__assign({},s),{slug:t,styleguide:r||{},contentHashId:a,tutorialId:n,tutorialDocument:o,renderedByClient:i})},portalValidation=function(e){var t=e.slug,r=e.styleguide;return isValidStyleguideProps(r),{slug:t,styleguide:r||{}}},fetchURL=function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,fetch(e)];case 1:return[2,t.sent().json()]}}))}))},fetchFromApi=function(e){return fetchURL(""+API_BASE_URL$1+e)},fetchFromCdn=function(e){return fetchURL(""+CDN_BASE_URL$1+e)},getTutorialDocument=function(e){return{byId:function(t){return fetchFromApi(ENDPOINTS.tutorialDocuments+"?token="+e+"&finder=latestPublished&tutorialId="+t)},bySlug:function(t){return fetchFromCdn("/tutorials/"+e+"/"+t+".json")},byContentHash:function(t){return fetchFromCdn("/tutorials/"+e+"/"+t+".json")}}},RESOURCES={tutorialDocumentLatestSaved:function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,fetchFromApi(ENDPOINTS.tutorialDocuments+"/"+t+"?token="+e)]}))}))},portalAsset:function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,fetchFromCdn("/portals/"+e+"/"+t+"/head.json")]}))}))},segmentMembership:function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,fetchFromApi(ENDPOINTS.segmentMembership+"/"+t+"?token="+e)]}))}))},segmentDefinition:function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){return[2,fetchFromApi(ENDPOINTS.segmentsDefinition+"?token="+e)]}))}))},tutorialMetadata:function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){return[2,fetchFromApi(ENDPOINTS.tutorialMetadata+"?token="+e)]}))}))},tutorialSocket:function(e,t,r){var a=ENDPOINTS.tutorialProdSocket+"?clientToken="+e+"&tutorialId="+t,n=new WebSocket(a);return n.onmessage=function(e){var t=JSON.parse(e.data);r(t)},function(){return n.close()}},tutorialDocument:function(e,t,r){var a=e.contentHashId,n=e.tutorialId,o=e.tutorialDocument,i=e.slug,s=getTutorialDocument(t);return K(i)?s.bySlug(i):H(n)?s.byId(n):z(a)?s.byContentHash(a):isObject_1(o)?Promise.resolve(o):(LOGGER.error(ERROR_MESSAGES[EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER,{slug:e.slug}),null)}},logError=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.error.apply(console,e)},logWarning=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.warn.apply(console,e)},logger={error:logError,warning:logWarning},includeHTMLWhitespaces=function(e){return e.replace(/\s/g," ")},stripHTML=function(e){return DOMParser?(new DOMParser).parseFromString(e,"text/html").body.textContent||"":e},Observer=function(){function e(){this.subscribers=[]}return e.prototype.subscribe=function(e){var t=this;return this.subscribers.push(e),function(){t.subscribers[t.subscribers.indexOf(e)]=function(){}}},e.prototype.notify=function(e){this.subscribers.forEach((function(t){return t(e)}))},e.prototype.clear=function(){this.subscribers=[]},e}(),PreviewContainer=function(){function e(){this.onClientUpdateObserver=new Observer}return e.prototype.attachClient=function(e){this.client=e,this.onClientUpdateObserver.notify({client:e})},e.prototype.detachClient=function(){this.client&&(this.client=null,this.onClientUpdateObserver.notify({client:null}))},e.prototype.onClientUpdate=function(e){var t=this.onClientUpdateObserver.subscribe(e);return this.client&&e({client:this.client}),t},e}();function createSingleton(e){var t,r,a=function(e){return function(){for(var t,a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];if(r.api)return(t=r.api)[e].apply(t,a);console.warn("Please initialize the SDK by calling Candu.init() before attempting to call "+e)}};return(t=function(){function t(){}return t.init=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return this.api||(t.api=new(e.bind.apply(e,__spreadArrays([void 0],r)))),t.subscriberCallbacks.forEach((function(e){return e()})),t.subscriberCallbacks=[],window.postMessage({source:"CANDU_SINGLETON",payload:{type:"INIT"}},window&&window.origin?window.origin:"*"),t},t.onProviderReady=function(e){if(t.api)return e();t.subscriberCallbacks.push(e)},t}()).subscriberCallbacks=[],t.renderTutorial=a("renderTutorial"),t.renderPortal=a("renderPortal"),t.attachClient=a("attachClient"),t.detachClient=a("detachClient"),t.getProvider=a("getProvider"),r=t,window.Candu=r,r}var SingletonAPI=function(){function e(e){this.init(e)}return e.prototype.attachClient=function(e){return this.provider.preview.attachClient(e)},e.prototype.detachClient=function(){return this.provider.preview.detachClient()},Object.defineProperty(e.prototype,"provider",{get:function(){return this.getProvider()},enumerable:!0,configurable:!0}),e}(),getEventHandler=function(e){switch(e.trigger){case R.ON_CLICK:default:return"onClick"}},getActionHandler=function(e,t){var r,a,n;switch(e.handler.type){case w.NAVIGATE:return(r={})[getEventHandler(e)]=function(){var r=e.handler,a=r.href,n=r.target;t(e),"Blank"===n?window.open(a,"_blank"):a&&a.includes("mailto:")?window.location=a:document.location.href=a},r;case w.CHANGE_TUTORIAL:return(a={})[getEventHandler(e)]=function(){var t=e.handler.tutorialId;logError("TODO -> change tutorial",t)},a;case w.OPEN_GUIDE:return(n={})[getEventHandler(e)]=function(){var t=e.handler.guideId;logError("TODO -> open guide",t)},n;default:return{}}},getActionHandlers=function(e,t){var r=e.data;if(!r||!r.actions)return{};var a=function(e){t.provider.eventing.track(EVENT_NAMES.TUTORIAL_INTERACTION,__assign(__assign({},e),t.trackingIdentifiers||{}))};return r.actions.map((function(e){return getActionHandler(e,a)})).reduce((function(e,t){return __assign(__assign({},e),t)}),{})},getChildren=function(e,t){var r=e.props||{},a=e.nodes,n=r.children;return n||(a?a.map(t):null)},mapNodeToStyleguide=function(e,t){try{var r=t.provider,a=t.document,n=t.trackingIdentifiers,o=a.nodes[e];if(!o)return logger.error("Document is corrupted. Refusing to move further."),null;var i=function(e){return mapNodeToStyleguide(e,t)},s=o.type,c=o.props,u=o.css,l=o.states,_=__assign(__assign(__assign({},c||{}),{style:u||{},children:getChildren(o,i)}),getActionHandlers(o,{trackingIdentifiers:n,provider:r})),d={nodeId:e,node:o,document:a,render:{node:i,styleguide:function(e,r){return void 0===r&&(r={}),t.renderNode(e,{api:d,attributes:r})},tutorial:function(e){return t.renderTutorial(e)},portal:function(e){return t.renderPortal(e)}},trackingIdentifiers:n,stateInstances:l&&t.stateProviderInstances.filter((function(e){return!!l[e.providerId]}))},f=d.render.styleguide(s,_);return f||(logger.error(ERROR_MESSAGES[EVENT_NAMES.UNKOWN_NODE_TYPE],{type:s}),r.eventing.track(EVENT_NAMES.UNKOWN_NODE_TYPE,{type:s}),null)}catch(e){return logger.error(ERROR_MESSAGES[EVENT_NAMES.STYLEGUIDE_MAP_ERROR],e),null}},mergeStyleguidesFromContext=memoize_1((function(e,t){var r,a,n=e.provider,o=e.portal,i=e.tutorial,s=n.styleguide;return i&&(a=i.styleguide),o&&(r=o.styleguide),__assign(__assign(__assign(__assign({},s||{}),r||{}),a||{}),t||{})})),DEFAULT_ALT="",DEFAULT_ALERT_COLOR="#EDEDED",DEFAULT_TAB_HEADER_COLOR="#333745",DEFAULT_TAB_ITEM_COLOR="#838792",DEFAULT_TAB_ACTIVE_COLOR="#FEFEFE",DEFAULT_TAB_COLOR="#FEFEFE",STYLEGUIDE_COLORS={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},getStylesheetId=function(e){return"candu-styleguide-"+e},attachStylesheet=function(e){var t=getStylesheetId(e);if(!document.getElementById(t)){var r=document.createElement("link");r.setAttribute("id",t),r.setAttribute("rel","stylesheet"),r.setAttribute("href",CDN_BASE_URL$1+"/styleguides/applications/"+e+"/default/main.css"),document.head.appendChild(r)}},detachStylesheet=function(e){var t=document.getElementById(getStylesheetId(e));t&&t.remove()};function createBaseEach(e,t){return function(r,a){if(null==r)return r;if(!isArrayLike_1(r))return e(r,a);for(var n=r.length,o=t?n:-1,i=Object(r);(t?o--:++o<n)&&!1!==a(i[o],o,i););return r}}var _createBaseEach=createBaseEach,baseEach=_createBaseEach(_baseForOwn),_baseEach=baseEach;function baseMap(e,t){var r=-1,a=isArrayLike_1(e)?Array(e.length):[];return _baseEach(e,(function(e,n,o){a[++r]=t(e,n,o)})),a}var _baseMap=baseMap;function map(e,t){return(isArray_1(e)?_arrayMap:_baseMap)(e,_baseIteratee(t))}var resolvedPromise,map_1=map,DataLoader=function(){function e(e,t){if("function"!=typeof e)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: "+e+".");this._batchLoadFn=e,this._maxBatchSize=getValidMaxBatchSize(t),this._batchScheduleFn=getValidBatchScheduleFn(t),this._cacheKeyFn=getValidCacheKeyFn(t),this._cacheMap=getValidCacheMap(t),this._batch=null}var t=e.prototype;return t.load=function(e){if(null==e)throw new TypeError("The loader.load() function must be called with a value,but got: "+String(e)+".");var t=getCurrentBatch(this),r=this._cacheMap,a=this._cacheKeyFn(e);if(r){var n=r.get(a);if(n){var o=t.cacheHits||(t.cacheHits=[]);return new Promise((function(e){o.push((function(){return e(n)}))}))}}t.keys.push(e);var i=new Promise((function(e,r){t.callbacks.push({resolve:e,reject:r})}));return r&&r.set(a,i),i},t.loadMany=function(e){if(!isArrayLike$1(e))throw new TypeError("The loader.loadMany() function must be called with Array<key> but got: "+e+".");for(var t=[],r=0;r<e.length;r++)t.push(this.load(e[r]).catch((function(e){return e})));return Promise.all(t)},t.clear=function(e){var t=this._cacheMap;if(t){var r=this._cacheKeyFn(e);t.delete(r)}return this},t.clearAll=function(){var e=this._cacheMap;return e&&e.clear(),this},t.prime=function(e,t){var r=this._cacheMap;if(r){var a,n=this._cacheKeyFn(e);if(void 0===r.get(n))t instanceof Error?(a=Promise.reject(t)).catch((function(){})):a=Promise.resolve(t),r.set(n,a)}return this},e}(),enqueuePostPromiseJob="object"==typeof process&&"function"==typeof process.nextTick?function(e){resolvedPromise||(resolvedPromise=Promise.resolve()),resolvedPromise.then((function(){return process.nextTick(e)}))}:setImmediate||setTimeout;function getCurrentBatch(e){var t=e._batch;if(null!==t&&!t.hasDispatched&&t.keys.length<e._maxBatchSize&&(!t.cacheHits||t.cacheHits.length<e._maxBatchSize))return t;var r={hasDispatched:!1,keys:[],callbacks:[]};return e._batch=r,e._batchScheduleFn((function(){return dispatchBatch(e,r)})),r}function dispatchBatch(e,t){if(t.hasDispatched=!0,0!==t.keys.length){var r=e._batchLoadFn(t.keys);if(!r||"function"!=typeof r.then)return failedDispatch(e,t,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise: "+String(r)+"."));r.then((function(e){if(!isArrayLike$1(e))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array: "+String(e)+".");if(e.length!==t.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys.\n\nKeys:\n"+String(t.keys)+"\n\nValues:\n"+String(e));resolveCacheHits(t);for(var r=0;r<t.callbacks.length;r++){var a=e[r];a instanceof Error?t.callbacks[r].reject(a):t.callbacks[r].resolve(a)}})).catch((function(r){return failedDispatch(e,t,r)}))}else resolveCacheHits(t)}function failedDispatch(e,t,r){resolveCacheHits(t);for(var a=0;a<t.keys.length;a++)e.clear(t.keys[a]),t.callbacks[a].reject(r)}function resolveCacheHits(e){if(e.cacheHits)for(var t=0;t<e.cacheHits.length;t++)e.cacheHits[t]()}function getValidMaxBatchSize(e){if(!(!e||!1!==e.batch))return 1;var t=e&&e.maxBatchSize;if(void 0===t)return 1/0;if("number"!=typeof t||t<1)throw new TypeError("maxBatchSize must be a positive number: "+t);return t}function getValidBatchScheduleFn(e){var t=e&&e.batchScheduleFn;if(void 0===t)return enqueuePostPromiseJob;if("function"!=typeof t)throw new TypeError("batchScheduleFn must be a function: "+t);return t}function getValidCacheKeyFn(e){var t=e&&e.cacheKeyFn;if(void 0===t)return function(e){return e};if("function"!=typeof t)throw new TypeError("cacheKeyFn must be a function: "+t);return t}function getValidCacheMap(e){if(!(!e||!1!==e.cache))return null;var t=e&&e.cacheMap;if(void 0===t)return new Map;if(null!==t){var r=["get","set","delete","clear"].filter((function(e){return t&&"function"!=typeof t[e]}));if(0!==r.length)throw new TypeError("Custom cacheMap missing methods: "+r.join(", "))}return t}function isArrayLike$1(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&(0===e.length||e.length>0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}var dataloader=DataLoader,CHECKLIST_API=API_BASE_URL$1+ENDPOINTS.checkListItems;function adaptResponse(e){return{state:e.state,id:e.id}}var getCheckListItems=function(e,t,r){return fetch(CHECKLIST_API+"?token="+e+"&userId="+t+"&finder=byIds&ids="+r.join(",")).then((function(e){return e.json()})).then((function(e){return e.map(adaptResponse)}))},updateCheckListItem=function(e,t,r,a){return fetch(CHECKLIST_API+"/"+r+"?token="+e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(__assign(__assign({},a),{userId:t.toString()}))}).then((function(e){return e.json()})).then(adaptResponse)},checkListDataLoaders={};function getCheckListDataLoader(e,t){var r=this,a=e+"-"+t,n=checkListDataLoaders[a];if(!n){n=new dataloader((function(a){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return[4,getCheckListItems(e,t,a)];case 1:return r=n.sent(),[2,a.map((function(e){return r.find((function(t){return t.id===e}))}))]}}))}))})),checkListDataLoaders[a]=n}return n}var CheckListResolver=function(){function e(e){var t=e.context,r=e.providerId;this.type=on.CheckListApi,this.clientToken=t.clientToken,this.providerId=r,this.userId=t.userId}return e.prototype.retrieve=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getCheckListDataLoader(this.clientToken,this.userId).load(this.providerId)];case 1:return[2,e.sent()||{id:this.providerId,state:B.NotStared}]}}))}))},e.prototype.mutate=function(e){return updateCheckListItem(this.clientToken,this.userId,this.providerId,e)},e}();function initResolver(e,t){switch(e.type){case on.CheckListApi:return new CheckListResolver(t);default:throw new Error("Unsupported resolver type: "+e.type)}}var StateProviderInstance=function(){function e(e,t,r){var a=this;this.observer=new Observer,this.providerId=e,this.resolver=t,this.resolvedState=null,this.eventing=r,t.retrieve().then((function(e){return a.updateState(e)})).catch((function(e){logger.error(ERROR_MESSAGES[EVENT_NAMES.STATE_FETCH_FAILED],e.message),a.eventing.track(ERROR_MESSAGES[EVENT_NAMES.STATE_FETCH_FAILED],{errorMessage:e.message})}))}return e.prototype.mutate=function(e){var t=this,r=this.resolvedState;this.updateState(__assign(__assign({},r),e)),this.resolver.mutate(e).then((function(e){return t.updateState(e)})).catch((function(e){logger.error(ERROR_MESSAGES[EVENT_NAMES.STATE_UPDATE_FAILED],e.message),t.eventing.track(ERROR_MESSAGES[EVENT_NAMES.STATE_UPDATE_FAILED],{errorMessage:e.message}),r&&t.updateState(r)}))},e.prototype.subscribe=function(e){var t=this.observer.subscribe(e);return this.resolvedState&&e(this.resolvedState),t},e.prototype.updateState=function(e){this.resolvedState=e,this.observer.notify(e)},e}();function initStateProviders(e,t){return map_1(e,(function(e,r){var a=initResolver(e.resolver,{providerId:r,context:t});return new StateProviderInstance(r,a,t.eventing)}))}exports.DEFAULT_ALERT_COLOR=DEFAULT_ALERT_COLOR,exports.DEFAULT_ALT=DEFAULT_ALT,exports.DEFAULT_TAB_ACTIVE_COLOR=DEFAULT_TAB_ACTIVE_COLOR,exports.DEFAULT_TAB_COLOR=DEFAULT_TAB_COLOR,exports.DEFAULT_TAB_HEADER_COLOR=DEFAULT_TAB_HEADER_COLOR,exports.DEFAULT_TAB_ITEM_COLOR=DEFAULT_TAB_ITEM_COLOR,exports.ERROR_MESSAGES=ERROR_MESSAGES,exports.ERROR_SLUGS=ERROR_SLUGS,exports.EVENT_NAMES=EVENT_NAMES,exports.LOGGER=LOGGER,exports.Observer=Observer,exports.PreviewContainer=PreviewContainer,exports.RESOURCES=RESOURCES,exports.STYLEGUIDE_COLORS=STYLEGUIDE_COLORS,exports.SingletonAPI=SingletonAPI,exports.StateProviderInstance=StateProviderInstance,exports.TutorialDependencies=TutorialDependencies,exports.adaptCustomNodes=adaptCustomNodes,exports.attachStylesheet=attachStylesheet,exports.checkCyclicAndAdd=checkCyclicAndAdd,exports.createSingleton=createSingleton,exports.createTutorialDocumentContext=createTutorialDocumentContext,exports.defaultStyleguide=defaultStyleguide,exports.detachStylesheet=detachStylesheet,exports.fetchHead=fetchHead,exports.findMatchingSegment=findMatchingSegment,exports.includeHTMLWhitespaces=includeHTMLWhitespaces,exports.initStateProviders=initStateProviders,exports.internalEventing=internalEventing,exports.logError=logError,exports.logWarning=logWarning,exports.logger=logger,exports.mapNodeToStyleguide=mapNodeToStyleguide,exports.mergeStyleguidesFromContext=mergeStyleguidesFromContext,exports.normalizeCss=normalizeCss,exports.portalValidation=portalValidation,exports.providerValidation=providerValidation,exports.stripHTML=stripHTML,exports.tutorialValidation=tutorialValidation; | ||
var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function __rest(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}function __awaiter(e,t,r,a){return new(r||(r=Promise))((function(n,o){function i(e){try{c(a.next(e))}catch(e){o(e)}}function s(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){e.done?n(e.value):new r((function(t){t(e.value)})).then(i,s)}c((a=a.apply(e,t||[])).next())}))}function __generator(e,t){var r,a,n,o,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,a&&(n=2&o[0]?a.return:o[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,o[1])).done)return n;switch(a=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,a=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(n=(n=i.trys).length>0&&n[n.length-1])&&(6===o[0]||2===o[0])){i=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){i.label=o[1];break}if(6===o[0]&&i.label<n[1]){i.label=n[1],n=o;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(o);break}n[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],a=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var a=Array(e),n=0;for(t=0;t<r;t++)for(var o=arguments[t],i=0,s=o.length;i<s;i++,n++)a[n]=o[i];return a}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=_freeGlobal||freeSelf||Function("return this")(),_root=root,Symbol$1=_root.Symbol,_Symbol=Symbol$1,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty.call(e,symToStringTag),r=e[symToStringTag];try{e[symToStringTag]=void 0;var a=!0}catch(e){}var n=nativeObjectToString.call(e);return a&&(t?e[symToStringTag]=r:delete e[symToStringTag]),n}var _getRawTag=getRawTag,objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString;function objectToString(e){return nativeObjectToString$1.call(e)}var _objectToString=objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag$1&&symToStringTag$1 in Object(e)?_getRawTag(e):_objectToString(e)}var _baseGetTag=baseGetTag;function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var isObject_1=isObject,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject_1(e))return!1;var t=_baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var isFunction_1=isFunction,coreJsData=_root["__core-js_shared__"],_coreJsData=coreJsData,maskSrcKey=function(){var e=/[^.]+$/.exec(_coreJsData&&_coreJsData.keys&&_coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked,funcProto=Function.prototype,funcToString=funcProto.toString;function toSource(e){if(null!=e){try{return funcToString.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$2=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$1=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(e){return!(!isObject_1(e)||_isMasked(e))&&(isFunction_1(e)?reIsNative:reIsHostCtor).test(_toSource(e))}var _baseIsNative=baseIsNative;function getValue(e,t){return null==e?void 0:e[t]}var _getValue=getValue;function getNative(e,t){var r=_getValue(e,t);return _baseIsNative(r)?r:void 0}var _getNative=getNative,defineProperty=function(){try{var e=_getNative(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),_defineProperty=defineProperty;function baseAssignValue(e,t,r){"__proto__"==t&&_defineProperty?_defineProperty(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var _baseAssignValue=baseAssignValue;function createBaseFor(e){return function(t,r,a){for(var n=-1,o=Object(t),i=a(t),s=i.length;s--;){var c=i[e?s:++n];if(!1===r(o[c],c,o))break}return t}}var _createBaseFor=createBaseFor,baseFor=_createBaseFor(),_baseFor=baseFor;function baseTimes(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var _baseTimes=baseTimes;function isObjectLike(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike,argsTag="[object Arguments]";function baseIsArguments(e){return isObjectLike_1(e)&&_baseGetTag(e)==argsTag}var _baseIsArguments=baseIsArguments,objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty,propertyIsEnumerable=objectProto$3.propertyIsEnumerable,isArguments=_baseIsArguments(function(){return arguments}())?_baseIsArguments:function(e){return isObjectLike_1(e)&&hasOwnProperty$2.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")},isArguments_1=isArguments,isArray=Array.isArray,isArray_1=isArray;function stubFalse(){return!1}var stubFalse_1=stubFalse,isBuffer_1=createCommonjsModule((function(e,t){var r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,n=a&&a.exports===r?_root.Buffer:void 0,o=(n?n.isBuffer:void 0)||stubFalse_1;e.exports=o})),MAX_SAFE_INTEGER=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(e,t){var r=typeof e;return!!(t=null==t?MAX_SAFE_INTEGER:t)&&("number"==r||"symbol"!=r&&reIsUint.test(e))&&e>-1&&e%1==0&&e<t}var _isIndex=isIndex,MAX_SAFE_INTEGER$1=9007199254740991;function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER$1}var isLength_1=isLength,argsTag$1="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag$1="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};function baseIsTypedArray(e){return isObjectLike_1(e)&&isLength_1(e.length)&&!!typedArrayTags[_baseGetTag(e)]}typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var _baseIsTypedArray=baseIsTypedArray;function baseUnary(e){return function(t){return e(t)}}var _baseUnary=baseUnary,_nodeUtil=createCommonjsModule((function(e,t){var r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,n=a&&a.exports===r&&_freeGlobal.process,o=function(){try{var e=a&&a.require&&a.require("util").types;return e||n&&n.binding&&n.binding("util")}catch(e){}}();e.exports=o})),nodeIsTypedArray=_nodeUtil&&_nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?_baseUnary(nodeIsTypedArray):_baseIsTypedArray,isTypedArray_1=isTypedArray,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty;function arrayLikeKeys(e,t){var r=isArray_1(e),a=!r&&isArguments_1(e),n=!r&&!a&&isBuffer_1(e),o=!r&&!a&&!n&&isTypedArray_1(e),i=r||a||n||o,s=i?_baseTimes(e.length,String):[],c=s.length;for(var u in e)!t&&!hasOwnProperty$3.call(e,u)||i&&("length"==u||n&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||_isIndex(u,c))||s.push(u);return s}var _arrayLikeKeys=arrayLikeKeys,objectProto$5=Object.prototype;function isPrototype(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||objectProto$5)}var _isPrototype=isPrototype;function overArg(e,t){return function(r){return e(t(r))}}var _overArg=overArg,nativeKeys=_overArg(Object.keys,Object),_nativeKeys=nativeKeys,objectProto$6=Object.prototype,hasOwnProperty$4=objectProto$6.hasOwnProperty;function baseKeys(e){if(!_isPrototype(e))return _nativeKeys(e);var t=[];for(var r in Object(e))hasOwnProperty$4.call(e,r)&&"constructor"!=r&&t.push(r);return t}var _baseKeys=baseKeys;function isArrayLike(e){return null!=e&&isLength_1(e.length)&&!isFunction_1(e)}var isArrayLike_1=isArrayLike;function keys(e){return isArrayLike_1(e)?_arrayLikeKeys(e):_baseKeys(e)}var keys_1=keys;function baseForOwn(e,t){return e&&_baseFor(e,t,keys_1)}var _baseForOwn=baseForOwn;function listCacheClear(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear;function eq(e,t){return e===t||e!=e&&t!=t}var eq_1=eq;function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq_1(e[r][0],t))return r;return-1}var _assocIndexOf=assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=_assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}var _listCacheDelete=listCacheDelete;function listCacheGet(e){var t=this.__data__,r=_assocIndexOf(t,e);return r<0?void 0:t[r][1]}var _listCacheGet=listCacheGet;function listCacheHas(e){return _assocIndexOf(this.__data__,e)>-1}var _listCacheHas=listCacheHas;function listCacheSet(e,t){var r=this.__data__,a=_assocIndexOf(r,e);return a<0?(++this.size,r.push([e,t])):r[a][1]=t,this}var _listCacheSet=listCacheSet;function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}ListCache.prototype.clear=_listCacheClear,ListCache.prototype.delete=_listCacheDelete,ListCache.prototype.get=_listCacheGet,ListCache.prototype.has=_listCacheHas,ListCache.prototype.set=_listCacheSet;var _ListCache=ListCache;function stackClear(){this.__data__=new _ListCache,this.size=0}var _stackClear=stackClear;function stackDelete(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var _stackDelete=stackDelete;function stackGet(e){return this.__data__.get(e)}var _stackGet=stackGet;function stackHas(e){return this.__data__.has(e)}var _stackHas=stackHas,Map$1=_getNative(_root,"Map"),_Map=Map$1,nativeCreate=_getNative(Object,"create"),_nativeCreate=nativeCreate;function hashClear(){this.__data__=_nativeCreate?_nativeCreate(null):{},this.size=0}var _hashClear=hashClear;function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _hashDelete=hashDelete,HASH_UNDEFINED="__lodash_hash_undefined__",objectProto$7=Object.prototype,hasOwnProperty$5=objectProto$7.hasOwnProperty;function hashGet(e){var t=this.__data__;if(_nativeCreate){var r=t[e];return r===HASH_UNDEFINED?void 0:r}return hasOwnProperty$5.call(t,e)?t[e]:void 0}var _hashGet=hashGet,objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function hashHas(e){var t=this.__data__;return _nativeCreate?void 0!==t[e]:hasOwnProperty$6.call(t,e)}var _hashHas=hashHas,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_nativeCreate&&void 0===t?HASH_UNDEFINED$1:t,this}var _hashSet=hashSet;function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}Hash.prototype.clear=_hashClear,Hash.prototype.delete=_hashDelete,Hash.prototype.get=_hashGet,Hash.prototype.has=_hashHas,Hash.prototype.set=_hashSet;var _Hash=Hash;function mapCacheClear(){this.size=0,this.__data__={hash:new _Hash,map:new(_Map||_ListCache),string:new _Hash}}var _mapCacheClear=mapCacheClear;function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var _isKeyable=isKeyable;function getMapData(e,t){var r=e.__data__;return _isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}var _getMapData=getMapData;function mapCacheDelete(e){var t=_getMapData(this,e).delete(e);return this.size-=t?1:0,t}var _mapCacheDelete=mapCacheDelete;function mapCacheGet(e){return _getMapData(this,e).get(e)}var _mapCacheGet=mapCacheGet;function mapCacheHas(e){return _getMapData(this,e).has(e)}var _mapCacheHas=mapCacheHas;function mapCacheSet(e,t){var r=_getMapData(this,e),a=r.size;return r.set(e,t),this.size+=r.size==a?0:1,this}var _mapCacheSet=mapCacheSet;function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var a=e[t];this.set(a[0],a[1])}}MapCache.prototype.clear=_mapCacheClear,MapCache.prototype.delete=_mapCacheDelete,MapCache.prototype.get=_mapCacheGet,MapCache.prototype.has=_mapCacheHas,MapCache.prototype.set=_mapCacheSet;var _MapCache=MapCache,LARGE_ARRAY_SIZE=200;function stackSet(e,t){var r=this.__data__;if(r instanceof _ListCache){var a=r.__data__;if(!_Map||a.length<LARGE_ARRAY_SIZE-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new _MapCache(a)}return r.set(e,t),this.size=r.size,this}var _stackSet=stackSet;function Stack(e){var t=this.__data__=new _ListCache(e);this.size=t.size}Stack.prototype.clear=_stackClear,Stack.prototype.delete=_stackDelete,Stack.prototype.get=_stackGet,Stack.prototype.has=_stackHas,Stack.prototype.set=_stackSet;var _Stack=Stack,HASH_UNDEFINED$2="__lodash_hash_undefined__";function setCacheAdd(e){return this.__data__.set(e,HASH_UNDEFINED$2),this}var _setCacheAdd=setCacheAdd;function setCacheHas(e){return this.__data__.has(e)}var _setCacheHas=setCacheHas;function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new _MapCache;++t<r;)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=_setCacheAdd,SetCache.prototype.has=_setCacheHas;var _SetCache=SetCache;function arraySome(e,t){for(var r=-1,a=null==e?0:e.length;++r<a;)if(t(e[r],r,e))return!0;return!1}var _arraySome=arraySome;function cacheHas(e,t){return e.has(t)}var _cacheHas=cacheHas,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function equalArrays(e,t,r,a,n,o){var i=r&COMPARE_PARTIAL_FLAG,s=e.length,c=t.length;if(s!=c&&!(i&&c>s))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var l=-1,_=!0,d=r&COMPARE_UNORDERED_FLAG?new _SetCache:void 0;for(o.set(e,t),o.set(t,e);++l<s;){var f=e[l],p=t[l];if(a)var h=i?a(p,f,l,t,e,o):a(f,p,l,e,t,o);if(void 0!==h){if(h)continue;_=!1;break}if(d){if(!_arraySome(t,(function(e,t){if(!_cacheHas(d,t)&&(f===e||n(f,e,r,a,o)))return d.push(t)}))){_=!1;break}}else if(f!==p&&!n(f,p,r,a,o)){_=!1;break}}return o.delete(e),o.delete(t),_}var _equalArrays=equalArrays,Uint8Array$1=_root.Uint8Array,_Uint8Array=Uint8Array$1;function mapToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e,a){r[++t]=[a,e]})),r}var _mapToArray=mapToArray;function setToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var _setToArray=setToArray,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2,boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",mapTag$1="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",symbolProto=_Symbol?_Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(e,t,r,a,n,o,i){switch(r){case dataViewTag$1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case arrayBufferTag$1:return!(e.byteLength!=t.byteLength||!o(new _Uint8Array(e),new _Uint8Array(t)));case boolTag$1:case dateTag$1:case numberTag$1:return eq_1(+e,+t);case errorTag$1:return e.name==t.name&&e.message==t.message;case regexpTag$1:case stringTag$1:return e==t+"";case mapTag$1:var s=_mapToArray;case setTag$1:var c=a&COMPARE_PARTIAL_FLAG$1;if(s||(s=_setToArray),e.size!=t.size&&!c)return!1;var u=i.get(e);if(u)return u==t;a|=COMPARE_UNORDERED_FLAG$1,i.set(e,t);var l=_equalArrays(s(e),s(t),a,n,o,i);return i.delete(e),l;case symbolTag:if(symbolValueOf)return symbolValueOf.call(e)==symbolValueOf.call(t)}return!1}var _equalByTag=equalByTag;function arrayPush(e,t){for(var r=-1,a=t.length,n=e.length;++r<a;)e[n+r]=t[r];return e}var _arrayPush=arrayPush;function baseGetAllKeys(e,t,r){var a=t(e);return isArray_1(e)?a:_arrayPush(a,r(e))}var _baseGetAllKeys=baseGetAllKeys;function arrayFilter(e,t){for(var r=-1,a=null==e?0:e.length,n=0,o=[];++r<a;){var i=e[r];t(i,r,e)&&(o[n++]=i)}return o}var _arrayFilter=arrayFilter;function stubArray(){return[]}var stubArray_1=stubArray,objectProto$9=Object.prototype,propertyIsEnumerable$1=objectProto$9.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols?function(e){return null==e?[]:(e=Object(e),_arrayFilter(nativeGetSymbols(e),(function(t){return propertyIsEnumerable$1.call(e,t)})))}:stubArray_1,_getSymbols=getSymbols;function getAllKeys(e){return _baseGetAllKeys(e,keys_1,_getSymbols)}var _getAllKeys=getAllKeys,COMPARE_PARTIAL_FLAG$2=1,objectProto$a=Object.prototype,hasOwnProperty$7=objectProto$a.hasOwnProperty;function equalObjects(e,t,r,a,n,o){var i=r&COMPARE_PARTIAL_FLAG$2,s=_getAllKeys(e),c=s.length;if(c!=_getAllKeys(t).length&&!i)return!1;for(var u=c;u--;){var l=s[u];if(!(i?l in t:hasOwnProperty$7.call(t,l)))return!1}var _=o.get(e);if(_&&o.get(t))return _==t;var d=!0;o.set(e,t),o.set(t,e);for(var f=i;++u<c;){var p=e[l=s[u]],h=t[l];if(a)var g=i?a(h,p,l,t,e,o):a(p,h,l,e,t,o);if(!(void 0===g?p===h||n(p,h,r,a,o):g)){d=!1;break}f||(f="constructor"==l)}if(d&&!f){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(d=!1)}return o.delete(e),o.delete(t),d}var _equalObjects=equalObjects,DataView=_getNative(_root,"DataView"),_DataView=DataView,Promise$1=_getNative(_root,"Promise"),_Promise=Promise$1,Set=_getNative(_root,"Set"),_Set=Set,WeakMap=_getNative(_root,"WeakMap"),_WeakMap=WeakMap,mapTag$2="[object Map]",objectTag$1="[object Object]",promiseTag="[object Promise]",setTag$2="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$2="[object DataView]",dataViewCtorString=_toSource(_DataView),mapCtorString=_toSource(_Map),promiseCtorString=_toSource(_Promise),setCtorString=_toSource(_Set),weakMapCtorString=_toSource(_WeakMap),getTag=_baseGetTag;(_DataView&&getTag(new _DataView(new ArrayBuffer(1)))!=dataViewTag$2||_Map&&getTag(new _Map)!=mapTag$2||_Promise&&getTag(_Promise.resolve())!=promiseTag||_Set&&getTag(new _Set)!=setTag$2||_WeakMap&&getTag(new _WeakMap)!=weakMapTag$1)&&(getTag=function(e){var t=_baseGetTag(e),r=t==objectTag$1?e.constructor:void 0,a=r?_toSource(r):"";if(a)switch(a){case dataViewCtorString:return dataViewTag$2;case mapCtorString:return mapTag$2;case promiseCtorString:return promiseTag;case setCtorString:return setTag$2;case weakMapCtorString:return weakMapTag$1}return t});var _getTag=getTag,COMPARE_PARTIAL_FLAG$3=1,argsTag$2="[object Arguments]",arrayTag$1="[object Array]",objectTag$2="[object Object]",objectProto$b=Object.prototype,hasOwnProperty$8=objectProto$b.hasOwnProperty;function baseIsEqualDeep(e,t,r,a,n,o){var i=isArray_1(e),s=isArray_1(t),c=i?arrayTag$1:_getTag(e),u=s?arrayTag$1:_getTag(t),l=(c=c==argsTag$2?objectTag$2:c)==objectTag$2,_=(u=u==argsTag$2?objectTag$2:u)==objectTag$2,d=c==u;if(d&&isBuffer_1(e)){if(!isBuffer_1(t))return!1;i=!0,l=!1}if(d&&!l)return o||(o=new _Stack),i||isTypedArray_1(e)?_equalArrays(e,t,r,a,n,o):_equalByTag(e,t,c,r,a,n,o);if(!(r&COMPARE_PARTIAL_FLAG$3)){var f=l&&hasOwnProperty$8.call(e,"__wrapped__"),p=_&&hasOwnProperty$8.call(t,"__wrapped__");if(f||p){var h=f?e.value():e,g=p?t.value():t;return o||(o=new _Stack),n(h,g,r,a,o)}}return!!d&&(o||(o=new _Stack),_equalObjects(e,t,r,a,n,o))}var _baseIsEqualDeep=baseIsEqualDeep;function baseIsEqual(e,t,r,a,n){return e===t||(null==e||null==t||!isObjectLike_1(e)&&!isObjectLike_1(t)?e!=e&&t!=t:_baseIsEqualDeep(e,t,r,a,baseIsEqual,n))}var _baseIsEqual=baseIsEqual,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2;function baseIsMatch(e,t,r,a){var n=r.length,o=n,i=!a;if(null==e)return!o;for(e=Object(e);n--;){var s=r[n];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++n<o;){var c=(s=r[n])[0],u=e[c],l=s[1];if(i&&s[2]){if(void 0===u&&!(c in e))return!1}else{var _=new _Stack;if(a)var d=a(u,l,c,e,t,_);if(!(void 0===d?_baseIsEqual(l,u,COMPARE_PARTIAL_FLAG$4|COMPARE_UNORDERED_FLAG$2,a,_):d))return!1}}return!0}var _baseIsMatch=baseIsMatch;function isStrictComparable(e){return e==e&&!isObject_1(e)}var _isStrictComparable=isStrictComparable;function getMatchData(e){for(var t=keys_1(e),r=t.length;r--;){var a=t[r],n=e[a];t[r]=[a,n,_isStrictComparable(n)]}return t}var _getMatchData=getMatchData;function matchesStrictComparable(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}var _matchesStrictComparable=matchesStrictComparable;function baseMatches(e){var t=_getMatchData(e);return 1==t.length&&t[0][2]?_matchesStrictComparable(t[0][0],t[0][1]):function(r){return r===e||_baseIsMatch(r,e,t)}}var _baseMatches=baseMatches,symbolTag$1="[object Symbol]";function isSymbol(e){return"symbol"==typeof e||isObjectLike_1(e)&&_baseGetTag(e)==symbolTag$1}var isSymbol_1=isSymbol,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(e,t){if(isArray_1(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!isSymbol_1(e))||(reIsPlainProp.test(e)||!reIsDeepProp.test(e)||null!=t&&e in Object(t))}var _isKey=isKey,FUNC_ERROR_TEXT="Expected a function";function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT);var r=function(){var a=arguments,n=t?t.apply(this,a):a[0],o=r.cache;if(o.has(n))return o.get(n);var i=e.apply(this,a);return r.cache=o.set(n,i)||o,i};return r.cache=new(memoize.Cache||_MapCache),r}memoize.Cache=_MapCache;var memoize_1=memoize,MAX_MEMOIZE_SIZE=500;function memoizeCapped(e){var t=memoize_1(e,(function(e){return r.size===MAX_MEMOIZE_SIZE&&r.clear(),e})),r=t.cache;return t}var _memoizeCapped=memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=_memoizeCapped((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rePropName,(function(e,r,a,n){t.push(a?n.replace(reEscapeChar,"$1"):r||e)})),t})),_stringToPath=stringToPath;function arrayMap(e,t){for(var r=-1,a=null==e?0:e.length,n=Array(a);++r<a;)n[r]=t(e[r],r,e);return n}var _arrayMap=arrayMap,INFINITY=1/0,symbolProto$1=_Symbol?_Symbol.prototype:void 0,symbolToString=symbolProto$1?symbolProto$1.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(isArray_1(e))return _arrayMap(e,baseToString)+"";if(isSymbol_1(e))return symbolToString?symbolToString.call(e):"";var t=e+"";return"0"==t&&1/e==-INFINITY?"-0":t}var _baseToString=baseToString;function toString(e){return null==e?"":_baseToString(e)}var toString_1=toString;function castPath(e,t){return isArray_1(e)?e:_isKey(e,t)?[e]:_stringToPath(toString_1(e))}var _castPath=castPath,INFINITY$1=1/0;function toKey(e){if("string"==typeof e||isSymbol_1(e))return e;var t=e+"";return"0"==t&&1/e==-INFINITY$1?"-0":t}var _toKey=toKey;function baseGet(e,t){for(var r=0,a=(t=_castPath(t,e)).length;null!=e&&r<a;)e=e[_toKey(t[r++])];return r&&r==a?e:void 0}var _baseGet=baseGet;function get(e,t,r){var a=null==e?void 0:_baseGet(e,t);return void 0===a?r:a}var get_1=get;function baseHasIn(e,t){return null!=e&&t in Object(e)}var _baseHasIn=baseHasIn;function hasPath(e,t,r){for(var a=-1,n=(t=_castPath(t,e)).length,o=!1;++a<n;){var i=_toKey(t[a]);if(!(o=null!=e&&r(e,i)))break;e=e[i]}return o||++a!=n?o:!!(n=null==e?0:e.length)&&isLength_1(n)&&_isIndex(i,n)&&(isArray_1(e)||isArguments_1(e))}var _hasPath=hasPath;function hasIn(e,t){return null!=e&&_hasPath(e,t,_baseHasIn)}var hasIn_1=hasIn,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function baseMatchesProperty(e,t){return _isKey(e)&&_isStrictComparable(t)?_matchesStrictComparable(_toKey(e),t):function(r){var a=get_1(r,e);return void 0===a&&a===t?hasIn_1(r,e):_baseIsEqual(t,a,COMPARE_PARTIAL_FLAG$5|COMPARE_UNORDERED_FLAG$3)}}var _baseMatchesProperty=baseMatchesProperty;function identity(e){return e}var identity_1=identity;function baseProperty(e){return function(t){return null==t?void 0:t[e]}}var _baseProperty=baseProperty;function basePropertyDeep(e){return function(t){return _baseGet(t,e)}}var _basePropertyDeep=basePropertyDeep;function property(e){return _isKey(e)?_baseProperty(_toKey(e)):_basePropertyDeep(e)}var property_1=property;function baseIteratee(e){return"function"==typeof e?e:null==e?identity_1:"object"==typeof e?isArray_1(e)?_baseMatchesProperty(e[0],e[1]):_baseMatches(e):property_1(e)}var _baseIteratee=baseIteratee;function mapValues(e,t){var r={};return t=_baseIteratee(t),_baseForOwn(e,(function(e,a,n){_baseAssignValue(r,a,t(e,a,n))})),r}var mapValues_1=mapValues,isUnitlessNumber={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};function prefixKey(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var prefixes=["Webkit","ms","Moz","O"];Object.keys(isUnitlessNumber).forEach((function(e){prefixes.forEach((function(t){isUnitlessNumber[prefixKey(t,e)]=isUnitlessNumber[e]}))}));var shorthandPropertyExpansions={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},CSSProperty={isUnitlessNumber:isUnitlessNumber,shorthandPropertyExpansions:shorthandPropertyExpansions},CSSProperty_1=CSSProperty;function isNumber(e){return"number"==typeof e}var normalizeCss=function(e){var t=e.css,r={};return Object.entries(t).forEach((function(e){var t=e[0],a=e[1];if(isNumber(a))return CSSProperty_1.isUnitlessNumber[t]?void(r[t]=""+a):void(r[t]=a+"px");r[t]=a})),__assign(__assign({},e),{css:__assign(__assign({},r),{boxSizing:"border-box"})})},typographyNode=function(e){var t=get_1(e,"data.custom.variant","P");return __assign(__assign({},e),{type:t})},normalizeFlexBasis=function(e){var t=e.css.flexBasis;return"0"===t||"0px"===t?__assign(__assign({},e),{css:__assign(__assign({},e.css),{flexBasis:"0%"})}):e},adaptCustomNodes=function(e){return mapValues_1(e,(function(e){var t=e;return"Typography"===t.type&&(t=typographyNode(t)),t.css&&isObject_1(t.css)&&t.css.flexBasis&&(t=normalizeFlexBasis(t)),t.css&&(t=normalizeCss(t)),t}))};const API_BASE_URL="https://api.candu.ai",CDN_BASE_URL="https://cdn.candu.ai";var N,I,R,D,w,M,API_BASE_URL$1=API_BASE_URL,CDN_BASE_URL$1=CDN_BASE_URL,ENDPOINTS={checkListItems:"/api/checklistItems",segmentMembership:"/api/segmentMemberships",segmentsDefinition:"/api/segmentsDefinition",tutorialMetadata:"/api/tutorialMetadata",tutorialDocuments:"/api/tutorialDocumentsSdk",tutorialProdSocket:"wss://2jcfb7pjlf.execute-api.eu-west-1.amazonaws.com/prod"},prefetch=function(e){if(!document.querySelectorAll('[href="'+e+'"]').length){var t=document.createElement("link");t.setAttribute("rel","prefetch"),t.setAttribute("href",e),document.head.appendChild(t)}},fetchHead=function(e,t){e&&isArray_1(e)&&e.map((function(e){var r=e.nodeType,a=e.url;return prefetch("EmbedTutorial"===r?CDN_BASE_URL$1+"/tutorials/"+t+"/"+a+".json":"EmbedPortal"===r?CDN_BASE_URL$1+"/portals/"+t+"/"+a+"/head.json":a)}))},TutorialDependencies=function(){function e(e){this.adjacencyList={},this.rootDocument=e,this.adjacencyList[e]=[]}return e.prototype.get=function(e){return this.adjacencyList[e]},e.prototype.add=function(e,t){var r=this;if(this.adjacencyList[e]||(this.adjacencyList[e]=[]),!this.adjacencyList[t])return this.adjacencyList[e].push(t),this.adjacencyList[t]=[],!0;if(this.adjacencyList[e].includes(t))return!0;var a=function(t){if(t===e)return!0;for(var n=0,o=r.adjacencyList[t];n<o.length;n++){var i=o[n];if(a(i))return!0}return!1};return!a(t)&&(this.adjacencyList[e].push(t),!0)},e}(),createTutorialDocumentContext=function(e,t){return{id:e,dependencies:t?t.dependencies:new TutorialDependencies(e)}},checkCyclicAndAdd=function(e,t){return e.dependencies.add(e.id,t)},n="Everyone",e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t="object"==typeof e&&e&&e.Object===Object&&e,r="object"==typeof self&&self&&self.Object===Object&&self,o=(t||r||Function("return this")()).Symbol,i=Object.prototype,u=i.hasOwnProperty,a=i.toString,c=o?o.toStringTag:void 0,l=function(e){var t=u.call(e,c),r=e[c];try{e[c]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[c]=r:delete e[c]),o},E=Object.prototype.toString,s=function(e){return E.call(e)},f="[object Null]",d="[object Undefined]",v=o?o.toStringTag:void 0,p=function(e){return null==e?void 0===e?d:f:v&&v in Object(e)?l(e):s(e)},T=Array.isArray,O=function(e){return null!=e&&"object"==typeof e},A="[object String]",g=function(e){return"string"==typeof e||!T(e)&&O(e)&&p(e)==A},m="[object Number]",S=function(e){return"number"==typeof e||O(e)&&p(e)==m},P=/^([a-zA-Z0-9]|_|-)+$/,_=function(e){return g(e)&&e.length>=3&&e.length<100&&P.test(e)},b=function(e){return S(e)&&e>=0},y=function(e){return g(e)&&!!e.match(/^[0-9a-zA-Z]*$/)&&e.length>=10},C=function(e){return b(e)||g(e)&&e.trim().length>0};!function(e){e.SDK="SDK",e.PREVIEW="PREVIEW"}(N||(N={})),function(e){e.BOOTSTRAP="Bootstrap",e.CHANGE_POSITION="ChangePosition",e.CLOSE_PREVIEW="ClosePreview",e.PREVIEW_LOADED="PreviewLoaded",e.SET_AVALIABLE_PORTALS="SetAvaliablePortals",e.SET_CONTENT="SetContent",e.SET_SELECTED_ELEMENT="SetSelectedElement",e.SET_VIEW_MODE="SetViewMode",e.ADD_ELEMENT="AddElement",e.REMOVE_ELEMENT="RemoveElement",e.UPDATE_ELEMENT="UpdateElement",e.SET_ELEMENT="SetElement"}(I||(I={})),(R||(R={})).ON_CLICK="OnClick",function(e){e.NATIVE="Native",e.PENDO="Pendo"}(D||(D={})),function(e){e.NAVIGATE="Navigate",e.CHANGE_TUTORIAL="ChangeTutorial",e.OPEN_GUIDE="OpenGuide"}(w||(w={})),function(e){e.PRIMARY="primary",e.SECONDARY="primary",e.WARNING="warning",e.DANGER="danger",e.NEUTRAL="neutral",e.ACTIVE="active",e.INFO="info"}(M||(M={}));var U,k=M.PRIMARY;!function(e){e.U="U",e.B="B",e.Em="Em",e.InlineCode="InlineCode"}(U||(U={}));var B,F,X,nn,en,rn,on,z=function(e){return g(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},H=function(e){return b(e)},K=function(e){return _(e)};!function(e){e.NotStared="NotStarted",e.InProgress="InProgress",e.Done="Done"}(B||(B={})),function(e){e.COLLAPSED="Collapsed",e.EXPANDED="Expanded",e.MINIMIZED="Minimized"}(F||(F={})),function(e){e.TUTORIAL="Tutorial",e.PORTAL="Portal"}(X||(X={})),function(e){e.Global="Global",e.Organization="Organization"}(nn||(nn={})),function(e){e.Root="root",e.Rule="rule",e.Atrule="atrule",e.Decl="decl",e.Any="any"}(en||(en={})),function(e){e.Global="Global",e.Carried="Carried"}(rn||(rn={})),function(e){e.CanduCdn="CanduCdn",e.CheckListApi="CheckListApi"}(on||(on={}));for(var _a,createLookup=function(e){return e.reduce((function(e,t){var r;return __assign(__assign({},e),((r={})[t]=t,r))}),{})},findMatchingSegment=function(e,t){var r=createLookup(t);return e.content.find((function(e){var t=e.segmentId;return!!r[t]||t===n}))},eventPrefix=function(e){return"candu.sdk."+e},errorPrefix=function(e){return eventPrefix("error."+e)},ERROR_SLUGS={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",PROVIDER_ERROR:"provider_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},EVENT_NAMES={HEARTBEAT:eventPrefix("heartbeat"),PREVIEW_OPEN:eventPrefix("preview.open"),PORTAL:eventPrefix("portal"),TUTORIAL:eventPrefix("tutorial"),TUTORIAL_INTERACTION:eventPrefix("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:errorPrefix("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:errorPrefix("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:errorPrefix("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:errorPrefix("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:errorPrefix("commit_api"),TUTORIAL_LOADING_ERROR:errorPrefix("tutorial"),UNKOWN_NODE_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:errorPrefix(ERROR_SLUGS.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),PORTAL_ERROR:errorPrefix(ERROR_SLUGS.PORTAL_ERROR),PROVIDER_ERROR:errorPrefix(ERROR_SLUGS.PROVIDER_ERROR),STYLEGUIDE_MAP_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),RENDER_NODE_ERROR:errorPrefix(ERROR_SLUGS.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:errorPrefix("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:errorPrefix("circular_dependecy_embed_tutorial"),STATE_FETCH_FAILED:errorPrefix("state_fetch_failed"),STATE_UPDATE_FAILED:errorPrefix("state_update_failed")},PORTAL_ASSET_NOT_FOUND="Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",unknownMessage=function(e){return"An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: "+e+"."},EVENTING_NOT_INITIALIZED="You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n",PORTAL_NO_SEGMENT_IDS="You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",NO_MATCHING_TUTORIALS="The Tutorial will not be rendered because there are no matching segments for the given user.",ERROR_MESSAGES=((_a={EVENTING_NOT_INITIALIZED:EVENTING_NOT_INITIALIZED})[EVENT_NAMES.PORTAL_ASSET_NOT_FOUND]=PORTAL_ASSET_NOT_FOUND,_a[EVENT_NAMES.PORTAL_NO_SEGMENT_IDS]=PORTAL_NO_SEGMENT_IDS,_a[EVENT_NAMES.NO_MATCHING_TUTORIALS]=NO_MATCHING_TUTORIALS,_a[EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER]="(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",_a[EVENT_NAMES.TUTORIAL_LOADING_ERROR]="An error has occurred while trying to load the Tutorial",_a[EVENT_NAMES.UNKOWN_INLINE_NODE_TYPE]=unknownMessage(ERROR_SLUGS.UNKOWN_INLINE_NODE_TYPE),_a[EVENT_NAMES.UNKOWN_NODE_TYPE]=unknownMessage(ERROR_SLUGS.UNKOWN_NODE_TYPE),_a[EVENT_NAMES.CIRCULAR_DEPENDENCY_EMBED_PORTAL]="Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",_a[EVENT_NAMES.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]="Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",_a[EVENT_NAMES.PORTAL_ERROR]="An error has occured within Portal",_a[EVENT_NAMES.PROVIDER_ERROR]="An error has occured within Provider",_a[EVENT_NAMES.TUTORIAL_ERROR]="An error has occured within Tutorial",_a[EVENT_NAMES.RENDER_NODE_ERROR]="An error has occured while rendering tutorial node",_a[EVENT_NAMES.STYLEGUIDE_MAP_ERROR]="An error has occured while mapping node to styleguide",_a[EVENT_NAMES.STATE_FETCH_FAILED]="An error has occured while fetching state:",_a[EVENT_NAMES.STATE_UPDATE_FAILED]="An error has occured while updating state:",_a),defaultStyleguide={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},trackStyleguideProperties=function(e){var t={};return Object.keys(e).forEach((function(r){defaultStyleguide[r]&&(t["styleguide."+r]=e[r].displayName||!0)})),t},LOGGER={error:console.error,warning:console.warn},internalEventing=function(e){var t=e.identify,r=e.track;return{provider:function(e){var a=e.userId,n=e.traits,o=e.styleguide;t(a,n),r(EVENT_NAMES.HEARTBEAT,trackStyleguideProperties(o))},tutorialDocumentLoadingError:function(e){var t=e.tutorialId,a=e.slug,n=e.contentHashId;LOGGER.error(ERROR_MESSAGES[EVENT_NAMES.TUTORIAL_LOADING_ERROR]),r(EVENT_NAMES.TUTORIAL_LOADING_ERROR,{tutorialId:t,slug:a,contentHashId:n})}}},e$1=function(e,t){return function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var r=new Uint8Array(16);e.exports=function(){return t(r),r}}else{var a=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),a[t]=e>>>((3&t)<<3)&255;return a}}}(t={exports:{}}),t.exports}(),n$1=[],t$1=0;t$1<256;++t$1)n$1[t$1]=(t$1+256).toString(16).substr(1);var a$1,i$1,r$1=function(e,t){var r=t||0,a=n$1;return[a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]]].join("")},o$1=function(e,t,r){var a=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var n=(e=e||{}).random||(e.rng||e$1)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t)for(var o=0;o<16;++o)t[a+o]=n[o];return t||r$1(n)};!function(e){e.UserGenerated="UserGenerated",e.SDK="SDK"}(a$1||(a$1={})),function(e){e.Identify="Identify",e.Group="Group",e.Track="Track",e.Page="Page",e.Screen="Screen"}(i$1||(i$1={}));var u$1,c$1,d$1=function(){return"undefined"!=typeof window&&window.localStorage},p$1=function(e){return function(t){d$1()&&null!=t&&window.localStorage.setItem(e,JSON.stringify(t))}},l$1={anonymousId:{getOrCreate:(u$1="candu:anonymous_id",c$1=function(){var e=o$1();return p$1("candu:anonymous_id")(e),e},function(){return function(e){return function(){if(d$1()){var t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return null}}}}(u$1)()||c$1()}),set:p$1("candu:anonymous_id")}},h=l$1.anonymousId.getOrCreate,invariant=function(e,t,r,a,n,o,i,s){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,a,n,o,i,s],l=0;(c=new Error(t.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}},browser=invariant,isValidStyleguideProps=function(e){return browser(!e||isObject_1(e),"(Candu) styleguide must be undefined or an object")},providerValidation=function(e){var t=e.clientToken,r=e.userId,a=e.traits,n=e.options,o=e.styleguide,i=__rest(e,["clientToken","userId","traits","options","styleguide"]);return browser(y(t),"(Candu) you must provide a valid clientToken"),browser(!r||C(r),"(Candu) you must provide a valid userId"),isValidStyleguideProps(o),browser(!a||isObject_1(a),"(Candu) traits must be undefined or an object"),browser(!n||isObject_1(n),"(Candu) options must be undefined or an object"),__assign(__assign({},i),{clientToken:t,traits:a||{},options:n||{},styleguide:o||{},userId:r||h()})},tutorialValidation=function(e){var t=e.slug,r=e.styleguide,a=e.contentHashId,n=e.tutorialId,o=e.tutorialDocument,i=e.renderedByClient,s=__rest(e,["slug","styleguide","contentHashId","tutorialId","tutorialDocument","renderedByClient"]);return isValidStyleguideProps(r),__assign(__assign({},s),{slug:t,styleguide:r||{},contentHashId:a,tutorialId:n,tutorialDocument:o,renderedByClient:i})},portalValidation=function(e){var t=e.slug,r=e.styleguide;return isValidStyleguideProps(r),{slug:t,styleguide:r||{}}},fetchURL=function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,fetch(e)];case 1:return[2,t.sent().json()]}}))}))},fetchFromApi=function(e){return fetchURL(""+API_BASE_URL$1+e)},fetchFromCdn=function(e){return fetchURL(""+CDN_BASE_URL$1+e)},getTutorialDocument=function(e){return{byId:function(t){return fetchFromApi(ENDPOINTS.tutorialDocuments+"?token="+e+"&finder=latestPublished&tutorialId="+t)},bySlug:function(t){return fetchFromCdn("/tutorials/"+e+"/"+t+".json")},byContentHash:function(t){return fetchFromCdn("/tutorials/"+e+"/"+t+".json")}}},RESOURCES={tutorialDocumentLatestSaved:function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,fetchFromApi(ENDPOINTS.tutorialDocuments+"/"+t+"?token="+e)]}))}))},portalAsset:function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,fetchFromCdn("/portals/"+e+"/"+t+"/head.json")]}))}))},segmentMembership:function(e,t){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(r){return[2,fetchFromApi(ENDPOINTS.segmentMembership+"/"+t+"?token="+e)]}))}))},segmentDefinition:function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){return[2,fetchFromApi(ENDPOINTS.segmentsDefinition+"?token="+e)]}))}))},tutorialMetadata:function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){return[2,fetchFromApi(ENDPOINTS.tutorialMetadata+"?token="+e)]}))}))},tutorialSocket:function(e,t,r){var a=ENDPOINTS.tutorialProdSocket+"?clientToken="+e+"&tutorialId="+t,n=new WebSocket(a);return n.onmessage=function(e){var t=JSON.parse(e.data);r(t)},function(){return n.close()}},tutorialDocument:function(e,t,r){var a=e.contentHashId,n=e.tutorialId,o=e.tutorialDocument,i=e.slug,s=getTutorialDocument(t);return K(i)?s.bySlug(i):H(n)?s.byId(n):z(a)?s.byContentHash(a):isObject_1(o)?Promise.resolve(o):(LOGGER.error(ERROR_MESSAGES[EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(EVENT_NAMES.NO_VALID_TUTORIAL_IDENTIFIER,{slug:e.slug}),null)}},logError=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.error.apply(console,e)},logWarning=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return console.warn.apply(console,e)},logger={error:logError,warning:logWarning},includeHTMLWhitespaces=function(e){return e.replace(/\s/g," ")},stripHTML=function(e){return DOMParser?(new DOMParser).parseFromString(e,"text/html").body.textContent||"":e},Observer=function(){function e(){this.subscribers=[]}return e.prototype.subscribe=function(e){var t=this;return this.subscribers.push(e),function(){t.subscribers[t.subscribers.indexOf(e)]=function(){}}},e.prototype.notify=function(e){this.subscribers.forEach((function(t){return t(e)}))},e.prototype.clear=function(){this.subscribers=[]},e}(),PreviewContainer=function(){function e(){this.onClientUpdateObserver=new Observer}return e.prototype.attachClient=function(e){this.client=e,this.onClientUpdateObserver.notify({client:e})},e.prototype.detachClient=function(){this.client&&(this.client=null,this.onClientUpdateObserver.notify({client:null}))},e.prototype.onClientUpdate=function(e){var t=this.onClientUpdateObserver.subscribe(e);return this.client&&e({client:this.client}),t},e}();function createSingleton(e){var t,r,a=function(e){return function(){for(var t,a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];if(r.api)return(t=r.api)[e].apply(t,a);console.warn("Please initialize the SDK by calling Candu.init() before attempting to call "+e)}};return(t=function(){function t(){}return t.init=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return this.api||(t.api=new(e.bind.apply(e,__spreadArrays([void 0],r)))),t.subscriberCallbacks.forEach((function(e){return e()})),t.subscriberCallbacks=[],window.postMessage({source:"CANDU_SINGLETON",payload:{type:"INIT"}},window&&window.origin?window.origin:"*"),t},t.onProviderReady=function(e){if(t.api)return e();t.subscriberCallbacks.push(e)},t}()).subscriberCallbacks=[],t.renderTutorial=a("renderTutorial"),t.renderPortal=a("renderPortal"),t.attachClient=a("attachClient"),t.detachClient=a("detachClient"),t.getProvider=a("getProvider"),r=t,window.Candu=r,r}var SingletonAPI=function(){function e(e){this.init(e)}return e.prototype.attachClient=function(e){return this.provider.preview.attachClient(e)},e.prototype.detachClient=function(){return this.provider.preview.detachClient()},Object.defineProperty(e.prototype,"provider",{get:function(){return this.getProvider()},enumerable:!0,configurable:!0}),e}(),getEventHandler=function(e){switch(e.trigger){case R.ON_CLICK:default:return"onClick"}},getActionHandler=function(e,t){var r,a,n;switch(e.handler.type){case w.NAVIGATE:return(r={})[getEventHandler(e)]=function(){var r=e.handler,a=r.href,n=r.target;t(e),"Blank"===n?window.open(a,"_blank"):a&&a.includes("mailto:")?window.location=a:document.location.href=a},r;case w.CHANGE_TUTORIAL:return(a={})[getEventHandler(e)]=function(){var t=e.handler.tutorialId;logError("TODO -> change tutorial",t)},a;case w.OPEN_GUIDE:return(n={})[getEventHandler(e)]=function(){var t=e.handler.guideId;logError("TODO -> open guide",t)},n;default:return{}}},getActionHandlers=function(e,t){var r=e.data;if(!r||!r.actions)return{};var a=function(e){t.provider.eventing.track(EVENT_NAMES.TUTORIAL_INTERACTION,__assign(__assign({},e),t.trackingIdentifiers||{}))};return r.actions.map((function(e){return getActionHandler(e,a)})).reduce((function(e,t){return __assign(__assign({},e),t)}),{})},getChildren=function(e,t){var r=e.props||{},a=e.nodes,n=r.children;return n||(a?a.map(t):null)},mapNodeToStyleguide=function(e,t){try{var r=t.provider,a=t.document,n=t.trackingIdentifiers,o=a.nodes[e];if(!o)return logger.error("Document is corrupted. Refusing to move further."),null;var i=function(e){return mapNodeToStyleguide(e,t)},s=o.type,c=o.props,u=o.css,l=o.states,_=__assign(__assign(__assign({},c||{}),{style:u||{},children:getChildren(o,i)}),getActionHandlers(o,{trackingIdentifiers:n,provider:r})),d={nodeId:e,node:o,document:a,render:{node:i,styleguide:function(e,r){return void 0===r&&(r={}),t.renderNode(e,{api:d,attributes:r})},tutorial:function(e){return t.renderTutorial(e)},portal:function(e){return t.renderPortal(e)}},trackingIdentifiers:n,stateInstances:l&&t.stateProviderInstances.filter((function(e){return!!l[e.providerId]}))},f=d.render.styleguide(s,_);return f||(logger.error(ERROR_MESSAGES[EVENT_NAMES.UNKOWN_NODE_TYPE],{type:s}),r.eventing.track(EVENT_NAMES.UNKOWN_NODE_TYPE,{type:s}),null)}catch(e){return logger.error(ERROR_MESSAGES[EVENT_NAMES.STYLEGUIDE_MAP_ERROR],e),null}},mergeStyleguidesFromContext=memoize_1((function(e,t){var r,a,n=e.provider,o=e.portal,i=e.tutorial,s=n.styleguide;return i&&(a=i.styleguide),o&&(r=o.styleguide),__assign(__assign(__assign(__assign({},s||{}),r||{}),a||{}),t||{})})),DEFAULT_ALT="",DEFAULT_ALERT_COLOR="#EDEDED",DEFAULT_TAB_HEADER_COLOR="#333745",DEFAULT_TAB_ITEM_COLOR="#838792",DEFAULT_TAB_ACTIVE_COLOR="#FEFEFE",DEFAULT_TAB_COLOR="#FEFEFE",STYLEGUIDE_COLORS={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},getStylesheetId=function(e){return"candu-styleguide-"+e},attachStylesheet=function(e){var t=getStylesheetId(e);if(!document.getElementById(t)){var r=document.createElement("link");r.setAttribute("id",t),r.setAttribute("rel","stylesheet"),r.setAttribute("href",CDN_BASE_URL$1+"/styleguides/applications/"+e+"/default/main.css"),document.head.appendChild(r)}},detachStylesheet=function(e){var t=document.getElementById(getStylesheetId(e));t&&t.remove()};function createBaseEach(e,t){return function(r,a){if(null==r)return r;if(!isArrayLike_1(r))return e(r,a);for(var n=r.length,o=t?n:-1,i=Object(r);(t?o--:++o<n)&&!1!==a(i[o],o,i););return r}}var _createBaseEach=createBaseEach,baseEach=_createBaseEach(_baseForOwn),_baseEach=baseEach;function baseMap(e,t){var r=-1,a=isArrayLike_1(e)?Array(e.length):[];return _baseEach(e,(function(e,n,o){a[++r]=t(e,n,o)})),a}var _baseMap=baseMap;function map(e,t){return(isArray_1(e)?_arrayMap:_baseMap)(e,_baseIteratee(t))}var resolvedPromise,map_1=map,DataLoader=function(){function e(e,t){if("function"!=typeof e)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: "+e+".");this._batchLoadFn=e,this._maxBatchSize=getValidMaxBatchSize(t),this._batchScheduleFn=getValidBatchScheduleFn(t),this._cacheKeyFn=getValidCacheKeyFn(t),this._cacheMap=getValidCacheMap(t),this._batch=null}var t=e.prototype;return t.load=function(e){if(null==e)throw new TypeError("The loader.load() function must be called with a value,but got: "+String(e)+".");var t=getCurrentBatch(this),r=this._cacheMap,a=this._cacheKeyFn(e);if(r){var n=r.get(a);if(n){var o=t.cacheHits||(t.cacheHits=[]);return new Promise((function(e){o.push((function(){return e(n)}))}))}}t.keys.push(e);var i=new Promise((function(e,r){t.callbacks.push({resolve:e,reject:r})}));return r&&r.set(a,i),i},t.loadMany=function(e){if(!isArrayLike$1(e))throw new TypeError("The loader.loadMany() function must be called with Array<key> but got: "+e+".");for(var t=[],r=0;r<e.length;r++)t.push(this.load(e[r]).catch((function(e){return e})));return Promise.all(t)},t.clear=function(e){var t=this._cacheMap;if(t){var r=this._cacheKeyFn(e);t.delete(r)}return this},t.clearAll=function(){var e=this._cacheMap;return e&&e.clear(),this},t.prime=function(e,t){var r=this._cacheMap;if(r){var a,n=this._cacheKeyFn(e);if(void 0===r.get(n))t instanceof Error?(a=Promise.reject(t)).catch((function(){})):a=Promise.resolve(t),r.set(n,a)}return this},e}(),enqueuePostPromiseJob="object"==typeof process&&"function"==typeof process.nextTick?function(e){resolvedPromise||(resolvedPromise=Promise.resolve()),resolvedPromise.then((function(){return process.nextTick(e)}))}:setImmediate||setTimeout;function getCurrentBatch(e){var t=e._batch;if(null!==t&&!t.hasDispatched&&t.keys.length<e._maxBatchSize&&(!t.cacheHits||t.cacheHits.length<e._maxBatchSize))return t;var r={hasDispatched:!1,keys:[],callbacks:[]};return e._batch=r,e._batchScheduleFn((function(){return dispatchBatch(e,r)})),r}function dispatchBatch(e,t){if(t.hasDispatched=!0,0!==t.keys.length){var r=e._batchLoadFn(t.keys);if(!r||"function"!=typeof r.then)return failedDispatch(e,t,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise: "+String(r)+"."));r.then((function(e){if(!isArrayLike$1(e))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array: "+String(e)+".");if(e.length!==t.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys.\n\nKeys:\n"+String(t.keys)+"\n\nValues:\n"+String(e));resolveCacheHits(t);for(var r=0;r<t.callbacks.length;r++){var a=e[r];a instanceof Error?t.callbacks[r].reject(a):t.callbacks[r].resolve(a)}})).catch((function(r){return failedDispatch(e,t,r)}))}else resolveCacheHits(t)}function failedDispatch(e,t,r){resolveCacheHits(t);for(var a=0;a<t.keys.length;a++)e.clear(t.keys[a]),t.callbacks[a].reject(r)}function resolveCacheHits(e){if(e.cacheHits)for(var t=0;t<e.cacheHits.length;t++)e.cacheHits[t]()}function getValidMaxBatchSize(e){if(!(!e||!1!==e.batch))return 1;var t=e&&e.maxBatchSize;if(void 0===t)return 1/0;if("number"!=typeof t||t<1)throw new TypeError("maxBatchSize must be a positive number: "+t);return t}function getValidBatchScheduleFn(e){var t=e&&e.batchScheduleFn;if(void 0===t)return enqueuePostPromiseJob;if("function"!=typeof t)throw new TypeError("batchScheduleFn must be a function: "+t);return t}function getValidCacheKeyFn(e){var t=e&&e.cacheKeyFn;if(void 0===t)return function(e){return e};if("function"!=typeof t)throw new TypeError("cacheKeyFn must be a function: "+t);return t}function getValidCacheMap(e){if(!(!e||!1!==e.cache))return null;var t=e&&e.cacheMap;if(void 0===t)return new Map;if(null!==t){var r=["get","set","delete","clear"].filter((function(e){return t&&"function"!=typeof t[e]}));if(0!==r.length)throw new TypeError("Custom cacheMap missing methods: "+r.join(", "))}return t}function isArrayLike$1(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&(0===e.length||e.length>0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}var dataloader=DataLoader,CHECKLIST_API=API_BASE_URL$1+ENDPOINTS.checkListItems;function adaptResponse(e){return{state:e.state,id:e.id}}var getCheckListItems=function(e,t,r){return fetch(CHECKLIST_API+"?token="+e+"&userId="+t+"&finder=byIds&ids="+r.join(",")).then((function(e){return e.json()})).then((function(e){return e.map(adaptResponse)}))},updateCheckListItem=function(e,t,r,a){return fetch(CHECKLIST_API+"/"+r+"?token="+e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(__assign(__assign({},a),{userId:t.toString()}))}).then((function(e){return e.json()})).then(adaptResponse)},checkListDataLoaders={};function getCheckListDataLoader(e,t){var r=this,a=e+"-"+t,n=checkListDataLoaders[a];if(!n){n=new dataloader((function(a){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return[4,getCheckListItems(e,t,a)];case 1:return r=n.sent(),[2,a.map((function(e){return r.find((function(t){return t.id===e}))}))]}}))}))})),checkListDataLoaders[a]=n}return n}var CheckListResolver=function(){function e(e){var t=e.context,r=e.providerId;this.type=on.CheckListApi,this.clientToken=t.clientToken,this.providerId=r,this.userId=t.userId}return e.prototype.retrieve=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getCheckListDataLoader(this.clientToken,this.userId).load(this.providerId)];case 1:return[2,e.sent()||{id:this.providerId,state:B.NotStared}]}}))}))},e.prototype.mutate=function(e){return updateCheckListItem(this.clientToken,this.userId,this.providerId,e)},e}();function initResolver(e,t){switch(e.type){case on.CheckListApi:return new CheckListResolver(t);default:throw new Error("Unsupported resolver type: "+e.type)}}var StateProviderInstance=function(){function e(e,t,r){var a=this;this.observer=new Observer,this.providerId=e,this.resolver=t,this.resolvedState=null,this.eventing=r,t.retrieve().then((function(e){return a.updateState(e)})).catch((function(e){logger.error(ERROR_MESSAGES[EVENT_NAMES.STATE_FETCH_FAILED],e.message),a.eventing.track(ERROR_MESSAGES[EVENT_NAMES.STATE_FETCH_FAILED],{errorMessage:e.message})}))}return e.prototype.mutate=function(e){var t=this,r=this.resolvedState;this.updateState(__assign(__assign({},r),e)),this.resolver.mutate(e).then((function(e){return t.updateState(e)})).catch((function(e){logger.error(ERROR_MESSAGES[EVENT_NAMES.STATE_UPDATE_FAILED],e.message),t.eventing.track(ERROR_MESSAGES[EVENT_NAMES.STATE_UPDATE_FAILED],{errorMessage:e.message}),r&&t.updateState(r)}))},e.prototype.subscribe=function(e){var t=this.observer.subscribe(e);return this.resolvedState&&e(this.resolvedState),t},e.prototype.updateState=function(e){this.resolvedState=e,this.observer.notify(e)},e}();function initStateProviders(e,t){return map_1(e,(function(e,r){var a=initResolver(e.resolver,{providerId:r,context:t});return new StateProviderInstance(r,a,t.eventing)}))}exports.DEFAULT_ALERT_COLOR=DEFAULT_ALERT_COLOR,exports.DEFAULT_ALT=DEFAULT_ALT,exports.DEFAULT_TAB_ACTIVE_COLOR=DEFAULT_TAB_ACTIVE_COLOR,exports.DEFAULT_TAB_COLOR=DEFAULT_TAB_COLOR,exports.DEFAULT_TAB_HEADER_COLOR=DEFAULT_TAB_HEADER_COLOR,exports.DEFAULT_TAB_ITEM_COLOR=DEFAULT_TAB_ITEM_COLOR,exports.ERROR_MESSAGES=ERROR_MESSAGES,exports.ERROR_SLUGS=ERROR_SLUGS,exports.EVENT_NAMES=EVENT_NAMES,exports.LOGGER=LOGGER,exports.Observer=Observer,exports.PreviewContainer=PreviewContainer,exports.RESOURCES=RESOURCES,exports.STYLEGUIDE_COLORS=STYLEGUIDE_COLORS,exports.SingletonAPI=SingletonAPI,exports.StateProviderInstance=StateProviderInstance,exports.TutorialDependencies=TutorialDependencies,exports.adaptCustomNodes=adaptCustomNodes,exports.attachStylesheet=attachStylesheet,exports.checkCyclicAndAdd=checkCyclicAndAdd,exports.createSingleton=createSingleton,exports.createTutorialDocumentContext=createTutorialDocumentContext,exports.defaultStyleguide=defaultStyleguide,exports.detachStylesheet=detachStylesheet,exports.fetchHead=fetchHead,exports.findMatchingSegment=findMatchingSegment,exports.includeHTMLWhitespaces=includeHTMLWhitespaces,exports.initStateProviders=initStateProviders,exports.internalEventing=internalEventing,exports.logError=logError,exports.logWarning=logWarning,exports.logger=logger,exports.mapNodeToStyleguide=mapNodeToStyleguide,exports.mergeStyleguidesFromContext=mergeStyleguidesFromContext,exports.normalizeCss=normalizeCss,exports.portalValidation=portalValidation,exports.providerValidation=providerValidation,exports.stripHTML=stripHTML,exports.tutorialValidation=tutorialValidation; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -15,3 +15,3 @@ /*! ***************************************************************************** | ||
***************************************************************************** */ | ||
var t=function(){return(t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function e(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function r(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(a,u)}c((n=n.apply(t,e||[])).next())}))}function n(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function o(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)n[o]=i[a];return n}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t,e){return t(e={exports:{}},e.exports),e.exports}var u="object"==typeof i&&i&&i.Object===Object&&i,c="object"==typeof self&&self&&self.Object===Object&&self,s=u||c||Function("return this")(),l=s.Symbol,f=Object.prototype,d=f.hasOwnProperty,h=f.toString,p=l?l.toStringTag:void 0;var v=function(t){var e=d.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=h.call(t);return n&&(e?t[p]=r:delete t[p]),o},y=Object.prototype.toString;var b=function(t){return y.call(t)},_="[object Null]",g="[object Undefined]",E=l?l.toStringTag:void 0;var O=function(t){return null==t?void 0===t?g:_:E&&E in Object(t)?v(t):b(t)};var T=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},m="[object AsyncFunction]",I="[object Function]",A="[object GeneratorFunction]",w="[object Proxy]";var R,j=function(t){if(!T(t))return!1;var e=O(t);return e==I||e==A||e==m||e==w},N=s["__core-js_shared__"],P=(R=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+R:"";var D=function(t){return!!P&&P in t},S=Function.prototype.toString;var C=function(t){if(null!=t){try{return S.call(t)}catch(t){}try{return t+""}catch(t){}}return""},L=/^\[object .+?Constructor\]$/,k=Function.prototype,U=Object.prototype,x=k.toString,M=U.hasOwnProperty,F=RegExp("^"+x.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var z=function(t){return!(!T(t)||D(t))&&(j(t)?F:L).test(C(t))};var B=function(t,e){return null==t?void 0:t[e]};var G=function(t,e){var r=B(t,e);return z(r)?r:void 0},W=function(){try{var t=G(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var H=function(t,e,r){"__proto__"==e&&W?W(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var V=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===r(i[c],c,i))break}return e}}();var K=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Y=function(t){return null!=t&&"object"==typeof t},$="[object Arguments]";var J=function(t){return Y(t)&&O(t)==$},Z=Object.prototype,q=Z.hasOwnProperty,X=Z.propertyIsEnumerable,Q=J(function(){return arguments}())?J:function(t){return Y(t)&&q.call(t,"callee")&&!X.call(t,"callee")},tt=Array.isArray;var et=function(){return!1},rt=a((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?s.Buffer:void 0,i=(o?o.isBuffer:void 0)||et;t.exports=i})),nt=9007199254740991,ot=/^(?:0|[1-9]\d*)$/;var it=function(t,e){var r=typeof t;return!!(e=null==e?nt:e)&&("number"==r||"symbol"!=r&&ot.test(t))&&t>-1&&t%1==0&&t<e},at=9007199254740991;var ut=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=at},ct={};ct["[object Float32Array]"]=ct["[object Float64Array]"]=ct["[object Int8Array]"]=ct["[object Int16Array]"]=ct["[object Int32Array]"]=ct["[object Uint8Array]"]=ct["[object Uint8ClampedArray]"]=ct["[object Uint16Array]"]=ct["[object Uint32Array]"]=!0,ct["[object Arguments]"]=ct["[object Array]"]=ct["[object ArrayBuffer]"]=ct["[object Boolean]"]=ct["[object DataView]"]=ct["[object Date]"]=ct["[object Error]"]=ct["[object Function]"]=ct["[object Map]"]=ct["[object Number]"]=ct["[object Object]"]=ct["[object RegExp]"]=ct["[object Set]"]=ct["[object String]"]=ct["[object WeakMap]"]=!1;var st=function(t){return Y(t)&&ut(t.length)&&!!ct[O(t)]};var lt=function(t){return function(e){return t(e)}},ft=a((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&u.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i})),dt=ft&&ft.isTypedArray,ht=dt?lt(dt):st,pt=Object.prototype.hasOwnProperty;var vt=function(t,e){var r=tt(t),n=!r&&Q(t),o=!r&&!n&&rt(t),i=!r&&!n&&!o&&ht(t),a=r||n||o||i,u=a?K(t.length,String):[],c=u.length;for(var s in t)!e&&!pt.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||it(s,c))||u.push(s);return u},yt=Object.prototype;var bt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||yt)};var _t=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),gt=Object.prototype.hasOwnProperty;var Et=function(t){if(!bt(t))return _t(t);var e=[];for(var r in Object(t))gt.call(t,r)&&"constructor"!=r&&e.push(r);return e};var Ot=function(t){return null!=t&&ut(t.length)&&!j(t)};var Tt=function(t){return Ot(t)?vt(t):Et(t)};var mt=function(t,e){return t&&V(t,e,Tt)};var It=function(){this.__data__=[],this.size=0};var At=function(t,e){return t===e||t!=t&&e!=e};var wt=function(t,e){for(var r=t.length;r--;)if(At(t[r][0],e))return r;return-1},Rt=Array.prototype.splice;var jt=function(t){var e=this.__data__,r=wt(e,t);return!(r<0)&&(r==e.length-1?e.pop():Rt.call(e,r,1),--this.size,!0)};var Nt=function(t){var e=this.__data__,r=wt(e,t);return r<0?void 0:e[r][1]};var Pt=function(t){return wt(this.__data__,t)>-1};var Dt=function(t,e){var r=this.__data__,n=wt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function St(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}St.prototype.clear=It,St.prototype.delete=jt,St.prototype.get=Nt,St.prototype.has=Pt,St.prototype.set=Dt;var Ct=St;var Lt=function(){this.__data__=new Ct,this.size=0};var kt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var Ut=function(t){return this.__data__.get(t)};var xt=function(t){return this.__data__.has(t)},Mt=G(s,"Map"),Ft=G(Object,"create");var zt=function(){this.__data__=Ft?Ft(null):{},this.size=0};var Bt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gt="__lodash_hash_undefined__",Wt=Object.prototype.hasOwnProperty;var Ht=function(t){var e=this.__data__;if(Ft){var r=e[t];return r===Gt?void 0:r}return Wt.call(e,t)?e[t]:void 0},Vt=Object.prototype.hasOwnProperty;var Kt=function(t){var e=this.__data__;return Ft?void 0!==e[t]:Vt.call(e,t)},Yt="__lodash_hash_undefined__";var $t=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ft&&void 0===e?Yt:e,this};function Jt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Jt.prototype.clear=zt,Jt.prototype.delete=Bt,Jt.prototype.get=Ht,Jt.prototype.has=Kt,Jt.prototype.set=$t;var Zt=Jt;var qt=function(){this.size=0,this.__data__={hash:new Zt,map:new(Mt||Ct),string:new Zt}};var Xt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Qt=function(t,e){var r=t.__data__;return Xt(e)?r["string"==typeof e?"string":"hash"]:r.map};var te=function(t){var e=Qt(this,t).delete(t);return this.size-=e?1:0,e};var ee=function(t){return Qt(this,t).get(t)};var re=function(t){return Qt(this,t).has(t)};var ne=function(t,e){var r=Qt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function oe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}oe.prototype.clear=qt,oe.prototype.delete=te,oe.prototype.get=ee,oe.prototype.has=re,oe.prototype.set=ne;var ie=oe,ae=200;var ue=function(t,e){var r=this.__data__;if(r instanceof Ct){var n=r.__data__;if(!Mt||n.length<ae-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ie(n)}return r.set(t,e),this.size=r.size,this};function ce(t){var e=this.__data__=new Ct(t);this.size=e.size}ce.prototype.clear=Lt,ce.prototype.delete=kt,ce.prototype.get=Ut,ce.prototype.has=xt,ce.prototype.set=ue;var se=ce,le="__lodash_hash_undefined__";var fe=function(t){return this.__data__.set(t,le),this};var de=function(t){return this.__data__.has(t)};function he(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ie;++e<r;)this.add(t[e])}he.prototype.add=he.prototype.push=fe,he.prototype.has=de;var pe=he;var ve=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var ye=function(t,e){return t.has(e)},be=1,_e=2;var ge=function(t,e,r,n,o,i){var a=r&be,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,d=!0,h=r&_e?new pe:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var p=t[f],v=e[f];if(n)var y=a?n(v,p,f,e,t,i):n(p,v,f,t,e,i);if(void 0!==y){if(y)continue;d=!1;break}if(h){if(!ve(e,(function(t,e){if(!ye(h,e)&&(p===t||o(p,t,r,n,i)))return h.push(e)}))){d=!1;break}}else if(p!==v&&!o(p,v,r,n,i)){d=!1;break}}return i.delete(t),i.delete(e),d},Ee=s.Uint8Array;var Oe=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var Te=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},me=1,Ie=2,Ae="[object Boolean]",we="[object Date]",Re="[object Error]",je="[object Map]",Ne="[object Number]",Pe="[object RegExp]",De="[object Set]",Se="[object String]",Ce="[object Symbol]",Le="[object ArrayBuffer]",ke="[object DataView]",Ue=l?l.prototype:void 0,xe=Ue?Ue.valueOf:void 0;var Me=function(t,e,r,n,o,i,a){switch(r){case ke:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Le:return!(t.byteLength!=e.byteLength||!i(new Ee(t),new Ee(e)));case Ae:case we:case Ne:return At(+t,+e);case Re:return t.name==e.name&&t.message==e.message;case Pe:case Se:return t==e+"";case je:var u=Oe;case De:var c=n&me;if(u||(u=Te),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;n|=Ie,a.set(t,e);var l=ge(u(t),u(e),n,o,i,a);return a.delete(t),l;case Ce:if(xe)return xe.call(t)==xe.call(e)}return!1};var Fe=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var ze=function(t,e,r){var n=e(t);return tt(t)?n:Fe(n,r(t))};var Be=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i};var Ge=function(){return[]},We=Object.prototype.propertyIsEnumerable,He=Object.getOwnPropertySymbols,Ve=He?function(t){return null==t?[]:(t=Object(t),Be(He(t),(function(e){return We.call(t,e)})))}:Ge;var Ke=function(t){return ze(t,Tt,Ve)},Ye=1,$e=Object.prototype.hasOwnProperty;var Je=function(t,e,r,n,o,i){var a=r&Ye,u=Ke(t),c=u.length;if(c!=Ke(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:$e.call(e,l)))return!1}var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var h=!0;i.set(t,e),i.set(e,t);for(var p=a;++s<c;){var v=t[l=u[s]],y=e[l];if(n)var b=a?n(y,v,l,e,t,i):n(v,y,l,t,e,i);if(!(void 0===b?v===y||o(v,y,r,n,i):b)){h=!1;break}p||(p="constructor"==l)}if(h&&!p){var _=t.constructor,g=e.constructor;_!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof g&&g instanceof g)&&(h=!1)}return i.delete(t),i.delete(e),h},Ze=G(s,"DataView"),qe=G(s,"Promise"),Xe=G(s,"Set"),Qe=G(s,"WeakMap"),tr=C(Ze),er=C(Mt),rr=C(qe),nr=C(Xe),or=C(Qe),ir=O;(Ze&&"[object DataView]"!=ir(new Ze(new ArrayBuffer(1)))||Mt&&"[object Map]"!=ir(new Mt)||qe&&"[object Promise]"!=ir(qe.resolve())||Xe&&"[object Set]"!=ir(new Xe)||Qe&&"[object WeakMap]"!=ir(new Qe))&&(ir=function(t){var e=O(t),r="[object Object]"==e?t.constructor:void 0,n=r?C(r):"";if(n)switch(n){case tr:return"[object DataView]";case er:return"[object Map]";case rr:return"[object Promise]";case nr:return"[object Set]";case or:return"[object WeakMap]"}return e});var ar=ir,ur=1,cr="[object Arguments]",sr="[object Array]",lr="[object Object]",fr=Object.prototype.hasOwnProperty;var dr=function(t,e,r,n,o,i){var a=tt(t),u=tt(e),c=a?sr:ar(t),s=u?sr:ar(e),l=(c=c==cr?lr:c)==lr,f=(s=s==cr?lr:s)==lr,d=c==s;if(d&&rt(t)){if(!rt(e))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new se),a||ht(t)?ge(t,e,r,n,o,i):Me(t,e,c,r,n,o,i);if(!(r&ur)){var h=l&&fr.call(t,"__wrapped__"),p=f&&fr.call(e,"__wrapped__");if(h||p){var v=h?t.value():t,y=p?e.value():e;return i||(i=new se),o(v,y,r,n,i)}}return!!d&&(i||(i=new se),Je(t,e,r,n,o,i))};var hr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Y(e)&&!Y(r)?e!=e&&r!=r:dr(e,r,n,o,t,i))},pr=1,vr=2;var yr=function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=r[o])[0],s=t[c],l=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var f=new se;if(n)var d=n(s,l,c,t,e,f);if(!(void 0===d?hr(l,s,pr|vr,n,f):d))return!1}}return!0};var br=function(t){return t==t&&!T(t)};var _r=function(t){for(var e=Tt(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,br(o)]}return e};var gr=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Er=function(t){var e=_r(t);return 1==e.length&&e[0][2]?gr(e[0][0],e[0][1]):function(r){return r===t||yr(r,t,e)}},Or="[object Symbol]";var Tr=function(t){return"symbol"==typeof t||Y(t)&&O(t)==Or},mr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ir=/^\w*$/;var Ar=function(t,e){if(tt(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Tr(t))||(Ir.test(t)||!mr.test(t)||null!=e&&t in Object(e))},wr="Expected a function";function Rr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(wr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Rr.Cache||ie),r}Rr.Cache=ie;var jr=Rr,Nr=500;var Pr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/\\(\\)?/g,Sr=function(t){var e=jr(t,(function(t){return r.size===Nr&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pr,(function(t,r,n,o){e.push(n?o.replace(Dr,"$1"):r||t)})),e}));var Cr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Lr=1/0,kr=l?l.prototype:void 0,Ur=kr?kr.toString:void 0;var xr=function t(e){if("string"==typeof e)return e;if(tt(e))return Cr(e,t)+"";if(Tr(e))return Ur?Ur.call(e):"";var r=e+"";return"0"==r&&1/e==-Lr?"-0":r};var Mr=function(t){return null==t?"":xr(t)};var Fr=function(t,e){return tt(t)?t:Ar(t,e)?[t]:Sr(Mr(t))},zr=1/0;var Br=function(t){if("string"==typeof t||Tr(t))return t;var e=t+"";return"0"==e&&1/t==-zr?"-0":e};var Gr=function(t,e){for(var r=0,n=(e=Fr(e,t)).length;null!=t&&r<n;)t=t[Br(e[r++])];return r&&r==n?t:void 0};var Wr=function(t,e,r){var n=null==t?void 0:Gr(t,e);return void 0===n?r:n};var Hr=function(t,e){return null!=t&&e in Object(t)};var Vr=function(t,e,r){for(var n=-1,o=(e=Fr(e,t)).length,i=!1;++n<o;){var a=Br(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&ut(o)&&it(a,o)&&(tt(t)||Q(t))};var Kr=function(t,e){return null!=t&&Vr(t,e,Hr)},Yr=1,$r=2;var Jr=function(t,e){return Ar(t)&&br(e)?gr(Br(t),e):function(r){var n=Wr(r,t);return void 0===n&&n===e?Kr(r,t):hr(e,n,Yr|$r)}};var Zr=function(t){return t};var qr=function(t){return function(e){return null==e?void 0:e[t]}};var Xr=function(t){return function(e){return Gr(e,t)}};var Qr=function(t){return Ar(t)?qr(Br(t)):Xr(t)};var tn=function(t){return"function"==typeof t?t:null==t?Zr:"object"==typeof t?tt(t)?Jr(t[0],t[1]):Er(t):Qr(t)};var en=function(t,e){var r={};return e=tn(e),mt(t,(function(t,n,o){H(r,n,e(t,n,o))})),r},rn={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};var nn=["Webkit","ms","Moz","O"];Object.keys(rn).forEach((function(t){nn.forEach((function(e){rn[function(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}(e,t)]=rn[t]}))}));var on={isUnitlessNumber:rn,shorthandPropertyExpansions:{background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}}};var an=function(e){var r=e.css,n={};return Object.entries(r).forEach((function(t){var e=t[0],r=t[1];if("number"==typeof r)return on.isUnitlessNumber[e]?void(n[e]=""+r):void(n[e]=r+"px");n[e]=r})),t(t({},e),{css:t(t({},n),{boxSizing:"border-box"})})},un=function(e){return en(e,(function(e){var r=e;return"Typography"===r.type&&(r=function(e){var r=Wr(e,"data.custom.variant","P");return t(t({},e),{type:r})}(r)),r.css&&T(r.css)&&r.css.flexBasis&&(r=function(e){var r=e.css.flexBasis;return"0"===r||"0px"===r?t(t({},e),{css:t(t({},e.css),{flexBasis:"0%"})}):e}(r)),r.css&&(r=an(r)),r}))};var cn,sn,ln,fn,dn,hn,pn="/api/checklistItems",vn="/api/segmentMemberships",yn="/api/segmentsDefinition",bn="/api/tutorialMetadata",_n="/api/tutorialDocumentsSdk",gn="wss://2jcfb7pjlf.execute-api.eu-west-1.amazonaws.com/prod",En=function(t){if(!document.querySelectorAll('[href="'+t+'"]').length){var e=document.createElement("link");e.setAttribute("rel","prefetch"),e.setAttribute("href",t),document.head.appendChild(e)}},On=function(t,e){t&&tt(t)&&t.map((function(t){var r=t.nodeType,n=t.url;return En("EmbedTutorial"===r?"https://cdn.candu.ai/tutorials/"+e+"/"+n+".json":"EmbedPortal"===r?"https://cdn.candu.ai/portals/"+e+"/"+n+"/head.json":n)}))},Tn=function(){function t(t){this.adjacencyList={},this.rootDocument=t,this.adjacencyList[t]=[]}return t.prototype.get=function(t){return this.adjacencyList[t]},t.prototype.add=function(t,e){var r=this;if(this.adjacencyList[t]||(this.adjacencyList[t]=[]),!this.adjacencyList[e])return this.adjacencyList[t].push(e),this.adjacencyList[e]=[],!0;if(this.adjacencyList[t].includes(e))return!0;var n=function(e){if(e===t)return!0;for(var o=0,i=r.adjacencyList[e];o<i.length;o++){var a=i[o];if(n(a))return!0}return!1};return!n(e)&&(this.adjacencyList[t].push(e),!0)},t}(),mn=function(t,e){return{id:t,dependencies:e?e.dependencies:new Tn(t)}},In=function(t,e){return t.dependencies.add(t.id,e)},An="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},wn="object"==typeof An&&An&&An.Object===Object&&An,Rn="object"==typeof self&&self&&self.Object===Object&&self,jn=(wn||Rn||Function("return this")()).Symbol,Nn=Object.prototype,Pn=Nn.hasOwnProperty,Dn=Nn.toString,Sn=jn?jn.toStringTag:void 0,Cn=Object.prototype.toString,Ln=jn?jn.toStringTag:void 0,kn=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Ln&&Ln in Object(t)?function(t){var e=Pn.call(t,Sn),r=t[Sn];try{t[Sn]=void 0;var n=!0}catch(t){}var o=Dn.call(t);return n&&(e?t[Sn]=r:delete t[Sn]),o}(t):function(t){return Cn.call(t)}(t)},Un=Array.isArray,xn=function(t){return null!=t&&"object"==typeof t},Mn=function(t){return"string"==typeof t||!Un(t)&&xn(t)&&"[object String]"==kn(t)},Fn=/^([a-zA-Z0-9]|_|-)+$/,zn=function(t){return function(t){return"number"==typeof t||xn(t)&&"[object Number]"==kn(t)}(t)&&t>=0};!function(t){t.SDK="SDK",t.PREVIEW="PREVIEW"}(cn||(cn={})),function(t){t.BOOTSTRAP="Bootstrap",t.CHANGE_POSITION="ChangePosition",t.CLOSE_PREVIEW="ClosePreview",t.PREVIEW_LOADED="PreviewLoaded",t.SET_AVALIABLE_PORTALS="SetAvaliablePortals",t.SET_CONTENT="SetContent",t.SET_SELECTED_ELEMENT="SetSelectedElement",t.SET_VIEW_MODE="SetViewMode",t.ADD_ELEMENT="AddElement",t.REMOVE_ELEMENT="RemoveElement",t.UPDATE_ELEMENT="UpdateElement",t.SET_ELEMENT="SetElement"}(sn||(sn={})),(ln||(ln={})).ON_CLICK="OnClick",function(t){t.NATIVE="Native",t.PENDO="Pendo"}(fn||(fn={})),function(t){t.NAVIGATE="Navigate",t.CHANGE_TUTORIAL="ChangeTutorial",t.OPEN_GUIDE="OpenGuide"}(dn||(dn={})),function(t){t.PRIMARY="primary",t.SECONDARY="primary",t.WARNING="warning",t.DANGER="danger",t.NEUTRAL="neutral",t.ACTIVE="active",t.INFO="info"}(hn||(hn={}));var Bn;hn.PRIMARY;!function(t){t.U="U",t.B="B",t.Em="Em",t.InlineCode="InlineCode"}(Bn||(Bn={}));var Gn,Wn,Hn,Vn,Kn,Yn,$n,Jn=function(t){return function(t){return Mn(t)&&t.length>=3&&t.length<100&&Fn.test(t)}(t)};!function(t){t.NotStared="NotStarted",t.InProgress="InProgress",t.Done="Done"}(Gn||(Gn={})),function(t){t.COLLAPSED="Collapsed",t.EXPANDED="Expanded",t.MINIMIZED="Minimized"}(Wn||(Wn={})),function(t){t.TUTORIAL="Tutorial",t.PORTAL="Portal"}(Hn||(Hn={})),function(t){t.Global="Global",t.Organization="Organization"}(Vn||(Vn={})),function(t){t.Root="root",t.Rule="rule",t.Atrule="atrule",t.Decl="decl",t.Any="any"}(Kn||(Kn={})),function(t){t.Global="Global",t.Carried="Carried"}(Yn||(Yn={})),function(t){t.CanduCdn="CanduCdn",t.CheckListApi="CheckListApi"}($n||($n={}));var Zn,qn=function(e,r){var n=r.reduce((function(e,r){var n;return t(t({},e),((n={})[r]=r,n))}),{});return e.content.find((function(t){var e=t.segmentId;return!!n[e]||"Everyone"===e}))},Xn=function(t){return"candu.sdk."+t},Qn=function(t){return Xn("error."+t)},to={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",PROVIDER_ERROR:"provider_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},eo={HEARTBEAT:Xn("heartbeat"),PREVIEW_OPEN:Xn("preview.open"),PORTAL:Xn("portal"),TUTORIAL:Xn("tutorial"),TUTORIAL_INTERACTION:Xn("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:Qn("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:Qn("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:Qn("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:Qn("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:Qn("commit_api"),TUTORIAL_LOADING_ERROR:Qn("tutorial"),UNKOWN_NODE_TYPE:Qn(to.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:Qn(to.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:Qn(to.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:Qn(to.TUTORIAL_ERROR),PORTAL_ERROR:Qn(to.PORTAL_ERROR),PROVIDER_ERROR:Qn(to.PROVIDER_ERROR),STYLEGUIDE_MAP_ERROR:Qn(to.TUTORIAL_ERROR),RENDER_NODE_ERROR:Qn(to.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:Qn("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:Qn("circular_dependecy_embed_tutorial"),STATE_FETCH_FAILED:Qn("state_fetch_failed"),STATE_UPDATE_FAILED:Qn("state_update_failed")},ro=function(t){return"An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: "+t+"."},no=((Zn={EVENTING_NOT_INITIALIZED:"You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n"})[eo.PORTAL_ASSET_NOT_FOUND]="Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",Zn[eo.PORTAL_NO_SEGMENT_IDS]="You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",Zn[eo.NO_MATCHING_TUTORIALS]="The Tutorial will not be rendered because there are no matching segments for the given user.",Zn[eo.NO_VALID_TUTORIAL_IDENTIFIER]="(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",Zn[eo.TUTORIAL_LOADING_ERROR]="An error has occurred while trying to load the Tutorial",Zn[eo.UNKOWN_INLINE_NODE_TYPE]=ro(to.UNKOWN_INLINE_NODE_TYPE),Zn[eo.UNKOWN_NODE_TYPE]=ro(to.UNKOWN_NODE_TYPE),Zn[eo.CIRCULAR_DEPENDENCY_EMBED_PORTAL]="Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",Zn[eo.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]="Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",Zn[eo.PORTAL_ERROR]="An error has occured within Portal",Zn[eo.PROVIDER_ERROR]="An error has occured within Provider",Zn[eo.TUTORIAL_ERROR]="An error has occured within Tutorial",Zn[eo.RENDER_NODE_ERROR]="An error has occured while rendering tutorial node",Zn[eo.STYLEGUIDE_MAP_ERROR]="An error has occured while mapping node to styleguide",Zn[eo.STATE_FETCH_FAILED]="An error has occured while fetching state:",Zn[eo.STATE_UPDATE_FAILED]="An error has occured while updating state:",Zn),oo={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},io={error:console.error,warning:console.warn},ao=function(t){var e=t.identify,r=t.track;return{provider:function(t){var n=t.userId,o=t.traits,i=t.styleguide;e(n,o),r(eo.HEARTBEAT,function(t){var e={};return Object.keys(t).forEach((function(r){oo[r]&&(e["styleguide."+r]=t[r].displayName||!0)})),e}(i))},tutorialDocumentLoadingError:function(t){var e=t.tutorialId,n=t.slug,o=t.contentHashId;io.error(no[eo.TUTORIAL_LOADING_ERROR]),r(eo.TUTORIAL_LOADING_ERROR,{tutorialId:e,slug:n,contentHashId:o})}}};for(var uo=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}})),co=[],so=0;so<256;++so)co[so]=(so+256).toString(16).substr(1);var lo=function(t,e){var r=e||0,n=co;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")};var fo,ho,po=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||uo)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||lo(o)};!function(t){t.UserGenerated="UserGenerated",t.SDK="SDK"}(fo||(fo={})),function(t){t.Identify="Identify",t.Group="Group",t.Track="Track",t.Page="Page",t.Screen="Screen"}(ho||(ho={}));var vo,yo,bo=function(){return"undefined"!=typeof window&&window.localStorage},_o=function(t){return function(e){bo()&&null!=e&&window.localStorage.setItem(t,JSON.stringify(e))}},go={anonymousId:{getOrCreate:(vo="candu:anonymous_id",yo=function(){var t=po();return _o("candu:anonymous_id")(t),t},function(){return function(t){return function(){if(bo()){var e=window.localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(t){return null}}}}(vo)()||yo()}),set:_o("candu:anonymous_id")}}.anonymousId.getOrCreate,Eo=function(t,e,r,n,o,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,o,i,a,u],l=0;(c=new Error(e.replace(/%s/g,(function(){return s[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}},Oo=function(t){return Eo(!t||T(t),"(Candu) styleguide must be undefined or an object")},To=function(r){var n=r.clientToken,o=r.userId,i=r.traits,a=r.options,u=r.styleguide,c=e(r,["clientToken","userId","traits","options","styleguide"]);return Eo(function(t){return Mn(t)&&!!t.match(/^[0-9a-zA-Z]*$/)&&t.length>=10}(n),"(Candu) you must provide a valid clientToken"),Eo(!o||function(t){return zn(t)||Mn(t)&&t.trim().length>0}(o),"(Candu) you must provide a valid userId"),Oo(u),Eo(!i||T(i),"(Candu) traits must be undefined or an object"),Eo(!a||T(a),"(Candu) options must be undefined or an object"),t(t({},c),{clientToken:n,traits:i||{},options:a||{},styleguide:u||{},userId:o||go()})},mo=function(r){var n=r.slug,o=r.styleguide,i=r.contentHashId,a=r.tutorialId,u=r.tutorialDocument,c=r.renderedByClient,s=e(r,["slug","styleguide","contentHashId","tutorialId","tutorialDocument","renderedByClient"]);return Oo(o),t(t({},s),{slug:n,styleguide:o||{},contentHashId:i,tutorialId:a,tutorialDocument:u,renderedByClient:c})},Io=function(t){var e=t.slug,r=t.styleguide;return Oo(r),{slug:e,styleguide:r||{}}},Ao=function(t){return r(void 0,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[2,e.sent().json()]}}))}))},wo=function(t){return Ao("https://api.candu.ai"+t)},Ro=function(t){return Ao("https://cdn.candu.ai"+t)},jo={tutorialDocumentLatestSaved:function(t,e){return r(void 0,void 0,void 0,(function(){return n(this,(function(r){return[2,wo(_n+"/"+e+"?token="+t)]}))}))},portalAsset:function(t,e){return r(void 0,void 0,void 0,(function(){return n(this,(function(r){return[2,Ro("/portals/"+t+"/"+e+"/head.json")]}))}))},segmentMembership:function(t,e){return r(void 0,void 0,void 0,(function(){return n(this,(function(r){return[2,wo(vn+"/"+e+"?token="+t)]}))}))},segmentDefinition:function(t){return r(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,wo(yn+"?token="+t)]}))}))},tutorialMetadata:function(t){return r(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,wo(bn+"?token="+t)]}))}))},tutorialSocket:function(t,e,r){var n=new WebSocket(gn+"?clientToken="+t+"&tutorialId="+e);return n.onmessage=function(t){var e=JSON.parse(t.data);r(e)},function(){return n.close()}},tutorialDocument:function(t,e,r){var n=t.contentHashId,o=t.tutorialId,i=t.tutorialDocument,a=t.slug,u=function(t){return{byId:function(e){return wo(_n+"?token="+t+"&finder=latestPublished&tutorialId="+e)},bySlug:function(e){return Ro("/tutorials/"+t+"/"+e+".json")},byContentHash:function(e){return Ro("/tutorials/"+t+"/"+e+".json")}}}(e);return Jn(a)?u.bySlug(a):function(t){return zn(t)}(o)?u.byId(o):function(t){return Mn(t)&&!!t.match(/^[0-9a-zA-Z]{40}$/)}(n)?u.byContentHash(n):T(i)?Promise.resolve(i):(io.error(no[eo.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(eo.NO_VALID_TUTORIAL_IDENTIFIER,{slug:t.slug}),null)}},No=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.error.apply(console,t)},Po=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.warn.apply(console,t)},Do={error:No,warning:Po},So=function(t){return t.replace(/\s/g," ")},Co=function(t){return DOMParser?(new DOMParser).parseFromString(t,"text/html").body.textContent||"":t},Lo=function(){function t(){this.subscribers=[]}return t.prototype.subscribe=function(t){var e=this;return this.subscribers.push(t),function(){e.subscribers[e.subscribers.indexOf(t)]=function(){}}},t.prototype.notify=function(t){this.subscribers.forEach((function(e){return e(t)}))},t.prototype.clear=function(){this.subscribers=[]},t}(),ko=function(){function t(){this.onClientUpdateObserver=new Lo}return t.prototype.attachClient=function(t){this.client=t,this.onClientUpdateObserver.notify({client:t})},t.prototype.detachClient=function(){this.client&&(this.client=null,this.onClientUpdateObserver.notify({client:null}))},t.prototype.onClientUpdate=function(t){var e=this.onClientUpdateObserver.subscribe(t);return this.client&&t({client:this.client}),e},t}();function Uo(t){var e,r,n=function(t){return function(){for(var e,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(r.api)return(e=r.api)[t].apply(e,n);console.warn("Please initialize the SDK by calling Candu.init() before attempting to call "+t)}};return(e=function(){function e(){}return e.init=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return this.api||(e.api=new(t.bind.apply(t,o([void 0],r)))),e.subscriberCallbacks.forEach((function(t){return t()})),e.subscriberCallbacks=[],window.postMessage({source:"CANDU_SINGLETON",payload:{type:"INIT"}},window&&window.origin?window.origin:"*"),e},e.onProviderReady=function(t){if(e.api)return t();e.subscriberCallbacks.push(t)},e}()).subscriberCallbacks=[],e.renderTutorial=n("renderTutorial"),e.renderPortal=n("renderPortal"),e.attachClient=n("attachClient"),e.detachClient=n("detachClient"),e.getProvider=n("getProvider"),r=e,window.Candu=r,r}var xo=function(){function t(t){this.init(t)}return t.prototype.attachClient=function(t){return this.provider.preview.attachClient(t)},t.prototype.detachClient=function(){return this.provider.preview.detachClient()},Object.defineProperty(t.prototype,"provider",{get:function(){return this.getProvider()},enumerable:!0,configurable:!0}),t}(),Mo=function(t){switch(t.trigger){case ln.ON_CLICK:default:return"onClick"}},Fo=function(e,r){var n=e.data;if(!n||!n.actions)return{};var o=function(e){r.provider.eventing.track(eo.TUTORIAL_INTERACTION,t(t({},e),r.trackingIdentifiers||{}))};return n.actions.map((function(t){return function(t,e){var r,n,o;switch(t.handler.type){case dn.NAVIGATE:return(r={})[Mo(t)]=function(){var r=t.handler,n=r.href,o=r.target;e(t),"Blank"===o?window.open(n,"_blank"):n&&n.includes("mailto:")?window.location=n:document.location.href=n},r;case dn.CHANGE_TUTORIAL:return(n={})[Mo(t)]=function(){var e=t.handler.tutorialId;No("TODO -> change tutorial",e)},n;case dn.OPEN_GUIDE:return(o={})[Mo(t)]=function(){var e=t.handler.guideId;No("TODO -> open guide",e)},o;default:return{}}}(t,o)})).reduce((function(e,r){return t(t({},e),r)}),{})},zo=function(t,e){var r=t.props||{},n=t.nodes,o=r.children;return o||(n?n.map(e):null)},Bo=function(e,r){try{var n=r.provider,o=r.document,i=r.trackingIdentifiers,a=o.nodes[e];if(!a)return Do.error("Document is corrupted. Refusing to move further."),null;var u=function(t){return Bo(t,r)},c=a.type,s=a.props,l=a.css,f=a.states,d=t(t(t({},s||{}),{style:l||{},children:zo(a,u)}),Fo(a,{trackingIdentifiers:i,provider:n})),h={nodeId:e,node:a,document:o,render:{node:u,styleguide:function(t,e){return void 0===e&&(e={}),r.renderNode(t,{api:h,attributes:e})},tutorial:function(t){return r.renderTutorial(t)},portal:function(t){return r.renderPortal(t)}},trackingIdentifiers:i,stateInstances:f&&r.stateProviderInstances.filter((function(t){return!!f[t.providerId]}))},p=h.render.styleguide(c,d);return p||(Do.error(no[eo.UNKOWN_NODE_TYPE],{type:c}),n.eventing.track(eo.UNKOWN_NODE_TYPE,{type:c}),null)}catch(t){return Do.error(no[eo.STYLEGUIDE_MAP_ERROR],t),null}},Go=jr((function(e,r){var n,o,i=e.provider,a=e.portal,u=e.tutorial,c=i.styleguide;return u&&(o=u.styleguide),a&&(n=a.styleguide),t(t(t(t({},c||{}),n||{}),o||{}),r||{})})),Wo="",Ho="#EDEDED",Vo="#333745",Ko="#838792",Yo="#FEFEFE",$o="#FEFEFE",Jo={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},Zo=function(t){return"candu-styleguide-"+t},qo=function(t){var e=Zo(t);if(!document.getElementById(e)){var r=document.createElement("link");r.setAttribute("id",e),r.setAttribute("rel","stylesheet"),r.setAttribute("href","https://cdn.candu.ai/styleguides/applications/"+t+"/default/main.css"),document.head.appendChild(r)}},Xo=function(t){var e=document.getElementById(Zo(t));e&&e.remove()};var Qo=function(t,e){return function(r,n){if(null==r)return r;if(!Ot(r))return t(r,n);for(var o=r.length,i=e?o:-1,a=Object(r);(e?i--:++i<o)&&!1!==n(a[i],i,a););return r}}(mt);var ti=function(t,e){var r=-1,n=Ot(t)?Array(t.length):[];return Qo(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var ei,ri=function(t,e){return(tt(t)?Cr:ti)(t,tn(e))},ni=function(){function t(t,e){if("function"!=typeof t)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: "+t+".");this._batchLoadFn=t,this._maxBatchSize=function(t){if(t&&!1===t.batch)return 1;var e=t&&t.maxBatchSize;if(void 0===e)return 1/0;if("number"!=typeof e||e<1)throw new TypeError("maxBatchSize must be a positive number: "+e);return e}(e),this._batchScheduleFn=function(t){var e=t&&t.batchScheduleFn;if(void 0===e)return oi;if("function"!=typeof e)throw new TypeError("batchScheduleFn must be a function: "+e);return e}(e),this._cacheKeyFn=function(t){var e=t&&t.cacheKeyFn;if(void 0===e)return function(t){return t};if("function"!=typeof e)throw new TypeError("cacheKeyFn must be a function: "+e);return e}(e),this._cacheMap=function(t){if(t&&!1===t.cache)return null;var e=t&&t.cacheMap;if(void 0===e)return new Map;if(null!==e){var r=["get","set","delete","clear"].filter((function(t){return e&&"function"!=typeof e[t]}));if(0!==r.length)throw new TypeError("Custom cacheMap missing methods: "+r.join(", "))}return e}(e),this._batch=null}var e=t.prototype;return e.load=function(t){if(null==t)throw new TypeError("The loader.load() function must be called with a value,but got: "+String(t)+".");var e=function(t){var e=t._batch;if(null!==e&&!e.hasDispatched&&e.keys.length<t._maxBatchSize&&(!e.cacheHits||e.cacheHits.length<t._maxBatchSize))return e;var r={hasDispatched:!1,keys:[],callbacks:[]};return t._batch=r,t._batchScheduleFn((function(){return function(t,e){if(e.hasDispatched=!0,0===e.keys.length)return void ai(e);var r=t._batchLoadFn(e.keys);if(!r||"function"!=typeof r.then)return ii(t,e,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise: "+String(r)+"."));r.then((function(t){if(!ui(t))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array: "+String(t)+".");if(t.length!==e.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys.\n\nKeys:\n"+String(e.keys)+"\n\nValues:\n"+String(t));ai(e);for(var r=0;r<e.callbacks.length;r++){var n=t[r];n instanceof Error?e.callbacks[r].reject(n):e.callbacks[r].resolve(n)}})).catch((function(r){return ii(t,e,r)}))}(t,r)})),r}(this),r=this._cacheMap,n=this._cacheKeyFn(t);if(r){var o=r.get(n);if(o){var i=e.cacheHits||(e.cacheHits=[]);return new Promise((function(t){i.push((function(){return t(o)}))}))}}e.keys.push(t);var a=new Promise((function(t,r){e.callbacks.push({resolve:t,reject:r})}));return r&&r.set(n,a),a},e.loadMany=function(t){if(!ui(t))throw new TypeError("The loader.loadMany() function must be called with Array<key> but got: "+t+".");for(var e=[],r=0;r<t.length;r++)e.push(this.load(t[r]).catch((function(t){return t})));return Promise.all(e)},e.clear=function(t){var e=this._cacheMap;if(e){var r=this._cacheKeyFn(t);e.delete(r)}return this},e.clearAll=function(){var t=this._cacheMap;return t&&t.clear(),this},e.prime=function(t,e){var r=this._cacheMap;if(r){var n,o=this._cacheKeyFn(t);if(void 0===r.get(o))e instanceof Error?(n=Promise.reject(e)).catch((function(){})):n=Promise.resolve(e),r.set(o,n)}return this},t}(),oi="object"==typeof process&&"function"==typeof process.nextTick?function(t){ei||(ei=Promise.resolve()),ei.then((function(){return process.nextTick(t)}))}:setImmediate||setTimeout;function ii(t,e,r){ai(e);for(var n=0;n<e.keys.length;n++)t.clear(e.keys[n]),e.callbacks[n].reject(r)}function ai(t){if(t.cacheHits)for(var e=0;e<t.cacheHits.length;e++)t.cacheHits[e]()}function ui(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&(0===t.length||t.length>0&&Object.prototype.hasOwnProperty.call(t,t.length-1))}var ci=ni,si="https://api.candu.ai"+pn;function li(t){return{state:t.state,id:t.id}}var fi=function(t,e,r){return fetch(si+"?token="+t+"&userId="+e+"&finder=byIds&ids="+r.join(",")).then((function(t){return t.json()})).then((function(t){return t.map(li)}))},di={};function hi(t,e){var o=this,i=t+"-"+e,a=di[i];if(!a){a=new ci((function(i){return r(o,void 0,void 0,(function(){var r;return n(this,(function(n){switch(n.label){case 0:return[4,fi(t,e,i)];case 1:return r=n.sent(),[2,i.map((function(t){return r.find((function(e){return e.id===t}))}))]}}))}))})),di[i]=a}return a}var pi=function(){function e(t){var e=t.context,r=t.providerId;this.type=$n.CheckListApi,this.clientToken=e.clientToken,this.providerId=r,this.userId=e.userId}return e.prototype.retrieve=function(){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,hi(this.clientToken,this.userId).load(this.providerId)];case 1:return[2,t.sent()||{id:this.providerId,state:Gn.NotStared}]}}))}))},e.prototype.mutate=function(e){return r=this.clientToken,n=this.userId,o=this.providerId,i=e,fetch(si+"/"+o+"?token="+r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t(t({},i),{userId:n.toString()}))}).then((function(t){return t.json()})).then(li);var r,n,o,i},e}();var vi=function(){function e(t,e,r){var n=this;this.observer=new Lo,this.providerId=t,this.resolver=e,this.resolvedState=null,this.eventing=r,e.retrieve().then((function(t){return n.updateState(t)})).catch((function(t){Do.error(no[eo.STATE_FETCH_FAILED],t.message),n.eventing.track(no[eo.STATE_FETCH_FAILED],{errorMessage:t.message})}))}return e.prototype.mutate=function(e){var r=this,n=this.resolvedState;this.updateState(t(t({},n),e)),this.resolver.mutate(e).then((function(t){return r.updateState(t)})).catch((function(t){Do.error(no[eo.STATE_UPDATE_FAILED],t.message),r.eventing.track(no[eo.STATE_UPDATE_FAILED],{errorMessage:t.message}),n&&r.updateState(n)}))},e.prototype.subscribe=function(t){var e=this.observer.subscribe(t);return this.resolvedState&&t(this.resolvedState),e},e.prototype.updateState=function(t){this.resolvedState=t,this.observer.notify(t)},e}();function yi(t,e){return ri(t,(function(t,r){var n=function(t,e){switch(t.type){case $n.CheckListApi:return new pi(e);default:throw new Error("Unsupported resolver type: "+t.type)}}(t.resolver,{providerId:r,context:e});return new vi(r,n,e.eventing)}))}export{Ho as DEFAULT_ALERT_COLOR,Wo as DEFAULT_ALT,Yo as DEFAULT_TAB_ACTIVE_COLOR,$o as DEFAULT_TAB_COLOR,Vo as DEFAULT_TAB_HEADER_COLOR,Ko as DEFAULT_TAB_ITEM_COLOR,no as ERROR_MESSAGES,to as ERROR_SLUGS,eo as EVENT_NAMES,io as LOGGER,Lo as Observer,ko as PreviewContainer,jo as RESOURCES,Jo as STYLEGUIDE_COLORS,xo as SingletonAPI,vi as StateProviderInstance,Tn as TutorialDependencies,un as adaptCustomNodes,qo as attachStylesheet,In as checkCyclicAndAdd,Uo as createSingleton,mn as createTutorialDocumentContext,oo as defaultStyleguide,Xo as detachStylesheet,On as fetchHead,qn as findMatchingSegment,So as includeHTMLWhitespaces,yi as initStateProviders,ao as internalEventing,No as logError,Po as logWarning,Do as logger,Bo as mapNodeToStyleguide,Go as mergeStyleguidesFromContext,an as normalizeCss,Io as portalValidation,To as providerValidation,Co as stripHTML,mo as tutorialValidation}; | ||
var t=function(){return(t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function e(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function r(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(a,u)}c((n=n.apply(t,e||[])).next())}))}function n(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function o(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)n[o]=i[a];return n}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t,e){return t(e={exports:{}},e.exports),e.exports}var u="object"==typeof i&&i&&i.Object===Object&&i,c="object"==typeof self&&self&&self.Object===Object&&self,s=u||c||Function("return this")(),l=s.Symbol,f=Object.prototype,d=f.hasOwnProperty,h=f.toString,p=l?l.toStringTag:void 0;var v=function(t){var e=d.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=h.call(t);return n&&(e?t[p]=r:delete t[p]),o},y=Object.prototype.toString;var b=function(t){return y.call(t)},_="[object Null]",g="[object Undefined]",E=l?l.toStringTag:void 0;var O=function(t){return null==t?void 0===t?g:_:E&&E in Object(t)?v(t):b(t)};var T=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},m="[object AsyncFunction]",I="[object Function]",A="[object GeneratorFunction]",w="[object Proxy]";var R,j=function(t){if(!T(t))return!1;var e=O(t);return e==I||e==A||e==m||e==w},N=s["__core-js_shared__"],P=(R=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+R:"";var D=function(t){return!!P&&P in t},S=Function.prototype.toString;var C=function(t){if(null!=t){try{return S.call(t)}catch(t){}try{return t+""}catch(t){}}return""},L=/^\[object .+?Constructor\]$/,k=Function.prototype,U=Object.prototype,x=k.toString,M=U.hasOwnProperty,F=RegExp("^"+x.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var z=function(t){return!(!T(t)||D(t))&&(j(t)?F:L).test(C(t))};var B=function(t,e){return null==t?void 0:t[e]};var G=function(t,e){var r=B(t,e);return z(r)?r:void 0},W=function(){try{var t=G(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var H=function(t,e,r){"__proto__"==e&&W?W(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var V=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===r(i[c],c,i))break}return e}}();var K=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Y=function(t){return null!=t&&"object"==typeof t},$="[object Arguments]";var J=function(t){return Y(t)&&O(t)==$},Z=Object.prototype,q=Z.hasOwnProperty,X=Z.propertyIsEnumerable,Q=J(function(){return arguments}())?J:function(t){return Y(t)&&q.call(t,"callee")&&!X.call(t,"callee")},tt=Array.isArray;var et=function(){return!1},rt=a((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?s.Buffer:void 0,i=(o?o.isBuffer:void 0)||et;t.exports=i})),nt=9007199254740991,ot=/^(?:0|[1-9]\d*)$/;var it=function(t,e){var r=typeof t;return!!(e=null==e?nt:e)&&("number"==r||"symbol"!=r&&ot.test(t))&&t>-1&&t%1==0&&t<e},at=9007199254740991;var ut=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=at},ct={};ct["[object Float32Array]"]=ct["[object Float64Array]"]=ct["[object Int8Array]"]=ct["[object Int16Array]"]=ct["[object Int32Array]"]=ct["[object Uint8Array]"]=ct["[object Uint8ClampedArray]"]=ct["[object Uint16Array]"]=ct["[object Uint32Array]"]=!0,ct["[object Arguments]"]=ct["[object Array]"]=ct["[object ArrayBuffer]"]=ct["[object Boolean]"]=ct["[object DataView]"]=ct["[object Date]"]=ct["[object Error]"]=ct["[object Function]"]=ct["[object Map]"]=ct["[object Number]"]=ct["[object Object]"]=ct["[object RegExp]"]=ct["[object Set]"]=ct["[object String]"]=ct["[object WeakMap]"]=!1;var st=function(t){return Y(t)&&ut(t.length)&&!!ct[O(t)]};var lt=function(t){return function(e){return t(e)}},ft=a((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&u.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i})),dt=ft&&ft.isTypedArray,ht=dt?lt(dt):st,pt=Object.prototype.hasOwnProperty;var vt=function(t,e){var r=tt(t),n=!r&&Q(t),o=!r&&!n&&rt(t),i=!r&&!n&&!o&&ht(t),a=r||n||o||i,u=a?K(t.length,String):[],c=u.length;for(var s in t)!e&&!pt.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||it(s,c))||u.push(s);return u},yt=Object.prototype;var bt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||yt)};var _t=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),gt=Object.prototype.hasOwnProperty;var Et=function(t){if(!bt(t))return _t(t);var e=[];for(var r in Object(t))gt.call(t,r)&&"constructor"!=r&&e.push(r);return e};var Ot=function(t){return null!=t&&ut(t.length)&&!j(t)};var Tt=function(t){return Ot(t)?vt(t):Et(t)};var mt=function(t,e){return t&&V(t,e,Tt)};var It=function(){this.__data__=[],this.size=0};var At=function(t,e){return t===e||t!=t&&e!=e};var wt=function(t,e){for(var r=t.length;r--;)if(At(t[r][0],e))return r;return-1},Rt=Array.prototype.splice;var jt=function(t){var e=this.__data__,r=wt(e,t);return!(r<0)&&(r==e.length-1?e.pop():Rt.call(e,r,1),--this.size,!0)};var Nt=function(t){var e=this.__data__,r=wt(e,t);return r<0?void 0:e[r][1]};var Pt=function(t){return wt(this.__data__,t)>-1};var Dt=function(t,e){var r=this.__data__,n=wt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function St(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}St.prototype.clear=It,St.prototype.delete=jt,St.prototype.get=Nt,St.prototype.has=Pt,St.prototype.set=Dt;var Ct=St;var Lt=function(){this.__data__=new Ct,this.size=0};var kt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var Ut=function(t){return this.__data__.get(t)};var xt=function(t){return this.__data__.has(t)},Mt=G(s,"Map"),Ft=G(Object,"create");var zt=function(){this.__data__=Ft?Ft(null):{},this.size=0};var Bt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gt="__lodash_hash_undefined__",Wt=Object.prototype.hasOwnProperty;var Ht=function(t){var e=this.__data__;if(Ft){var r=e[t];return r===Gt?void 0:r}return Wt.call(e,t)?e[t]:void 0},Vt=Object.prototype.hasOwnProperty;var Kt=function(t){var e=this.__data__;return Ft?void 0!==e[t]:Vt.call(e,t)},Yt="__lodash_hash_undefined__";var $t=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ft&&void 0===e?Yt:e,this};function Jt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Jt.prototype.clear=zt,Jt.prototype.delete=Bt,Jt.prototype.get=Ht,Jt.prototype.has=Kt,Jt.prototype.set=$t;var Zt=Jt;var qt=function(){this.size=0,this.__data__={hash:new Zt,map:new(Mt||Ct),string:new Zt}};var Xt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Qt=function(t,e){var r=t.__data__;return Xt(e)?r["string"==typeof e?"string":"hash"]:r.map};var te=function(t){var e=Qt(this,t).delete(t);return this.size-=e?1:0,e};var ee=function(t){return Qt(this,t).get(t)};var re=function(t){return Qt(this,t).has(t)};var ne=function(t,e){var r=Qt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function oe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}oe.prototype.clear=qt,oe.prototype.delete=te,oe.prototype.get=ee,oe.prototype.has=re,oe.prototype.set=ne;var ie=oe,ae=200;var ue=function(t,e){var r=this.__data__;if(r instanceof Ct){var n=r.__data__;if(!Mt||n.length<ae-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ie(n)}return r.set(t,e),this.size=r.size,this};function ce(t){var e=this.__data__=new Ct(t);this.size=e.size}ce.prototype.clear=Lt,ce.prototype.delete=kt,ce.prototype.get=Ut,ce.prototype.has=xt,ce.prototype.set=ue;var se=ce,le="__lodash_hash_undefined__";var fe=function(t){return this.__data__.set(t,le),this};var de=function(t){return this.__data__.has(t)};function he(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ie;++e<r;)this.add(t[e])}he.prototype.add=he.prototype.push=fe,he.prototype.has=de;var pe=he;var ve=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var ye=function(t,e){return t.has(e)},be=1,_e=2;var ge=function(t,e,r,n,o,i){var a=r&be,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(t);if(s&&i.get(e))return s==e;var l=-1,f=!0,d=r&_e?new pe:void 0;for(i.set(t,e),i.set(e,t);++l<u;){var h=t[l],p=e[l];if(n)var v=a?n(p,h,l,e,t,i):n(h,p,l,t,e,i);if(void 0!==v){if(v)continue;f=!1;break}if(d){if(!ve(e,(function(t,e){if(!ye(d,e)&&(h===t||o(h,t,r,n,i)))return d.push(e)}))){f=!1;break}}else if(h!==p&&!o(h,p,r,n,i)){f=!1;break}}return i.delete(t),i.delete(e),f},Ee=s.Uint8Array;var Oe=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var Te=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},me=1,Ie=2,Ae="[object Boolean]",we="[object Date]",Re="[object Error]",je="[object Map]",Ne="[object Number]",Pe="[object RegExp]",De="[object Set]",Se="[object String]",Ce="[object Symbol]",Le="[object ArrayBuffer]",ke="[object DataView]",Ue=l?l.prototype:void 0,xe=Ue?Ue.valueOf:void 0;var Me=function(t,e,r,n,o,i,a){switch(r){case ke:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Le:return!(t.byteLength!=e.byteLength||!i(new Ee(t),new Ee(e)));case Ae:case we:case Ne:return At(+t,+e);case Re:return t.name==e.name&&t.message==e.message;case Pe:case Se:return t==e+"";case je:var u=Oe;case De:var c=n&me;if(u||(u=Te),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;n|=Ie,a.set(t,e);var l=ge(u(t),u(e),n,o,i,a);return a.delete(t),l;case Ce:if(xe)return xe.call(t)==xe.call(e)}return!1};var Fe=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var ze=function(t,e,r){var n=e(t);return tt(t)?n:Fe(n,r(t))};var Be=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i};var Ge=function(){return[]},We=Object.prototype.propertyIsEnumerable,He=Object.getOwnPropertySymbols,Ve=He?function(t){return null==t?[]:(t=Object(t),Be(He(t),(function(e){return We.call(t,e)})))}:Ge;var Ke=function(t){return ze(t,Tt,Ve)},Ye=1,$e=Object.prototype.hasOwnProperty;var Je=function(t,e,r,n,o,i){var a=r&Ye,u=Ke(t),c=u.length;if(c!=Ke(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:$e.call(e,l)))return!1}var f=i.get(t);if(f&&i.get(e))return f==e;var d=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var p=t[l=u[s]],v=e[l];if(n)var y=a?n(v,p,l,e,t,i):n(p,v,l,t,e,i);if(!(void 0===y?p===v||o(p,v,r,n,i):y)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var b=t.constructor,_=e.constructor;b!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(d=!1)}return i.delete(t),i.delete(e),d},Ze=G(s,"DataView"),qe=G(s,"Promise"),Xe=G(s,"Set"),Qe=G(s,"WeakMap"),tr=C(Ze),er=C(Mt),rr=C(qe),nr=C(Xe),or=C(Qe),ir=O;(Ze&&"[object DataView]"!=ir(new Ze(new ArrayBuffer(1)))||Mt&&"[object Map]"!=ir(new Mt)||qe&&"[object Promise]"!=ir(qe.resolve())||Xe&&"[object Set]"!=ir(new Xe)||Qe&&"[object WeakMap]"!=ir(new Qe))&&(ir=function(t){var e=O(t),r="[object Object]"==e?t.constructor:void 0,n=r?C(r):"";if(n)switch(n){case tr:return"[object DataView]";case er:return"[object Map]";case rr:return"[object Promise]";case nr:return"[object Set]";case or:return"[object WeakMap]"}return e});var ar=ir,ur=1,cr="[object Arguments]",sr="[object Array]",lr="[object Object]",fr=Object.prototype.hasOwnProperty;var dr=function(t,e,r,n,o,i){var a=tt(t),u=tt(e),c=a?sr:ar(t),s=u?sr:ar(e),l=(c=c==cr?lr:c)==lr,f=(s=s==cr?lr:s)==lr,d=c==s;if(d&&rt(t)){if(!rt(e))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new se),a||ht(t)?ge(t,e,r,n,o,i):Me(t,e,c,r,n,o,i);if(!(r&ur)){var h=l&&fr.call(t,"__wrapped__"),p=f&&fr.call(e,"__wrapped__");if(h||p){var v=h?t.value():t,y=p?e.value():e;return i||(i=new se),o(v,y,r,n,i)}}return!!d&&(i||(i=new se),Je(t,e,r,n,o,i))};var hr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Y(e)&&!Y(r)?e!=e&&r!=r:dr(e,r,n,o,t,i))},pr=1,vr=2;var yr=function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=r[o])[0],s=t[c],l=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var f=new se;if(n)var d=n(s,l,c,t,e,f);if(!(void 0===d?hr(l,s,pr|vr,n,f):d))return!1}}return!0};var br=function(t){return t==t&&!T(t)};var _r=function(t){for(var e=Tt(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,br(o)]}return e};var gr=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Er=function(t){var e=_r(t);return 1==e.length&&e[0][2]?gr(e[0][0],e[0][1]):function(r){return r===t||yr(r,t,e)}},Or="[object Symbol]";var Tr=function(t){return"symbol"==typeof t||Y(t)&&O(t)==Or},mr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ir=/^\w*$/;var Ar=function(t,e){if(tt(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Tr(t))||(Ir.test(t)||!mr.test(t)||null!=e&&t in Object(e))},wr="Expected a function";function Rr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(wr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Rr.Cache||ie),r}Rr.Cache=ie;var jr=Rr,Nr=500;var Pr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/\\(\\)?/g,Sr=function(t){var e=jr(t,(function(t){return r.size===Nr&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pr,(function(t,r,n,o){e.push(n?o.replace(Dr,"$1"):r||t)})),e}));var Cr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Lr=1/0,kr=l?l.prototype:void 0,Ur=kr?kr.toString:void 0;var xr=function t(e){if("string"==typeof e)return e;if(tt(e))return Cr(e,t)+"";if(Tr(e))return Ur?Ur.call(e):"";var r=e+"";return"0"==r&&1/e==-Lr?"-0":r};var Mr=function(t){return null==t?"":xr(t)};var Fr=function(t,e){return tt(t)?t:Ar(t,e)?[t]:Sr(Mr(t))},zr=1/0;var Br=function(t){if("string"==typeof t||Tr(t))return t;var e=t+"";return"0"==e&&1/t==-zr?"-0":e};var Gr=function(t,e){for(var r=0,n=(e=Fr(e,t)).length;null!=t&&r<n;)t=t[Br(e[r++])];return r&&r==n?t:void 0};var Wr=function(t,e,r){var n=null==t?void 0:Gr(t,e);return void 0===n?r:n};var Hr=function(t,e){return null!=t&&e in Object(t)};var Vr=function(t,e,r){for(var n=-1,o=(e=Fr(e,t)).length,i=!1;++n<o;){var a=Br(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&ut(o)&&it(a,o)&&(tt(t)||Q(t))};var Kr=function(t,e){return null!=t&&Vr(t,e,Hr)},Yr=1,$r=2;var Jr=function(t,e){return Ar(t)&&br(e)?gr(Br(t),e):function(r){var n=Wr(r,t);return void 0===n&&n===e?Kr(r,t):hr(e,n,Yr|$r)}};var Zr=function(t){return t};var qr=function(t){return function(e){return null==e?void 0:e[t]}};var Xr=function(t){return function(e){return Gr(e,t)}};var Qr=function(t){return Ar(t)?qr(Br(t)):Xr(t)};var tn=function(t){return"function"==typeof t?t:null==t?Zr:"object"==typeof t?tt(t)?Jr(t[0],t[1]):Er(t):Qr(t)};var en=function(t,e){var r={};return e=tn(e),mt(t,(function(t,n,o){H(r,n,e(t,n,o))})),r},rn={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};var nn=["Webkit","ms","Moz","O"];Object.keys(rn).forEach((function(t){nn.forEach((function(e){rn[function(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}(e,t)]=rn[t]}))}));var on={isUnitlessNumber:rn,shorthandPropertyExpansions:{background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}}};var an=function(e){var r=e.css,n={};return Object.entries(r).forEach((function(t){var e=t[0],r=t[1];if("number"==typeof r)return on.isUnitlessNumber[e]?void(n[e]=""+r):void(n[e]=r+"px");n[e]=r})),t(t({},e),{css:t(t({},n),{boxSizing:"border-box"})})},un=function(e){return en(e,(function(e){var r=e;return"Typography"===r.type&&(r=function(e){var r=Wr(e,"data.custom.variant","P");return t(t({},e),{type:r})}(r)),r.css&&T(r.css)&&r.css.flexBasis&&(r=function(e){var r=e.css.flexBasis;return"0"===r||"0px"===r?t(t({},e),{css:t(t({},e.css),{flexBasis:"0%"})}):e}(r)),r.css&&(r=an(r)),r}))};var cn,sn,ln,fn,dn,hn,pn="/api/checklistItems",vn="/api/segmentMemberships",yn="/api/segmentsDefinition",bn="/api/tutorialMetadata",_n="/api/tutorialDocumentsSdk",gn="wss://2jcfb7pjlf.execute-api.eu-west-1.amazonaws.com/prod",En=function(t){if(!document.querySelectorAll('[href="'+t+'"]').length){var e=document.createElement("link");e.setAttribute("rel","prefetch"),e.setAttribute("href",t),document.head.appendChild(e)}},On=function(t,e){t&&tt(t)&&t.map((function(t){var r=t.nodeType,n=t.url;return En("EmbedTutorial"===r?"https://cdn.candu.ai/tutorials/"+e+"/"+n+".json":"EmbedPortal"===r?"https://cdn.candu.ai/portals/"+e+"/"+n+"/head.json":n)}))},Tn=function(){function t(t){this.adjacencyList={},this.rootDocument=t,this.adjacencyList[t]=[]}return t.prototype.get=function(t){return this.adjacencyList[t]},t.prototype.add=function(t,e){var r=this;if(this.adjacencyList[t]||(this.adjacencyList[t]=[]),!this.adjacencyList[e])return this.adjacencyList[t].push(e),this.adjacencyList[e]=[],!0;if(this.adjacencyList[t].includes(e))return!0;var n=function(e){if(e===t)return!0;for(var o=0,i=r.adjacencyList[e];o<i.length;o++){var a=i[o];if(n(a))return!0}return!1};return!n(e)&&(this.adjacencyList[t].push(e),!0)},t}(),mn=function(t,e){return{id:t,dependencies:e?e.dependencies:new Tn(t)}},In=function(t,e){return t.dependencies.add(t.id,e)},An="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},wn="object"==typeof An&&An&&An.Object===Object&&An,Rn="object"==typeof self&&self&&self.Object===Object&&self,jn=(wn||Rn||Function("return this")()).Symbol,Nn=Object.prototype,Pn=Nn.hasOwnProperty,Dn=Nn.toString,Sn=jn?jn.toStringTag:void 0,Cn=Object.prototype.toString,Ln=jn?jn.toStringTag:void 0,kn=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Ln&&Ln in Object(t)?function(t){var e=Pn.call(t,Sn),r=t[Sn];try{t[Sn]=void 0;var n=!0}catch(t){}var o=Dn.call(t);return n&&(e?t[Sn]=r:delete t[Sn]),o}(t):function(t){return Cn.call(t)}(t)},Un=Array.isArray,xn=function(t){return null!=t&&"object"==typeof t},Mn=function(t){return"string"==typeof t||!Un(t)&&xn(t)&&"[object String]"==kn(t)},Fn=/^([a-zA-Z0-9]|_|-)+$/,zn=function(t){return function(t){return"number"==typeof t||xn(t)&&"[object Number]"==kn(t)}(t)&&t>=0};!function(t){t.SDK="SDK",t.PREVIEW="PREVIEW"}(cn||(cn={})),function(t){t.BOOTSTRAP="Bootstrap",t.CHANGE_POSITION="ChangePosition",t.CLOSE_PREVIEW="ClosePreview",t.PREVIEW_LOADED="PreviewLoaded",t.SET_AVALIABLE_PORTALS="SetAvaliablePortals",t.SET_CONTENT="SetContent",t.SET_SELECTED_ELEMENT="SetSelectedElement",t.SET_VIEW_MODE="SetViewMode",t.ADD_ELEMENT="AddElement",t.REMOVE_ELEMENT="RemoveElement",t.UPDATE_ELEMENT="UpdateElement",t.SET_ELEMENT="SetElement"}(sn||(sn={})),(ln||(ln={})).ON_CLICK="OnClick",function(t){t.NATIVE="Native",t.PENDO="Pendo"}(fn||(fn={})),function(t){t.NAVIGATE="Navigate",t.CHANGE_TUTORIAL="ChangeTutorial",t.OPEN_GUIDE="OpenGuide"}(dn||(dn={})),function(t){t.PRIMARY="primary",t.SECONDARY="primary",t.WARNING="warning",t.DANGER="danger",t.NEUTRAL="neutral",t.ACTIVE="active",t.INFO="info"}(hn||(hn={}));var Bn;hn.PRIMARY;!function(t){t.U="U",t.B="B",t.Em="Em",t.InlineCode="InlineCode"}(Bn||(Bn={}));var Gn,Wn,Hn,Vn,Kn,Yn,$n,Jn=function(t){return function(t){return Mn(t)&&t.length>=3&&t.length<100&&Fn.test(t)}(t)};!function(t){t.NotStared="NotStarted",t.InProgress="InProgress",t.Done="Done"}(Gn||(Gn={})),function(t){t.COLLAPSED="Collapsed",t.EXPANDED="Expanded",t.MINIMIZED="Minimized"}(Wn||(Wn={})),function(t){t.TUTORIAL="Tutorial",t.PORTAL="Portal"}(Hn||(Hn={})),function(t){t.Global="Global",t.Organization="Organization"}(Vn||(Vn={})),function(t){t.Root="root",t.Rule="rule",t.Atrule="atrule",t.Decl="decl",t.Any="any"}(Kn||(Kn={})),function(t){t.Global="Global",t.Carried="Carried"}(Yn||(Yn={})),function(t){t.CanduCdn="CanduCdn",t.CheckListApi="CheckListApi"}($n||($n={}));for(var Zn,qn=function(e,r){var n=r.reduce((function(e,r){var n;return t(t({},e),((n={})[r]=r,n))}),{});return e.content.find((function(t){var e=t.segmentId;return!!n[e]||"Everyone"===e}))},Xn=function(t){return"candu.sdk."+t},Qn=function(t){return Xn("error."+t)},to={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",PROVIDER_ERROR:"provider_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},eo={HEARTBEAT:Xn("heartbeat"),PREVIEW_OPEN:Xn("preview.open"),PORTAL:Xn("portal"),TUTORIAL:Xn("tutorial"),TUTORIAL_INTERACTION:Xn("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:Qn("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:Qn("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:Qn("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:Qn("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:Qn("commit_api"),TUTORIAL_LOADING_ERROR:Qn("tutorial"),UNKOWN_NODE_TYPE:Qn(to.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:Qn(to.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:Qn(to.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:Qn(to.TUTORIAL_ERROR),PORTAL_ERROR:Qn(to.PORTAL_ERROR),PROVIDER_ERROR:Qn(to.PROVIDER_ERROR),STYLEGUIDE_MAP_ERROR:Qn(to.TUTORIAL_ERROR),RENDER_NODE_ERROR:Qn(to.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:Qn("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:Qn("circular_dependecy_embed_tutorial"),STATE_FETCH_FAILED:Qn("state_fetch_failed"),STATE_UPDATE_FAILED:Qn("state_update_failed")},ro=function(t){return"An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: "+t+"."},no=((Zn={EVENTING_NOT_INITIALIZED:"You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n"})[eo.PORTAL_ASSET_NOT_FOUND]="Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",Zn[eo.PORTAL_NO_SEGMENT_IDS]="You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",Zn[eo.NO_MATCHING_TUTORIALS]="The Tutorial will not be rendered because there are no matching segments for the given user.",Zn[eo.NO_VALID_TUTORIAL_IDENTIFIER]="(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",Zn[eo.TUTORIAL_LOADING_ERROR]="An error has occurred while trying to load the Tutorial",Zn[eo.UNKOWN_INLINE_NODE_TYPE]=ro(to.UNKOWN_INLINE_NODE_TYPE),Zn[eo.UNKOWN_NODE_TYPE]=ro(to.UNKOWN_NODE_TYPE),Zn[eo.CIRCULAR_DEPENDENCY_EMBED_PORTAL]="Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",Zn[eo.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]="Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",Zn[eo.PORTAL_ERROR]="An error has occured within Portal",Zn[eo.PROVIDER_ERROR]="An error has occured within Provider",Zn[eo.TUTORIAL_ERROR]="An error has occured within Tutorial",Zn[eo.RENDER_NODE_ERROR]="An error has occured while rendering tutorial node",Zn[eo.STYLEGUIDE_MAP_ERROR]="An error has occured while mapping node to styleguide",Zn[eo.STATE_FETCH_FAILED]="An error has occured while fetching state:",Zn[eo.STATE_UPDATE_FAILED]="An error has occured while updating state:",Zn),oo={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},io={error:console.error,warning:console.warn},ao=function(t){var e=t.identify,r=t.track;return{provider:function(t){var n=t.userId,o=t.traits,i=t.styleguide;e(n,o),r(eo.HEARTBEAT,function(t){var e={};return Object.keys(t).forEach((function(r){oo[r]&&(e["styleguide."+r]=t[r].displayName||!0)})),e}(i))},tutorialDocumentLoadingError:function(t){var e=t.tutorialId,n=t.slug,o=t.contentHashId;io.error(no[eo.TUTORIAL_LOADING_ERROR]),r(eo.TUTORIAL_LOADING_ERROR,{tutorialId:e,slug:n,contentHashId:o})}}},uo=function(t,e){return function(t){var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}}(e={exports:{}}),e.exports}(),co=[],so=0;so<256;++so)co[so]=(so+256).toString(16).substr(1);var lo,fo,ho=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||uo)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||function(t,e){var r=e||0,n=co;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")}(o)};!function(t){t.UserGenerated="UserGenerated",t.SDK="SDK"}(lo||(lo={})),function(t){t.Identify="Identify",t.Group="Group",t.Track="Track",t.Page="Page",t.Screen="Screen"}(fo||(fo={}));var po,vo=function(){return"undefined"!=typeof window&&window.localStorage},yo=function(t){return function(e){vo()&&null!=e&&window.localStorage.setItem(t,JSON.stringify(e))}},bo={anonymousId:{getOrCreate:("candu:anonymous_id",po=function(){var t=ho();return yo("candu:anonymous_id")(t),t},function(){return function(){if(vo()){var t=window.localStorage.getItem("candu:anonymous_id");if(t)try{return JSON.parse(t)}catch(t){return null}}}()||po()}),set:yo("candu:anonymous_id")}}.anonymousId.getOrCreate,_o=function(t,e,r,n,o,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,o,i,a,u],l=0;(c=new Error(e.replace(/%s/g,(function(){return s[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}},go=function(t){return _o(!t||T(t),"(Candu) styleguide must be undefined or an object")},Eo=function(r){var n=r.clientToken,o=r.userId,i=r.traits,a=r.options,u=r.styleguide,c=e(r,["clientToken","userId","traits","options","styleguide"]);return _o(function(t){return Mn(t)&&!!t.match(/^[0-9a-zA-Z]*$/)&&t.length>=10}(n),"(Candu) you must provide a valid clientToken"),_o(!o||function(t){return zn(t)||Mn(t)&&t.trim().length>0}(o),"(Candu) you must provide a valid userId"),go(u),_o(!i||T(i),"(Candu) traits must be undefined or an object"),_o(!a||T(a),"(Candu) options must be undefined or an object"),t(t({},c),{clientToken:n,traits:i||{},options:a||{},styleguide:u||{},userId:o||bo()})},Oo=function(r){var n=r.slug,o=r.styleguide,i=r.contentHashId,a=r.tutorialId,u=r.tutorialDocument,c=r.renderedByClient,s=e(r,["slug","styleguide","contentHashId","tutorialId","tutorialDocument","renderedByClient"]);return go(o),t(t({},s),{slug:n,styleguide:o||{},contentHashId:i,tutorialId:a,tutorialDocument:u,renderedByClient:c})},To=function(t){var e=t.slug,r=t.styleguide;return go(r),{slug:e,styleguide:r||{}}},mo=function(t){return r(void 0,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[2,e.sent().json()]}}))}))},Io=function(t){return mo("https://api.candu.ai"+t)},Ao=function(t){return mo("https://cdn.candu.ai"+t)},wo={tutorialDocumentLatestSaved:function(t,e){return r(void 0,void 0,void 0,(function(){return n(this,(function(r){return[2,Io(_n+"/"+e+"?token="+t)]}))}))},portalAsset:function(t,e){return r(void 0,void 0,void 0,(function(){return n(this,(function(r){return[2,Ao("/portals/"+t+"/"+e+"/head.json")]}))}))},segmentMembership:function(t,e){return r(void 0,void 0,void 0,(function(){return n(this,(function(r){return[2,Io(vn+"/"+e+"?token="+t)]}))}))},segmentDefinition:function(t){return r(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,Io(yn+"?token="+t)]}))}))},tutorialMetadata:function(t){return r(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2,Io(bn+"?token="+t)]}))}))},tutorialSocket:function(t,e,r){var n=new WebSocket(gn+"?clientToken="+t+"&tutorialId="+e);return n.onmessage=function(t){var e=JSON.parse(t.data);r(e)},function(){return n.close()}},tutorialDocument:function(t,e,r){var n=t.contentHashId,o=t.tutorialId,i=t.tutorialDocument,a=t.slug,u=function(t){return{byId:function(e){return Io(_n+"?token="+t+"&finder=latestPublished&tutorialId="+e)},bySlug:function(e){return Ao("/tutorials/"+t+"/"+e+".json")},byContentHash:function(e){return Ao("/tutorials/"+t+"/"+e+".json")}}}(e);return Jn(a)?u.bySlug(a):function(t){return zn(t)}(o)?u.byId(o):function(t){return Mn(t)&&!!t.match(/^[0-9a-zA-Z]{40}$/)}(n)?u.byContentHash(n):T(i)?Promise.resolve(i):(io.error(no[eo.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(eo.NO_VALID_TUTORIAL_IDENTIFIER,{slug:t.slug}),null)}},Ro=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.error.apply(console,t)},jo=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.warn.apply(console,t)},No={error:Ro,warning:jo},Po=function(t){return t.replace(/\s/g," ")},Do=function(t){return DOMParser?(new DOMParser).parseFromString(t,"text/html").body.textContent||"":t},So=function(){function t(){this.subscribers=[]}return t.prototype.subscribe=function(t){var e=this;return this.subscribers.push(t),function(){e.subscribers[e.subscribers.indexOf(t)]=function(){}}},t.prototype.notify=function(t){this.subscribers.forEach((function(e){return e(t)}))},t.prototype.clear=function(){this.subscribers=[]},t}(),Co=function(){function t(){this.onClientUpdateObserver=new So}return t.prototype.attachClient=function(t){this.client=t,this.onClientUpdateObserver.notify({client:t})},t.prototype.detachClient=function(){this.client&&(this.client=null,this.onClientUpdateObserver.notify({client:null}))},t.prototype.onClientUpdate=function(t){var e=this.onClientUpdateObserver.subscribe(t);return this.client&&t({client:this.client}),e},t}();function Lo(t){var e,r,n=function(t){return function(){for(var e,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(r.api)return(e=r.api)[t].apply(e,n);console.warn("Please initialize the SDK by calling Candu.init() before attempting to call "+t)}};return(e=function(){function e(){}return e.init=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return this.api||(e.api=new(t.bind.apply(t,o([void 0],r)))),e.subscriberCallbacks.forEach((function(t){return t()})),e.subscriberCallbacks=[],window.postMessage({source:"CANDU_SINGLETON",payload:{type:"INIT"}},window&&window.origin?window.origin:"*"),e},e.onProviderReady=function(t){if(e.api)return t();e.subscriberCallbacks.push(t)},e}()).subscriberCallbacks=[],e.renderTutorial=n("renderTutorial"),e.renderPortal=n("renderPortal"),e.attachClient=n("attachClient"),e.detachClient=n("detachClient"),e.getProvider=n("getProvider"),r=e,window.Candu=r,r}var ko=function(){function t(t){this.init(t)}return t.prototype.attachClient=function(t){return this.provider.preview.attachClient(t)},t.prototype.detachClient=function(){return this.provider.preview.detachClient()},Object.defineProperty(t.prototype,"provider",{get:function(){return this.getProvider()},enumerable:!0,configurable:!0}),t}(),Uo=function(t){switch(t.trigger){case ln.ON_CLICK:default:return"onClick"}},xo=function(e,r){var n=e.data;if(!n||!n.actions)return{};var o=function(e){r.provider.eventing.track(eo.TUTORIAL_INTERACTION,t(t({},e),r.trackingIdentifiers||{}))};return n.actions.map((function(t){return function(t,e){var r,n,o;switch(t.handler.type){case dn.NAVIGATE:return(r={})[Uo(t)]=function(){var r=t.handler,n=r.href,o=r.target;e(t),"Blank"===o?window.open(n,"_blank"):n&&n.includes("mailto:")?window.location=n:document.location.href=n},r;case dn.CHANGE_TUTORIAL:return(n={})[Uo(t)]=function(){var e=t.handler.tutorialId;Ro("TODO -> change tutorial",e)},n;case dn.OPEN_GUIDE:return(o={})[Uo(t)]=function(){var e=t.handler.guideId;Ro("TODO -> open guide",e)},o;default:return{}}}(t,o)})).reduce((function(e,r){return t(t({},e),r)}),{})},Mo=function(t,e){var r=t.props||{},n=t.nodes,o=r.children;return o||(n?n.map(e):null)},Fo=function(e,r){try{var n=r.provider,o=r.document,i=r.trackingIdentifiers,a=o.nodes[e];if(!a)return No.error("Document is corrupted. Refusing to move further."),null;var u=function(t){return Fo(t,r)},c=a.type,s=a.props,l=a.css,f=a.states,d=t(t(t({},s||{}),{style:l||{},children:Mo(a,u)}),xo(a,{trackingIdentifiers:i,provider:n})),h={nodeId:e,node:a,document:o,render:{node:u,styleguide:function(t,e){return void 0===e&&(e={}),r.renderNode(t,{api:h,attributes:e})},tutorial:function(t){return r.renderTutorial(t)},portal:function(t){return r.renderPortal(t)}},trackingIdentifiers:i,stateInstances:f&&r.stateProviderInstances.filter((function(t){return!!f[t.providerId]}))},p=h.render.styleguide(c,d);return p||(No.error(no[eo.UNKOWN_NODE_TYPE],{type:c}),n.eventing.track(eo.UNKOWN_NODE_TYPE,{type:c}),null)}catch(t){return No.error(no[eo.STYLEGUIDE_MAP_ERROR],t),null}},zo=jr((function(e,r){var n,o,i=e.provider,a=e.portal,u=e.tutorial,c=i.styleguide;return u&&(o=u.styleguide),a&&(n=a.styleguide),t(t(t(t({},c||{}),n||{}),o||{}),r||{})})),Bo="",Go="#EDEDED",Wo="#333745",Ho="#838792",Vo="#FEFEFE",Ko="#FEFEFE",Yo={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},$o=function(t){return"candu-styleguide-"+t},Jo=function(t){var e=$o(t);if(!document.getElementById(e)){var r=document.createElement("link");r.setAttribute("id",e),r.setAttribute("rel","stylesheet"),r.setAttribute("href","https://cdn.candu.ai/styleguides/applications/"+t+"/default/main.css"),document.head.appendChild(r)}},Zo=function(t){var e=document.getElementById($o(t));e&&e.remove()};var qo=function(t,e){return function(r,n){if(null==r)return r;if(!Ot(r))return t(r,n);for(var o=r.length,i=e?o:-1,a=Object(r);(e?i--:++i<o)&&!1!==n(a[i],i,a););return r}}(mt);var Xo=function(t,e){var r=-1,n=Ot(t)?Array(t.length):[];return qo(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var Qo,ti=function(t,e){return(tt(t)?Cr:Xo)(t,tn(e))},ei=function(){function t(t,e){if("function"!=typeof t)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: "+t+".");this._batchLoadFn=t,this._maxBatchSize=function(t){if(t&&!1===t.batch)return 1;var e=t&&t.maxBatchSize;if(void 0===e)return 1/0;if("number"!=typeof e||e<1)throw new TypeError("maxBatchSize must be a positive number: "+e);return e}(e),this._batchScheduleFn=function(t){var e=t&&t.batchScheduleFn;if(void 0===e)return ri;if("function"!=typeof e)throw new TypeError("batchScheduleFn must be a function: "+e);return e}(e),this._cacheKeyFn=function(t){var e=t&&t.cacheKeyFn;if(void 0===e)return function(t){return t};if("function"!=typeof e)throw new TypeError("cacheKeyFn must be a function: "+e);return e}(e),this._cacheMap=function(t){if(t&&!1===t.cache)return null;var e=t&&t.cacheMap;if(void 0===e)return new Map;if(null!==e){var r=["get","set","delete","clear"].filter((function(t){return e&&"function"!=typeof e[t]}));if(0!==r.length)throw new TypeError("Custom cacheMap missing methods: "+r.join(", "))}return e}(e),this._batch=null}var e=t.prototype;return e.load=function(t){if(null==t)throw new TypeError("The loader.load() function must be called with a value,but got: "+String(t)+".");var e=function(t){var e=t._batch;if(null!==e&&!e.hasDispatched&&e.keys.length<t._maxBatchSize&&(!e.cacheHits||e.cacheHits.length<t._maxBatchSize))return e;var r={hasDispatched:!1,keys:[],callbacks:[]};return t._batch=r,t._batchScheduleFn((function(){return function(t,e){if(e.hasDispatched=!0,0===e.keys.length)return void oi(e);var r=t._batchLoadFn(e.keys);if(!r||"function"!=typeof r.then)return ni(t,e,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise: "+String(r)+"."));r.then((function(t){if(!ii(t))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array: "+String(t)+".");if(t.length!==e.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys.\n\nKeys:\n"+String(e.keys)+"\n\nValues:\n"+String(t));oi(e);for(var r=0;r<e.callbacks.length;r++){var n=t[r];n instanceof Error?e.callbacks[r].reject(n):e.callbacks[r].resolve(n)}})).catch((function(r){return ni(t,e,r)}))}(t,r)})),r}(this),r=this._cacheMap,n=this._cacheKeyFn(t);if(r){var o=r.get(n);if(o){var i=e.cacheHits||(e.cacheHits=[]);return new Promise((function(t){i.push((function(){return t(o)}))}))}}e.keys.push(t);var a=new Promise((function(t,r){e.callbacks.push({resolve:t,reject:r})}));return r&&r.set(n,a),a},e.loadMany=function(t){if(!ii(t))throw new TypeError("The loader.loadMany() function must be called with Array<key> but got: "+t+".");for(var e=[],r=0;r<t.length;r++)e.push(this.load(t[r]).catch((function(t){return t})));return Promise.all(e)},e.clear=function(t){var e=this._cacheMap;if(e){var r=this._cacheKeyFn(t);e.delete(r)}return this},e.clearAll=function(){var t=this._cacheMap;return t&&t.clear(),this},e.prime=function(t,e){var r=this._cacheMap;if(r){var n,o=this._cacheKeyFn(t);if(void 0===r.get(o))e instanceof Error?(n=Promise.reject(e)).catch((function(){})):n=Promise.resolve(e),r.set(o,n)}return this},t}(),ri="object"==typeof process&&"function"==typeof process.nextTick?function(t){Qo||(Qo=Promise.resolve()),Qo.then((function(){return process.nextTick(t)}))}:setImmediate||setTimeout;function ni(t,e,r){oi(e);for(var n=0;n<e.keys.length;n++)t.clear(e.keys[n]),e.callbacks[n].reject(r)}function oi(t){if(t.cacheHits)for(var e=0;e<t.cacheHits.length;e++)t.cacheHits[e]()}function ii(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&(0===t.length||t.length>0&&Object.prototype.hasOwnProperty.call(t,t.length-1))}var ai=ei,ui="https://api.candu.ai"+pn;function ci(t){return{state:t.state,id:t.id}}var si=function(t,e,r){return fetch(ui+"?token="+t+"&userId="+e+"&finder=byIds&ids="+r.join(",")).then((function(t){return t.json()})).then((function(t){return t.map(ci)}))},li={};function fi(t,e){var o=this,i=t+"-"+e,a=li[i];if(!a){a=new ai((function(i){return r(o,void 0,void 0,(function(){var r;return n(this,(function(n){switch(n.label){case 0:return[4,si(t,e,i)];case 1:return r=n.sent(),[2,i.map((function(t){return r.find((function(e){return e.id===t}))}))]}}))}))})),li[i]=a}return a}var di=function(){function e(t){var e=t.context,r=t.providerId;this.type=$n.CheckListApi,this.clientToken=e.clientToken,this.providerId=r,this.userId=e.userId}return e.prototype.retrieve=function(){return r(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,fi(this.clientToken,this.userId).load(this.providerId)];case 1:return[2,t.sent()||{id:this.providerId,state:Gn.NotStared}]}}))}))},e.prototype.mutate=function(e){return r=this.clientToken,n=this.userId,o=this.providerId,i=e,fetch(ui+"/"+o+"?token="+r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t(t({},i),{userId:n.toString()}))}).then((function(t){return t.json()})).then(ci);var r,n,o,i},e}();var hi=function(){function e(t,e,r){var n=this;this.observer=new So,this.providerId=t,this.resolver=e,this.resolvedState=null,this.eventing=r,e.retrieve().then((function(t){return n.updateState(t)})).catch((function(t){No.error(no[eo.STATE_FETCH_FAILED],t.message),n.eventing.track(no[eo.STATE_FETCH_FAILED],{errorMessage:t.message})}))}return e.prototype.mutate=function(e){var r=this,n=this.resolvedState;this.updateState(t(t({},n),e)),this.resolver.mutate(e).then((function(t){return r.updateState(t)})).catch((function(t){No.error(no[eo.STATE_UPDATE_FAILED],t.message),r.eventing.track(no[eo.STATE_UPDATE_FAILED],{errorMessage:t.message}),n&&r.updateState(n)}))},e.prototype.subscribe=function(t){var e=this.observer.subscribe(t);return this.resolvedState&&t(this.resolvedState),e},e.prototype.updateState=function(t){this.resolvedState=t,this.observer.notify(t)},e}();function pi(t,e){return ti(t,(function(t,r){var n=function(t,e){switch(t.type){case $n.CheckListApi:return new di(e);default:throw new Error("Unsupported resolver type: "+t.type)}}(t.resolver,{providerId:r,context:e});return new hi(r,n,e.eventing)}))}export{Go as DEFAULT_ALERT_COLOR,Bo as DEFAULT_ALT,Vo as DEFAULT_TAB_ACTIVE_COLOR,Ko as DEFAULT_TAB_COLOR,Wo as DEFAULT_TAB_HEADER_COLOR,Ho as DEFAULT_TAB_ITEM_COLOR,no as ERROR_MESSAGES,to as ERROR_SLUGS,eo as EVENT_NAMES,io as LOGGER,So as Observer,Co as PreviewContainer,wo as RESOURCES,Yo as STYLEGUIDE_COLORS,ko as SingletonAPI,hi as StateProviderInstance,Tn as TutorialDependencies,un as adaptCustomNodes,Jo as attachStylesheet,In as checkCyclicAndAdd,Lo as createSingleton,mn as createTutorialDocumentContext,oo as defaultStyleguide,Zo as detachStylesheet,On as fetchHead,qn as findMatchingSegment,Po as includeHTMLWhitespaces,pi as initStateProviders,ao as internalEventing,Ro as logError,jo as logWarning,No as logger,Fo as mapNodeToStyleguide,zo as mergeStyleguidesFromContext,an as normalizeCss,To as portalValidation,Eo as providerValidation,Do as stripHTML,Oo as tutorialValidation}; | ||
//# sourceMappingURL=index.es.js.map |
@@ -15,3 +15,3 @@ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@candulabs/core"]={})}(this,(function(t){"use strict"; | ||
and limitations under the License. | ||
***************************************************************************** */var e=function(){return(e=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function r(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function n(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(a,u)}c((n=n.apply(t,e||[])).next())}))}function o(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function i(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)n[o]=i[a];return n}var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t,e){return t(e={exports:{}},e.exports),e.exports}var c="object"==typeof a&&a&&a.Object===Object&&a,s="object"==typeof self&&self&&self.Object===Object&&self,l=c||s||Function("return this")(),f=l.Symbol,d=Object.prototype,h=d.hasOwnProperty,p=d.toString,v=f?f.toStringTag:void 0;var y=function(t){var e=h.call(t,v),r=t[v];try{t[v]=void 0;var n=!0}catch(t){}var o=p.call(t);return n&&(e?t[v]=r:delete t[v]),o},_=Object.prototype.toString;var b=function(t){return _.call(t)},E="[object Null]",g="[object Undefined]",O=f?f.toStringTag:void 0;var T=function(t){return null==t?void 0===t?g:E:O&&O in Object(t)?y(t):b(t)};var m=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},A="[object AsyncFunction]",I="[object Function]",R="[object GeneratorFunction]",w="[object Proxy]";var j,N=function(t){if(!m(t))return!1;var e=T(t);return e==I||e==R||e==A||e==w},S=l["__core-js_shared__"],P=(j=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"";var D=function(t){return!!P&&P in t},C=Function.prototype.toString;var L=function(t){if(null!=t){try{return C.call(t)}catch(t){}try{return t+""}catch(t){}}return""},k=/^\[object .+?Constructor\]$/,U=Function.prototype,x=Object.prototype,M=U.toString,F=x.hasOwnProperty,B=RegExp("^"+M.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var z=function(t){return!(!m(t)||D(t))&&(N(t)?B:k).test(L(t))};var G=function(t,e){return null==t?void 0:t[e]};var V=function(t,e){var r=G(t,e);return z(r)?r:void 0},H=function(){try{var t=V(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var W=function(t,e,r){"__proto__"==e&&H?H(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var K=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===r(i[c],c,i))break}return e}}();var Y=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var $=function(t){return null!=t&&"object"==typeof t},J="[object Arguments]";var Z=function(t){return $(t)&&T(t)==J},q=Object.prototype,X=q.hasOwnProperty,Q=q.propertyIsEnumerable,tt=Z(function(){return arguments}())?Z:function(t){return $(t)&&X.call(t,"callee")&&!Q.call(t,"callee")},et=Array.isArray;var rt=function(){return!1},nt=u((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?l.Buffer:void 0,i=(o?o.isBuffer:void 0)||rt;t.exports=i})),ot=9007199254740991,it=/^(?:0|[1-9]\d*)$/;var at=function(t,e){var r=typeof t;return!!(e=null==e?ot:e)&&("number"==r||"symbol"!=r&&it.test(t))&&t>-1&&t%1==0&&t<e},ut=9007199254740991;var ct=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=ut},st={};st["[object Float32Array]"]=st["[object Float64Array]"]=st["[object Int8Array]"]=st["[object Int16Array]"]=st["[object Int32Array]"]=st["[object Uint8Array]"]=st["[object Uint8ClampedArray]"]=st["[object Uint16Array]"]=st["[object Uint32Array]"]=!0,st["[object Arguments]"]=st["[object Array]"]=st["[object ArrayBuffer]"]=st["[object Boolean]"]=st["[object DataView]"]=st["[object Date]"]=st["[object Error]"]=st["[object Function]"]=st["[object Map]"]=st["[object Number]"]=st["[object Object]"]=st["[object RegExp]"]=st["[object Set]"]=st["[object String]"]=st["[object WeakMap]"]=!1;var lt=function(t){return $(t)&&ct(t.length)&&!!st[T(t)]};var ft=function(t){return function(e){return t(e)}},dt=u((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&c.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i})),ht=dt&&dt.isTypedArray,pt=ht?ft(ht):lt,vt=Object.prototype.hasOwnProperty;var yt=function(t,e){var r=et(t),n=!r&&tt(t),o=!r&&!n&&nt(t),i=!r&&!n&&!o&&pt(t),a=r||n||o||i,u=a?Y(t.length,String):[],c=u.length;for(var s in t)!e&&!vt.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||at(s,c))||u.push(s);return u},_t=Object.prototype;var bt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||_t)};var Et=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),gt=Object.prototype.hasOwnProperty;var Ot=function(t){if(!bt(t))return Et(t);var e=[];for(var r in Object(t))gt.call(t,r)&&"constructor"!=r&&e.push(r);return e};var Tt=function(t){return null!=t&&ct(t.length)&&!N(t)};var mt=function(t){return Tt(t)?yt(t):Ot(t)};var At=function(t,e){return t&&K(t,e,mt)};var It=function(){this.__data__=[],this.size=0};var Rt=function(t,e){return t===e||t!=t&&e!=e};var wt=function(t,e){for(var r=t.length;r--;)if(Rt(t[r][0],e))return r;return-1},jt=Array.prototype.splice;var Nt=function(t){var e=this.__data__,r=wt(e,t);return!(r<0)&&(r==e.length-1?e.pop():jt.call(e,r,1),--this.size,!0)};var St=function(t){var e=this.__data__,r=wt(e,t);return r<0?void 0:e[r][1]};var Pt=function(t){return wt(this.__data__,t)>-1};var Dt=function(t,e){var r=this.__data__,n=wt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Ct(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ct.prototype.clear=It,Ct.prototype.delete=Nt,Ct.prototype.get=St,Ct.prototype.has=Pt,Ct.prototype.set=Dt;var Lt=Ct;var kt=function(){this.__data__=new Lt,this.size=0};var Ut=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var xt=function(t){return this.__data__.get(t)};var Mt=function(t){return this.__data__.has(t)},Ft=V(l,"Map"),Bt=V(Object,"create");var zt=function(){this.__data__=Bt?Bt(null):{},this.size=0};var Gt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Vt="__lodash_hash_undefined__",Ht=Object.prototype.hasOwnProperty;var Wt=function(t){var e=this.__data__;if(Bt){var r=e[t];return r===Vt?void 0:r}return Ht.call(e,t)?e[t]:void 0},Kt=Object.prototype.hasOwnProperty;var Yt=function(t){var e=this.__data__;return Bt?void 0!==e[t]:Kt.call(e,t)},$t="__lodash_hash_undefined__";var Jt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Bt&&void 0===e?$t:e,this};function Zt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Zt.prototype.clear=zt,Zt.prototype.delete=Gt,Zt.prototype.get=Wt,Zt.prototype.has=Yt,Zt.prototype.set=Jt;var qt=Zt;var Xt=function(){this.size=0,this.__data__={hash:new qt,map:new(Ft||Lt),string:new qt}};var Qt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var te=function(t,e){var r=t.__data__;return Qt(e)?r["string"==typeof e?"string":"hash"]:r.map};var ee=function(t){var e=te(this,t).delete(t);return this.size-=e?1:0,e};var re=function(t){return te(this,t).get(t)};var ne=function(t){return te(this,t).has(t)};var oe=function(t,e){var r=te(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ie(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ie.prototype.clear=Xt,ie.prototype.delete=ee,ie.prototype.get=re,ie.prototype.has=ne,ie.prototype.set=oe;var ae=ie,ue=200;var ce=function(t,e){var r=this.__data__;if(r instanceof Lt){var n=r.__data__;if(!Ft||n.length<ue-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ae(n)}return r.set(t,e),this.size=r.size,this};function se(t){var e=this.__data__=new Lt(t);this.size=e.size}se.prototype.clear=kt,se.prototype.delete=Ut,se.prototype.get=xt,se.prototype.has=Mt,se.prototype.set=ce;var le=se,fe="__lodash_hash_undefined__";var de=function(t){return this.__data__.set(t,fe),this};var he=function(t){return this.__data__.has(t)};function pe(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ae;++e<r;)this.add(t[e])}pe.prototype.add=pe.prototype.push=de,pe.prototype.has=he;var ve=pe;var ye=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var _e=function(t,e){return t.has(e)},be=1,Ee=2;var ge=function(t,e,r,n,o,i){var a=r&be,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,d=!0,h=r&Ee?new ve:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var p=t[f],v=e[f];if(n)var y=a?n(v,p,f,e,t,i):n(p,v,f,t,e,i);if(void 0!==y){if(y)continue;d=!1;break}if(h){if(!ye(e,(function(t,e){if(!_e(h,e)&&(p===t||o(p,t,r,n,i)))return h.push(e)}))){d=!1;break}}else if(p!==v&&!o(p,v,r,n,i)){d=!1;break}}return i.delete(t),i.delete(e),d},Oe=l.Uint8Array;var Te=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var me=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},Ae=1,Ie=2,Re="[object Boolean]",we="[object Date]",je="[object Error]",Ne="[object Map]",Se="[object Number]",Pe="[object RegExp]",De="[object Set]",Ce="[object String]",Le="[object Symbol]",ke="[object ArrayBuffer]",Ue="[object DataView]",xe=f?f.prototype:void 0,Me=xe?xe.valueOf:void 0;var Fe=function(t,e,r,n,o,i,a){switch(r){case Ue:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ke:return!(t.byteLength!=e.byteLength||!i(new Oe(t),new Oe(e)));case Re:case we:case Se:return Rt(+t,+e);case je:return t.name==e.name&&t.message==e.message;case Pe:case Ce:return t==e+"";case Ne:var u=Te;case De:var c=n&Ae;if(u||(u=me),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;n|=Ie,a.set(t,e);var l=ge(u(t),u(e),n,o,i,a);return a.delete(t),l;case Le:if(Me)return Me.call(t)==Me.call(e)}return!1};var Be=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var ze=function(t,e,r){var n=e(t);return et(t)?n:Be(n,r(t))};var Ge=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i};var Ve=function(){return[]},He=Object.prototype.propertyIsEnumerable,We=Object.getOwnPropertySymbols,Ke=We?function(t){return null==t?[]:(t=Object(t),Ge(We(t),(function(e){return He.call(t,e)})))}:Ve;var Ye=function(t){return ze(t,mt,Ke)},$e=1,Je=Object.prototype.hasOwnProperty;var Ze=function(t,e,r,n,o,i){var a=r&$e,u=Ye(t),c=u.length;if(c!=Ye(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:Je.call(e,l)))return!1}var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var h=!0;i.set(t,e),i.set(e,t);for(var p=a;++s<c;){var v=t[l=u[s]],y=e[l];if(n)var _=a?n(y,v,l,e,t,i):n(v,y,l,t,e,i);if(!(void 0===_?v===y||o(v,y,r,n,i):_)){h=!1;break}p||(p="constructor"==l)}if(h&&!p){var b=t.constructor,E=e.constructor;b!=E&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof E&&E instanceof E)&&(h=!1)}return i.delete(t),i.delete(e),h},qe=V(l,"DataView"),Xe=V(l,"Promise"),Qe=V(l,"Set"),tr=V(l,"WeakMap"),er=L(qe),rr=L(Ft),nr=L(Xe),or=L(Qe),ir=L(tr),ar=T;(qe&&"[object DataView]"!=ar(new qe(new ArrayBuffer(1)))||Ft&&"[object Map]"!=ar(new Ft)||Xe&&"[object Promise]"!=ar(Xe.resolve())||Qe&&"[object Set]"!=ar(new Qe)||tr&&"[object WeakMap]"!=ar(new tr))&&(ar=function(t){var e=T(t),r="[object Object]"==e?t.constructor:void 0,n=r?L(r):"";if(n)switch(n){case er:return"[object DataView]";case rr:return"[object Map]";case nr:return"[object Promise]";case or:return"[object Set]";case ir:return"[object WeakMap]"}return e});var ur=ar,cr=1,sr="[object Arguments]",lr="[object Array]",fr="[object Object]",dr=Object.prototype.hasOwnProperty;var hr=function(t,e,r,n,o,i){var a=et(t),u=et(e),c=a?lr:ur(t),s=u?lr:ur(e),l=(c=c==sr?fr:c)==fr,f=(s=s==sr?fr:s)==fr,d=c==s;if(d&&nt(t)){if(!nt(e))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new le),a||pt(t)?ge(t,e,r,n,o,i):Fe(t,e,c,r,n,o,i);if(!(r&cr)){var h=l&&dr.call(t,"__wrapped__"),p=f&&dr.call(e,"__wrapped__");if(h||p){var v=h?t.value():t,y=p?e.value():e;return i||(i=new le),o(v,y,r,n,i)}}return!!d&&(i||(i=new le),Ze(t,e,r,n,o,i))};var pr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!$(e)&&!$(r)?e!=e&&r!=r:hr(e,r,n,o,t,i))},vr=1,yr=2;var _r=function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=r[o])[0],s=t[c],l=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var f=new le;if(n)var d=n(s,l,c,t,e,f);if(!(void 0===d?pr(l,s,vr|yr,n,f):d))return!1}}return!0};var br=function(t){return t==t&&!m(t)};var Er=function(t){for(var e=mt(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,br(o)]}return e};var gr=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Or=function(t){var e=Er(t);return 1==e.length&&e[0][2]?gr(e[0][0],e[0][1]):function(r){return r===t||_r(r,t,e)}},Tr="[object Symbol]";var mr=function(t){return"symbol"==typeof t||$(t)&&T(t)==Tr},Ar=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ir=/^\w*$/;var Rr=function(t,e){if(et(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!mr(t))||(Ir.test(t)||!Ar.test(t)||null!=e&&t in Object(e))},wr="Expected a function";function jr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(wr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(jr.Cache||ae),r}jr.Cache=ae;var Nr=jr,Sr=500;var Pr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/\\(\\)?/g,Cr=function(t){var e=Nr(t,(function(t){return r.size===Sr&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pr,(function(t,r,n,o){e.push(n?o.replace(Dr,"$1"):r||t)})),e}));var Lr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},kr=1/0,Ur=f?f.prototype:void 0,xr=Ur?Ur.toString:void 0;var Mr=function t(e){if("string"==typeof e)return e;if(et(e))return Lr(e,t)+"";if(mr(e))return xr?xr.call(e):"";var r=e+"";return"0"==r&&1/e==-kr?"-0":r};var Fr=function(t){return null==t?"":Mr(t)};var Br=function(t,e){return et(t)?t:Rr(t,e)?[t]:Cr(Fr(t))},zr=1/0;var Gr=function(t){if("string"==typeof t||mr(t))return t;var e=t+"";return"0"==e&&1/t==-zr?"-0":e};var Vr=function(t,e){for(var r=0,n=(e=Br(e,t)).length;null!=t&&r<n;)t=t[Gr(e[r++])];return r&&r==n?t:void 0};var Hr=function(t,e,r){var n=null==t?void 0:Vr(t,e);return void 0===n?r:n};var Wr=function(t,e){return null!=t&&e in Object(t)};var Kr=function(t,e,r){for(var n=-1,o=(e=Br(e,t)).length,i=!1;++n<o;){var a=Gr(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&ct(o)&&at(a,o)&&(et(t)||tt(t))};var Yr=function(t,e){return null!=t&&Kr(t,e,Wr)},$r=1,Jr=2;var Zr=function(t,e){return Rr(t)&&br(e)?gr(Gr(t),e):function(r){var n=Hr(r,t);return void 0===n&&n===e?Yr(r,t):pr(e,n,$r|Jr)}};var qr=function(t){return t};var Xr=function(t){return function(e){return null==e?void 0:e[t]}};var Qr=function(t){return function(e){return Vr(e,t)}};var tn=function(t){return Rr(t)?Xr(Gr(t)):Qr(t)};var en=function(t){return"function"==typeof t?t:null==t?qr:"object"==typeof t?et(t)?Zr(t[0],t[1]):Or(t):tn(t)};var rn=function(t,e){var r={};return e=en(e),At(t,(function(t,n,o){W(r,n,e(t,n,o))})),r},nn={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};var on=["Webkit","ms","Moz","O"];Object.keys(nn).forEach((function(t){on.forEach((function(e){nn[function(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}(e,t)]=nn[t]}))}));var an={isUnitlessNumber:nn,shorthandPropertyExpansions:{background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}}};var un=function(t){var r=t.css,n={};return Object.entries(r).forEach((function(t){var e=t[0],r=t[1];if("number"==typeof r)return an.isUnitlessNumber[e]?void(n[e]=""+r):void(n[e]=r+"px");n[e]=r})),e(e({},t),{css:e(e({},n),{boxSizing:"border-box"})})};var cn,sn,ln,fn,dn,hn,pn="/api/checklistItems",vn="/api/segmentMemberships",yn="/api/segmentsDefinition",_n="/api/tutorialMetadata",bn="/api/tutorialDocumentsSdk",En="wss://2jcfb7pjlf.execute-api.eu-west-1.amazonaws.com/prod",gn=function(t){if(!document.querySelectorAll('[href="'+t+'"]').length){var e=document.createElement("link");e.setAttribute("rel","prefetch"),e.setAttribute("href",t),document.head.appendChild(e)}},On=function(){function t(t){this.adjacencyList={},this.rootDocument=t,this.adjacencyList[t]=[]}return t.prototype.get=function(t){return this.adjacencyList[t]},t.prototype.add=function(t,e){var r=this;if(this.adjacencyList[t]||(this.adjacencyList[t]=[]),!this.adjacencyList[e])return this.adjacencyList[t].push(e),this.adjacencyList[e]=[],!0;if(this.adjacencyList[t].includes(e))return!0;var n=function(e){if(e===t)return!0;for(var o=0,i=r.adjacencyList[e];o<i.length;o++){var a=i[o];if(n(a))return!0}return!1};return!n(e)&&(this.adjacencyList[t].push(e),!0)},t}(),Tn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},mn="object"==typeof Tn&&Tn&&Tn.Object===Object&&Tn,An="object"==typeof self&&self&&self.Object===Object&&self,In=(mn||An||Function("return this")()).Symbol,Rn=Object.prototype,wn=Rn.hasOwnProperty,jn=Rn.toString,Nn=In?In.toStringTag:void 0,Sn=Object.prototype.toString,Pn=In?In.toStringTag:void 0,Dn=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Pn&&Pn in Object(t)?function(t){var e=wn.call(t,Nn),r=t[Nn];try{t[Nn]=void 0;var n=!0}catch(t){}var o=jn.call(t);return n&&(e?t[Nn]=r:delete t[Nn]),o}(t):function(t){return Sn.call(t)}(t)},Cn=Array.isArray,Ln=function(t){return null!=t&&"object"==typeof t},kn=function(t){return"string"==typeof t||!Cn(t)&&Ln(t)&&"[object String]"==Dn(t)},Un=/^([a-zA-Z0-9]|_|-)+$/,xn=function(t){return function(t){return"number"==typeof t||Ln(t)&&"[object Number]"==Dn(t)}(t)&&t>=0};!function(t){t.SDK="SDK",t.PREVIEW="PREVIEW"}(cn||(cn={})),function(t){t.BOOTSTRAP="Bootstrap",t.CHANGE_POSITION="ChangePosition",t.CLOSE_PREVIEW="ClosePreview",t.PREVIEW_LOADED="PreviewLoaded",t.SET_AVALIABLE_PORTALS="SetAvaliablePortals",t.SET_CONTENT="SetContent",t.SET_SELECTED_ELEMENT="SetSelectedElement",t.SET_VIEW_MODE="SetViewMode",t.ADD_ELEMENT="AddElement",t.REMOVE_ELEMENT="RemoveElement",t.UPDATE_ELEMENT="UpdateElement",t.SET_ELEMENT="SetElement"}(sn||(sn={})),function(t){t.ON_CLICK="OnClick"}(ln||(ln={})),function(t){t.NATIVE="Native",t.PENDO="Pendo"}(fn||(fn={})),function(t){t.NAVIGATE="Navigate",t.CHANGE_TUTORIAL="ChangeTutorial",t.OPEN_GUIDE="OpenGuide"}(dn||(dn={})),function(t){t.PRIMARY="primary",t.SECONDARY="primary",t.WARNING="warning",t.DANGER="danger",t.NEUTRAL="neutral",t.ACTIVE="active",t.INFO="info"}(hn||(hn={}));var Mn;hn.PRIMARY;!function(t){t.U="U",t.B="B",t.Em="Em",t.InlineCode="InlineCode"}(Mn||(Mn={}));var Fn,Bn,zn,Gn,Vn,Hn,Wn,Kn=function(t){return function(t){return kn(t)&&t.length>=3&&t.length<100&&Un.test(t)}(t)};!function(t){t.NotStared="NotStarted",t.InProgress="InProgress",t.Done="Done"}(Fn||(Fn={})),function(t){t.COLLAPSED="Collapsed",t.EXPANDED="Expanded",t.MINIMIZED="Minimized"}(Bn||(Bn={})),function(t){t.TUTORIAL="Tutorial",t.PORTAL="Portal"}(zn||(zn={})),function(t){t.Global="Global",t.Organization="Organization"}(Gn||(Gn={})),function(t){t.Root="root",t.Rule="rule",t.Atrule="atrule",t.Decl="decl",t.Any="any"}(Vn||(Vn={})),function(t){t.Global="Global",t.Carried="Carried"}(Hn||(Hn={})),function(t){t.CanduCdn="CanduCdn",t.CheckListApi="CheckListApi"}(Wn||(Wn={}));var Yn,$n=function(t){return"candu.sdk."+t},Jn=function(t){return $n("error."+t)},Zn={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",PROVIDER_ERROR:"provider_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},qn={HEARTBEAT:$n("heartbeat"),PREVIEW_OPEN:$n("preview.open"),PORTAL:$n("portal"),TUTORIAL:$n("tutorial"),TUTORIAL_INTERACTION:$n("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:Jn("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:Jn("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:Jn("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:Jn("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:Jn("commit_api"),TUTORIAL_LOADING_ERROR:Jn("tutorial"),UNKOWN_NODE_TYPE:Jn(Zn.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:Jn(Zn.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:Jn(Zn.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:Jn(Zn.TUTORIAL_ERROR),PORTAL_ERROR:Jn(Zn.PORTAL_ERROR),PROVIDER_ERROR:Jn(Zn.PROVIDER_ERROR),STYLEGUIDE_MAP_ERROR:Jn(Zn.TUTORIAL_ERROR),RENDER_NODE_ERROR:Jn(Zn.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:Jn("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:Jn("circular_dependecy_embed_tutorial"),STATE_FETCH_FAILED:Jn("state_fetch_failed"),STATE_UPDATE_FAILED:Jn("state_update_failed")},Xn=function(t){return"An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: "+t+"."},Qn=((Yn={EVENTING_NOT_INITIALIZED:"You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n"})[qn.PORTAL_ASSET_NOT_FOUND]="Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",Yn[qn.PORTAL_NO_SEGMENT_IDS]="You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",Yn[qn.NO_MATCHING_TUTORIALS]="The Tutorial will not be rendered because there are no matching segments for the given user.",Yn[qn.NO_VALID_TUTORIAL_IDENTIFIER]="(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",Yn[qn.TUTORIAL_LOADING_ERROR]="An error has occurred while trying to load the Tutorial",Yn[qn.UNKOWN_INLINE_NODE_TYPE]=Xn(Zn.UNKOWN_INLINE_NODE_TYPE),Yn[qn.UNKOWN_NODE_TYPE]=Xn(Zn.UNKOWN_NODE_TYPE),Yn[qn.CIRCULAR_DEPENDENCY_EMBED_PORTAL]="Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",Yn[qn.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]="Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",Yn[qn.PORTAL_ERROR]="An error has occured within Portal",Yn[qn.PROVIDER_ERROR]="An error has occured within Provider",Yn[qn.TUTORIAL_ERROR]="An error has occured within Tutorial",Yn[qn.RENDER_NODE_ERROR]="An error has occured while rendering tutorial node",Yn[qn.STYLEGUIDE_MAP_ERROR]="An error has occured while mapping node to styleguide",Yn[qn.STATE_FETCH_FAILED]="An error has occured while fetching state:",Yn[qn.STATE_UPDATE_FAILED]="An error has occured while updating state:",Yn),to={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},eo={error:console.error,warning:console.warn};for(var ro=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}})),no=[],oo=0;oo<256;++oo)no[oo]=(oo+256).toString(16).substr(1);var io=function(t,e){var r=e||0,n=no;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")};var ao,uo,co=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||ro)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||io(o)};!function(t){t.UserGenerated="UserGenerated",t.SDK="SDK"}(ao||(ao={})),function(t){t.Identify="Identify",t.Group="Group",t.Track="Track",t.Page="Page",t.Screen="Screen"}(uo||(uo={}));var so,lo,fo=function(){return"undefined"!=typeof window&&window.localStorage},ho=function(t){return function(e){fo()&&null!=e&&window.localStorage.setItem(t,JSON.stringify(e))}},po={anonymousId:{getOrCreate:(so="candu:anonymous_id",lo=function(){var t=co();return ho("candu:anonymous_id")(t),t},function(){return function(t){return function(){if(fo()){var e=window.localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(t){return null}}}}(so)()||lo()}),set:ho("candu:anonymous_id")}}.anonymousId.getOrCreate,vo=function(t,e,r,n,o,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,o,i,a,u],l=0;(c=new Error(e.replace(/%s/g,(function(){return s[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}},yo=function(t){return vo(!t||m(t),"(Candu) styleguide must be undefined or an object")},_o=function(t){return n(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[2,e.sent().json()]}}))}))},bo=function(t){return _o("https://api.candu.ai"+t)},Eo=function(t){return _o("https://cdn.candu.ai"+t)},go={tutorialDocumentLatestSaved:function(t,e){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,bo(bn+"/"+e+"?token="+t)]}))}))},portalAsset:function(t,e){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,Eo("/portals/"+t+"/"+e+"/head.json")]}))}))},segmentMembership:function(t,e){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,bo(vn+"/"+e+"?token="+t)]}))}))},segmentDefinition:function(t){return n(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,bo(yn+"?token="+t)]}))}))},tutorialMetadata:function(t){return n(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,bo(_n+"?token="+t)]}))}))},tutorialSocket:function(t,e,r){var n=new WebSocket(En+"?clientToken="+t+"&tutorialId="+e);return n.onmessage=function(t){var e=JSON.parse(t.data);r(e)},function(){return n.close()}},tutorialDocument:function(t,e,r){var n=t.contentHashId,o=t.tutorialId,i=t.tutorialDocument,a=t.slug,u=function(t){return{byId:function(e){return bo(bn+"?token="+t+"&finder=latestPublished&tutorialId="+e)},bySlug:function(e){return Eo("/tutorials/"+t+"/"+e+".json")},byContentHash:function(e){return Eo("/tutorials/"+t+"/"+e+".json")}}}(e);return Kn(a)?u.bySlug(a):function(t){return xn(t)}(o)?u.byId(o):function(t){return kn(t)&&!!t.match(/^[0-9a-zA-Z]{40}$/)}(n)?u.byContentHash(n):m(i)?Promise.resolve(i):(eo.error(Qn[qn.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(qn.NO_VALID_TUTORIAL_IDENTIFIER,{slug:t.slug}),null)}},Oo=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.error.apply(console,t)},To=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.warn.apply(console,t)},mo={error:Oo,warning:To},Ao=function(){function t(){this.subscribers=[]}return t.prototype.subscribe=function(t){var e=this;return this.subscribers.push(t),function(){e.subscribers[e.subscribers.indexOf(t)]=function(){}}},t.prototype.notify=function(t){this.subscribers.forEach((function(e){return e(t)}))},t.prototype.clear=function(){this.subscribers=[]},t}(),Io=function(){function t(){this.onClientUpdateObserver=new Ao}return t.prototype.attachClient=function(t){this.client=t,this.onClientUpdateObserver.notify({client:t})},t.prototype.detachClient=function(){this.client&&(this.client=null,this.onClientUpdateObserver.notify({client:null}))},t.prototype.onClientUpdate=function(t){var e=this.onClientUpdateObserver.subscribe(t);return this.client&&t({client:this.client}),e},t}();var Ro=function(){function t(t){this.init(t)}return t.prototype.attachClient=function(t){return this.provider.preview.attachClient(t)},t.prototype.detachClient=function(){return this.provider.preview.detachClient()},Object.defineProperty(t.prototype,"provider",{get:function(){return this.getProvider()},enumerable:!0,configurable:!0}),t}(),wo=function(t){switch(t.trigger){case ln.ON_CLICK:default:return"onClick"}},jo=function(t,r){var n=t.data;if(!n||!n.actions)return{};var o=function(t){r.provider.eventing.track(qn.TUTORIAL_INTERACTION,e(e({},t),r.trackingIdentifiers||{}))};return n.actions.map((function(t){return function(t,e){var r,n,o;switch(t.handler.type){case dn.NAVIGATE:return(r={})[wo(t)]=function(){var r=t.handler,n=r.href,o=r.target;e(t),"Blank"===o?window.open(n,"_blank"):n&&n.includes("mailto:")?window.location=n:document.location.href=n},r;case dn.CHANGE_TUTORIAL:return(n={})[wo(t)]=function(){var e=t.handler.tutorialId;Oo("TODO -> change tutorial",e)},n;case dn.OPEN_GUIDE:return(o={})[wo(t)]=function(){var e=t.handler.guideId;Oo("TODO -> open guide",e)},o;default:return{}}}(t,o)})).reduce((function(t,r){return e(e({},t),r)}),{})},No=function(t,e){var r=t.props||{},n=t.nodes,o=r.children;return o||(n?n.map(e):null)},So=function(t,r){try{var n=r.provider,o=r.document,i=r.trackingIdentifiers,a=o.nodes[t];if(!a)return mo.error("Document is corrupted. Refusing to move further."),null;var u=function(t){return So(t,r)},c=a.type,s=a.props,l=a.css,f=a.states,d=e(e(e({},s||{}),{style:l||{},children:No(a,u)}),jo(a,{trackingIdentifiers:i,provider:n})),h={nodeId:t,node:a,document:o,render:{node:u,styleguide:function(t,e){return void 0===e&&(e={}),r.renderNode(t,{api:h,attributes:e})},tutorial:function(t){return r.renderTutorial(t)},portal:function(t){return r.renderPortal(t)}},trackingIdentifiers:i,stateInstances:f&&r.stateProviderInstances.filter((function(t){return!!f[t.providerId]}))},p=h.render.styleguide(c,d);return p||(mo.error(Qn[qn.UNKOWN_NODE_TYPE],{type:c}),n.eventing.track(qn.UNKOWN_NODE_TYPE,{type:c}),null)}catch(t){return mo.error(Qn[qn.STYLEGUIDE_MAP_ERROR],t),null}},Po=Nr((function(t,r){var n,o,i=t.provider,a=t.portal,u=t.tutorial,c=i.styleguide;return u&&(o=u.styleguide),a&&(n=a.styleguide),e(e(e(e({},c||{}),n||{}),o||{}),r||{})})),Do=function(t){return"candu-styleguide-"+t};var Co=function(t,e){return function(r,n){if(null==r)return r;if(!Tt(r))return t(r,n);for(var o=r.length,i=e?o:-1,a=Object(r);(e?i--:++i<o)&&!1!==n(a[i],i,a););return r}}(At);var Lo=function(t,e){var r=-1,n=Tt(t)?Array(t.length):[];return Co(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var ko,Uo=function(t,e){return(et(t)?Lr:Lo)(t,en(e))},xo=function(){function t(t,e){if("function"!=typeof t)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: "+t+".");this._batchLoadFn=t,this._maxBatchSize=function(t){if(t&&!1===t.batch)return 1;var e=t&&t.maxBatchSize;if(void 0===e)return 1/0;if("number"!=typeof e||e<1)throw new TypeError("maxBatchSize must be a positive number: "+e);return e}(e),this._batchScheduleFn=function(t){var e=t&&t.batchScheduleFn;if(void 0===e)return Mo;if("function"!=typeof e)throw new TypeError("batchScheduleFn must be a function: "+e);return e}(e),this._cacheKeyFn=function(t){var e=t&&t.cacheKeyFn;if(void 0===e)return function(t){return t};if("function"!=typeof e)throw new TypeError("cacheKeyFn must be a function: "+e);return e}(e),this._cacheMap=function(t){if(t&&!1===t.cache)return null;var e=t&&t.cacheMap;if(void 0===e)return new Map;if(null!==e){var r=["get","set","delete","clear"].filter((function(t){return e&&"function"!=typeof e[t]}));if(0!==r.length)throw new TypeError("Custom cacheMap missing methods: "+r.join(", "))}return e}(e),this._batch=null}var e=t.prototype;return e.load=function(t){if(null==t)throw new TypeError("The loader.load() function must be called with a value,but got: "+String(t)+".");var e=function(t){var e=t._batch;if(null!==e&&!e.hasDispatched&&e.keys.length<t._maxBatchSize&&(!e.cacheHits||e.cacheHits.length<t._maxBatchSize))return e;var r={hasDispatched:!1,keys:[],callbacks:[]};return t._batch=r,t._batchScheduleFn((function(){return function(t,e){if(e.hasDispatched=!0,0===e.keys.length)return void Bo(e);var r=t._batchLoadFn(e.keys);if(!r||"function"!=typeof r.then)return Fo(t,e,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise: "+String(r)+"."));r.then((function(t){if(!zo(t))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array: "+String(t)+".");if(t.length!==e.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys.\n\nKeys:\n"+String(e.keys)+"\n\nValues:\n"+String(t));Bo(e);for(var r=0;r<e.callbacks.length;r++){var n=t[r];n instanceof Error?e.callbacks[r].reject(n):e.callbacks[r].resolve(n)}})).catch((function(r){return Fo(t,e,r)}))}(t,r)})),r}(this),r=this._cacheMap,n=this._cacheKeyFn(t);if(r){var o=r.get(n);if(o){var i=e.cacheHits||(e.cacheHits=[]);return new Promise((function(t){i.push((function(){return t(o)}))}))}}e.keys.push(t);var a=new Promise((function(t,r){e.callbacks.push({resolve:t,reject:r})}));return r&&r.set(n,a),a},e.loadMany=function(t){if(!zo(t))throw new TypeError("The loader.loadMany() function must be called with Array<key> but got: "+t+".");for(var e=[],r=0;r<t.length;r++)e.push(this.load(t[r]).catch((function(t){return t})));return Promise.all(e)},e.clear=function(t){var e=this._cacheMap;if(e){var r=this._cacheKeyFn(t);e.delete(r)}return this},e.clearAll=function(){var t=this._cacheMap;return t&&t.clear(),this},e.prime=function(t,e){var r=this._cacheMap;if(r){var n,o=this._cacheKeyFn(t);if(void 0===r.get(o))e instanceof Error?(n=Promise.reject(e)).catch((function(){})):n=Promise.resolve(e),r.set(o,n)}return this},t}(),Mo="object"==typeof process&&"function"==typeof process.nextTick?function(t){ko||(ko=Promise.resolve()),ko.then((function(){return process.nextTick(t)}))}:setImmediate||setTimeout;function Fo(t,e,r){Bo(e);for(var n=0;n<e.keys.length;n++)t.clear(e.keys[n]),e.callbacks[n].reject(r)}function Bo(t){if(t.cacheHits)for(var e=0;e<t.cacheHits.length;e++)t.cacheHits[e]()}function zo(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&(0===t.length||t.length>0&&Object.prototype.hasOwnProperty.call(t,t.length-1))}var Go=xo,Vo="https://api.candu.ai"+pn;function Ho(t){return{state:t.state,id:t.id}}var Wo=function(t,e,r){return fetch(Vo+"?token="+t+"&userId="+e+"&finder=byIds&ids="+r.join(",")).then((function(t){return t.json()})).then((function(t){return t.map(Ho)}))},Ko={};function Yo(t,e){var r=this,i=t+"-"+e,a=Ko[i];if(!a){a=new Go((function(i){return n(r,void 0,void 0,(function(){var r;return o(this,(function(n){switch(n.label){case 0:return[4,Wo(t,e,i)];case 1:return r=n.sent(),[2,i.map((function(t){return r.find((function(e){return e.id===t}))}))]}}))}))})),Ko[i]=a}return a}var $o=function(){function t(t){var e=t.context,r=t.providerId;this.type=Wn.CheckListApi,this.clientToken=e.clientToken,this.providerId=r,this.userId=e.userId}return t.prototype.retrieve=function(){return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,Yo(this.clientToken,this.userId).load(this.providerId)];case 1:return[2,t.sent()||{id:this.providerId,state:Fn.NotStared}]}}))}))},t.prototype.mutate=function(t){return r=this.clientToken,n=this.userId,o=this.providerId,i=t,fetch(Vo+"/"+o+"?token="+r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e(e({},i),{userId:n.toString()}))}).then((function(t){return t.json()})).then(Ho);var r,n,o,i},t}();var Jo=function(){function t(t,e,r){var n=this;this.observer=new Ao,this.providerId=t,this.resolver=e,this.resolvedState=null,this.eventing=r,e.retrieve().then((function(t){return n.updateState(t)})).catch((function(t){mo.error(Qn[qn.STATE_FETCH_FAILED],t.message),n.eventing.track(Qn[qn.STATE_FETCH_FAILED],{errorMessage:t.message})}))}return t.prototype.mutate=function(t){var r=this,n=this.resolvedState;this.updateState(e(e({},n),t)),this.resolver.mutate(t).then((function(t){return r.updateState(t)})).catch((function(t){mo.error(Qn[qn.STATE_UPDATE_FAILED],t.message),r.eventing.track(Qn[qn.STATE_UPDATE_FAILED],{errorMessage:t.message}),n&&r.updateState(n)}))},t.prototype.subscribe=function(t){var e=this.observer.subscribe(t);return this.resolvedState&&t(this.resolvedState),e},t.prototype.updateState=function(t){this.resolvedState=t,this.observer.notify(t)},t}();t.DEFAULT_ALERT_COLOR="#EDEDED",t.DEFAULT_ALT="",t.DEFAULT_TAB_ACTIVE_COLOR="#FEFEFE",t.DEFAULT_TAB_COLOR="#FEFEFE",t.DEFAULT_TAB_HEADER_COLOR="#333745",t.DEFAULT_TAB_ITEM_COLOR="#838792",t.ERROR_MESSAGES=Qn,t.ERROR_SLUGS=Zn,t.EVENT_NAMES=qn,t.LOGGER=eo,t.Observer=Ao,t.PreviewContainer=Io,t.RESOURCES=go,t.STYLEGUIDE_COLORS={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},t.SingletonAPI=Ro,t.StateProviderInstance=Jo,t.TutorialDependencies=On,t.adaptCustomNodes=function(t){return rn(t,(function(t){var r=t;return"Typography"===r.type&&(r=function(t){var r=Hr(t,"data.custom.variant","P");return e(e({},t),{type:r})}(r)),r.css&&m(r.css)&&r.css.flexBasis&&(r=function(t){var r=t.css.flexBasis;return"0"===r||"0px"===r?e(e({},t),{css:e(e({},t.css),{flexBasis:"0%"})}):t}(r)),r.css&&(r=un(r)),r}))},t.attachStylesheet=function(t){var e=Do(t);if(!document.getElementById(e)){var r=document.createElement("link");r.setAttribute("id",e),r.setAttribute("rel","stylesheet"),r.setAttribute("href","https://cdn.candu.ai/styleguides/applications/"+t+"/default/main.css"),document.head.appendChild(r)}},t.checkCyclicAndAdd=function(t,e){return t.dependencies.add(t.id,e)},t.createSingleton=function(t){var e,r,n=function(t){return function(){for(var e,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(r.api)return(e=r.api)[t].apply(e,n);console.warn("Please initialize the SDK by calling Candu.init() before attempting to call "+t)}};return(e=function(){function e(){}return e.init=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return this.api||(e.api=new(t.bind.apply(t,i([void 0],r)))),e.subscriberCallbacks.forEach((function(t){return t()})),e.subscriberCallbacks=[],window.postMessage({source:"CANDU_SINGLETON",payload:{type:"INIT"}},window&&window.origin?window.origin:"*"),e},e.onProviderReady=function(t){if(e.api)return t();e.subscriberCallbacks.push(t)},e}()).subscriberCallbacks=[],e.renderTutorial=n("renderTutorial"),e.renderPortal=n("renderPortal"),e.attachClient=n("attachClient"),e.detachClient=n("detachClient"),e.getProvider=n("getProvider"),r=e,window.Candu=r,r},t.createTutorialDocumentContext=function(t,e){return{id:t,dependencies:e?e.dependencies:new On(t)}},t.defaultStyleguide=to,t.detachStylesheet=function(t){var e=document.getElementById(Do(t));e&&e.remove()},t.fetchHead=function(t,e){t&&et(t)&&t.map((function(t){var r=t.nodeType,n=t.url;return gn("EmbedTutorial"===r?"https://cdn.candu.ai/tutorials/"+e+"/"+n+".json":"EmbedPortal"===r?"https://cdn.candu.ai/portals/"+e+"/"+n+"/head.json":n)}))},t.findMatchingSegment=function(t,r){var n=r.reduce((function(t,r){var n;return e(e({},t),((n={})[r]=r,n))}),{});return t.content.find((function(t){var e=t.segmentId;return!!n[e]||"Everyone"===e}))},t.includeHTMLWhitespaces=function(t){return t.replace(/\s/g," ")},t.initStateProviders=function(t,e){return Uo(t,(function(t,r){var n=function(t,e){switch(t.type){case Wn.CheckListApi:return new $o(e);default:throw new Error("Unsupported resolver type: "+t.type)}}(t.resolver,{providerId:r,context:e});return new Jo(r,n,e.eventing)}))},t.internalEventing=function(t){var e=t.identify,r=t.track;return{provider:function(t){var n=t.userId,o=t.traits,i=t.styleguide;e(n,o),r(qn.HEARTBEAT,function(t){var e={};return Object.keys(t).forEach((function(r){to[r]&&(e["styleguide."+r]=t[r].displayName||!0)})),e}(i))},tutorialDocumentLoadingError:function(t){var e=t.tutorialId,n=t.slug,o=t.contentHashId;eo.error(Qn[qn.TUTORIAL_LOADING_ERROR]),r(qn.TUTORIAL_LOADING_ERROR,{tutorialId:e,slug:n,contentHashId:o})}}},t.logError=Oo,t.logWarning=To,t.logger=mo,t.mapNodeToStyleguide=So,t.mergeStyleguidesFromContext=Po,t.normalizeCss=un,t.portalValidation=function(t){var e=t.slug,r=t.styleguide;return yo(r),{slug:e,styleguide:r||{}}},t.providerValidation=function(t){var n=t.clientToken,o=t.userId,i=t.traits,a=t.options,u=t.styleguide,c=r(t,["clientToken","userId","traits","options","styleguide"]);return vo(function(t){return kn(t)&&!!t.match(/^[0-9a-zA-Z]*$/)&&t.length>=10}(n),"(Candu) you must provide a valid clientToken"),vo(!o||function(t){return xn(t)||kn(t)&&t.trim().length>0}(o),"(Candu) you must provide a valid userId"),yo(u),vo(!i||m(i),"(Candu) traits must be undefined or an object"),vo(!a||m(a),"(Candu) options must be undefined or an object"),e(e({},c),{clientToken:n,traits:i||{},options:a||{},styleguide:u||{},userId:o||po()})},t.stripHTML=function(t){return DOMParser?(new DOMParser).parseFromString(t,"text/html").body.textContent||"":t},t.tutorialValidation=function(t){var n=t.slug,o=t.styleguide,i=t.contentHashId,a=t.tutorialId,u=t.tutorialDocument,c=t.renderedByClient,s=r(t,["slug","styleguide","contentHashId","tutorialId","tutorialDocument","renderedByClient"]);return yo(o),e(e({},s),{slug:n,styleguide:o||{},contentHashId:i,tutorialId:a,tutorialDocument:u,renderedByClient:c})},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
***************************************************************************** */var e=function(){return(e=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function r(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}function n(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new r((function(e){e(t.value)})).then(a,u)}c((n=n.apply(t,e||[])).next())}))}function o(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function i(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)n[o]=i[a];return n}var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t,e){return t(e={exports:{}},e.exports),e.exports}var c="object"==typeof a&&a&&a.Object===Object&&a,s="object"==typeof self&&self&&self.Object===Object&&self,l=c||s||Function("return this")(),f=l.Symbol,d=Object.prototype,h=d.hasOwnProperty,p=d.toString,v=f?f.toStringTag:void 0;var y=function(t){var e=h.call(t,v),r=t[v];try{t[v]=void 0;var n=!0}catch(t){}var o=p.call(t);return n&&(e?t[v]=r:delete t[v]),o},_=Object.prototype.toString;var b=function(t){return _.call(t)},E="[object Null]",g="[object Undefined]",O=f?f.toStringTag:void 0;var T=function(t){return null==t?void 0===t?g:E:O&&O in Object(t)?y(t):b(t)};var m=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},A="[object AsyncFunction]",I="[object Function]",R="[object GeneratorFunction]",w="[object Proxy]";var j,N=function(t){if(!m(t))return!1;var e=T(t);return e==I||e==R||e==A||e==w},S=l["__core-js_shared__"],P=(j=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"";var D=function(t){return!!P&&P in t},C=Function.prototype.toString;var L=function(t){if(null!=t){try{return C.call(t)}catch(t){}try{return t+""}catch(t){}}return""},k=/^\[object .+?Constructor\]$/,U=Function.prototype,x=Object.prototype,M=U.toString,F=x.hasOwnProperty,B=RegExp("^"+M.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var z=function(t){return!(!m(t)||D(t))&&(N(t)?B:k).test(L(t))};var G=function(t,e){return null==t?void 0:t[e]};var V=function(t,e){var r=G(t,e);return z(r)?r:void 0},H=function(){try{var t=V(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var W=function(t,e,r){"__proto__"==e&&H?H(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var K=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===r(i[c],c,i))break}return e}}();var Y=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var $=function(t){return null!=t&&"object"==typeof t},J="[object Arguments]";var Z=function(t){return $(t)&&T(t)==J},q=Object.prototype,X=q.hasOwnProperty,Q=q.propertyIsEnumerable,tt=Z(function(){return arguments}())?Z:function(t){return $(t)&&X.call(t,"callee")&&!Q.call(t,"callee")},et=Array.isArray;var rt=function(){return!1},nt=u((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?l.Buffer:void 0,i=(o?o.isBuffer:void 0)||rt;t.exports=i})),ot=9007199254740991,it=/^(?:0|[1-9]\d*)$/;var at=function(t,e){var r=typeof t;return!!(e=null==e?ot:e)&&("number"==r||"symbol"!=r&&it.test(t))&&t>-1&&t%1==0&&t<e},ut=9007199254740991;var ct=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=ut},st={};st["[object Float32Array]"]=st["[object Float64Array]"]=st["[object Int8Array]"]=st["[object Int16Array]"]=st["[object Int32Array]"]=st["[object Uint8Array]"]=st["[object Uint8ClampedArray]"]=st["[object Uint16Array]"]=st["[object Uint32Array]"]=!0,st["[object Arguments]"]=st["[object Array]"]=st["[object ArrayBuffer]"]=st["[object Boolean]"]=st["[object DataView]"]=st["[object Date]"]=st["[object Error]"]=st["[object Function]"]=st["[object Map]"]=st["[object Number]"]=st["[object Object]"]=st["[object RegExp]"]=st["[object Set]"]=st["[object String]"]=st["[object WeakMap]"]=!1;var lt=function(t){return $(t)&&ct(t.length)&&!!st[T(t)]};var ft=function(t){return function(e){return t(e)}},dt=u((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&c.process,i=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i})),ht=dt&&dt.isTypedArray,pt=ht?ft(ht):lt,vt=Object.prototype.hasOwnProperty;var yt=function(t,e){var r=et(t),n=!r&&tt(t),o=!r&&!n&&nt(t),i=!r&&!n&&!o&&pt(t),a=r||n||o||i,u=a?Y(t.length,String):[],c=u.length;for(var s in t)!e&&!vt.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||at(s,c))||u.push(s);return u},_t=Object.prototype;var bt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||_t)};var Et=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),gt=Object.prototype.hasOwnProperty;var Ot=function(t){if(!bt(t))return Et(t);var e=[];for(var r in Object(t))gt.call(t,r)&&"constructor"!=r&&e.push(r);return e};var Tt=function(t){return null!=t&&ct(t.length)&&!N(t)};var mt=function(t){return Tt(t)?yt(t):Ot(t)};var At=function(t,e){return t&&K(t,e,mt)};var It=function(){this.__data__=[],this.size=0};var Rt=function(t,e){return t===e||t!=t&&e!=e};var wt=function(t,e){for(var r=t.length;r--;)if(Rt(t[r][0],e))return r;return-1},jt=Array.prototype.splice;var Nt=function(t){var e=this.__data__,r=wt(e,t);return!(r<0)&&(r==e.length-1?e.pop():jt.call(e,r,1),--this.size,!0)};var St=function(t){var e=this.__data__,r=wt(e,t);return r<0?void 0:e[r][1]};var Pt=function(t){return wt(this.__data__,t)>-1};var Dt=function(t,e){var r=this.__data__,n=wt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Ct(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ct.prototype.clear=It,Ct.prototype.delete=Nt,Ct.prototype.get=St,Ct.prototype.has=Pt,Ct.prototype.set=Dt;var Lt=Ct;var kt=function(){this.__data__=new Lt,this.size=0};var Ut=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var xt=function(t){return this.__data__.get(t)};var Mt=function(t){return this.__data__.has(t)},Ft=V(l,"Map"),Bt=V(Object,"create");var zt=function(){this.__data__=Bt?Bt(null):{},this.size=0};var Gt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Vt="__lodash_hash_undefined__",Ht=Object.prototype.hasOwnProperty;var Wt=function(t){var e=this.__data__;if(Bt){var r=e[t];return r===Vt?void 0:r}return Ht.call(e,t)?e[t]:void 0},Kt=Object.prototype.hasOwnProperty;var Yt=function(t){var e=this.__data__;return Bt?void 0!==e[t]:Kt.call(e,t)},$t="__lodash_hash_undefined__";var Jt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Bt&&void 0===e?$t:e,this};function Zt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Zt.prototype.clear=zt,Zt.prototype.delete=Gt,Zt.prototype.get=Wt,Zt.prototype.has=Yt,Zt.prototype.set=Jt;var qt=Zt;var Xt=function(){this.size=0,this.__data__={hash:new qt,map:new(Ft||Lt),string:new qt}};var Qt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var te=function(t,e){var r=t.__data__;return Qt(e)?r["string"==typeof e?"string":"hash"]:r.map};var ee=function(t){var e=te(this,t).delete(t);return this.size-=e?1:0,e};var re=function(t){return te(this,t).get(t)};var ne=function(t){return te(this,t).has(t)};var oe=function(t,e){var r=te(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ie(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ie.prototype.clear=Xt,ie.prototype.delete=ee,ie.prototype.get=re,ie.prototype.has=ne,ie.prototype.set=oe;var ae=ie,ue=200;var ce=function(t,e){var r=this.__data__;if(r instanceof Lt){var n=r.__data__;if(!Ft||n.length<ue-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ae(n)}return r.set(t,e),this.size=r.size,this};function se(t){var e=this.__data__=new Lt(t);this.size=e.size}se.prototype.clear=kt,se.prototype.delete=Ut,se.prototype.get=xt,se.prototype.has=Mt,se.prototype.set=ce;var le=se,fe="__lodash_hash_undefined__";var de=function(t){return this.__data__.set(t,fe),this};var he=function(t){return this.__data__.has(t)};function pe(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ae;++e<r;)this.add(t[e])}pe.prototype.add=pe.prototype.push=de,pe.prototype.has=he;var ve=pe;var ye=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var _e=function(t,e){return t.has(e)},be=1,Ee=2;var ge=function(t,e,r,n,o,i){var a=r&be,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(t);if(s&&i.get(e))return s==e;var l=-1,f=!0,d=r&Ee?new ve:void 0;for(i.set(t,e),i.set(e,t);++l<u;){var h=t[l],p=e[l];if(n)var v=a?n(p,h,l,e,t,i):n(h,p,l,t,e,i);if(void 0!==v){if(v)continue;f=!1;break}if(d){if(!ye(e,(function(t,e){if(!_e(d,e)&&(h===t||o(h,t,r,n,i)))return d.push(e)}))){f=!1;break}}else if(h!==p&&!o(h,p,r,n,i)){f=!1;break}}return i.delete(t),i.delete(e),f},Oe=l.Uint8Array;var Te=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var me=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},Ae=1,Ie=2,Re="[object Boolean]",we="[object Date]",je="[object Error]",Ne="[object Map]",Se="[object Number]",Pe="[object RegExp]",De="[object Set]",Ce="[object String]",Le="[object Symbol]",ke="[object ArrayBuffer]",Ue="[object DataView]",xe=f?f.prototype:void 0,Me=xe?xe.valueOf:void 0;var Fe=function(t,e,r,n,o,i,a){switch(r){case Ue:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ke:return!(t.byteLength!=e.byteLength||!i(new Oe(t),new Oe(e)));case Re:case we:case Se:return Rt(+t,+e);case je:return t.name==e.name&&t.message==e.message;case Pe:case Ce:return t==e+"";case Ne:var u=Te;case De:var c=n&Ae;if(u||(u=me),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;n|=Ie,a.set(t,e);var l=ge(u(t),u(e),n,o,i,a);return a.delete(t),l;case Le:if(Me)return Me.call(t)==Me.call(e)}return!1};var Be=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var ze=function(t,e,r){var n=e(t);return et(t)?n:Be(n,r(t))};var Ge=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i};var Ve=function(){return[]},He=Object.prototype.propertyIsEnumerable,We=Object.getOwnPropertySymbols,Ke=We?function(t){return null==t?[]:(t=Object(t),Ge(We(t),(function(e){return He.call(t,e)})))}:Ve;var Ye=function(t){return ze(t,mt,Ke)},$e=1,Je=Object.prototype.hasOwnProperty;var Ze=function(t,e,r,n,o,i){var a=r&$e,u=Ye(t),c=u.length;if(c!=Ye(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:Je.call(e,l)))return!1}var f=i.get(t);if(f&&i.get(e))return f==e;var d=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var p=t[l=u[s]],v=e[l];if(n)var y=a?n(v,p,l,e,t,i):n(p,v,l,t,e,i);if(!(void 0===y?p===v||o(p,v,r,n,i):y)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var _=t.constructor,b=e.constructor;_!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(d=!1)}return i.delete(t),i.delete(e),d},qe=V(l,"DataView"),Xe=V(l,"Promise"),Qe=V(l,"Set"),tr=V(l,"WeakMap"),er=L(qe),rr=L(Ft),nr=L(Xe),or=L(Qe),ir=L(tr),ar=T;(qe&&"[object DataView]"!=ar(new qe(new ArrayBuffer(1)))||Ft&&"[object Map]"!=ar(new Ft)||Xe&&"[object Promise]"!=ar(Xe.resolve())||Qe&&"[object Set]"!=ar(new Qe)||tr&&"[object WeakMap]"!=ar(new tr))&&(ar=function(t){var e=T(t),r="[object Object]"==e?t.constructor:void 0,n=r?L(r):"";if(n)switch(n){case er:return"[object DataView]";case rr:return"[object Map]";case nr:return"[object Promise]";case or:return"[object Set]";case ir:return"[object WeakMap]"}return e});var ur=ar,cr=1,sr="[object Arguments]",lr="[object Array]",fr="[object Object]",dr=Object.prototype.hasOwnProperty;var hr=function(t,e,r,n,o,i){var a=et(t),u=et(e),c=a?lr:ur(t),s=u?lr:ur(e),l=(c=c==sr?fr:c)==fr,f=(s=s==sr?fr:s)==fr,d=c==s;if(d&&nt(t)){if(!nt(e))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new le),a||pt(t)?ge(t,e,r,n,o,i):Fe(t,e,c,r,n,o,i);if(!(r&cr)){var h=l&&dr.call(t,"__wrapped__"),p=f&&dr.call(e,"__wrapped__");if(h||p){var v=h?t.value():t,y=p?e.value():e;return i||(i=new le),o(v,y,r,n,i)}}return!!d&&(i||(i=new le),Ze(t,e,r,n,o,i))};var pr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!$(e)&&!$(r)?e!=e&&r!=r:hr(e,r,n,o,t,i))},vr=1,yr=2;var _r=function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=r[o])[0],s=t[c],l=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var f=new le;if(n)var d=n(s,l,c,t,e,f);if(!(void 0===d?pr(l,s,vr|yr,n,f):d))return!1}}return!0};var br=function(t){return t==t&&!m(t)};var Er=function(t){for(var e=mt(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,br(o)]}return e};var gr=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Or=function(t){var e=Er(t);return 1==e.length&&e[0][2]?gr(e[0][0],e[0][1]):function(r){return r===t||_r(r,t,e)}},Tr="[object Symbol]";var mr=function(t){return"symbol"==typeof t||$(t)&&T(t)==Tr},Ar=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ir=/^\w*$/;var Rr=function(t,e){if(et(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!mr(t))||(Ir.test(t)||!Ar.test(t)||null!=e&&t in Object(e))},wr="Expected a function";function jr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(wr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(jr.Cache||ae),r}jr.Cache=ae;var Nr=jr,Sr=500;var Pr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/\\(\\)?/g,Cr=function(t){var e=Nr(t,(function(t){return r.size===Sr&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Pr,(function(t,r,n,o){e.push(n?o.replace(Dr,"$1"):r||t)})),e}));var Lr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},kr=1/0,Ur=f?f.prototype:void 0,xr=Ur?Ur.toString:void 0;var Mr=function t(e){if("string"==typeof e)return e;if(et(e))return Lr(e,t)+"";if(mr(e))return xr?xr.call(e):"";var r=e+"";return"0"==r&&1/e==-kr?"-0":r};var Fr=function(t){return null==t?"":Mr(t)};var Br=function(t,e){return et(t)?t:Rr(t,e)?[t]:Cr(Fr(t))},zr=1/0;var Gr=function(t){if("string"==typeof t||mr(t))return t;var e=t+"";return"0"==e&&1/t==-zr?"-0":e};var Vr=function(t,e){for(var r=0,n=(e=Br(e,t)).length;null!=t&&r<n;)t=t[Gr(e[r++])];return r&&r==n?t:void 0};var Hr=function(t,e,r){var n=null==t?void 0:Vr(t,e);return void 0===n?r:n};var Wr=function(t,e){return null!=t&&e in Object(t)};var Kr=function(t,e,r){for(var n=-1,o=(e=Br(e,t)).length,i=!1;++n<o;){var a=Gr(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&ct(o)&&at(a,o)&&(et(t)||tt(t))};var Yr=function(t,e){return null!=t&&Kr(t,e,Wr)},$r=1,Jr=2;var Zr=function(t,e){return Rr(t)&&br(e)?gr(Gr(t),e):function(r){var n=Hr(r,t);return void 0===n&&n===e?Yr(r,t):pr(e,n,$r|Jr)}};var qr=function(t){return t};var Xr=function(t){return function(e){return null==e?void 0:e[t]}};var Qr=function(t){return function(e){return Vr(e,t)}};var tn=function(t){return Rr(t)?Xr(Gr(t)):Qr(t)};var en=function(t){return"function"==typeof t?t:null==t?qr:"object"==typeof t?et(t)?Zr(t[0],t[1]):Or(t):tn(t)};var rn=function(t,e){var r={};return e=en(e),At(t,(function(t,n,o){W(r,n,e(t,n,o))})),r},nn={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};var on=["Webkit","ms","Moz","O"];Object.keys(nn).forEach((function(t){on.forEach((function(e){nn[function(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}(e,t)]=nn[t]}))}));var an={isUnitlessNumber:nn,shorthandPropertyExpansions:{background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}}};var un=function(t){var r=t.css,n={};return Object.entries(r).forEach((function(t){var e=t[0],r=t[1];if("number"==typeof r)return an.isUnitlessNumber[e]?void(n[e]=""+r):void(n[e]=r+"px");n[e]=r})),e(e({},t),{css:e(e({},n),{boxSizing:"border-box"})})};var cn,sn,ln,fn,dn,hn,pn="/api/checklistItems",vn="/api/segmentMemberships",yn="/api/segmentsDefinition",_n="/api/tutorialMetadata",bn="/api/tutorialDocumentsSdk",En="wss://2jcfb7pjlf.execute-api.eu-west-1.amazonaws.com/prod",gn=function(t){if(!document.querySelectorAll('[href="'+t+'"]').length){var e=document.createElement("link");e.setAttribute("rel","prefetch"),e.setAttribute("href",t),document.head.appendChild(e)}},On=function(){function t(t){this.adjacencyList={},this.rootDocument=t,this.adjacencyList[t]=[]}return t.prototype.get=function(t){return this.adjacencyList[t]},t.prototype.add=function(t,e){var r=this;if(this.adjacencyList[t]||(this.adjacencyList[t]=[]),!this.adjacencyList[e])return this.adjacencyList[t].push(e),this.adjacencyList[e]=[],!0;if(this.adjacencyList[t].includes(e))return!0;var n=function(e){if(e===t)return!0;for(var o=0,i=r.adjacencyList[e];o<i.length;o++){var a=i[o];if(n(a))return!0}return!1};return!n(e)&&(this.adjacencyList[t].push(e),!0)},t}(),Tn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},mn="object"==typeof Tn&&Tn&&Tn.Object===Object&&Tn,An="object"==typeof self&&self&&self.Object===Object&&self,In=(mn||An||Function("return this")()).Symbol,Rn=Object.prototype,wn=Rn.hasOwnProperty,jn=Rn.toString,Nn=In?In.toStringTag:void 0,Sn=Object.prototype.toString,Pn=In?In.toStringTag:void 0,Dn=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Pn&&Pn in Object(t)?function(t){var e=wn.call(t,Nn),r=t[Nn];try{t[Nn]=void 0;var n=!0}catch(t){}var o=jn.call(t);return n&&(e?t[Nn]=r:delete t[Nn]),o}(t):function(t){return Sn.call(t)}(t)},Cn=Array.isArray,Ln=function(t){return null!=t&&"object"==typeof t},kn=function(t){return"string"==typeof t||!Cn(t)&&Ln(t)&&"[object String]"==Dn(t)},Un=/^([a-zA-Z0-9]|_|-)+$/,xn=function(t){return function(t){return"number"==typeof t||Ln(t)&&"[object Number]"==Dn(t)}(t)&&t>=0};!function(t){t.SDK="SDK",t.PREVIEW="PREVIEW"}(cn||(cn={})),function(t){t.BOOTSTRAP="Bootstrap",t.CHANGE_POSITION="ChangePosition",t.CLOSE_PREVIEW="ClosePreview",t.PREVIEW_LOADED="PreviewLoaded",t.SET_AVALIABLE_PORTALS="SetAvaliablePortals",t.SET_CONTENT="SetContent",t.SET_SELECTED_ELEMENT="SetSelectedElement",t.SET_VIEW_MODE="SetViewMode",t.ADD_ELEMENT="AddElement",t.REMOVE_ELEMENT="RemoveElement",t.UPDATE_ELEMENT="UpdateElement",t.SET_ELEMENT="SetElement"}(sn||(sn={})),function(t){t.ON_CLICK="OnClick"}(ln||(ln={})),function(t){t.NATIVE="Native",t.PENDO="Pendo"}(fn||(fn={})),function(t){t.NAVIGATE="Navigate",t.CHANGE_TUTORIAL="ChangeTutorial",t.OPEN_GUIDE="OpenGuide"}(dn||(dn={})),function(t){t.PRIMARY="primary",t.SECONDARY="primary",t.WARNING="warning",t.DANGER="danger",t.NEUTRAL="neutral",t.ACTIVE="active",t.INFO="info"}(hn||(hn={}));var Mn;hn.PRIMARY;!function(t){t.U="U",t.B="B",t.Em="Em",t.InlineCode="InlineCode"}(Mn||(Mn={}));var Fn,Bn,zn,Gn,Vn,Hn,Wn,Kn=function(t){return function(t){return kn(t)&&t.length>=3&&t.length<100&&Un.test(t)}(t)};!function(t){t.NotStared="NotStarted",t.InProgress="InProgress",t.Done="Done"}(Fn||(Fn={})),function(t){t.COLLAPSED="Collapsed",t.EXPANDED="Expanded",t.MINIMIZED="Minimized"}(Bn||(Bn={})),function(t){t.TUTORIAL="Tutorial",t.PORTAL="Portal"}(zn||(zn={})),function(t){t.Global="Global",t.Organization="Organization"}(Gn||(Gn={})),function(t){t.Root="root",t.Rule="rule",t.Atrule="atrule",t.Decl="decl",t.Any="any"}(Vn||(Vn={})),function(t){t.Global="Global",t.Carried="Carried"}(Hn||(Hn={})),function(t){t.CanduCdn="CanduCdn",t.CheckListApi="CheckListApi"}(Wn||(Wn={}));for(var Yn,$n=function(t){return"candu.sdk."+t},Jn=function(t){return $n("error."+t)},Zn={UNKOWN_NODE_TYPE:"unknown_node_type",UNKOWN_BLOCK_NODE_TYPE:"unkown_block_node_type",UNKOWN_INLINE_NODE_TYPE:"unkown_inline_node_type",UNKOWN_NODE_OBJECT_TYPE:"unkown_node_object_type",TUTORIAL_ERROR:"tutorial_error_boundary",PORTAL_ERROR:"portal_error_boundary",PROVIDER_ERROR:"provider_error_boundary",STYLEGUIDE_MAP_ERROR:"styleguide_map",RENDER_NODE_ERROR:"render_node"},qn={HEARTBEAT:$n("heartbeat"),PREVIEW_OPEN:$n("preview.open"),PORTAL:$n("portal"),TUTORIAL:$n("tutorial"),TUTORIAL_INTERACTION:$n("tutorial.interaction"),PORTAL_ASSET_NOT_FOUND:Jn("portal_asset_not_found"),PORTAL_NO_SEGMENT_IDS:Jn("portal_no_segment_ids"),NO_MATCHING_TUTORIALS:Jn("no_matching_tutorials"),NO_VALID_TUTORIAL_IDENTIFIER:Jn("no_valid_tutorial_identifier"),COMMIT_API_LOADING_ERROR:Jn("commit_api"),TUTORIAL_LOADING_ERROR:Jn("tutorial"),UNKOWN_NODE_TYPE:Jn(Zn.UNKOWN_NODE_TYPE),UNKOWN_INLINE_NODE_TYPE:Jn(Zn.UNKOWN_INLINE_NODE_TYPE),UNKOWN_NODE_OBJECT_TYPE:Jn(Zn.UNKOWN_NODE_OBJECT_TYPE),TUTORIAL_ERROR:Jn(Zn.TUTORIAL_ERROR),PORTAL_ERROR:Jn(Zn.PORTAL_ERROR),PROVIDER_ERROR:Jn(Zn.PROVIDER_ERROR),STYLEGUIDE_MAP_ERROR:Jn(Zn.TUTORIAL_ERROR),RENDER_NODE_ERROR:Jn(Zn.TUTORIAL_ERROR),CIRCULAR_DEPENDENCY_EMBED_PORTAL:Jn("circular_dependecy_embed_portal"),CIRCULAR_DEPENDENCY_EMBED_TUTORIAL:Jn("circular_dependecy_embed_tutorial"),STATE_FETCH_FAILED:Jn("state_fetch_failed"),STATE_UPDATE_FAILED:Jn("state_update_failed")},Xn=function(t){return"An error has occured while trying to parse your Tutorial.\nUpgrade the SDK to the latest version to get rid of this error.\nErrorCode: "+t+"."},Qn=((Yn={EVENTING_NOT_INITIALIZED:"You tried to send an event, but you haven't initialized eventing.\nThis is happening because you called eventing outside the scope of the CanduProvider. It can be fixed by:\n1. Adding CanduProvider to the root of the application.\n2. Initializing a new Eventing object outside of Candu.\nRead here for more context: http://udn.ac/tracking-not-init.\n"})[qn.PORTAL_ASSET_NOT_FOUND]="Could not find the requested Portal. This could happen because:\n1. The Portal does not exist or it was deleted.\n2. The Portal has not been made avaliable to be rendered.\n3. CORS Authenticaton failed.\nSee http://udn.ac/portal-not-found for more information.\n",Yn[qn.PORTAL_NO_SEGMENT_IDS]="You have tried to render a Portal that doesn't contain any content.\nAdd content to your Portal: https://udn.ac/update-portals.\n",Yn[qn.NO_MATCHING_TUTORIALS]="The Tutorial will not be rendered because there are no matching segments for the given user.",Yn[qn.NO_VALID_TUTORIAL_IDENTIFIER]="(Candu/Tutorial) You must define one of tutorialId, slug, commitId or contentHashId.",Yn[qn.TUTORIAL_LOADING_ERROR]="An error has occurred while trying to load the Tutorial",Yn[qn.UNKOWN_INLINE_NODE_TYPE]=Xn(Zn.UNKOWN_INLINE_NODE_TYPE),Yn[qn.UNKOWN_NODE_TYPE]=Xn(Zn.UNKOWN_NODE_TYPE),Yn[qn.CIRCULAR_DEPENDENCY_EMBED_PORTAL]="Circular dependency found on Embeded Portal. Please take a look at the Portal Content.",Yn[qn.CIRCULAR_DEPENDENCY_EMBED_TUTORIAL]="Circular dependency found on Embeded Tutorial. Please take a look at the Tutorial Content.",Yn[qn.PORTAL_ERROR]="An error has occured within Portal",Yn[qn.PROVIDER_ERROR]="An error has occured within Provider",Yn[qn.TUTORIAL_ERROR]="An error has occured within Tutorial",Yn[qn.RENDER_NODE_ERROR]="An error has occured while rendering tutorial node",Yn[qn.STYLEGUIDE_MAP_ERROR]="An error has occured while mapping node to styleguide",Yn[qn.STATE_FETCH_FAILED]="An error has occured while fetching state:",Yn[qn.STATE_UPDATE_FAILED]="An error has occured while updating state:",Yn),to={Alert:!0,B:!0,Badge:!0,Button:!0,Card:!0,Code:!0,Document:!0,Em:!0,EmbedPortal:!0,EmbedTutorial:!0,Flex:!0,FlexItem:!0,H1:!0,H2:!0,H3:!0,H4:!0,H5:!0,H6:!0,Image:!0,InlineCode:!0,Link:!0,List:!0,ListItem:!0,P:!0,RichText:!0,Spacing:!0,Text:!0,U:!0,View:!0,Player:!0},eo={error:console.error,warning:console.warn},ro=function(t,e){return function(t){var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r}}else{var n=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=t>>>((3&e)<<3)&255;return n}}}(e={exports:{}}),e.exports}(),no=[],oo=0;oo<256;++oo)no[oo]=(oo+256).toString(16).substr(1);var io,ao,uo=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||ro)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||function(t,e){var r=e||0,n=no;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")}(o)};!function(t){t.UserGenerated="UserGenerated",t.SDK="SDK"}(io||(io={})),function(t){t.Identify="Identify",t.Group="Group",t.Track="Track",t.Page="Page",t.Screen="Screen"}(ao||(ao={}));var co,so=function(){return"undefined"!=typeof window&&window.localStorage},lo=function(t){return function(e){so()&&null!=e&&window.localStorage.setItem(t,JSON.stringify(e))}},fo={anonymousId:{getOrCreate:("candu:anonymous_id",co=function(){var t=uo();return lo("candu:anonymous_id")(t),t},function(){return function(){if(so()){var t=window.localStorage.getItem("candu:anonymous_id");if(t)try{return JSON.parse(t)}catch(t){return null}}}()||co()}),set:lo("candu:anonymous_id")}}.anonymousId.getOrCreate,ho=function(t,e,r,n,o,i,a,u){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,o,i,a,u],l=0;(c=new Error(e.replace(/%s/g,(function(){return s[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}},po=function(t){return ho(!t||m(t),"(Candu) styleguide must be undefined or an object")},vo=function(t){return n(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[2,e.sent().json()]}}))}))},yo=function(t){return vo("https://api.candu.ai"+t)},_o=function(t){return vo("https://cdn.candu.ai"+t)},bo={tutorialDocumentLatestSaved:function(t,e){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,yo(bn+"/"+e+"?token="+t)]}))}))},portalAsset:function(t,e){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,_o("/portals/"+t+"/"+e+"/head.json")]}))}))},segmentMembership:function(t,e){return n(void 0,void 0,void 0,(function(){return o(this,(function(r){return[2,yo(vn+"/"+e+"?token="+t)]}))}))},segmentDefinition:function(t){return n(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,yo(yn+"?token="+t)]}))}))},tutorialMetadata:function(t){return n(void 0,void 0,void 0,(function(){return o(this,(function(e){return[2,yo(_n+"?token="+t)]}))}))},tutorialSocket:function(t,e,r){var n=new WebSocket(En+"?clientToken="+t+"&tutorialId="+e);return n.onmessage=function(t){var e=JSON.parse(t.data);r(e)},function(){return n.close()}},tutorialDocument:function(t,e,r){var n=t.contentHashId,o=t.tutorialId,i=t.tutorialDocument,a=t.slug,u=function(t){return{byId:function(e){return yo(bn+"?token="+t+"&finder=latestPublished&tutorialId="+e)},bySlug:function(e){return _o("/tutorials/"+t+"/"+e+".json")},byContentHash:function(e){return _o("/tutorials/"+t+"/"+e+".json")}}}(e);return Kn(a)?u.bySlug(a):function(t){return xn(t)}(o)?u.byId(o):function(t){return kn(t)&&!!t.match(/^[0-9a-zA-Z]{40}$/)}(n)?u.byContentHash(n):m(i)?Promise.resolve(i):(eo.error(Qn[qn.NO_VALID_TUTORIAL_IDENTIFIER]),r.track(qn.NO_VALID_TUTORIAL_IDENTIFIER,{slug:t.slug}),null)}},Eo=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.error.apply(console,t)},go=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.warn.apply(console,t)},Oo={error:Eo,warning:go},To=function(){function t(){this.subscribers=[]}return t.prototype.subscribe=function(t){var e=this;return this.subscribers.push(t),function(){e.subscribers[e.subscribers.indexOf(t)]=function(){}}},t.prototype.notify=function(t){this.subscribers.forEach((function(e){return e(t)}))},t.prototype.clear=function(){this.subscribers=[]},t}(),mo=function(){function t(){this.onClientUpdateObserver=new To}return t.prototype.attachClient=function(t){this.client=t,this.onClientUpdateObserver.notify({client:t})},t.prototype.detachClient=function(){this.client&&(this.client=null,this.onClientUpdateObserver.notify({client:null}))},t.prototype.onClientUpdate=function(t){var e=this.onClientUpdateObserver.subscribe(t);return this.client&&t({client:this.client}),e},t}();var Ao=function(){function t(t){this.init(t)}return t.prototype.attachClient=function(t){return this.provider.preview.attachClient(t)},t.prototype.detachClient=function(){return this.provider.preview.detachClient()},Object.defineProperty(t.prototype,"provider",{get:function(){return this.getProvider()},enumerable:!0,configurable:!0}),t}(),Io=function(t){switch(t.trigger){case ln.ON_CLICK:default:return"onClick"}},Ro=function(t,r){var n=t.data;if(!n||!n.actions)return{};var o=function(t){r.provider.eventing.track(qn.TUTORIAL_INTERACTION,e(e({},t),r.trackingIdentifiers||{}))};return n.actions.map((function(t){return function(t,e){var r,n,o;switch(t.handler.type){case dn.NAVIGATE:return(r={})[Io(t)]=function(){var r=t.handler,n=r.href,o=r.target;e(t),"Blank"===o?window.open(n,"_blank"):n&&n.includes("mailto:")?window.location=n:document.location.href=n},r;case dn.CHANGE_TUTORIAL:return(n={})[Io(t)]=function(){var e=t.handler.tutorialId;Eo("TODO -> change tutorial",e)},n;case dn.OPEN_GUIDE:return(o={})[Io(t)]=function(){var e=t.handler.guideId;Eo("TODO -> open guide",e)},o;default:return{}}}(t,o)})).reduce((function(t,r){return e(e({},t),r)}),{})},wo=function(t,e){var r=t.props||{},n=t.nodes,o=r.children;return o||(n?n.map(e):null)},jo=function(t,r){try{var n=r.provider,o=r.document,i=r.trackingIdentifiers,a=o.nodes[t];if(!a)return Oo.error("Document is corrupted. Refusing to move further."),null;var u=function(t){return jo(t,r)},c=a.type,s=a.props,l=a.css,f=a.states,d=e(e(e({},s||{}),{style:l||{},children:wo(a,u)}),Ro(a,{trackingIdentifiers:i,provider:n})),h={nodeId:t,node:a,document:o,render:{node:u,styleguide:function(t,e){return void 0===e&&(e={}),r.renderNode(t,{api:h,attributes:e})},tutorial:function(t){return r.renderTutorial(t)},portal:function(t){return r.renderPortal(t)}},trackingIdentifiers:i,stateInstances:f&&r.stateProviderInstances.filter((function(t){return!!f[t.providerId]}))},p=h.render.styleguide(c,d);return p||(Oo.error(Qn[qn.UNKOWN_NODE_TYPE],{type:c}),n.eventing.track(qn.UNKOWN_NODE_TYPE,{type:c}),null)}catch(t){return Oo.error(Qn[qn.STYLEGUIDE_MAP_ERROR],t),null}},No=Nr((function(t,r){var n,o,i=t.provider,a=t.portal,u=t.tutorial,c=i.styleguide;return u&&(o=u.styleguide),a&&(n=a.styleguide),e(e(e(e({},c||{}),n||{}),o||{}),r||{})})),So=function(t){return"candu-styleguide-"+t};var Po=function(t,e){return function(r,n){if(null==r)return r;if(!Tt(r))return t(r,n);for(var o=r.length,i=e?o:-1,a=Object(r);(e?i--:++i<o)&&!1!==n(a[i],i,a););return r}}(At);var Do=function(t,e){var r=-1,n=Tt(t)?Array(t.length):[];return Po(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var Co,Lo=function(t,e){return(et(t)?Lr:Do)(t,en(e))},ko=function(){function t(t,e){if("function"!=typeof t)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but got: "+t+".");this._batchLoadFn=t,this._maxBatchSize=function(t){if(t&&!1===t.batch)return 1;var e=t&&t.maxBatchSize;if(void 0===e)return 1/0;if("number"!=typeof e||e<1)throw new TypeError("maxBatchSize must be a positive number: "+e);return e}(e),this._batchScheduleFn=function(t){var e=t&&t.batchScheduleFn;if(void 0===e)return Uo;if("function"!=typeof e)throw new TypeError("batchScheduleFn must be a function: "+e);return e}(e),this._cacheKeyFn=function(t){var e=t&&t.cacheKeyFn;if(void 0===e)return function(t){return t};if("function"!=typeof e)throw new TypeError("cacheKeyFn must be a function: "+e);return e}(e),this._cacheMap=function(t){if(t&&!1===t.cache)return null;var e=t&&t.cacheMap;if(void 0===e)return new Map;if(null!==e){var r=["get","set","delete","clear"].filter((function(t){return e&&"function"!=typeof e[t]}));if(0!==r.length)throw new TypeError("Custom cacheMap missing methods: "+r.join(", "))}return e}(e),this._batch=null}var e=t.prototype;return e.load=function(t){if(null==t)throw new TypeError("The loader.load() function must be called with a value,but got: "+String(t)+".");var e=function(t){var e=t._batch;if(null!==e&&!e.hasDispatched&&e.keys.length<t._maxBatchSize&&(!e.cacheHits||e.cacheHits.length<t._maxBatchSize))return e;var r={hasDispatched:!1,keys:[],callbacks:[]};return t._batch=r,t._batchScheduleFn((function(){return function(t,e){if(e.hasDispatched=!0,0===e.keys.length)return void Mo(e);var r=t._batchLoadFn(e.keys);if(!r||"function"!=typeof r.then)return xo(t,e,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise: "+String(r)+"."));r.then((function(t){if(!Fo(t))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array: "+String(t)+".");if(t.length!==e.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys.\n\nKeys:\n"+String(e.keys)+"\n\nValues:\n"+String(t));Mo(e);for(var r=0;r<e.callbacks.length;r++){var n=t[r];n instanceof Error?e.callbacks[r].reject(n):e.callbacks[r].resolve(n)}})).catch((function(r){return xo(t,e,r)}))}(t,r)})),r}(this),r=this._cacheMap,n=this._cacheKeyFn(t);if(r){var o=r.get(n);if(o){var i=e.cacheHits||(e.cacheHits=[]);return new Promise((function(t){i.push((function(){return t(o)}))}))}}e.keys.push(t);var a=new Promise((function(t,r){e.callbacks.push({resolve:t,reject:r})}));return r&&r.set(n,a),a},e.loadMany=function(t){if(!Fo(t))throw new TypeError("The loader.loadMany() function must be called with Array<key> but got: "+t+".");for(var e=[],r=0;r<t.length;r++)e.push(this.load(t[r]).catch((function(t){return t})));return Promise.all(e)},e.clear=function(t){var e=this._cacheMap;if(e){var r=this._cacheKeyFn(t);e.delete(r)}return this},e.clearAll=function(){var t=this._cacheMap;return t&&t.clear(),this},e.prime=function(t,e){var r=this._cacheMap;if(r){var n,o=this._cacheKeyFn(t);if(void 0===r.get(o))e instanceof Error?(n=Promise.reject(e)).catch((function(){})):n=Promise.resolve(e),r.set(o,n)}return this},t}(),Uo="object"==typeof process&&"function"==typeof process.nextTick?function(t){Co||(Co=Promise.resolve()),Co.then((function(){return process.nextTick(t)}))}:setImmediate||setTimeout;function xo(t,e,r){Mo(e);for(var n=0;n<e.keys.length;n++)t.clear(e.keys[n]),e.callbacks[n].reject(r)}function Mo(t){if(t.cacheHits)for(var e=0;e<t.cacheHits.length;e++)t.cacheHits[e]()}function Fo(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&(0===t.length||t.length>0&&Object.prototype.hasOwnProperty.call(t,t.length-1))}var Bo=ko,zo="https://api.candu.ai"+pn;function Go(t){return{state:t.state,id:t.id}}var Vo=function(t,e,r){return fetch(zo+"?token="+t+"&userId="+e+"&finder=byIds&ids="+r.join(",")).then((function(t){return t.json()})).then((function(t){return t.map(Go)}))},Ho={};function Wo(t,e){var r=this,i=t+"-"+e,a=Ho[i];if(!a){a=new Bo((function(i){return n(r,void 0,void 0,(function(){var r;return o(this,(function(n){switch(n.label){case 0:return[4,Vo(t,e,i)];case 1:return r=n.sent(),[2,i.map((function(t){return r.find((function(e){return e.id===t}))}))]}}))}))})),Ho[i]=a}return a}var Ko=function(){function t(t){var e=t.context,r=t.providerId;this.type=Wn.CheckListApi,this.clientToken=e.clientToken,this.providerId=r,this.userId=e.userId}return t.prototype.retrieve=function(){return n(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,Wo(this.clientToken,this.userId).load(this.providerId)];case 1:return[2,t.sent()||{id:this.providerId,state:Fn.NotStared}]}}))}))},t.prototype.mutate=function(t){return r=this.clientToken,n=this.userId,o=this.providerId,i=t,fetch(zo+"/"+o+"?token="+r,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e(e({},i),{userId:n.toString()}))}).then((function(t){return t.json()})).then(Go);var r,n,o,i},t}();var Yo=function(){function t(t,e,r){var n=this;this.observer=new To,this.providerId=t,this.resolver=e,this.resolvedState=null,this.eventing=r,e.retrieve().then((function(t){return n.updateState(t)})).catch((function(t){Oo.error(Qn[qn.STATE_FETCH_FAILED],t.message),n.eventing.track(Qn[qn.STATE_FETCH_FAILED],{errorMessage:t.message})}))}return t.prototype.mutate=function(t){var r=this,n=this.resolvedState;this.updateState(e(e({},n),t)),this.resolver.mutate(t).then((function(t){return r.updateState(t)})).catch((function(t){Oo.error(Qn[qn.STATE_UPDATE_FAILED],t.message),r.eventing.track(Qn[qn.STATE_UPDATE_FAILED],{errorMessage:t.message}),n&&r.updateState(n)}))},t.prototype.subscribe=function(t){var e=this.observer.subscribe(t);return this.resolvedState&&t(this.resolvedState),e},t.prototype.updateState=function(t){this.resolvedState=t,this.observer.notify(t)},t}();t.DEFAULT_ALERT_COLOR="#EDEDED",t.DEFAULT_ALT="",t.DEFAULT_TAB_ACTIVE_COLOR="#FEFEFE",t.DEFAULT_TAB_COLOR="#FEFEFE",t.DEFAULT_TAB_HEADER_COLOR="#333745",t.DEFAULT_TAB_ITEM_COLOR="#838792",t.ERROR_MESSAGES=Qn,t.ERROR_SLUGS=Zn,t.EVENT_NAMES=qn,t.LOGGER=eo,t.Observer=To,t.PreviewContainer=mo,t.RESOURCES=bo,t.STYLEGUIDE_COLORS={primary:"#6310E5",secondary:"#59C3C3",tertiary:"#4D515D",warning:"#FCAD0D",danger:"#EE4266"},t.SingletonAPI=Ao,t.StateProviderInstance=Yo,t.TutorialDependencies=On,t.adaptCustomNodes=function(t){return rn(t,(function(t){var r=t;return"Typography"===r.type&&(r=function(t){var r=Hr(t,"data.custom.variant","P");return e(e({},t),{type:r})}(r)),r.css&&m(r.css)&&r.css.flexBasis&&(r=function(t){var r=t.css.flexBasis;return"0"===r||"0px"===r?e(e({},t),{css:e(e({},t.css),{flexBasis:"0%"})}):t}(r)),r.css&&(r=un(r)),r}))},t.attachStylesheet=function(t){var e=So(t);if(!document.getElementById(e)){var r=document.createElement("link");r.setAttribute("id",e),r.setAttribute("rel","stylesheet"),r.setAttribute("href","https://cdn.candu.ai/styleguides/applications/"+t+"/default/main.css"),document.head.appendChild(r)}},t.checkCyclicAndAdd=function(t,e){return t.dependencies.add(t.id,e)},t.createSingleton=function(t){var e,r,n=function(t){return function(){for(var e,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(r.api)return(e=r.api)[t].apply(e,n);console.warn("Please initialize the SDK by calling Candu.init() before attempting to call "+t)}};return(e=function(){function e(){}return e.init=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return this.api||(e.api=new(t.bind.apply(t,i([void 0],r)))),e.subscriberCallbacks.forEach((function(t){return t()})),e.subscriberCallbacks=[],window.postMessage({source:"CANDU_SINGLETON",payload:{type:"INIT"}},window&&window.origin?window.origin:"*"),e},e.onProviderReady=function(t){if(e.api)return t();e.subscriberCallbacks.push(t)},e}()).subscriberCallbacks=[],e.renderTutorial=n("renderTutorial"),e.renderPortal=n("renderPortal"),e.attachClient=n("attachClient"),e.detachClient=n("detachClient"),e.getProvider=n("getProvider"),r=e,window.Candu=r,r},t.createTutorialDocumentContext=function(t,e){return{id:t,dependencies:e?e.dependencies:new On(t)}},t.defaultStyleguide=to,t.detachStylesheet=function(t){var e=document.getElementById(So(t));e&&e.remove()},t.fetchHead=function(t,e){t&&et(t)&&t.map((function(t){var r=t.nodeType,n=t.url;return gn("EmbedTutorial"===r?"https://cdn.candu.ai/tutorials/"+e+"/"+n+".json":"EmbedPortal"===r?"https://cdn.candu.ai/portals/"+e+"/"+n+"/head.json":n)}))},t.findMatchingSegment=function(t,r){var n=r.reduce((function(t,r){var n;return e(e({},t),((n={})[r]=r,n))}),{});return t.content.find((function(t){var e=t.segmentId;return!!n[e]||"Everyone"===e}))},t.includeHTMLWhitespaces=function(t){return t.replace(/\s/g," ")},t.initStateProviders=function(t,e){return Lo(t,(function(t,r){var n=function(t,e){switch(t.type){case Wn.CheckListApi:return new Ko(e);default:throw new Error("Unsupported resolver type: "+t.type)}}(t.resolver,{providerId:r,context:e});return new Yo(r,n,e.eventing)}))},t.internalEventing=function(t){var e=t.identify,r=t.track;return{provider:function(t){var n=t.userId,o=t.traits,i=t.styleguide;e(n,o),r(qn.HEARTBEAT,function(t){var e={};return Object.keys(t).forEach((function(r){to[r]&&(e["styleguide."+r]=t[r].displayName||!0)})),e}(i))},tutorialDocumentLoadingError:function(t){var e=t.tutorialId,n=t.slug,o=t.contentHashId;eo.error(Qn[qn.TUTORIAL_LOADING_ERROR]),r(qn.TUTORIAL_LOADING_ERROR,{tutorialId:e,slug:n,contentHashId:o})}}},t.logError=Eo,t.logWarning=go,t.logger=Oo,t.mapNodeToStyleguide=jo,t.mergeStyleguidesFromContext=No,t.normalizeCss=un,t.portalValidation=function(t){var e=t.slug,r=t.styleguide;return po(r),{slug:e,styleguide:r||{}}},t.providerValidation=function(t){var n=t.clientToken,o=t.userId,i=t.traits,a=t.options,u=t.styleguide,c=r(t,["clientToken","userId","traits","options","styleguide"]);return ho(function(t){return kn(t)&&!!t.match(/^[0-9a-zA-Z]*$/)&&t.length>=10}(n),"(Candu) you must provide a valid clientToken"),ho(!o||function(t){return xn(t)||kn(t)&&t.trim().length>0}(o),"(Candu) you must provide a valid userId"),po(u),ho(!i||m(i),"(Candu) traits must be undefined or an object"),ho(!a||m(a),"(Candu) options must be undefined or an object"),e(e({},c),{clientToken:n,traits:i||{},options:a||{},styleguide:u||{},userId:o||fo()})},t.stripHTML=function(t){return DOMParser?(new DOMParser).parseFromString(t,"text/html").body.textContent||"":t},t.tutorialValidation=function(t){var n=t.slug,o=t.styleguide,i=t.contentHashId,a=t.tutorialId,u=t.tutorialDocument,c=t.renderedByClient,s=r(t,["slug","styleguide","contentHashId","tutorialId","tutorialDocument","renderedByClient"]);return po(o),e(e({},s),{slug:n,styleguide:o||{},contentHashId:i,tutorialId:a,tutorialDocument:u,renderedByClient:c})},Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.js.map |
@@ -12,3 +12,3 @@ { | ||
}, | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"main": "dist/index.js", | ||
@@ -28,7 +28,7 @@ "module": "dist/index.es.js", | ||
"@candulabs/eventing": "^0.6.0", | ||
"@candulabs/models": "^0.6.4", | ||
"@candulabs/models": "^0.6.5", | ||
"dataloader": "^2.0.0", | ||
"react-style-object-to-css": "^1.1.2" | ||
}, | ||
"gitHead": "a232451f5c9d515f4a4ecbc066bf83f51c30f428" | ||
"gitHead": "a05e53d88a75fd941cce074747fb1faabfadce59" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
956957
1193
Updated@candulabs/models@^0.6.5